@wandelbots/wandelbots-js-react-components 2.33.0-pr.feature-robot-precondition-list.372.cb3db34 → 2.33.0-pr.feature-robot-precondition-list.372.56785bf

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/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var ag=Object.create;var Ys=Object.defineProperty;var og=Object.getOwnPropertyDescriptor;var sg=Object.getOwnPropertyNames;var ig=Object.getPrototypeOf,lg=Object.prototype.hasOwnProperty;var cg=(e,t,r)=>t in e?Ys(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ug=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of sg(t))!lg.call(e,a)&&a!==r&&Ys(e,a,{get:()=>t[a],enumerable:!(n=og(t,a))||n.enumerable});return e};var Ks=(e,t,r)=>(r=e!=null?ag(ig(e)):{},ug(t||!e||!e.__esModule?Ys(r,"default",{value:e,enumerable:!0}):r,e));var kn=(e,t,r)=>cg(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const J=require("react"),ot=require("@react-three/drei"),Po=require("@react-three/fiber"),St=require("three"),dg=require("three-stdlib"),R=require("@mui/material"),ye=require("mobx-react-lite"),Re=require("react-i18next"),hg=require("i18next"),pg=require("i18next-browser-languagedetector"),x=require("prop-types"),mg=require("@emotion/react"),fg=require("@emotion/styled"),Rt=require("@mui/x-data-grid"),je=require("mobx"),Pl=require("lodash-es"),Or=require("@wandelbots/nova-js"),Nt=require("@mui/icons-material"),gg=require("react-error-boundary");function Mh(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 N=Mh(J),Le=Mh(St);function yg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Na={exports:{}},$n={};/**
1
+ "use strict";var ag=Object.create;var Ys=Object.defineProperty;var og=Object.getOwnPropertyDescriptor;var sg=Object.getOwnPropertyNames;var ig=Object.getPrototypeOf,lg=Object.prototype.hasOwnProperty;var cg=(e,t,r)=>t in e?Ys(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ug=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of sg(t))!lg.call(e,a)&&a!==r&&Ys(e,a,{get:()=>t[a],enumerable:!(n=og(t,a))||n.enumerable});return e};var Ks=(e,t,r)=>(r=e!=null?ag(ig(e)):{},ug(t||!e||!e.__esModule?Ys(r,"default",{value:e,enumerable:!0}):r,e));var $n=(e,t,r)=>cg(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const J=require("react"),ot=require("@react-three/drei"),Po=require("@react-three/fiber"),Ot=require("three"),dg=require("three-stdlib"),R=require("@mui/material"),ye=require("mobx-react-lite"),Re=require("react-i18next"),hg=require("i18next"),pg=require("i18next-browser-languagedetector"),x=require("prop-types"),mg=require("@emotion/react"),fg=require("@emotion/styled"),vt=require("@mui/x-data-grid"),je=require("mobx"),Pl=require("lodash-es"),Or=require("@wandelbots/nova-js"),Nt=require("@mui/icons-material"),gg=require("react-error-boundary");function Mh(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 N=Mh(J),De=Mh(Ot);function yg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Na={exports:{}},kn={};/**
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 Ec;function bg(){if(Ec)return $n;Ec=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,a,o){var s=null;if(o!==void 0&&(s=""+o),a.key!==void 0&&(s=""+a.key),"key"in a){o={};for(var i in a)i!=="key"&&(o[i]=a[i])}else o=a;return a=o.ref,{$$typeof:e,type:n,key:s,ref:a!==void 0?a:null,props:o}}return $n.Fragment=t,$n.jsx=r,$n.jsxs=r,$n}var Un={};/**
9
+ */var Ec;function bg(){if(Ec)return kn;Ec=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,a,o){var s=null;if(o!==void 0&&(s=""+o),a.key!==void 0&&(s=""+a.key),"key"in a){o={};for(var i in a)i!=="key"&&(o[i]=a[i])}else o=a;return a=o.ref,{$$typeof:e,type:n,key:s,ref:a!==void 0?a:null,props:o}}return kn.Fragment=t,kn.jsx=r,kn.jsxs=r,kn}var Un={};/**
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 Vc;function xg(){return Vc||(Vc=1,process.env.NODE_ENV!=="production"&&function(){function e(W){if(W==null)return null;if(typeof W=="function")return W.$$typeof===b?null:W.displayName||W.name||null;if(typeof W=="string")return W;switch(W){case m:return"Fragment";case S:return"Profiler";case y:return"StrictMode";case T:return"Suspense";case P:return"SuspenseList";case z:return"Activity"}if(typeof W=="object")switch(typeof W.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),W.$$typeof){case f:return"Portal";case O:return(W.displayName||"Context")+".Provider";case E:return(W._context.displayName||"Context")+".Consumer";case w:var X=W.render;return W=W.displayName,W||(W=X.displayName||X.name||"",W=W!==""?"ForwardRef("+W+")":"ForwardRef"),W;case C:return X=W.displayName||null,X!==null?X:e(W.type)||"Memo";case I:X=W._payload,W=W._init;try{return e(W(X))}catch{}}return null}function t(W){return""+W}function r(W){try{t(W);var X=!1}catch{X=!0}if(X){X=console;var ue=X.error,ve=typeof Symbol=="function"&&Symbol.toStringTag&&W[Symbol.toStringTag]||W.constructor.name||"Object";return ue.call(X,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ve),t(W)}}function n(W){if(W===m)return"<>";if(typeof W=="object"&&W!==null&&W.$$typeof===I)return"<...>";try{var X=e(W);return X?"<"+X+">":"<...>"}catch{return"<...>"}}function a(){var W=A.A;return W===null?null:W.getOwner()}function o(){return Error("react-stack-top-frame")}function s(W){if(G.call(W,"key")){var X=Object.getOwnPropertyDescriptor(W,"key").get;if(X&&X.isReactWarning)return!1}return W.key!==void 0}function i(W,X){function ue(){re||(re=!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))}ue.isReactWarning=!0,Object.defineProperty(W,"key",{get:ue,configurable:!0})}function l(){var W=e(this.type);return ee[W]||(ee[W]=!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.")),W=this.props.ref,W!==void 0?W:null}function c(W,X,ue,ve,Ue,we,ct,rt){return ue=we.ref,W={$$typeof:p,type:W,key:X,props:we,_owner:Ue},(ue!==void 0?ue:null)!==null?Object.defineProperty(W,"ref",{enumerable:!1,get:l}):Object.defineProperty(W,"ref",{enumerable:!1,value:null}),W._store={},Object.defineProperty(W._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(W,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(W,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ct}),Object.defineProperty(W,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:rt}),Object.freeze&&(Object.freeze(W.props),Object.freeze(W)),W}function u(W,X,ue,ve,Ue,we,ct,rt){var be=X.children;if(be!==void 0)if(ve)if(_(be)){for(ve=0;ve<be.length;ve++)d(be[ve]);Object.freeze&&Object.freeze(be)}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(be);if(G.call(X,"key")){be=e(W);var Z=Object.keys(X).filter(function(ce){return ce!=="key"});ve=0<Z.length?"{key: someKey, "+Z.join(": ..., ")+": ...}":"{key: someKey}",se[be+ve]||(Z=0<Z.length?"{"+Z.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var Vc;function xg(){return Vc||(Vc=1,process.env.NODE_ENV!=="production"&&function(){function e(W){if(W==null)return null;if(typeof W=="function")return W.$$typeof===b?null:W.displayName||W.name||null;if(typeof W=="string")return W;switch(W){case m:return"Fragment";case S:return"Profiler";case y:return"StrictMode";case T:return"Suspense";case P:return"SuspenseList";case z:return"Activity"}if(typeof W=="object")switch(typeof W.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),W.$$typeof){case f:return"Portal";case O:return(W.displayName||"Context")+".Provider";case E:return(W._context.displayName||"Context")+".Consumer";case C:var X=W.render;return W=W.displayName,W||(W=X.displayName||X.name||"",W=W!==""?"ForwardRef("+W+")":"ForwardRef"),W;case w:return X=W.displayName||null,X!==null?X:e(W.type)||"Memo";case I:X=W._payload,W=W._init;try{return e(W(X))}catch{}}return null}function t(W){return""+W}function r(W){try{t(W);var X=!1}catch{X=!0}if(X){X=console;var ue=X.error,ve=typeof Symbol=="function"&&Symbol.toStringTag&&W[Symbol.toStringTag]||W.constructor.name||"Object";return ue.call(X,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ve),t(W)}}function n(W){if(W===m)return"<>";if(typeof W=="object"&&W!==null&&W.$$typeof===I)return"<...>";try{var X=e(W);return X?"<"+X+">":"<...>"}catch{return"<...>"}}function a(){var W=A.A;return W===null?null:W.getOwner()}function o(){return Error("react-stack-top-frame")}function s(W){if(G.call(W,"key")){var X=Object.getOwnPropertyDescriptor(W,"key").get;if(X&&X.isReactWarning)return!1}return W.key!==void 0}function i(W,X){function ue(){re||(re=!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))}ue.isReactWarning=!0,Object.defineProperty(W,"key",{get:ue,configurable:!0})}function l(){var W=e(this.type);return ee[W]||(ee[W]=!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.")),W=this.props.ref,W!==void 0?W:null}function c(W,X,ue,ve,Ue,we,ct,rt){return ue=we.ref,W={$$typeof:p,type:W,key:X,props:we,_owner:Ue},(ue!==void 0?ue:null)!==null?Object.defineProperty(W,"ref",{enumerable:!1,get:l}):Object.defineProperty(W,"ref",{enumerable:!1,value:null}),W._store={},Object.defineProperty(W._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(W,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(W,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ct}),Object.defineProperty(W,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:rt}),Object.freeze&&(Object.freeze(W.props),Object.freeze(W)),W}function u(W,X,ue,ve,Ue,we,ct,rt){var be=X.children;if(be!==void 0)if(ve)if(_(be)){for(ve=0;ve<be.length;ve++)d(be[ve]);Object.freeze&&Object.freeze(be)}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(be);if(G.call(X,"key")){be=e(W);var Z=Object.keys(X).filter(function(ce){return ce!=="key"});ve=0<Z.length?"{key: someKey, "+Z.join(": ..., ")+": ...}":"{key: someKey}",se[be+ve]||(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} />`,ve,be,Z,be),se[be+ve]=!0)}if(be=null,ue!==void 0&&(r(ue),be=""+ue),s(X)&&(r(X.key),be=""+X.key),"key"in X){ue={};for(var oe in X)oe!=="key"&&(ue[oe]=X[oe])}else ue=X;return be&&i(ue,typeof W=="function"?W.displayName||W.name||"Unknown":W),c(W,be,we,Ue,a(),ue,ct,rt)}function d(W){typeof W=="object"&&W!==null&&W.$$typeof===p&&W._store&&(W._store.validated=1)}var h=J,p=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),y=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"),T=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),b=Symbol.for("react.client.reference"),A=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=Object.prototype.hasOwnProperty,_=Array.isArray,F=console.createTask?console.createTask:function(){return null};h={"react-stack-bottom-frame":function(W){return W()}};var re,ee={},ae=h["react-stack-bottom-frame"].bind(h,o)(),te=F(n(o)),se={};Un.Fragment=m,Un.jsx=function(W,X,ue,ve,Ue){var we=1e4>A.recentlyCreatedOwnerStacks++;return u(W,X,ue,!1,ve,Ue,we?Error("react-stack-top-frame"):ae,we?F(n(W)):te)},Un.jsxs=function(W,X,ue,ve,Ue){var we=1e4>A.recentlyCreatedOwnerStacks++;return u(W,X,ue,!0,ve,Ue,we?Error("react-stack-top-frame"):ae,we?F(n(W)):te)}}()),Un}var Ic;function vg(){return Ic||(Ic=1,process.env.NODE_ENV==="production"?Na.exports=bg():Na.exports=xg()),Na.exports}var g=vg();function Di(){return g.jsx(ot.Environment,{children:g.jsx(Sg,{})})}function Sg({positions:e=[2,0,2,0,2,0,2,0]}){return g.jsxs(g.Fragment,{children:[g.jsx(ot.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(ot.Lightformer,{form:"circle",intensity:5,rotation:[Math.PI/2,0,0],position:[t,4,r*4],scale:[3,1,1]},r))})}),g.jsx(ot.Lightformer,{intensity:40,"rotation-y":Math.PI/2,position:[-5,1,-1],scale:[20,.1,1]}),g.jsx(ot.Lightformer,{intensity:20,"rotation-y":-Math.PI,position:[-5,-2,-1],scale:[20,.1,1]}),g.jsx(ot.Lightformer,{"rotation-y":Math.PI/2,position:[-5,-1,-1],scale:[20,.5,1],intensity:5}),g.jsx(ot.Lightformer,{"rotation-y":-Math.PI/2,position:[10,1,0],scale:[20,1,1],intensity:10}),g.jsx(ot.Lightformer,{form:"ring",color:"white",intensity:5,scale:10,position:[-15,4,-18],target:[0,0,0]})]})}function Og(e){if(e.length<3)return console.log("Not enough vertices to define a plane"),{isCoplanar:!1};const t=new Le.Vector3(e[0].x,e[0].y,e[0].z),r=new Le.Vector3(e[1].x,e[1].y,e[1].z),n=new Le.Vector3(e[2].x,e[2].y,e[2].z),a=new Le.Vector3().subVectors(r,t),o=new Le.Vector3().subVectors(n,t),s=new Le.Vector3().crossVectors(a,o).normalize();for(let i=3;i<e.length;i++){const l=new Le.Vector3(e[i].x,e[i].y,e[i].z),c=new Le.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 wg({safetyZones:e,...t}){return g.jsx("group",{...t,children:e.map((r,n)=>{let a=[];return r.geometry&&(r.geometry.compound?a=r.geometry.compound.child_geometries:r.geometry.convex_hull&&(a=[r.geometry])),a.map((o,s)=>{if(!o.convex_hull)return null;const i=o.convex_hull.vertices.map(u=>new Le.Vector3(u.x/1e3,u.y/1e3,u.z/1e3)),l=Og(i);if(l.isCoplanar&&l.normal){const d=new Le.Vector3().addVectors(i[0],l.normal.multiplyScalar(1e-4));i.push(d)}let c;try{c=new dg.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 Cg({trajectory:e,...t}){var n;const r=((n=e.trajectory)==null?void 0:n.map(a=>a.tcp_pose?new Le.Vector3(a.tcp_pose.position.x/1e3,a.tcp_pose.position.z/1e3,-a.tcp_pose.position.y/1e3):null).filter(a=>a!==null))||[];return g.jsx("group",{...t,children:r.length>0&&g.jsx(ot.Line,{points:r,lineWidth:3,polygonOffset:!0,polygonOffsetFactor:10,polygonOffsetUnits:10})})}const Pg={"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.","ProgramControl.Start.bt":"Start","ProgramControl.Resume.bt":"Weiter","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"},Tg={"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.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"},Tl=hg.createInstance();Tl.use(pg).init({supportedLngs:["en","de"],resources:{en:{translations:Tg},de:{translations:Pg}},ns:["translations"],defaultNS:"translations",detection:{order:["navigator","htmlTag"]}});function Ke(e){return r=>g.jsx(Rg,{children:g.jsx(e,{...r})})}const Rg=({children:e})=>g.jsx(Re.I18nextProvider,{i18n:Tl,children:e}),Ag=e=>g.jsx(R.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"})}),_g=Ke(ye.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(R.AppBar,{position:"static",sx:o,children:g.jsxs(R.Toolbar,{sx:{minHeight:"64px !important"},children:[g.jsx(R.Box,{sx:{mr:2,display:"flex",alignItems:"center"},children:t}),g.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",flexGrow:1},children:[g.jsx(R.Typography,{variant:"h6",component:"div",sx:{fontWeight:700,fontSize:"20px",lineHeight:"24px",letterSpacing:0},children:r}),n.length>0&&g.jsx(R.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=>R.alpha(h.palette.common.white,.1),opacity:1,"&:hover":{backgroundColor:h=>R.alpha(h.palette.common.white,.16)},"& .MuiSvgIcon-root":{fontSize:"10px",width:"10px",height:"8px"}},children:g.jsx(Ag,{})})]})]})}),g.jsx(R.Backdrop,{open:l,onClick:u,sx:{backdropFilter:"blur(4px)",backgroundColor:"rgba(0, 0, 0, 0.3)",zIndex:h=>h.zIndex.modal-1}}),g.jsx(R.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(R.MenuItem,{onClick:()=>d(h),sx:{display:"flex",alignItems:"center",gap:2,py:1.5,px:2},children:[g.jsx(R.Box,{sx:{display:"flex",alignItems:"center"},children:h.icon}),g.jsx(R.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 lr(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 Xo(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 jh(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=jh(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ct(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=jh(e))&&(n&&(n+=" "),n+=t);return n}function cr(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 kh="$$material";function Eg(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 Vg={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 Ig(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Mg=/[A-Z]|^ms/g,jg=/_EMO_([^_]+?)_([^]*?)_EMO_/g,$h=function(t){return t.charCodeAt(1)===45},Mc=function(t){return t!=null&&typeof t!="boolean"},Qs=Ig(function(e){return $h(e)?e:e.replace(Mg,"-$&").toLowerCase()}),jc=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(jg,function(n,a,o){return sr={name:a,styles:o,next:sr},a})}return Vg[t]!==1&&!$h(t)&&typeof r=="number"&&r!==0?r+"px":r};function To(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 sr={name:a.name,styles:a.styles,next:sr},a.name;var o=r;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)sr={name:s.name,styles:s.styles,next:sr},s=s.next;var i=o.styles+";";return i}return kg(e,t,r)}}var l=r;return l}function kg(e,t,r){var n="";if(Array.isArray(r))for(var a=0;a<r.length;a++)n+=To(e,t,r[a])+";";else for(var o in r){var s=r[o];if(typeof s!="object"){var i=s;Mc(i)&&(n+=Qs(o)+":"+jc(o,i)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&t==null)for(var l=0;l<s.length;l++)Mc(s[l])&&(n+=Qs(o)+":"+jc(o,s[l])+";");else{var c=To(e,t,s);switch(o){case"animation":case"animationName":{n+=Qs(o)+":"+c+";";break}default:n+=o+"{"+c+"}"}}}return n}var kc=/label:\s*([^\s;{]+)\s*(;|$)/g,sr;function $g(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="";sr=void 0;var o=e[0];if(o==null||o.raw===void 0)n=!1,a+=To(r,t,o);else{var s=o;a+=s[0]}for(var i=1;i<e.length;i++)if(a+=To(r,t,e[i]),n){var l=o;a+=l[i]}kc.lastIndex=0;for(var c="",u;(u=kc.exec(a))!==null;)c+="-"+u[1];var d=Eg(a)+c;return{name:d,styles:a,next:sr}}/**
22
+ <%s key={someKey} {...props} />`,ve,be,Z,be),se[be+ve]=!0)}if(be=null,ue!==void 0&&(r(ue),be=""+ue),s(X)&&(r(X.key),be=""+X.key),"key"in X){ue={};for(var oe in X)oe!=="key"&&(ue[oe]=X[oe])}else ue=X;return be&&i(ue,typeof W=="function"?W.displayName||W.name||"Unknown":W),c(W,be,we,Ue,a(),ue,ct,rt)}function d(W){typeof W=="object"&&W!==null&&W.$$typeof===p&&W._store&&(W._store.validated=1)}var h=J,p=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),O=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),b=Symbol.for("react.client.reference"),A=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=Object.prototype.hasOwnProperty,_=Array.isArray,F=console.createTask?console.createTask:function(){return null};h={"react-stack-bottom-frame":function(W){return W()}};var re,ee={},ae=h["react-stack-bottom-frame"].bind(h,o)(),te=F(n(o)),se={};Un.Fragment=m,Un.jsx=function(W,X,ue,ve,Ue){var we=1e4>A.recentlyCreatedOwnerStacks++;return u(W,X,ue,!1,ve,Ue,we?Error("react-stack-top-frame"):ae,we?F(n(W)):te)},Un.jsxs=function(W,X,ue,ve,Ue){var we=1e4>A.recentlyCreatedOwnerStacks++;return u(W,X,ue,!0,ve,Ue,we?Error("react-stack-top-frame"):ae,we?F(n(W)):te)}}()),Un}var Ic;function vg(){return Ic||(Ic=1,process.env.NODE_ENV==="production"?Na.exports=bg():Na.exports=xg()),Na.exports}var g=vg();function Li(){return g.jsx(ot.Environment,{children:g.jsx(Sg,{})})}function Sg({positions:e=[2,0,2,0,2,0,2,0]}){return g.jsxs(g.Fragment,{children:[g.jsx(ot.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(ot.Lightformer,{form:"circle",intensity:5,rotation:[Math.PI/2,0,0],position:[t,4,r*4],scale:[3,1,1]},r))})}),g.jsx(ot.Lightformer,{intensity:40,"rotation-y":Math.PI/2,position:[-5,1,-1],scale:[20,.1,1]}),g.jsx(ot.Lightformer,{intensity:20,"rotation-y":-Math.PI,position:[-5,-2,-1],scale:[20,.1,1]}),g.jsx(ot.Lightformer,{"rotation-y":Math.PI/2,position:[-5,-1,-1],scale:[20,.5,1],intensity:5}),g.jsx(ot.Lightformer,{"rotation-y":-Math.PI/2,position:[10,1,0],scale:[20,1,1],intensity:10}),g.jsx(ot.Lightformer,{form:"ring",color:"white",intensity:5,scale:10,position:[-15,4,-18],target:[0,0,0]})]})}function Og(e){if(e.length<3)return console.log("Not enough vertices to define a plane"),{isCoplanar:!1};const t=new De.Vector3(e[0].x,e[0].y,e[0].z),r=new De.Vector3(e[1].x,e[1].y,e[1].z),n=new De.Vector3(e[2].x,e[2].y,e[2].z),a=new De.Vector3().subVectors(r,t),o=new De.Vector3().subVectors(n,t),s=new De.Vector3().crossVectors(a,o).normalize();for(let i=3;i<e.length;i++){const l=new De.Vector3(e[i].x,e[i].y,e[i].z),c=new De.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 wg({safetyZones:e,...t}){return g.jsx("group",{...t,children:e.map((r,n)=>{let a=[];return r.geometry&&(r.geometry.compound?a=r.geometry.compound.child_geometries:r.geometry.convex_hull&&(a=[r.geometry])),a.map((o,s)=>{if(!o.convex_hull)return null;const i=o.convex_hull.vertices.map(u=>new De.Vector3(u.x/1e3,u.y/1e3,u.z/1e3)),l=Og(i);if(l.isCoplanar&&l.normal){const d=new De.Vector3().addVectors(i[0],l.normal.multiplyScalar(1e-4));i.push(d)}let c;try{c=new dg.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 Cg({trajectory:e,...t}){var n;const r=((n=e.trajectory)==null?void 0:n.map(a=>a.tcp_pose?new De.Vector3(a.tcp_pose.position.x/1e3,a.tcp_pose.position.z/1e3,-a.tcp_pose.position.y/1e3):null).filter(a=>a!==null))||[];return g.jsx("group",{...t,children:r.length>0&&g.jsx(ot.Line,{points:r,lineWidth:3,polygonOffset:!0,polygonOffsetFactor:10,polygonOffsetUnits:10})})}const Pg={"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.","ProgramControl.Start.bt":"Start","ProgramControl.Resume.bt":"Weiter","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"},Tg={"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.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"},Tl=hg.createInstance();Tl.use(pg).init({supportedLngs:["en","de"],resources:{en:{translations:Tg},de:{translations:Pg}},ns:["translations"],defaultNS:"translations",detection:{order:["navigator","htmlTag"]}});function Ke(e){return r=>g.jsx(Rg,{children:g.jsx(e,{...r})})}const Rg=({children:e})=>g.jsx(Re.I18nextProvider,{i18n:Tl,children:e}),Ag=e=>g.jsx(R.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"})}),_g=Ke(ye.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(R.AppBar,{position:"static",sx:o,children:g.jsxs(R.Toolbar,{sx:{minHeight:"64px !important"},children:[g.jsx(R.Box,{sx:{mr:2,display:"flex",alignItems:"center"},children:t}),g.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",flexGrow:1},children:[g.jsx(R.Typography,{variant:"h6",component:"div",sx:{fontWeight:700,fontSize:"20px",lineHeight:"24px",letterSpacing:0},children:r}),n.length>0&&g.jsx(R.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=>R.alpha(h.palette.common.white,.1),opacity:1,"&:hover":{backgroundColor:h=>R.alpha(h.palette.common.white,.16)},"& .MuiSvgIcon-root":{fontSize:"10px",width:"10px",height:"8px"}},children:g.jsx(Ag,{})})]})]})}),g.jsx(R.Backdrop,{open:l,onClick:u,sx:{backdropFilter:"blur(4px)",backgroundColor:"rgba(0, 0, 0, 0.3)",zIndex:h=>h.zIndex.modal-1}}),g.jsx(R.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(R.MenuItem,{onClick:()=>d(h),sx:{display:"flex",alignItems:"center",gap:2,py:1.5,px:2},children:[g.jsx(R.Box,{sx:{display:"flex",alignItems:"center"},children:h.icon}),g.jsx(R.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 lr(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 Xo(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 jh(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=jh(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=jh(e))&&(n&&(n+=" "),n+=t);return n}function cr(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 $h="$$material";function Eg(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 Vg={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 Ig(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Mg=/[A-Z]|^ms/g,jg=/_EMO_([^_]+?)_([^]*?)_EMO_/g,kh=function(t){return t.charCodeAt(1)===45},Mc=function(t){return t!=null&&typeof t!="boolean"},Qs=Ig(function(e){return kh(e)?e:e.replace(Mg,"-$&").toLowerCase()}),jc=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(jg,function(n,a,o){return sr={name:a,styles:o,next:sr},a})}return Vg[t]!==1&&!kh(t)&&typeof r=="number"&&r!==0?r+"px":r};function To(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 sr={name:a.name,styles:a.styles,next:sr},a.name;var o=r;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)sr={name:s.name,styles:s.styles,next:sr},s=s.next;var i=o.styles+";";return i}return $g(e,t,r)}}var l=r;return l}function $g(e,t,r){var n="";if(Array.isArray(r))for(var a=0;a<r.length;a++)n+=To(e,t,r[a])+";";else for(var o in r){var s=r[o];if(typeof s!="object"){var i=s;Mc(i)&&(n+=Qs(o)+":"+jc(o,i)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&t==null)for(var l=0;l<s.length;l++)Mc(s[l])&&(n+=Qs(o)+":"+jc(o,s[l])+";");else{var c=To(e,t,s);switch(o){case"animation":case"animationName":{n+=Qs(o)+":"+c+";";break}default:n+=o+"{"+c+"}"}}}return n}var $c=/label:\s*([^\s;{]+)\s*(;|$)/g,sr;function kg(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="";sr=void 0;var o=e[0];if(o==null||o.raw===void 0)n=!1,a+=To(r,t,o);else{var s=o;a+=s[0]}for(var i=1;i<e.length;i++)if(a+=To(r,t,e[i]),n){var l=o;a+=l[i]}$c.lastIndex=0;for(var c="",u;(u=$c.exec(a))!==null;)c+="-"+u[1];var d=Eg(a)+c;return{name:d,styles:a,next:sr}}/**
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
29
  */function Ug(e,t){const r=fg(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const a=typeof e=="string"?`"${e}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${a})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
30
- `)):n.some(o=>o===void 0)&&console.error(`MUI: the styled(${a})(...args) API requires all its args to be defined.`),r(...n)}:r}function Lg(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const $c=[];function Uc(e){return $c[0]=e,$g($c)}var Fa={exports:{}},Se={};/**
30
+ `)):n.some(o=>o===void 0)&&console.error(`MUI: the styled(${a})(...args) API requires all its args to be defined.`),r(...n)}:r}function Dg(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const kc=[];function Uc(e){return kc[0]=e,kg(kc)}var Fa={exports:{}},Se={};/**
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 Lc;function Dg(){if(Lc)return Se;Lc=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=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 y=m.$$typeof;switch(y){case e:switch(m=m.type,m){case r:case a: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 o:return m;default:return y}}case t:return y}}}return Se.ContextConsumer=o,Se.ContextProvider=s,Se.Element=e,Se.ForwardRef=i,Se.Fragment=r,Se.Lazy=d,Se.Memo=u,Se.Portal=t,Se.Profiler=a,Se.StrictMode=n,Se.Suspense=l,Se.SuspenseList=c,Se.isContextConsumer=function(m){return f(m)===o},Se.isContextProvider=function(m){return f(m)===s},Se.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},Se.isForwardRef=function(m){return f(m)===i},Se.isFragment=function(m){return f(m)===r},Se.isLazy=function(m){return f(m)===d},Se.isMemo=function(m){return f(m)===u},Se.isPortal=function(m){return f(m)===t},Se.isProfiler=function(m){return f(m)===a},Se.isStrictMode=function(m){return f(m)===n},Se.isSuspense=function(m){return f(m)===l},Se.isSuspenseList=function(m){return f(m)===c},Se.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===a||m===n||m===l||m===c||typeof m=="object"&&m!==null&&(m.$$typeof===d||m.$$typeof===u||m.$$typeof===s||m.$$typeof===o||m.$$typeof===i||m.$$typeof===p||m.getModuleId!==void 0)},Se.typeOf=f,Se}var Oe={};/**
38
+ */var Dc;function Lg(){if(Dc)return Se;Dc=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=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 y=m.$$typeof;switch(y){case e:switch(m=m.type,m){case r:case a: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 o:return m;default:return y}}case t:return y}}}return Se.ContextConsumer=o,Se.ContextProvider=s,Se.Element=e,Se.ForwardRef=i,Se.Fragment=r,Se.Lazy=d,Se.Memo=u,Se.Portal=t,Se.Profiler=a,Se.StrictMode=n,Se.Suspense=l,Se.SuspenseList=c,Se.isContextConsumer=function(m){return f(m)===o},Se.isContextProvider=function(m){return f(m)===s},Se.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},Se.isForwardRef=function(m){return f(m)===i},Se.isFragment=function(m){return f(m)===r},Se.isLazy=function(m){return f(m)===d},Se.isMemo=function(m){return f(m)===u},Se.isPortal=function(m){return f(m)===t},Se.isProfiler=function(m){return f(m)===a},Se.isStrictMode=function(m){return f(m)===n},Se.isSuspense=function(m){return f(m)===l},Se.isSuspenseList=function(m){return f(m)===c},Se.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===a||m===n||m===l||m===c||typeof m=="object"&&m!==null&&(m.$$typeof===d||m.$$typeof===u||m.$$typeof===s||m.$$typeof===o||m.$$typeof===i||m.$$typeof===p||m.getModuleId!==void 0)},Se.typeOf=f,Se}var Oe={};/**
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 Dc;function Bg(){return Dc||(Dc=1,process.env.NODE_ENV!=="production"&&function(){function e(m){if(typeof m=="object"&&m!==null){var y=m.$$typeof;switch(y){case t:switch(m=m.type,m){case n:case o:case a: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 y}}case r:return y}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=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");Oe.ContextConsumer=s,Oe.ContextProvider=i,Oe.Element=t,Oe.ForwardRef=l,Oe.Fragment=n,Oe.Lazy=h,Oe.Memo=d,Oe.Portal=r,Oe.Profiler=o,Oe.StrictMode=a,Oe.Suspense=c,Oe.SuspenseList=u,Oe.isContextConsumer=function(m){return e(m)===s},Oe.isContextProvider=function(m){return e(m)===i},Oe.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},Oe.isForwardRef=function(m){return e(m)===l},Oe.isFragment=function(m){return e(m)===n},Oe.isLazy=function(m){return e(m)===h},Oe.isMemo=function(m){return e(m)===d},Oe.isPortal=function(m){return e(m)===r},Oe.isProfiler=function(m){return e(m)===o},Oe.isStrictMode=function(m){return e(m)===a},Oe.isSuspense=function(m){return e(m)===c},Oe.isSuspenseList=function(m){return e(m)===u},Oe.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===o||m===a||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)},Oe.typeOf=e}()),Oe}var Bc;function Ng(){return Bc||(Bc=1,process.env.NODE_ENV==="production"?Fa.exports=Dg():Fa.exports=Bg()),Fa.exports}var Ro=Ng();function It(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 Uh(e){if(N.isValidElement(e)||Ro.isValidElementType(e)||!It(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=Uh(e[r])}),t}function tt(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return It(e)&&It(t)&&Object.keys(t).forEach(a=>{N.isValidElement(t[a])||Ro.isValidElementType(t[a])?n[a]=t[a]:It(t[a])&&Object.prototype.hasOwnProperty.call(e,a)&&It(e[a])?n[a]=tt(e[a],t[a],r):r.clone?n[a]=It(t[a])?Uh(t[a]):t[a]:n[a]=t[a]}),n}const Fg=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 zg(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...a}=e,o=Fg(t),s=Object.keys(o);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:o,up:i,down:l,between:c,only:u,not:d,unit:r,...a}}function Gg(e,t){if(!e.containerQueries)return t;const r=Object.keys(t).filter(n=>n.startsWith("@container")).sort((n,a)=>{var s,i;const o=/min-width:\s*([0-9.]+)/;return+(((s=n.match(o))==null?void 0:s[1])||0)-+(((i=a.match(o))==null?void 0:i[1])||0)});return r.length?r.reduce((n,a)=>{const o=t[a];return delete n[a],n[a]=o,n},{...t}):t}function Hg(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\`.`:cr(18,`(${t})`));return null}const[,n,a]=r,o=Number.isNaN(+n)?n||0:+n;return e.containerQueries(a).up(o)}function Wg(e){const t=(o,s)=>o.replace("@media",s?`@container ${s}`:"@container");function r(o,s){o.up=(...i)=>t(e.breakpoints.up(...i),s),o.down=(...i)=>t(e.breakpoints.down(...i),s),o.between=(...i)=>t(e.breakpoints.between(...i),s),o.only=(...i)=>t(e.breakpoints.only(...i),s),o.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={},a=o=>(r(n,o),n);return r(a),{...e,containerQueries:a}}const Jg={borderRadius:4},hr=process.env.NODE_ENV!=="production"?x.oneOfType([x.number,x.string,x.object,x.array]):{};function na(e,t){return t?tt(e,t,{clone:!1}):e}const Zo={xs:0,sm:600,md:900,lg:1200,xl:1536},Nc={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Zo[e]}px)`},Yg={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:Zo[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function Pt(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const o=n.breakpoints||Nc;return t.reduce((s,i,l)=>(s[o.up(o.keys[l])]=r(t[l]),s),{})}if(typeof t=="object"){const o=n.breakpoints||Nc;return Object.keys(t).reduce((s,i)=>{if(Hg(o.keys,i)){const l=qg(n.containerQueries?n:Yg,i);l&&(s[l]=r(t[i],i))}else if(Object.keys(o.values||Zo).includes(i)){const l=o.up(i);s[l]=r(t[i],i)}else{const l=i;s[l]=t[l]}return s},{})}return r(t)}function Lh(e={}){var r;return((r=e.keys)==null?void 0:r.reduce((n,a)=>{const o=e.up(a);return n[o]={},n},{}))||{}}function Dh(e,t){return e.reduce((r,n)=>{const a=r[n];return(!a||Object.keys(a).length===0)&&delete r[n],r},t)}function Kg(e,...t){const r=Lh(e),n=[r,...t].reduce((a,o)=>tt(a,o),{});return Dh(Object.keys(r),n)}function Qg(e,t){if(typeof e!="object")return{};const r={},n=Object.keys(t);return Array.isArray(e)?n.forEach((a,o)=>{o<e.length&&(r[a]=!0)}):n.forEach(a=>{e[a]!=null&&(r[a]=!0)}),r}function Xs({values:e,breakpoints:t,base:r}){const n=r||Qg(e,t),a=Object.keys(n);if(a.length===0)return e;let o;return a.reduce((s,i,l)=>(Array.isArray(e)?(s[i]=e[l]!=null?e[l]:e[o],o=l):typeof e=="object"?(s[i]=e[i]!=null?e[i]:e[o],o=i):s[i]=e,s),{})}function et(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":cr(7));return e.charAt(0).toUpperCase()+e.slice(1)}function es(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((a,o)=>a&&a[o]?a[o]:null,e);if(n!=null)return n}return t.split(".").reduce((n,a)=>n&&n[a]!=null?n[a]:null,e)}function Ao(e,t,r,n=r){let a;return typeof e=="function"?a=e(r):Array.isArray(e)?a=e[r]||n:a=es(e,r)||n,t&&(a=t(a,n,e)),a}function De(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:a}=e,o=s=>{if(s[t]==null)return null;const i=s[t],l=s.theme,c=es(l,n)||{};return Pt(s,i,d=>{let h=Ao(c,a,d);return d===h&&typeof d=="string"&&(h=Ao(c,a,`${t}${d==="default"?"":et(d)}`,d)),r===!1?h:{[r]:h}})};return o.propTypes=process.env.NODE_ENV!=="production"?{[t]:hr}:{},o.filterProps=[t],o}function Xg(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const Zg={m:"margin",p:"padding"},ey={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Fc={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},ty=Xg(e=>{if(e.length>2)if(Fc[e])e=Fc[e];else return[e];const[t,r]=e.split(""),n=Zg[t],a=ey[r]||"";return Array.isArray(a)?a.map(o=>n+o):[n+a]}),ts=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],rs=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],ry=[...ts,...rs];function Ca(e,t,r,n){const a=es(e,t,!0)??r;return typeof a=="number"||typeof a=="string"?o=>typeof o=="string"?o:(process.env.NODE_ENV!=="production"&&typeof o!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${o}.`),typeof a=="string"?a.startsWith("var(")&&o===0?0:a.startsWith("var(")&&o===1?a:`calc(${o} * ${a})`:a*o):Array.isArray(a)?o=>{if(typeof o=="string")return o;const s=Math.abs(o);process.env.NODE_ENV!=="production"&&(Number.isInteger(s)?s>a.length-1&&console.error([`MUI: The value provided (${s}) overflows.`,`The supported values are: ${JSON.stringify(a)}.`,`${s} > ${a.length-1}, you need to add the missing values.`].join(`
46
+ */var Lc;function Bg(){return Lc||(Lc=1,process.env.NODE_ENV!=="production"&&function(){function e(m){if(typeof m=="object"&&m!==null){var y=m.$$typeof;switch(y){case t:switch(m=m.type,m){case n:case o:case a: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 y}}case r:return y}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=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");Oe.ContextConsumer=s,Oe.ContextProvider=i,Oe.Element=t,Oe.ForwardRef=l,Oe.Fragment=n,Oe.Lazy=h,Oe.Memo=d,Oe.Portal=r,Oe.Profiler=o,Oe.StrictMode=a,Oe.Suspense=c,Oe.SuspenseList=u,Oe.isContextConsumer=function(m){return e(m)===s},Oe.isContextProvider=function(m){return e(m)===i},Oe.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},Oe.isForwardRef=function(m){return e(m)===l},Oe.isFragment=function(m){return e(m)===n},Oe.isLazy=function(m){return e(m)===h},Oe.isMemo=function(m){return e(m)===d},Oe.isPortal=function(m){return e(m)===r},Oe.isProfiler=function(m){return e(m)===o},Oe.isStrictMode=function(m){return e(m)===a},Oe.isSuspense=function(m){return e(m)===c},Oe.isSuspenseList=function(m){return e(m)===u},Oe.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===o||m===a||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)},Oe.typeOf=e}()),Oe}var Bc;function Ng(){return Bc||(Bc=1,process.env.NODE_ENV==="production"?Fa.exports=Lg():Fa.exports=Bg()),Fa.exports}var Ro=Ng();function It(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 Uh(e){if(N.isValidElement(e)||Ro.isValidElementType(e)||!It(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=Uh(e[r])}),t}function tt(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return It(e)&&It(t)&&Object.keys(t).forEach(a=>{N.isValidElement(t[a])||Ro.isValidElementType(t[a])?n[a]=t[a]:It(t[a])&&Object.prototype.hasOwnProperty.call(e,a)&&It(e[a])?n[a]=tt(e[a],t[a],r):r.clone?n[a]=It(t[a])?Uh(t[a]):t[a]:n[a]=t[a]}),n}const Fg=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 zg(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...a}=e,o=Fg(t),s=Object.keys(o);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:o,up:i,down:l,between:c,only:u,not:d,unit:r,...a}}function Gg(e,t){if(!e.containerQueries)return t;const r=Object.keys(t).filter(n=>n.startsWith("@container")).sort((n,a)=>{var s,i;const o=/min-width:\s*([0-9.]+)/;return+(((s=n.match(o))==null?void 0:s[1])||0)-+(((i=a.match(o))==null?void 0:i[1])||0)});return r.length?r.reduce((n,a)=>{const o=t[a];return delete n[a],n[a]=o,n},{...t}):t}function Hg(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\`.`:cr(18,`(${t})`));return null}const[,n,a]=r,o=Number.isNaN(+n)?n||0:+n;return e.containerQueries(a).up(o)}function Wg(e){const t=(o,s)=>o.replace("@media",s?`@container ${s}`:"@container");function r(o,s){o.up=(...i)=>t(e.breakpoints.up(...i),s),o.down=(...i)=>t(e.breakpoints.down(...i),s),o.between=(...i)=>t(e.breakpoints.between(...i),s),o.only=(...i)=>t(e.breakpoints.only(...i),s),o.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={},a=o=>(r(n,o),n);return r(a),{...e,containerQueries:a}}const Jg={borderRadius:4},hr=process.env.NODE_ENV!=="production"?x.oneOfType([x.number,x.string,x.object,x.array]):{};function na(e,t){return t?tt(e,t,{clone:!1}):e}const Zo={xs:0,sm:600,md:900,lg:1200,xl:1536},Nc={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Zo[e]}px)`},Yg={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:Zo[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 o=n.breakpoints||Nc;return t.reduce((s,i,l)=>(s[o.up(o.keys[l])]=r(t[l]),s),{})}if(typeof t=="object"){const o=n.breakpoints||Nc;return Object.keys(t).reduce((s,i)=>{if(Hg(o.keys,i)){const l=qg(n.containerQueries?n:Yg,i);l&&(s[l]=r(t[i],i))}else if(Object.keys(o.values||Zo).includes(i)){const l=o.up(i);s[l]=r(t[i],i)}else{const l=i;s[l]=t[l]}return s},{})}return r(t)}function Dh(e={}){var r;return((r=e.keys)==null?void 0:r.reduce((n,a)=>{const o=e.up(a);return n[o]={},n},{}))||{}}function Lh(e,t){return e.reduce((r,n)=>{const a=r[n];return(!a||Object.keys(a).length===0)&&delete r[n],r},t)}function Kg(e,...t){const r=Dh(e),n=[r,...t].reduce((a,o)=>tt(a,o),{});return Lh(Object.keys(r),n)}function Qg(e,t){if(typeof e!="object")return{};const r={},n=Object.keys(t);return Array.isArray(e)?n.forEach((a,o)=>{o<e.length&&(r[a]=!0)}):n.forEach(a=>{e[a]!=null&&(r[a]=!0)}),r}function Xs({values:e,breakpoints:t,base:r}){const n=r||Qg(e,t),a=Object.keys(n);if(a.length===0)return e;let o;return a.reduce((s,i,l)=>(Array.isArray(e)?(s[i]=e[l]!=null?e[l]:e[o],o=l):typeof e=="object"?(s[i]=e[i]!=null?e[i]:e[o],o=i):s[i]=e,s),{})}function et(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":cr(7));return e.charAt(0).toUpperCase()+e.slice(1)}function es(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((a,o)=>a&&a[o]?a[o]:null,e);if(n!=null)return n}return t.split(".").reduce((n,a)=>n&&n[a]!=null?n[a]:null,e)}function Ao(e,t,r,n=r){let a;return typeof e=="function"?a=e(r):Array.isArray(e)?a=e[r]||n:a=es(e,r)||n,t&&(a=t(a,n,e)),a}function Le(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:a}=e,o=s=>{if(s[t]==null)return null;const i=s[t],l=s.theme,c=es(l,n)||{};return Tt(s,i,d=>{let h=Ao(c,a,d);return d===h&&typeof d=="string"&&(h=Ao(c,a,`${t}${d==="default"?"":et(d)}`,d)),r===!1?h:{[r]:h}})};return o.propTypes=process.env.NODE_ENV!=="production"?{[t]:hr}:{},o.filterProps=[t],o}function Xg(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const Zg={m:"margin",p:"padding"},ey={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Fc={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},ty=Xg(e=>{if(e.length>2)if(Fc[e])e=Fc[e];else return[e];const[t,r]=e.split(""),n=Zg[t],a=ey[r]||"";return Array.isArray(a)?a.map(o=>n+o):[n+a]}),ts=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],rs=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],ry=[...ts,...rs];function Ca(e,t,r,n){const a=es(e,t,!0)??r;return typeof a=="number"||typeof a=="string"?o=>typeof o=="string"?o:(process.env.NODE_ENV!=="production"&&typeof o!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${o}.`),typeof a=="string"?a.startsWith("var(")&&o===0?0:a.startsWith("var(")&&o===1?a:`calc(${o} * ${a})`:a*o):Array.isArray(a)?o=>{if(typeof o=="string")return o;const s=Math.abs(o);process.env.NODE_ENV!=="production"&&(Number.isInteger(s)?s>a.length-1&&console.error([`MUI: The value provided (${s}) overflows.`,`The supported values are: ${JSON.stringify(a)}.`,`${s} > ${a.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
49
  `)));const i=a[s];return o>=0?i:typeof i=="number"?-i:typeof i=="string"&&i.startsWith("var(")?`calc(-1 * ${i})`:`-${i}`}:typeof a=="function"?a:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${a}) is invalid.`,"It should be a number, an array or a function."].join(`
50
- `)),()=>{})}function ns(e){return Ca(e,"spacing",8,"spacing")}function Pr(e,t){return typeof t=="string"||t==null?t:e(t)}function ny(e,t){return r=>e.reduce((n,a)=>(n[a]=Pr(t,r),n),{})}function ay(e,t,r,n){if(!t.includes(r))return null;const a=ty(r),o=ny(a,n),s=e[r];return Pt(e,s,o)}function Bh(e,t){const r=ns(e.theme);return Object.keys(e).map(n=>ay(e,t,n,r)).reduce(na,{})}function ke(e){return Bh(e,ts)}ke.propTypes=process.env.NODE_ENV!=="production"?ts.reduce((e,t)=>(e[t]=hr,e),{}):{};ke.filterProps=ts;function $e(e){return Bh(e,rs)}$e.propTypes=process.env.NODE_ENV!=="production"?rs.reduce((e,t)=>(e[t]=hr,e),{}):{};$e.filterProps=rs;process.env.NODE_ENV!=="production"&&ry.reduce((e,t)=>(e[t]=hr,e),{});function Nh(e=8,t=ns({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 as(...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]?na(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 De({prop:e,themeKey:"borders",transform:t})}const oy=xt("border",ft),sy=xt("borderTop",ft),iy=xt("borderRight",ft),ly=xt("borderBottom",ft),cy=xt("borderLeft",ft),uy=xt("borderColor"),dy=xt("borderTopColor"),hy=xt("borderRightColor"),py=xt("borderBottomColor"),my=xt("borderLeftColor"),fy=xt("outline",ft),gy=xt("outlineColor"),os=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Ca(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:Pr(t,n)});return Pt(e,e.borderRadius,r)}return null};os.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:hr}:{};os.filterProps=["borderRadius"];as(oy,sy,iy,ly,cy,uy,dy,hy,py,my,os,fy,gy);const ss=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Ca(e.theme,"spacing",8,"gap"),r=n=>({gap:Pr(t,n)});return Pt(e,e.gap,r)}return null};ss.propTypes=process.env.NODE_ENV!=="production"?{gap:hr}:{};ss.filterProps=["gap"];const is=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Ca(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:Pr(t,n)});return Pt(e,e.columnGap,r)}return null};is.propTypes=process.env.NODE_ENV!=="production"?{columnGap:hr}:{};is.filterProps=["columnGap"];const ls=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Ca(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:Pr(t,n)});return Pt(e,e.rowGap,r)}return null};ls.propTypes=process.env.NODE_ENV!=="production"?{rowGap:hr}:{};ls.filterProps=["rowGap"];const yy=De({prop:"gridColumn"}),by=De({prop:"gridRow"}),xy=De({prop:"gridAutoFlow"}),vy=De({prop:"gridAutoColumns"}),Sy=De({prop:"gridAutoRows"}),Oy=De({prop:"gridTemplateColumns"}),wy=De({prop:"gridTemplateRows"}),Cy=De({prop:"gridTemplateAreas"}),Py=De({prop:"gridArea"});as(ss,is,ls,yy,by,xy,vy,Sy,Oy,wy,Cy,Py);function ln(e,t){return t==="grey"?t:e}const Ty=De({prop:"color",themeKey:"palette",transform:ln}),Ry=De({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ln}),Ay=De({prop:"backgroundColor",themeKey:"palette",transform:ln});as(Ty,Ry,Ay);function dt(e){return e<=1&&e!==0?`${e*100}%`:e}const _y=De({prop:"width",transform:dt}),Rl=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])||Zo[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 Pt(e,e.maxWidth,t)}return null};Rl.filterProps=["maxWidth"];const Ey=De({prop:"minWidth",transform:dt}),Vy=De({prop:"height",transform:dt}),Iy=De({prop:"maxHeight",transform:dt}),My=De({prop:"minHeight",transform:dt});De({prop:"size",cssProperty:"width",transform:dt});De({prop:"size",cssProperty:"height",transform:dt});const jy=De({prop:"boxSizing"});as(_y,Rl,Ey,Vy,Iy,My,jy);const Pa={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:os},color:{themeKey:"palette",transform:ln},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ln},backgroundColor:{themeKey:"palette",transform:ln},p:{style:$e},pt:{style:$e},pr:{style:$e},pb:{style:$e},pl:{style:$e},px:{style:$e},py:{style:$e},padding:{style:$e},paddingTop:{style:$e},paddingRight:{style:$e},paddingBottom:{style:$e},paddingLeft:{style:$e},paddingX:{style:$e},paddingY:{style:$e},paddingInline:{style:$e},paddingInlineStart:{style:$e},paddingInlineEnd:{style:$e},paddingBlock:{style:$e},paddingBlockStart:{style:$e},paddingBlockEnd:{style:$e},m:{style:ke},mt:{style:ke},mr:{style:ke},mb:{style:ke},ml:{style:ke},mx:{style:ke},my:{style:ke},margin:{style:ke},marginTop:{style:ke},marginRight:{style:ke},marginBottom:{style:ke},marginLeft:{style:ke},marginX:{style:ke},marginY:{style:ke},marginInline:{style:ke},marginInlineStart:{style:ke},marginInlineEnd:{style:ke},marginBlock:{style:ke},marginBlockStart:{style:ke},marginBlockEnd:{style:ke},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:ss},rowGap:{style:ls},columnGap:{style:is},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:Rl},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 ky(...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 $y(e,t){return typeof e=="function"?e(t):e}function Uy(){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=es(a,c)||{};return d?d(s):Pt(s,n,f=>{let m=Ao(h,u,f);return f===m&&typeof f=="string"&&(m=Ao(h,u,`${r}${f==="default"?"":et(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??Pa;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=Lh(a.breakpoints),u=Object.keys(c);let d=c;return Object.keys(l).forEach(h=>{const p=$y(l[h],a);if(p!=null)if(typeof p=="object")if(o[h])d=na(d,e(h,p,a,o));else{const f=Pt({theme:a},p,m=>({[h]:m}));ky(f,p)?d[h]=t({sx:p,theme:a}):d=na(d,f)}else d=na(d,e(h,p,a,o))}),Gg(a,Dh(u,d))}return Array.isArray(n)?n.map(s):s(n)}return t}const pn=Uy();pn.filterProps=["sx"];function Ly(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 cs(e={},...t){const{breakpoints:r={},palette:n={},spacing:a,shape:o={},...s}=e,i=zg(r),l=Nh(a);let c=tt({breakpoints:i,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:l,shape:{...Jg,...o}},s);return c=Wg(c),c.applyStyles=Ly,c=t.reduce((u,d)=>tt(u,d),c),c.unstable_sxConfig={...Pa,...s==null?void 0:s.unstable_sxConfig},c.unstable_sx=function(d){return pn({sx:d,theme:this})},c}function Dy(e){return Object.keys(e).length===0}function By(e=null){const t=N.useContext(mg.ThemeContext);return!t||Dy(t)?e:t}const Ny=cs();function Fy(e=Ny){return By(e)}const zy=e=>{var n;const t={systemProps:{},otherProps:{}},r=((n=e==null?void 0:e.theme)==null?void 0:n.unstable_sxConfig)??Pa;return Object.keys(e).forEach(a=>{r[a]?t.systemProps[a]=e[a]:t.otherProps[a]=e[a]}),t};function Gy(e){const{sx:t,...r}=e,{systemProps:n,otherProps:a}=zy(r);let o;return Array.isArray(t)?o=[n,...t]:typeof t=="function"?o=(...s)=>{const i=t(...s);return It(i)?{...n,...i}:n}:o={...n,...t},{...a,sx:o}}const zc=e=>e,Hy=()=>{let e=zc;return{configure(t){e=t},generate(t){return e(t)},reset(){e=zc}}},qy=Hy(),Wy={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 On(e,t,r="Mui"){const n=Wy[t];return n?`${r}-${n}`:`${qy.generate(e)}-${t}`}function Al(e,t,r="Mui"){const n={};return t.forEach(a=>{n[a]=On(e,a,r)}),n}function Fh(e,t=""){return e.displayName||e.name||t}function Gc(e,t,r){const n=Fh(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function Jy(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Fh(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Ro.ForwardRef:return Gc(e,e.render,"ForwardRef");case Ro.Memo:return Gc(e,e.type,"memo");default:return}}}function zh(e){const{variants:t,...r}=e,n={variants:t,style:Uc(r),isProcessed:!0};return n.style===r||t&&t.forEach(a=>{typeof a.style!="function"&&(a.style=Uc(a.style))}),n}const Yy=cs();function Zs(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Ky(e){return e?(t,r)=>r[e]:null}function Qy(e,t,r){e.theme=e0(e.theme)?r:e.theme[t]||e.theme}function go(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>go(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 Gh(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function Gh(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 Hh(e={}){const{themeId:t,defaultTheme:r=Yy,rootShouldForwardProp:n=Zs,slotShouldForwardProp:a=Zs}=e;function o(i){Qy(i,t,r)}return(i,l={})=>{Lg(i,T=>T.filter(P=>P!==pn));const{name:c,slot:u,skipVariantsResolver:d,skipSx:h,overridesResolver:p=Ky(qh(u)),...f}=l,m=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,y=h||!1;let S=Zs;u==="Root"||u==="root"?S=n:u?S=a:t0(i)&&(S=void 0);const E=Ug(i,{shouldForwardProp:S,label:Zy(c,u),...f}),O=T=>{if(T.__emotion_real===T)return T;if(typeof T=="function")return function(C){return go(C,T)};if(It(T)){const P=zh(T);return P.variants?function(I){return go(I,P)}:P.style}return T},w=(...T)=>{const P=[],C=T.map(O),I=[];if(P.push(o),c&&p&&I.push(function(G){var ee,ae;const F=(ae=(ee=G.theme.components)==null?void 0:ee[c])==null?void 0:ae.styleOverrides;if(!F)return null;const re={};for(const te in F)re[te]=go(G,F[te]);return p(G,re)}),c&&!m&&I.push(function(G){var re,ee;const _=G.theme,F=(ee=(re=_==null?void 0:_.components)==null?void 0:re[c])==null?void 0:ee.variants;return F?Gh(G,F):null}),y||I.push(pn),Array.isArray(C[0])){const A=C.shift(),G=new Array(P.length).fill(""),_=new Array(I.length).fill("");let F;F=[...G,...A,..._],F.raw=[...G,...A.raw,..._],P.unshift(F)}const z=[...P,...C,...I],b=E(...z);return i.muiName&&(b.muiName=i.muiName),process.env.NODE_ENV!=="production"&&(b.displayName=Xy(c,u,i)),b};return E.withConfig&&(w.withConfig=E.withConfig),w}}function Xy(e,t,r){return e?`${e}${et(t||"")}`:`Styled(${Jy(r)})`}function Zy(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${qh(t||"Root")}`),r}function e0(e){for(const t in e)return!1;return!0}function t0(e){return typeof e=="string"&&e.charCodeAt(0)>96}function qh(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const r0=Hh();function _o(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]=_o(s[c],i[c],r)}}}else o==="className"&&r&&t.className?n.className=Ct(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 n0(e){const{theme:t,name:r,props:n}=e;return!t||!t.components||!t.components[r]||!t.components[r].defaultProps?n:_o(t.components[r].defaultProps,n)}function Wh({props:e,name:t,defaultTheme:r,themeId:n}){let a=Fy(r);return n&&(a=a[n]||a),n0({theme:a,name:t,props:e})}const kt=typeof window<"u"?N.useLayoutEffect:N.useEffect;function nn(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function _l(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}].`),nn(e,t,r)}function a0(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 ur(e){if(e.type)return e;if(e.charAt(0)==="#")return ur(a0(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.
50
+ `)),()=>{})}function ns(e){return Ca(e,"spacing",8,"spacing")}function Pr(e,t){return typeof t=="string"||t==null?t:e(t)}function ny(e,t){return r=>e.reduce((n,a)=>(n[a]=Pr(t,r),n),{})}function ay(e,t,r,n){if(!t.includes(r))return null;const a=ty(r),o=ny(a,n),s=e[r];return Tt(e,s,o)}function Bh(e,t){const r=ns(e.theme);return Object.keys(e).map(n=>ay(e,t,n,r)).reduce(na,{})}function $e(e){return Bh(e,ts)}$e.propTypes=process.env.NODE_ENV!=="production"?ts.reduce((e,t)=>(e[t]=hr,e),{}):{};$e.filterProps=ts;function ke(e){return Bh(e,rs)}ke.propTypes=process.env.NODE_ENV!=="production"?rs.reduce((e,t)=>(e[t]=hr,e),{}):{};ke.filterProps=rs;process.env.NODE_ENV!=="production"&&ry.reduce((e,t)=>(e[t]=hr,e),{});function Nh(e=8,t=ns({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 as(...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]?na(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 Le({prop:e,themeKey:"borders",transform:t})}const oy=xt("border",ft),sy=xt("borderTop",ft),iy=xt("borderRight",ft),ly=xt("borderBottom",ft),cy=xt("borderLeft",ft),uy=xt("borderColor"),dy=xt("borderTopColor"),hy=xt("borderRightColor"),py=xt("borderBottomColor"),my=xt("borderLeftColor"),fy=xt("outline",ft),gy=xt("outlineColor"),os=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Ca(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:Pr(t,n)});return Tt(e,e.borderRadius,r)}return null};os.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:hr}:{};os.filterProps=["borderRadius"];as(oy,sy,iy,ly,cy,uy,dy,hy,py,my,os,fy,gy);const ss=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Ca(e.theme,"spacing",8,"gap"),r=n=>({gap:Pr(t,n)});return Tt(e,e.gap,r)}return null};ss.propTypes=process.env.NODE_ENV!=="production"?{gap:hr}:{};ss.filterProps=["gap"];const is=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Ca(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:Pr(t,n)});return Tt(e,e.columnGap,r)}return null};is.propTypes=process.env.NODE_ENV!=="production"?{columnGap:hr}:{};is.filterProps=["columnGap"];const ls=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Ca(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:Pr(t,n)});return Tt(e,e.rowGap,r)}return null};ls.propTypes=process.env.NODE_ENV!=="production"?{rowGap:hr}:{};ls.filterProps=["rowGap"];const yy=Le({prop:"gridColumn"}),by=Le({prop:"gridRow"}),xy=Le({prop:"gridAutoFlow"}),vy=Le({prop:"gridAutoColumns"}),Sy=Le({prop:"gridAutoRows"}),Oy=Le({prop:"gridTemplateColumns"}),wy=Le({prop:"gridTemplateRows"}),Cy=Le({prop:"gridTemplateAreas"}),Py=Le({prop:"gridArea"});as(ss,is,ls,yy,by,xy,vy,Sy,Oy,wy,Cy,Py);function ln(e,t){return t==="grey"?t:e}const Ty=Le({prop:"color",themeKey:"palette",transform:ln}),Ry=Le({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ln}),Ay=Le({prop:"backgroundColor",themeKey:"palette",transform:ln});as(Ty,Ry,Ay);function dt(e){return e<=1&&e!==0?`${e*100}%`:e}const _y=Le({prop:"width",transform:dt}),Rl=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])||Zo[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};Rl.filterProps=["maxWidth"];const Ey=Le({prop:"minWidth",transform:dt}),Vy=Le({prop:"height",transform:dt}),Iy=Le({prop:"maxHeight",transform:dt}),My=Le({prop:"minHeight",transform:dt});Le({prop:"size",cssProperty:"width",transform:dt});Le({prop:"size",cssProperty:"height",transform:dt});const jy=Le({prop:"boxSizing"});as(_y,Rl,Ey,Vy,Iy,My,jy);const Pa={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:os},color:{themeKey:"palette",transform:ln},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ln},backgroundColor:{themeKey:"palette",transform:ln},p:{style:ke},pt:{style:ke},pr:{style:ke},pb:{style:ke},pl:{style:ke},px:{style:ke},py:{style:ke},padding:{style:ke},paddingTop:{style:ke},paddingRight:{style:ke},paddingBottom:{style:ke},paddingLeft:{style:ke},paddingX:{style:ke},paddingY:{style:ke},paddingInline:{style:ke},paddingInlineStart:{style:ke},paddingInlineEnd:{style:ke},paddingBlock:{style:ke},paddingBlockStart:{style:ke},paddingBlockEnd:{style:ke},m:{style:$e},mt:{style:$e},mr:{style:$e},mb:{style:$e},ml:{style:$e},mx:{style:$e},my:{style:$e},margin:{style:$e},marginTop:{style:$e},marginRight:{style:$e},marginBottom:{style:$e},marginLeft:{style:$e},marginX:{style:$e},marginY:{style:$e},marginInline:{style:$e},marginInlineStart:{style:$e},marginInlineEnd:{style:$e},marginBlock:{style:$e},marginBlockStart:{style:$e},marginBlockEnd:{style:$e},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:ss},rowGap:{style:ls},columnGap:{style:is},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:Rl},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 $y(...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 ky(e,t){return typeof e=="function"?e(t):e}function Uy(){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=es(a,c)||{};return d?d(s):Tt(s,n,f=>{let m=Ao(h,u,f);return f===m&&typeof f=="string"&&(m=Ao(h,u,`${r}${f==="default"?"":et(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??Pa;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=Dh(a.breakpoints),u=Object.keys(c);let d=c;return Object.keys(l).forEach(h=>{const p=ky(l[h],a);if(p!=null)if(typeof p=="object")if(o[h])d=na(d,e(h,p,a,o));else{const f=Tt({theme:a},p,m=>({[h]:m}));$y(f,p)?d[h]=t({sx:p,theme:a}):d=na(d,f)}else d=na(d,e(h,p,a,o))}),Gg(a,Lh(u,d))}return Array.isArray(n)?n.map(s):s(n)}return t}const pn=Uy();pn.filterProps=["sx"];function Dy(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 cs(e={},...t){const{breakpoints:r={},palette:n={},spacing:a,shape:o={},...s}=e,i=zg(r),l=Nh(a);let c=tt({breakpoints:i,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:l,shape:{...Jg,...o}},s);return c=Wg(c),c.applyStyles=Dy,c=t.reduce((u,d)=>tt(u,d),c),c.unstable_sxConfig={...Pa,...s==null?void 0:s.unstable_sxConfig},c.unstable_sx=function(d){return pn({sx:d,theme:this})},c}function Ly(e){return Object.keys(e).length===0}function By(e=null){const t=N.useContext(mg.ThemeContext);return!t||Ly(t)?e:t}const Ny=cs();function Fy(e=Ny){return By(e)}const zy=e=>{var n;const t={systemProps:{},otherProps:{}},r=((n=e==null?void 0:e.theme)==null?void 0:n.unstable_sxConfig)??Pa;return Object.keys(e).forEach(a=>{r[a]?t.systemProps[a]=e[a]:t.otherProps[a]=e[a]}),t};function Gy(e){const{sx:t,...r}=e,{systemProps:n,otherProps:a}=zy(r);let o;return Array.isArray(t)?o=[n,...t]:typeof t=="function"?o=(...s)=>{const i=t(...s);return It(i)?{...n,...i}:n}:o={...n,...t},{...a,sx:o}}const zc=e=>e,Hy=()=>{let e=zc;return{configure(t){e=t},generate(t){return e(t)},reset(){e=zc}}},qy=Hy(),Wy={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 On(e,t,r="Mui"){const n=Wy[t];return n?`${r}-${n}`:`${qy.generate(e)}-${t}`}function Al(e,t,r="Mui"){const n={};return t.forEach(a=>{n[a]=On(e,a,r)}),n}function Fh(e,t=""){return e.displayName||e.name||t}function Gc(e,t,r){const n=Fh(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function Jy(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Fh(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Ro.ForwardRef:return Gc(e,e.render,"ForwardRef");case Ro.Memo:return Gc(e,e.type,"memo");default:return}}}function zh(e){const{variants:t,...r}=e,n={variants:t,style:Uc(r),isProcessed:!0};return n.style===r||t&&t.forEach(a=>{typeof a.style!="function"&&(a.style=Uc(a.style))}),n}const Yy=cs();function Zs(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Ky(e){return e?(t,r)=>r[e]:null}function Qy(e,t,r){e.theme=e0(e.theme)?r:e.theme[t]||e.theme}function go(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>go(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 Gh(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function Gh(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 Hh(e={}){const{themeId:t,defaultTheme:r=Yy,rootShouldForwardProp:n=Zs,slotShouldForwardProp:a=Zs}=e;function o(i){Qy(i,t,r)}return(i,l={})=>{Dg(i,T=>T.filter(P=>P!==pn));const{name:c,slot:u,skipVariantsResolver:d,skipSx:h,overridesResolver:p=Ky(qh(u)),...f}=l,m=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,y=h||!1;let S=Zs;u==="Root"||u==="root"?S=n:u?S=a:t0(i)&&(S=void 0);const E=Ug(i,{shouldForwardProp:S,label:Zy(c,u),...f}),O=T=>{if(T.__emotion_real===T)return T;if(typeof T=="function")return function(w){return go(w,T)};if(It(T)){const P=zh(T);return P.variants?function(I){return go(I,P)}:P.style}return T},C=(...T)=>{const P=[],w=T.map(O),I=[];if(P.push(o),c&&p&&I.push(function(G){var ee,ae;const F=(ae=(ee=G.theme.components)==null?void 0:ee[c])==null?void 0:ae.styleOverrides;if(!F)return null;const re={};for(const te in F)re[te]=go(G,F[te]);return p(G,re)}),c&&!m&&I.push(function(G){var re,ee;const _=G.theme,F=(ee=(re=_==null?void 0:_.components)==null?void 0:re[c])==null?void 0:ee.variants;return F?Gh(G,F):null}),y||I.push(pn),Array.isArray(w[0])){const A=w.shift(),G=new Array(P.length).fill(""),_=new Array(I.length).fill("");let F;F=[...G,...A,..._],F.raw=[...G,...A.raw,..._],P.unshift(F)}const z=[...P,...w,...I],b=E(...z);return i.muiName&&(b.muiName=i.muiName),process.env.NODE_ENV!=="production"&&(b.displayName=Xy(c,u,i)),b};return E.withConfig&&(C.withConfig=E.withConfig),C}}function Xy(e,t,r){return e?`${e}${et(t||"")}`:`Styled(${Jy(r)})`}function Zy(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${qh(t||"Root")}`),r}function e0(e){for(const t in e)return!1;return!0}function t0(e){return typeof e=="string"&&e.charCodeAt(0)>96}function qh(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const r0=Hh();function _o(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]=_o(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 n0(e){const{theme:t,name:r,props:n}=e;return!t||!t.components||!t.components[r]||!t.components[r].defaultProps?n:_o(t.components[r].defaultProps,n)}function Wh({props:e,name:t,defaultTheme:r,themeId:n}){let a=Fy(r);return n&&(a=a[n]||a),n0({theme:a,name:t,props:e})}const $t=typeof window<"u"?N.useLayoutEffect:N.useEffect;function nn(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function _l(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}].`),nn(e,t,r)}function a0(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 ur(e){if(e.type)return e;if(e.charAt(0)==="#")return ur(a0(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
51
  The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:cr(9,e));let n=e.substring(t+1,e.length-1),a;if(r==="color"){if(n=n.split(" "),a=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(a))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${a}\` color space.
52
- The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:cr(10,a))}else n=n.split(",");return n=n.map(o=>parseFloat(o)),{type:r,values:n,colorSpace:a}}const o0=e=>{const t=ur(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},Zn=(e,t)=>{try{return o0(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function us(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 Jh(e){e=ur(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])),us({type:i,values:l})}function Bi(e){e=ur(e);let t=e.type==="hsl"||e.type==="hsla"?ur(Jh(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 Hc(e,t){const r=Bi(e),n=Bi(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function Ni(e,t){return e=ur(e),t=_l(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,us(e)}function za(e,t,r){try{return Ni(e,t)}catch{return e}}function la(e,t){if(e=ur(e),t=_l(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 us(e)}function Pe(e,t,r){try{return la(e,t)}catch{return e}}function ca(e,t){if(e=ur(e),t=_l(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 us(e)}function Te(e,t,r){try{return ca(e,t)}catch{return e}}function s0(e,t=.15){return Bi(e)>.5?la(e,t):ca(e,t)}function Ga(e,t,r){try{return s0(e,t)}catch{return e}}const i0=N.createContext();process.env.NODE_ENV!=="production"&&(x.node,x.bool);const l0=()=>N.useContext(i0)??!1,c0=N.createContext(void 0);process.env.NODE_ENV!=="production"&&(x.node,x.object);function u0(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?_o(a.defaultProps,n):!a.styleOverrides&&!a.variants?_o(a,n):n}function d0({props:e,name:t}){const r=N.useContext(c0);return u0({props:e,name:t,theme:{components:r}})}const qc={theme:void 0};function h0(e){let t,r;return function(a){let o=t;return(o===void 0||a.theme!==r)&&(qc.theme=a.theme,o=zh(e(qc)),t=o,r=a.theme),o}}function p0(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 Wc=(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])})},m0=(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)},f0=(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 ei(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},a={},o={},s={};return m0(e,(i,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!n||!n(i,l))){const u=`--${r?`${r}-`:""}${i.join("-")}`,d=f0(i,l);Object.assign(a,{[u]:d}),Wc(o,i,`var(${u})`,c),Wc(s,i,`var(${u}, ${d})`,c)}},i=>i[0]==="vars"),{css:a,vars:o,varsWithDefaults:s}}function g0(e,t={}){const{getSelector:r=y,disableCssColorScheme:n,colorSchemeSelector:a}=t,{colorSchemes:o={},components:s,defaultColorScheme:i="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=ei(l,t);let h=d;const p={},{[i]:f,...m}=o;if(Object.entries(m||{}).forEach(([O,w])=>{const{vars:T,css:P,varsWithDefaults:C}=ei(w,t);h=tt(h,C),p[O]={css:P,vars:T}}),f){const{css:O,vars:w,varsWithDefaults:T}=ei(f,t);h=tt(h,T),p[i]={css:O,vars:w}}function y(O,w){var P,C;let T=a;if(a==="class"&&(T=".%s"),a==="data"&&(T="[data-%s]"),a!=null&&a.startsWith("data-")&&!a.includes("%s")&&(T=`[${a}="%s"]`),O){if(T==="media")return e.defaultColorScheme===O?":root":{[`@media (prefers-color-scheme: ${((C=(P=o[O])==null?void 0:P.palette)==null?void 0:C.mode)||O})`]:{":root":w}};if(T)return e.defaultColorScheme===O?`:root, ${T.replace("%s",String(O))}`:T.replace("%s",String(O))}return":root"}return{vars:h,generateThemeVars:()=>{let O={...c};return Object.entries(p).forEach(([,{vars:w}])=>{O=tt(O,w)}),O},generateStyleSheets:()=>{var I,z;const O=[],w=e.defaultColorScheme||"light";function T(b,A){Object.keys(A).length&&O.push(typeof b=="string"?{[b]:{...A}}:b)}T(r(void 0,{...u}),u);const{[w]:P,...C}=p;if(P){const{css:b}=P,A=(z=(I=o[w])==null?void 0:I.palette)==null?void 0:z.mode,G=!n&&A?{colorScheme:A,...b}:{...b};T(r(w,{...G}),G)}return Object.entries(C).forEach(([b,{css:A}])=>{var F,re;const G=(re=(F=o[b])==null?void 0:F.palette)==null?void 0:re.mode,_=!n&&G?{colorScheme:G,...A}:{...A};T(r(b,{..._}),_)}),O}}}function y0(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 b0=cs(),x0=r0("div",{name:"MuiStack",slot:"Root"});function v0(e){return Wh({props:e,name:"MuiStack",defaultTheme:b0})}function S0(e,t){const r=N.Children.toArray(e).filter(Boolean);return r.reduce((n,a,o)=>(n.push(a),o<r.length-1&&n.push(N.cloneElement(t,{key:`separator-${o}`})),n),[])}const O0=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],w0=({ownerState:e,theme:t})=>{let r={display:"flex",flexDirection:"column",...Pt({theme:t},Xs({values:e.direction,breakpoints:t.breakpoints.values}),n=>({flexDirection:n}))};if(e.spacing){const n=ns(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=Xs({values:e.direction,base:a}),s=Xs({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=tt(r,Pt({theme:t},s,(l,c)=>e.useFlexGap?{gap:Pr(n,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${O0(c?o[c]:e.direction)}`]:Pr(n,l)}}))}return r=Kg(t.breakpoints,r),r};function C0(e={}){const{createStyledComponent:t=x0,useThemeProps:r=v0,componentName:n="MuiStack"}=e,a=()=>Xo({root:["root"]},l=>On(n,l),{}),o=t(w0),s=N.forwardRef(function(l,c){const u=r(l),d=Gy(u),{component:h="div",direction:p="column",spacing:f=0,divider:m,children:y,className:S,useFlexGap:E=!1,...O}=d,w={direction:p,spacing:f,useFlexGap:E},T=a();return g.jsx(o,{as:h,ownerState:w,ref:c,className:Ct(T.root,S),...O,children:m?S0(y,m):y})});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 ua={black:"#000",white:"#fff"},P0={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"},Fr={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},zr={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Ln={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Gr={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Hr={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},qr={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Yh(){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:ua.white,default:ua.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 T0=Yh();function Kh(){return{text:{primary:ua.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:ua.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 Jc=Kh();function Yc(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=ca(e.main,a):t==="dark"&&(e.dark=la(e.main,o)))}function R0(e="light"){return e==="dark"?{main:Gr[200],light:Gr[50],dark:Gr[400]}:{main:Gr[700],light:Gr[400],dark:Gr[800]}}function A0(e="light"){return e==="dark"?{main:Fr[200],light:Fr[50],dark:Fr[400]}:{main:Fr[500],light:Fr[300],dark:Fr[700]}}function _0(e="light"){return e==="dark"?{main:zr[500],light:zr[300],dark:zr[700]}:{main:zr[700],light:zr[400],dark:zr[800]}}function E0(e="light"){return e==="dark"?{main:Hr[400],light:Hr[300],dark:Hr[700]}:{main:Hr[700],light:Hr[500],dark:Hr[900]}}function V0(e="light"){return e==="dark"?{main:qr[400],light:qr[300],dark:qr[700]}:{main:qr[800],light:qr[500],dark:qr[900]}}function I0(e="light"){return e==="dark"?{main:Ln[400],light:Ln[300],dark:Ln[700]}:{main:"#ed6c02",light:Ln[500],dark:Ln[900]}}function El(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...a}=e,o=e.primary||R0(t),s=e.secondary||A0(t),i=e.error||_0(t),l=e.info||E0(t),c=e.success||V0(t),u=e.warning||I0(t);function d(m){const y=Hc(m,Jc.text.primary)>=r?Jc.text.primary:T0.text.primary;if(process.env.NODE_ENV!=="production"){const S=Hc(m,y);S<3&&console.error([`MUI: The contrast ratio of ${S}:1 for ${y} 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(`
52
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:cr(10,a))}else n=n.split(",");return n=n.map(o=>parseFloat(o)),{type:r,values:n,colorSpace:a}}const o0=e=>{const t=ur(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},Zn=(e,t)=>{try{return o0(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function us(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 Jh(e){e=ur(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])),us({type:i,values:l})}function Bi(e){e=ur(e);let t=e.type==="hsl"||e.type==="hsla"?ur(Jh(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 Hc(e,t){const r=Bi(e),n=Bi(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function Ni(e,t){return e=ur(e),t=_l(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,us(e)}function za(e,t,r){try{return Ni(e,t)}catch{return e}}function la(e,t){if(e=ur(e),t=_l(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 us(e)}function Pe(e,t,r){try{return la(e,t)}catch{return e}}function ca(e,t){if(e=ur(e),t=_l(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 us(e)}function Te(e,t,r){try{return ca(e,t)}catch{return e}}function s0(e,t=.15){return Bi(e)>.5?la(e,t):ca(e,t)}function Ga(e,t,r){try{return s0(e,t)}catch{return e}}const i0=N.createContext();process.env.NODE_ENV!=="production"&&(x.node,x.bool);const l0=()=>N.useContext(i0)??!1,c0=N.createContext(void 0);process.env.NODE_ENV!=="production"&&(x.node,x.object);function u0(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?_o(a.defaultProps,n):!a.styleOverrides&&!a.variants?_o(a,n):n}function d0({props:e,name:t}){const r=N.useContext(c0);return u0({props:e,name:t,theme:{components:r}})}const qc={theme:void 0};function h0(e){let t,r;return function(a){let o=t;return(o===void 0||a.theme!==r)&&(qc.theme=a.theme,o=zh(e(qc)),t=o,r=a.theme),o}}function p0(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 Wc=(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])})},m0=(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)},f0=(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 ei(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},a={},o={},s={};return m0(e,(i,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!n||!n(i,l))){const u=`--${r?`${r}-`:""}${i.join("-")}`,d=f0(i,l);Object.assign(a,{[u]:d}),Wc(o,i,`var(${u})`,c),Wc(s,i,`var(${u}, ${d})`,c)}},i=>i[0]==="vars"),{css:a,vars:o,varsWithDefaults:s}}function g0(e,t={}){const{getSelector:r=y,disableCssColorScheme:n,colorSchemeSelector:a}=t,{colorSchemes:o={},components:s,defaultColorScheme:i="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=ei(l,t);let h=d;const p={},{[i]:f,...m}=o;if(Object.entries(m||{}).forEach(([O,C])=>{const{vars:T,css:P,varsWithDefaults:w}=ei(C,t);h=tt(h,w),p[O]={css:P,vars:T}}),f){const{css:O,vars:C,varsWithDefaults:T}=ei(f,t);h=tt(h,T),p[i]={css:O,vars:C}}function y(O,C){var P,w;let T=a;if(a==="class"&&(T=".%s"),a==="data"&&(T="[data-%s]"),a!=null&&a.startsWith("data-")&&!a.includes("%s")&&(T=`[${a}="%s"]`),O){if(T==="media")return e.defaultColorScheme===O?":root":{[`@media (prefers-color-scheme: ${((w=(P=o[O])==null?void 0:P.palette)==null?void 0:w.mode)||O})`]:{":root":C}};if(T)return e.defaultColorScheme===O?`:root, ${T.replace("%s",String(O))}`:T.replace("%s",String(O))}return":root"}return{vars:h,generateThemeVars:()=>{let O={...c};return Object.entries(p).forEach(([,{vars:C}])=>{O=tt(O,C)}),O},generateStyleSheets:()=>{var I,z;const O=[],C=e.defaultColorScheme||"light";function T(b,A){Object.keys(A).length&&O.push(typeof b=="string"?{[b]:{...A}}:b)}T(r(void 0,{...u}),u);const{[C]:P,...w}=p;if(P){const{css:b}=P,A=(z=(I=o[C])==null?void 0:I.palette)==null?void 0:z.mode,G=!n&&A?{colorScheme:A,...b}:{...b};T(r(C,{...G}),G)}return Object.entries(w).forEach(([b,{css:A}])=>{var F,re;const G=(re=(F=o[b])==null?void 0:F.palette)==null?void 0:re.mode,_=!n&&G?{colorScheme:G,...A}:{...A};T(r(b,{..._}),_)}),O}}}function y0(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 b0=cs(),x0=r0("div",{name:"MuiStack",slot:"Root"});function v0(e){return Wh({props:e,name:"MuiStack",defaultTheme:b0})}function S0(e,t){const r=N.Children.toArray(e).filter(Boolean);return r.reduce((n,a,o)=>(n.push(a),o<r.length-1&&n.push(N.cloneElement(t,{key:`separator-${o}`})),n),[])}const O0=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],w0=({ownerState:e,theme:t})=>{let r={display:"flex",flexDirection:"column",...Tt({theme:t},Xs({values:e.direction,breakpoints:t.breakpoints.values}),n=>({flexDirection:n}))};if(e.spacing){const n=ns(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=Xs({values:e.direction,base:a}),s=Xs({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=tt(r,Tt({theme:t},s,(l,c)=>e.useFlexGap?{gap:Pr(n,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${O0(c?o[c]:e.direction)}`]:Pr(n,l)}}))}return r=Kg(t.breakpoints,r),r};function C0(e={}){const{createStyledComponent:t=x0,useThemeProps:r=v0,componentName:n="MuiStack"}=e,a=()=>Xo({root:["root"]},l=>On(n,l),{}),o=t(w0),s=N.forwardRef(function(l,c){const u=r(l),d=Gy(u),{component:h="div",direction:p="column",spacing:f=0,divider:m,children:y,className:S,useFlexGap:E=!1,...O}=d,C={direction:p,spacing:f,useFlexGap:E},T=a();return g.jsx(o,{as:h,ownerState:C,ref:c,className:Pt(T.root,S),...O,children:m?S0(y,m):y})});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 ua={black:"#000",white:"#fff"},P0={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"},Fr={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},zr={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Dn={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Gr={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Hr={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},qr={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Yh(){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:ua.white,default:ua.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 T0=Yh();function Kh(){return{text:{primary:ua.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:ua.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 Jc=Kh();function Yc(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=ca(e.main,a):t==="dark"&&(e.dark=la(e.main,o)))}function R0(e="light"){return e==="dark"?{main:Gr[200],light:Gr[50],dark:Gr[400]}:{main:Gr[700],light:Gr[400],dark:Gr[800]}}function A0(e="light"){return e==="dark"?{main:Fr[200],light:Fr[50],dark:Fr[400]}:{main:Fr[500],light:Fr[300],dark:Fr[700]}}function _0(e="light"){return e==="dark"?{main:zr[500],light:zr[300],dark:zr[700]}:{main:zr[700],light:zr[400],dark:zr[800]}}function E0(e="light"){return e==="dark"?{main:Hr[400],light:Hr[300],dark:Hr[700]}:{main:Hr[700],light:Hr[500],dark:Hr[900]}}function V0(e="light"){return e==="dark"?{main:qr[400],light:qr[300],dark:qr[700]}:{main:qr[800],light:qr[500],dark:qr[900]}}function I0(e="light"){return e==="dark"?{main:Dn[400],light:Dn[300],dark:Dn[700]}:{main:"#ed6c02",light:Dn[500],dark:Dn[900]}}function El(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...a}=e,o=e.primary||R0(t),s=e.secondary||A0(t),i=e.error||_0(t),l=e.info||E0(t),c=e.success||V0(t),u=e.warning||I0(t);function d(m){const y=Hc(m,Jc.text.primary)>=r?Jc.text.primary:T0.text.primary;if(process.env.NODE_ENV!=="production"){const S=Hc(m,y);S<3&&console.error([`MUI: The contrast ratio of ${S}:1 for ${y} 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 y}const h=({color:m,name:y,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${y?` (${y})`:""} provided to augmentColor(color) is invalid.
54
54
  The color object needs to have a \`main\` property or a \`${S}\` property.`:cr(11,y?` (${y})`:"",S));if(typeof m.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${y?` (${y})`:""} provided to augmentColor(color) is invalid.
55
55
  \`color.main\` should be a string, but \`${JSON.stringify(m.main)}\` was provided instead.
@@ -64,7 +64,7 @@ const theme1 = createTheme({ palette: {
64
64
 
65
65
  const theme2 = createTheme({ palette: {
66
66
  primary: { main: green[500] },
67
- } });`:cr(12,y?` (${y})`:"",JSON.stringify(m.main)));return Yc(m,"light",E,n),Yc(m,"dark",O,n),m.contrastText||(m.contrastText=d(m.main)),m};let p;return t==="light"?p=Yh():t==="dark"&&(p=Kh()),process.env.NODE_ENV!=="production"&&(p||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),tt({common:{...ua},mode:t,primary:h({color:o,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:P0,contrastThreshold:r,getContrastText:d,augmentColor:h,tonalOffset:n,...p},a)}function M0(e){const t={};return Object.entries(e).forEach(n=>{const[a,o]=n;typeof o=="object"&&(t[a]=`${o.fontStyle?`${o.fontStyle} `:""}${o.fontVariant?`${o.fontVariant} `:""}${o.fontWeight?`${o.fontWeight} `:""}${o.fontStretch?`${o.fontStretch} `:""}${o.fontSize||""}${o.lineHeight?`/${o.lineHeight} `:""}${o.fontFamily||""}`)}),t}function j0(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function k0(e){return Math.round(e*1e5)/1e5}const Kc={textTransform:"uppercase"},Qc='"Roboto", "Helvetica", "Arial", sans-serif';function $0(e,t){const{fontFamily:r=Qc,fontSize:n=14,fontWeightLight:a=300,fontWeightRegular:o=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||(y=>`${y/l*h}rem`),f=(y,S,E,O,w)=>({fontFamily:r,fontWeight:y,fontSize:p(S),lineHeight:E,...r===Qc?{letterSpacing:`${k0(O/S)}em`}:{},...w,...c}),m={h1:f(a,96,1.167,-1.5),h2:f(a,60,1.2,-.5),h3:f(o,48,1.167,0),h4:f(o,34,1.235,.25),h5:f(o,24,1.334,0),h6:f(s,20,1.6,.15),subtitle1:f(o,16,1.75,.15),subtitle2:f(s,14,1.57,.1),body1:f(o,16,1.5,.15),body2:f(o,14,1.43,.15),button:f(s,14,1.75,.4,Kc),caption:f(o,12,1.66,.4),overline:f(o,12,2.66,1,Kc),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return tt({htmlFontSize:l,pxToRem:p,fontFamily:r,fontSize:n,fontWeightLight:a,fontWeightRegular:o,fontWeightMedium:s,fontWeightBold:i,...m},d,{clone:!1})}const U0=.2,L0=.14,D0=.12;function Ie(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${U0})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${L0})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${D0})`].join(",")}const B0=["none",Ie(0,2,1,-1,0,1,1,0,0,1,3,0),Ie(0,3,1,-2,0,2,2,0,0,1,5,0),Ie(0,3,3,-2,0,3,4,0,0,1,8,0),Ie(0,2,4,-1,0,4,5,0,0,1,10,0),Ie(0,3,5,-1,0,5,8,0,0,1,14,0),Ie(0,3,5,-1,0,6,10,0,0,1,18,0),Ie(0,4,5,-2,0,7,10,1,0,2,16,1),Ie(0,5,5,-3,0,8,10,1,0,3,14,2),Ie(0,5,6,-3,0,9,12,1,0,3,16,2),Ie(0,6,6,-3,0,10,14,1,0,4,18,3),Ie(0,6,7,-4,0,11,15,1,0,4,20,3),Ie(0,7,8,-4,0,12,17,2,0,5,22,4),Ie(0,7,8,-4,0,13,19,2,0,5,24,4),Ie(0,7,9,-4,0,14,21,2,0,5,26,4),Ie(0,8,9,-5,0,15,22,2,0,6,28,5),Ie(0,8,10,-5,0,16,24,2,0,6,30,5),Ie(0,8,11,-5,0,17,26,2,0,6,32,5),Ie(0,9,11,-5,0,18,28,2,0,7,34,6),Ie(0,9,12,-6,0,19,29,2,0,7,36,6),Ie(0,10,13,-6,0,20,31,3,0,8,38,7),Ie(0,10,13,-6,0,21,33,3,0,8,40,7),Ie(0,10,14,-6,0,22,35,3,0,8,42,7),Ie(0,11,14,-7,0,23,36,3,0,9,44,8),Ie(0,11,15,-7,0,24,38,3,0,9,46,8)],N0={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)"},F0={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Xc(e){return`${Math.round(e)}ms`}function z0(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function G0(e){const t={...N0,...e.easing},r={...F0,...e.duration};return{getAutoHeightDuration:z0,create:(a=["all"],o={})=>{const{duration:s=r.standard,easing:i=t.easeInOut,delay:l=0,...c}=o;if(process.env.NODE_ENV!=="production"){const u=h=>typeof h=="string",d=h=>!Number.isNaN(parseFloat(h));!u(a)&&!Array.isArray(a)&&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 o!="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(`
67
+ } });`:cr(12,y?` (${y})`:"",JSON.stringify(m.main)));return Yc(m,"light",E,n),Yc(m,"dark",O,n),m.contrastText||(m.contrastText=d(m.main)),m};let p;return t==="light"?p=Yh():t==="dark"&&(p=Kh()),process.env.NODE_ENV!=="production"&&(p||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),tt({common:{...ua},mode:t,primary:h({color:o,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:P0,contrastThreshold:r,getContrastText:d,augmentColor:h,tonalOffset:n,...p},a)}function M0(e){const t={};return Object.entries(e).forEach(n=>{const[a,o]=n;typeof o=="object"&&(t[a]=`${o.fontStyle?`${o.fontStyle} `:""}${o.fontVariant?`${o.fontVariant} `:""}${o.fontWeight?`${o.fontWeight} `:""}${o.fontStretch?`${o.fontStretch} `:""}${o.fontSize||""}${o.lineHeight?`/${o.lineHeight} `:""}${o.fontFamily||""}`)}),t}function j0(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function $0(e){return Math.round(e*1e5)/1e5}const Kc={textTransform:"uppercase"},Qc='"Roboto", "Helvetica", "Arial", sans-serif';function k0(e,t){const{fontFamily:r=Qc,fontSize:n=14,fontWeightLight:a=300,fontWeightRegular:o=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||(y=>`${y/l*h}rem`),f=(y,S,E,O,C)=>({fontFamily:r,fontWeight:y,fontSize:p(S),lineHeight:E,...r===Qc?{letterSpacing:`${$0(O/S)}em`}:{},...C,...c}),m={h1:f(a,96,1.167,-1.5),h2:f(a,60,1.2,-.5),h3:f(o,48,1.167,0),h4:f(o,34,1.235,.25),h5:f(o,24,1.334,0),h6:f(s,20,1.6,.15),subtitle1:f(o,16,1.75,.15),subtitle2:f(s,14,1.57,.1),body1:f(o,16,1.5,.15),body2:f(o,14,1.43,.15),button:f(s,14,1.75,.4,Kc),caption:f(o,12,1.66,.4),overline:f(o,12,2.66,1,Kc),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return tt({htmlFontSize:l,pxToRem:p,fontFamily:r,fontSize:n,fontWeightLight:a,fontWeightRegular:o,fontWeightMedium:s,fontWeightBold:i,...m},d,{clone:!1})}const U0=.2,D0=.14,L0=.12;function Ie(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${U0})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${D0})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${L0})`].join(",")}const B0=["none",Ie(0,2,1,-1,0,1,1,0,0,1,3,0),Ie(0,3,1,-2,0,2,2,0,0,1,5,0),Ie(0,3,3,-2,0,3,4,0,0,1,8,0),Ie(0,2,4,-1,0,4,5,0,0,1,10,0),Ie(0,3,5,-1,0,5,8,0,0,1,14,0),Ie(0,3,5,-1,0,6,10,0,0,1,18,0),Ie(0,4,5,-2,0,7,10,1,0,2,16,1),Ie(0,5,5,-3,0,8,10,1,0,3,14,2),Ie(0,5,6,-3,0,9,12,1,0,3,16,2),Ie(0,6,6,-3,0,10,14,1,0,4,18,3),Ie(0,6,7,-4,0,11,15,1,0,4,20,3),Ie(0,7,8,-4,0,12,17,2,0,5,22,4),Ie(0,7,8,-4,0,13,19,2,0,5,24,4),Ie(0,7,9,-4,0,14,21,2,0,5,26,4),Ie(0,8,9,-5,0,15,22,2,0,6,28,5),Ie(0,8,10,-5,0,16,24,2,0,6,30,5),Ie(0,8,11,-5,0,17,26,2,0,6,32,5),Ie(0,9,11,-5,0,18,28,2,0,7,34,6),Ie(0,9,12,-6,0,19,29,2,0,7,36,6),Ie(0,10,13,-6,0,20,31,3,0,8,38,7),Ie(0,10,13,-6,0,21,33,3,0,8,40,7),Ie(0,10,14,-6,0,22,35,3,0,8,42,7),Ie(0,11,14,-7,0,23,36,3,0,9,44,8),Ie(0,11,15,-7,0,24,38,3,0,9,46,8)],N0={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)"},F0={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Xc(e){return`${Math.round(e)}ms`}function z0(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function G0(e){const t={...N0,...e.easing},r={...F0,...e.duration};return{getAutoHeightDuration:z0,create:(a=["all"],o={})=>{const{duration:s=r.standard,easing:i=t.easeInOut,delay:l=0,...c}=o;if(process.env.NODE_ENV!=="production"){const u=h=>typeof h=="string",d=h=>!Number.isNaN(parseFloat(h));!u(a)&&!Array.isArray(a)&&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 o!="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
68
  `)),Object.keys(c).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(c).join(",")}].`)}return(Array.isArray(a)?a:[a]).map(u=>`${u} ${typeof s=="string"?s:Xc(s)} ${i} ${typeof l=="string"?l:Xc(l)}`).join(",")},...e,easing:t,duration:r}}const H0={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function q0(e){return It(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Qh(e={}){const t={...e};function r(n){const a=Object.entries(n);for(let o=0;o<a.length;o++){const[s,i]=a[o];!q0(i)||s.startsWith("unstable_")?delete n[s]:It(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)};
@@ -72,15 +72,15 @@ const theme = ${JSON.stringify(t,null,2)};
72
72
  theme.breakpoints = createBreakpoints(theme.breakpoints || {});
73
73
  theme.transitions = createTransitions(theme.transitions || {});
74
74
 
75
- export default theme;`}function Fi(e={},...t){const{breakpoints:r,mixins:n={},spacing:a,palette:o={},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.":cr(20));const u=El(o),d=cs(e);let h=tt(d,{mixins:j0(d.breakpoints,n),palette:u,shadows:B0.slice(),typography:$0(u,i),transitions:G0(s),zIndex:{...H0}});if(h=tt(h,c),h=t.reduce((p,f)=>tt(p,f),h),process.env.NODE_ENV!=="production"){const p=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],f=(m,y)=>{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=On("",S);console.error([`MUI: The \`${y}\` 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 y=h.components[m].styleOverrides;y&&m.startsWith("Mui")&&f(y,m)})}return h.unstable_sxConfig={...Pa,...c==null?void 0:c.unstable_sxConfig},h.unstable_sx=function(f){return pn({sx:f,theme:this})},h.toRuntimeSource=Qh,h}function W0(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 J0=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=W0(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function Xh(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Zh(e){return e==="dark"?J0:[]}function Y0(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...a}=e,o=El(t);return{palette:o,opacity:{...Xh(o.mode),...r},overlays:n||Zh(o.mode),...a}}function K0(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 Q0=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],X0=e=>(t,r)=>{const n=e.rootSelector||":root",a=e.colorSchemeSelector;let o=a;if(a==="class"&&(o=".%s"),a==="data"&&(o="[data-%s]"),a!=null&&a.startsWith("data-")&&!a.includes("%s")&&(o=`[${a}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const s={};return Q0(e.cssVarPrefix).forEach(i=>{s[i]=r[i],delete r[i]}),o==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:s}}:o?{[o.replace("%s",t)]:s,[`${n}, ${o.replace("%s",t)}`]:r}:{[n]:{...r,...s}}}if(o&&o!=="media")return`${n}, ${o.replace("%s",String(t))}`}else if(t){if(o==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(o)return o.replace("%s",String(t))}return n};function Z0(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function q(e,t,r){!e[t]&&r&&(e[t]=r)}function ea(e){return typeof e!="string"||!e.startsWith("hsl")?e:Jh(e)}function Dt(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Zn(ea(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 eb(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{}},tb=(e="mui")=>p0(e);function ti(e,t,r,n){if(!t)return;t=t===!0?{}:t;const a=n==="dark"?"dark":"light";if(!r){e[n]=Y0({...t,palette:{mode:a,...t==null?void 0:t.palette}});return}const{palette:o,...s}=Fi({...r,palette:{mode:a,...t==null?void 0:t.palette}});return e[n]={...t,palette:o,opacity:{...Xh(a),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Zh(a)},s}function rb(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:a=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:s=K0,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=tb(o),{[d]:p,light:f,dark:m,...y}=r,S={...y};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.`:cr(21,d));const O=ti(S,E,c,d);f&&!S.light&&ti(S,f,void 0,"light"),m&&!S.dark&&ti(S,m,void 0,"dark");let w={defaultColorScheme:d,...O,cssVarPrefix:o,colorSchemeSelector:i,rootSelector:l,getCssVar:h,colorSchemes:S,font:{...M0(O.typography),...O.font},spacing:eb(c.spacing)};Object.keys(w.colorSchemes).forEach(z=>{const b=w.colorSchemes[z].palette,A=G=>{const _=G.split("-"),F=_[1],re=_[2];return h(G,b[F][re])};if(b.mode==="light"&&(q(b.common,"background","#fff"),q(b.common,"onBackground","#000")),b.mode==="dark"&&(q(b.common,"background","#000"),q(b.common,"onBackground","#fff")),Z0(b,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),b.mode==="light"){q(b.Alert,"errorColor",Pe(b.error.light,.6)),q(b.Alert,"infoColor",Pe(b.info.light,.6)),q(b.Alert,"successColor",Pe(b.success.light,.6)),q(b.Alert,"warningColor",Pe(b.warning.light,.6)),q(b.Alert,"errorFilledBg",A("palette-error-main")),q(b.Alert,"infoFilledBg",A("palette-info-main")),q(b.Alert,"successFilledBg",A("palette-success-main")),q(b.Alert,"warningFilledBg",A("palette-warning-main")),q(b.Alert,"errorFilledColor",At(()=>b.getContrastText(b.error.main))),q(b.Alert,"infoFilledColor",At(()=>b.getContrastText(b.info.main))),q(b.Alert,"successFilledColor",At(()=>b.getContrastText(b.success.main))),q(b.Alert,"warningFilledColor",At(()=>b.getContrastText(b.warning.main))),q(b.Alert,"errorStandardBg",Te(b.error.light,.9)),q(b.Alert,"infoStandardBg",Te(b.info.light,.9)),q(b.Alert,"successStandardBg",Te(b.success.light,.9)),q(b.Alert,"warningStandardBg",Te(b.warning.light,.9)),q(b.Alert,"errorIconColor",A("palette-error-main")),q(b.Alert,"infoIconColor",A("palette-info-main")),q(b.Alert,"successIconColor",A("palette-success-main")),q(b.Alert,"warningIconColor",A("palette-warning-main")),q(b.AppBar,"defaultBg",A("palette-grey-100")),q(b.Avatar,"defaultBg",A("palette-grey-400")),q(b.Button,"inheritContainedBg",A("palette-grey-300")),q(b.Button,"inheritContainedHoverBg",A("palette-grey-A100")),q(b.Chip,"defaultBorder",A("palette-grey-400")),q(b.Chip,"defaultAvatarColor",A("palette-grey-700")),q(b.Chip,"defaultIconColor",A("palette-grey-700")),q(b.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),q(b.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),q(b.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),q(b.LinearProgress,"primaryBg",Te(b.primary.main,.62)),q(b.LinearProgress,"secondaryBg",Te(b.secondary.main,.62)),q(b.LinearProgress,"errorBg",Te(b.error.main,.62)),q(b.LinearProgress,"infoBg",Te(b.info.main,.62)),q(b.LinearProgress,"successBg",Te(b.success.main,.62)),q(b.LinearProgress,"warningBg",Te(b.warning.main,.62)),q(b.Skeleton,"bg",`rgba(${A("palette-text-primaryChannel")} / 0.11)`),q(b.Slider,"primaryTrack",Te(b.primary.main,.62)),q(b.Slider,"secondaryTrack",Te(b.secondary.main,.62)),q(b.Slider,"errorTrack",Te(b.error.main,.62)),q(b.Slider,"infoTrack",Te(b.info.main,.62)),q(b.Slider,"successTrack",Te(b.success.main,.62)),q(b.Slider,"warningTrack",Te(b.warning.main,.62));const G=Ga(b.background.default,.8);q(b.SnackbarContent,"bg",G),q(b.SnackbarContent,"color",At(()=>b.getContrastText(G))),q(b.SpeedDialAction,"fabHoverBg",Ga(b.background.paper,.15)),q(b.StepConnector,"border",A("palette-grey-400")),q(b.StepContent,"border",A("palette-grey-400")),q(b.Switch,"defaultColor",A("palette-common-white")),q(b.Switch,"defaultDisabledColor",A("palette-grey-100")),q(b.Switch,"primaryDisabledColor",Te(b.primary.main,.62)),q(b.Switch,"secondaryDisabledColor",Te(b.secondary.main,.62)),q(b.Switch,"errorDisabledColor",Te(b.error.main,.62)),q(b.Switch,"infoDisabledColor",Te(b.info.main,.62)),q(b.Switch,"successDisabledColor",Te(b.success.main,.62)),q(b.Switch,"warningDisabledColor",Te(b.warning.main,.62)),q(b.TableCell,"border",Te(za(b.divider,1),.88)),q(b.Tooltip,"bg",za(b.grey[700],.92))}if(b.mode==="dark"){q(b.Alert,"errorColor",Te(b.error.light,.6)),q(b.Alert,"infoColor",Te(b.info.light,.6)),q(b.Alert,"successColor",Te(b.success.light,.6)),q(b.Alert,"warningColor",Te(b.warning.light,.6)),q(b.Alert,"errorFilledBg",A("palette-error-dark")),q(b.Alert,"infoFilledBg",A("palette-info-dark")),q(b.Alert,"successFilledBg",A("palette-success-dark")),q(b.Alert,"warningFilledBg",A("palette-warning-dark")),q(b.Alert,"errorFilledColor",At(()=>b.getContrastText(b.error.dark))),q(b.Alert,"infoFilledColor",At(()=>b.getContrastText(b.info.dark))),q(b.Alert,"successFilledColor",At(()=>b.getContrastText(b.success.dark))),q(b.Alert,"warningFilledColor",At(()=>b.getContrastText(b.warning.dark))),q(b.Alert,"errorStandardBg",Pe(b.error.light,.9)),q(b.Alert,"infoStandardBg",Pe(b.info.light,.9)),q(b.Alert,"successStandardBg",Pe(b.success.light,.9)),q(b.Alert,"warningStandardBg",Pe(b.warning.light,.9)),q(b.Alert,"errorIconColor",A("palette-error-main")),q(b.Alert,"infoIconColor",A("palette-info-main")),q(b.Alert,"successIconColor",A("palette-success-main")),q(b.Alert,"warningIconColor",A("palette-warning-main")),q(b.AppBar,"defaultBg",A("palette-grey-900")),q(b.AppBar,"darkBg",A("palette-background-paper")),q(b.AppBar,"darkColor",A("palette-text-primary")),q(b.Avatar,"defaultBg",A("palette-grey-600")),q(b.Button,"inheritContainedBg",A("palette-grey-800")),q(b.Button,"inheritContainedHoverBg",A("palette-grey-700")),q(b.Chip,"defaultBorder",A("palette-grey-700")),q(b.Chip,"defaultAvatarColor",A("palette-grey-300")),q(b.Chip,"defaultIconColor",A("palette-grey-300")),q(b.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),q(b.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),q(b.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),q(b.LinearProgress,"primaryBg",Pe(b.primary.main,.5)),q(b.LinearProgress,"secondaryBg",Pe(b.secondary.main,.5)),q(b.LinearProgress,"errorBg",Pe(b.error.main,.5)),q(b.LinearProgress,"infoBg",Pe(b.info.main,.5)),q(b.LinearProgress,"successBg",Pe(b.success.main,.5)),q(b.LinearProgress,"warningBg",Pe(b.warning.main,.5)),q(b.Skeleton,"bg",`rgba(${A("palette-text-primaryChannel")} / 0.13)`),q(b.Slider,"primaryTrack",Pe(b.primary.main,.5)),q(b.Slider,"secondaryTrack",Pe(b.secondary.main,.5)),q(b.Slider,"errorTrack",Pe(b.error.main,.5)),q(b.Slider,"infoTrack",Pe(b.info.main,.5)),q(b.Slider,"successTrack",Pe(b.success.main,.5)),q(b.Slider,"warningTrack",Pe(b.warning.main,.5));const G=Ga(b.background.default,.98);q(b.SnackbarContent,"bg",G),q(b.SnackbarContent,"color",At(()=>b.getContrastText(G))),q(b.SpeedDialAction,"fabHoverBg",Ga(b.background.paper,.15)),q(b.StepConnector,"border",A("palette-grey-600")),q(b.StepContent,"border",A("palette-grey-600")),q(b.Switch,"defaultColor",A("palette-grey-300")),q(b.Switch,"defaultDisabledColor",A("palette-grey-600")),q(b.Switch,"primaryDisabledColor",Pe(b.primary.main,.55)),q(b.Switch,"secondaryDisabledColor",Pe(b.secondary.main,.55)),q(b.Switch,"errorDisabledColor",Pe(b.error.main,.55)),q(b.Switch,"infoDisabledColor",Pe(b.info.main,.55)),q(b.Switch,"successDisabledColor",Pe(b.success.main,.55)),q(b.Switch,"warningDisabledColor",Pe(b.warning.main,.55)),q(b.TableCell,"border",Pe(za(b.divider,1),.68)),q(b.Tooltip,"bg",za(b.grey[700],.92))}Dt(b.background,"default"),Dt(b.background,"paper"),Dt(b.common,"background"),Dt(b.common,"onBackground"),Dt(b,"divider"),Object.keys(b).forEach(G=>{const _=b[G];G!=="tonalOffset"&&_&&typeof _=="object"&&(_.main&&q(b[G],"mainChannel",Zn(ea(_.main))),_.light&&q(b[G],"lightChannel",Zn(ea(_.light))),_.dark&&q(b[G],"darkChannel",Zn(ea(_.dark))),_.contrastText&&q(b[G],"contrastTextChannel",Zn(ea(_.contrastText))),G==="text"&&(Dt(b[G],"primary"),Dt(b[G],"secondary")),G==="action"&&(_.active&&Dt(b[G],"active"),_.selected&&Dt(b[G],"selected")))})}),w=t.reduce((z,b)=>tt(z,b),w);const T={prefix:o,disableCssColorScheme:a,shouldSkipGeneratingVar:s,getSelector:X0(w)},{vars:P,generateThemeVars:C,generateStyleSheets:I}=g0(w,T);return w.vars=P,Object.entries(w.colorSchemes[w.defaultColorScheme]).forEach(([z,b])=>{w[z]=b}),w.generateThemeVars=C,w.generateStyleSheets=I,w.generateSpacing=function(){return Nh(c.spacing,ns(this))},w.getColorSchemeSelector=y0(i),w.spacing=w.generateSpacing(),w.shouldSkipGeneratingVar=s,w.unstable_sxConfig={...Pa,...c==null?void 0:c.unstable_sxConfig},w.unstable_sx=function(b){return pn({sx:b,theme:this})},w.toRuntimeSource=Qh,w}function Zc(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:El({...r===!0?{}:r.palette,mode:t})})}function ep(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 Fi(e,...t);let u=r;"palette"in e||c[i]&&(c[i]!==!0?u=c[i].palette:i==="dark"&&(u={mode:"dark"}));const d=Fi({...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},Zc(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},Zc(d,"light",c.light)),d}return!r&&!("light"in c)&&i==="light"&&(c.light=!0),rb({...s,colorSchemes:c,defaultColorScheme:i,...typeof n!="boolean"&&n},...t)}const tp=ep();function nb({props:e,name:t}){return Wh({props:e,name:t,defaultTheme:tp,themeId:kh})}function Vl(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const ab=e=>Vl(e)&&e!=="classes",pt=Hh({themeId:kh,defaultTheme:tp,rootShouldForwardProp:ab});function ds(...e){const t=N.useRef(void 0),r=N.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 N.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}let eu=0;function ob(e){const[t,r]=N.useState(e),n=t;return N.useEffect(()=>{t==null&&(eu+=1,r(`mui-${eu}`))},[t]),n}const sb={...N},tu=sb.useId;function ib(e){return tu!==void 0?tu():ob(e)}class lb{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 hs=({params:e,store:t})=>{N.useEffect(()=>{t.update(n=>K({},n,{animation:K({},n.animation,{skip:e.skipAnimation})}))},[t,e.skipAnimation]);const r=N.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 kt(()=>{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}}};hs.params={skipAnimation:!0};hs.getDefaultizedParams=({params:e})=>K({},e,{skipAnimation:e.skipAnimation??!1});hs.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 cb=(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 Fi(e={},...t){const{breakpoints:r,mixins:n={},spacing:a,palette:o={},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.":cr(20));const u=El(o),d=cs(e);let h=tt(d,{mixins:j0(d.breakpoints,n),palette:u,shadows:B0.slice(),typography:k0(u,i),transitions:G0(s),zIndex:{...H0}});if(h=tt(h,c),h=t.reduce((p,f)=>tt(p,f),h),process.env.NODE_ENV!=="production"){const p=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],f=(m,y)=>{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=On("",S);console.error([`MUI: The \`${y}\` 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 y=h.components[m].styleOverrides;y&&m.startsWith("Mui")&&f(y,m)})}return h.unstable_sxConfig={...Pa,...c==null?void 0:c.unstable_sxConfig},h.unstable_sx=function(f){return pn({sx:f,theme:this})},h.toRuntimeSource=Qh,h}function W0(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 J0=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=W0(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function Xh(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Zh(e){return e==="dark"?J0:[]}function Y0(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...a}=e,o=El(t);return{palette:o,opacity:{...Xh(o.mode),...r},overlays:n||Zh(o.mode),...a}}function K0(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 Q0=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],X0=e=>(t,r)=>{const n=e.rootSelector||":root",a=e.colorSchemeSelector;let o=a;if(a==="class"&&(o=".%s"),a==="data"&&(o="[data-%s]"),a!=null&&a.startsWith("data-")&&!a.includes("%s")&&(o=`[${a}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const s={};return Q0(e.cssVarPrefix).forEach(i=>{s[i]=r[i],delete r[i]}),o==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:s}}:o?{[o.replace("%s",t)]:s,[`${n}, ${o.replace("%s",t)}`]:r}:{[n]:{...r,...s}}}if(o&&o!=="media")return`${n}, ${o.replace("%s",String(t))}`}else if(t){if(o==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(o)return o.replace("%s",String(t))}return n};function Z0(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function q(e,t,r){!e[t]&&r&&(e[t]=r)}function ea(e){return typeof e!="string"||!e.startsWith("hsl")?e:Jh(e)}function Lt(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Zn(ea(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 eb(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{}},tb=(e="mui")=>p0(e);function ti(e,t,r,n){if(!t)return;t=t===!0?{}:t;const a=n==="dark"?"dark":"light";if(!r){e[n]=Y0({...t,palette:{mode:a,...t==null?void 0:t.palette}});return}const{palette:o,...s}=Fi({...r,palette:{mode:a,...t==null?void 0:t.palette}});return e[n]={...t,palette:o,opacity:{...Xh(a),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Zh(a)},s}function rb(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:a=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:s=K0,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=tb(o),{[d]:p,light:f,dark:m,...y}=r,S={...y};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.`:cr(21,d));const O=ti(S,E,c,d);f&&!S.light&&ti(S,f,void 0,"light"),m&&!S.dark&&ti(S,m,void 0,"dark");let C={defaultColorScheme:d,...O,cssVarPrefix:o,colorSchemeSelector:i,rootSelector:l,getCssVar:h,colorSchemes:S,font:{...M0(O.typography),...O.font},spacing:eb(c.spacing)};Object.keys(C.colorSchemes).forEach(z=>{const b=C.colorSchemes[z].palette,A=G=>{const _=G.split("-"),F=_[1],re=_[2];return h(G,b[F][re])};if(b.mode==="light"&&(q(b.common,"background","#fff"),q(b.common,"onBackground","#000")),b.mode==="dark"&&(q(b.common,"background","#000"),q(b.common,"onBackground","#fff")),Z0(b,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),b.mode==="light"){q(b.Alert,"errorColor",Pe(b.error.light,.6)),q(b.Alert,"infoColor",Pe(b.info.light,.6)),q(b.Alert,"successColor",Pe(b.success.light,.6)),q(b.Alert,"warningColor",Pe(b.warning.light,.6)),q(b.Alert,"errorFilledBg",A("palette-error-main")),q(b.Alert,"infoFilledBg",A("palette-info-main")),q(b.Alert,"successFilledBg",A("palette-success-main")),q(b.Alert,"warningFilledBg",A("palette-warning-main")),q(b.Alert,"errorFilledColor",At(()=>b.getContrastText(b.error.main))),q(b.Alert,"infoFilledColor",At(()=>b.getContrastText(b.info.main))),q(b.Alert,"successFilledColor",At(()=>b.getContrastText(b.success.main))),q(b.Alert,"warningFilledColor",At(()=>b.getContrastText(b.warning.main))),q(b.Alert,"errorStandardBg",Te(b.error.light,.9)),q(b.Alert,"infoStandardBg",Te(b.info.light,.9)),q(b.Alert,"successStandardBg",Te(b.success.light,.9)),q(b.Alert,"warningStandardBg",Te(b.warning.light,.9)),q(b.Alert,"errorIconColor",A("palette-error-main")),q(b.Alert,"infoIconColor",A("palette-info-main")),q(b.Alert,"successIconColor",A("palette-success-main")),q(b.Alert,"warningIconColor",A("palette-warning-main")),q(b.AppBar,"defaultBg",A("palette-grey-100")),q(b.Avatar,"defaultBg",A("palette-grey-400")),q(b.Button,"inheritContainedBg",A("palette-grey-300")),q(b.Button,"inheritContainedHoverBg",A("palette-grey-A100")),q(b.Chip,"defaultBorder",A("palette-grey-400")),q(b.Chip,"defaultAvatarColor",A("palette-grey-700")),q(b.Chip,"defaultIconColor",A("palette-grey-700")),q(b.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),q(b.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),q(b.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),q(b.LinearProgress,"primaryBg",Te(b.primary.main,.62)),q(b.LinearProgress,"secondaryBg",Te(b.secondary.main,.62)),q(b.LinearProgress,"errorBg",Te(b.error.main,.62)),q(b.LinearProgress,"infoBg",Te(b.info.main,.62)),q(b.LinearProgress,"successBg",Te(b.success.main,.62)),q(b.LinearProgress,"warningBg",Te(b.warning.main,.62)),q(b.Skeleton,"bg",`rgba(${A("palette-text-primaryChannel")} / 0.11)`),q(b.Slider,"primaryTrack",Te(b.primary.main,.62)),q(b.Slider,"secondaryTrack",Te(b.secondary.main,.62)),q(b.Slider,"errorTrack",Te(b.error.main,.62)),q(b.Slider,"infoTrack",Te(b.info.main,.62)),q(b.Slider,"successTrack",Te(b.success.main,.62)),q(b.Slider,"warningTrack",Te(b.warning.main,.62));const G=Ga(b.background.default,.8);q(b.SnackbarContent,"bg",G),q(b.SnackbarContent,"color",At(()=>b.getContrastText(G))),q(b.SpeedDialAction,"fabHoverBg",Ga(b.background.paper,.15)),q(b.StepConnector,"border",A("palette-grey-400")),q(b.StepContent,"border",A("palette-grey-400")),q(b.Switch,"defaultColor",A("palette-common-white")),q(b.Switch,"defaultDisabledColor",A("palette-grey-100")),q(b.Switch,"primaryDisabledColor",Te(b.primary.main,.62)),q(b.Switch,"secondaryDisabledColor",Te(b.secondary.main,.62)),q(b.Switch,"errorDisabledColor",Te(b.error.main,.62)),q(b.Switch,"infoDisabledColor",Te(b.info.main,.62)),q(b.Switch,"successDisabledColor",Te(b.success.main,.62)),q(b.Switch,"warningDisabledColor",Te(b.warning.main,.62)),q(b.TableCell,"border",Te(za(b.divider,1),.88)),q(b.Tooltip,"bg",za(b.grey[700],.92))}if(b.mode==="dark"){q(b.Alert,"errorColor",Te(b.error.light,.6)),q(b.Alert,"infoColor",Te(b.info.light,.6)),q(b.Alert,"successColor",Te(b.success.light,.6)),q(b.Alert,"warningColor",Te(b.warning.light,.6)),q(b.Alert,"errorFilledBg",A("palette-error-dark")),q(b.Alert,"infoFilledBg",A("palette-info-dark")),q(b.Alert,"successFilledBg",A("palette-success-dark")),q(b.Alert,"warningFilledBg",A("palette-warning-dark")),q(b.Alert,"errorFilledColor",At(()=>b.getContrastText(b.error.dark))),q(b.Alert,"infoFilledColor",At(()=>b.getContrastText(b.info.dark))),q(b.Alert,"successFilledColor",At(()=>b.getContrastText(b.success.dark))),q(b.Alert,"warningFilledColor",At(()=>b.getContrastText(b.warning.dark))),q(b.Alert,"errorStandardBg",Pe(b.error.light,.9)),q(b.Alert,"infoStandardBg",Pe(b.info.light,.9)),q(b.Alert,"successStandardBg",Pe(b.success.light,.9)),q(b.Alert,"warningStandardBg",Pe(b.warning.light,.9)),q(b.Alert,"errorIconColor",A("palette-error-main")),q(b.Alert,"infoIconColor",A("palette-info-main")),q(b.Alert,"successIconColor",A("palette-success-main")),q(b.Alert,"warningIconColor",A("palette-warning-main")),q(b.AppBar,"defaultBg",A("palette-grey-900")),q(b.AppBar,"darkBg",A("palette-background-paper")),q(b.AppBar,"darkColor",A("palette-text-primary")),q(b.Avatar,"defaultBg",A("palette-grey-600")),q(b.Button,"inheritContainedBg",A("palette-grey-800")),q(b.Button,"inheritContainedHoverBg",A("palette-grey-700")),q(b.Chip,"defaultBorder",A("palette-grey-700")),q(b.Chip,"defaultAvatarColor",A("palette-grey-300")),q(b.Chip,"defaultIconColor",A("palette-grey-300")),q(b.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),q(b.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),q(b.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),q(b.LinearProgress,"primaryBg",Pe(b.primary.main,.5)),q(b.LinearProgress,"secondaryBg",Pe(b.secondary.main,.5)),q(b.LinearProgress,"errorBg",Pe(b.error.main,.5)),q(b.LinearProgress,"infoBg",Pe(b.info.main,.5)),q(b.LinearProgress,"successBg",Pe(b.success.main,.5)),q(b.LinearProgress,"warningBg",Pe(b.warning.main,.5)),q(b.Skeleton,"bg",`rgba(${A("palette-text-primaryChannel")} / 0.13)`),q(b.Slider,"primaryTrack",Pe(b.primary.main,.5)),q(b.Slider,"secondaryTrack",Pe(b.secondary.main,.5)),q(b.Slider,"errorTrack",Pe(b.error.main,.5)),q(b.Slider,"infoTrack",Pe(b.info.main,.5)),q(b.Slider,"successTrack",Pe(b.success.main,.5)),q(b.Slider,"warningTrack",Pe(b.warning.main,.5));const G=Ga(b.background.default,.98);q(b.SnackbarContent,"bg",G),q(b.SnackbarContent,"color",At(()=>b.getContrastText(G))),q(b.SpeedDialAction,"fabHoverBg",Ga(b.background.paper,.15)),q(b.StepConnector,"border",A("palette-grey-600")),q(b.StepContent,"border",A("palette-grey-600")),q(b.Switch,"defaultColor",A("palette-grey-300")),q(b.Switch,"defaultDisabledColor",A("palette-grey-600")),q(b.Switch,"primaryDisabledColor",Pe(b.primary.main,.55)),q(b.Switch,"secondaryDisabledColor",Pe(b.secondary.main,.55)),q(b.Switch,"errorDisabledColor",Pe(b.error.main,.55)),q(b.Switch,"infoDisabledColor",Pe(b.info.main,.55)),q(b.Switch,"successDisabledColor",Pe(b.success.main,.55)),q(b.Switch,"warningDisabledColor",Pe(b.warning.main,.55)),q(b.TableCell,"border",Pe(za(b.divider,1),.68)),q(b.Tooltip,"bg",za(b.grey[700],.92))}Lt(b.background,"default"),Lt(b.background,"paper"),Lt(b.common,"background"),Lt(b.common,"onBackground"),Lt(b,"divider"),Object.keys(b).forEach(G=>{const _=b[G];G!=="tonalOffset"&&_&&typeof _=="object"&&(_.main&&q(b[G],"mainChannel",Zn(ea(_.main))),_.light&&q(b[G],"lightChannel",Zn(ea(_.light))),_.dark&&q(b[G],"darkChannel",Zn(ea(_.dark))),_.contrastText&&q(b[G],"contrastTextChannel",Zn(ea(_.contrastText))),G==="text"&&(Lt(b[G],"primary"),Lt(b[G],"secondary")),G==="action"&&(_.active&&Lt(b[G],"active"),_.selected&&Lt(b[G],"selected")))})}),C=t.reduce((z,b)=>tt(z,b),C);const T={prefix:o,disableCssColorScheme:a,shouldSkipGeneratingVar:s,getSelector:X0(C)},{vars:P,generateThemeVars:w,generateStyleSheets:I}=g0(C,T);return C.vars=P,Object.entries(C.colorSchemes[C.defaultColorScheme]).forEach(([z,b])=>{C[z]=b}),C.generateThemeVars=w,C.generateStyleSheets=I,C.generateSpacing=function(){return Nh(c.spacing,ns(this))},C.getColorSchemeSelector=y0(i),C.spacing=C.generateSpacing(),C.shouldSkipGeneratingVar=s,C.unstable_sxConfig={...Pa,...c==null?void 0:c.unstable_sxConfig},C.unstable_sx=function(b){return pn({sx:b,theme:this})},C.toRuntimeSource=Qh,C}function Zc(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:El({...r===!0?{}:r.palette,mode:t})})}function ep(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 Fi(e,...t);let u=r;"palette"in e||c[i]&&(c[i]!==!0?u=c[i].palette:i==="dark"&&(u={mode:"dark"}));const d=Fi({...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},Zc(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},Zc(d,"light",c.light)),d}return!r&&!("light"in c)&&i==="light"&&(c.light=!0),rb({...s,colorSchemes:c,defaultColorScheme:i,...typeof n!="boolean"&&n},...t)}const tp=ep();function nb({props:e,name:t}){return Wh({props:e,name:t,defaultTheme:tp,themeId:$h})}function Vl(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const ab=e=>Vl(e)&&e!=="classes",pt=Hh({themeId:$h,defaultTheme:tp,rootShouldForwardProp:ab});function ds(...e){const t=N.useRef(void 0),r=N.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 N.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}let eu=0;function ob(e){const[t,r]=N.useState(e),n=t;return N.useEffect(()=>{t==null&&(eu+=1,r(`mui-${eu}`))},[t]),n}const sb={...N},tu=sb.useId;function ib(e){return tu!==void 0?tu():ob(e)}class lb{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 hs=({params:e,store:t})=>{N.useEffect(()=>{t.update(n=>K({},n,{animation:K({},n.animation,{skip:e.skipAnimation})}))},[t,e.skipAnimation]);const r=N.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}}};hs.params={skipAnimation:!0};hs.getDefaultizedParams=({params:e})=>K({},e,{skipAnimation:e.skipAnimation??!1});hs.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 cb=(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
78
78
  \`createSelector([state => state.todos], todos => todos)\`
79
79
  This could lead to inefficient memoization and unnecessary re-renders.
80
80
  Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:a})}}},ub=(e,t,r)=>{const{memoize:n,memoizeOptions:a}=t,{inputSelectorResults:o,inputSelectorResultsCopy:s}=e,i=n(()=>({}),...a);if(!(i.apply(null,o)===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:o,secondInputs:s,stack:c})}},db={inputStabilityCheck:"once",identityFunctionCheck:"once"},Eo=Symbol("NOT_FOUND");function hb(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function pb(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function mb(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 ru=e=>Array.isArray(e)?e:[e];function fb(e){const t=Array.isArray(e[0])?e[0]:e;return mb(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function nu(e,t){const r=[],{length:n}=e;for(let a=0;a<n;a++)r.push(e[a].apply(null,t));return r}var gb=(e,t)=>{const{identityFunctionCheck:r,inputStabilityCheck:n}={...db,...t};return{identityFunctionCheck:{shouldRun:r==="always"||r==="once"&&e,run:cb},inputStabilityCheck:{shouldRun:n==="always"||n==="once"&&e,run:ub}}};function yb(e){let t;return{get(r){return t&&e(t.key,r)?t.value:Eo},put(r,n){t={key:r,value:n}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function bb(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 Eo}function a(i,l){n(i)===Eo&&(r.unshift({key:i,value:l}),r.length>e&&r.pop())}function o(){return r}function s(){r=[]}return{get:n,put:a,getEntries:o,clear:s}}var xb=(e,t)=>e===t;function vb(e){return function(r,n){if(r===null||n===null||r.length!==n.length)return!1;const{length:a}=r;for(let o=0;o<a;o++)if(!e(r[o],n[o]))return!1;return!0}}function Sb(e,t){const r=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:n=xb,maxSize:a=1,resultEqualityCheck:o}=r,s=vb(n);let i=0;const l=a<=1?yb(s):bb(a,s);function c(){let u=l.get(arguments);if(u===Eo){if(u=e.apply(null,arguments),i++,o){const h=l.getEntries().find(p=>o(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 Ob=class{constructor(e){this.value=e}deref(){return this.value}},wb=typeof WeakRef<"u"?WeakRef:Ob,Cb=0,au=1;function Ha(){return{s:Cb,v:void 0,o:null,p:null}}function rp(e,t={}){let r=Ha();const{resultEqualityCheck:n}=t;let a,o=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 y=m.get(f);y===void 0?(i=Ha(),m.set(f,i)):i=y}else{let m=i.p;m===null&&(i.p=m=new Map);const y=m.get(f);y===void 0?(i=Ha(),m.set(f,i)):i=y}}const c=i;let u;if(i.s===au)u=i.v;else if(u=e.apply(null,arguments),o++,n){const h=((d=a==null?void 0:a.deref)==null?void 0:d.call(a))??a;h!=null&&n(h,u)&&(u=h,o!==0&&o--),a=typeof u=="object"&&u!==null||typeof u=="function"?new wb(u):u}return c.s=au,c.v=u,u}return s.clearCache=()=>{r=Ha(),s.resetResultsCount()},s.resultsCount=()=>o,s.resetResultsCount=()=>{o=0},s}function np(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...a)=>{let o=0,s=0,i,l={},c=a.pop();typeof c=="object"&&(l=c,c=a.pop()),hb(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...r,...l},{memoize:d,memoizeOptions:h=[],argsMemoize:p=rp,argsMemoizeOptions:f=[],devModeChecks:m={}}=u,y=ru(h),S=ru(f),E=fb(a),O=d(function(){return o++,c.apply(null,arguments)},...y);let w=!0;const T=p(function(){s++;const C=nu(E,arguments);if(i=O.apply(null,C),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:I,inputStabilityCheck:z}=gb(w,m);if(I.shouldRun&&I.run(c,C,i),z.shouldRun){const b=nu(E,arguments);z.run({inputSelectorResults:C,inputSelectorResultsCopy:b},{memoize:d,memoizeOptions:y},arguments)}w&&(w=!1)}return i},...S);return Object.assign(T,{resultFunc:c,memoizedResultFunc:O,dependencies:E,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>i,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:d,argsMemoize:p})};return Object.assign(n,{withTypes:()=>n}),n}var Pb=np(rp),Tb=Object.assign((e,t=Pb)=>{pb(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(o=>e[o]);return t(n,(...o)=>o.reduce((s,i,l)=>(s[r[l]]=i,s),{}))},{withTypes:()=>Tb});const Rb=np({memoize:Sb,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),ou=new WeakMap,pe=(...e)=>(r,...n)=>{const a=r.cacheKey;let o=ou.get(a);o||(o=new Map,ou.set(a,o));const s=o.get(e);if(s)return s(r,...n);const i=Rb(...e);return o.set(e,i),i(r,...n)},Ab=e=>e.animation,_b=pe([Ab],e=>e.skip||e.skipAnimationRequests>0);function aa(e){return e&&e.ownerDocument||document}function Eb(e){return aa(e).defaultView||window}var qa={exports:{}},ri={},Wa={exports:{}},ni={};/**
83
+ \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:r,firstInputs:o,secondInputs:s,stack:c})}},db={inputStabilityCheck:"once",identityFunctionCheck:"once"},Eo=Symbol("NOT_FOUND");function hb(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function pb(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function mb(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 ru=e=>Array.isArray(e)?e:[e];function fb(e){const t=Array.isArray(e[0])?e[0]:e;return mb(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function nu(e,t){const r=[],{length:n}=e;for(let a=0;a<n;a++)r.push(e[a].apply(null,t));return r}var gb=(e,t)=>{const{identityFunctionCheck:r,inputStabilityCheck:n}={...db,...t};return{identityFunctionCheck:{shouldRun:r==="always"||r==="once"&&e,run:cb},inputStabilityCheck:{shouldRun:n==="always"||n==="once"&&e,run:ub}}};function yb(e){let t;return{get(r){return t&&e(t.key,r)?t.value:Eo},put(r,n){t={key:r,value:n}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function bb(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 Eo}function a(i,l){n(i)===Eo&&(r.unshift({key:i,value:l}),r.length>e&&r.pop())}function o(){return r}function s(){r=[]}return{get:n,put:a,getEntries:o,clear:s}}var xb=(e,t)=>e===t;function vb(e){return function(r,n){if(r===null||n===null||r.length!==n.length)return!1;const{length:a}=r;for(let o=0;o<a;o++)if(!e(r[o],n[o]))return!1;return!0}}function Sb(e,t){const r=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:n=xb,maxSize:a=1,resultEqualityCheck:o}=r,s=vb(n);let i=0;const l=a<=1?yb(s):bb(a,s);function c(){let u=l.get(arguments);if(u===Eo){if(u=e.apply(null,arguments),i++,o){const h=l.getEntries().find(p=>o(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 Ob=class{constructor(e){this.value=e}deref(){return this.value}},wb=typeof WeakRef<"u"?WeakRef:Ob,Cb=0,au=1;function Ha(){return{s:Cb,v:void 0,o:null,p:null}}function rp(e,t={}){let r=Ha();const{resultEqualityCheck:n}=t;let a,o=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 y=m.get(f);y===void 0?(i=Ha(),m.set(f,i)):i=y}else{let m=i.p;m===null&&(i.p=m=new Map);const y=m.get(f);y===void 0?(i=Ha(),m.set(f,i)):i=y}}const c=i;let u;if(i.s===au)u=i.v;else if(u=e.apply(null,arguments),o++,n){const h=((d=a==null?void 0:a.deref)==null?void 0:d.call(a))??a;h!=null&&n(h,u)&&(u=h,o!==0&&o--),a=typeof u=="object"&&u!==null||typeof u=="function"?new wb(u):u}return c.s=au,c.v=u,u}return s.clearCache=()=>{r=Ha(),s.resetResultsCount()},s.resultsCount=()=>o,s.resetResultsCount=()=>{o=0},s}function np(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...a)=>{let o=0,s=0,i,l={},c=a.pop();typeof c=="object"&&(l=c,c=a.pop()),hb(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...r,...l},{memoize:d,memoizeOptions:h=[],argsMemoize:p=rp,argsMemoizeOptions:f=[],devModeChecks:m={}}=u,y=ru(h),S=ru(f),E=fb(a),O=d(function(){return o++,c.apply(null,arguments)},...y);let C=!0;const T=p(function(){s++;const w=nu(E,arguments);if(i=O.apply(null,w),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:I,inputStabilityCheck:z}=gb(C,m);if(I.shouldRun&&I.run(c,w,i),z.shouldRun){const b=nu(E,arguments);z.run({inputSelectorResults:w,inputSelectorResultsCopy:b},{memoize:d,memoizeOptions:y},arguments)}C&&(C=!1)}return i},...S);return Object.assign(T,{resultFunc:c,memoizedResultFunc:O,dependencies:E,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>i,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:d,argsMemoize:p})};return Object.assign(n,{withTypes:()=>n}),n}var Pb=np(rp),Tb=Object.assign((e,t=Pb)=>{pb(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(o=>e[o]);return t(n,(...o)=>o.reduce((s,i,l)=>(s[r[l]]=i,s),{}))},{withTypes:()=>Tb});const Rb=np({memoize:Sb,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),ou=new WeakMap,pe=(...e)=>(r,...n)=>{const a=r.cacheKey;let o=ou.get(a);o||(o=new Map,ou.set(a,o));const s=o.get(e);if(s)return s(r,...n);const i=Rb(...e);return o.set(e,i),i(r,...n)},Ab=e=>e.animation,_b=pe([Ab],e=>e.skip||e.skipAnimationRequests>0);function aa(e){return e&&e.ownerDocument||document}function Eb(e){return aa(e).defaultView||window}var qa={exports:{}},ri={},Wa={exports:{}},ni={};/**
84
84
  * @license React
85
85
  * use-sync-external-store-shim.production.js
86
86
  *
@@ -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 cu;function Mb(){if(cu)return ri;cu=1;var e=J,t=ap();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,a=t.useSyncExternalStore,o=e.useRef,s=e.useEffect,i=e.useMemo,l=e.useDebugValue;return ri.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(P){if(!E){if(E=!0,O=P,P=h(P),p!==void 0&&m.hasValue){var C=m.value;if(p(C,P))return w=C}return w=P}if(C=w,n(O,P))return C;var I=h(P);return p!==void 0&&p(C,I)?(O=P,C):(O=P,w=I)}var E=!1,O,w,T=d===void 0?null:d;return[function(){return S(u())},T===null?void 0:function(){return S(T())}]},[u,d,h,p]);var y=a(c,f[0],f[1]);return s(function(){m.hasValue=!0,m.value=y},[y]),l(y),y},ri}var oi={};/**
107
+ */var cu;function Mb(){if(cu)return ri;cu=1;var e=J,t=ap();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,a=t.useSyncExternalStore,o=e.useRef,s=e.useEffect,i=e.useMemo,l=e.useDebugValue;return ri.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(P){if(!E){if(E=!0,O=P,P=h(P),p!==void 0&&m.hasValue){var w=m.value;if(p(w,P))return C=w}return C=P}if(w=C,n(O,P))return w;var I=h(P);return p!==void 0&&p(w,I)?(O=P,w):(O=P,C=I)}var E=!1,O,C,T=d===void 0?null:d;return[function(){return S(u())},T===null?void 0:function(){return S(T())}]},[u,d,h,p]);var y=a(c,f[0],f[1]);return s(function(){m.hasValue=!0,m.value=y},[y]),l(y),y},ri}var oi={};/**
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 uu;function jb(){return uu||(uu=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=ap(),n=typeof Object.is=="function"?Object.is:e,a=r.useSyncExternalStore,o=t.useRef,s=t.useEffect,i=t.useMemo,l=t.useDebugValue;oi.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(P){if(!E){if(E=!0,O=P,P=h(P),p!==void 0&&m.hasValue){var C=m.value;if(p(C,P))return w=C}return w=P}if(C=w,n(O,P))return C;var I=h(P);return p!==void 0&&p(C,I)?(O=P,C):(O=P,w=I)}var E=!1,O,w,T=d===void 0?null:d;return[function(){return S(u())},T===null?void 0:function(){return S(T())}]},[u,d,h,p]);var y=a(c,f[0],f[1]);return s(function(){m.hasValue=!0,m.value=y},[y]),l(y),y},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),oi}var du;function kb(){return du||(du=1,process.env.NODE_ENV==="production"?qa.exports=Mb():qa.exports=jb()),qa.exports}var $b=kb();const Ub=Object.is,st=(e,t,r=[],n=Ub)=>{const a=o=>t(o,...r);return $b.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,a,n)},Lb="DEFAULT_X_AXIS_KEY",Db="DEFAULT_Y_AXIS_KEY",Bb={top:20,bottom:20,left:20,right:20},Nb=45,Fb=25,op=20,wn=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.x},Cn=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.y},zb=pe([Cn],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)),Gb=pe([Cn],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)),Hb=pe([wn],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=pe([wn],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)),Wb=e=>e.dimensions,sp=e=>e.dimensions.width,ip=e=>e.dimensions.height,Jb=e=>e.dimensions.margin.top,Yb=e=>e.dimensions.margin.right,Kb=e=>e.dimensions.margin.bottom,Qb=e=>e.dimensions.margin.left,Ta=pe([sp,ip,Jb,Yb,Kb,Qb,Hb,Gb,qb,zb],(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})),Xb=pe([Wb],e=>({width:e.propsWidth,height:e.propsHeight})),Zb=pe([sp,ip],(e,t)=>({width:e,height:t}));function lp(e,t){return typeof e=="number"?{top:e,bottom:e,left:e,right:e}:t?K({},t,e):e}const ex=10,ps=({params:e,store:t,svgRef:r})=>{const n=e.width!==void 0&&e.height!==void 0,a=N.useRef({displayError:!1,initialCompute:!0,computeRun:0}),[o,s]=N.useState(0),[i,l]=N.useState(0),c=N.useCallback(()=>{const f=r==null?void 0:r.current;if(!f)return{};const y=Eb(f).getComputedStyle(f),S=Math.floor(parseFloat(y.height))||0,E=Math.floor(parseFloat(y.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]);N.useEffect(()=>{t.update(f=>{const m=e.width??f.dimensions.width,y=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:y,propsHeight:e.height,propsWidth:e.width}})})},[t,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]),N.useEffect(()=>{a.current.displayError=!0},[]),kt(()=>{if(n||!a.current.initialCompute||a.current.computeRun>ex)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]),kt(()=>{if(n)return()=>{};c();const f=r.current;if(typeof ResizeObserver>"u")return()=>{};let m;const y=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{c()})});return f&&y.observe(f),()=>{m&&cancelAnimationFrame(m),f&&y.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=st(t,Ta),d=N.useCallback(f=>f>=u.left-1&&f<=u.left+u.width,[u.left,u.width]),h=N.useCallback(f=>f>=u.top-1&&f<=u.top+u.height,[u.height,u.top]);return{instance:{isPointInside:N.useCallback((f,m,y)=>y&&"closest"in y&&y.closest("[data-drawing-container]")?!0:d(f)&&h(m),[d,h]),isXInside:d,isYInside:h}}};ps.params={width:!0,height:!0,margin:!0};ps.getDefaultizedParams=({params:e})=>K({},e,{margin:lp(e.margin,Bb)});ps.getInitialState=({width:e,height:t,margin:r})=>({dimensions:{margin:r,width:e??0,height:t??0,propsWidth:e,propsHeight:t}});const Il=({params:e,store:t})=>(kt(()=>{t.update(r=>K({},r,{experimentalFeatures:e.experimentalFeatures}))},[t,e.experimentalFeatures]),{});Il.params={experimentalFeatures:!0};Il.getInitialState=({experimentalFeatures:e})=>({experimentalFeatures:e});const tx=e=>e.experimentalFeatures,cp=pe([tx],e=>!!(e!=null&&e.preferStrictDomainInLineCharts));let hu=0;const rx=()=>(hu+=1,`mui-chart-${hu}`),Ml=({params:e,store:t})=>(N.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??rx()})}))},[t,e.id]),{});Ml.params={id:!0};Ml.getInitialState=({id:e})=>({id:{chartId:e,providedChartId:e}});const nx=e=>e.id,ax=pe([nx],e=>e.chartId),ox=["#4254FB","#FFB422","#FA4F58","#0DBEFF","#22BF75","#FA83B4","#FF7511"],sx=["#495AFB","#FFC758","#F35865","#30C8FF","#44CE8D","#F286B3","#FF8C39"],up=e=>e==="dark"?sx:ox,dp=({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},ms=({params:e,store:t,seriesConfig:r})=>{const{series:n,dataset:a,theme:o,colors:s}=e,i=N.useRef(!0);return N.useEffect(()=>{if(i.current){i.current=!1;return}t.update(l=>K({},l,{series:K({},l.series,{processedSeries:dp({series:n,colors:typeof s=="function"?s(o):s,seriesConfig:r,dataset:a})})}))},[s,a,n,o,r,t]),{}};ms.params={dataset:!0,series:!0,colors:!0,theme:!0};const ix=[];ms.getDefaultizedParams=({params:e})=>{var t;return K({},e,{series:(t=e.series)!=null&&t.length?e.series:ix,colors:e.colors??up,theme:e.theme??"light"})};ms.getInitialState=({series:e=[],colors:t,theme:r,dataset:n},a,o)=>({series:{seriesConfig:o,processedSeries:dp({series:e,colors:typeof t=="function"?t(r):t,seriesConfig:o,dataset:n})}});const hp=e=>e.series,Ra=pe([hp],e=>e.processedSeries),fs=pe([hp],e=>e.seriesConfig),lx={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 pp{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 lx)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 cx{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 ux{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 dx{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 hx{constructor(t){this.gestureTemplates=new Map,this.elementGestureMap=new Map,this.activeGesturesRegistry=new cx,this.pointerManager=void 0,this.keyboardManager=new ux,this.pointerManager=new dx({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 Aa extends pp{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 px(e,t){const r=t.x-e.x,n=t.y-e.y;return Math.sqrt(r*r+n*n)}function si(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+=px({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 qt(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 Pn(e,t){return`${e}${t==="ongoing"?"":t.charAt(0).toUpperCase()+t.slice(1)}`}const Ja=1e-5,tr=1e-5,pu=.15;function mx(e,t){const r=t.x-e.x,n=t.y-e.y,a={vertical:null,horizontal:null,mainAxis:null},o=fx(t,e),s=Math.abs(r)>Math.abs(n)?"horizontal":"vertical",i=o||s==="horizontal"?Ja:pu,l=o?Ja:s==="horizontal"?pu:Ja;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 fx(e,t){const r=t.x-e.x,n=t.y-e.y,a=Math.atan2(n,r)*180/Math.PI;return a>=-45+tr&&a<=-22.5+tr||a>=22.5+tr&&a<=45+tr||a>=135+tr&&a<=157.5+tr||a>=-157.5+tr&&a<=-135+tr}function gx(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 yx=0,bx=e=>e>yx?1:e<-0?-1:0;class jl extends Aa{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 jl(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||qt(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=Pn(this.name,r),c=new CustomEvent(l,{bubbles:!0,cancelable:!0,detail:i});t.dispatchEvent(c)}}class kl extends Aa{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 kl(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=qt(o),this.state.lastCentroid=K({},this.state.startCentroid));break;case"pointermove":if(this.state.startCentroid&&o.length>=this.minPointers){const s=qt(o),i=s.x-this.state.startCentroid.x,l=s.y-this.state.startCentroid.y,c=Math.sqrt(i*i+l*l),u=mx(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&&gx(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=Pn(this.name,r),y=new CustomEvent(m,{bubbles:!0,cancelable:!0,detail:f});t.dispatchEvent(y),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 $l extends Aa{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 $l(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=si(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=si(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=si(s);this.state.startDistance=i/this.state.lastScale}}break}}emitPinchEvent(t,r,n,a){const o=qt(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:bx(this.state.velocity),customData:this.customData};this.preventDefault&&a.preventDefault(),this.stopPropagation&&a.stopPropagation();const u=Pn(this.name,r),d=new CustomEvent(u,{bubbles:!0,cancelable:!0,detail:c});t.dispatchEvent(d)}}class Ul extends Aa{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 Ul(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=qt(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=qt(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=Pn(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 Ll extends Aa{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 Ll(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=qt(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=qt(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=Pn(this.name,"cancel"),l=new CustomEvent(i,{bubbles:!0,cancelable:!0,detail:s});t.dispatchEvent(l)}this.resetState()}}class Dl extends pp{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 Dl(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?qt(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=Pn(this.name,"ongoing"),i=new CustomEvent(s,{bubbles:!0,cancelable:!0,detail:o});this.element.dispatchEvent(i)}}const Wr=e=>e.preventDefault(),Bl=({svgRef:e})=>{N.useEffect(()=>{const r=e.current;if(!r)return;const n=new hx({gestures:[new kl({name:"pan",threshold:0,maxPointers:1}),new jl({name:"move",preventIf:["pan","pinch"]}),new $l({name:"pinch",threshold:5,preventIf:["pan"]}),new Dl({name:"turnWheel",sensitivity:.01,initialDelta:1}),new Ll({name:"tap",maxDistance:10,preventIf:["pan","pinch"]}),new Ul({name:"quickPress",duration:50,maxDistance:10})]});return n.registerElement(["pan","move","pinch","turnWheel","tap","quickPress"],r),()=>{n.destroy()}},[e]);const t=N.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 N.useEffect(()=>{const r=e.current;return r==null||r.addEventListener("gesturestart",Wr),r==null||r.addEventListener("gesturechange",Wr),r==null||r.addEventListener("gestureend",Wr),()=>{r==null||r.removeEventListener("gesturestart",Wr),r==null||r.removeEventListener("gesturechange",Wr),r==null||r.removeEventListener("gestureend",Wr)}},[e]),{instance:{addInteractionListener:t}}};Bl.params={};Bl.getInitialState=()=>({});const xx=[Ml,Il,ps,ms,Bl,hs],vx=["apiRef"],Sx=e=>{let{plugins:t}=e,r=lr(e.props,vx);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 mu=0;function Ox(e,t,r){const n=ib(),a=N.useMemo(()=>[...xx,...e],[e]),o=Sx({plugins:a,props:t});o.id=o.id??n;const i=N.useRef({}).current,l=Cx(t.apiRef),c=N.useRef(null),u=N.useRef(null),d=N.useRef(null);if(d.current==null){mu+=1;const f={cacheKey:{id:mu}};a.forEach(m=>{m.getInitialState&&Object.assign(f,m.getInitialState(o,f,r))}),d.current=new lb(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:N.useMemo(()=>({store:d.current,publicAPI:l.current,instance:i,svgRef:u,chartRootRef:c}),[i,l])}}function wx(e){return e.current==null&&(e.current={}),e}function Cx(e){const t=N.useRef({});return e?wx(e):t}const Nl=N.createContext(null);process.env.NODE_ENV!=="production"&&(Nl.displayName="ChartContext");const fu=new Set;function da(e,t="warning"){if(process.env.NODE_ENV==="production")return;const r=Array.isArray(e)?e.join(`
116
- `):e;fu.has(r)||(fu.add(r),t==="error"?console.error(r):console.warn(r))}function Px(e){const{componentName:t,propName:r,controlled:n,defaultValue:a,warningPrefix:o="MUI X"}=e,[{initialDefaultValue:s,isControlled:i}]=N.useState({initialDefaultValue:a,isControlled:n!==void 0});i!==(n!==void 0)&&da([`${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)&&da([`${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 mp=process.env.NODE_ENV==="production"?()=>{}:Px,fp=4,gp=20+2*fp,Tx=40+2*fp,Rx="hover",Ya={minStart:0,maxEnd:100,step:5,minSpan:10,maxSpan:100,panning:!0,filterMode:"keep",slider:{enabled:!1,preview:!1,size:gp,showTooltip:Rx}},Fl=(e,t,r)=>{var n;if(e)return e===!0?K({axisId:t,axisDirection:r},Ya):K({axisId:t,axisDirection:r},Ya,e,{slider:K({},Ya.slider,{size:((n=e.slider)==null?void 0:n.preview)??Ya.slider.preview?Tx:gp},e.slider)})};function yp(e,t){const r={top:0,bottom:0,none:0};return(e&&e.length>0?e:[{id:Lb,scaleType:"linear"}]).map((o,s)=>{var p;const i=o.dataKey,l=s===0?"bottom":"none",c=o.position??l,u=Fb+(o.label?op:0),d=o.id??`defaultized-x-axis-${s}`,h=K({offset:r[c]},o,{id:d,position:c,height:o.height??u,zoom:Fl(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 bp(e,t){const r={right:0,left:0,none:0};return(e&&e.length>0?e:[{id:Db,scaleType:"linear"}]).map((o,s)=>{var p;const i=o.dataKey,l=s===0?"left":"none",c=o.position??l,u=Nb+(o.label?op:0),d=o.id??`defaultized-y-axis-${s}`,h=K({offset:r[c]},o,{id:d,position:c,width:o.width??u,zoom:Fl(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 yo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Ax(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function zl(e){let t,r,n;e.length!==2?(t=yo,r=(i,l)=>yo(e(i),l),n=(i,l)=>e(i)-l):(t=e===yo||e===Ax?e:_x,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 _x(){return 0}function Ex(e){return e===null?NaN:+e}const Vx=zl(yo),xp=Vx.right;zl(Ex).center;class gu extends Map{constructor(t,r=jx){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(yu(this,t))}has(t){return super.has(yu(this,t))}set(t,r){return super.set(Ix(this,t),r)}delete(t){return super.delete(Mx(this,t))}}function yu({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function Ix({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function Mx({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function jx(e){return e!==null&&typeof e=="object"?e.valueOf():e}const kx=Math.sqrt(50),$x=Math.sqrt(10),Ux=Math.sqrt(2);function Vo(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>=kx?10:o>=$x?5:o>=Ux?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?Vo(e,t,r*2):[i,l,c]}function zi(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?Vo(t,e,r):Vo(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 Gi(e,t,r){return t=+t,e=+e,r=+r,Vo(e,t,r)[2]}function Hi(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?Gi(t,e,r):Gi(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function Lx(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 pr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Dx(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 bu=Symbol("implicit");function Io(){var e=new gu,t=[],r=[],n=bu;function a(o){let s=e.get(o);if(s===void 0){if(n!==bu)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 gu;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 Io(t,r).unknown(n)},pr.apply(a,arguments),a}function Gl(){var e=Io().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 y=Lx(h).map(function(S){return f+o*S});return r(p?y.reverse():y)}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 Gl(t(),[n,a]).round(i).paddingInner(l).paddingOuter(c).align(u)},pr.apply(d(),arguments)}function vp(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return vp(t())},e}function Bx(){return vp(Gl.apply(null,arguments).paddingInner(1))}function Hl(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Sp(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function _a(){}var ha=.7,Mo=1/ha,cn="\\s*([+-]?\\d+)\\s*",pa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",jt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Nx=/^#([0-9a-f]{3,8})$/,Fx=new RegExp(`^rgb\\(${cn},${cn},${cn}\\)$`),zx=new RegExp(`^rgb\\(${jt},${jt},${jt}\\)$`),Gx=new RegExp(`^rgba\\(${cn},${cn},${cn},${pa}\\)$`),Hx=new RegExp(`^rgba\\(${jt},${jt},${jt},${pa}\\)$`),qx=new RegExp(`^hsl\\(${pa},${jt},${jt}\\)$`),Wx=new RegExp(`^hsla\\(${pa},${jt},${jt},${pa}\\)$`),xu={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};Hl(_a,ma,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:vu,formatHex:vu,formatHex8:Jx,formatHsl:Yx,formatRgb:Su,toString:Su});function vu(){return this.rgb().formatHex()}function Jx(){return this.rgb().formatHex8()}function Yx(){return Op(this).formatHsl()}function Su(){return this.rgb().formatRgb()}function ma(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Nx.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Ou(t):r===3?new it(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Ka(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Ka(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=Fx.exec(e))?new it(t[1],t[2],t[3],1):(t=zx.exec(e))?new it(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Gx.exec(e))?Ka(t[1],t[2],t[3],t[4]):(t=Hx.exec(e))?Ka(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=qx.exec(e))?Pu(t[1],t[2]/100,t[3]/100,1):(t=Wx.exec(e))?Pu(t[1],t[2]/100,t[3]/100,t[4]):xu.hasOwnProperty(e)?Ou(xu[e]):e==="transparent"?new it(NaN,NaN,NaN,0):null}function Ou(e){return new it(e>>16&255,e>>8&255,e&255,1)}function Ka(e,t,r,n){return n<=0&&(e=t=r=NaN),new it(e,t,r,n)}function Kx(e){return e instanceof _a||(e=ma(e)),e?(e=e.rgb(),new it(e.r,e.g,e.b,e.opacity)):new it}function qi(e,t,r,n){return arguments.length===1?Kx(e):new it(e,t,r,n??1)}function it(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Hl(it,qi,Sp(_a,{brighter(e){return e=e==null?Mo:Math.pow(Mo,e),new it(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ha:Math.pow(ha,e),new it(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new it(wr(this.r),wr(this.g),wr(this.b),jo(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:wu,formatHex:wu,formatHex8:Qx,formatRgb:Cu,toString:Cu}));function wu(){return`#${xr(this.r)}${xr(this.g)}${xr(this.b)}`}function Qx(){return`#${xr(this.r)}${xr(this.g)}${xr(this.b)}${xr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Cu(){const e=jo(this.opacity);return`${e===1?"rgb(":"rgba("}${wr(this.r)}, ${wr(this.g)}, ${wr(this.b)}${e===1?")":`, ${e})`}`}function jo(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function wr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function xr(e){return e=wr(e),(e<16?"0":"")+e.toString(16)}function Pu(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ot(e,t,r,n)}function Op(e){if(e instanceof Ot)return new Ot(e.h,e.s,e.l,e.opacity);if(e instanceof _a||(e=ma(e)),!e)return new Ot;if(e instanceof Ot)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 Ot(s,i,l,e.opacity)}function Xx(e,t,r,n){return arguments.length===1?Op(e):new Ot(e,t,r,n??1)}function Ot(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Hl(Ot,Xx,Sp(_a,{brighter(e){return e=e==null?Mo:Math.pow(Mo,e),new Ot(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ha:Math.pow(ha,e),new Ot(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 it(ii(e>=240?e-240:e+120,a,n),ii(e,a,n),ii(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new Ot(Tu(this.h),Qa(this.s),Qa(this.l),jo(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=jo(this.opacity);return`${e===1?"hsl(":"hsla("}${Tu(this.h)}, ${Qa(this.s)*100}%, ${Qa(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Tu(e){return e=(e||0)%360,e<0?e+360:e}function Qa(e){return Math.max(0,Math.min(1,e||0))}function ii(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 ql=e=>()=>e;function Zx(e,t){return function(r){return e+r*t}}function ev(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 tv(e){return(e=+e)==1?wp:function(t,r){return r-t?ev(t,r,e):ql(isNaN(t)?r:t)}}function wp(e,t){var r=t-e;return r?Zx(e,r):ql(isNaN(e)?t:e)}const Ru=function e(t){var r=tv(t);function n(a,o){var s=r((a=qi(a)).r,(o=qi(o)).r),i=r(a.g,o.g),l=r(a.b,o.b),c=wp(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 rv(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 nv(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function av(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]=gs(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 Wl(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function wt(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function ov(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]=gs(e[a],t[a]):n[a]=t[a];return function(o){for(a in r)n[a]=r[a](o);return n}}var Wi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,li=new RegExp(Wi.source,"g");function sv(e){return function(){return e}}function iv(e){return function(t){return e(t)+""}}function lv(e,t){var r=Wi.lastIndex=li.lastIndex=0,n,a,o,s=-1,i=[],l=[];for(e=e+"",t=t+"";(n=Wi.exec(e))&&(a=li.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:wt(n,a)})),r=li.lastIndex;return r<t.length&&(o=t.slice(r),i[s]?i[s]+=o:i[++s]=o),i.length<2?l[0]?iv(l[0].x):sv(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 gs(e,t){var r=typeof t,n;return t==null||r==="boolean"?ql(t):(r==="number"?wt:r==="string"?(n=ma(t))?(t=n,Ru):lv:t instanceof ma?Ru:t instanceof Date?Wl:nv(t)?rv:Array.isArray(t)?av:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?ov:wt)(e,t)}function Cp(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function cv(e){return function(){return e}}function uv(e){return+e}var Au=[0,1];function gt(e){return e}function Ji(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:cv(isNaN(t)?NaN:.5)}function dv(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function hv(e,t,r){var n=e[0],a=e[1],o=t[0],s=t[1];return a<n?(n=Ji(a,n),o=r(s,o)):(n=Ji(n,a),o=r(o,s)),function(i){return o(n(i))}}function pv(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]=Ji(e[s],e[s+1]),o[s]=r(t[s],t[s+1]);return function(i){var l=xp(e,i,1,n)-1;return o[l](a[l](i))}}function ys(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Jl(){var e=Au,t=Au,r=gs,n,a,o,s=gt,i,l,c;function u(){var h=Math.min(e.length,t.length);return s!==gt&&(s=dv(e[0],e[h-1])),i=h>2?pv:hv,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),wt)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,uv),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=Cp,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 Pp(){return Jl()(gt,gt)}function mv(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function ko(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 mn(e){return e=ko(Math.abs(e)),e?e[1]:NaN}function fv(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 gv(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var yv=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function fa(e){if(!(t=yv.exec(e)))throw new Error("invalid format: "+e);var t;return new Yl({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]})}fa.prototype=Yl.prototype;function Yl(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+""}Yl.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 bv(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 Tp;function xv(e,t){var r=ko(e,t);if(!r)return e+"";var n=r[0],a=r[1],o=a-(Tp=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")+ko(e,Math.max(0,t+o-1))[0]}function _u(e,t){var r=ko(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 Eu={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:mv,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)=>_u(e*100,t),r:_u,s:xv,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Vu(e){return e}var Iu=Array.prototype.map,Mu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function vv(e){var t=e.grouping===void 0||e.thousands===void 0?Vu:fv(Iu.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?Vu:gv(Iu.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=fa(d);var h=d.fill,p=d.align,f=d.sign,m=d.symbol,y=d.zero,S=d.width,E=d.comma,O=d.precision,w=d.trim,T=d.type;T==="n"?(E=!0,T="g"):Eu[T]||(O===void 0&&(O=12),w=!0,T="g"),(y||h==="0"&&p==="=")&&(y=!0,h="0",p="=");var P=m==="$"?r:m==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():"",C=m==="$"?n:/[%p]/.test(T)?s:"",I=Eu[T],z=/[defgprs%]/.test(T);O=O===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function b(A){var G=P,_=C,F,re,ee;if(T==="c")_=I(A)+_,A="";else{A=+A;var ae=A<0||1/A<0;if(A=isNaN(A)?l:I(Math.abs(A),O),w&&(A=bv(A)),ae&&+A==0&&f!=="+"&&(ae=!1),G=(ae?f==="("?f:i:f==="-"||f==="("?"":f)+G,_=(T==="s"?Mu[8+Tp/3]:"")+_+(ae&&f==="("?")":""),z){for(F=-1,re=A.length;++F<re;)if(ee=A.charCodeAt(F),48>ee||ee>57){_=(ee===46?a+A.slice(F+1):A.slice(F))+_,A=A.slice(0,F);break}}}E&&!y&&(A=t(A,1/0));var te=G.length+A.length+_.length,se=te<S?new Array(S-te+1).join(h):"";switch(E&&y&&(A=t(se+A,se.length?S-_.length:1/0),se=""),p){case"<":A=G+A+_+se;break;case"=":A=G+se+A+_;break;case"^":A=se.slice(0,te=se.length>>1)+G+A+_+se.slice(te);break;default:A=se+G+A+_;break}return o(A)}return b.toString=function(){return d+""},b}function u(d,h){var p=c((d=fa(d),d.type="f",d)),f=Math.max(-8,Math.min(8,Math.floor(mn(h)/3)))*3,m=Math.pow(10,-f),y=Mu[8+f/3];return function(S){return p(m*S)+y}}return{format:c,formatPrefix:u}}var Xa,Kl,Rp;Sv({thousands:",",grouping:[3],currency:["$",""]});function Sv(e){return Xa=vv(e),Kl=Xa.format,Rp=Xa.formatPrefix,Xa}function Ov(e){return Math.max(0,-mn(Math.abs(e)))}function wv(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(mn(t)/3)))*3-mn(Math.abs(e)))}function Cv(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,mn(t)-mn(e))+1}function Pv(e,t,r,n){var a=Hi(e,t,r),o;switch(n=fa(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=wv(a,s))&&(n.precision=o),Rp(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=Cv(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=Ov(a))&&(n.precision=o-(n.type==="%")*2);break}}return Kl(n)}function Ql(e){var t=e.domain;return e.ticks=function(r){var n=t();return zi(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return Pv(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=Gi(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 Ap(){var e=Pp();return e.copy=function(){return ys(e,Ap())},pr.apply(e,arguments),Ql(e)}function _p(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 ju(e){return Math.log(e)}function ku(e){return Math.exp(e)}function Tv(e){return-Math.log(-e)}function Rv(e){return-Math.exp(-e)}function Av(e){return isFinite(e)?+("1e"+e):e<0?0:e}function _v(e){return e===10?Av:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Ev(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 $u(e){return(t,r)=>-e(-t,r)}function Vv(e){const t=e(ju,ku),r=t.domain;let n=10,a,o;function s(){return a=Ev(n),o=_v(n),r()[0]<0?(a=$u(a),o=$u(o),e(Tv,Rv)):e(ju,ku),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 y=i==null?10:+i;let S=[];if(!(n%1)&&p-h<y){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<y&&(S=zi(c,u,y))}else S=zi(h,p,Math.min(p-h,y)).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=fa(l)).precision==null&&(l.trim=!0),l=Kl(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(_p(r(),{floor:i=>o(Math.floor(a(i))),ceil:i=>o(Math.ceil(a(i)))})),t}function Ep(){const e=Vv(Jl()).domain([1,10]);return e.copy=()=>ys(e,Ep()).base(e.base()),pr.apply(e,arguments),e}function Uu(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Iv(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Mv(e){return e<0?-e*e:e*e}function jv(e){var t=e(gt,gt),r=1;function n(){return r===1?e(gt,gt):r===.5?e(Iv,Mv):e(Uu(r),Uu(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},Ql(t)}function Xl(){var e=jv(Jl());return e.copy=function(){return ys(e,Xl()).exponent(e.exponent())},pr.apply(e,arguments),e}function kv(){return Xl.apply(null,arguments).exponent(.5)}function Vp(){var e=[.5],t=[0,1],r,n=1;function a(o){return o!=null&&o<=o?t[xp(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 Vp().domain(e).range(t).unknown(r)},pr.apply(a,arguments)}const ci=new Date,ui=new Date;function ze(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=>ze(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)=>(ci.setTime(+o),ui.setTime(+s),e(ci),e(ui),Math.floor(r(ci,ui))),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 $o=ze(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);$o.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?ze(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):$o);$o.range;const Ft=1e3,yt=Ft*60,zt=yt*60,Wt=zt*24,Zl=Wt*7,Lu=Wt*30,di=Wt*365,vr=ze(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ft)},(e,t)=>(t-e)/Ft,e=>e.getUTCSeconds());vr.range;const ec=ze(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ft)},(e,t)=>{e.setTime(+e+t*yt)},(e,t)=>(t-e)/yt,e=>e.getMinutes());ec.range;const tc=ze(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*yt)},(e,t)=>(t-e)/yt,e=>e.getUTCMinutes());tc.range;const rc=ze(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ft-e.getMinutes()*yt)},(e,t)=>{e.setTime(+e+t*zt)},(e,t)=>(t-e)/zt,e=>e.getHours());rc.range;const nc=ze(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*zt)},(e,t)=>(t-e)/zt,e=>e.getUTCHours());nc.range;const Ea=ze(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*yt)/Wt,e=>e.getDate()-1);Ea.range;const bs=ze(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Wt,e=>e.getUTCDate()-1);bs.range;const Ip=ze(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Wt,e=>Math.floor(e/Wt));Ip.range;function Vr(e){return ze(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)/Zl)}const xs=Vr(0),Uo=Vr(1),$v=Vr(2),Uv=Vr(3),fn=Vr(4),Lv=Vr(5),Dv=Vr(6);xs.range;Uo.range;$v.range;Uv.range;fn.range;Lv.range;Dv.range;function Ir(e){return ze(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)/Zl)}const vs=Ir(0),Lo=Ir(1),Bv=Ir(2),Nv=Ir(3),gn=Ir(4),Fv=Ir(5),zv=Ir(6);vs.range;Lo.range;Bv.range;Nv.range;gn.range;Fv.range;zv.range;const ac=ze(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());ac.range;const oc=ze(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());oc.range;const Jt=ze(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());Jt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ze(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)});Jt.range;const Yt=ze(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());Yt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ze(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)});Yt.range;function Mp(e,t,r,n,a,o){const s=[[vr,1,Ft],[vr,5,5*Ft],[vr,15,15*Ft],[vr,30,30*Ft],[o,1,yt],[o,5,5*yt],[o,15,15*yt],[o,30,30*yt],[a,1,zt],[a,3,3*zt],[a,6,6*zt],[a,12,12*zt],[n,1,Wt],[n,2,2*Wt],[r,1,Zl],[t,1,Lu],[t,3,3*Lu],[e,1,di]];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=zl(([,,y])=>y).right(s,h);if(p===s.length)return e.every(Hi(c/di,u/di,d));if(p===0)return $o.every(Math.max(Hi(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[Gv,Hv]=Mp(Yt,oc,vs,Ip,nc,tc),[qv,Wv]=Mp(Jt,ac,xs,Ea,rc,ec);function hi(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 pi(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 Dn(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function Jv(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=Bn(a),u=Nn(a),d=Bn(o),h=Nn(o),p=Bn(s),f=Nn(s),m=Bn(i),y=Nn(i),S=Bn(l),E=Nn(l),O={a:ae,A:te,b:se,B:W,c:null,d:Gu,e:Gu,f:y1,g:R1,G:_1,H:m1,I:f1,j:g1,L:jp,m:b1,M:x1,p:X,q:ue,Q:Wu,s:Ju,S:v1,u:S1,U:O1,V:w1,w:C1,W:P1,x:null,X:null,y:T1,Y:A1,Z:E1,"%":qu},w={a:ve,A:Ue,b:we,B:ct,c:null,d:Hu,e:Hu,f:j1,g:G1,G:q1,H:V1,I:I1,j:M1,L:$p,m:k1,M:$1,p:rt,q:be,Q:Wu,s:Ju,S:U1,u:L1,U:D1,V:B1,w:N1,W:F1,x:null,X:null,y:z1,Y:H1,Z:W1,"%":qu},T={a:b,A,b:G,B:_,c:F,d:Fu,e:Fu,f:u1,g:Nu,G:Bu,H:zu,I:zu,j:s1,L:c1,m:o1,M:i1,p:z,q:a1,Q:h1,s:p1,S:l1,u:Zv,U:e1,V:t1,w:Xv,W:r1,x:re,X:ee,y:Nu,Y:Bu,Z:n1,"%":d1};O.x=P(r,O),O.X=P(n,O),O.c=P(t,O),w.x=P(r,w),w.X=P(n,w),w.c=P(t,w);function P(Z,oe){return function(ce){var Y=[],xe=-1,me=0,We=Z.length,Ge,Me,er;for(ce instanceof Date||(ce=new Date(+ce));++xe<We;)Z.charCodeAt(xe)===37&&(Y.push(Z.slice(me,xe)),(Me=Du[Ge=Z.charAt(++xe)])!=null?Ge=Z.charAt(++xe):Me=Ge==="e"?" ":"0",(er=oe[Ge])&&(Ge=er(ce,Me)),Y.push(Ge),me=xe+1);return Y.push(Z.slice(me,xe)),Y.join("")}}function C(Z,oe){return function(ce){var Y=Dn(1900,void 0,1),xe=I(Y,Z,ce+="",0),me,We;if(xe!=ce.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(oe&&!("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?(me=pi(Dn(Y.y,0,1)),We=me.getUTCDay(),me=We>4||We===0?Lo.ceil(me):Lo(me),me=bs.offset(me,(Y.V-1)*7),Y.y=me.getUTCFullYear(),Y.m=me.getUTCMonth(),Y.d=me.getUTCDate()+(Y.w+6)%7):(me=hi(Dn(Y.y,0,1)),We=me.getDay(),me=We>4||We===0?Uo.ceil(me):Uo(me),me=Ea.offset(me,(Y.V-1)*7),Y.y=me.getFullYear(),Y.m=me.getMonth(),Y.d=me.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),We="Z"in Y?pi(Dn(Y.y,0,1)).getUTCDay():hi(Dn(Y.y,0,1)).getDay(),Y.m=0,Y.d="W"in Y?(Y.w+6)%7+Y.W*7-(We+5)%7:Y.w+Y.U*7-(We+6)%7);return"Z"in Y?(Y.H+=Y.Z/100|0,Y.M+=Y.Z%100,pi(Y)):hi(Y)}}function I(Z,oe,ce,Y){for(var xe=0,me=oe.length,We=ce.length,Ge,Me;xe<me;){if(Y>=We)return-1;if(Ge=oe.charCodeAt(xe++),Ge===37){if(Ge=oe.charAt(xe++),Me=T[Ge in Du?oe.charAt(xe++):Ge],!Me||(Y=Me(Z,ce,Y))<0)return-1}else if(Ge!=ce.charCodeAt(Y++))return-1}return Y}function z(Z,oe,ce){var Y=c.exec(oe.slice(ce));return Y?(Z.p=u.get(Y[0].toLowerCase()),ce+Y[0].length):-1}function b(Z,oe,ce){var Y=p.exec(oe.slice(ce));return Y?(Z.w=f.get(Y[0].toLowerCase()),ce+Y[0].length):-1}function A(Z,oe,ce){var Y=d.exec(oe.slice(ce));return Y?(Z.w=h.get(Y[0].toLowerCase()),ce+Y[0].length):-1}function G(Z,oe,ce){var Y=S.exec(oe.slice(ce));return Y?(Z.m=E.get(Y[0].toLowerCase()),ce+Y[0].length):-1}function _(Z,oe,ce){var Y=m.exec(oe.slice(ce));return Y?(Z.m=y.get(Y[0].toLowerCase()),ce+Y[0].length):-1}function F(Z,oe,ce){return I(Z,t,oe,ce)}function re(Z,oe,ce){return I(Z,r,oe,ce)}function ee(Z,oe,ce){return I(Z,n,oe,ce)}function ae(Z){return s[Z.getDay()]}function te(Z){return o[Z.getDay()]}function se(Z){return l[Z.getMonth()]}function W(Z){return i[Z.getMonth()]}function X(Z){return a[+(Z.getHours()>=12)]}function ue(Z){return 1+~~(Z.getMonth()/3)}function ve(Z){return s[Z.getUTCDay()]}function Ue(Z){return o[Z.getUTCDay()]}function we(Z){return l[Z.getUTCMonth()]}function ct(Z){return i[Z.getUTCMonth()]}function rt(Z){return a[+(Z.getUTCHours()>=12)]}function be(Z){return 1+~~(Z.getUTCMonth()/3)}return{format:function(Z){var oe=P(Z+="",O);return oe.toString=function(){return Z},oe},parse:function(Z){var oe=C(Z+="",!1);return oe.toString=function(){return Z},oe},utcFormat:function(Z){var oe=P(Z+="",w);return oe.toString=function(){return Z},oe},utcParse:function(Z){var oe=C(Z+="",!0);return oe.toString=function(){return Z},oe}}}var Du={"-":"",_:" ",0:"0"},qe=/^\s*\d+/,Yv=/^%/,Kv=/[\\^$*+?|[\]().{}]/g;function ge(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 Qv(e){return e.replace(Kv,"\\$&")}function Bn(e){return new RegExp("^(?:"+e.map(Qv).join("|")+")","i")}function Nn(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function Xv(e,t,r){var n=qe.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function Zv(e,t,r){var n=qe.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function e1(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function t1(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function r1(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Bu(e,t,r){var n=qe.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Nu(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function n1(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 a1(e,t,r){var n=qe.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function o1(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Fu(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function s1(e,t,r){var n=qe.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function zu(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function i1(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function l1(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function c1(e,t,r){var n=qe.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function u1(e,t,r){var n=qe.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function d1(e,t,r){var n=Yv.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function h1(e,t,r){var n=qe.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function p1(e,t,r){var n=qe.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Gu(e,t){return ge(e.getDate(),t,2)}function m1(e,t){return ge(e.getHours(),t,2)}function f1(e,t){return ge(e.getHours()%12||12,t,2)}function g1(e,t){return ge(1+Ea.count(Jt(e),e),t,3)}function jp(e,t){return ge(e.getMilliseconds(),t,3)}function y1(e,t){return jp(e,t)+"000"}function b1(e,t){return ge(e.getMonth()+1,t,2)}function x1(e,t){return ge(e.getMinutes(),t,2)}function v1(e,t){return ge(e.getSeconds(),t,2)}function S1(e){var t=e.getDay();return t===0?7:t}function O1(e,t){return ge(xs.count(Jt(e)-1,e),t,2)}function kp(e){var t=e.getDay();return t>=4||t===0?fn(e):fn.ceil(e)}function w1(e,t){return e=kp(e),ge(fn.count(Jt(e),e)+(Jt(e).getDay()===4),t,2)}function C1(e){return e.getDay()}function P1(e,t){return ge(Uo.count(Jt(e)-1,e),t,2)}function T1(e,t){return ge(e.getFullYear()%100,t,2)}function R1(e,t){return e=kp(e),ge(e.getFullYear()%100,t,2)}function A1(e,t){return ge(e.getFullYear()%1e4,t,4)}function _1(e,t){var r=e.getDay();return e=r>=4||r===0?fn(e):fn.ceil(e),ge(e.getFullYear()%1e4,t,4)}function E1(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ge(t/60|0,"0",2)+ge(t%60,"0",2)}function Hu(e,t){return ge(e.getUTCDate(),t,2)}function V1(e,t){return ge(e.getUTCHours(),t,2)}function I1(e,t){return ge(e.getUTCHours()%12||12,t,2)}function M1(e,t){return ge(1+bs.count(Yt(e),e),t,3)}function $p(e,t){return ge(e.getUTCMilliseconds(),t,3)}function j1(e,t){return $p(e,t)+"000"}function k1(e,t){return ge(e.getUTCMonth()+1,t,2)}function $1(e,t){return ge(e.getUTCMinutes(),t,2)}function U1(e,t){return ge(e.getUTCSeconds(),t,2)}function L1(e){var t=e.getUTCDay();return t===0?7:t}function D1(e,t){return ge(vs.count(Yt(e)-1,e),t,2)}function Up(e){var t=e.getUTCDay();return t>=4||t===0?gn(e):gn.ceil(e)}function B1(e,t){return e=Up(e),ge(gn.count(Yt(e),e)+(Yt(e).getUTCDay()===4),t,2)}function N1(e){return e.getUTCDay()}function F1(e,t){return ge(Lo.count(Yt(e)-1,e),t,2)}function z1(e,t){return ge(e.getUTCFullYear()%100,t,2)}function G1(e,t){return e=Up(e),ge(e.getUTCFullYear()%100,t,2)}function H1(e,t){return ge(e.getUTCFullYear()%1e4,t,4)}function q1(e,t){var r=e.getUTCDay();return e=r>=4||r===0?gn(e):gn.ceil(e),ge(e.getUTCFullYear()%1e4,t,4)}function W1(){return"+0000"}function qu(){return"%"}function Wu(e){return+e}function Ju(e){return Math.floor(+e/1e3)}var Jr,Lp,Dp;J1({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 J1(e){return Jr=Jv(e),Lp=Jr.format,Jr.parse,Dp=Jr.utcFormat,Jr.utcParse,Jr}function Y1(e){return new Date(e)}function K1(e){return e instanceof Date?+e:+new Date(+e)}function sc(e,t,r,n,a,o,s,i,l,c){var u=Pp(),d=u.invert,h=u.domain,p=c(".%L"),f=c(":%S"),m=c("%I:%M"),y=c("%I %p"),S=c("%a %d"),E=c("%b %d"),O=c("%B"),w=c("%Y");function T(P){return(l(P)<P?p:i(P)<P?f:s(P)<P?m:o(P)<P?y:n(P)<P?a(P)<P?S:E:r(P)<P?O:w)(P)}return u.invert=function(P){return new Date(d(P))},u.domain=function(P){return arguments.length?h(Array.from(P,K1)):h().map(Y1)},u.ticks=function(P){var C=h();return e(C[0],C[C.length-1],P??10)},u.tickFormat=function(P,C){return C==null?T:c(C)},u.nice=function(P){var C=h();return(!P||typeof P.range!="function")&&(P=t(C[0],C[C.length-1],P??10)),P?h(_p(C,P)):u},u.copy=function(){return ys(u,sc(e,t,r,n,a,o,s,i,l,c))},u}function Bp(){return pr.apply(sc(qv,Wv,Jt,ac,xs,Ea,rc,ec,vr,Lp).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Q1(){return pr.apply(sc(Gv,Hv,Yt,oc,vs,bs,nc,tc,vr,Dp).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function X1(){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(gs),c.rangeRound=u(Cp),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 Z1(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Np(){var e=Ql(X1()(gt));return e.copy=function(){return Z1(e,Np())},Dx.apply(e,arguments)}function eS(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 tS(e){return e.scaleType==="band"}function rS(e){return e.scaleType==="point"}function nS(e){return e.type==="piecewise"?Vp(e.thresholds,e.colors):Np([e.min??0,e.max??100],e.color)}function Do(e){return e.values?Io(e.values,e.colors).unknown(e.unknownColor??null):Io(e.colors.map((t,r)=>r),e.colors).unknown(e.unknownColor??null)}function bo(e){return e.type==="ordinal"?Do(e):nS(e)}function aS(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 oS(e,t){return t[1]-t[0]===0?1:e/((t[1]-t[0])/100)}function Yi(e,t,r){switch(e){case"log":return Ep(t,r);case"pow":return Xl(t,r);case"sqrt":return kv(t,r);case"time":return Bp(t,r);case"utc":return Q1(t,r);default:return Ap(t,r)}}const Yu=e=>(e==null?void 0:e[0])instanceof Date;function Ku(e,t){const r=Bp(e.data,t);return(n,{location:a})=>a==="tick"?r.tickFormat(e.tickNumber)(n):`${n.toLocaleString()}`}const mi=(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 Qu,Xu;class sS{constructor(){if(this.types=new Set,Qu)throw new Error("You can only create one instance!");Qu=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}class iS{constructor(){if(this.types=new Set,Xu)throw new Error("You can only create one instance!");Xu=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}const Ss=new sS;Ss.addType("bar");Ss.addType("line");Ss.addType("scatter");const lS=new iS;lS.addType("radar");function Fp(e){return Ss.getTypes().has(e)}const cS=(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)]},zp=(e,t,r,n,a,o)=>{const i=Object.keys(r).filter(Fp).reduce((l,c)=>cS(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},uS=(e,t,r,n)=>{const a=new Set;return Object.keys(t).filter(Fp).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},dS=(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 hS(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 pS=.2,mS=.1;function Gp({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=uS(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),y=m?[m.start,m.end]:[0,100],S=hS(e,a,p),[E,O]=zp(p,a,n,h,t,m===void 0&&!f?i:void 0),w=!p.ignoreTooltip&&c.has(p.id),T=p.data??[];if(tS(p)){const ae=p.categoryGapRatio??pS,te=p.barGapRatio??mS,se=a==="y"?[S[1],S[0]]:S,W=mi(se,y);if(u[p.id]=K({offset:0,height:0,categoryGapRatio:ae,barGapRatio:te,triggerTooltip:w},p,{data:T,scale:Gl(p.data,W).paddingInner(ae).paddingOuter(ae/2),tickNumber:p.data.length,colorScale:p.colorMap&&(p.colorMap.type==="ordinal"?Do(K({values:p.data},p.colorMap)):bo(p.colorMap))}),Yu(p.data)){const X=Ku(p,se);u[p.id].valueFormatter=p.valueFormatter??X}}if(rS(p)){const ae=a==="y"?[...S].reverse():S,te=mi(ae,y);if(u[p.id]=K({offset:0,height:0,triggerTooltip:w},p,{data:T,scale:Bx(p.data,te),tickNumber:p.data.length,colorScale:p.colorMap&&(p.colorMap.type==="ordinal"?Do(K({values:p.data},p.colorMap)):bo(p.colorMap))}),Yu(p.data)){const se=Ku(p,ae);u[p.id].valueFormatter=p.valueFormatter??se}}if(p.scaleType==="band"||p.scaleType==="point")return;const P=p.scaleType??"linear",C=l?dS(p,a,h,t):p.domainLimit??"nice",I=[p.min??E,p.max??O];if(typeof C=="function"){const{min:ae,max:te}=C(E,O);I[0]=ae,I[1]=te}const z=aS(K({},p,{range:S,domain:I})),b=oS(z,y),A=mi(S,y),G=Yi(P,I,A),_=C==="nice"?G.nice(z):G,[F,re]=_.domain(),ee=[p.min??F,p.max??re];u[p.id]=K({offset:0,height:0,triggerTooltip:w},p,{data:T,scaleType:P,scale:_.domain(ee),tickNumber:b,colorScale:p.colorMap&&bo(p.colorMap),valueFormatter:p.valueFormatter??eS(b,Yi(P,S.map(ae=>G.invert(ae)),S))})}),{axis:u,axisIds:r.map(({id:d})=>d)}}function fS(e){return e!=null}function Hp({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:a}){return(o,s)=>{var y;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,(((y=o.data)==null?void 0:y.length)??1)-1]:c=zp(o,a,r,s,n);let d,h;[d,h]=Yi(!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 gS=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(fS).every(d=>d(o,s))},Zu=e=>(t=[])=>t.reduce((r,n)=>{const{zoom:a,id:o}=n,s=Fl(a,o,e);return s&&(r[o]=s),r},{}),yS=e=>{const t=new Map;return e.forEach(r=>{t.set(r.axisId,r)}),t},qp=e=>e.zoom;pe([qp],e=>e==null?void 0:e.isInteracting);const Os=pe([qp],e=>(e==null?void 0:e.zoomData)&&yS(e==null?void 0:e.zoomData)),Va=pe([wn,Cn],(e,t)=>K({},Zu("x")(e),Zu("y")(t)));pe([Va,(e,t)=>t],(e,t)=>e[t]);const bS=pe([Os,Va,fs,Ra],(e,t,r,n)=>e&&t&&Hp({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:"x"})),xS=pe([Os,Va,fs,Ra],(e,t,r,n)=>e&&t&&Hp({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:"y"})),Wp=pe([bS,xS,wn,Cn],(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 gS(K({},a,o))}),Mr=pe([wn,Ta,Ra,fs,Os,Va,Wp,cp],(e,t,r,n,a,o,s,i)=>Gp({drawingArea:t,formattedSeries:r,axis:e,seriesConfig:n,axisDirection:"x",zoomMap:a,zoomOptions:o,getFilters:s,preferStrictDomainInLineCharts:i})),jr=pe([Cn,Ta,Ra,fs,Os,Va,Wp,cp],(e,t,r,n,a,o,s,i)=>Gp({drawingArea:t,formattedSeries:r,axis:e,seriesConfig:n,axisDirection:"y",zoomMap:a,zoomOptions:o,getFilters:s,preferStrictDomainInLineCharts:i}));pe([Mr,jr,(e,t)=>t],(e,t,r)=>(e==null?void 0:e.axis[r])??(t==null?void 0:t.axis[r]));pe([wn,Cn,(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 Jp(e){return e.bandwidth!==void 0}function Yr(e){return e instanceof Date?e.getTime():e}function yn(e,t){const{scale:r,data:n,reverse:a}=e;if(!Jp(r)){const s=r.invert(t);if(n===void 0)return-1;const i=Yr(s);return n==null?void 0:n.findIndex((c,u)=>{const d=Yr(c);return d>i&&(u===0||Math.abs(i-d)<=Math.abs(i-Yr(n[u-1])))||d<=i&&(u===n.length-1||Math.abs(Yr(s)-d)<Math.abs(Yr(s)-Yr(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 ed(e,t,r){const{scale:n,data:a}=e;if(!Jp(n)){const o=n.invert(t);return r<0?o:a[r]}return r<0||r>=a.length?null:a[r]}function td(e,t){const r=e.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r.matrixTransform(e.getScreenCTM().inverse())}function Gt(e){const t=N.useRef(e);return kt(()=>{t.current=e}),N.useRef((...r)=>(0,t.current)(...r)).current}const vS=Object.is;function Yp(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,!vS(e[a],t[a])||!(a in t))return!1;for(const a in t)n+=1;return r===n}const ic=({store:e})=>{const t=Gt(function(){e.update(s=>K({},s,{interaction:{pointer:null,item:null}}))}),r=Gt(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=Gt(function(s){e.update(i=>Yp(i.interaction.item,s)?i:K({},i,{interaction:K({},i.interaction,{item:s})}))}),a=Gt(function(s){e.update(i=>K({},i,{interaction:K({},i.interaction,{pointer:s})}))});return{instance:{cleanInteraction:t,setItemInteraction:n,removeItemInteraction:r,setPointerCoordinate:a}}};ic.getInitialState=()=>({interaction:{item:null,pointer:null}});ic.params={};const lc=e=>e.interaction,SS=pe([lc],e=>e!==void 0),OS=pe([lc],e=>(e==null?void 0:e.item)??null),Kp=pe([lc],e=>(e==null?void 0:e.pointer)??null),ws=pe([Kp],e=>e&&e.x),Cs=pe([Kp],e=>e&&e.y);pe([OS],e=>e!==null);function oa(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(!oa(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(!oa(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(!oa(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}const Ps=(e,t)=>t;function Ki(e,t,r=t.axisIds[0]){return Array.isArray(r)?r.map(n=>yn(t.axis[n],e)):yn(t.axis[r],e)}const Qp=(e,t,r)=>{if(e===null)return null;const n=Ki(e,t,r);return n===-1?null:n},wS=pe([ws,Mr,Ps],Qp),CS=pe([Cs,jr,Ps],Qp),PS=pe([ws,Cs,Mr,jr],(e,t,r,n)=>[...e===null?[]:r.axisIds.map(a=>({axisId:a,dataIndex:Ki(e,r,a)})),...t===null?[]:n.axisIds.map(a=>({axisId:a,dataIndex:Ki(t,n,a)}))].filter(a=>a.dataIndex!==null&&a.dataIndex>=0));function Xp(e,t,r,n=t.axisIds[0]){return Array.isArray(n)?n.map((a,o)=>ed(t.axis[a],e,r[o])):ed(t.axis[n],e,r)}pe([ws,Mr,wS,Ps],(e,t,r,n)=>e===null||r===null||t.axisIds.length===0?null:Xp(e,t,r,n));pe([Cs,jr,CS,Ps],(e,t,r,n)=>e===null||r===null||t.axisIds.length===0?null:Xp(e,t,r,n));const TS=pe([ws,Mr],(e,t)=>e===null?[]:t.axisIds.filter(r=>t.axis[r].triggerTooltip).map(r=>({axisId:r,dataIndex:yn(t.axis[r],e)})).filter(({dataIndex:r})=>r>=0),{memoizeOptions:{resultEqualityCheck:oa}}),RS=pe([Cs,jr],(e,t)=>e===null?[]:t.axisIds.filter(r=>t.axis[r].triggerTooltip).map(r=>({axisId:r,dataIndex:yn(t.axis[r],e)})).filter(({dataIndex:r})=>r>=0),{memoizeOptions:{resultEqualityCheck:oa}});pe([TS,RS],(e,t)=>e.length>0||t.length>0);const rd={};function AS(e,t){const r=N.useRef(rd);return r.current===rd&&(r.current=e(t)),r}const _S=()=>{};function ES(e,t,r,n){const a=AS(VS,{store:e,selector:t,skip:n}).current;a.effect=r,N.useEffect(a.onMount(n),[n])}function VS(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:_S,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 Ts=({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(T=>T.id).map(T=>T.id),w=new Set(O.filter((T,P)=>O.indexOf(T)!==P));w.size>0&&da([`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=st(t,Ta),u=st(t,Ra),d=st(t,SS),{axis:h,axisIds:p}=st(t,Mr),{axis:f,axisIds:m}=st(t,jr);mp({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedAxis",controlled:e.highlightedAxis,defaultValue:void 0}),kt(()=>{e.highlightedAxis!==void 0&&t.update(O=>O.controlledCartesianAxisHighlight===e.highlightedAxis?O:K({},O,{controlledCartesianAxisHighlight:e.highlightedAxis}))},[t,e.highlightedAxis]);const y=N.useRef(!0);N.useEffect(()=>{if(y.current){y.current=!1;return}t.update(O=>K({},O,{cartesianAxis:K({},O.cartesianAxis,{x:yp(o,i),y:bp(s,i)})}))},[r,c,o,s,i,t]);const S=p[0],E=m[0];return ES(t,PS,(O,w)=>{if(!Object.is(O,w)){if(O.length!==w.length){l(w);return}O!=null&&O.some(({axisId:T,dataIndex:P},C)=>w[C].axisId!==T||w[C].dataIndex!==P)&&l(w)}},!l),N.useEffect(()=>{const O=n.current;if(!d||!O||e.disableAxisListener)return()=>{};const w=a.addInteractionListener("moveEnd",A=>{var G;A.detail.activeGestures.pan||(G=a.cleanInteraction)==null||G.call(a)}),T=a.addInteractionListener("panEnd",A=>{var G;A.detail.activeGestures.move||(G=a.cleanInteraction)==null||G.call(a)}),P=a.addInteractionListener("quickPressEnd",A=>{var G;!A.detail.activeGestures.move&&!A.detail.activeGestures.pan&&((G=a.cleanInteraction)==null||G.call(a))}),C=A=>{var re,ee;const G=A.detail.srcEvent,_=A.detail.target,F=td(O,G);if(A.detail.srcEvent.buttons>=1&&(_!=null&&_.hasPointerCapture(A.detail.srcEvent.pointerId))&&!(_!=null&&_.closest("[data-charts-zoom-slider]"))&&(_==null||_.releasePointerCapture(A.detail.srcEvent.pointerId)),!a.isPointInside(F.x,F.y,_)){(re=a.cleanInteraction)==null||re.call(a);return}(ee=a.setPointerCoordinate)==null||ee.call(a,F)},I=a.addInteractionListener("move",C),z=a.addInteractionListener("pan",C),b=a.addInteractionListener("quickPress",C);return()=>{I.cleanup(),w.cleanup(),z.cleanup(),T.cleanup(),b.cleanup(),P.cleanup()}},[n,t,h,S,f,E,a,e.disableAxisListener,d]),N.useEffect(()=>{const O=n.current,w=e.onAxisClick;if(O===null||!w)return()=>{};const T=a.addInteractionListener("tap",P=>{let C=null,I=!1;const z=td(O,P.detail.srcEvent),b=yn(h[S],z.x);I=b!==-1,C=I?b:yn(f[E],z.y);const A=I?p[0]:m[0];if(C==null||C===-1)return;const G=(I?h:f)[A].data[C],_={};Object.keys(u).filter(F=>["bar","line"].includes(F)).forEach(F=>{var re;(re=u[F])==null||re.seriesOrder.forEach(ee=>{const ae=u[F].series[ee],te=ae.xAxisId,se=ae.yAxisId,W=I?te:se;(W===void 0||W===A)&&(_[ee]=ae.data[C])})}),w(P.detail.srcEvent,{dataIndex:C,axisValue:G,seriesValues:_})});return()=>{T.cleanup()}},[e.onAxisClick,u,n,h,p,f,m,S,E,a]),{}};Ts.params={xAxis:!0,yAxis:!0,dataset:!0,onAxisClick:!0,disableAxisListener:!0,onHighlightedAxisChange:!0,highlightedAxis:!0};Ts.getDefaultizedParams=({params:e})=>K({},e,{colors:e.colors??up,theme:e.theme??"light",defaultizedXAxis:yp(e.xAxis,e.dataset),defaultizedYAxis:bp(e.yAxis,e.dataset)});Ts.getInitialState=e=>K({cartesianAxis:{x:e.defaultizedXAxis,y:e.defaultizedYAxis}},e.highlightedAxis===void 0?{}:{controlledCartesianAxisHighlight:e.highlightedAxis});function nd(e,t){return e.id!==void 0?e:K({id:t},e)}function ad(e){return e.colorMap?K({},e,{colorScale:e.colorMap.type==="ordinal"&&e.data?Do(K({values:e.data},e.colorMap)):bo(e.colorMap.type==="continuous"?K({min:e.min,max:e.max},e.colorMap):e.colorMap)}):e}function Zp(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]=ad(nd(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]=ad(nd(K({},a,{data:t.map(l=>l[s])}),i)),n.push(i)}),{axis:r,axisIds:n}}const cc=({params:e,store:t})=>{const{zAxis:r,dataset:n}=e,a=N.useRef(!0);return N.useEffect(()=>{if(a.current){a.current=!1;return}t.update(o=>K({},o,{zAxis:Zp(r,n)}))},[r,n,t]),{}};cc.params={zAxis:!0,dataset:!0};cc.getInitialState=e=>({zAxis:Zp(e.zAxis,e.dataset)});const IS=e=>e,MS=pe([IS],e=>e.zAxis),Rs=({store:e,params:t})=>{mp({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedItem",controlled:t.highlightedItem,defaultValue:null}),kt(()=>{e.update(a=>a.highlight.item===t.highlightedItem?a:K({},a,{highlight:K({},a.highlight,{item:t.highlightedItem})}))},[e,t.highlightedItem]);const r=Gt(()=>{var a;(a=t.onHighlightChange)==null||a.call(t,null),e.update(o=>K({},o,{highlight:{item:null}}))}),n=Gt(a=>{var s;const o=e.getSnapshot().highlight.item;Yp(o,a)||((s=t.onHighlightChange)==null||s.call(t,a),e.update(i=>K({},i,{highlight:{item:a}})))});return{instance:{clearHighlight:r,setHighlight:n}}};Rs.getDefaultizedParams=({params:e})=>K({},e,{highlightedItem:e.highlightedItem??null});Rs.getInitialState=e=>({highlight:{item:e.highlightedItem}});Rs.params={highlightedItem:!0,onHighlightChange:!0};const od=(e,t)=>t==="x"?{x:e,y:null}:{x:null,y:e},em=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]},tm=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(od(p[0],e),f)||!c(od(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])},jS=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?tm("x")(e):em(e),kS=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?em(e):tm("y")(e);function Fe(e){return function(){return e}}const sd=Math.abs,Qe=Math.atan2,fr=Math.cos,$S=Math.max,fi=Math.min,_t=Math.sin,an=Math.sqrt,at=1e-12,ga=Math.PI,Bo=ga/2,xo=2*ga;function US(e){return e>1?0:e<-1?ga:Math.acos(e)}function id(e){return e>=1?Bo:e<=-1?-Bo:Math.asin(e)}const Qi=Math.PI,Xi=2*Qi,yr=1e-6,LS=Xi-yr;function rm(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function DS(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return rm;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 BS{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?rm:DS(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>yr)if(!(Math.abs(d*l-c*u)>yr)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-s,f=a-i,m=l*l+c*c,y=p*p+f*f,S=Math.sqrt(m),E=Math.sqrt(h),O=o*Math.tan((Qi-Math.acos((m+h-y)/(2*S*E)))/2),w=O/E,T=O/S;Math.abs(w-1)>yr&&this._append`L${t+w*u},${r+w*d}`,this._append`A${o},${o},0,0,${+(d*p>u*f)},${this._x1=t+T*l},${this._y1=r+T*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)>yr||Math.abs(this._y1-u)>yr)&&this._append`L${c},${u}`,n&&(h<0&&(h=h%Xi+Xi),h>LS?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>yr&&this._append`A${n},${n},0,${+(h>=Qi)},${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 NS(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 BS(t)}function FS(e){return e.innerRadius}function zS(e){return e.outerRadius}function GS(e){return e.startAngle}function HS(e){return e.endAngle}function qS(e){return e&&e.padAngle}function WS(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<at))return h=(u*(t-o)-d*(e-a))/h,[e+h*l,t+h*c]}function Za(e,t,r,n,a,o,s){var i=e-r,l=t-n,c=(s?o:-o)/an(i*i+l*l),u=c*l,d=-c*i,h=e+u,p=t+d,f=r+u,m=n+d,y=(h+f)/2,S=(p+m)/2,E=f-h,O=m-p,w=E*E+O*O,T=a-o,P=h*m-f*p,C=(O<0?-1:1)*an($S(0,T*T*w-P*P)),I=(P*O-E*C)/w,z=(-P*E-O*C)/w,b=(P*O+E*C)/w,A=(-P*E+O*C)/w,G=I-y,_=z-S,F=b-y,re=A-S;return G*G+_*_>F*F+re*re&&(I=b,z=A),{cx:I,cy:z,x01:-u,y01:-d,x11:I*(a/T-1),y11:z*(a/T-1)}}function nm(){var e=FS,t=zS,r=Fe(0),n=null,a=GS,o=HS,s=qS,i=null,l=NS(c);function c(){var u,d,h=+e.apply(this,arguments),p=+t.apply(this,arguments),f=a.apply(this,arguments)-Bo,m=o.apply(this,arguments)-Bo,y=sd(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(y>xo-at)i.moveTo(p*fr(f),p*_t(f)),i.arc(0,0,p,f,m,!S),h>at&&(i.moveTo(h*fr(m),h*_t(m)),i.arc(0,0,h,m,f,S));else{var E=f,O=m,w=f,T=m,P=y,C=y,I=s.apply(this,arguments)/2,z=I>at&&(n?+n.apply(this,arguments):an(h*h+p*p)),b=fi(sd(p-h)/2,+r.apply(this,arguments)),A=b,G=b,_,F;if(z>at){var re=id(z/h*_t(I)),ee=id(z/p*_t(I));(P-=re*2)>at?(re*=S?1:-1,w+=re,T-=re):(P=0,w=T=(f+m)/2),(C-=ee*2)>at?(ee*=S?1:-1,E+=ee,O-=ee):(C=0,E=O=(f+m)/2)}var ae=p*fr(E),te=p*_t(E),se=h*fr(T),W=h*_t(T);if(b>at){var X=p*fr(O),ue=p*_t(O),ve=h*fr(w),Ue=h*_t(w),we;if(y<ga)if(we=WS(ae,te,ve,Ue,X,ue,se,W)){var ct=ae-we[0],rt=te-we[1],be=X-we[0],Z=ue-we[1],oe=1/_t(US((ct*be+rt*Z)/(an(ct*ct+rt*rt)*an(be*be+Z*Z)))/2),ce=an(we[0]*we[0]+we[1]*we[1]);A=fi(b,(h-ce)/(oe-1)),G=fi(b,(p-ce)/(oe+1))}else A=G=0}C>at?G>at?(_=Za(ve,Ue,ae,te,p,G,S),F=Za(X,ue,se,W,p,G,S),i.moveTo(_.cx+_.x01,_.cy+_.y01),G<b?i.arc(_.cx,_.cy,G,Qe(_.y01,_.x01),Qe(F.y01,F.x01),!S):(i.arc(_.cx,_.cy,G,Qe(_.y01,_.x01),Qe(_.y11,_.x11),!S),i.arc(0,0,p,Qe(_.cy+_.y11,_.cx+_.x11),Qe(F.cy+F.y11,F.cx+F.x11),!S),i.arc(F.cx,F.cy,G,Qe(F.y11,F.x11),Qe(F.y01,F.x01),!S))):(i.moveTo(ae,te),i.arc(0,0,p,E,O,!S)):i.moveTo(ae,te),!(h>at)||!(P>at)?i.lineTo(se,W):A>at?(_=Za(se,W,X,ue,h,-A,S),F=Za(ae,te,ve,Ue,h,-A,S),i.lineTo(_.cx+_.x01,_.cy+_.y01),A<b?i.arc(_.cx,_.cy,A,Qe(_.y01,_.x01),Qe(F.y01,F.x01),!S):(i.arc(_.cx,_.cy,A,Qe(_.y01,_.x01),Qe(_.y11,_.x11),!S),i.arc(0,0,h,Qe(_.cy+_.y11,_.cx+_.x11),Qe(F.cy+F.y11,F.cx+F.x11),S),i.arc(F.cx,F.cy,A,Qe(F.y11,F.x11),Qe(F.y01,F.x01),!S))):i.arc(0,0,h,T,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-ga/2;return[fr(d)*u,_t(d)*u]},c.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:Fe(+u),c):e},c.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:Fe(+u),c):t},c.cornerRadius=function(u){return arguments.length?(r=typeof u=="function"?u:Fe(+u),c):r},c.padRadius=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:Fe(+u),c):n},c.startAngle=function(u){return arguments.length?(a=typeof u=="function"?u:Fe(+u),c):a},c.endAngle=function(u){return arguments.length?(o=typeof u=="function"?u:Fe(+u),c):o},c.padAngle=function(u){return arguments.length?(s=typeof u=="function"?u:Fe(+u),c):s},c.context=function(u){return arguments.length?(i=u??null,c):i},c}function am(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function JS(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function YS(e){return e}function KS(){var e=YS,t=JS,r=null,n=Fe(0),a=Fe(xo),o=Fe(0);function s(i){var l,c=(i=am(i)).length,u,d,h=0,p=new Array(c),f=new Array(c),m=+n.apply(this,arguments),y=Math.min(xo,Math.max(-xo,a.apply(this,arguments)-m)),S,E=Math.min(Math.abs(y)/c,o.apply(this,arguments)),O=E*(y<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(T,P){return t(f[T],f[P])}):r!=null&&p.sort(function(T,P){return r(i[T],i[P])}),l=0,d=h?(y-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:Fe(+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:Fe(+i),s):n},s.endAngle=function(i){return arguments.length?(a=typeof i=="function"?i:Fe(+i),s):a},s.padAngle=function(i){return arguments.length?(o=typeof i=="function"?i:Fe(+i),s):o},s}function bn(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 xn(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function QS(e,t){return e[t]}function XS(e){const t=[];return t.key=e,t}function om(){var e=Fe([]),t=xn,r=bn,n=QS;function a(o){var s=Array.from(e.apply(this,arguments),XS),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=am(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:Fe(Array.from(o)),a):e},a.value=function(o){return arguments.length?(n=typeof o=="function"?o:Fe(+o),a):n},a.order=function(o){return arguments.length?(t=o==null?xn:typeof o=="function"?o:Fe(Array.from(o)),a):t},a.offset=function(o){return arguments.length?(r=o??bn,a):r},a}function ZS(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}bn(e,t)}}function eO(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 tO(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}bn(e,t)}}function rO(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]],y=m[n][1]||0,S=m[n-1][1]||0;p+=y-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,bn(e,t)}}function sm(e){var t=e.map(nO);return xn(e).sort(function(r,n){return t[r]-t[n]})}function nO(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 im(e){var t=e.map(lm);return xn(e).sort(function(r,n){return t[r]-t[n]})}function lm(e){for(var t=0,r=-1,n=e.length,a;++r<n;)(a=+e[r][1])&&(t+=a);return t}function aO(e){return im(e).reverse()}function oO(e){var t=e.length,r,n,a=e.map(lm),o=sm(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 sO(e){return xn(e).reverse()}const gi={appearance:sm,ascending:im,descending:aO,insideOut:oO,none:xn,reverse:sO},yi={expand:ZS,diverging:eO,none:bn,silhouette:tO,wiggle:rO},cm=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:gi.none,stackingOffset:yi.none}):o[i]===void 0?(o[i]=a.length,a.push({ids:[s],stackingOrder:gi[l??(n==null?void 0:n.stackOrder)??"none"],stackingOffset:yi[c??(n==null?void 0:n.stackOffset)??"diverging"]})):(a[o[i]].ids.push(s),l!==void 0&&(a[o[i]].stackingOrder=gi[l]),c!==void 0&&(a[o[i]].stackingOffset=yi[c]))}),a},iO=e=>e==null?"":e.toLocaleString(),lO=(e,t)=>{const{seriesOrder:r,series:n}=e,a=cm(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 a.forEach(i=>{const{ids:l,stackingOffset:c,stackingOrder:u}=i,d=om().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)(o);l.forEach((h,p)=>{const f=n[h].dataKey;s[h]=K({layout:"vertical",labelMarkType:"square",minBarSize:0,valueFormatter:n[h].valueFormatter??iO},n[h],{data:f?t.map(m=>{const y=m[f];return typeof y!="number"?(process.env.NODE_ENV!=="production"&&y!==null&&da([`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):y}):n[h].data,stackedData:d[p].map(([m,y])=>[m,y])})})}),{seriesOrder:r,stackingGroups:a,series:s}};function Kt(e,t){return typeof e=="function"?e(t):e}const cO=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,a)=>{const o=Kt(r[a].label,"legend");return o===void 0||n.push({markType:r[a].labelMarkType,id:a,seriesId:a,color:r[a].color,label:o}),n},[])},uO=(e,t,r)=>{const n=e.layout==="vertical",a=n?t==null?void 0:t.colorScale:r==null?void 0:r.colorScale,o=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 o?i=>{if(i===void 0)return e.color;const l=e.data[i],c=l===null?e.color:o(l);return c===null?e.color:c}:a&&s?i=>{if(i===void 0)return e.color;const l=s[i],c=l===null?e.color:a(l);return c===null?e.color:c}:()=>e.color},dO=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const a=Kt(t.label,"tooltip"),o=t.data[n.dataIndex];if(o==null)return null;const s=t.valueFormatter(o,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:a,value:o,formattedValue:s,markType:t.labelMarkType}},hO=e=>Object.values(e).map(t=>t.layout==="horizontal"?{direction:"y",axisId:t.yAxisId}:{direction:"x",axisId:t.xAxisId}),pO=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`,color:r[t%r.length]},e),mO={seriesProcessor:lO,colorProcessor:uO,legendGetter:cO,tooltipGetter:dO,axisTooltipGetter:hO,xExtremumGetter:jS,yExtremumGetter:kS,getSeriesWithDefaultValues:pO},No=(e,t)=>[t[0]===null?e[0]:Math.min(e[0],t[0]),t[1]===null?e[1]:Math.max(e[1],t[1])],fO=e=>{const{series:t,axis:r,isDefaultAxis:n,getFilters:a}=e;return Object.keys(t).filter(o=>{const s=t[o].xAxisId;return s===r.id||s===void 0&&n}).reduce((o,s)=>{var c;const i=a==null?void 0:a({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:No(u,[d.x,d.x]),[1/0,-1/0]);return No(o,l??[1/0,-1/0])},[1/0,-1/0])},gO=e=>{const{series:t,axis:r,isDefaultAxis:n,getFilters:a}=e;return Object.keys(t).filter(o=>{const s=t[o].yAxisId;return s===r.id||s===void 0&&n}).reduce((o,s)=>{var c;const i=a==null?void 0:a({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:No(u,[d.y,d.y]),[1/0,-1/0]);return No(o,l??[1/0,-1/0])},[1/0,-1/0])},yO=({series:e,seriesOrder:t},r)=>({series:Object.fromEntries(Object.entries(e).map(([a,o])=>{const s=o==null?void 0:o.datasetKeys,i=["x","y","id"].filter(c=>typeof(s==null?void 0:s[c])!="string");if(o!=null&&o.datasetKeys&&i.length>0)throw new Error([`MUI X Charts: scatter series with id='${a}' has incomplete datasetKeys.`,`Properties ${i.map(c=>`"${c}"`).join(", ")} are missing.`].join(`
115
+ */var uu;function jb(){return uu||(uu=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=ap(),n=typeof Object.is=="function"?Object.is:e,a=r.useSyncExternalStore,o=t.useRef,s=t.useEffect,i=t.useMemo,l=t.useDebugValue;oi.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(P){if(!E){if(E=!0,O=P,P=h(P),p!==void 0&&m.hasValue){var w=m.value;if(p(w,P))return C=w}return C=P}if(w=C,n(O,P))return w;var I=h(P);return p!==void 0&&p(w,I)?(O=P,w):(O=P,C=I)}var E=!1,O,C,T=d===void 0?null:d;return[function(){return S(u())},T===null?void 0:function(){return S(T())}]},[u,d,h,p]);var y=a(c,f[0],f[1]);return s(function(){m.hasValue=!0,m.value=y},[y]),l(y),y},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),oi}var du;function $b(){return du||(du=1,process.env.NODE_ENV==="production"?qa.exports=Mb():qa.exports=jb()),qa.exports}var kb=$b();const Ub=Object.is,st=(e,t,r=[],n=Ub)=>{const a=o=>t(o,...r);return kb.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,a,n)},Db="DEFAULT_X_AXIS_KEY",Lb="DEFAULT_Y_AXIS_KEY",Bb={top:20,bottom:20,left:20,right:20},Nb=45,Fb=25,op=20,wn=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.x},Cn=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.y},zb=pe([Cn],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)),Gb=pe([Cn],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)),Hb=pe([wn],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=pe([wn],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)),Wb=e=>e.dimensions,sp=e=>e.dimensions.width,ip=e=>e.dimensions.height,Jb=e=>e.dimensions.margin.top,Yb=e=>e.dimensions.margin.right,Kb=e=>e.dimensions.margin.bottom,Qb=e=>e.dimensions.margin.left,Ta=pe([sp,ip,Jb,Yb,Kb,Qb,Hb,Gb,qb,zb],(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})),Xb=pe([Wb],e=>({width:e.propsWidth,height:e.propsHeight})),Zb=pe([sp,ip],(e,t)=>({width:e,height:t}));function lp(e,t){return typeof e=="number"?{top:e,bottom:e,left:e,right:e}:t?K({},t,e):e}const ex=10,ps=({params:e,store:t,svgRef:r})=>{const n=e.width!==void 0&&e.height!==void 0,a=N.useRef({displayError:!1,initialCompute:!0,computeRun:0}),[o,s]=N.useState(0),[i,l]=N.useState(0),c=N.useCallback(()=>{const f=r==null?void 0:r.current;if(!f)return{};const y=Eb(f).getComputedStyle(f),S=Math.floor(parseFloat(y.height))||0,E=Math.floor(parseFloat(y.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]);N.useEffect(()=>{t.update(f=>{const m=e.width??f.dimensions.width,y=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:y,propsHeight:e.height,propsWidth:e.width}})})},[t,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]),N.useEffect(()=>{a.current.displayError=!0},[]),$t(()=>{if(n||!a.current.initialCompute||a.current.computeRun>ex)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 y=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{c()})});return f&&y.observe(f),()=>{m&&cancelAnimationFrame(m),f&&y.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=st(t,Ta),d=N.useCallback(f=>f>=u.left-1&&f<=u.left+u.width,[u.left,u.width]),h=N.useCallback(f=>f>=u.top-1&&f<=u.top+u.height,[u.height,u.top]);return{instance:{isPointInside:N.useCallback((f,m,y)=>y&&"closest"in y&&y.closest("[data-drawing-container]")?!0:d(f)&&h(m),[d,h]),isXInside:d,isYInside:h}}};ps.params={width:!0,height:!0,margin:!0};ps.getDefaultizedParams=({params:e})=>K({},e,{margin:lp(e.margin,Bb)});ps.getInitialState=({width:e,height:t,margin:r})=>({dimensions:{margin:r,width:e??0,height:t??0,propsWidth:e,propsHeight:t}});const Il=({params:e,store:t})=>($t(()=>{t.update(r=>K({},r,{experimentalFeatures:e.experimentalFeatures}))},[t,e.experimentalFeatures]),{});Il.params={experimentalFeatures:!0};Il.getInitialState=({experimentalFeatures:e})=>({experimentalFeatures:e});const tx=e=>e.experimentalFeatures,cp=pe([tx],e=>!!(e!=null&&e.preferStrictDomainInLineCharts));let hu=0;const rx=()=>(hu+=1,`mui-chart-${hu}`),Ml=({params:e,store:t})=>(N.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??rx()})}))},[t,e.id]),{});Ml.params={id:!0};Ml.getInitialState=({id:e})=>({id:{chartId:e,providedChartId:e}});const nx=e=>e.id,ax=pe([nx],e=>e.chartId),ox=["#4254FB","#FFB422","#FA4F58","#0DBEFF","#22BF75","#FA83B4","#FF7511"],sx=["#495AFB","#FFC758","#F35865","#30C8FF","#44CE8D","#F286B3","#FF8C39"],up=e=>e==="dark"?sx:ox,dp=({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},ms=({params:e,store:t,seriesConfig:r})=>{const{series:n,dataset:a,theme:o,colors:s}=e,i=N.useRef(!0);return N.useEffect(()=>{if(i.current){i.current=!1;return}t.update(l=>K({},l,{series:K({},l.series,{processedSeries:dp({series:n,colors:typeof s=="function"?s(o):s,seriesConfig:r,dataset:a})})}))},[s,a,n,o,r,t]),{}};ms.params={dataset:!0,series:!0,colors:!0,theme:!0};const ix=[];ms.getDefaultizedParams=({params:e})=>{var t;return K({},e,{series:(t=e.series)!=null&&t.length?e.series:ix,colors:e.colors??up,theme:e.theme??"light"})};ms.getInitialState=({series:e=[],colors:t,theme:r,dataset:n},a,o)=>({series:{seriesConfig:o,processedSeries:dp({series:e,colors:typeof t=="function"?t(r):t,seriesConfig:o,dataset:n})}});const hp=e=>e.series,Ra=pe([hp],e=>e.processedSeries),fs=pe([hp],e=>e.seriesConfig),lx={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 pp{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 lx)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 cx{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 ux{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 dx{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 hx{constructor(t){this.gestureTemplates=new Map,this.elementGestureMap=new Map,this.activeGesturesRegistry=new cx,this.pointerManager=void 0,this.keyboardManager=new ux,this.pointerManager=new dx({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 Aa extends pp{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 px(e,t){const r=t.x-e.x,n=t.y-e.y;return Math.sqrt(r*r+n*n)}function si(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+=px({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 qt(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 Pn(e,t){return`${e}${t==="ongoing"?"":t.charAt(0).toUpperCase()+t.slice(1)}`}const Ja=1e-5,tr=1e-5,pu=.15;function mx(e,t){const r=t.x-e.x,n=t.y-e.y,a={vertical:null,horizontal:null,mainAxis:null},o=fx(t,e),s=Math.abs(r)>Math.abs(n)?"horizontal":"vertical",i=o||s==="horizontal"?Ja:pu,l=o?Ja:s==="horizontal"?pu:Ja;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 fx(e,t){const r=t.x-e.x,n=t.y-e.y,a=Math.atan2(n,r)*180/Math.PI;return a>=-45+tr&&a<=-22.5+tr||a>=22.5+tr&&a<=45+tr||a>=135+tr&&a<=157.5+tr||a>=-157.5+tr&&a<=-135+tr}function gx(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 yx=0,bx=e=>e>yx?1:e<-0?-1:0;class jl extends Aa{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 jl(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||qt(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=Pn(this.name,r),c=new CustomEvent(l,{bubbles:!0,cancelable:!0,detail:i});t.dispatchEvent(c)}}class $l extends Aa{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 $l(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=qt(o),this.state.lastCentroid=K({},this.state.startCentroid));break;case"pointermove":if(this.state.startCentroid&&o.length>=this.minPointers){const s=qt(o),i=s.x-this.state.startCentroid.x,l=s.y-this.state.startCentroid.y,c=Math.sqrt(i*i+l*l),u=mx(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&&gx(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=Pn(this.name,r),y=new CustomEvent(m,{bubbles:!0,cancelable:!0,detail:f});t.dispatchEvent(y),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 kl extends Aa{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 kl(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=si(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=si(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=si(s);this.state.startDistance=i/this.state.lastScale}}break}}emitPinchEvent(t,r,n,a){const o=qt(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:bx(this.state.velocity),customData:this.customData};this.preventDefault&&a.preventDefault(),this.stopPropagation&&a.stopPropagation();const u=Pn(this.name,r),d=new CustomEvent(u,{bubbles:!0,cancelable:!0,detail:c});t.dispatchEvent(d)}}class Ul extends Aa{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 Ul(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=qt(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=qt(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=Pn(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 Dl extends Aa{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 Dl(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=qt(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=qt(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=Pn(this.name,"cancel"),l=new CustomEvent(i,{bubbles:!0,cancelable:!0,detail:s});t.dispatchEvent(l)}this.resetState()}}class Ll extends pp{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 Ll(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?qt(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=Pn(this.name,"ongoing"),i=new CustomEvent(s,{bubbles:!0,cancelable:!0,detail:o});this.element.dispatchEvent(i)}}const Wr=e=>e.preventDefault(),Bl=({svgRef:e})=>{N.useEffect(()=>{const r=e.current;if(!r)return;const n=new hx({gestures:[new $l({name:"pan",threshold:0,maxPointers:1}),new jl({name:"move",preventIf:["pan","pinch"]}),new kl({name:"pinch",threshold:5,preventIf:["pan"]}),new Ll({name:"turnWheel",sensitivity:.01,initialDelta:1}),new Dl({name:"tap",maxDistance:10,preventIf:["pan","pinch"]}),new Ul({name:"quickPress",duration:50,maxDistance:10})]});return n.registerElement(["pan","move","pinch","turnWheel","tap","quickPress"],r),()=>{n.destroy()}},[e]);const t=N.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 N.useEffect(()=>{const r=e.current;return r==null||r.addEventListener("gesturestart",Wr),r==null||r.addEventListener("gesturechange",Wr),r==null||r.addEventListener("gestureend",Wr),()=>{r==null||r.removeEventListener("gesturestart",Wr),r==null||r.removeEventListener("gesturechange",Wr),r==null||r.removeEventListener("gestureend",Wr)}},[e]),{instance:{addInteractionListener:t}}};Bl.params={};Bl.getInitialState=()=>({});const xx=[Ml,Il,ps,ms,Bl,hs],vx=["apiRef"],Sx=e=>{let{plugins:t}=e,r=lr(e.props,vx);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 mu=0;function Ox(e,t,r){const n=ib(),a=N.useMemo(()=>[...xx,...e],[e]),o=Sx({plugins:a,props:t});o.id=o.id??n;const i=N.useRef({}).current,l=Cx(t.apiRef),c=N.useRef(null),u=N.useRef(null),d=N.useRef(null);if(d.current==null){mu+=1;const f={cacheKey:{id:mu}};a.forEach(m=>{m.getInitialState&&Object.assign(f,m.getInitialState(o,f,r))}),d.current=new lb(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:N.useMemo(()=>({store:d.current,publicAPI:l.current,instance:i,svgRef:u,chartRootRef:c}),[i,l])}}function wx(e){return e.current==null&&(e.current={}),e}function Cx(e){const t=N.useRef({});return e?wx(e):t}const Nl=N.createContext(null);process.env.NODE_ENV!=="production"&&(Nl.displayName="ChartContext");const fu=new Set;function da(e,t="warning"){if(process.env.NODE_ENV==="production")return;const r=Array.isArray(e)?e.join(`
116
+ `):e;fu.has(r)||(fu.add(r),t==="error"?console.error(r):console.warn(r))}function Px(e){const{componentName:t,propName:r,controlled:n,defaultValue:a,warningPrefix:o="MUI X"}=e,[{initialDefaultValue:s,isControlled:i}]=N.useState({initialDefaultValue:a,isControlled:n!==void 0});i!==(n!==void 0)&&da([`${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)&&da([`${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 mp=process.env.NODE_ENV==="production"?()=>{}:Px,fp=4,gp=20+2*fp,Tx=40+2*fp,Rx="hover",Ya={minStart:0,maxEnd:100,step:5,minSpan:10,maxSpan:100,panning:!0,filterMode:"keep",slider:{enabled:!1,preview:!1,size:gp,showTooltip:Rx}},Fl=(e,t,r)=>{var n;if(e)return e===!0?K({axisId:t,axisDirection:r},Ya):K({axisId:t,axisDirection:r},Ya,e,{slider:K({},Ya.slider,{size:((n=e.slider)==null?void 0:n.preview)??Ya.slider.preview?Tx:gp},e.slider)})};function yp(e,t){const r={top:0,bottom:0,none:0};return(e&&e.length>0?e:[{id:Db,scaleType:"linear"}]).map((o,s)=>{var p;const i=o.dataKey,l=s===0?"bottom":"none",c=o.position??l,u=Fb+(o.label?op:0),d=o.id??`defaultized-x-axis-${s}`,h=K({offset:r[c]},o,{id:d,position:c,height:o.height??u,zoom:Fl(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 bp(e,t){const r={right:0,left:0,none:0};return(e&&e.length>0?e:[{id:Lb,scaleType:"linear"}]).map((o,s)=>{var p;const i=o.dataKey,l=s===0?"left":"none",c=o.position??l,u=Nb+(o.label?op:0),d=o.id??`defaultized-y-axis-${s}`,h=K({offset:r[c]},o,{id:d,position:c,width:o.width??u,zoom:Fl(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 yo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Ax(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function zl(e){let t,r,n;e.length!==2?(t=yo,r=(i,l)=>yo(e(i),l),n=(i,l)=>e(i)-l):(t=e===yo||e===Ax?e:_x,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 _x(){return 0}function Ex(e){return e===null?NaN:+e}const Vx=zl(yo),xp=Vx.right;zl(Ex).center;class gu extends Map{constructor(t,r=jx){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(yu(this,t))}has(t){return super.has(yu(this,t))}set(t,r){return super.set(Ix(this,t),r)}delete(t){return super.delete(Mx(this,t))}}function yu({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function Ix({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function Mx({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function jx(e){return e!==null&&typeof e=="object"?e.valueOf():e}const $x=Math.sqrt(50),kx=Math.sqrt(10),Ux=Math.sqrt(2);function Vo(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>=$x?10:o>=kx?5:o>=Ux?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?Vo(e,t,r*2):[i,l,c]}function zi(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?Vo(t,e,r):Vo(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 Gi(e,t,r){return t=+t,e=+e,r=+r,Vo(e,t,r)[2]}function Hi(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?Gi(t,e,r):Gi(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function Dx(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 pr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Lx(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 bu=Symbol("implicit");function Io(){var e=new gu,t=[],r=[],n=bu;function a(o){let s=e.get(o);if(s===void 0){if(n!==bu)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 gu;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 Io(t,r).unknown(n)},pr.apply(a,arguments),a}function Gl(){var e=Io().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 y=Dx(h).map(function(S){return f+o*S});return r(p?y.reverse():y)}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 Gl(t(),[n,a]).round(i).paddingInner(l).paddingOuter(c).align(u)},pr.apply(d(),arguments)}function vp(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return vp(t())},e}function Bx(){return vp(Gl.apply(null,arguments).paddingInner(1))}function Hl(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Sp(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function _a(){}var ha=.7,Mo=1/ha,cn="\\s*([+-]?\\d+)\\s*",pa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",jt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Nx=/^#([0-9a-f]{3,8})$/,Fx=new RegExp(`^rgb\\(${cn},${cn},${cn}\\)$`),zx=new RegExp(`^rgb\\(${jt},${jt},${jt}\\)$`),Gx=new RegExp(`^rgba\\(${cn},${cn},${cn},${pa}\\)$`),Hx=new RegExp(`^rgba\\(${jt},${jt},${jt},${pa}\\)$`),qx=new RegExp(`^hsl\\(${pa},${jt},${jt}\\)$`),Wx=new RegExp(`^hsla\\(${pa},${jt},${jt},${pa}\\)$`),xu={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};Hl(_a,ma,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:vu,formatHex:vu,formatHex8:Jx,formatHsl:Yx,formatRgb:Su,toString:Su});function vu(){return this.rgb().formatHex()}function Jx(){return this.rgb().formatHex8()}function Yx(){return Op(this).formatHsl()}function Su(){return this.rgb().formatRgb()}function ma(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Nx.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Ou(t):r===3?new it(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Ka(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Ka(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=Fx.exec(e))?new it(t[1],t[2],t[3],1):(t=zx.exec(e))?new it(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Gx.exec(e))?Ka(t[1],t[2],t[3],t[4]):(t=Hx.exec(e))?Ka(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=qx.exec(e))?Pu(t[1],t[2]/100,t[3]/100,1):(t=Wx.exec(e))?Pu(t[1],t[2]/100,t[3]/100,t[4]):xu.hasOwnProperty(e)?Ou(xu[e]):e==="transparent"?new it(NaN,NaN,NaN,0):null}function Ou(e){return new it(e>>16&255,e>>8&255,e&255,1)}function Ka(e,t,r,n){return n<=0&&(e=t=r=NaN),new it(e,t,r,n)}function Kx(e){return e instanceof _a||(e=ma(e)),e?(e=e.rgb(),new it(e.r,e.g,e.b,e.opacity)):new it}function qi(e,t,r,n){return arguments.length===1?Kx(e):new it(e,t,r,n??1)}function it(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Hl(it,qi,Sp(_a,{brighter(e){return e=e==null?Mo:Math.pow(Mo,e),new it(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ha:Math.pow(ha,e),new it(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new it(wr(this.r),wr(this.g),wr(this.b),jo(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:wu,formatHex:wu,formatHex8:Qx,formatRgb:Cu,toString:Cu}));function wu(){return`#${xr(this.r)}${xr(this.g)}${xr(this.b)}`}function Qx(){return`#${xr(this.r)}${xr(this.g)}${xr(this.b)}${xr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Cu(){const e=jo(this.opacity);return`${e===1?"rgb(":"rgba("}${wr(this.r)}, ${wr(this.g)}, ${wr(this.b)}${e===1?")":`, ${e})`}`}function jo(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function wr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function xr(e){return e=wr(e),(e<16?"0":"")+e.toString(16)}function Pu(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 Op(e){if(e instanceof wt)return new wt(e.h,e.s,e.l,e.opacity);if(e instanceof _a||(e=ma(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 Xx(e,t,r,n){return arguments.length===1?Op(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}Hl(wt,Xx,Sp(_a,{brighter(e){return e=e==null?Mo:Math.pow(Mo,e),new wt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ha:Math.pow(ha,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 it(ii(e>=240?e-240:e+120,a,n),ii(e,a,n),ii(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new wt(Tu(this.h),Qa(this.s),Qa(this.l),jo(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=jo(this.opacity);return`${e===1?"hsl(":"hsla("}${Tu(this.h)}, ${Qa(this.s)*100}%, ${Qa(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Tu(e){return e=(e||0)%360,e<0?e+360:e}function Qa(e){return Math.max(0,Math.min(1,e||0))}function ii(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 ql=e=>()=>e;function Zx(e,t){return function(r){return e+r*t}}function ev(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 tv(e){return(e=+e)==1?wp:function(t,r){return r-t?ev(t,r,e):ql(isNaN(t)?r:t)}}function wp(e,t){var r=t-e;return r?Zx(e,r):ql(isNaN(e)?t:e)}const Ru=function e(t){var r=tv(t);function n(a,o){var s=r((a=qi(a)).r,(o=qi(o)).r),i=r(a.g,o.g),l=r(a.b,o.b),c=wp(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 rv(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 nv(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function av(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]=gs(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 Wl(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 ov(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]=gs(e[a],t[a]):n[a]=t[a];return function(o){for(a in r)n[a]=r[a](o);return n}}var Wi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,li=new RegExp(Wi.source,"g");function sv(e){return function(){return e}}function iv(e){return function(t){return e(t)+""}}function lv(e,t){var r=Wi.lastIndex=li.lastIndex=0,n,a,o,s=-1,i=[],l=[];for(e=e+"",t=t+"";(n=Wi.exec(e))&&(a=li.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=li.lastIndex;return r<t.length&&(o=t.slice(r),i[s]?i[s]+=o:i[++s]=o),i.length<2?l[0]?iv(l[0].x):sv(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 gs(e,t){var r=typeof t,n;return t==null||r==="boolean"?ql(t):(r==="number"?Ct:r==="string"?(n=ma(t))?(t=n,Ru):lv:t instanceof ma?Ru:t instanceof Date?Wl:nv(t)?rv:Array.isArray(t)?av:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?ov:Ct)(e,t)}function Cp(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function cv(e){return function(){return e}}function uv(e){return+e}var Au=[0,1];function gt(e){return e}function Ji(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:cv(isNaN(t)?NaN:.5)}function dv(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function hv(e,t,r){var n=e[0],a=e[1],o=t[0],s=t[1];return a<n?(n=Ji(a,n),o=r(s,o)):(n=Ji(n,a),o=r(o,s)),function(i){return o(n(i))}}function pv(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]=Ji(e[s],e[s+1]),o[s]=r(t[s],t[s+1]);return function(i){var l=xp(e,i,1,n)-1;return o[l](a[l](i))}}function ys(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Jl(){var e=Au,t=Au,r=gs,n,a,o,s=gt,i,l,c;function u(){var h=Math.min(e.length,t.length);return s!==gt&&(s=dv(e[0],e[h-1])),i=h>2?pv:hv,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,uv),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=Cp,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 Pp(){return Jl()(gt,gt)}function mv(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function $o(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 mn(e){return e=$o(Math.abs(e)),e?e[1]:NaN}function fv(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 gv(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var yv=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function fa(e){if(!(t=yv.exec(e)))throw new Error("invalid format: "+e);var t;return new Yl({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]})}fa.prototype=Yl.prototype;function Yl(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+""}Yl.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 bv(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 Tp;function xv(e,t){var r=$o(e,t);if(!r)return e+"";var n=r[0],a=r[1],o=a-(Tp=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")+$o(e,Math.max(0,t+o-1))[0]}function _u(e,t){var r=$o(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 Eu={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:mv,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)=>_u(e*100,t),r:_u,s:xv,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Vu(e){return e}var Iu=Array.prototype.map,Mu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function vv(e){var t=e.grouping===void 0||e.thousands===void 0?Vu:fv(Iu.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?Vu:gv(Iu.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=fa(d);var h=d.fill,p=d.align,f=d.sign,m=d.symbol,y=d.zero,S=d.width,E=d.comma,O=d.precision,C=d.trim,T=d.type;T==="n"?(E=!0,T="g"):Eu[T]||(O===void 0&&(O=12),C=!0,T="g"),(y||h==="0"&&p==="=")&&(y=!0,h="0",p="=");var P=m==="$"?r:m==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():"",w=m==="$"?n:/[%p]/.test(T)?s:"",I=Eu[T],z=/[defgprs%]/.test(T);O=O===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function b(A){var G=P,_=w,F,re,ee;if(T==="c")_=I(A)+_,A="";else{A=+A;var ae=A<0||1/A<0;if(A=isNaN(A)?l:I(Math.abs(A),O),C&&(A=bv(A)),ae&&+A==0&&f!=="+"&&(ae=!1),G=(ae?f==="("?f:i:f==="-"||f==="("?"":f)+G,_=(T==="s"?Mu[8+Tp/3]:"")+_+(ae&&f==="("?")":""),z){for(F=-1,re=A.length;++F<re;)if(ee=A.charCodeAt(F),48>ee||ee>57){_=(ee===46?a+A.slice(F+1):A.slice(F))+_,A=A.slice(0,F);break}}}E&&!y&&(A=t(A,1/0));var te=G.length+A.length+_.length,se=te<S?new Array(S-te+1).join(h):"";switch(E&&y&&(A=t(se+A,se.length?S-_.length:1/0),se=""),p){case"<":A=G+A+_+se;break;case"=":A=G+se+A+_;break;case"^":A=se.slice(0,te=se.length>>1)+G+A+_+se.slice(te);break;default:A=se+G+A+_;break}return o(A)}return b.toString=function(){return d+""},b}function u(d,h){var p=c((d=fa(d),d.type="f",d)),f=Math.max(-8,Math.min(8,Math.floor(mn(h)/3)))*3,m=Math.pow(10,-f),y=Mu[8+f/3];return function(S){return p(m*S)+y}}return{format:c,formatPrefix:u}}var Xa,Kl,Rp;Sv({thousands:",",grouping:[3],currency:["$",""]});function Sv(e){return Xa=vv(e),Kl=Xa.format,Rp=Xa.formatPrefix,Xa}function Ov(e){return Math.max(0,-mn(Math.abs(e)))}function wv(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(mn(t)/3)))*3-mn(Math.abs(e)))}function Cv(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,mn(t)-mn(e))+1}function Pv(e,t,r,n){var a=Hi(e,t,r),o;switch(n=fa(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=wv(a,s))&&(n.precision=o),Rp(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=Cv(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=Ov(a))&&(n.precision=o-(n.type==="%")*2);break}}return Kl(n)}function Ql(e){var t=e.domain;return e.ticks=function(r){var n=t();return zi(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return Pv(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=Gi(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 Ap(){var e=Pp();return e.copy=function(){return ys(e,Ap())},pr.apply(e,arguments),Ql(e)}function _p(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 ju(e){return Math.log(e)}function $u(e){return Math.exp(e)}function Tv(e){return-Math.log(-e)}function Rv(e){return-Math.exp(-e)}function Av(e){return isFinite(e)?+("1e"+e):e<0?0:e}function _v(e){return e===10?Av:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Ev(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 ku(e){return(t,r)=>-e(-t,r)}function Vv(e){const t=e(ju,$u),r=t.domain;let n=10,a,o;function s(){return a=Ev(n),o=_v(n),r()[0]<0?(a=ku(a),o=ku(o),e(Tv,Rv)):e(ju,$u),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 y=i==null?10:+i;let S=[];if(!(n%1)&&p-h<y){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<y&&(S=zi(c,u,y))}else S=zi(h,p,Math.min(p-h,y)).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=fa(l)).precision==null&&(l.trim=!0),l=Kl(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(_p(r(),{floor:i=>o(Math.floor(a(i))),ceil:i=>o(Math.ceil(a(i)))})),t}function Ep(){const e=Vv(Jl()).domain([1,10]);return e.copy=()=>ys(e,Ep()).base(e.base()),pr.apply(e,arguments),e}function Uu(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Iv(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Mv(e){return e<0?-e*e:e*e}function jv(e){var t=e(gt,gt),r=1;function n(){return r===1?e(gt,gt):r===.5?e(Iv,Mv):e(Uu(r),Uu(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},Ql(t)}function Xl(){var e=jv(Jl());return e.copy=function(){return ys(e,Xl()).exponent(e.exponent())},pr.apply(e,arguments),e}function $v(){return Xl.apply(null,arguments).exponent(.5)}function Vp(){var e=[.5],t=[0,1],r,n=1;function a(o){return o!=null&&o<=o?t[xp(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 Vp().domain(e).range(t).unknown(r)},pr.apply(a,arguments)}const ci=new Date,ui=new Date;function ze(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=>ze(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)=>(ci.setTime(+o),ui.setTime(+s),e(ci),e(ui),Math.floor(r(ci,ui))),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 ko=ze(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ko.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?ze(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):ko);ko.range;const Ft=1e3,yt=Ft*60,zt=yt*60,Wt=zt*24,Zl=Wt*7,Du=Wt*30,di=Wt*365,vr=ze(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ft)},(e,t)=>(t-e)/Ft,e=>e.getUTCSeconds());vr.range;const ec=ze(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ft)},(e,t)=>{e.setTime(+e+t*yt)},(e,t)=>(t-e)/yt,e=>e.getMinutes());ec.range;const tc=ze(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*yt)},(e,t)=>(t-e)/yt,e=>e.getUTCMinutes());tc.range;const rc=ze(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ft-e.getMinutes()*yt)},(e,t)=>{e.setTime(+e+t*zt)},(e,t)=>(t-e)/zt,e=>e.getHours());rc.range;const nc=ze(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*zt)},(e,t)=>(t-e)/zt,e=>e.getUTCHours());nc.range;const Ea=ze(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*yt)/Wt,e=>e.getDate()-1);Ea.range;const bs=ze(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Wt,e=>e.getUTCDate()-1);bs.range;const Ip=ze(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Wt,e=>Math.floor(e/Wt));Ip.range;function Vr(e){return ze(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)/Zl)}const xs=Vr(0),Uo=Vr(1),kv=Vr(2),Uv=Vr(3),fn=Vr(4),Dv=Vr(5),Lv=Vr(6);xs.range;Uo.range;kv.range;Uv.range;fn.range;Dv.range;Lv.range;function Ir(e){return ze(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)/Zl)}const vs=Ir(0),Do=Ir(1),Bv=Ir(2),Nv=Ir(3),gn=Ir(4),Fv=Ir(5),zv=Ir(6);vs.range;Do.range;Bv.range;Nv.range;gn.range;Fv.range;zv.range;const ac=ze(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());ac.range;const oc=ze(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());oc.range;const Jt=ze(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());Jt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ze(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)});Jt.range;const Yt=ze(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());Yt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ze(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)});Yt.range;function Mp(e,t,r,n,a,o){const s=[[vr,1,Ft],[vr,5,5*Ft],[vr,15,15*Ft],[vr,30,30*Ft],[o,1,yt],[o,5,5*yt],[o,15,15*yt],[o,30,30*yt],[a,1,zt],[a,3,3*zt],[a,6,6*zt],[a,12,12*zt],[n,1,Wt],[n,2,2*Wt],[r,1,Zl],[t,1,Du],[t,3,3*Du],[e,1,di]];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=zl(([,,y])=>y).right(s,h);if(p===s.length)return e.every(Hi(c/di,u/di,d));if(p===0)return ko.every(Math.max(Hi(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[Gv,Hv]=Mp(Yt,oc,vs,Ip,nc,tc),[qv,Wv]=Mp(Jt,ac,xs,Ea,rc,ec);function hi(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 pi(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 Ln(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function Jv(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=Bn(a),u=Nn(a),d=Bn(o),h=Nn(o),p=Bn(s),f=Nn(s),m=Bn(i),y=Nn(i),S=Bn(l),E=Nn(l),O={a:ae,A:te,b:se,B:W,c:null,d:Gu,e:Gu,f:y1,g:R1,G:_1,H:m1,I:f1,j:g1,L:jp,m:b1,M:x1,p:X,q:ue,Q:Wu,s:Ju,S:v1,u:S1,U:O1,V:w1,w:C1,W:P1,x:null,X:null,y:T1,Y:A1,Z:E1,"%":qu},C={a:ve,A:Ue,b:we,B:ct,c:null,d:Hu,e:Hu,f:j1,g:G1,G:q1,H:V1,I:I1,j:M1,L:kp,m:$1,M:k1,p:rt,q:be,Q:Wu,s:Ju,S:U1,u:D1,U:L1,V:B1,w:N1,W:F1,x:null,X:null,y:z1,Y:H1,Z:W1,"%":qu},T={a:b,A,b:G,B:_,c:F,d:Fu,e:Fu,f:u1,g:Nu,G:Bu,H:zu,I:zu,j:s1,L:c1,m:o1,M:i1,p:z,q:a1,Q:h1,s:p1,S:l1,u:Zv,U:e1,V:t1,w:Xv,W:r1,x:re,X:ee,y:Nu,Y:Bu,Z:n1,"%":d1};O.x=P(r,O),O.X=P(n,O),O.c=P(t,O),C.x=P(r,C),C.X=P(n,C),C.c=P(t,C);function P(Z,oe){return function(ce){var Y=[],xe=-1,me=0,We=Z.length,Ge,Me,er;for(ce instanceof Date||(ce=new Date(+ce));++xe<We;)Z.charCodeAt(xe)===37&&(Y.push(Z.slice(me,xe)),(Me=Lu[Ge=Z.charAt(++xe)])!=null?Ge=Z.charAt(++xe):Me=Ge==="e"?" ":"0",(er=oe[Ge])&&(Ge=er(ce,Me)),Y.push(Ge),me=xe+1);return Y.push(Z.slice(me,xe)),Y.join("")}}function w(Z,oe){return function(ce){var Y=Ln(1900,void 0,1),xe=I(Y,Z,ce+="",0),me,We;if(xe!=ce.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(oe&&!("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?(me=pi(Ln(Y.y,0,1)),We=me.getUTCDay(),me=We>4||We===0?Do.ceil(me):Do(me),me=bs.offset(me,(Y.V-1)*7),Y.y=me.getUTCFullYear(),Y.m=me.getUTCMonth(),Y.d=me.getUTCDate()+(Y.w+6)%7):(me=hi(Ln(Y.y,0,1)),We=me.getDay(),me=We>4||We===0?Uo.ceil(me):Uo(me),me=Ea.offset(me,(Y.V-1)*7),Y.y=me.getFullYear(),Y.m=me.getMonth(),Y.d=me.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),We="Z"in Y?pi(Ln(Y.y,0,1)).getUTCDay():hi(Ln(Y.y,0,1)).getDay(),Y.m=0,Y.d="W"in Y?(Y.w+6)%7+Y.W*7-(We+5)%7:Y.w+Y.U*7-(We+6)%7);return"Z"in Y?(Y.H+=Y.Z/100|0,Y.M+=Y.Z%100,pi(Y)):hi(Y)}}function I(Z,oe,ce,Y){for(var xe=0,me=oe.length,We=ce.length,Ge,Me;xe<me;){if(Y>=We)return-1;if(Ge=oe.charCodeAt(xe++),Ge===37){if(Ge=oe.charAt(xe++),Me=T[Ge in Lu?oe.charAt(xe++):Ge],!Me||(Y=Me(Z,ce,Y))<0)return-1}else if(Ge!=ce.charCodeAt(Y++))return-1}return Y}function z(Z,oe,ce){var Y=c.exec(oe.slice(ce));return Y?(Z.p=u.get(Y[0].toLowerCase()),ce+Y[0].length):-1}function b(Z,oe,ce){var Y=p.exec(oe.slice(ce));return Y?(Z.w=f.get(Y[0].toLowerCase()),ce+Y[0].length):-1}function A(Z,oe,ce){var Y=d.exec(oe.slice(ce));return Y?(Z.w=h.get(Y[0].toLowerCase()),ce+Y[0].length):-1}function G(Z,oe,ce){var Y=S.exec(oe.slice(ce));return Y?(Z.m=E.get(Y[0].toLowerCase()),ce+Y[0].length):-1}function _(Z,oe,ce){var Y=m.exec(oe.slice(ce));return Y?(Z.m=y.get(Y[0].toLowerCase()),ce+Y[0].length):-1}function F(Z,oe,ce){return I(Z,t,oe,ce)}function re(Z,oe,ce){return I(Z,r,oe,ce)}function ee(Z,oe,ce){return I(Z,n,oe,ce)}function ae(Z){return s[Z.getDay()]}function te(Z){return o[Z.getDay()]}function se(Z){return l[Z.getMonth()]}function W(Z){return i[Z.getMonth()]}function X(Z){return a[+(Z.getHours()>=12)]}function ue(Z){return 1+~~(Z.getMonth()/3)}function ve(Z){return s[Z.getUTCDay()]}function Ue(Z){return o[Z.getUTCDay()]}function we(Z){return l[Z.getUTCMonth()]}function ct(Z){return i[Z.getUTCMonth()]}function rt(Z){return a[+(Z.getUTCHours()>=12)]}function be(Z){return 1+~~(Z.getUTCMonth()/3)}return{format:function(Z){var oe=P(Z+="",O);return oe.toString=function(){return Z},oe},parse:function(Z){var oe=w(Z+="",!1);return oe.toString=function(){return Z},oe},utcFormat:function(Z){var oe=P(Z+="",C);return oe.toString=function(){return Z},oe},utcParse:function(Z){var oe=w(Z+="",!0);return oe.toString=function(){return Z},oe}}}var Lu={"-":"",_:" ",0:"0"},qe=/^\s*\d+/,Yv=/^%/,Kv=/[\\^$*+?|[\]().{}]/g;function ge(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 Qv(e){return e.replace(Kv,"\\$&")}function Bn(e){return new RegExp("^(?:"+e.map(Qv).join("|")+")","i")}function Nn(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function Xv(e,t,r){var n=qe.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function Zv(e,t,r){var n=qe.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function e1(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function t1(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function r1(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Bu(e,t,r){var n=qe.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Nu(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function n1(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 a1(e,t,r){var n=qe.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function o1(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Fu(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function s1(e,t,r){var n=qe.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function zu(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function i1(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function l1(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function c1(e,t,r){var n=qe.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function u1(e,t,r){var n=qe.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function d1(e,t,r){var n=Yv.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function h1(e,t,r){var n=qe.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function p1(e,t,r){var n=qe.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Gu(e,t){return ge(e.getDate(),t,2)}function m1(e,t){return ge(e.getHours(),t,2)}function f1(e,t){return ge(e.getHours()%12||12,t,2)}function g1(e,t){return ge(1+Ea.count(Jt(e),e),t,3)}function jp(e,t){return ge(e.getMilliseconds(),t,3)}function y1(e,t){return jp(e,t)+"000"}function b1(e,t){return ge(e.getMonth()+1,t,2)}function x1(e,t){return ge(e.getMinutes(),t,2)}function v1(e,t){return ge(e.getSeconds(),t,2)}function S1(e){var t=e.getDay();return t===0?7:t}function O1(e,t){return ge(xs.count(Jt(e)-1,e),t,2)}function $p(e){var t=e.getDay();return t>=4||t===0?fn(e):fn.ceil(e)}function w1(e,t){return e=$p(e),ge(fn.count(Jt(e),e)+(Jt(e).getDay()===4),t,2)}function C1(e){return e.getDay()}function P1(e,t){return ge(Uo.count(Jt(e)-1,e),t,2)}function T1(e,t){return ge(e.getFullYear()%100,t,2)}function R1(e,t){return e=$p(e),ge(e.getFullYear()%100,t,2)}function A1(e,t){return ge(e.getFullYear()%1e4,t,4)}function _1(e,t){var r=e.getDay();return e=r>=4||r===0?fn(e):fn.ceil(e),ge(e.getFullYear()%1e4,t,4)}function E1(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ge(t/60|0,"0",2)+ge(t%60,"0",2)}function Hu(e,t){return ge(e.getUTCDate(),t,2)}function V1(e,t){return ge(e.getUTCHours(),t,2)}function I1(e,t){return ge(e.getUTCHours()%12||12,t,2)}function M1(e,t){return ge(1+bs.count(Yt(e),e),t,3)}function kp(e,t){return ge(e.getUTCMilliseconds(),t,3)}function j1(e,t){return kp(e,t)+"000"}function $1(e,t){return ge(e.getUTCMonth()+1,t,2)}function k1(e,t){return ge(e.getUTCMinutes(),t,2)}function U1(e,t){return ge(e.getUTCSeconds(),t,2)}function D1(e){var t=e.getUTCDay();return t===0?7:t}function L1(e,t){return ge(vs.count(Yt(e)-1,e),t,2)}function Up(e){var t=e.getUTCDay();return t>=4||t===0?gn(e):gn.ceil(e)}function B1(e,t){return e=Up(e),ge(gn.count(Yt(e),e)+(Yt(e).getUTCDay()===4),t,2)}function N1(e){return e.getUTCDay()}function F1(e,t){return ge(Do.count(Yt(e)-1,e),t,2)}function z1(e,t){return ge(e.getUTCFullYear()%100,t,2)}function G1(e,t){return e=Up(e),ge(e.getUTCFullYear()%100,t,2)}function H1(e,t){return ge(e.getUTCFullYear()%1e4,t,4)}function q1(e,t){var r=e.getUTCDay();return e=r>=4||r===0?gn(e):gn.ceil(e),ge(e.getUTCFullYear()%1e4,t,4)}function W1(){return"+0000"}function qu(){return"%"}function Wu(e){return+e}function Ju(e){return Math.floor(+e/1e3)}var Jr,Dp,Lp;J1({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 J1(e){return Jr=Jv(e),Dp=Jr.format,Jr.parse,Lp=Jr.utcFormat,Jr.utcParse,Jr}function Y1(e){return new Date(e)}function K1(e){return e instanceof Date?+e:+new Date(+e)}function sc(e,t,r,n,a,o,s,i,l,c){var u=Pp(),d=u.invert,h=u.domain,p=c(".%L"),f=c(":%S"),m=c("%I:%M"),y=c("%I %p"),S=c("%a %d"),E=c("%b %d"),O=c("%B"),C=c("%Y");function T(P){return(l(P)<P?p:i(P)<P?f:s(P)<P?m:o(P)<P?y:n(P)<P?a(P)<P?S:E:r(P)<P?O:C)(P)}return u.invert=function(P){return new Date(d(P))},u.domain=function(P){return arguments.length?h(Array.from(P,K1)):h().map(Y1)},u.ticks=function(P){var w=h();return e(w[0],w[w.length-1],P??10)},u.tickFormat=function(P,w){return w==null?T:c(w)},u.nice=function(P){var w=h();return(!P||typeof P.range!="function")&&(P=t(w[0],w[w.length-1],P??10)),P?h(_p(w,P)):u},u.copy=function(){return ys(u,sc(e,t,r,n,a,o,s,i,l,c))},u}function Bp(){return pr.apply(sc(qv,Wv,Jt,ac,xs,Ea,rc,ec,vr,Dp).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Q1(){return pr.apply(sc(Gv,Hv,Yt,oc,vs,bs,nc,tc,vr,Lp).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function X1(){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(gs),c.rangeRound=u(Cp),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 Z1(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Np(){var e=Ql(X1()(gt));return e.copy=function(){return Z1(e,Np())},Lx.apply(e,arguments)}function eS(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 tS(e){return e.scaleType==="band"}function rS(e){return e.scaleType==="point"}function nS(e){return e.type==="piecewise"?Vp(e.thresholds,e.colors):Np([e.min??0,e.max??100],e.color)}function Lo(e){return e.values?Io(e.values,e.colors).unknown(e.unknownColor??null):Io(e.colors.map((t,r)=>r),e.colors).unknown(e.unknownColor??null)}function bo(e){return e.type==="ordinal"?Lo(e):nS(e)}function aS(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 oS(e,t){return t[1]-t[0]===0?1:e/((t[1]-t[0])/100)}function Yi(e,t,r){switch(e){case"log":return Ep(t,r);case"pow":return Xl(t,r);case"sqrt":return $v(t,r);case"time":return Bp(t,r);case"utc":return Q1(t,r);default:return Ap(t,r)}}const Yu=e=>(e==null?void 0:e[0])instanceof Date;function Ku(e,t){const r=Bp(e.data,t);return(n,{location:a})=>a==="tick"?r.tickFormat(e.tickNumber)(n):`${n.toLocaleString()}`}const mi=(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 Qu,Xu;class sS{constructor(){if(this.types=new Set,Qu)throw new Error("You can only create one instance!");Qu=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}class iS{constructor(){if(this.types=new Set,Xu)throw new Error("You can only create one instance!");Xu=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}const Ss=new sS;Ss.addType("bar");Ss.addType("line");Ss.addType("scatter");const lS=new iS;lS.addType("radar");function Fp(e){return Ss.getTypes().has(e)}const cS=(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)]},zp=(e,t,r,n,a,o)=>{const i=Object.keys(r).filter(Fp).reduce((l,c)=>cS(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},uS=(e,t,r,n)=>{const a=new Set;return Object.keys(t).filter(Fp).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},dS=(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 hS(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 pS=.2,mS=.1;function Gp({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=uS(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),y=m?[m.start,m.end]:[0,100],S=hS(e,a,p),[E,O]=zp(p,a,n,h,t,m===void 0&&!f?i:void 0),C=!p.ignoreTooltip&&c.has(p.id),T=p.data??[];if(tS(p)){const ae=p.categoryGapRatio??pS,te=p.barGapRatio??mS,se=a==="y"?[S[1],S[0]]:S,W=mi(se,y);if(u[p.id]=K({offset:0,height:0,categoryGapRatio:ae,barGapRatio:te,triggerTooltip:C},p,{data:T,scale:Gl(p.data,W).paddingInner(ae).paddingOuter(ae/2),tickNumber:p.data.length,colorScale:p.colorMap&&(p.colorMap.type==="ordinal"?Lo(K({values:p.data},p.colorMap)):bo(p.colorMap))}),Yu(p.data)){const X=Ku(p,se);u[p.id].valueFormatter=p.valueFormatter??X}}if(rS(p)){const ae=a==="y"?[...S].reverse():S,te=mi(ae,y);if(u[p.id]=K({offset:0,height:0,triggerTooltip:C},p,{data:T,scale:Bx(p.data,te),tickNumber:p.data.length,colorScale:p.colorMap&&(p.colorMap.type==="ordinal"?Lo(K({values:p.data},p.colorMap)):bo(p.colorMap))}),Yu(p.data)){const se=Ku(p,ae);u[p.id].valueFormatter=p.valueFormatter??se}}if(p.scaleType==="band"||p.scaleType==="point")return;const P=p.scaleType??"linear",w=l?dS(p,a,h,t):p.domainLimit??"nice",I=[p.min??E,p.max??O];if(typeof w=="function"){const{min:ae,max:te}=w(E,O);I[0]=ae,I[1]=te}const z=aS(K({},p,{range:S,domain:I})),b=oS(z,y),A=mi(S,y),G=Yi(P,I,A),_=w==="nice"?G.nice(z):G,[F,re]=_.domain(),ee=[p.min??F,p.max??re];u[p.id]=K({offset:0,height:0,triggerTooltip:C},p,{data:T,scaleType:P,scale:_.domain(ee),tickNumber:b,colorScale:p.colorMap&&bo(p.colorMap),valueFormatter:p.valueFormatter??eS(b,Yi(P,S.map(ae=>G.invert(ae)),S))})}),{axis:u,axisIds:r.map(({id:d})=>d)}}function fS(e){return e!=null}function Hp({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:a}){return(o,s)=>{var y;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,(((y=o.data)==null?void 0:y.length)??1)-1]:c=zp(o,a,r,s,n);let d,h;[d,h]=Yi(!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 C;const O=S[a]??((C=o.data)==null?void 0:C[E]);return O==null?!0:o.scaleType==="point"||o.scaleType==="band"||typeof O=="string"?E>=f&&E<=m:O>=f&&O<=m}}}const gS=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(fS).every(d=>d(o,s))},Zu=e=>(t=[])=>t.reduce((r,n)=>{const{zoom:a,id:o}=n,s=Fl(a,o,e);return s&&(r[o]=s),r},{}),yS=e=>{const t=new Map;return e.forEach(r=>{t.set(r.axisId,r)}),t},qp=e=>e.zoom;pe([qp],e=>e==null?void 0:e.isInteracting);const Os=pe([qp],e=>(e==null?void 0:e.zoomData)&&yS(e==null?void 0:e.zoomData)),Va=pe([wn,Cn],(e,t)=>K({},Zu("x")(e),Zu("y")(t)));pe([Va,(e,t)=>t],(e,t)=>e[t]);const bS=pe([Os,Va,fs,Ra],(e,t,r,n)=>e&&t&&Hp({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:"x"})),xS=pe([Os,Va,fs,Ra],(e,t,r,n)=>e&&t&&Hp({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:"y"})),Wp=pe([bS,xS,wn,Cn],(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 gS(K({},a,o))}),Mr=pe([wn,Ta,Ra,fs,Os,Va,Wp,cp],(e,t,r,n,a,o,s,i)=>Gp({drawingArea:t,formattedSeries:r,axis:e,seriesConfig:n,axisDirection:"x",zoomMap:a,zoomOptions:o,getFilters:s,preferStrictDomainInLineCharts:i})),jr=pe([Cn,Ta,Ra,fs,Os,Va,Wp,cp],(e,t,r,n,a,o,s,i)=>Gp({drawingArea:t,formattedSeries:r,axis:e,seriesConfig:n,axisDirection:"y",zoomMap:a,zoomOptions:o,getFilters:s,preferStrictDomainInLineCharts:i}));pe([Mr,jr,(e,t)=>t],(e,t,r)=>(e==null?void 0:e.axis[r])??(t==null?void 0:t.axis[r]));pe([wn,Cn,(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 Jp(e){return e.bandwidth!==void 0}function Yr(e){return e instanceof Date?e.getTime():e}function yn(e,t){const{scale:r,data:n,reverse:a}=e;if(!Jp(r)){const s=r.invert(t);if(n===void 0)return-1;const i=Yr(s);return n==null?void 0:n.findIndex((c,u)=>{const d=Yr(c);return d>i&&(u===0||Math.abs(i-d)<=Math.abs(i-Yr(n[u-1])))||d<=i&&(u===n.length-1||Math.abs(Yr(s)-d)<Math.abs(Yr(s)-Yr(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 ed(e,t,r){const{scale:n,data:a}=e;if(!Jp(n)){const o=n.invert(t);return r<0?o:a[r]}return r<0||r>=a.length?null:a[r]}function td(e,t){const r=e.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r.matrixTransform(e.getScreenCTM().inverse())}function Gt(e){const t=N.useRef(e);return $t(()=>{t.current=e}),N.useRef((...r)=>(0,t.current)(...r)).current}const vS=Object.is;function Yp(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,!vS(e[a],t[a])||!(a in t))return!1;for(const a in t)n+=1;return r===n}const ic=({store:e})=>{const t=Gt(function(){e.update(s=>K({},s,{interaction:{pointer:null,item:null}}))}),r=Gt(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=Gt(function(s){e.update(i=>Yp(i.interaction.item,s)?i:K({},i,{interaction:K({},i.interaction,{item:s})}))}),a=Gt(function(s){e.update(i=>K({},i,{interaction:K({},i.interaction,{pointer:s})}))});return{instance:{cleanInteraction:t,setItemInteraction:n,removeItemInteraction:r,setPointerCoordinate:a}}};ic.getInitialState=()=>({interaction:{item:null,pointer:null}});ic.params={};const lc=e=>e.interaction,SS=pe([lc],e=>e!==void 0),OS=pe([lc],e=>(e==null?void 0:e.item)??null),Kp=pe([lc],e=>(e==null?void 0:e.pointer)??null),ws=pe([Kp],e=>e&&e.x),Cs=pe([Kp],e=>e&&e.y);pe([OS],e=>e!==null);function oa(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(!oa(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(!oa(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(!oa(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}const Ps=(e,t)=>t;function Ki(e,t,r=t.axisIds[0]){return Array.isArray(r)?r.map(n=>yn(t.axis[n],e)):yn(t.axis[r],e)}const Qp=(e,t,r)=>{if(e===null)return null;const n=Ki(e,t,r);return n===-1?null:n},wS=pe([ws,Mr,Ps],Qp),CS=pe([Cs,jr,Ps],Qp),PS=pe([ws,Cs,Mr,jr],(e,t,r,n)=>[...e===null?[]:r.axisIds.map(a=>({axisId:a,dataIndex:Ki(e,r,a)})),...t===null?[]:n.axisIds.map(a=>({axisId:a,dataIndex:Ki(t,n,a)}))].filter(a=>a.dataIndex!==null&&a.dataIndex>=0));function Xp(e,t,r,n=t.axisIds[0]){return Array.isArray(n)?n.map((a,o)=>ed(t.axis[a],e,r[o])):ed(t.axis[n],e,r)}pe([ws,Mr,wS,Ps],(e,t,r,n)=>e===null||r===null||t.axisIds.length===0?null:Xp(e,t,r,n));pe([Cs,jr,CS,Ps],(e,t,r,n)=>e===null||r===null||t.axisIds.length===0?null:Xp(e,t,r,n));const TS=pe([ws,Mr],(e,t)=>e===null?[]:t.axisIds.filter(r=>t.axis[r].triggerTooltip).map(r=>({axisId:r,dataIndex:yn(t.axis[r],e)})).filter(({dataIndex:r})=>r>=0),{memoizeOptions:{resultEqualityCheck:oa}}),RS=pe([Cs,jr],(e,t)=>e===null?[]:t.axisIds.filter(r=>t.axis[r].triggerTooltip).map(r=>({axisId:r,dataIndex:yn(t.axis[r],e)})).filter(({dataIndex:r})=>r>=0),{memoizeOptions:{resultEqualityCheck:oa}});pe([TS,RS],(e,t)=>e.length>0||t.length>0);const rd={};function AS(e,t){const r=N.useRef(rd);return r.current===rd&&(r.current=e(t)),r}const _S=()=>{};function ES(e,t,r,n){const a=AS(VS,{store:e,selector:t,skip:n}).current;a.effect=r,N.useEffect(a.onMount(n),[n])}function VS(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:_S,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 Ts=({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(T=>T.id).map(T=>T.id),C=new Set(O.filter((T,P)=>O.indexOf(T)!==P));C.size>0&&da([`MUI X Charts: The following axis ids are duplicated: ${Array.from(C).join(", ")}.`,"Please make sure that each axis has a unique id."].join(`
117
+ `),"error")}const c=st(t,Ta),u=st(t,Ra),d=st(t,SS),{axis:h,axisIds:p}=st(t,Mr),{axis:f,axisIds:m}=st(t,jr);mp({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 y=N.useRef(!0);N.useEffect(()=>{if(y.current){y.current=!1;return}t.update(O=>K({},O,{cartesianAxis:K({},O.cartesianAxis,{x:yp(o,i),y:bp(s,i)})}))},[r,c,o,s,i,t]);const S=p[0],E=m[0];return ES(t,PS,(O,C)=>{if(!Object.is(O,C)){if(O.length!==C.length){l(C);return}O!=null&&O.some(({axisId:T,dataIndex:P},w)=>C[w].axisId!==T||C[w].dataIndex!==P)&&l(C)}},!l),N.useEffect(()=>{const O=n.current;if(!d||!O||e.disableAxisListener)return()=>{};const C=a.addInteractionListener("moveEnd",A=>{var G;A.detail.activeGestures.pan||(G=a.cleanInteraction)==null||G.call(a)}),T=a.addInteractionListener("panEnd",A=>{var G;A.detail.activeGestures.move||(G=a.cleanInteraction)==null||G.call(a)}),P=a.addInteractionListener("quickPressEnd",A=>{var G;!A.detail.activeGestures.move&&!A.detail.activeGestures.pan&&((G=a.cleanInteraction)==null||G.call(a))}),w=A=>{var re,ee;const G=A.detail.srcEvent,_=A.detail.target,F=td(O,G);if(A.detail.srcEvent.buttons>=1&&(_!=null&&_.hasPointerCapture(A.detail.srcEvent.pointerId))&&!(_!=null&&_.closest("[data-charts-zoom-slider]"))&&(_==null||_.releasePointerCapture(A.detail.srcEvent.pointerId)),!a.isPointInside(F.x,F.y,_)){(re=a.cleanInteraction)==null||re.call(a);return}(ee=a.setPointerCoordinate)==null||ee.call(a,F)},I=a.addInteractionListener("move",w),z=a.addInteractionListener("pan",w),b=a.addInteractionListener("quickPress",w);return()=>{I.cleanup(),C.cleanup(),z.cleanup(),T.cleanup(),b.cleanup(),P.cleanup()}},[n,t,h,S,f,E,a,e.disableAxisListener,d]),N.useEffect(()=>{const O=n.current,C=e.onAxisClick;if(O===null||!C)return()=>{};const T=a.addInteractionListener("tap",P=>{let w=null,I=!1;const z=td(O,P.detail.srcEvent),b=yn(h[S],z.x);I=b!==-1,w=I?b:yn(f[E],z.y);const A=I?p[0]:m[0];if(w==null||w===-1)return;const G=(I?h:f)[A].data[w],_={};Object.keys(u).filter(F=>["bar","line"].includes(F)).forEach(F=>{var re;(re=u[F])==null||re.seriesOrder.forEach(ee=>{const ae=u[F].series[ee],te=ae.xAxisId,se=ae.yAxisId,W=I?te:se;(W===void 0||W===A)&&(_[ee]=ae.data[w])})}),C(P.detail.srcEvent,{dataIndex:w,axisValue:G,seriesValues:_})});return()=>{T.cleanup()}},[e.onAxisClick,u,n,h,p,f,m,S,E,a]),{}};Ts.params={xAxis:!0,yAxis:!0,dataset:!0,onAxisClick:!0,disableAxisListener:!0,onHighlightedAxisChange:!0,highlightedAxis:!0};Ts.getDefaultizedParams=({params:e})=>K({},e,{colors:e.colors??up,theme:e.theme??"light",defaultizedXAxis:yp(e.xAxis,e.dataset),defaultizedYAxis:bp(e.yAxis,e.dataset)});Ts.getInitialState=e=>K({cartesianAxis:{x:e.defaultizedXAxis,y:e.defaultizedYAxis}},e.highlightedAxis===void 0?{}:{controlledCartesianAxisHighlight:e.highlightedAxis});function nd(e,t){return e.id!==void 0?e:K({id:t},e)}function ad(e){return e.colorMap?K({},e,{colorScale:e.colorMap.type==="ordinal"&&e.data?Lo(K({values:e.data},e.colorMap)):bo(e.colorMap.type==="continuous"?K({min:e.min,max:e.max},e.colorMap):e.colorMap)}):e}function Zp(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]=ad(nd(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]=ad(nd(K({},a,{data:t.map(l=>l[s])}),i)),n.push(i)}),{axis:r,axisIds:n}}const cc=({params:e,store:t})=>{const{zAxis:r,dataset:n}=e,a=N.useRef(!0);return N.useEffect(()=>{if(a.current){a.current=!1;return}t.update(o=>K({},o,{zAxis:Zp(r,n)}))},[r,n,t]),{}};cc.params={zAxis:!0,dataset:!0};cc.getInitialState=e=>({zAxis:Zp(e.zAxis,e.dataset)});const IS=e=>e,MS=pe([IS],e=>e.zAxis),Rs=({store:e,params:t})=>{mp({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=Gt(()=>{var a;(a=t.onHighlightChange)==null||a.call(t,null),e.update(o=>K({},o,{highlight:{item:null}}))}),n=Gt(a=>{var s;const o=e.getSnapshot().highlight.item;Yp(o,a)||((s=t.onHighlightChange)==null||s.call(t,a),e.update(i=>K({},i,{highlight:{item:a}})))});return{instance:{clearHighlight:r,setHighlight:n}}};Rs.getDefaultizedParams=({params:e})=>K({},e,{highlightedItem:e.highlightedItem??null});Rs.getInitialState=e=>({highlight:{item:e.highlightedItem}});Rs.params={highlightedItem:!0,onHighlightChange:!0};const od=(e,t)=>t==="x"?{x:e,y:null}:{x:null,y:e},em=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]},tm=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(od(p[0],e),f)||!c(od(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])},jS=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?tm("x")(e):em(e),$S=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?em(e):tm("y")(e);function Fe(e){return function(){return e}}const sd=Math.abs,Qe=Math.atan2,fr=Math.cos,kS=Math.max,fi=Math.min,_t=Math.sin,an=Math.sqrt,at=1e-12,ga=Math.PI,Bo=ga/2,xo=2*ga;function US(e){return e>1?0:e<-1?ga:Math.acos(e)}function id(e){return e>=1?Bo:e<=-1?-Bo:Math.asin(e)}const Qi=Math.PI,Xi=2*Qi,yr=1e-6,DS=Xi-yr;function rm(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function LS(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return rm;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 BS{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?rm:LS(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>yr)if(!(Math.abs(d*l-c*u)>yr)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-s,f=a-i,m=l*l+c*c,y=p*p+f*f,S=Math.sqrt(m),E=Math.sqrt(h),O=o*Math.tan((Qi-Math.acos((m+h-y)/(2*S*E)))/2),C=O/E,T=O/S;Math.abs(C-1)>yr&&this._append`L${t+C*u},${r+C*d}`,this._append`A${o},${o},0,0,${+(d*p>u*f)},${this._x1=t+T*l},${this._y1=r+T*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)>yr||Math.abs(this._y1-u)>yr)&&this._append`L${c},${u}`,n&&(h<0&&(h=h%Xi+Xi),h>DS?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>yr&&this._append`A${n},${n},0,${+(h>=Qi)},${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 NS(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 BS(t)}function FS(e){return e.innerRadius}function zS(e){return e.outerRadius}function GS(e){return e.startAngle}function HS(e){return e.endAngle}function qS(e){return e&&e.padAngle}function WS(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<at))return h=(u*(t-o)-d*(e-a))/h,[e+h*l,t+h*c]}function Za(e,t,r,n,a,o,s){var i=e-r,l=t-n,c=(s?o:-o)/an(i*i+l*l),u=c*l,d=-c*i,h=e+u,p=t+d,f=r+u,m=n+d,y=(h+f)/2,S=(p+m)/2,E=f-h,O=m-p,C=E*E+O*O,T=a-o,P=h*m-f*p,w=(O<0?-1:1)*an(kS(0,T*T*C-P*P)),I=(P*O-E*w)/C,z=(-P*E-O*w)/C,b=(P*O+E*w)/C,A=(-P*E+O*w)/C,G=I-y,_=z-S,F=b-y,re=A-S;return G*G+_*_>F*F+re*re&&(I=b,z=A),{cx:I,cy:z,x01:-u,y01:-d,x11:I*(a/T-1),y11:z*(a/T-1)}}function nm(){var e=FS,t=zS,r=Fe(0),n=null,a=GS,o=HS,s=qS,i=null,l=NS(c);function c(){var u,d,h=+e.apply(this,arguments),p=+t.apply(this,arguments),f=a.apply(this,arguments)-Bo,m=o.apply(this,arguments)-Bo,y=sd(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(y>xo-at)i.moveTo(p*fr(f),p*_t(f)),i.arc(0,0,p,f,m,!S),h>at&&(i.moveTo(h*fr(m),h*_t(m)),i.arc(0,0,h,m,f,S));else{var E=f,O=m,C=f,T=m,P=y,w=y,I=s.apply(this,arguments)/2,z=I>at&&(n?+n.apply(this,arguments):an(h*h+p*p)),b=fi(sd(p-h)/2,+r.apply(this,arguments)),A=b,G=b,_,F;if(z>at){var re=id(z/h*_t(I)),ee=id(z/p*_t(I));(P-=re*2)>at?(re*=S?1:-1,C+=re,T-=re):(P=0,C=T=(f+m)/2),(w-=ee*2)>at?(ee*=S?1:-1,E+=ee,O-=ee):(w=0,E=O=(f+m)/2)}var ae=p*fr(E),te=p*_t(E),se=h*fr(T),W=h*_t(T);if(b>at){var X=p*fr(O),ue=p*_t(O),ve=h*fr(C),Ue=h*_t(C),we;if(y<ga)if(we=WS(ae,te,ve,Ue,X,ue,se,W)){var ct=ae-we[0],rt=te-we[1],be=X-we[0],Z=ue-we[1],oe=1/_t(US((ct*be+rt*Z)/(an(ct*ct+rt*rt)*an(be*be+Z*Z)))/2),ce=an(we[0]*we[0]+we[1]*we[1]);A=fi(b,(h-ce)/(oe-1)),G=fi(b,(p-ce)/(oe+1))}else A=G=0}w>at?G>at?(_=Za(ve,Ue,ae,te,p,G,S),F=Za(X,ue,se,W,p,G,S),i.moveTo(_.cx+_.x01,_.cy+_.y01),G<b?i.arc(_.cx,_.cy,G,Qe(_.y01,_.x01),Qe(F.y01,F.x01),!S):(i.arc(_.cx,_.cy,G,Qe(_.y01,_.x01),Qe(_.y11,_.x11),!S),i.arc(0,0,p,Qe(_.cy+_.y11,_.cx+_.x11),Qe(F.cy+F.y11,F.cx+F.x11),!S),i.arc(F.cx,F.cy,G,Qe(F.y11,F.x11),Qe(F.y01,F.x01),!S))):(i.moveTo(ae,te),i.arc(0,0,p,E,O,!S)):i.moveTo(ae,te),!(h>at)||!(P>at)?i.lineTo(se,W):A>at?(_=Za(se,W,X,ue,h,-A,S),F=Za(ae,te,ve,Ue,h,-A,S),i.lineTo(_.cx+_.x01,_.cy+_.y01),A<b?i.arc(_.cx,_.cy,A,Qe(_.y01,_.x01),Qe(F.y01,F.x01),!S):(i.arc(_.cx,_.cy,A,Qe(_.y01,_.x01),Qe(_.y11,_.x11),!S),i.arc(0,0,h,Qe(_.cy+_.y11,_.cx+_.x11),Qe(F.cy+F.y11,F.cx+F.x11),S),i.arc(F.cx,F.cy,A,Qe(F.y11,F.x11),Qe(F.y01,F.x01),!S))):i.arc(0,0,h,T,C,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-ga/2;return[fr(d)*u,_t(d)*u]},c.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:Fe(+u),c):e},c.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:Fe(+u),c):t},c.cornerRadius=function(u){return arguments.length?(r=typeof u=="function"?u:Fe(+u),c):r},c.padRadius=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:Fe(+u),c):n},c.startAngle=function(u){return arguments.length?(a=typeof u=="function"?u:Fe(+u),c):a},c.endAngle=function(u){return arguments.length?(o=typeof u=="function"?u:Fe(+u),c):o},c.padAngle=function(u){return arguments.length?(s=typeof u=="function"?u:Fe(+u),c):s},c.context=function(u){return arguments.length?(i=u??null,c):i},c}function am(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function JS(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function YS(e){return e}function KS(){var e=YS,t=JS,r=null,n=Fe(0),a=Fe(xo),o=Fe(0);function s(i){var l,c=(i=am(i)).length,u,d,h=0,p=new Array(c),f=new Array(c),m=+n.apply(this,arguments),y=Math.min(xo,Math.max(-xo,a.apply(this,arguments)-m)),S,E=Math.min(Math.abs(y)/c,o.apply(this,arguments)),O=E*(y<0?-1:1),C;for(l=0;l<c;++l)(C=f[p[l]=l]=+e(i[l],l,i))>0&&(h+=C);for(t!=null?p.sort(function(T,P){return t(f[T],f[P])}):r!=null&&p.sort(function(T,P){return r(i[T],i[P])}),l=0,d=h?(y-c*O)/h:0;l<c;++l,m=S)u=p[l],C=f[u],S=m+(C>0?C*d:0)+O,f[u]={data:i[u],index:l,value:C,startAngle:m,endAngle:S,padAngle:E};return f}return s.value=function(i){return arguments.length?(e=typeof i=="function"?i:Fe(+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:Fe(+i),s):n},s.endAngle=function(i){return arguments.length?(a=typeof i=="function"?i:Fe(+i),s):a},s.padAngle=function(i){return arguments.length?(o=typeof i=="function"?i:Fe(+i),s):o},s}function bn(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 xn(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function QS(e,t){return e[t]}function XS(e){const t=[];return t.key=e,t}function om(){var e=Fe([]),t=xn,r=bn,n=QS;function a(o){var s=Array.from(e.apply(this,arguments),XS),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=am(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:Fe(Array.from(o)),a):e},a.value=function(o){return arguments.length?(n=typeof o=="function"?o:Fe(+o),a):n},a.order=function(o){return arguments.length?(t=o==null?xn:typeof o=="function"?o:Fe(Array.from(o)),a):t},a.offset=function(o){return arguments.length?(r=o??bn,a):r},a}function ZS(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}bn(e,t)}}function eO(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 tO(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}bn(e,t)}}function rO(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]],y=m[n][1]||0,S=m[n-1][1]||0;p+=y-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,bn(e,t)}}function sm(e){var t=e.map(nO);return xn(e).sort(function(r,n){return t[r]-t[n]})}function nO(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 im(e){var t=e.map(lm);return xn(e).sort(function(r,n){return t[r]-t[n]})}function lm(e){for(var t=0,r=-1,n=e.length,a;++r<n;)(a=+e[r][1])&&(t+=a);return t}function aO(e){return im(e).reverse()}function oO(e){var t=e.length,r,n,a=e.map(lm),o=sm(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 sO(e){return xn(e).reverse()}const gi={appearance:sm,ascending:im,descending:aO,insideOut:oO,none:xn,reverse:sO},yi={expand:ZS,diverging:eO,none:bn,silhouette:tO,wiggle:rO},cm=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:gi.none,stackingOffset:yi.none}):o[i]===void 0?(o[i]=a.length,a.push({ids:[s],stackingOrder:gi[l??(n==null?void 0:n.stackOrder)??"none"],stackingOffset:yi[c??(n==null?void 0:n.stackOffset)??"diverging"]})):(a[o[i]].ids.push(s),l!==void 0&&(a[o[i]].stackingOrder=gi[l]),c!==void 0&&(a[o[i]].stackingOffset=yi[c]))}),a},iO=e=>e==null?"":e.toLocaleString(),lO=(e,t)=>{const{seriesOrder:r,series:n}=e,a=cm(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 a.forEach(i=>{const{ids:l,stackingOffset:c,stackingOrder:u}=i,d=om().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)(o);l.forEach((h,p)=>{const f=n[h].dataKey;s[h]=K({layout:"vertical",labelMarkType:"square",minBarSize:0,valueFormatter:n[h].valueFormatter??iO},n[h],{data:f?t.map(m=>{const y=m[f];return typeof y!="number"?(process.env.NODE_ENV!=="production"&&y!==null&&da([`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):y}):n[h].data,stackedData:d[p].map(([m,y])=>[m,y])})})}),{seriesOrder:r,stackingGroups:a,series:s}};function Kt(e,t){return typeof e=="function"?e(t):e}const cO=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,a)=>{const o=Kt(r[a].label,"legend");return o===void 0||n.push({markType:r[a].labelMarkType,id:a,seriesId:a,color:r[a].color,label:o}),n},[])},uO=(e,t,r)=>{const n=e.layout==="vertical",a=n?t==null?void 0:t.colorScale:r==null?void 0:r.colorScale,o=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 o?i=>{if(i===void 0)return e.color;const l=e.data[i],c=l===null?e.color:o(l);return c===null?e.color:c}:a&&s?i=>{if(i===void 0)return e.color;const l=s[i],c=l===null?e.color:a(l);return c===null?e.color:c}:()=>e.color},dO=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const a=Kt(t.label,"tooltip"),o=t.data[n.dataIndex];if(o==null)return null;const s=t.valueFormatter(o,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:a,value:o,formattedValue:s,markType:t.labelMarkType}},hO=e=>Object.values(e).map(t=>t.layout==="horizontal"?{direction:"y",axisId:t.yAxisId}:{direction:"x",axisId:t.xAxisId}),pO=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`,color:r[t%r.length]},e),mO={seriesProcessor:lO,colorProcessor:uO,legendGetter:cO,tooltipGetter:dO,axisTooltipGetter:hO,xExtremumGetter:jS,yExtremumGetter:$S,getSeriesWithDefaultValues:pO},No=(e,t)=>[t[0]===null?e[0]:Math.min(e[0],t[0]),t[1]===null?e[1]:Math.max(e[1],t[1])],fO=e=>{const{series:t,axis:r,isDefaultAxis:n,getFilters:a}=e;return Object.keys(t).filter(o=>{const s=t[o].xAxisId;return s===r.id||s===void 0&&n}).reduce((o,s)=>{var c;const i=a==null?void 0:a({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:No(u,[d.x,d.x]),[1/0,-1/0]);return No(o,l??[1/0,-1/0])},[1/0,-1/0])},gO=e=>{const{series:t,axis:r,isDefaultAxis:n,getFilters:a}=e;return Object.keys(t).filter(o=>{const s=t[o].yAxisId;return s===r.id||s===void 0&&n}).reduce((o,s)=>{var c;const i=a==null?void 0:a({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:No(u,[d.y,d.y]),[1/0,-1/0]);return No(o,l??[1/0,-1/0])},[1/0,-1/0])},yO=({series:e,seriesOrder:t},r)=>({series:Object.fromEntries(Object.entries(e).map(([a,o])=>{const s=o==null?void 0:o.datasetKeys,i=["x","y","id"].filter(c=>typeof(s==null?void 0:s[c])!="string");if(o!=null&&o.datasetKeys&&i.length>0)throw new Error([`MUI X Charts: scatter series with id='${a}' has incomplete datasetKeys.`,`Properties ${i.map(c=>`"${c}"`).join(", ")} are missing.`].join(`
119
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]})))??[]:o.data??[];return[a,K({labelMarkType:"circle",markerSize:4},o,{preview:K({markerSize:1},o==null?void 0:o.preview),data:l,valueFormatter:o.valueFormatter??(c=>c&&`(${c.x}, ${c.y})`)})]})),seriesOrder:t}),bO=(e,t,r,n)=>{const a=n==null?void 0:n.colorScale,o=r==null?void 0:r.colorScale,s=t==null?void 0:t.colorScale;return a?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=a((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:a(l.z);return c===null?e.color:c}:o?i=>{if(i===void 0)return e.color;const l=e.data[i],c=l===null?e.color:o(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},xO=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,a)=>{const o=Kt(r[a].label,"legend");return o===void 0||n.push({markType:r[a].labelMarkType,id:a,seriesId:a,color:r[a].color,label:o}),n},[])},vO=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const a=Kt(t.label,"tooltip"),o=t.data[n.dataIndex],s=t.valueFormatter(o,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:a,value:o,formattedValue:s,markType:t.labelMarkType}},SO=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`,color:r[t%r.length]},e),OO={seriesProcessor:yO,colorProcessor:bO,legendGetter:xO,tooltipGetter:vO,xExtremumGetter:fO,yExtremumGetter:gO,getSeriesWithDefaultValues:SO},wO=e=>{const{axis:t}=e,r=Math.min(...t.data??[]),n=Math.max(...t.data??[]);return[r,n]};function CO(e,t,r,n){return r.reduce((a,o,s)=>{if(t[s]===null)return a;const[i,l]=e(o);return n&&(!n({y:i,x:null},s)||!n({y:l,x:null},s))?a:[Math.min(i,l,a[0]),Math.max(i,l,a[1])]},[1/0,-1/0])}const PO=e=>{const{series:t,axis:r,isDefaultAxis:n,getFilters:a}=e;return Object.keys(t).filter(o=>{const s=t[o].yAxisId;return s===r.id||n&&s===void 0}).reduce((o,s)=>{const{area:i,stackedData:l,data:c}=t[s],u=i!==void 0,d=a==null?void 0:a({currentAxisId:r.id,isDefaultAxis:n,seriesXAxisId:t[s].xAxisId,seriesYAxisId:t[s].yAxisId}),h=u&&r.scaleType!=="log"&&typeof t[s].baseline!="string"?y=>y:y=>[y[1],y[1]],p=CO(h,c,l,d),[f,m]=p;return[Math.min(f,o[0]),Math.max(m,o[1])]},[1/0,-1/0])};function TO(e,t){const r={};return Object.keys(e).forEach(n=>{r[n]=K({},e[n],{valueFormatter:e[n].valueFormatter??t})}),r}const RO=(e,t)=>{const{seriesOrder:r,series:n}=e,a=cm(K({},e,{defaultStrategy:{stackOffset:"none"}})),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&&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 a.forEach(i=>{const{ids:l,stackingOrder:c,stackingOffset:u}=i,d=om().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)(o);l.forEach((h,p)=>{const f=n[h].dataKey;s[h]=K({labelMarkType:"line"},n[h],{data:f?t.map(m=>{const y=m[f];return typeof y!="number"?(process.env.NODE_ENV!=="production"&&y!==null&&da([`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):y}):n[h].data,stackedData:d[p].map(([m,y])=>[m,y])})})}),{seriesOrder:r,stackingGroups:a,series:TO(s,i=>i==null?"":i.toLocaleString())}},AO=(e,t,r)=>{const n=r==null?void 0:r.colorScale,a=t==null?void 0:t.colorScale;return n?o=>{if(o===void 0)return e.color;const s=e.data[o],i=s===null?e.color:n(s);return i===null?e.color:i}:a?o=>{var l;if(o===void 0)return e.color;const s=(l=t.data)==null?void 0:l[o],i=s===null?e.color:a(s);return i===null?e.color:i}:()=>e.color},_O=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,a)=>{const o=Kt(r[a].label,"legend");return o===void 0||n.push({markType:r[a].labelMarkType,id:a,seriesId:a,color:r[a].color,label:o}),n},[])},EO=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const a=Kt(t.label,"tooltip"),o=t.data[n.dataIndex],s=t.valueFormatter(o,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:a,value:o,formattedValue:s,markType:t.labelMarkType}},VO=e=>Object.values(e).map(t=>({direction:"x",axisId:t.xAxisId})),IO=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`,color:r[t%r.length]},e),MO={colorProcessor:AO,seriesProcessor:RO,legendGetter:_O,tooltipGetter:EO,axisTooltipGetter:VO,xExtremumGetter:wO,yExtremumGetter:PO,getSeriesWithDefaultValues:IO},jO=(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}},kO=e=>{const{seriesOrder:t,series:r}=e,n={};return t.forEach(a=>{const o=KS().startAngle(2*Math.PI*(r[a].startAngle??0)/360).endAngle(2*Math.PI*(r[a].endAngle??360)/360).padAngle(2*Math.PI*(r[a].paddingAngle??0)/360).sortValues(jO(r[a].sortingValues??"none"))(r[a].data.map(s=>s.value));n[a]=K({labelMarkType:"circle",valueFormatter:s=>s.value.toLocaleString()},r[a],{data:r[a].data.map((s,i)=>K({},s,{id:s.id??`auto-generated-pie-id-${a}-${i}`},o[i])).map((s,i)=>{var l,c;return K({labelMarkType:"circle"},s,{formattedValue:((c=(l=r[a]).valueFormatter)==null?void 0:c.call(l,K({},s,{label:Kt(s.label,"arc")}),{dataIndex:i}))??s.value.toLocaleString()})})})}),{seriesOrder:t,series:n}},$O=e=>t=>e.data[t].color,UO=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,a)=>(r[a].data.forEach((o,s)=>{const i=Kt(o.label,"legend");i!==void 0&&n.push({markType:o.labelMarkType??r[a].labelMarkType,id:o.id??s,seriesId:a,color:o.color,label:i,itemId:o.id??s})}),n),[])},LO=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const a=t.data[n.dataIndex];if(a==null)return null;const o=Kt(a.label,"tooltip"),s=K({},a,{label:o}),i=t.valueFormatter(s,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:o,value:s,formattedValue:i,markType:a.labelMarkType??t.labelMarkType}},DO=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`},e,{data:e.data.map((n,a)=>K({color:r[a%r.length]},n))}),BO={colorProcessor:$O,seriesProcessor:kO,legendGetter:UO,tooltipGetter:LO,getSeriesWithDefaultValues:DO},NO={bar:mO,scatter:OO,line:MO,pie:BO},FO=[cc,Ts,ic,Rs];function zO(e){const{children:t,plugins:r=FO,pluginParams:n={},seriesConfig:a=NO}=e,{contextValue:o}=Ox(r,n,a);return g.jsx(Nl.Provider,{value:o,children:t})}const um=()=>{const e=N.useContext(Nl);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
- `));return e};function kr(){const e=um();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 dm(){const e=kr();return st(e,Ta)}function hm(){const e=kr();return st(e,ax)}const Zi=(e,t)=>e===void 0?t:Math.PI*e/180;function GO(){const e=kr(),{axis:t,axisIds:r}=st(e,Mr);return{xAxis:t,xAxisIds:r}}function HO(){const e=kr(),{axis:t,axisIds:r}=st(e,jr);return{yAxis:t,yAxisIds:r}}function qO(){const e=kr(),{axis:t,axisIds:r}=st(e,MS)??{axis:{},axisIds:[]};return{zAxis:t,zAxisIds:r}}function WO(){const e=um();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 JO(){const e=hm();return N.useCallback(t=>`${e}-gradient-${t}`,[e])}function YO(){const e=hm();return N.useCallback(t=>`${e}-gradient-${t}-object-bound`,[e])}var bi,ld;function KO(){if(ld)return bi;ld=1;var e=4,t=.001,r=1e-7,n=10,a=11,o=1/(a-1),s=typeof Float32Array=="function";function i(m,y){return 1-3*y+3*m}function l(m,y){return 3*y-6*m}function c(m){return 3*m}function u(m,y,S){return((i(y,S)*m+l(y,S))*m+c(y))*m}function d(m,y,S){return 3*i(y,S)*m*m+2*l(y,S)*m+c(y)}function h(m,y,S,E,O){var w,T,P=0;do T=y+(S-y)/2,w=u(T,E,O)-m,w>0?S=T:y=T;while(Math.abs(w)>r&&++P<n);return T}function p(m,y,S,E){for(var O=0;O<e;++O){var w=d(y,S,E);if(w===0)return y;var T=u(y,S,E)-m;y-=T/w}return y}function f(m){return m}return bi=function(y,S,E,O){if(!(0<=y&&y<=1&&0<=E&&E<=1))throw new Error("bezier x values must be in [0, 1] range");if(y===S&&E===O)return f;for(var w=s?new Float32Array(a):new Array(a),T=0;T<a;++T)w[T]=u(T*o,y,E);function P(C){for(var I=0,z=1,b=a-1;z!==b&&w[z]<=C;++z)I+=o;--z;var A=(C-w[z])/(w[z+1]-w[z]),G=I+A*o,_=d(G,y,E);return _>=t?p(C,G,y,E):_===0?G:h(C,I,I+o,y,E)}return function(I){return I===0?0:I===1?1:u(P(I),S,O)}},bi}var QO=KO();const XO=yg(QO),ZO=300,ew=XO(.66,0,.34,1);var vn=0,ta=0,Fn=0,pm=1e3,Fo,ra,zo=0,Tr=0,As=0,ya=typeof performance=="object"&&performance.now?performance:Date,mm=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function uc(){return Tr||(mm(tw),Tr=ya.now()+As)}function tw(){Tr=0}function Go(){this._call=this._time=this._next=null}Go.prototype=fm.prototype={constructor:Go,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?uc():+r)+(t==null?0:+t),!this._next&&ra!==this&&(ra?ra._next=this:Fo=this,ra=this),this._call=e,this._time=r,tl()},stop:function(){this._call&&(this._call=null,this._time=1/0,tl())}};function fm(e,t,r){var n=new Go;return n.restart(e,t,r),n}function el(){uc(),++vn;for(var e=Fo,t;e;)(t=Tr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--vn}function cd(){Tr=(zo=ya.now())+As,vn=ta=0;try{el()}finally{vn=0,nw(),Tr=0}}function rw(){var e=ya.now(),t=e-zo;t>pm&&(As-=t,zo=e)}function nw(){for(var e,t=Fo,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:Fo=r);ra=e,tl(n)}function tl(e){if(!vn){ta&&(ta=clearTimeout(ta));var t=e-Tr;t>24?(e<1/0&&(ta=setTimeout(cd,e-ya.now()-As)),Fn&&(Fn=clearInterval(Fn))):(Fn||(zo=ya.now(),Fn=setInterval(rw,pm)),vn=1,mm(cd))}}function aw(e,t,r){var n=new Go;return t=t==null?0:+t,n.restart(a=>{n.stop(),e(a+t)},t,r),n}class ow{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=uc()-this.elapsed;return this.timer=fm(r=>this.timerCallback(r),0,t),el(),this}stop(){return this.running?(this.timer&&(this.timer.stop(),this.timer=null),this):this}finish(){return this.stop(),aw(()=>this.timerCallback(this.duration)),el(),this}}function sw(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 iw(e,{createInterpolator:t,applyProps:r,skip:n,initialProps:a=e}){const o=N.useRef(a),s=N.useRef(null),i=N.useRef(null),l=N.useRef(e);kt(()=>{l.current=e},[e]),kt(()=>{var d;n&&((d=s.current)==null||d.finish(),s.current=null,i.current=null,o.current=e)},[e,n]);const c=N.useCallback(d=>{const h=o.current,p=t(h,e);s.current=new ow(ZO,ew,f=>{const m=p(f);o.current=m,r(d,m)})},[r,t,e]);return N.useCallback(d=>{var p,f,m,y;if(d===null){(p=s.current)==null||p.stop();return}const h=i.current;if(h===d){if(sw(l.current,e)){(f=s.current)==null||f.resume();return}(m=s.current)==null||m.stop()}h&&((y=s.current)==null||y.stop()),i.current=d,(s.current||!n)&&c(d)},[c,e,n])}function lw(e,{createInterpolator:t,transformProps:r,applyProps:n,skip:a,initialProps:o=e,ref:s}){const i=r??(u=>u),l=iw(e,{initialProps:o,createInterpolator:t,applyProps:(u,d)=>n(u,i(d)),skip:a});return K({},r(a?e:o),{ref:ds(l,s)})}function ud(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(N.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 cw=10;function dd(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"?wt(c[0],c[1]):Wl(c[0],c[1]),h=Math.round((Math.max(...u)-Math.min(...u))/cw),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 y=d(m/h);if(y===void 0)return null;const S=s(y);if(S===void 0)return null;const E=r?1-S/a:S/a,O=i(y);return O===null?null:g.jsx("stop",{offset:E,stopColor:O,stopOpacity:1},p+m)})})}const uw=10,dw=e=>e?{x1:"1",x2:"0",y1:"0",y2:"0"}:{x1:"0",x2:"1",y1:"0",y2:"0"};function xi(e){const{isReversed:t,gradientId:r,colorScale:n,colorMap:a}=e,o=[a.min??0,a.max??100],s=typeof o[0]=="number"?wt(o[0],o[1]):Wl(o[0],o[1]),i=uw,l=`${o[0]}-${o[1]}-`;return g.jsx("linearGradient",K({id:r},dw(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 hw(){const{top:e,height:t,bottom:r,left:n,width:a,right:o}=dm(),s=e+t+r,i=n+a+o,l=JO(),c=YO(),{xAxis:u,xAxisIds:d}=GO(),{yAxis:h,yAxisIds:p}=HO(),{zAxis:f,zAxisIds:m}=qO(),y=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 y.length===0&&S.length===0&&E.length===0?null:g.jsxs("defs",{children:[y.map(O=>{const w=l(O),T=c(O),{colorMap:P,scale:C,colorScale:I,reverse:z}=h[O];return(P==null?void 0:P.type)==="piecewise"?g.jsx(ud,{isReversed:!z,scale:C,colorMap:P,size:s,gradientId:w,direction:"y"},w):(P==null?void 0:P.type)==="continuous"?g.jsxs(N.Fragment,{children:[g.jsx(dd,{isReversed:!z,scale:C,colorScale:I,colorMap:P,size:s,gradientId:w,direction:"y"}),g.jsx(xi,{isReversed:z,colorScale:I,colorMap:P,gradientId:T})]},w):null}),S.map(O=>{const w=l(O),T=c(O),{colorMap:P,scale:C,reverse:I,colorScale:z}=u[O];return(P==null?void 0:P.type)==="piecewise"?g.jsx(ud,{isReversed:I,scale:C,colorMap:P,size:i,gradientId:w,direction:"x"},w):(P==null?void 0:P.type)==="continuous"?g.jsxs(N.Fragment,{children:[g.jsx(dd,{isReversed:I,scale:C,colorScale:z,colorMap:P,size:i,gradientId:w,direction:"x"}),g.jsx(xi,{isReversed:I,colorScale:z,colorMap:P,gradientId:T})]},w):null}),E.map(O=>{const w=c(O),{colorMap:T,colorScale:P}=f[O];return(T==null?void 0:T.type)==="continuous"?g.jsx(xi,{colorScale:P,colorMap:T,gradientId:w},w):null})]})}const pw=["children","className","title","desc"],mw=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"})),dc=N.forwardRef(function(t,r){const n=kr(),{width:a,height:o}=st(n,Zb),{width:s,height:i}=st(n,Xb),l=WO(),c=ds(l,r),u=nb({props:t,name:"MuiChartsSurface"}),{children:d,className:h,title:p,desc:f}=u,m=lr(u,pw),y=o>0&&a>0;return g.jsxs(mw,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(hw,{}),y&&d]}))});process.env.NODE_ENV!=="production"&&(dc.displayName="ChartsSurface");process.env.NODE_ENV!=="production"&&(dc.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 zn(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 vi(e){const t=Zi(e);return[Math.sin(t),-Math.cos(t)]}function fw(e,t){const r=[[0,0],vi(e),vi(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(vi(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 gw(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 hc=N.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"&&(hc.displayName="GaugeContext");function yw(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}=dm(),y=fw(a,o),S=c?zn(c,f):y.cx*f,E=u?zn(u,m):y.cy*m;let O=h+S,w=p+E;const T=gw(S,E,f,m,y);if(c===void 0){const b=T*(y.maxX-y.minX);O=h+(f-b)/2+y.cx*b}if(u===void 0){const b=T*(y.maxY-y.minY);w=p+(m-b)/2+y.cy*b}const P=zn(s??T,T),C=zn(i??"80%",T),I=zn(l??0,P-C),z=N.useMemo(()=>{const b=Zi(a),A=Zi(o);return{value:t,valueMin:r,valueMax:n,startAngle:b,endAngle:A,outerRadius:P,innerRadius:C,cornerRadius:I,cx:O,cy:w,maxRadius:T,valueAngle:t===null?null:b+(A-b)*(t-r)/(n-r)}},[t,r,n,a,o,P,C,I,O,w,T]);return g.jsx(hc.Provider,{value:z,children:d})}function pc(){return N.useContext(hc)}const bw=["width","height","margin","title","desc","value","valueMin","valueMax","startAngle","endAngle","outerRadius","innerRadius","cornerRadius","cx","cy","children"],xw=pt("g")(({theme:e})=>({"& text":{fill:(e.vars||e).palette.text.primary}})),mc=N.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:y,cy:S,children:E}=t,O=lr(t,bw);return g.jsx(zO,{pluginParams:{width:n,height:a,margin:lp(o,{left:10,right:10,top:10,bottom:10})},plugins:[],children:g.jsx(yw,{value:l,valueMin:c,valueMax:u,startAngle:d,endAngle:h,outerRadius:p,innerRadius:f,cornerRadius:m,cx:y,cy:S,children:g.jsx(dc,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(xw,{"aria-hidden":"true",children:E})}))})})});process.env.NODE_ENV!=="production"&&(mc.displayName="GaugeContainer");process.env.NODE_ENV!=="production"&&(mc.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 vw(e){const t=kr(),r=st(t,_b);return e||r}function Sw(e,t){const r=wt(e.startAngle,t.startAngle),n=wt(e.endAngle,t.endAngle),a=wt(e.innerRadius,t.innerRadius),o=wt(e.outerRadius,t.outerRadius),s=wt(e.cornerRadius,t.cornerRadius);return i=>({startAngle:r(i),endAngle:n(i),innerRadius:a(i),outerRadius:o(i),cornerRadius:s(i)})}function Ow(e){return lw({startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius},{createInterpolator:Sw,transformProps:t=>({d:nm().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 ww=["cx","cy","startAngle","endAngle","cornerRadius","innerRadius","outerRadius","skipAnimation"],Cw=pt("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.primary.main}));function gm(e){const{value:t,valueMin:r,valueMax:n,startAngle:a,endAngle:o,outerRadius:s,innerRadius:i,cornerRadius:l,cx:c,cy:u}=pc();if(t===null)return null;const d=a+(t-r)/(n-r)*(o-a);return g.jsx(ym,K({},e,{cx:c,cy:u,startAngle:a,endAngle:d,cornerRadius:l,innerRadius:i,outerRadius:s}))}process.env.NODE_ENV!=="production"&&(gm.propTypes={skipAnimation:x.bool});function ym(e){let{cx:t,cy:r,startAngle:n,endAngle:a,cornerRadius:o,innerRadius:s,outerRadius:i,skipAnimation:l}=e,c=lr(e,ww);const u=vw(l),d=Ow({startAngle:n,endAngle:a,cornerRadius:o,innerRadius:s,outerRadius:i,skipAnimation:u});return g.jsx(Cw,K({},d,{transform:`translate(${t}, ${r})`},c))}process.env.NODE_ENV!=="production"&&(ym.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 Pw=pt("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.divider}));function Tw(e){const{startAngle:t,endAngle:r,outerRadius:n,innerRadius:a,cornerRadius:o,cx:s,cy:i}=pc();return g.jsx(Pw,K({transform:`translate(${s}, ${i})`,d:nm().cornerRadius(o)({startAngle:t,endAngle:r,innerRadius:a,outerRadius:n})},e))}function Rw(e){return On("MuiGauge",e)}Al("MuiGauge",["root","valueArc","referenceArc","valueText"]);function Aw(){return typeof window>"u"}const eo=new Map,_w=2e3,Ew={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Vw=["minWidth","maxWidth","width","minHeight","maxHeight","height","top","left","fontSize","padding","margin","paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom"],hd="mui_measurement_span";function bm(e,t){return Vw.indexOf(e)>=0&&t===+t?`${t}px`:t}function xm(e){return e.split("").reduce((n,a)=>a===a.toUpperCase()?[...n,"-",a.toLowerCase()]:[...n,a],[]).join("")}const Iw=e=>Object.keys(e).sort().reduce((t,r)=>`${t}${xm(r)}:${bm(r,e[r])};`,"");let Si;const Mw=(e,t={})=>{if(e==null||Aw())return{width:0,height:0};const r=`${e}`,n=Iw(t),a=`${r}-${n}`,o=eo.get(a);if(o)return o;try{let s=document.getElementById(hd);s===null&&(s=document.createElement("span"),s.setAttribute("id",hd),s.setAttribute("aria-hidden","true"),document.body.appendChild(s));const i=K({},Ew,t);Object.keys(i).map(u=>(s.style[xm(u)]=bm(u,i[u]),u)),s.textContent=r;const l=s.getBoundingClientRect(),c={width:l.width,height:l.height};return eo.set(a,c),eo.size+1>_w&&eo.clear(),process.env.NODE_ENV==="test"?s.textContent="":(Si&&clearTimeout(Si),Si=setTimeout(()=>{s.textContent=""},0)),c}catch{return{width:0,height:0}}};function jw({style:e,needsComputation:t,text:r}){return r.split(`
124
- `).map(n=>K({text:n},t?Mw(n,e):{width:0,height:0}))}function kw(){const[e,t]=N.useState(typeof window<"u"||process.env.NODE_ENV==="test");return N.useEffect(()=>{t(!0)},[]),e}const $w=["x","y","style","text","ownerState"],Uw=["angle","textAnchor","dominantBaseline"];function vm(e){const{x:t,y:r,style:n,text:a}=e,o=lr(e,$w),s=n??{},{angle:i,textAnchor:l,dominantBaseline:c}=s,u=lr(s,Uw),d=kw(),h=N.useMemo(()=>jw({style:u,needsComputation:d&&a.includes(`
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"&&(vm.propTypes={lineHeight:x.number,needsComputation:x.bool,ownerState:x.any,style:x.object,text:x.string.isRequired});const Lw=["text","className"];function Dw({value:e}){return e===null?null:e.toLocaleString()}function Sm(e){const{text:t=Dw,className:r}=e,n=lr(e,Lw),{value:a,valueMin:o,valueMax:s,cx:i,cy:l}=pc(),c=typeof t=="function"?t({value:a,valueMin:o,valueMax:s}):t;return c===null?null:g.jsx("g",{className:r,children:g.jsx(vm,K({x:i,y:l,text:c,style:{textAnchor:"middle",dominantBaseline:"central"}},n))})}process.env.NODE_ENV!=="production"&&(Sm.propTypes={lineHeight:x.number,needsComputation:x.bool,ownerState:x.any,style:x.object,text:x.oneOfType([x.func,x.string])});const Bw=["text","children","classes","className","skipAnimation"],Nw=e=>{const{classes:t}=e;return Xo({root:["root"],valueArc:["valueArc"],referenceArc:["referenceArc"],valueText:["valueText"]},Rw,t)},fc=N.forwardRef(function(t,r){const{text:n,children:a,className:o,skipAnimation:s}=t,i=lr(t,Bw),l=Nw(t);return g.jsxs(mc,K({},i,{className:Ct(l.root,o),ref:r,children:[g.jsx(Tw,{className:l.referenceArc}),g.jsx(gm,{className:l.valueArc,skipAnimation:s}),g.jsx(Sm,{className:l.valueText,text:n}),a]}))});process.env.NODE_ENV!=="production"&&(fc.displayName="Gauge");process.env.NODE_ENV!=="production"&&(fc.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 gc{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 Om(e=[],t={}){const r=J.useRef(null);return r.current||(r.current=new gc(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 wm=Ke(ye.observer(({onCycleComplete:e,onCycleEnd:t,autoStart:r=!0,variant:n="default",compact:a=!1,className:o})=>{var G;const s=R.useTheme(),{t:i}=Re.useTranslation(),[l,c]=J.useState(0),[u,d]=J.useState(0),[h,p]=J.useState(!1),[f,m]=J.useState(!1),[y,S]=J.useState(0),E=J.useRef(null),O=J.useRef(null),w=J.useRef(0),[T]=Om([0],{tension:80,friction:18,onChange:([_])=>{S(_)}}),P=J.useCallback((_,F=0)=>{d(_);const re=Math.max(0,_-F);c(re),m(!1),w.current=0;const ee=F>0?F/_*100:0;F===0?T.setTarget([0]):T.setTarget([ee]),re===0?(p(!1),O.current=null,t&&setTimeout(()=>t(),0)):r?(O.current=Date.now()-F*1e3,p(!0)):O.current=null},[r,t,T]),C=J.useCallback(()=>{if(O.current&&h){const F=Date.now()-O.current;w.current+=F;const re=w.current/1e3,ee=Math.min(100,re/u*100);T.setTarget([ee])}p(!1),m(!0)},[h,u,T]),I=J.useCallback(()=>{f&&l>0&&(O.current=Date.now(),p(!0),m(!1))},[f,l]),z=J.useCallback(()=>f,[f]);J.useEffect(()=>{let _=!0;const F=setTimeout(()=>{_&&e({startNewCycle:P,pause:C,resume:I,isPaused:z})},0);return()=>{_=!1,clearTimeout(F)}},[e,P,C,I,z]),J.useEffect(()=>{if(h){const _=()=>{if(O.current&&u>0){const re=(Date.now()-O.current+w.current)/1e3,ee=Math.max(0,u-re);c(Math.ceil(ee));const ae=Math.min(100,re/u*100);if(T.setTarget([ae]),ee<=0){p(!1),O.current=null,c(0),T.setTarget([100]),t&&setTimeout(()=>t(),0);return}h&&(E.current=requestAnimationFrame(_))}};E.current=requestAnimationFrame(_)}else E.current&&(cancelAnimationFrame(E.current),E.current=null);return()=>{E.current&&cancelAnimationFrame(E.current)}},[h,t,u,T]),J.useEffect(()=>{let _=null;const F=()=>{T.update(1/60),_=requestAnimationFrame(F)};return _=requestAnimationFrame(F),()=>{_&&cancelAnimationFrame(_)}},[T]),J.useEffect(()=>{if(!h&&!f&&u>0){const _=(u-l)/u*100;T.setTarget([_])}},[h,f,u,l,T]);const b=_=>{const F=Math.floor(_/60),re=_%60;return`${F}:${re.toString().padStart(2,"0")}`},A=y;return n==="small"?g.jsxs(R.Box,{className:o,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[g.jsx(R.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:f?.6:1,transition:"opacity 0.2s ease"},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.palette.success.main,strokeWidth:"2",opacity:.3}),g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:s.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-A/100)}`,style:{transition:"stroke-dashoffset 0.1s ease-out"}})]})}),g.jsx(R.Typography,{variant:"body2",sx:{color:s.palette.text.primary,fontSize:"14px"},children:a?`${b(l)} ${i("CycleTimer.Time.lb",{time:""}).replace(/\s*$/,"")}`:`${b(l)} / ${i("CycleTimer.Time.lb",{time:b(u)})}`})]}):g.jsxs(R.Box,{className:o,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx(fc,{width:264,height:264,value:A,valueMin:0,valueMax:100,innerRadius:"71%",outerRadius:"90%",skipAnimation:!0,sx:{opacity:f?.6:1,transition:"opacity 0.2s ease","& .MuiGauge-valueArc":{fill:s.palette.success.main},"& .MuiGauge-referenceArc":{fill:"white",stroke:"transparent"}}}),g.jsxs(R.Box,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:187,height:187,borderRadius:"50%",backgroundColor:(G=s.palette.backgroundPaperElevation)==null?void 0:G[8],display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1},children:[g.jsx(R.Typography,{variant:"body2",sx:{fontSize:"12px",color:s.palette.text.secondary,marginBottom:.5},children:i("CycleTimer.RemainingTime.lb")}),g.jsx(R.Typography,{variant:"h1",sx:{fontSize:"48px",fontWeight:500,color:s.palette.text.primary,lineHeight:1,marginBottom:.5},children:b(l)}),g.jsx(R.Typography,{variant:"body2",sx:{fontSize:"12px",color:s.palette.text.secondary},children:i("CycleTimer.OfTime.lb",{time:b(u)})})]})]})})),$r=h0;process.env.NODE_ENV!=="production"&&(x.node,x.object.isRequired);function yc(e){return d0(e)}function Fw(e){return On("MuiSvgIcon",e)}Al("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const zw=e=>{const{color:t,fontSize:r,classes:n}=e,a={root:["root",t!=="inherit"&&`color${et(t)}`,`fontSize${et(r)}`]};return Xo(a,Fw,n)},Gw=pt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${et(r.color)}`],t[`fontSize${et(r.fontSize)}`]]}})($r(({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 y,S;return{props:{color:m},style:{color:(S=(y=(e.vars??e).palette)==null?void 0:y[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}}]}})),Ho=N.forwardRef(function(t,r){const n=yc({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=N.isValidElement(a)&&a.type==="svg",m={...n,color:s,component:i,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:f},y={};u||(y.viewBox=h);const S=zw(m);return g.jsxs(Gw,{as:i,className:Ct(S.root,o),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r,...y,...p,...f&&a.props,ownerState:m,children:[f?a.props.children:a,d?g.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(Ho.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});Ho.muiName="SvgIcon";function mr(e,t){function r(n,a){return g.jsx(Ho,{"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=Ho.muiName,N.memo(N.forwardRef(r))}function Hw(e){const{controlled:t,default:r,name:n,state:a="value"}=e,{current:o}=N.useRef(t!==void 0),[s,i]=N.useState(r),l=o?t:s;if(process.env.NODE_ENV!=="production"){N.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(`
120
+ `))});const s={};return a.forEach(i=>{const{ids:l,stackingOrder:c,stackingOffset:u}=i,d=om().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)(o);l.forEach((h,p)=>{const f=n[h].dataKey;s[h]=K({labelMarkType:"line"},n[h],{data:f?t.map(m=>{const y=m[f];return typeof y!="number"?(process.env.NODE_ENV!=="production"&&y!==null&&da([`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):y}):n[h].data,stackedData:d[p].map(([m,y])=>[m,y])})})}),{seriesOrder:r,stackingGroups:a,series:TO(s,i=>i==null?"":i.toLocaleString())}},AO=(e,t,r)=>{const n=r==null?void 0:r.colorScale,a=t==null?void 0:t.colorScale;return n?o=>{if(o===void 0)return e.color;const s=e.data[o],i=s===null?e.color:n(s);return i===null?e.color:i}:a?o=>{var l;if(o===void 0)return e.color;const s=(l=t.data)==null?void 0:l[o],i=s===null?e.color:a(s);return i===null?e.color:i}:()=>e.color},_O=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,a)=>{const o=Kt(r[a].label,"legend");return o===void 0||n.push({markType:r[a].labelMarkType,id:a,seriesId:a,color:r[a].color,label:o}),n},[])},EO=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const a=Kt(t.label,"tooltip"),o=t.data[n.dataIndex],s=t.valueFormatter(o,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:a,value:o,formattedValue:s,markType:t.labelMarkType}},VO=e=>Object.values(e).map(t=>({direction:"x",axisId:t.xAxisId})),IO=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`,color:r[t%r.length]},e),MO={colorProcessor:AO,seriesProcessor:RO,legendGetter:_O,tooltipGetter:EO,axisTooltipGetter:VO,xExtremumGetter:wO,yExtremumGetter:PO,getSeriesWithDefaultValues:IO},jO=(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}},$O=e=>{const{seriesOrder:t,series:r}=e,n={};return t.forEach(a=>{const o=KS().startAngle(2*Math.PI*(r[a].startAngle??0)/360).endAngle(2*Math.PI*(r[a].endAngle??360)/360).padAngle(2*Math.PI*(r[a].paddingAngle??0)/360).sortValues(jO(r[a].sortingValues??"none"))(r[a].data.map(s=>s.value));n[a]=K({labelMarkType:"circle",valueFormatter:s=>s.value.toLocaleString()},r[a],{data:r[a].data.map((s,i)=>K({},s,{id:s.id??`auto-generated-pie-id-${a}-${i}`},o[i])).map((s,i)=>{var l,c;return K({labelMarkType:"circle"},s,{formattedValue:((c=(l=r[a]).valueFormatter)==null?void 0:c.call(l,K({},s,{label:Kt(s.label,"arc")}),{dataIndex:i}))??s.value.toLocaleString()})})})}),{seriesOrder:t,series:n}},kO=e=>t=>e.data[t].color,UO=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,a)=>(r[a].data.forEach((o,s)=>{const i=Kt(o.label,"legend");i!==void 0&&n.push({markType:o.labelMarkType??r[a].labelMarkType,id:o.id??s,seriesId:a,color:o.color,label:i,itemId:o.id??s})}),n),[])},DO=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const a=t.data[n.dataIndex];if(a==null)return null;const o=Kt(a.label,"tooltip"),s=K({},a,{label:o}),i=t.valueFormatter(s,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:o,value:s,formattedValue:i,markType:a.labelMarkType??t.labelMarkType}},LO=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`},e,{data:e.data.map((n,a)=>K({color:r[a%r.length]},n))}),BO={colorProcessor:kO,seriesProcessor:$O,legendGetter:UO,tooltipGetter:DO,getSeriesWithDefaultValues:LO},NO={bar:mO,scatter:OO,line:MO,pie:BO},FO=[cc,Ts,ic,Rs];function zO(e){const{children:t,plugins:r=FO,pluginParams:n={},seriesConfig:a=NO}=e,{contextValue:o}=Ox(r,n,a);return g.jsx(Nl.Provider,{value:o,children:t})}const um=()=>{const e=N.useContext(Nl);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
+ `));return e};function $r(){const e=um();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 dm(){const e=$r();return st(e,Ta)}function hm(){const e=$r();return st(e,ax)}const Zi=(e,t)=>e===void 0?t:Math.PI*e/180;function GO(){const e=$r(),{axis:t,axisIds:r}=st(e,Mr);return{xAxis:t,xAxisIds:r}}function HO(){const e=$r(),{axis:t,axisIds:r}=st(e,jr);return{yAxis:t,yAxisIds:r}}function qO(){const e=$r(),{axis:t,axisIds:r}=st(e,MS)??{axis:{},axisIds:[]};return{zAxis:t,zAxisIds:r}}function WO(){const e=um();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 JO(){const e=hm();return N.useCallback(t=>`${e}-gradient-${t}`,[e])}function YO(){const e=hm();return N.useCallback(t=>`${e}-gradient-${t}-object-bound`,[e])}var bi,ld;function KO(){if(ld)return bi;ld=1;var e=4,t=.001,r=1e-7,n=10,a=11,o=1/(a-1),s=typeof Float32Array=="function";function i(m,y){return 1-3*y+3*m}function l(m,y){return 3*y-6*m}function c(m){return 3*m}function u(m,y,S){return((i(y,S)*m+l(y,S))*m+c(y))*m}function d(m,y,S){return 3*i(y,S)*m*m+2*l(y,S)*m+c(y)}function h(m,y,S,E,O){var C,T,P=0;do T=y+(S-y)/2,C=u(T,E,O)-m,C>0?S=T:y=T;while(Math.abs(C)>r&&++P<n);return T}function p(m,y,S,E){for(var O=0;O<e;++O){var C=d(y,S,E);if(C===0)return y;var T=u(y,S,E)-m;y-=T/C}return y}function f(m){return m}return bi=function(y,S,E,O){if(!(0<=y&&y<=1&&0<=E&&E<=1))throw new Error("bezier x values must be in [0, 1] range");if(y===S&&E===O)return f;for(var C=s?new Float32Array(a):new Array(a),T=0;T<a;++T)C[T]=u(T*o,y,E);function P(w){for(var I=0,z=1,b=a-1;z!==b&&C[z]<=w;++z)I+=o;--z;var A=(w-C[z])/(C[z+1]-C[z]),G=I+A*o,_=d(G,y,E);return _>=t?p(w,G,y,E):_===0?G:h(w,I,I+o,y,E)}return function(I){return I===0?0:I===1?1:u(P(I),S,O)}},bi}var QO=KO();const XO=yg(QO),ZO=300,ew=XO(.66,0,.34,1);var vn=0,ta=0,Fn=0,pm=1e3,Fo,ra,zo=0,Tr=0,As=0,ya=typeof performance=="object"&&performance.now?performance:Date,mm=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function uc(){return Tr||(mm(tw),Tr=ya.now()+As)}function tw(){Tr=0}function Go(){this._call=this._time=this._next=null}Go.prototype=fm.prototype={constructor:Go,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?uc():+r)+(t==null?0:+t),!this._next&&ra!==this&&(ra?ra._next=this:Fo=this,ra=this),this._call=e,this._time=r,tl()},stop:function(){this._call&&(this._call=null,this._time=1/0,tl())}};function fm(e,t,r){var n=new Go;return n.restart(e,t,r),n}function el(){uc(),++vn;for(var e=Fo,t;e;)(t=Tr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--vn}function cd(){Tr=(zo=ya.now())+As,vn=ta=0;try{el()}finally{vn=0,nw(),Tr=0}}function rw(){var e=ya.now(),t=e-zo;t>pm&&(As-=t,zo=e)}function nw(){for(var e,t=Fo,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:Fo=r);ra=e,tl(n)}function tl(e){if(!vn){ta&&(ta=clearTimeout(ta));var t=e-Tr;t>24?(e<1/0&&(ta=setTimeout(cd,e-ya.now()-As)),Fn&&(Fn=clearInterval(Fn))):(Fn||(zo=ya.now(),Fn=setInterval(rw,pm)),vn=1,mm(cd))}}function aw(e,t,r){var n=new Go;return t=t==null?0:+t,n.restart(a=>{n.stop(),e(a+t)},t,r),n}class ow{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=uc()-this.elapsed;return this.timer=fm(r=>this.timerCallback(r),0,t),el(),this}stop(){return this.running?(this.timer&&(this.timer.stop(),this.timer=null),this):this}finish(){return this.stop(),aw(()=>this.timerCallback(this.duration)),el(),this}}function sw(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 iw(e,{createInterpolator:t,applyProps:r,skip:n,initialProps:a=e}){const o=N.useRef(a),s=N.useRef(null),i=N.useRef(null),l=N.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=N.useCallback(d=>{const h=o.current,p=t(h,e);s.current=new ow(ZO,ew,f=>{const m=p(f);o.current=m,r(d,m)})},[r,t,e]);return N.useCallback(d=>{var p,f,m,y;if(d===null){(p=s.current)==null||p.stop();return}const h=i.current;if(h===d){if(sw(l.current,e)){(f=s.current)==null||f.resume();return}(m=s.current)==null||m.stop()}h&&((y=s.current)==null||y.stop()),i.current=d,(s.current||!n)&&c(d)},[c,e,n])}function lw(e,{createInterpolator:t,transformProps:r,applyProps:n,skip:a,initialProps:o=e,ref:s}){const i=r??(u=>u),l=iw(e,{initialProps:o,createInterpolator:t,applyProps:(u,d)=>n(u,i(d)),skip:a});return K({},r(a?e:o),{ref:ds(l,s)})}function ud(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(N.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 cw=10;function dd(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]):Wl(c[0],c[1]),h=Math.round((Math.max(...u)-Math.min(...u))/cw),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 y=d(m/h);if(y===void 0)return null;const S=s(y);if(S===void 0)return null;const E=r?1-S/a:S/a,O=i(y);return O===null?null:g.jsx("stop",{offset:E,stopColor:O,stopOpacity:1},p+m)})})}const uw=10,dw=e=>e?{x1:"1",x2:"0",y1:"0",y2:"0"}:{x1:"0",x2:"1",y1:"0",y2:"0"};function xi(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]):Wl(o[0],o[1]),i=uw,l=`${o[0]}-${o[1]}-`;return g.jsx("linearGradient",K({id:r},dw(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 hw(){const{top:e,height:t,bottom:r,left:n,width:a,right:o}=dm(),s=e+t+r,i=n+a+o,l=JO(),c=YO(),{xAxis:u,xAxisIds:d}=GO(),{yAxis:h,yAxisIds:p}=HO(),{zAxis:f,zAxisIds:m}=qO(),y=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 y.length===0&&S.length===0&&E.length===0?null:g.jsxs("defs",{children:[y.map(O=>{const C=l(O),T=c(O),{colorMap:P,scale:w,colorScale:I,reverse:z}=h[O];return(P==null?void 0:P.type)==="piecewise"?g.jsx(ud,{isReversed:!z,scale:w,colorMap:P,size:s,gradientId:C,direction:"y"},C):(P==null?void 0:P.type)==="continuous"?g.jsxs(N.Fragment,{children:[g.jsx(dd,{isReversed:!z,scale:w,colorScale:I,colorMap:P,size:s,gradientId:C,direction:"y"}),g.jsx(xi,{isReversed:z,colorScale:I,colorMap:P,gradientId:T})]},C):null}),S.map(O=>{const C=l(O),T=c(O),{colorMap:P,scale:w,reverse:I,colorScale:z}=u[O];return(P==null?void 0:P.type)==="piecewise"?g.jsx(ud,{isReversed:I,scale:w,colorMap:P,size:i,gradientId:C,direction:"x"},C):(P==null?void 0:P.type)==="continuous"?g.jsxs(N.Fragment,{children:[g.jsx(dd,{isReversed:I,scale:w,colorScale:z,colorMap:P,size:i,gradientId:C,direction:"x"}),g.jsx(xi,{isReversed:I,colorScale:z,colorMap:P,gradientId:T})]},C):null}),E.map(O=>{const C=c(O),{colorMap:T,colorScale:P}=f[O];return(T==null?void 0:T.type)==="continuous"?g.jsx(xi,{colorScale:P,colorMap:T,gradientId:C},C):null})]})}const pw=["children","className","title","desc"],mw=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"})),dc=N.forwardRef(function(t,r){const n=$r(),{width:a,height:o}=st(n,Zb),{width:s,height:i}=st(n,Xb),l=WO(),c=ds(l,r),u=nb({props:t,name:"MuiChartsSurface"}),{children:d,className:h,title:p,desc:f}=u,m=lr(u,pw),y=o>0&&a>0;return g.jsxs(mw,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(hw,{}),y&&d]}))});process.env.NODE_ENV!=="production"&&(dc.displayName="ChartsSurface");process.env.NODE_ENV!=="production"&&(dc.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 zn(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 vi(e){const t=Zi(e);return[Math.sin(t),-Math.cos(t)]}function fw(e,t){const r=[[0,0],vi(e),vi(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(vi(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 gw(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 hc=N.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"&&(hc.displayName="GaugeContext");function yw(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}=dm(),y=fw(a,o),S=c?zn(c,f):y.cx*f,E=u?zn(u,m):y.cy*m;let O=h+S,C=p+E;const T=gw(S,E,f,m,y);if(c===void 0){const b=T*(y.maxX-y.minX);O=h+(f-b)/2+y.cx*b}if(u===void 0){const b=T*(y.maxY-y.minY);C=p+(m-b)/2+y.cy*b}const P=zn(s??T,T),w=zn(i??"80%",T),I=zn(l??0,P-w),z=N.useMemo(()=>{const b=Zi(a),A=Zi(o);return{value:t,valueMin:r,valueMax:n,startAngle:b,endAngle:A,outerRadius:P,innerRadius:w,cornerRadius:I,cx:O,cy:C,maxRadius:T,valueAngle:t===null?null:b+(A-b)*(t-r)/(n-r)}},[t,r,n,a,o,P,w,I,O,C,T]);return g.jsx(hc.Provider,{value:z,children:d})}function pc(){return N.useContext(hc)}const bw=["width","height","margin","title","desc","value","valueMin","valueMax","startAngle","endAngle","outerRadius","innerRadius","cornerRadius","cx","cy","children"],xw=pt("g")(({theme:e})=>({"& text":{fill:(e.vars||e).palette.text.primary}})),mc=N.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:y,cy:S,children:E}=t,O=lr(t,bw);return g.jsx(zO,{pluginParams:{width:n,height:a,margin:lp(o,{left:10,right:10,top:10,bottom:10})},plugins:[],children:g.jsx(yw,{value:l,valueMin:c,valueMax:u,startAngle:d,endAngle:h,outerRadius:p,innerRadius:f,cornerRadius:m,cx:y,cy:S,children:g.jsx(dc,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(xw,{"aria-hidden":"true",children:E})}))})})});process.env.NODE_ENV!=="production"&&(mc.displayName="GaugeContainer");process.env.NODE_ENV!=="production"&&(mc.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 vw(e){const t=$r(),r=st(t,_b);return e||r}function Sw(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 Ow(e){return lw({startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius},{createInterpolator:Sw,transformProps:t=>({d:nm().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 ww=["cx","cy","startAngle","endAngle","cornerRadius","innerRadius","outerRadius","skipAnimation"],Cw=pt("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.primary.main}));function gm(e){const{value:t,valueMin:r,valueMax:n,startAngle:a,endAngle:o,outerRadius:s,innerRadius:i,cornerRadius:l,cx:c,cy:u}=pc();if(t===null)return null;const d=a+(t-r)/(n-r)*(o-a);return g.jsx(ym,K({},e,{cx:c,cy:u,startAngle:a,endAngle:d,cornerRadius:l,innerRadius:i,outerRadius:s}))}process.env.NODE_ENV!=="production"&&(gm.propTypes={skipAnimation:x.bool});function ym(e){let{cx:t,cy:r,startAngle:n,endAngle:a,cornerRadius:o,innerRadius:s,outerRadius:i,skipAnimation:l}=e,c=lr(e,ww);const u=vw(l),d=Ow({startAngle:n,endAngle:a,cornerRadius:o,innerRadius:s,outerRadius:i,skipAnimation:u});return g.jsx(Cw,K({},d,{transform:`translate(${t}, ${r})`},c))}process.env.NODE_ENV!=="production"&&(ym.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 Pw=pt("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.divider}));function Tw(e){const{startAngle:t,endAngle:r,outerRadius:n,innerRadius:a,cornerRadius:o,cx:s,cy:i}=pc();return g.jsx(Pw,K({transform:`translate(${s}, ${i})`,d:nm().cornerRadius(o)({startAngle:t,endAngle:r,innerRadius:a,outerRadius:n})},e))}function Rw(e){return On("MuiGauge",e)}Al("MuiGauge",["root","valueArc","referenceArc","valueText"]);function Aw(){return typeof window>"u"}const eo=new Map,_w=2e3,Ew={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Vw=["minWidth","maxWidth","width","minHeight","maxHeight","height","top","left","fontSize","padding","margin","paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom"],hd="mui_measurement_span";function bm(e,t){return Vw.indexOf(e)>=0&&t===+t?`${t}px`:t}function xm(e){return e.split("").reduce((n,a)=>a===a.toUpperCase()?[...n,"-",a.toLowerCase()]:[...n,a],[]).join("")}const Iw=e=>Object.keys(e).sort().reduce((t,r)=>`${t}${xm(r)}:${bm(r,e[r])};`,"");let Si;const Mw=(e,t={})=>{if(e==null||Aw())return{width:0,height:0};const r=`${e}`,n=Iw(t),a=`${r}-${n}`,o=eo.get(a);if(o)return o;try{let s=document.getElementById(hd);s===null&&(s=document.createElement("span"),s.setAttribute("id",hd),s.setAttribute("aria-hidden","true"),document.body.appendChild(s));const i=K({},Ew,t);Object.keys(i).map(u=>(s.style[xm(u)]=bm(u,i[u]),u)),s.textContent=r;const l=s.getBoundingClientRect(),c={width:l.width,height:l.height};return eo.set(a,c),eo.size+1>_w&&eo.clear(),process.env.NODE_ENV==="test"?s.textContent="":(Si&&clearTimeout(Si),Si=setTimeout(()=>{s.textContent=""},0)),c}catch{return{width:0,height:0}}};function jw({style:e,needsComputation:t,text:r}){return r.split(`
124
+ `).map(n=>K({text:n},t?Mw(n,e):{width:0,height:0}))}function $w(){const[e,t]=N.useState(typeof window<"u"||process.env.NODE_ENV==="test");return N.useEffect(()=>{t(!0)},[]),e}const kw=["x","y","style","text","ownerState"],Uw=["angle","textAnchor","dominantBaseline"];function vm(e){const{x:t,y:r,style:n,text:a}=e,o=lr(e,kw),s=n??{},{angle:i,textAnchor:l,dominantBaseline:c}=s,u=lr(s,Uw),d=$w(),h=N.useMemo(()=>jw({style:u,needsComputation:d&&a.includes(`
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"&&(vm.propTypes={lineHeight:x.number,needsComputation:x.bool,ownerState:x.any,style:x.object,text:x.string.isRequired});const Dw=["text","className"];function Lw({value:e}){return e===null?null:e.toLocaleString()}function Sm(e){const{text:t=Lw,className:r}=e,n=lr(e,Dw),{value:a,valueMin:o,valueMax:s,cx:i,cy:l}=pc(),c=typeof t=="function"?t({value:a,valueMin:o,valueMax:s}):t;return c===null?null:g.jsx("g",{className:r,children:g.jsx(vm,K({x:i,y:l,text:c,style:{textAnchor:"middle",dominantBaseline:"central"}},n))})}process.env.NODE_ENV!=="production"&&(Sm.propTypes={lineHeight:x.number,needsComputation:x.bool,ownerState:x.any,style:x.object,text:x.oneOfType([x.func,x.string])});const Bw=["text","children","classes","className","skipAnimation"],Nw=e=>{const{classes:t}=e;return Xo({root:["root"],valueArc:["valueArc"],referenceArc:["referenceArc"],valueText:["valueText"]},Rw,t)},fc=N.forwardRef(function(t,r){const{text:n,children:a,className:o,skipAnimation:s}=t,i=lr(t,Bw),l=Nw(t);return g.jsxs(mc,K({},i,{className:Pt(l.root,o),ref:r,children:[g.jsx(Tw,{className:l.referenceArc}),g.jsx(gm,{className:l.valueArc,skipAnimation:s}),g.jsx(Sm,{className:l.valueText,text:n}),a]}))});process.env.NODE_ENV!=="production"&&(fc.displayName="Gauge");process.env.NODE_ENV!=="production"&&(fc.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 gc{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 Om(e=[],t={}){const r=J.useRef(null);return r.current||(r.current=new gc(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 wm=Ke(ye.observer(({onCycleComplete:e,onCycleEnd:t,autoStart:r=!0,variant:n="default",compact:a=!1,className:o})=>{var G;const s=R.useTheme(),{t:i}=Re.useTranslation(),[l,c]=J.useState(0),[u,d]=J.useState(0),[h,p]=J.useState(!1),[f,m]=J.useState(!1),[y,S]=J.useState(0),E=J.useRef(null),O=J.useRef(null),C=J.useRef(0),[T]=Om([0],{tension:80,friction:18,onChange:([_])=>{S(_)}}),P=J.useCallback((_,F=0)=>{d(_);const re=Math.max(0,_-F);c(re),m(!1),C.current=0;const ee=F>0?F/_*100:0;F===0?T.setTarget([0]):T.setTarget([ee]),re===0?(p(!1),O.current=null,t&&setTimeout(()=>t(),0)):r?(O.current=Date.now()-F*1e3,p(!0)):O.current=null},[r,t,T]),w=J.useCallback(()=>{if(O.current&&h){const F=Date.now()-O.current;C.current+=F;const re=C.current/1e3,ee=Math.min(100,re/u*100);T.setTarget([ee])}p(!1),m(!0)},[h,u,T]),I=J.useCallback(()=>{f&&l>0&&(O.current=Date.now(),p(!0),m(!1))},[f,l]),z=J.useCallback(()=>f,[f]);J.useEffect(()=>{let _=!0;const F=setTimeout(()=>{_&&e({startNewCycle:P,pause:w,resume:I,isPaused:z})},0);return()=>{_=!1,clearTimeout(F)}},[e,P,w,I,z]),J.useEffect(()=>{if(h){const _=()=>{if(O.current&&u>0){const re=(Date.now()-O.current+C.current)/1e3,ee=Math.max(0,u-re);c(Math.ceil(ee));const ae=Math.min(100,re/u*100);if(T.setTarget([ae]),ee<=0){p(!1),O.current=null,c(0),T.setTarget([100]),t&&setTimeout(()=>t(),0);return}h&&(E.current=requestAnimationFrame(_))}};E.current=requestAnimationFrame(_)}else E.current&&(cancelAnimationFrame(E.current),E.current=null);return()=>{E.current&&cancelAnimationFrame(E.current)}},[h,t,u,T]),J.useEffect(()=>{let _=null;const F=()=>{T.update(1/60),_=requestAnimationFrame(F)};return _=requestAnimationFrame(F),()=>{_&&cancelAnimationFrame(_)}},[T]),J.useEffect(()=>{if(!h&&!f&&u>0){const _=(u-l)/u*100;T.setTarget([_])}},[h,f,u,l,T]);const b=_=>{const F=Math.floor(_/60),re=_%60;return`${F}:${re.toString().padStart(2,"0")}`},A=y;return n==="small"?g.jsxs(R.Box,{className:o,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[g.jsx(R.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:f?.6:1,transition:"opacity 0.2s ease"},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.palette.success.main,strokeWidth:"2",opacity:.3}),g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:s.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-A/100)}`,style:{transition:"stroke-dashoffset 0.1s ease-out"}})]})}),g.jsx(R.Typography,{variant:"body2",sx:{color:s.palette.text.primary,fontSize:"14px"},children:a?`${b(l)} ${i("CycleTimer.Time.lb",{time:""}).replace(/\s*$/,"")}`:`${b(l)} / ${i("CycleTimer.Time.lb",{time:b(u)})}`})]}):g.jsxs(R.Box,{className:o,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx(fc,{width:264,height:264,value:A,valueMin:0,valueMax:100,innerRadius:"71%",outerRadius:"90%",skipAnimation:!0,sx:{opacity:f?.6:1,transition:"opacity 0.2s ease","& .MuiGauge-valueArc":{fill:s.palette.success.main},"& .MuiGauge-referenceArc":{fill:"white",stroke:"transparent"}}}),g.jsxs(R.Box,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:187,height:187,borderRadius:"50%",backgroundColor:(G=s.palette.backgroundPaperElevation)==null?void 0:G[8],display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1},children:[g.jsx(R.Typography,{variant:"body2",sx:{fontSize:"12px",color:s.palette.text.secondary,marginBottom:.5},children:i("CycleTimer.RemainingTime.lb")}),g.jsx(R.Typography,{variant:"h1",sx:{fontSize:"48px",fontWeight:500,color:s.palette.text.primary,lineHeight:1,marginBottom:.5},children:b(l)}),g.jsx(R.Typography,{variant:"body2",sx:{fontSize:"12px",color:s.palette.text.secondary},children:i("CycleTimer.OfTime.lb",{time:b(u)})})]})]})})),kr=h0;process.env.NODE_ENV!=="production"&&(x.node,x.object.isRequired);function yc(e){return d0(e)}function Fw(e){return On("MuiSvgIcon",e)}Al("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const zw=e=>{const{color:t,fontSize:r,classes:n}=e,a={root:["root",t!=="inherit"&&`color${et(t)}`,`fontSize${et(r)}`]};return Xo(a,Fw,n)},Gw=pt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${et(r.color)}`],t[`fontSize${et(r.fontSize)}`]]}})(kr(({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 y,S;return{props:{color:m},style:{color:(S=(y=(e.vars??e).palette)==null?void 0:y[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}}]}})),Ho=N.forwardRef(function(t,r){const n=yc({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=N.isValidElement(a)&&a.type==="svg",m={...n,color:s,component:i,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:f},y={};u||(y.viewBox=h);const S=zw(m);return g.jsxs(Gw,{as:i,className:Pt(S.root,o),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r,...y,...p,...f&&a.props,ownerState:m,children:[f?a.props.children:a,d?g.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(Ho.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});Ho.muiName="SvgIcon";function mr(e,t){function r(n,a){return g.jsx(Ho,{"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=Ho.muiName,N.memo(N.forwardRef(r))}function Hw(e){const{controlled:t,default:r,name:n,state:a="value"}=e,{current:o}=N.useRef(t!==void 0),[s,i]=N.useState(r),l=o?t:s;if(process.env.NODE_ENV!=="production"){N.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
126
  `))},[a,n,t]);const{current:u}=N.useRef(r);N.useEffect(()=>{!o&&!Object.is(u,r)&&console.error([`MUI: A component is changing the default ${a} 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=N.useCallback(u=>{o||i(u)},[]);return[l,c]}const qw=mr(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"),Ww=mr(g.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),Jw=mr(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"),Cm=Ke(ye.observer(({data:e,columns:t,getRowData:r,onRowClick:n,selectedItem:a,getItemId:o,title:s,showCount:i=!0,searchPlaceholder:l="Search",dataGridProps:c,CustomToolbar:u,selectFirstByDefault:d=!1})=>{var T,P;const h=R.useTheme(),[p,f]=J.useState(null),m=J.useMemo(()=>e.map(r),[e,r]),y=J.useMemo(()=>{if(a!==void 0)return a;if(p!==null)return p;if(d&&e.length>0){const C=e[0];return f(C),C}return null},[d,e,a,p]),S=C=>{const I=e.find(z=>r(z).id===C.id);I&&(a===void 0&&f(I),n&&n(I,C))},E=J.useMemo(()=>!y||!o?null:o(y),[y,o]);function O(){return g.jsx(Rt.Toolbar,{children:g.jsxs(R.Box,{sx:{display:"flex",width:"100%",gap:1,p:1,alignItems:"center"},children:[s&&g.jsxs(R.Typography,{variant:"h6",sx:{fontWeight:500,color:"white"},children:[s,i&&` (${e.length})`]}),g.jsxs(R.Box,{sx:{ml:"auto",display:"flex",gap:1,alignItems:"center"},children:[g.jsx(Rt.FilterPanelTrigger,{render:g.jsx(Rt.ToolbarButton,{"aria-label":"Show filters",children:g.jsx(Ww,{fontSize:"small"})})}),g.jsx(R.Divider,{orientation:"vertical",flexItem:!0,sx:{height:"24px",alignSelf:"center"}}),g.jsx(Rt.QuickFilter,{render:(C,I)=>g.jsxs(R.Box,{...C,sx:{display:"flex",overflow:"hidden"},children:[g.jsx(R.Box,{sx:{borderRadius:I.expanded?"4px 0 0 4px":"4px",borderRight:I.expanded?"none":void 0},children:g.jsx(Rt.QuickFilterTrigger,{render:g.jsx(Rt.ToolbarButton,{"aria-label":"Search",children:g.jsx(Jw,{fontSize:"small"})})})}),g.jsxs(R.Box,{sx:{display:"flex",overflow:"hidden",transition:"all 0.3s ease-in-out",width:I.expanded?"192px":"0px"},children:[g.jsx(R.Box,{sx:{flex:1,"& .MuiInputBase-root":{height:"32px",borderRadius:I.expanded&&I.value!==""?"0":"0 4px 4px 0"}},children:g.jsx(Rt.QuickFilterControl,{placeholder:l})}),I.expanded&&I.value!==""&&g.jsx(Rt.QuickFilterClear,{render:g.jsx(R.Box,{sx:{borderRadius:"0 4px 4px 0"},children:g.jsx(Rt.ToolbarButton,{"aria-label":"Clear",children:g.jsx(qw,{fontSize:"small"})})})})]})]})})]})]})})}const w=u||O;return g.jsx(R.Box,{sx:{height:"100%",display:"flex",flexDirection:"column",background:((T=h.palette.backgroundPaperElevation)==null?void 0:T[5])||"#202233"},children:g.jsx(Rt.DataGrid,{rows:m,columns:t,onRowClick:S,disableColumnMenu:!1,disableRowSelectionOnClick:!0,disableMultipleRowSelection:!0,hideFooterSelectedRowCount:!0,filterMode:"client",sortingOrder:["desc","asc"],hideFooter:!1,showToolbar:!0,slots:{toolbar:w},initialState:{sorting:{sortModel:[]},filter:{filterModel:{items:[]}},...c==null?void 0:c.initialState},...c,autosizeOnMount:(c==null?void 0:c.autosizeOnMount)??!0,autosizeOptions:{includeOutliers:!0,includeHeaders:!0,expand:!0,...c==null?void 0:c.autosizeOptions},sx:{border:"none",backgroundColor:"transparent",width:"100%","& .MuiDataGrid-main":{border:"none",backgroundColor:"transparent"},"& .MuiDataGrid-container--top [role=row]":{backgroundColor:"transparent !important"},"& .MuiDataGrid-topContainer":{borderBottom:"none !important"},"& .MuiDataGrid-columnHeaders":{border:"none",borderBottom:"none !important",backgroundColor:((P=h.palette.backgroundPaperElevation)==null?void 0:P[5])||"#202233"},"& .MuiDataGrid-row":{cursor:n?"pointer":"default",border:"none",margin:"1px 0",position:"relative","&: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"}},...E!==null&&{[`&[data-id="${E}"]`]:{"&::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::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"}},"& .MuiDataGrid-columnHeader":{border:"none",paddingLeft:"40px",paddingRight:"40px",backgroundColor:"transparent !important","& .MuiDataGrid-columnHeaderTitle":{color:"rgba(255, 255, 255, 0.6)"}},"& .MuiDataGrid-toolbarContainer":{padding:"8px",border:"none !important",borderBottom:"none !important","& .MuiBox-root":{backgroundColor:"transparent !important"},"& .MuiFormControl-root":{backgroundColor:"transparent !important"},"& .MuiInputBase-root":{backgroundColor:"transparent !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"},...c==null?void 0:c.sx}})})}));Cm.displayName="WandelbotsDataGrid";const un=C0({createStyledComponent:pt("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>yc({props:e,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(un.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 Yw=({title:e,titleId:t,...r},n)=>N.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?N.createElement("title",{id:t},e):null,N.createElement("g",{id:"JogMinus"},N.createElement("path",{id:"Minus",d:"M0 13V8H21V13H0Z",fill:"white"}))),Kw=J.forwardRef(Yw),Qw=({title:e,titleId:t,...r},n)=>N.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?N.createElement("title",{id:t},e):null,N.createElement("g",{id:"JogPlus"},N.createElement("g",{id:"Plus"},N.createElement("path",{d:"M0 13V8H8V13H0Z",fill:"white"}),N.createElement("path",{d:"M8 0L13 2.18557e-07L13 21H8L8 0Z",fill:"white"}),N.createElement("path",{d:"M13 13V8H21V13H13Z",fill:"white"})))),Xw=J.forwardRef(Qw);function _s(e){J.useEffect(e,[])}function Pm(e){_s(()=>je.autorun(e))}function Tm(e,t,r){_s(()=>je.reaction(e,t,r))}function Tn(e){return _s(()=>{let t;function r(){e(),t=requestAnimationFrame(r)}return t=requestAnimationFrame(r),()=>{cancelAnimationFrame(t)}})}const rl=Ke(ye.observer(({colors:e,label:t,getDisplayedValue:r,startJogging:n,stopJogging:a,disabled:o,activeJoggingDirection:s,...i})=>{var O,w,T,P,C,I,z;Tn(()=>{const b=r(),A=h.current;A&&(A.textContent=b)});const l=R.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:(T=e.buttonBackgroundColor)==null?void 0:T.hovered},":active":{backgroundColor:(P=e.buttonBackgroundColor)==null?void 0:P.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor}},":disabled":{backgroundColor:(C=e.buttonBackgroundColor)==null?void 0:C.disabled,"svg path":{fill:l.palette.action.disabled}}},y={...f,backgroundColor:(I=e.buttonBackgroundColor)==null?void 0:I.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor},":disabled":{backgroundColor:(z=e.buttonBackgroundColor)==null?void 0:z.pressed,"svg path":{fill:l.palette.action.disabled}}};function S(b,A){o||b.button===0&&(u(A),n(A))}function E(){u(null),a()}return g.jsxs(un,{height:"64px",direction:"row",justifyContent:"center",...i,children:[g.jsx(R.IconButton,{disabled:o,disableRipple:!0,onPointerDown:b=>S(b,"-"),onPointerUp:E,onPointerOut:E,size:"large",sx:{...d==="-"?y:m,borderRadius:"16px 0px 0px 16px",borderLeft:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:g.jsx(Kw,{})}),g.jsxs(un,{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(un,{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(R.Typography,{height:"22px",sx:{fontSize:"15px",color:o?l.palette.action.disabled:e.color,fontWeight:700},ref:h,children:r()})]}),g.jsx(R.IconButton,{disableRipple:!0,disabled:o,onPointerDown:b=>S(b,"+"),onPointerUp:E,onPointerOut:E,size:"large",sx:{...d==="+"?y:m,borderRadius:"0px 16px 16px 0px",borderRight:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:g.jsx(Xw,{})})]})})),Zw=mr(g.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),eC=mr(g.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");function Rr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Rm=typeof global=="object"&&global&&global.Object===Object&&global,tC=typeof self=="object"&&self&&self.Object===Object&&self,Ut=Rm||tC||Function("return this")(),Oi=function(){return Ut.Date.now()},rC=/\s/;function nC(e){for(var t=e.length;t--&&rC.test(e.charAt(t)););return t}var aC=/^\s+/;function oC(e){return e&&e.slice(0,nC(e)+1).replace(aC,"")}var dr=Ut.Symbol,Am=Object.prototype,sC=Am.hasOwnProperty,iC=Am.toString,Gn=dr?dr.toStringTag:void 0;function lC(e){var t=sC.call(e,Gn),r=e[Gn];try{e[Gn]=void 0;var n=!0}catch{}var a=iC.call(e);return n&&(t?e[Gn]=r:delete e[Gn]),a}var cC=Object.prototype,uC=cC.toString;function dC(e){return uC.call(e)}var hC="[object Null]",pC="[object Undefined]",pd=dr?dr.toStringTag:void 0;function Ur(e){return e==null?e===void 0?pC:hC:pd&&pd in Object(e)?lC(e):dC(e)}function Ar(e){return e!=null&&typeof e=="object"}var mC="[object Symbol]";function Es(e){return typeof e=="symbol"||Ar(e)&&Ur(e)==mC}var md=NaN,fC=/^[-+]0x[0-9a-f]+$/i,gC=/^0b[01]+$/i,yC=/^0o[0-7]+$/i,bC=parseInt;function fd(e){if(typeof e=="number")return e;if(Es(e))return md;if(Rr(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Rr(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=oC(e);var r=gC.test(e);return r||yC.test(e)?bC(e.slice(2),r?2:8):fC.test(e)?md:+e}var xC="Expected a function",vC=Math.max,SC=Math.min;function OC(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(xC);t=fd(t)||0,Rr(r)&&(u=!!r.leading,d="maxWait"in r,o=d?vC(fd(r.maxWait)||0,t):o,h="trailing"in r?!!r.trailing:h);function p(P){var C=n,I=a;return n=a=void 0,c=P,s=e.apply(I,C),s}function f(P){return c=P,i=setTimeout(S,t),u?p(P):s}function m(P){var C=P-l,I=P-c,z=t-C;return d?SC(z,o-I):z}function y(P){var C=P-l,I=P-c;return l===void 0||C>=t||C<0||d&&I>=o}function S(){var P=Oi();if(y(P))return E(P);i=setTimeout(S,m(P))}function E(P){return i=void 0,h&&n?p(P):(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(Oi())}function T(){var P=Oi(),C=y(P);if(n=arguments,a=this,l=P,C){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 T.cancel=O,T.flush=w,T}var wC="Expected a function";function CC(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(wC);return Rr(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),OC(e,t,{leading:n,maxWait:t,trailing:a})}const _m=Ke(ye.observer(({startJogging:e,stopJogging:t,lowerLimitDegs:r,upperLimitDegs:n,getValueDegs:a,disabled:o,...s})=>{var O,w,T,P,C,I,z,b,A,G,_,F,re,ee,ae;const{t:i}=Re.useTranslation(),[l,c]=J.useState(),u=R.useTheme(),d={background:(O=u.palette.backgroundPaperElevation)==null?void 0:O[4],color:(w=u.palette.backgroundPaperElevation)==null?void 0:w[11]},h=ye.useLocalObservable(()=>({activeJoggingDir:null,startJogging(te){this.activeJoggingDir=te,e(te)},stopJogging(){this.activeJoggingDir=null,t()}})),p=CC(()=>{c(a())},50);Tn(p);function f(te){te.button===0&&h.startJogging("-")}function m(te){te.button===0&&h.startJogging("+")}function y(te){h.stopJogging()}function S(te){h.stopJogging()}function E(te,se=1){if(te===void 0||isNaN(te))return"";const W=i("General.degree.variable",{amount:te.toFixed(se)});return te>0&&se===0?`+${W}`:W}return g.jsxs(un,{height:"64px",width:"100%",maxWidth:"260px",direction:"row",...s,sx:{"& .MuiIconButton-root":{width:"52px",color:u.palette.text.primary,alignContent:"center",backgroundColor:(T=u.palette.backgroundPaperElevation)==null?void 0:T[11],"& svg":{width:"42px",height:"42px"},"&.Mui-disabled":{backgroundColor:(P=u.palette.backgroundPaperElevation)==null?void 0:P[11],color:u.palette.action.disabled,opacity:1},"&:hover":{backgroundColor:(C=u.palette.backgroundPaperElevation)==null?void 0:C[9]},"&:active":{...d}}},children:[g.jsx(R.IconButton,{onPointerDown:f,onPointerUp:y,onPointerOut:S,disabled:o,disableRipple:!0,sx:{borderRadius:"16px 0px 0px 16px",...h.activeJoggingDir==="-"?d:{}},children:g.jsx(Zw,{sx:{pointerEvents:"none",color:(A=(b=(z=(I=u.componentsExt)==null?void 0:I.JoggingPanel)==null?void 0:z.JoggingJoint)==null?void 0:b.Joint)==null?void 0:A.arrowColor}})}),g.jsxs(un,{flexGrow:1,alignItems:"center",justifyContent:"center",sx:{borderStyle:"solid",borderLeftWidth:0,borderRightWidth:0,border:"none",backgroundColor:(G=u.palette.backgroundPaperElevation)==null?void 0:G[11],paddingLeft:"20px",paddingRight:"20px",zIndex:1},children:[g.jsx(R.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(R.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:(_=u.palette.backgroundPaperElevation)==null?void 0:_[5],opacity:1}},marks:r!==void 0&&n!==void 0&&[{value:r,label:E(r,0)},{value:n,label:E(n,0)}]})]}),g.jsx(R.IconButton,{onPointerDown:m,onPointerUp:y,onPointerOut:S,disabled:o,disableRipple:!0,sx:{borderRadius:"0px 16px 16px 0px",...h.activeJoggingDir==="+"?d:{}},children:g.jsx(eC,{sx:{pointerEvents:"none",color:(ae=(ee=(re=(F=u.componentsExt)==null?void 0:F.JoggingPanel)==null?void 0:re.JoggingJoint)==null?void 0:ee.Joint)==null?void 0:ae.arrowColor}})})]})})),PC=mr(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"),TC=mr(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 RC(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Em=RC;function AC(){this.__data__=[],this.size=0}var _C=AC;function EC(e,t){return e===t||e!==e&&t!==t}var Vm=EC;function VC(e,t){for(var r=e.length;r--;)if(Vm(e[r][0],t))return r;return-1}var Vs=VC,IC=Array.prototype,MC=IC.splice;function jC(e){var t=this.__data__,r=Vs(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():MC.call(t,r,1),--this.size,!0}var kC=jC;function $C(e){var t=this.__data__,r=Vs(t,e);return r<0?void 0:t[r][1]}var UC=$C;function LC(e){return Vs(this.__data__,e)>-1}var DC=LC;function BC(e,t){var r=this.__data__,n=Vs(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var NC=BC;function Rn(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])}}Rn.prototype.clear=_C;Rn.prototype.delete=kC;Rn.prototype.get=UC;Rn.prototype.has=DC;Rn.prototype.set=NC;var Is=Rn;function FC(){this.__data__=new Is,this.size=0}var zC=FC;function GC(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var HC=GC;function qC(e){return this.__data__.get(e)}var WC=qC;function JC(e){return this.__data__.has(e)}var YC=JC,KC=typeof global=="object"&&global&&global.Object===Object&&global,Im=KC,QC=typeof self=="object"&&self&&self.Object===Object&&self,XC=Im||QC||Function("return this")(),Qt=XC,ZC=Qt.Symbol,Sn=ZC,Mm=Object.prototype,eP=Mm.hasOwnProperty,tP=Mm.toString,Hn=Sn?Sn.toStringTag:void 0;function rP(e){var t=eP.call(e,Hn),r=e[Hn];try{e[Hn]=void 0;var n=!0}catch{}var a=tP.call(e);return n&&(t?e[Hn]=r:delete e[Hn]),a}var nP=rP,aP=Object.prototype,oP=aP.toString;function sP(e){return oP.call(e)}var iP=sP,lP="[object Null]",cP="[object Undefined]",gd=Sn?Sn.toStringTag:void 0;function uP(e){return e==null?e===void 0?cP:lP:gd&&gd in Object(e)?nP(e):iP(e)}var Ia=uP,dP="[object AsyncFunction]",hP="[object Function]",pP="[object GeneratorFunction]",mP="[object Proxy]";function fP(e){if(!Em(e))return!1;var t=Ia(e);return t==hP||t==pP||t==dP||t==mP}var jm=fP,gP=Qt["__core-js_shared__"],wi=gP,yd=function(){var e=/[^.]+$/.exec(wi&&wi.keys&&wi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function yP(e){return!!yd&&yd in e}var bP=yP,xP=Function.prototype,vP=xP.toString;function SP(e){if(e!=null){try{return vP.call(e)}catch{}try{return e+""}catch{}}return""}var Lr=SP,OP=/[\\^$.*+?()[\]{}|]/g,wP=/^\[object .+?Constructor\]$/,CP=Function.prototype,PP=Object.prototype,TP=CP.toString,RP=PP.hasOwnProperty,AP=RegExp("^"+TP.call(RP).replace(OP,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _P(e){if(!Em(e)||bP(e))return!1;var t=jm(e)?AP:wP;return t.test(Lr(e))}var EP=_P;function VP(e,t){return e==null?void 0:e[t]}var IP=VP;function MP(e,t){var r=IP(e,t);return EP(r)?r:void 0}var An=MP,jP=An(Qt,"Map"),ba=jP,kP=An(Object,"create"),xa=kP;function $P(){this.__data__=xa?xa(null):{},this.size=0}var UP=$P;function LP(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var DP=LP,BP="__lodash_hash_undefined__",NP=Object.prototype,FP=NP.hasOwnProperty;function zP(e){var t=this.__data__;if(xa){var r=t[e];return r===BP?void 0:r}return FP.call(t,e)?t[e]:void 0}var GP=zP,HP=Object.prototype,qP=HP.hasOwnProperty;function WP(e){var t=this.__data__;return xa?t[e]!==void 0:qP.call(t,e)}var JP=WP,YP="__lodash_hash_undefined__";function KP(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=xa&&t===void 0?YP:t,this}var QP=KP;function _n(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])}}_n.prototype.clear=UP;_n.prototype.delete=DP;_n.prototype.get=GP;_n.prototype.has=JP;_n.prototype.set=QP;var bd=_n;function XP(){this.size=0,this.__data__={hash:new bd,map:new(ba||Is),string:new bd}}var ZP=XP;function eT(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var tT=eT;function rT(e,t){var r=e.__data__;return tT(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Ms=rT;function nT(e){var t=Ms(this,e).delete(e);return this.size-=t?1:0,t}var aT=nT;function oT(e){return Ms(this,e).get(e)}var sT=oT;function iT(e){return Ms(this,e).has(e)}var lT=iT;function cT(e,t){var r=Ms(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var uT=cT;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=ZP;En.prototype.delete=aT;En.prototype.get=sT;En.prototype.has=lT;En.prototype.set=uT;var km=En,dT=200;function hT(e,t){var r=this.__data__;if(r instanceof Is){var n=r.__data__;if(!ba||n.length<dT-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new km(n)}return r.set(e,t),this.size=r.size,this}var pT=hT;function Vn(e){var t=this.__data__=new Is(e);this.size=t.size}Vn.prototype.clear=zC;Vn.prototype.delete=HC;Vn.prototype.get=WC;Vn.prototype.has=YC;Vn.prototype.set=pT;var Ci=Vn,mT="__lodash_hash_undefined__";function fT(e){return this.__data__.set(e,mT),this}var gT=fT;function yT(e){return this.__data__.has(e)}var bT=yT;function qo(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new km;++t<r;)this.add(e[t])}qo.prototype.add=qo.prototype.push=gT;qo.prototype.has=bT;var xT=qo;function vT(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 ST=vT;function OT(e,t){return e.has(t)}var wT=OT,CT=1,PT=2;function TT(e,t,r,n,a,o){var s=r&CT,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&PT?new xT:void 0;for(o.set(e,t),o.set(t,e);++d<i;){var f=e[d],m=t[d];if(n)var y=s?n(m,f,d,t,e,o):n(f,m,d,e,t,o);if(y!==void 0){if(y)continue;h=!1;break}if(p){if(!ST(t,function(S,E){if(!wT(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 $m=TT,RT=Qt.Uint8Array,xd=RT;function AT(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var _T=AT;function ET(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var VT=ET,IT=1,MT=2,jT="[object Boolean]",kT="[object Date]",$T="[object Error]",UT="[object Map]",LT="[object Number]",DT="[object RegExp]",BT="[object Set]",NT="[object String]",FT="[object Symbol]",zT="[object ArrayBuffer]",GT="[object DataView]",vd=Sn?Sn.prototype:void 0,Pi=vd?vd.valueOf:void 0;function HT(e,t,r,n,a,o,s){switch(r){case GT:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case zT:return!(e.byteLength!=t.byteLength||!o(new xd(e),new xd(t)));case jT:case kT:case LT:return Vm(+e,+t);case $T:return e.name==t.name&&e.message==t.message;case DT:case NT:return e==t+"";case UT:var i=_T;case BT:var l=n&IT;if(i||(i=VT),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;n|=MT,s.set(e,t);var u=$m(i(e),i(t),n,a,o,s);return s.delete(e),u;case FT:if(Pi)return Pi.call(e)==Pi.call(t)}return!1}var qT=HT;function WT(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var JT=WT,YT=Array.isArray,Wo=YT;function KT(e,t,r){var n=t(e);return Wo(e)?n:JT(n,r(e))}var QT=KT;function XT(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 ZT=XT;function eR(){return[]}var tR=eR,rR=Object.prototype,nR=rR.propertyIsEnumerable,Sd=Object.getOwnPropertySymbols,aR=Sd?function(e){return e==null?[]:(e=Object(e),ZT(Sd(e),function(t){return nR.call(e,t)}))}:tR,oR=aR;function sR(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var iR=sR;function lR(e){return e!=null&&typeof e=="object"}var va=lR,cR="[object Arguments]";function uR(e){return va(e)&&Ia(e)==cR}var Od=uR,Um=Object.prototype,dR=Um.hasOwnProperty,hR=Um.propertyIsEnumerable,pR=Od(function(){return arguments}())?Od:function(e){return va(e)&&dR.call(e,"callee")&&!hR.call(e,"callee")},mR=pR;function fR(){return!1}var gR=fR,Lm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,wd=Lm&&typeof module=="object"&&module&&!module.nodeType&&module,yR=wd&&wd.exports===Lm,Cd=yR?Qt.Buffer:void 0,bR=Cd?Cd.isBuffer:void 0,xR=bR||gR,nl=xR,vR=9007199254740991,SR=/^(?:0|[1-9]\d*)$/;function OR(e,t){var r=typeof e;return t=t??vR,!!t&&(r=="number"||r!="symbol"&&SR.test(e))&&e>-1&&e%1==0&&e<t}var wR=OR,CR=9007199254740991;function PR(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=CR}var Dm=PR,TR="[object Arguments]",RR="[object Array]",AR="[object Boolean]",_R="[object Date]",ER="[object Error]",VR="[object Function]",IR="[object Map]",MR="[object Number]",jR="[object Object]",kR="[object RegExp]",$R="[object Set]",UR="[object String]",LR="[object WeakMap]",DR="[object ArrayBuffer]",BR="[object DataView]",NR="[object Float32Array]",FR="[object Float64Array]",zR="[object Int8Array]",GR="[object Int16Array]",HR="[object Int32Array]",qR="[object Uint8Array]",WR="[object Uint8ClampedArray]",JR="[object Uint16Array]",YR="[object Uint32Array]",Ae={};Ae[NR]=Ae[FR]=Ae[zR]=Ae[GR]=Ae[HR]=Ae[qR]=Ae[WR]=Ae[JR]=Ae[YR]=!0;Ae[TR]=Ae[RR]=Ae[DR]=Ae[AR]=Ae[BR]=Ae[_R]=Ae[ER]=Ae[VR]=Ae[IR]=Ae[MR]=Ae[jR]=Ae[kR]=Ae[$R]=Ae[UR]=Ae[LR]=!1;function KR(e){return va(e)&&Dm(e.length)&&!!Ae[Ia(e)]}var QR=KR;function XR(e){return function(t){return e(t)}}var ZR=XR,Bm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,sa=Bm&&typeof module=="object"&&module&&!module.nodeType&&module,eA=sa&&sa.exports===Bm,Ti=eA&&Im.process,tA=function(){try{var e=sa&&sa.require&&sa.require("util").types;return e||Ti&&Ti.binding&&Ti.binding("util")}catch{}}(),Pd=tA,Td=Pd&&Pd.isTypedArray,rA=Td?ZR(Td):QR,Nm=rA,nA=Object.prototype,aA=nA.hasOwnProperty;function oA(e,t){var r=Wo(e),n=!r&&mR(e),a=!r&&!n&&nl(e),o=!r&&!n&&!a&&Nm(e),s=r||n||a||o,i=s?iR(e.length,String):[],l=i.length;for(var c in e)(t||aA.call(e,c))&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||wR(c,l)))&&i.push(c);return i}var sA=oA,iA=Object.prototype;function lA(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||iA;return e===r}var cA=lA;function uA(e,t){return function(r){return e(t(r))}}var dA=uA,hA=dA(Object.keys,Object),pA=hA,mA=Object.prototype,fA=mA.hasOwnProperty;function gA(e){if(!cA(e))return pA(e);var t=[];for(var r in Object(e))fA.call(e,r)&&r!="constructor"&&t.push(r);return t}var yA=gA;function bA(e){return e!=null&&Dm(e.length)&&!jm(e)}var xA=bA;function vA(e){return xA(e)?sA(e):yA(e)}var SA=vA;function OA(e){return QT(e,SA,oR)}var Rd=OA,wA=1,CA=Object.prototype,PA=CA.hasOwnProperty;function TA(e,t,r,n,a,o){var s=r&wA,i=Rd(e),l=i.length,c=Rd(t),u=c.length;if(l!=u&&!s)return!1;for(var d=l;d--;){var h=i[d];if(!(s?h in t:PA.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 y=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}y||(y=h=="constructor")}if(m&&!y){var w=e.constructor,T=t.constructor;w!=T&&"constructor"in e&&"constructor"in t&&!(typeof w=="function"&&w instanceof w&&typeof T=="function"&&T instanceof T)&&(m=!1)}return o.delete(e),o.delete(t),m}var RA=TA,AA=An(Qt,"DataView"),al=AA,_A=An(Qt,"Promise"),ol=_A,EA=An(Qt,"Set"),sl=EA,VA=An(Qt,"WeakMap"),il=VA,Ad="[object Map]",IA="[object Object]",_d="[object Promise]",Ed="[object Set]",Vd="[object WeakMap]",Id="[object DataView]",MA=Lr(al),jA=Lr(ba),kA=Lr(ol),$A=Lr(sl),UA=Lr(il),br=Ia;(al&&br(new al(new ArrayBuffer(1)))!=Id||ba&&br(new ba)!=Ad||ol&&br(ol.resolve())!=_d||sl&&br(new sl)!=Ed||il&&br(new il)!=Vd)&&(br=function(e){var t=Ia(e),r=t==IA?e.constructor:void 0,n=r?Lr(r):"";if(n)switch(n){case MA:return Id;case jA:return Ad;case kA:return _d;case $A:return Ed;case UA:return Vd}return t});var Md=br,LA=1,jd="[object Arguments]",kd="[object Array]",to="[object Object]",DA=Object.prototype,$d=DA.hasOwnProperty;function BA(e,t,r,n,a,o){var s=Wo(e),i=Wo(t),l=s?kd:Md(e),c=i?kd:Md(t);l=l==jd?to:l,c=c==jd?to:c;var u=l==to,d=c==to,h=l==c;if(h&&nl(e)){if(!nl(t))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new Ci),s||Nm(e)?$m(e,t,r,n,a,o):qT(e,t,l,r,n,a,o);if(!(r&LA)){var p=u&&$d.call(e,"__wrapped__"),f=d&&$d.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,y=f?t.value():t;return o||(o=new Ci),a(m,y,r,n,o)}}return h?(o||(o=new Ci),RA(e,t,r,n,a,o)):!1}var NA=BA;function Fm(e,t,r,n,a){return e===t?!0:e==null||t==null||!va(e)&&!va(t)?e!==e&&t!==t:NA(e,t,r,n,Fm,a)}var FA=Fm;function zA(e,t){return FA(e,t)}var GA=zA;/*! *****************************************************************************
127
+ `))},[JSON.stringify(r)])}const c=N.useCallback(u=>{o||i(u)},[]);return[l,c]}const qw=mr(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"),Ww=mr(g.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),Jw=mr(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"),Cm=Ke(ye.observer(({data:e,columns:t,getRowData:r,onRowClick:n,selectedItem:a,getItemId:o,title:s,showCount:i=!0,searchPlaceholder:l="Search",dataGridProps:c,CustomToolbar:u,selectFirstByDefault:d=!1,sx:h})=>{var P;R.useTheme();const p=vt.useGridApiRef(),[f,m]=J.useState(null),y=J.useMemo(()=>e.map(r),[e,r]);J.useEffect(()=>{p.current&&y.length>0&&p.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:t.map(w=>w.field)})},[y,t,p]);const S=J.useMemo(()=>{if(a!==void 0)return a;if(f!==null)return f;if(d&&e.length>0){const w=e[0];return m(w),w}return null},[d,e,a,f]),E=w=>{const I=e.find(z=>r(z).id===w.id);I&&(a===void 0&&m(I),n&&n(I,w))},O=J.useMemo(()=>!S||!o?null:o(S),[S,o]);function C(){return g.jsx(vt.Toolbar,{children:g.jsxs(R.Box,{sx:{display:"flex",width:"100%",gap:1,p:1,alignItems:"center"},children:[s&&g.jsxs(R.Typography,{variant:"h6",sx:{fontWeight:500,color:"white"},children:[s,i&&` (${e.length})`]}),g.jsxs(R.Box,{sx:{ml:"auto",display:"flex",gap:1,alignItems:"center"},children:[g.jsx(vt.FilterPanelTrigger,{render:g.jsx(vt.ToolbarButton,{"aria-label":"Show filters",children:g.jsx(Ww,{fontSize:"small"})})}),g.jsx(R.Divider,{orientation:"vertical",flexItem:!0,sx:{height:"24px",alignSelf:"center"}}),g.jsx(vt.QuickFilter,{render:(w,I)=>g.jsxs(R.Box,{...w,sx:{display:"flex",overflow:"hidden"},children:[g.jsx(R.Box,{sx:{borderRadius:I.expanded?"4px 0 0 4px":"4px",borderRight:I.expanded?"none":void 0},children:g.jsx(vt.QuickFilterTrigger,{render:g.jsx(vt.ToolbarButton,{"aria-label":"Search",children:g.jsx(Jw,{fontSize:"small"})})})}),g.jsxs(R.Box,{sx:{display:"flex",overflow:"hidden",transition:"all 0.3s ease-in-out",width:I.expanded?"192px":"0px"},children:[g.jsx(R.Box,{sx:{flex:1,"& .MuiInputBase-root":{height:"32px",borderRadius:I.expanded&&I.value!==""?"0":"0 4px 4px 0"}},children:g.jsx(vt.QuickFilterControl,{placeholder:l})}),I.expanded&&I.value!==""&&g.jsx(vt.QuickFilterClear,{render:g.jsx(R.Box,{sx:{borderRadius:"0 4px 4px 0"},children:g.jsx(vt.ToolbarButton,{"aria-label":"Clear",children:g.jsx(qw,{fontSize:"small"})})})})]})]})})]})]})})}const T=u||C;return g.jsx(R.Box,{sx:{height:"100%",display:"flex",flexDirection:"column",...h},children:g.jsx(vt.DataGrid,{apiRef:p,rows:y,columns:t,onRowClick:E,disableColumnMenu:!1,disableRowSelectionOnClick:!0,disableMultipleRowSelection:!0,hideFooterSelectedRowCount:!0,filterMode:"client",sortingOrder:["desc","asc"],hideFooter:!1,showToolbar:!0,slots:{toolbar:T},initialState:{sorting:{sortModel:[]},filter:{filterModel:{items:[]}},...c==null?void 0:c.initialState},...c,autosizeOnMount:!0,autosizeOptions:{...(c==null?void 0:c.autosizeOptions)||{},includeOutliers:!0,includeHeaders:!0,expand:!0,columns:((P=c==null?void 0:c.autosizeOptions)==null?void 0:P.columns)||t.map(w=>w.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","&:hover":{"&::before":{content:'""',position:"absolute",top:0,left:"16px",right:"16px",bottom:0,backgroundColor:"action.hover",borderRadius:"16px",zIndex:0}},"&.Mui-selected":{"&:hover":{}},...O!==null&&{[`&[data-id="${O}"]`]:{"&::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::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"}},"& .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}})})}));Cm.displayName="WandelbotsDataGrid";const un=C0({createStyledComponent:pt("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>yc({props:e,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(un.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 Yw=({title:e,titleId:t,...r},n)=>N.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?N.createElement("title",{id:t},e):null,N.createElement("g",{id:"JogMinus"},N.createElement("path",{id:"Minus",d:"M0 13V8H21V13H0Z",fill:"white"}))),Kw=J.forwardRef(Yw),Qw=({title:e,titleId:t,...r},n)=>N.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?N.createElement("title",{id:t},e):null,N.createElement("g",{id:"JogPlus"},N.createElement("g",{id:"Plus"},N.createElement("path",{d:"M0 13V8H8V13H0Z",fill:"white"}),N.createElement("path",{d:"M8 0L13 2.18557e-07L13 21H8L8 0Z",fill:"white"}),N.createElement("path",{d:"M13 13V8H21V13H13Z",fill:"white"})))),Xw=J.forwardRef(Qw);function _s(e){J.useEffect(e,[])}function Pm(e){_s(()=>je.autorun(e))}function Tm(e,t,r){_s(()=>je.reaction(e,t,r))}function Tn(e){return _s(()=>{let t;function r(){e(),t=requestAnimationFrame(r)}return t=requestAnimationFrame(r),()=>{cancelAnimationFrame(t)}})}const rl=Ke(ye.observer(({colors:e,label:t,getDisplayedValue:r,startJogging:n,stopJogging:a,disabled:o,activeJoggingDirection:s,...i})=>{var O,C,T,P,w,I,z;Tn(()=>{const b=r(),A=h.current;A&&(A.textContent=b)});const l=R.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:(C=e.buttonBackgroundColor)==null?void 0:C.default,":hover":{backgroundColor:(T=e.buttonBackgroundColor)==null?void 0:T.hovered},":active":{backgroundColor:(P=e.buttonBackgroundColor)==null?void 0:P.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor}},":disabled":{backgroundColor:(w=e.buttonBackgroundColor)==null?void 0:w.disabled,"svg path":{fill:l.palette.action.disabled}}},y={...f,backgroundColor:(I=e.buttonBackgroundColor)==null?void 0:I.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor},":disabled":{backgroundColor:(z=e.buttonBackgroundColor)==null?void 0:z.pressed,"svg path":{fill:l.palette.action.disabled}}};function S(b,A){o||b.button===0&&(u(A),n(A))}function E(){u(null),a()}return g.jsxs(un,{height:"64px",direction:"row",justifyContent:"center",...i,children:[g.jsx(R.IconButton,{disabled:o,disableRipple:!0,onPointerDown:b=>S(b,"-"),onPointerUp:E,onPointerOut:E,size:"large",sx:{...d==="-"?y:m,borderRadius:"16px 0px 0px 16px",borderLeft:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:g.jsx(Kw,{})}),g.jsxs(un,{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(un,{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(R.Typography,{height:"22px",sx:{fontSize:"15px",color:o?l.palette.action.disabled:e.color,fontWeight:700},ref:h,children:r()})]}),g.jsx(R.IconButton,{disableRipple:!0,disabled:o,onPointerDown:b=>S(b,"+"),onPointerUp:E,onPointerOut:E,size:"large",sx:{...d==="+"?y:m,borderRadius:"0px 16px 16px 0px",borderRight:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:g.jsx(Xw,{})})]})})),Zw=mr(g.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),eC=mr(g.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");function Rr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Rm=typeof global=="object"&&global&&global.Object===Object&&global,tC=typeof self=="object"&&self&&self.Object===Object&&self,Ut=Rm||tC||Function("return this")(),Oi=function(){return Ut.Date.now()},rC=/\s/;function nC(e){for(var t=e.length;t--&&rC.test(e.charAt(t)););return t}var aC=/^\s+/;function oC(e){return e&&e.slice(0,nC(e)+1).replace(aC,"")}var dr=Ut.Symbol,Am=Object.prototype,sC=Am.hasOwnProperty,iC=Am.toString,Gn=dr?dr.toStringTag:void 0;function lC(e){var t=sC.call(e,Gn),r=e[Gn];try{e[Gn]=void 0;var n=!0}catch{}var a=iC.call(e);return n&&(t?e[Gn]=r:delete e[Gn]),a}var cC=Object.prototype,uC=cC.toString;function dC(e){return uC.call(e)}var hC="[object Null]",pC="[object Undefined]",pd=dr?dr.toStringTag:void 0;function Ur(e){return e==null?e===void 0?pC:hC:pd&&pd in Object(e)?lC(e):dC(e)}function Ar(e){return e!=null&&typeof e=="object"}var mC="[object Symbol]";function Es(e){return typeof e=="symbol"||Ar(e)&&Ur(e)==mC}var md=NaN,fC=/^[-+]0x[0-9a-f]+$/i,gC=/^0b[01]+$/i,yC=/^0o[0-7]+$/i,bC=parseInt;function fd(e){if(typeof e=="number")return e;if(Es(e))return md;if(Rr(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Rr(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=oC(e);var r=gC.test(e);return r||yC.test(e)?bC(e.slice(2),r?2:8):fC.test(e)?md:+e}var xC="Expected a function",vC=Math.max,SC=Math.min;function OC(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(xC);t=fd(t)||0,Rr(r)&&(u=!!r.leading,d="maxWait"in r,o=d?vC(fd(r.maxWait)||0,t):o,h="trailing"in r?!!r.trailing:h);function p(P){var w=n,I=a;return n=a=void 0,c=P,s=e.apply(I,w),s}function f(P){return c=P,i=setTimeout(S,t),u?p(P):s}function m(P){var w=P-l,I=P-c,z=t-w;return d?SC(z,o-I):z}function y(P){var w=P-l,I=P-c;return l===void 0||w>=t||w<0||d&&I>=o}function S(){var P=Oi();if(y(P))return E(P);i=setTimeout(S,m(P))}function E(P){return i=void 0,h&&n?p(P):(n=a=void 0,s)}function O(){i!==void 0&&clearTimeout(i),c=0,n=l=a=i=void 0}function C(){return i===void 0?s:E(Oi())}function T(){var P=Oi(),w=y(P);if(n=arguments,a=this,l=P,w){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 T.cancel=O,T.flush=C,T}var wC="Expected a function";function CC(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(wC);return Rr(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),OC(e,t,{leading:n,maxWait:t,trailing:a})}const _m=Ke(ye.observer(({startJogging:e,stopJogging:t,lowerLimitDegs:r,upperLimitDegs:n,getValueDegs:a,disabled:o,...s})=>{var O,C,T,P,w,I,z,b,A,G,_,F,re,ee,ae;const{t:i}=Re.useTranslation(),[l,c]=J.useState(),u=R.useTheme(),d={background:(O=u.palette.backgroundPaperElevation)==null?void 0:O[4],color:(C=u.palette.backgroundPaperElevation)==null?void 0:C[11]},h=ye.useLocalObservable(()=>({activeJoggingDir:null,startJogging(te){this.activeJoggingDir=te,e(te)},stopJogging(){this.activeJoggingDir=null,t()}})),p=CC(()=>{c(a())},50);Tn(p);function f(te){te.button===0&&h.startJogging("-")}function m(te){te.button===0&&h.startJogging("+")}function y(te){h.stopJogging()}function S(te){h.stopJogging()}function E(te,se=1){if(te===void 0||isNaN(te))return"";const W=i("General.degree.variable",{amount:te.toFixed(se)});return te>0&&se===0?`+${W}`:W}return g.jsxs(un,{height:"64px",width:"100%",maxWidth:"260px",direction:"row",...s,sx:{"& .MuiIconButton-root":{width:"52px",color:u.palette.text.primary,alignContent:"center",backgroundColor:(T=u.palette.backgroundPaperElevation)==null?void 0:T[11],"& svg":{width:"42px",height:"42px"},"&.Mui-disabled":{backgroundColor:(P=u.palette.backgroundPaperElevation)==null?void 0:P[11],color:u.palette.action.disabled,opacity:1},"&:hover":{backgroundColor:(w=u.palette.backgroundPaperElevation)==null?void 0:w[9]},"&:active":{...d}}},children:[g.jsx(R.IconButton,{onPointerDown:f,onPointerUp:y,onPointerOut:S,disabled:o,disableRipple:!0,sx:{borderRadius:"16px 0px 0px 16px",...h.activeJoggingDir==="-"?d:{}},children:g.jsx(Zw,{sx:{pointerEvents:"none",color:(A=(b=(z=(I=u.componentsExt)==null?void 0:I.JoggingPanel)==null?void 0:z.JoggingJoint)==null?void 0:b.Joint)==null?void 0:A.arrowColor}})}),g.jsxs(un,{flexGrow:1,alignItems:"center",justifyContent:"center",sx:{borderStyle:"solid",borderLeftWidth:0,borderRightWidth:0,border:"none",backgroundColor:(G=u.palette.backgroundPaperElevation)==null?void 0:G[11],paddingLeft:"20px",paddingRight:"20px",zIndex:1},children:[g.jsx(R.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(R.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:(_=u.palette.backgroundPaperElevation)==null?void 0:_[5],opacity:1}},marks:r!==void 0&&n!==void 0&&[{value:r,label:E(r,0)},{value:n,label:E(n,0)}]})]}),g.jsx(R.IconButton,{onPointerDown:m,onPointerUp:y,onPointerOut:S,disabled:o,disableRipple:!0,sx:{borderRadius:"0px 16px 16px 0px",...h.activeJoggingDir==="+"?d:{}},children:g.jsx(eC,{sx:{pointerEvents:"none",color:(ae=(ee=(re=(F=u.componentsExt)==null?void 0:F.JoggingPanel)==null?void 0:re.JoggingJoint)==null?void 0:ee.Joint)==null?void 0:ae.arrowColor}})})]})})),PC=mr(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"),TC=mr(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 RC(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Em=RC;function AC(){this.__data__=[],this.size=0}var _C=AC;function EC(e,t){return e===t||e!==e&&t!==t}var Vm=EC;function VC(e,t){for(var r=e.length;r--;)if(Vm(e[r][0],t))return r;return-1}var Vs=VC,IC=Array.prototype,MC=IC.splice;function jC(e){var t=this.__data__,r=Vs(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():MC.call(t,r,1),--this.size,!0}var $C=jC;function kC(e){var t=this.__data__,r=Vs(t,e);return r<0?void 0:t[r][1]}var UC=kC;function DC(e){return Vs(this.__data__,e)>-1}var LC=DC;function BC(e,t){var r=this.__data__,n=Vs(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var NC=BC;function Rn(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])}}Rn.prototype.clear=_C;Rn.prototype.delete=$C;Rn.prototype.get=UC;Rn.prototype.has=LC;Rn.prototype.set=NC;var Is=Rn;function FC(){this.__data__=new Is,this.size=0}var zC=FC;function GC(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var HC=GC;function qC(e){return this.__data__.get(e)}var WC=qC;function JC(e){return this.__data__.has(e)}var YC=JC,KC=typeof global=="object"&&global&&global.Object===Object&&global,Im=KC,QC=typeof self=="object"&&self&&self.Object===Object&&self,XC=Im||QC||Function("return this")(),Qt=XC,ZC=Qt.Symbol,Sn=ZC,Mm=Object.prototype,eP=Mm.hasOwnProperty,tP=Mm.toString,Hn=Sn?Sn.toStringTag:void 0;function rP(e){var t=eP.call(e,Hn),r=e[Hn];try{e[Hn]=void 0;var n=!0}catch{}var a=tP.call(e);return n&&(t?e[Hn]=r:delete e[Hn]),a}var nP=rP,aP=Object.prototype,oP=aP.toString;function sP(e){return oP.call(e)}var iP=sP,lP="[object Null]",cP="[object Undefined]",gd=Sn?Sn.toStringTag:void 0;function uP(e){return e==null?e===void 0?cP:lP:gd&&gd in Object(e)?nP(e):iP(e)}var Ia=uP,dP="[object AsyncFunction]",hP="[object Function]",pP="[object GeneratorFunction]",mP="[object Proxy]";function fP(e){if(!Em(e))return!1;var t=Ia(e);return t==hP||t==pP||t==dP||t==mP}var jm=fP,gP=Qt["__core-js_shared__"],wi=gP,yd=function(){var e=/[^.]+$/.exec(wi&&wi.keys&&wi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function yP(e){return!!yd&&yd in e}var bP=yP,xP=Function.prototype,vP=xP.toString;function SP(e){if(e!=null){try{return vP.call(e)}catch{}try{return e+""}catch{}}return""}var Dr=SP,OP=/[\\^$.*+?()[\]{}|]/g,wP=/^\[object .+?Constructor\]$/,CP=Function.prototype,PP=Object.prototype,TP=CP.toString,RP=PP.hasOwnProperty,AP=RegExp("^"+TP.call(RP).replace(OP,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _P(e){if(!Em(e)||bP(e))return!1;var t=jm(e)?AP:wP;return t.test(Dr(e))}var EP=_P;function VP(e,t){return e==null?void 0:e[t]}var IP=VP;function MP(e,t){var r=IP(e,t);return EP(r)?r:void 0}var An=MP,jP=An(Qt,"Map"),ba=jP,$P=An(Object,"create"),xa=$P;function kP(){this.__data__=xa?xa(null):{},this.size=0}var UP=kP;function DP(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var LP=DP,BP="__lodash_hash_undefined__",NP=Object.prototype,FP=NP.hasOwnProperty;function zP(e){var t=this.__data__;if(xa){var r=t[e];return r===BP?void 0:r}return FP.call(t,e)?t[e]:void 0}var GP=zP,HP=Object.prototype,qP=HP.hasOwnProperty;function WP(e){var t=this.__data__;return xa?t[e]!==void 0:qP.call(t,e)}var JP=WP,YP="__lodash_hash_undefined__";function KP(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=xa&&t===void 0?YP:t,this}var QP=KP;function _n(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])}}_n.prototype.clear=UP;_n.prototype.delete=LP;_n.prototype.get=GP;_n.prototype.has=JP;_n.prototype.set=QP;var bd=_n;function XP(){this.size=0,this.__data__={hash:new bd,map:new(ba||Is),string:new bd}}var ZP=XP;function eT(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var tT=eT;function rT(e,t){var r=e.__data__;return tT(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Ms=rT;function nT(e){var t=Ms(this,e).delete(e);return this.size-=t?1:0,t}var aT=nT;function oT(e){return Ms(this,e).get(e)}var sT=oT;function iT(e){return Ms(this,e).has(e)}var lT=iT;function cT(e,t){var r=Ms(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var uT=cT;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=ZP;En.prototype.delete=aT;En.prototype.get=sT;En.prototype.has=lT;En.prototype.set=uT;var $m=En,dT=200;function hT(e,t){var r=this.__data__;if(r instanceof Is){var n=r.__data__;if(!ba||n.length<dT-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new $m(n)}return r.set(e,t),this.size=r.size,this}var pT=hT;function Vn(e){var t=this.__data__=new Is(e);this.size=t.size}Vn.prototype.clear=zC;Vn.prototype.delete=HC;Vn.prototype.get=WC;Vn.prototype.has=YC;Vn.prototype.set=pT;var Ci=Vn,mT="__lodash_hash_undefined__";function fT(e){return this.__data__.set(e,mT),this}var gT=fT;function yT(e){return this.__data__.has(e)}var bT=yT;function qo(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new $m;++t<r;)this.add(e[t])}qo.prototype.add=qo.prototype.push=gT;qo.prototype.has=bT;var xT=qo;function vT(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 ST=vT;function OT(e,t){return e.has(t)}var wT=OT,CT=1,PT=2;function TT(e,t,r,n,a,o){var s=r&CT,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&PT?new xT:void 0;for(o.set(e,t),o.set(t,e);++d<i;){var f=e[d],m=t[d];if(n)var y=s?n(m,f,d,t,e,o):n(f,m,d,e,t,o);if(y!==void 0){if(y)continue;h=!1;break}if(p){if(!ST(t,function(S,E){if(!wT(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 km=TT,RT=Qt.Uint8Array,xd=RT;function AT(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var _T=AT;function ET(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var VT=ET,IT=1,MT=2,jT="[object Boolean]",$T="[object Date]",kT="[object Error]",UT="[object Map]",DT="[object Number]",LT="[object RegExp]",BT="[object Set]",NT="[object String]",FT="[object Symbol]",zT="[object ArrayBuffer]",GT="[object DataView]",vd=Sn?Sn.prototype:void 0,Pi=vd?vd.valueOf:void 0;function HT(e,t,r,n,a,o,s){switch(r){case GT:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case zT:return!(e.byteLength!=t.byteLength||!o(new xd(e),new xd(t)));case jT:case $T:case DT:return Vm(+e,+t);case kT:return e.name==t.name&&e.message==t.message;case LT:case NT:return e==t+"";case UT:var i=_T;case BT:var l=n&IT;if(i||(i=VT),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;n|=MT,s.set(e,t);var u=km(i(e),i(t),n,a,o,s);return s.delete(e),u;case FT:if(Pi)return Pi.call(e)==Pi.call(t)}return!1}var qT=HT;function WT(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var JT=WT,YT=Array.isArray,Wo=YT;function KT(e,t,r){var n=t(e);return Wo(e)?n:JT(n,r(e))}var QT=KT;function XT(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 ZT=XT;function eR(){return[]}var tR=eR,rR=Object.prototype,nR=rR.propertyIsEnumerable,Sd=Object.getOwnPropertySymbols,aR=Sd?function(e){return e==null?[]:(e=Object(e),ZT(Sd(e),function(t){return nR.call(e,t)}))}:tR,oR=aR;function sR(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var iR=sR;function lR(e){return e!=null&&typeof e=="object"}var va=lR,cR="[object Arguments]";function uR(e){return va(e)&&Ia(e)==cR}var Od=uR,Um=Object.prototype,dR=Um.hasOwnProperty,hR=Um.propertyIsEnumerable,pR=Od(function(){return arguments}())?Od:function(e){return va(e)&&dR.call(e,"callee")&&!hR.call(e,"callee")},mR=pR;function fR(){return!1}var gR=fR,Dm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,wd=Dm&&typeof module=="object"&&module&&!module.nodeType&&module,yR=wd&&wd.exports===Dm,Cd=yR?Qt.Buffer:void 0,bR=Cd?Cd.isBuffer:void 0,xR=bR||gR,nl=xR,vR=9007199254740991,SR=/^(?:0|[1-9]\d*)$/;function OR(e,t){var r=typeof e;return t=t??vR,!!t&&(r=="number"||r!="symbol"&&SR.test(e))&&e>-1&&e%1==0&&e<t}var wR=OR,CR=9007199254740991;function PR(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=CR}var Lm=PR,TR="[object Arguments]",RR="[object Array]",AR="[object Boolean]",_R="[object Date]",ER="[object Error]",VR="[object Function]",IR="[object Map]",MR="[object Number]",jR="[object Object]",$R="[object RegExp]",kR="[object Set]",UR="[object String]",DR="[object WeakMap]",LR="[object ArrayBuffer]",BR="[object DataView]",NR="[object Float32Array]",FR="[object Float64Array]",zR="[object Int8Array]",GR="[object Int16Array]",HR="[object Int32Array]",qR="[object Uint8Array]",WR="[object Uint8ClampedArray]",JR="[object Uint16Array]",YR="[object Uint32Array]",Ae={};Ae[NR]=Ae[FR]=Ae[zR]=Ae[GR]=Ae[HR]=Ae[qR]=Ae[WR]=Ae[JR]=Ae[YR]=!0;Ae[TR]=Ae[RR]=Ae[LR]=Ae[AR]=Ae[BR]=Ae[_R]=Ae[ER]=Ae[VR]=Ae[IR]=Ae[MR]=Ae[jR]=Ae[$R]=Ae[kR]=Ae[UR]=Ae[DR]=!1;function KR(e){return va(e)&&Lm(e.length)&&!!Ae[Ia(e)]}var QR=KR;function XR(e){return function(t){return e(t)}}var ZR=XR,Bm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,sa=Bm&&typeof module=="object"&&module&&!module.nodeType&&module,eA=sa&&sa.exports===Bm,Ti=eA&&Im.process,tA=function(){try{var e=sa&&sa.require&&sa.require("util").types;return e||Ti&&Ti.binding&&Ti.binding("util")}catch{}}(),Pd=tA,Td=Pd&&Pd.isTypedArray,rA=Td?ZR(Td):QR,Nm=rA,nA=Object.prototype,aA=nA.hasOwnProperty;function oA(e,t){var r=Wo(e),n=!r&&mR(e),a=!r&&!n&&nl(e),o=!r&&!n&&!a&&Nm(e),s=r||n||a||o,i=s?iR(e.length,String):[],l=i.length;for(var c in e)(t||aA.call(e,c))&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||wR(c,l)))&&i.push(c);return i}var sA=oA,iA=Object.prototype;function lA(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||iA;return e===r}var cA=lA;function uA(e,t){return function(r){return e(t(r))}}var dA=uA,hA=dA(Object.keys,Object),pA=hA,mA=Object.prototype,fA=mA.hasOwnProperty;function gA(e){if(!cA(e))return pA(e);var t=[];for(var r in Object(e))fA.call(e,r)&&r!="constructor"&&t.push(r);return t}var yA=gA;function bA(e){return e!=null&&Lm(e.length)&&!jm(e)}var xA=bA;function vA(e){return xA(e)?sA(e):yA(e)}var SA=vA;function OA(e){return QT(e,SA,oR)}var Rd=OA,wA=1,CA=Object.prototype,PA=CA.hasOwnProperty;function TA(e,t,r,n,a,o){var s=r&wA,i=Rd(e),l=i.length,c=Rd(t),u=c.length;if(l!=u&&!s)return!1;for(var d=l;d--;){var h=i[d];if(!(s?h in t:PA.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 y=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}y||(y=h=="constructor")}if(m&&!y){var C=e.constructor,T=t.constructor;C!=T&&"constructor"in e&&"constructor"in t&&!(typeof C=="function"&&C instanceof C&&typeof T=="function"&&T instanceof T)&&(m=!1)}return o.delete(e),o.delete(t),m}var RA=TA,AA=An(Qt,"DataView"),al=AA,_A=An(Qt,"Promise"),ol=_A,EA=An(Qt,"Set"),sl=EA,VA=An(Qt,"WeakMap"),il=VA,Ad="[object Map]",IA="[object Object]",_d="[object Promise]",Ed="[object Set]",Vd="[object WeakMap]",Id="[object DataView]",MA=Dr(al),jA=Dr(ba),$A=Dr(ol),kA=Dr(sl),UA=Dr(il),br=Ia;(al&&br(new al(new ArrayBuffer(1)))!=Id||ba&&br(new ba)!=Ad||ol&&br(ol.resolve())!=_d||sl&&br(new sl)!=Ed||il&&br(new il)!=Vd)&&(br=function(e){var t=Ia(e),r=t==IA?e.constructor:void 0,n=r?Dr(r):"";if(n)switch(n){case MA:return Id;case jA:return Ad;case $A:return _d;case kA:return Ed;case UA:return Vd}return t});var Md=br,DA=1,jd="[object Arguments]",$d="[object Array]",to="[object Object]",LA=Object.prototype,kd=LA.hasOwnProperty;function BA(e,t,r,n,a,o){var s=Wo(e),i=Wo(t),l=s?$d:Md(e),c=i?$d:Md(t);l=l==jd?to:l,c=c==jd?to:c;var u=l==to,d=c==to,h=l==c;if(h&&nl(e)){if(!nl(t))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new Ci),s||Nm(e)?km(e,t,r,n,a,o):qT(e,t,l,r,n,a,o);if(!(r&DA)){var p=u&&kd.call(e,"__wrapped__"),f=d&&kd.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,y=f?t.value():t;return o||(o=new Ci),a(m,y,r,n,o)}}return h?(o||(o=new Ci),RA(e,t,r,n,a,o)):!1}var NA=BA;function Fm(e,t,r,n,a){return e===t?!0:e==null||t==null||!va(e)&&!va(t)?e!==e&&t!==t:NA(e,t,r,n,Fm,a)}var FA=Fm;function zA(e,t){return FA(e,t)}var GA=zA;/*! *****************************************************************************
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
@@ -142,14 +142,14 @@ and limitations under the License.
142
142
  * by Pedro Ladaria <pedro.ladaria@gmail.com>
143
143
  * https://github.com/pladaria/reconnecting-websocket
144
144
  * License MIT
145
- */var KA=function(){if(typeof WebSocket<"u")return WebSocket},QA=function(e){return typeof e<"u"&&!!e&&e.CLOSING===2},gr={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},XA=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?gr.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?gr.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=HA(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,WA(["RWS>"],t))},e.prototype._getNextDelay=function(){var t=this._options,r=t.reconnectionDelayGrowFactor,n=r===void 0?gr.reconnectionDelayGrowFactor:r,a=t.minReconnectionDelay,o=a===void 0?gr.minReconnectionDelay:a,s=t.maxReconnectionDelay,i=s===void 0?gr.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?gr.maxRetries:n,o=r.connectionTimeout,s=o===void 0?gr.connectionTimeout:o,i=r.WebSocket,l=i===void 0?KA():i;if(this._retryCount>=a){this._debug("max retries reached",this._retryCount,">=",a);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!QA(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 JA(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 YA(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}(),ZA=Object.defineProperty,e_=Object.defineProperties,t_=Object.getOwnPropertyDescriptors,Ud=Object.getOwnPropertySymbols,r_=Object.prototype.hasOwnProperty,n_=Object.prototype.propertyIsEnumerable,Ld=(e,t,r)=>t in e?ZA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,on=(e,t)=>{for(var r in t||(t={}))r_.call(t,r)&&Ld(e,r,t[r]);if(Ud)for(var r of Ud(t))n_.call(t,r)&&Ld(e,r,t[r]);return e},cl=(e,t)=>e_(e,t_(t)),Ee=(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())}),a_=class extends XA{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 Ee(this,null,function*(){return new Promise((e,t)=>{this.readyState===WebSocket.OPEN?e():(this.addEventListener("open",()=>e()),this.addEventListener("error",t))})})}closed(){return Ee(this,null,function*(){return new Promise((e,t)=>{this.readyState===WebSocket.CLOSED?e():(this.addEventListener("close",()=>e()),this.addEventListener("error",t))})})}firstMessage(){return Ee(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 Ee(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)})})}},o_=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}},Ri=new o_;function ir(e){try{return JSON.parse(e)}catch{return}}function s_(e,t){return e||(e="world"),t||(t="world"),e===t}var dn="wandelbots.io",Ai={dev:{domain:`https://auth.portal.dev.${dn}`,clientId:"fLbJD0RLp5r2Dpucm5j8BjwMR6Hunfha"},stg:{domain:`https://auth.portal.stg.${dn}`,clientId:"joVDeD9e786WzFNSGCqoVq7HNkWt5j6s"},prod:{domain:`https://auth.portal.${dn}`,clientId:"J7WJUi38xVQdJAEBNRT9Xw1b0fXDb4J2"}},i_=e=>{if(e.includes(`dev.${dn}`))return Ai.dev;if(e.includes(`stg.${dn}`))return Ai.stg;if(e.includes(dn))return Ai.prod;throw new Error("Unsupported instance URL. Cannot determine Auth0 configuration.")},l_=e=>Ee(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=i_(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 Hm(e,t){return function(){return e.apply(t,arguments)}}const{toString:c_}=Object.prototype,{getPrototypeOf:bc}=Object,js=(e=>t=>{const r=c_.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Tt=e=>(e=e.toLowerCase(),t=>js(t)===e),ks=e=>t=>typeof t===e,{isArray:In}=Array,Sa=ks("undefined");function u_(e){return e!==null&&!Sa(e)&&e.constructor!==null&&!Sa(e.constructor)&&ht(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const qm=Tt("ArrayBuffer");function d_(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&qm(e.buffer),t}const h_=ks("string"),ht=ks("function"),Wm=ks("number"),$s=e=>e!==null&&typeof e=="object",p_=e=>e===!0||e===!1,vo=e=>{if(js(e)!=="object")return!1;const t=bc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},m_=Tt("Date"),f_=Tt("File"),g_=Tt("Blob"),y_=Tt("FileList"),b_=e=>$s(e)&&ht(e.pipe),x_=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ht(e.append)&&((t=js(e))==="formdata"||t==="object"&&ht(e.toString)&&e.toString()==="[object FormData]"))},v_=Tt("URLSearchParams"),[S_,O_,w_,C_]=["ReadableStream","Request","Response","Headers"].map(Tt),P_=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ma(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),In(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 Jm(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 Sr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ym=e=>!Sa(e)&&e!==Sr;function ul(){const{caseless:e}=Ym(this)&&this||{},t={},r=(n,a)=>{const o=e&&Jm(t,a)||a;vo(t[o])&&vo(n)?t[o]=ul(t[o],n):vo(n)?t[o]=ul({},n):In(n)?t[o]=n.slice():t[o]=n};for(let n=0,a=arguments.length;n<a;n++)arguments[n]&&Ma(arguments[n],r);return t}const T_=(e,t,r,{allOwnKeys:n}={})=>(Ma(t,(a,o)=>{r&&ht(a)?e[o]=Hm(a,r):e[o]=a},{allOwnKeys:n}),e),R_=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),A_=(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)},__=(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&&bc(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},E_=(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},V_=e=>{if(!e)return null;if(In(e))return e;let t=e.length;if(!Wm(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},I_=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&bc(Uint8Array)),M_=(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])}},j_=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},k_=Tt("HTMLFormElement"),$_=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),Dd=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),U_=Tt("RegExp"),Km=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Ma(r,(a,o)=>{let s;(s=t(a,o,e))!==!1&&(n[o]=s||a)}),Object.defineProperties(e,n)},L_=e=>{Km(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+"'")})}})},D_=(e,t)=>{const r={},n=a=>{a.forEach(o=>{r[o]=!0})};return In(e)?n(e):n(String(e).split(t)),r},B_=()=>{},N_=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function F_(e){return!!(e&&ht(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const z_=e=>{const t=new Array(10),r=(n,a)=>{if($s(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[a]=n;const o=In(n)?[]:{};return Ma(n,(s,i)=>{const l=r(s,a+1);!Sa(l)&&(o[i]=l)}),t[a]=void 0,o}}return n};return r(e,0)},G_=Tt("AsyncFunction"),H_=e=>e&&($s(e)||ht(e))&&ht(e.then)&&ht(e.catch),Qm=((e,t)=>e?setImmediate:t?((r,n)=>(Sr.addEventListener("message",({source:a,data:o})=>{a===Sr&&o===r&&n.length&&n.shift()()},!1),a=>{n.push(a),Sr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",ht(Sr.postMessage)),q_=typeof queueMicrotask<"u"?queueMicrotask.bind(Sr):typeof process<"u"&&process.nextTick||Qm,H={isArray:In,isArrayBuffer:qm,isBuffer:u_,isFormData:x_,isArrayBufferView:d_,isString:h_,isNumber:Wm,isBoolean:p_,isObject:$s,isPlainObject:vo,isReadableStream:S_,isRequest:O_,isResponse:w_,isHeaders:C_,isUndefined:Sa,isDate:m_,isFile:f_,isBlob:g_,isRegExp:U_,isFunction:ht,isStream:b_,isURLSearchParams:v_,isTypedArray:I_,isFileList:y_,forEach:Ma,merge:ul,extend:T_,trim:P_,stripBOM:R_,inherits:A_,toFlatObject:__,kindOf:js,kindOfTest:Tt,endsWith:E_,toArray:V_,forEachEntry:M_,matchAll:j_,isHTMLForm:k_,hasOwnProperty:Dd,hasOwnProp:Dd,reduceDescriptors:Km,freezeMethods:L_,toObjectSet:D_,toCamelCase:$_,noop:B_,toFiniteNumber:N_,findKey:Jm,global:Sr,isContextDefined:Ym,isSpecCompliantForm:F_,toJSONObject:z_,isAsyncFn:G_,isThenable:H_,setImmediate:Qm,asap:q_};function he(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)}H.inherits(he,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:H.toJSONObject(this.config),code:this.code,status:this.status}}});const Xm=he.prototype,Zm={};["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=>{Zm[e]={value:e}});Object.defineProperties(he,Zm);Object.defineProperty(Xm,"isAxiosError",{value:!0});he.from=(e,t,r,n,a,o)=>{const s=Object.create(Xm);return H.toFlatObject(e,s,function(l){return l!==Error.prototype},i=>i!=="isAxiosError"),he.call(s,e.message,t,r,n,a),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};const W_=null;function dl(e){return H.isPlainObject(e)||H.isArray(e)}function ef(e){return H.endsWith(e,"[]")?e.slice(0,-2):e}function Bd(e,t,r){return e?e.concat(t).map(function(a,o){return a=ef(a),!r&&o?"["+a+"]":a}).join(r?".":""):t}function J_(e){return H.isArray(e)&&!e.some(dl)}const Y_=H.toFlatObject(H,{},null,function(t){return/^is[A-Z]/.test(t)});function Us(e,t,r){if(!H.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=H.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!H.isUndefined(y[m])});const n=r.metaTokens,a=r.visitor||u,o=r.dots,s=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&H.isSpecCompliantForm(t);if(!H.isFunction(a))throw new TypeError("visitor must be a function");function c(f){if(f===null)return"";if(H.isDate(f))return f.toISOString();if(!l&&H.isBlob(f))throw new he("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(f)||H.isTypedArray(f)?l&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,m,y){let S=f;if(f&&!y&&typeof f=="object"){if(H.endsWith(m,"{}"))m=n?m:m.slice(0,-2),f=JSON.stringify(f);else if(H.isArray(f)&&J_(f)||(H.isFileList(f)||H.endsWith(m,"[]"))&&(S=H.toArray(f)))return m=ef(m),S.forEach(function(O,w){!(H.isUndefined(O)||O===null)&&t.append(s===!0?Bd([m],w,o):s===null?m:m+"[]",c(O))}),!1}return dl(f)?!0:(t.append(Bd(y,m,o),c(f)),!1)}const d=[],h=Object.assign(Y_,{defaultVisitor:u,convertValue:c,isVisitable:dl});function p(f,m){if(!H.isUndefined(f)){if(d.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(f),H.forEach(f,function(S,E){(!(H.isUndefined(S)||S===null)&&a.call(t,S,H.isString(E)?E.trim():E,m,h))===!0&&p(S,m?m.concat(E):[E])}),d.pop()}}if(!H.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Nd(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function xc(e,t){this._pairs=[],e&&Us(e,this,t)}const tf=xc.prototype;tf.append=function(t,r){this._pairs.push([t,r])};tf.toString=function(t){const r=t?function(n){return t.call(this,n,Nd)}:Nd;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function K_(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function rf(e,t,r){if(!t)return e;const n=r&&r.encode||K_;H.isFunction(r)&&(r={serialize:r});const a=r&&r.serialize;let o;if(a?o=a(t,r):o=H.isURLSearchParams(t)?t.toString():new xc(t,r).toString(n),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Fd{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){H.forEach(this.handlers,function(n){n!==null&&t(n)})}}const nf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Q_=typeof URLSearchParams<"u"?URLSearchParams:xc,X_=typeof FormData<"u"?FormData:null,Z_=typeof Blob<"u"?Blob:null,eE={isBrowser:!0,classes:{URLSearchParams:Q_,FormData:X_,Blob:Z_},protocols:["http","https","file","blob","url","data"]},vc=typeof window<"u"&&typeof document<"u",hl=typeof navigator=="object"&&navigator||void 0,tE=vc&&(!hl||["ReactNative","NativeScript","NS"].indexOf(hl.product)<0),rE=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",nE=vc&&window.location.href||"http://localhost",aE=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:vc,hasStandardBrowserEnv:tE,hasStandardBrowserWebWorkerEnv:rE,navigator:hl,origin:nE},Symbol.toStringTag,{value:"Module"})),Xe={...aE,...eE};function oE(e,t){return Us(e,new Xe.classes.URLSearchParams,Object.assign({visitor:function(r,n,a,o){return Xe.isNode&&H.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function sE(e){return H.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function iE(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 af(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&&H.isArray(a)?a.length:s,l?(H.hasOwnProp(a,s)?a[s]=[a[s],n]:a[s]=n,!i):((!a[s]||!H.isObject(a[s]))&&(a[s]=[]),t(r,n,a[s],o)&&H.isArray(a[s])&&(a[s]=iE(a[s])),!i)}if(H.isFormData(e)&&H.isFunction(e.entries)){const r={};return H.forEachEntry(e,(n,a)=>{t(sE(n),a,r,0)}),r}return null}function lE(e,t,r){if(H.isString(e))try{return(t||JSON.parse)(e),H.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const ja={transitional:nf,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,o=H.isObject(t);if(o&&H.isHTMLForm(t)&&(t=new FormData(t)),H.isFormData(t))return a?JSON.stringify(af(t)):t;if(H.isArrayBuffer(t)||H.isBuffer(t)||H.isStream(t)||H.isFile(t)||H.isBlob(t)||H.isReadableStream(t))return t;if(H.isArrayBufferView(t))return t.buffer;if(H.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 oE(t,this.formSerializer).toString();if((i=H.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Us(i?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||a?(r.setContentType("application/json",!1),lE(t)):t}],transformResponse:[function(t){const r=this.transitional||ja.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(H.isResponse(t)||H.isReadableStream(t))return t;if(t&&H.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"?he.from(i,he.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:Xe.classes.FormData,Blob:Xe.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],e=>{ja.headers[e]={}});const cE=H.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"]),uE=e=>{const t={};let r,n,a;return e&&e.split(`
145
+ */var KA=function(){if(typeof WebSocket<"u")return WebSocket},QA=function(e){return typeof e<"u"&&!!e&&e.CLOSING===2},gr={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},XA=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?gr.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?gr.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=HA(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,WA(["RWS>"],t))},e.prototype._getNextDelay=function(){var t=this._options,r=t.reconnectionDelayGrowFactor,n=r===void 0?gr.reconnectionDelayGrowFactor:r,a=t.minReconnectionDelay,o=a===void 0?gr.minReconnectionDelay:a,s=t.maxReconnectionDelay,i=s===void 0?gr.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?gr.maxRetries:n,o=r.connectionTimeout,s=o===void 0?gr.connectionTimeout:o,i=r.WebSocket,l=i===void 0?KA():i;if(this._retryCount>=a){this._debug("max retries reached",this._retryCount,">=",a);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!QA(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 JA(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 YA(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}(),ZA=Object.defineProperty,e_=Object.defineProperties,t_=Object.getOwnPropertyDescriptors,Ud=Object.getOwnPropertySymbols,r_=Object.prototype.hasOwnProperty,n_=Object.prototype.propertyIsEnumerable,Dd=(e,t,r)=>t in e?ZA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,on=(e,t)=>{for(var r in t||(t={}))r_.call(t,r)&&Dd(e,r,t[r]);if(Ud)for(var r of Ud(t))n_.call(t,r)&&Dd(e,r,t[r]);return e},cl=(e,t)=>e_(e,t_(t)),Ee=(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())}),a_=class extends XA{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 Ee(this,null,function*(){return new Promise((e,t)=>{this.readyState===WebSocket.OPEN?e():(this.addEventListener("open",()=>e()),this.addEventListener("error",t))})})}closed(){return Ee(this,null,function*(){return new Promise((e,t)=>{this.readyState===WebSocket.CLOSED?e():(this.addEventListener("close",()=>e()),this.addEventListener("error",t))})})}firstMessage(){return Ee(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 Ee(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)})})}},o_=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}},Ri=new o_;function ir(e){try{return JSON.parse(e)}catch{return}}function s_(e,t){return e||(e="world"),t||(t="world"),e===t}var dn="wandelbots.io",Ai={dev:{domain:`https://auth.portal.dev.${dn}`,clientId:"fLbJD0RLp5r2Dpucm5j8BjwMR6Hunfha"},stg:{domain:`https://auth.portal.stg.${dn}`,clientId:"joVDeD9e786WzFNSGCqoVq7HNkWt5j6s"},prod:{domain:`https://auth.portal.${dn}`,clientId:"J7WJUi38xVQdJAEBNRT9Xw1b0fXDb4J2"}},i_=e=>{if(e.includes(`dev.${dn}`))return Ai.dev;if(e.includes(`stg.${dn}`))return Ai.stg;if(e.includes(dn))return Ai.prod;throw new Error("Unsupported instance URL. Cannot determine Auth0 configuration.")},l_=e=>Ee(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=i_(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 Hm(e,t){return function(){return e.apply(t,arguments)}}const{toString:c_}=Object.prototype,{getPrototypeOf:bc}=Object,js=(e=>t=>{const r=c_.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Rt=e=>(e=e.toLowerCase(),t=>js(t)===e),$s=e=>t=>typeof t===e,{isArray:In}=Array,Sa=$s("undefined");function u_(e){return e!==null&&!Sa(e)&&e.constructor!==null&&!Sa(e.constructor)&&ht(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const qm=Rt("ArrayBuffer");function d_(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&qm(e.buffer),t}const h_=$s("string"),ht=$s("function"),Wm=$s("number"),ks=e=>e!==null&&typeof e=="object",p_=e=>e===!0||e===!1,vo=e=>{if(js(e)!=="object")return!1;const t=bc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},m_=Rt("Date"),f_=Rt("File"),g_=Rt("Blob"),y_=Rt("FileList"),b_=e=>ks(e)&&ht(e.pipe),x_=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ht(e.append)&&((t=js(e))==="formdata"||t==="object"&&ht(e.toString)&&e.toString()==="[object FormData]"))},v_=Rt("URLSearchParams"),[S_,O_,w_,C_]=["ReadableStream","Request","Response","Headers"].map(Rt),P_=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ma(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),In(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 Jm(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 Sr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ym=e=>!Sa(e)&&e!==Sr;function ul(){const{caseless:e}=Ym(this)&&this||{},t={},r=(n,a)=>{const o=e&&Jm(t,a)||a;vo(t[o])&&vo(n)?t[o]=ul(t[o],n):vo(n)?t[o]=ul({},n):In(n)?t[o]=n.slice():t[o]=n};for(let n=0,a=arguments.length;n<a;n++)arguments[n]&&Ma(arguments[n],r);return t}const T_=(e,t,r,{allOwnKeys:n}={})=>(Ma(t,(a,o)=>{r&&ht(a)?e[o]=Hm(a,r):e[o]=a},{allOwnKeys:n}),e),R_=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),A_=(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)},__=(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&&bc(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},E_=(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},V_=e=>{if(!e)return null;if(In(e))return e;let t=e.length;if(!Wm(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},I_=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&bc(Uint8Array)),M_=(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])}},j_=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},$_=Rt("HTMLFormElement"),k_=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),Ld=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),U_=Rt("RegExp"),Km=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Ma(r,(a,o)=>{let s;(s=t(a,o,e))!==!1&&(n[o]=s||a)}),Object.defineProperties(e,n)},D_=e=>{Km(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+"'")})}})},L_=(e,t)=>{const r={},n=a=>{a.forEach(o=>{r[o]=!0})};return In(e)?n(e):n(String(e).split(t)),r},B_=()=>{},N_=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function F_(e){return!!(e&&ht(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const z_=e=>{const t=new Array(10),r=(n,a)=>{if(ks(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[a]=n;const o=In(n)?[]:{};return Ma(n,(s,i)=>{const l=r(s,a+1);!Sa(l)&&(o[i]=l)}),t[a]=void 0,o}}return n};return r(e,0)},G_=Rt("AsyncFunction"),H_=e=>e&&(ks(e)||ht(e))&&ht(e.then)&&ht(e.catch),Qm=((e,t)=>e?setImmediate:t?((r,n)=>(Sr.addEventListener("message",({source:a,data:o})=>{a===Sr&&o===r&&n.length&&n.shift()()},!1),a=>{n.push(a),Sr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",ht(Sr.postMessage)),q_=typeof queueMicrotask<"u"?queueMicrotask.bind(Sr):typeof process<"u"&&process.nextTick||Qm,H={isArray:In,isArrayBuffer:qm,isBuffer:u_,isFormData:x_,isArrayBufferView:d_,isString:h_,isNumber:Wm,isBoolean:p_,isObject:ks,isPlainObject:vo,isReadableStream:S_,isRequest:O_,isResponse:w_,isHeaders:C_,isUndefined:Sa,isDate:m_,isFile:f_,isBlob:g_,isRegExp:U_,isFunction:ht,isStream:b_,isURLSearchParams:v_,isTypedArray:I_,isFileList:y_,forEach:Ma,merge:ul,extend:T_,trim:P_,stripBOM:R_,inherits:A_,toFlatObject:__,kindOf:js,kindOfTest:Rt,endsWith:E_,toArray:V_,forEachEntry:M_,matchAll:j_,isHTMLForm:$_,hasOwnProperty:Ld,hasOwnProp:Ld,reduceDescriptors:Km,freezeMethods:D_,toObjectSet:L_,toCamelCase:k_,noop:B_,toFiniteNumber:N_,findKey:Jm,global:Sr,isContextDefined:Ym,isSpecCompliantForm:F_,toJSONObject:z_,isAsyncFn:G_,isThenable:H_,setImmediate:Qm,asap:q_};function he(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)}H.inherits(he,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:H.toJSONObject(this.config),code:this.code,status:this.status}}});const Xm=he.prototype,Zm={};["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=>{Zm[e]={value:e}});Object.defineProperties(he,Zm);Object.defineProperty(Xm,"isAxiosError",{value:!0});he.from=(e,t,r,n,a,o)=>{const s=Object.create(Xm);return H.toFlatObject(e,s,function(l){return l!==Error.prototype},i=>i!=="isAxiosError"),he.call(s,e.message,t,r,n,a),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};const W_=null;function dl(e){return H.isPlainObject(e)||H.isArray(e)}function ef(e){return H.endsWith(e,"[]")?e.slice(0,-2):e}function Bd(e,t,r){return e?e.concat(t).map(function(a,o){return a=ef(a),!r&&o?"["+a+"]":a}).join(r?".":""):t}function J_(e){return H.isArray(e)&&!e.some(dl)}const Y_=H.toFlatObject(H,{},null,function(t){return/^is[A-Z]/.test(t)});function Us(e,t,r){if(!H.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=H.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!H.isUndefined(y[m])});const n=r.metaTokens,a=r.visitor||u,o=r.dots,s=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&H.isSpecCompliantForm(t);if(!H.isFunction(a))throw new TypeError("visitor must be a function");function c(f){if(f===null)return"";if(H.isDate(f))return f.toISOString();if(!l&&H.isBlob(f))throw new he("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(f)||H.isTypedArray(f)?l&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,m,y){let S=f;if(f&&!y&&typeof f=="object"){if(H.endsWith(m,"{}"))m=n?m:m.slice(0,-2),f=JSON.stringify(f);else if(H.isArray(f)&&J_(f)||(H.isFileList(f)||H.endsWith(m,"[]"))&&(S=H.toArray(f)))return m=ef(m),S.forEach(function(O,C){!(H.isUndefined(O)||O===null)&&t.append(s===!0?Bd([m],C,o):s===null?m:m+"[]",c(O))}),!1}return dl(f)?!0:(t.append(Bd(y,m,o),c(f)),!1)}const d=[],h=Object.assign(Y_,{defaultVisitor:u,convertValue:c,isVisitable:dl});function p(f,m){if(!H.isUndefined(f)){if(d.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(f),H.forEach(f,function(S,E){(!(H.isUndefined(S)||S===null)&&a.call(t,S,H.isString(E)?E.trim():E,m,h))===!0&&p(S,m?m.concat(E):[E])}),d.pop()}}if(!H.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Nd(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function xc(e,t){this._pairs=[],e&&Us(e,this,t)}const tf=xc.prototype;tf.append=function(t,r){this._pairs.push([t,r])};tf.toString=function(t){const r=t?function(n){return t.call(this,n,Nd)}:Nd;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function K_(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function rf(e,t,r){if(!t)return e;const n=r&&r.encode||K_;H.isFunction(r)&&(r={serialize:r});const a=r&&r.serialize;let o;if(a?o=a(t,r):o=H.isURLSearchParams(t)?t.toString():new xc(t,r).toString(n),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Fd{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){H.forEach(this.handlers,function(n){n!==null&&t(n)})}}const nf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Q_=typeof URLSearchParams<"u"?URLSearchParams:xc,X_=typeof FormData<"u"?FormData:null,Z_=typeof Blob<"u"?Blob:null,eE={isBrowser:!0,classes:{URLSearchParams:Q_,FormData:X_,Blob:Z_},protocols:["http","https","file","blob","url","data"]},vc=typeof window<"u"&&typeof document<"u",hl=typeof navigator=="object"&&navigator||void 0,tE=vc&&(!hl||["ReactNative","NativeScript","NS"].indexOf(hl.product)<0),rE=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",nE=vc&&window.location.href||"http://localhost",aE=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:vc,hasStandardBrowserEnv:tE,hasStandardBrowserWebWorkerEnv:rE,navigator:hl,origin:nE},Symbol.toStringTag,{value:"Module"})),Xe={...aE,...eE};function oE(e,t){return Us(e,new Xe.classes.URLSearchParams,Object.assign({visitor:function(r,n,a,o){return Xe.isNode&&H.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function sE(e){return H.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function iE(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 af(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&&H.isArray(a)?a.length:s,l?(H.hasOwnProp(a,s)?a[s]=[a[s],n]:a[s]=n,!i):((!a[s]||!H.isObject(a[s]))&&(a[s]=[]),t(r,n,a[s],o)&&H.isArray(a[s])&&(a[s]=iE(a[s])),!i)}if(H.isFormData(e)&&H.isFunction(e.entries)){const r={};return H.forEachEntry(e,(n,a)=>{t(sE(n),a,r,0)}),r}return null}function lE(e,t,r){if(H.isString(e))try{return(t||JSON.parse)(e),H.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const ja={transitional:nf,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,o=H.isObject(t);if(o&&H.isHTMLForm(t)&&(t=new FormData(t)),H.isFormData(t))return a?JSON.stringify(af(t)):t;if(H.isArrayBuffer(t)||H.isBuffer(t)||H.isStream(t)||H.isFile(t)||H.isBlob(t)||H.isReadableStream(t))return t;if(H.isArrayBufferView(t))return t.buffer;if(H.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 oE(t,this.formSerializer).toString();if((i=H.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Us(i?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||a?(r.setContentType("application/json",!1),lE(t)):t}],transformResponse:[function(t){const r=this.transitional||ja.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(H.isResponse(t)||H.isReadableStream(t))return t;if(t&&H.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"?he.from(i,he.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:Xe.classes.FormData,Blob:Xe.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],e=>{ja.headers[e]={}});const cE=H.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"]),uE=e=>{const t={};let r,n,a;return e&&e.split(`
146
146
  `).forEach(function(s){a=s.indexOf(":"),r=s.substring(0,a).trim().toLowerCase(),n=s.substring(a+1).trim(),!(!r||t[r]&&cE[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},zd=Symbol("internals");function qn(e){return e&&String(e).trim().toLowerCase()}function So(e){return e===!1||e==null?e:H.isArray(e)?e.map(So):String(e)}function dE(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 hE=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function _i(e,t,r,n,a){if(H.isFunction(n))return n.call(this,t,r);if(a&&(t=r),!!H.isString(t)){if(H.isString(n))return t.indexOf(n)!==-1;if(H.isRegExp(n))return n.test(t)}}function pE(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function mE(e,t){const r=H.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(a,o,s){return this[n].call(this,t,a,o,s)},configurable:!0})})}let lt=class{constructor(t){t&&this.set(t)}set(t,r,n){const a=this;function o(i,l,c){const u=qn(l);if(!u)throw new Error("header name must be a non-empty string");const d=H.findKey(a,u);(!d||a[d]===void 0||c===!0||c===void 0&&a[d]!==!1)&&(a[d||l]=So(i))}const s=(i,l)=>H.forEach(i,(c,u)=>o(c,u,l));if(H.isPlainObject(t)||t instanceof this.constructor)s(t,r);else if(H.isString(t)&&(t=t.trim())&&!hE(t))s(uE(t),r);else if(H.isHeaders(t))for(const[i,l]of t.entries())o(l,i,n);else t!=null&&o(r,t,n);return this}get(t,r){if(t=qn(t),t){const n=H.findKey(this,t);if(n){const a=this[n];if(!r)return a;if(r===!0)return dE(a);if(H.isFunction(r))return r.call(this,a,n);if(H.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=qn(t),t){const n=H.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||_i(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let a=!1;function o(s){if(s=qn(s),s){const i=H.findKey(n,s);i&&(!r||_i(n,n[i],i,r))&&(delete n[i],a=!0)}}return H.isArray(t)?t.forEach(o):o(t),a}clear(t){const r=Object.keys(this);let n=r.length,a=!1;for(;n--;){const o=r[n];(!t||_i(this,this[o],o,t,!0))&&(delete this[o],a=!0)}return a}normalize(t){const r=this,n={};return H.forEach(this,(a,o)=>{const s=H.findKey(n,o);if(s){r[s]=So(a),delete r[o];return}const i=t?pE(o):String(o).trim();i!==o&&delete r[o],r[i]=So(a),n[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return H.forEach(this,(n,a)=>{n!=null&&n!==!1&&(r[a]=t&&H.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(a=>n.set(a)),n}static accessor(t){const n=(this[zd]=this[zd]={accessors:{}}).accessors,a=this.prototype;function o(s){const i=qn(s);n[i]||(mE(a,s),n[i]=!0)}return H.isArray(t)?t.forEach(o):o(t),this}};lt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);H.reduceDescriptors(lt.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});H.freezeMethods(lt);function Ei(e,t){const r=this||ja,n=t||r,a=lt.from(n.headers);let o=n.data;return H.forEach(e,function(i){o=i.call(r,o,a.normalize(),t?t.status:void 0)}),a.normalize(),o}function of(e){return!!(e&&e.__CANCEL__)}function Mn(e,t,r){he.call(this,e??"canceled",he.ERR_CANCELED,t,r),this.name="CanceledError"}H.inherits(Mn,he,{__CANCEL__:!0});function sf(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new he("Request failed with status code "+r.status,[he.ERR_BAD_REQUEST,he.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function fE(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function gE(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 yE(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 Jo=(e,t,r=3)=>{let n=0;const a=gE(50,250);return yE(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)},Gd=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Hd=e=>(...t)=>H.asap(()=>e(...t)),bE=Xe.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Xe.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Xe.origin),Xe.navigator&&/(msie|trident)/i.test(Xe.navigator.userAgent)):()=>!0,xE=Xe.hasStandardBrowserEnv?{write(e,t,r,n,a,o){const s=[e+"="+encodeURIComponent(t)];H.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),H.isString(n)&&s.push("path="+n),H.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 vE(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function SE(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function lf(e,t,r){let n=!vE(t);return e&&n||r==!1?SE(e,t):t}const qd=e=>e instanceof lt?{...e}:e;function _r(e,t){t=t||{};const r={};function n(c,u,d,h){return H.isPlainObject(c)&&H.isPlainObject(u)?H.merge.call({caseless:h},c,u):H.isPlainObject(u)?H.merge({},u):H.isArray(u)?u.slice():u}function a(c,u,d,h){if(H.isUndefined(u)){if(!H.isUndefined(c))return n(void 0,c,d,h)}else return n(c,u,d,h)}function o(c,u){if(!H.isUndefined(u))return n(void 0,u)}function s(c,u){if(H.isUndefined(u)){if(!H.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 H.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||a,h=d(e[u],t[u],u);H.isUndefined(h)&&d!==i||(r[u]=h)}),r}const cf=e=>{const t=_r({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:o,headers:s,auth:i}=t;t.headers=s=lt.from(s),t.url=rf(lf(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(H.isFormData(r)){if(Xe.hasStandardBrowserEnv||Xe.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(Xe.hasStandardBrowserEnv&&(n&&H.isFunction(n)&&(n=n(t)),n||n!==!1&&bE(t.url))){const c=a&&o&&xE.read(o);c&&s.set(a,c)}return t},OE=typeof XMLHttpRequest<"u",wE=OE&&function(e){return new Promise(function(r,n){const a=cf(e);let o=a.data;const s=lt.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 y=new XMLHttpRequest;y.open(a.method.toUpperCase(),a.url,!0),y.timeout=a.timeout;function S(){if(!y)return;const O=lt.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),T={data:!i||i==="text"||i==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:O,config:e,request:y};sf(function(C){r(C),m()},function(C){n(C),m()},T),y=null}"onloadend"in y?y.onloadend=S:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(S)},y.onabort=function(){y&&(n(new he("Request aborted",he.ECONNABORTED,e,y)),y=null)},y.onerror=function(){n(new he("Network Error",he.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let w=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const T=a.transitional||nf;a.timeoutErrorMessage&&(w=a.timeoutErrorMessage),n(new he(w,T.clarifyTimeoutError?he.ETIMEDOUT:he.ECONNABORTED,e,y)),y=null},o===void 0&&s.setContentType(null),"setRequestHeader"in y&&H.forEach(s.toJSON(),function(w,T){y.setRequestHeader(T,w)}),H.isUndefined(a.withCredentials)||(y.withCredentials=!!a.withCredentials),i&&i!=="json"&&(y.responseType=a.responseType),c&&([h,f]=Jo(c,!0),y.addEventListener("progress",h)),l&&y.upload&&([d,p]=Jo(l),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",p)),(a.cancelToken||a.signal)&&(u=O=>{y&&(n(!O||O.type?new Mn(null,e,y):O),y.abort(),y=null)},a.cancelToken&&a.cancelToken.subscribe(u),a.signal&&(a.signal.aborted?u():a.signal.addEventListener("abort",u)));const E=fE(a.url);if(E&&Xe.protocols.indexOf(E)===-1){n(new he("Unsupported protocol "+E+":",he.ERR_BAD_REQUEST,e));return}y.send(o||null)})},CE=(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 he?u:new Mn(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,o(new he(`timeout ${t} of ms exceeded`,he.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=()=>H.asap(i),l}},PE=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},TE=async function*(e,t){for await(const r of RE(e))yield*PE(r,t)},RE=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()}},Wd=(e,t,r,n)=>{const a=TE(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})},Ls=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",uf=Ls&&typeof ReadableStream=="function",AE=Ls&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),df=(e,...t)=>{try{return!!e(...t)}catch{return!1}},_E=uf&&df(()=>{let e=!1;const t=new Request(Xe.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Jd=64*1024,pl=uf&&df(()=>H.isReadableStream(new Response("").body)),Yo={stream:pl&&(e=>e.body)};Ls&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Yo[t]&&(Yo[t]=H.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new he(`Response type '${t}' is not supported`,he.ERR_NOT_SUPPORT,n)})})})(new Response);const EE=async e=>{if(e==null)return 0;if(H.isBlob(e))return e.size;if(H.isSpecCompliantForm(e))return(await new Request(Xe.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(H.isArrayBufferView(e)||H.isArrayBuffer(e))return e.byteLength;if(H.isURLSearchParams(e)&&(e=e+""),H.isString(e))return(await AE(e)).byteLength},VE=async(e,t)=>{const r=H.toFiniteNumber(e.getContentLength());return r??EE(t)},IE=Ls&&(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}=cf(e);c=c?(c+"").toLowerCase():"text";let p=CE([a,o&&o.toAbortSignal()],s),f;const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let y;try{if(l&&_E&&r!=="get"&&r!=="head"&&(y=await VE(u,n))!==0){let T=new Request(t,{method:"POST",body:n,duplex:"half"}),P;if(H.isFormData(n)&&(P=T.headers.get("content-type"))&&u.setContentType(P),T.body){const[C,I]=Gd(y,Jo(Hd(l)));n=Wd(T.body,Jd,C,I)}}H.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=pl&&(c==="stream"||c==="response");if(pl&&(i||O&&m)){const T={};["status","statusText","headers"].forEach(z=>{T[z]=E[z]});const P=H.toFiniteNumber(E.headers.get("content-length")),[C,I]=i&&Gd(P,Jo(Hd(i),!0))||[];E=new Response(Wd(E.body,Jd,C,()=>{I&&I(),m&&m()}),T)}c=c||"text";let w=await Yo[H.findKey(Yo,c)||"text"](E,e);return!O&&m&&m(),await new Promise((T,P)=>{sf(T,P,{data:w,headers:lt.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 he("Network Error",he.ERR_NETWORK,e,f),{cause:S.cause||S}):he.from(S,S&&S.code,e,f)}}),ml={http:W_,xhr:wE,fetch:IE};H.forEach(ml,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Yd=e=>`- ${e}`,ME=e=>H.isFunction(e)||e===null||e===!1,hf={getAdapter:e=>{e=H.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,!ME(r)&&(n=ml[(s=String(r)).toLowerCase()],n===void 0))throw new he(`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 :
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[zd]=this[zd]={accessors:{}}).accessors,a=this.prototype;function o(s){const i=qn(s);n[i]||(mE(a,s),n[i]=!0)}return H.isArray(t)?t.forEach(o):o(t),this}};lt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);H.reduceDescriptors(lt.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});H.freezeMethods(lt);function Ei(e,t){const r=this||ja,n=t||r,a=lt.from(n.headers);let o=n.data;return H.forEach(e,function(i){o=i.call(r,o,a.normalize(),t?t.status:void 0)}),a.normalize(),o}function of(e){return!!(e&&e.__CANCEL__)}function Mn(e,t,r){he.call(this,e??"canceled",he.ERR_CANCELED,t,r),this.name="CanceledError"}H.inherits(Mn,he,{__CANCEL__:!0});function sf(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new he("Request failed with status code "+r.status,[he.ERR_BAD_REQUEST,he.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function fE(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function gE(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 yE(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 Jo=(e,t,r=3)=>{let n=0;const a=gE(50,250);return yE(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)},Gd=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Hd=e=>(...t)=>H.asap(()=>e(...t)),bE=Xe.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Xe.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Xe.origin),Xe.navigator&&/(msie|trident)/i.test(Xe.navigator.userAgent)):()=>!0,xE=Xe.hasStandardBrowserEnv?{write(e,t,r,n,a,o){const s=[e+"="+encodeURIComponent(t)];H.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),H.isString(n)&&s.push("path="+n),H.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 vE(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function SE(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function lf(e,t,r){let n=!vE(t);return e&&n||r==!1?SE(e,t):t}const qd=e=>e instanceof lt?{...e}:e;function _r(e,t){t=t||{};const r={};function n(c,u,d,h){return H.isPlainObject(c)&&H.isPlainObject(u)?H.merge.call({caseless:h},c,u):H.isPlainObject(u)?H.merge({},u):H.isArray(u)?u.slice():u}function a(c,u,d,h){if(H.isUndefined(u)){if(!H.isUndefined(c))return n(void 0,c,d,h)}else return n(c,u,d,h)}function o(c,u){if(!H.isUndefined(u))return n(void 0,u)}function s(c,u){if(H.isUndefined(u)){if(!H.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 H.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||a,h=d(e[u],t[u],u);H.isUndefined(h)&&d!==i||(r[u]=h)}),r}const cf=e=>{const t=_r({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:o,headers:s,auth:i}=t;t.headers=s=lt.from(s),t.url=rf(lf(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(H.isFormData(r)){if(Xe.hasStandardBrowserEnv||Xe.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(Xe.hasStandardBrowserEnv&&(n&&H.isFunction(n)&&(n=n(t)),n||n!==!1&&bE(t.url))){const c=a&&o&&xE.read(o);c&&s.set(a,c)}return t},OE=typeof XMLHttpRequest<"u",wE=OE&&function(e){return new Promise(function(r,n){const a=cf(e);let o=a.data;const s=lt.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 y=new XMLHttpRequest;y.open(a.method.toUpperCase(),a.url,!0),y.timeout=a.timeout;function S(){if(!y)return;const O=lt.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),T={data:!i||i==="text"||i==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:O,config:e,request:y};sf(function(w){r(w),m()},function(w){n(w),m()},T),y=null}"onloadend"in y?y.onloadend=S:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(S)},y.onabort=function(){y&&(n(new he("Request aborted",he.ECONNABORTED,e,y)),y=null)},y.onerror=function(){n(new he("Network Error",he.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let C=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const T=a.transitional||nf;a.timeoutErrorMessage&&(C=a.timeoutErrorMessage),n(new he(C,T.clarifyTimeoutError?he.ETIMEDOUT:he.ECONNABORTED,e,y)),y=null},o===void 0&&s.setContentType(null),"setRequestHeader"in y&&H.forEach(s.toJSON(),function(C,T){y.setRequestHeader(T,C)}),H.isUndefined(a.withCredentials)||(y.withCredentials=!!a.withCredentials),i&&i!=="json"&&(y.responseType=a.responseType),c&&([h,f]=Jo(c,!0),y.addEventListener("progress",h)),l&&y.upload&&([d,p]=Jo(l),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",p)),(a.cancelToken||a.signal)&&(u=O=>{y&&(n(!O||O.type?new Mn(null,e,y):O),y.abort(),y=null)},a.cancelToken&&a.cancelToken.subscribe(u),a.signal&&(a.signal.aborted?u():a.signal.addEventListener("abort",u)));const E=fE(a.url);if(E&&Xe.protocols.indexOf(E)===-1){n(new he("Unsupported protocol "+E+":",he.ERR_BAD_REQUEST,e));return}y.send(o||null)})},CE=(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 he?u:new Mn(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,o(new he(`timeout ${t} of ms exceeded`,he.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=()=>H.asap(i),l}},PE=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},TE=async function*(e,t){for await(const r of RE(e))yield*PE(r,t)},RE=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()}},Wd=(e,t,r,n)=>{const a=TE(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})},Ds=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",uf=Ds&&typeof ReadableStream=="function",AE=Ds&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),df=(e,...t)=>{try{return!!e(...t)}catch{return!1}},_E=uf&&df(()=>{let e=!1;const t=new Request(Xe.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Jd=64*1024,pl=uf&&df(()=>H.isReadableStream(new Response("").body)),Yo={stream:pl&&(e=>e.body)};Ds&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Yo[t]&&(Yo[t]=H.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new he(`Response type '${t}' is not supported`,he.ERR_NOT_SUPPORT,n)})})})(new Response);const EE=async e=>{if(e==null)return 0;if(H.isBlob(e))return e.size;if(H.isSpecCompliantForm(e))return(await new Request(Xe.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(H.isArrayBufferView(e)||H.isArrayBuffer(e))return e.byteLength;if(H.isURLSearchParams(e)&&(e=e+""),H.isString(e))return(await AE(e)).byteLength},VE=async(e,t)=>{const r=H.toFiniteNumber(e.getContentLength());return r??EE(t)},IE=Ds&&(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}=cf(e);c=c?(c+"").toLowerCase():"text";let p=CE([a,o&&o.toAbortSignal()],s),f;const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let y;try{if(l&&_E&&r!=="get"&&r!=="head"&&(y=await VE(u,n))!==0){let T=new Request(t,{method:"POST",body:n,duplex:"half"}),P;if(H.isFormData(n)&&(P=T.headers.get("content-type"))&&u.setContentType(P),T.body){const[w,I]=Gd(y,Jo(Hd(l)));n=Wd(T.body,Jd,w,I)}}H.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=pl&&(c==="stream"||c==="response");if(pl&&(i||O&&m)){const T={};["status","statusText","headers"].forEach(z=>{T[z]=E[z]});const P=H.toFiniteNumber(E.headers.get("content-length")),[w,I]=i&&Gd(P,Jo(Hd(i),!0))||[];E=new Response(Wd(E.body,Jd,w,()=>{I&&I(),m&&m()}),T)}c=c||"text";let C=await Yo[H.findKey(Yo,c)||"text"](E,e);return!O&&m&&m(),await new Promise((T,P)=>{sf(T,P,{data:C,headers:lt.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 he("Network Error",he.ERR_NETWORK,e,f),{cause:S.cause||S}):he.from(S,S&&S.code,e,f)}}),ml={http:W_,xhr:wE,fetch:IE};H.forEach(ml,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Yd=e=>`- ${e}`,ME=e=>H.isFunction(e)||e===null||e===!1,hf={getAdapter:e=>{e=H.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,!ME(r)&&(n=ml[(s=String(r)).toLowerCase()],n===void 0))throw new he(`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
148
  `+o.map(Yd).join(`
149
- `):" "+Yd(o[0]):"as no adapter specified";throw new he("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:ml};function Vi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Mn(null,e)}function Kd(e){return Vi(e),e.headers=lt.from(e.headers),e.data=Ei.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),hf.getAdapter(e.adapter||ja.adapter)(e).then(function(n){return Vi(e),n.data=Ei.call(e,e.transformResponse,n),n.headers=lt.from(n.headers),n},function(n){return of(n)||(Vi(e),n&&n.response&&(n.response.data=Ei.call(e,e.transformResponse,n.response),n.response.headers=lt.from(n.response.headers))),Promise.reject(n)})}const pf="1.8.3",Ds={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ds[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Qd={};Ds.transitional=function(t,r,n){function a(o,s){return"[Axios v"+pf+"] Transitional option '"+o+"'"+s+(n?". "+n:"")}return(o,s,i)=>{if(t===!1)throw new he(a(s," has been removed"+(r?" in "+r:"")),he.ERR_DEPRECATED);return r&&!Qd[s]&&(Qd[s]=!0,console.warn(a(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(o,s,i):!0}};Ds.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function jE(e,t,r){if(typeof e!="object")throw new he("options must be an object",he.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let a=n.length;for(;a-- >0;){const o=n[a],s=t[o];if(s){const i=e[o],l=i===void 0||s(i,o,e);if(l!==!0)throw new he("option "+o+" must be "+l,he.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new he("Unknown option "+o,he.ERR_BAD_OPTION)}}const Oo={assertOptions:jE,validators:Ds},Et=Oo.validators;let Cr=class{constructor(t){this.defaults=t,this.interceptors={request:new Fd,response:new Fd}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const o=a.stack?a.stack.replace(/^.+\n/,""):"";try{n.stack?o&&!String(n.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(n.stack+=`
150
- `+o):n.stack=o}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=_r(this.defaults,r);const{transitional:n,paramsSerializer:a,headers:o}=r;n!==void 0&&Oo.assertOptions(n,{silentJSONParsing:Et.transitional(Et.boolean),forcedJSONParsing:Et.transitional(Et.boolean),clarifyTimeoutError:Et.transitional(Et.boolean)},!1),a!=null&&(H.isFunction(a)?r.paramsSerializer={serialize:a}:Oo.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),Oo.assertOptions(r,{baseUrl:Et.spelling("baseURL"),withXsrfToken:Et.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=o&&H.merge(o.common,o[r.method]);o&&H.forEach(["delete","get","head","post","put","patch","common"],f=>{delete o[f]}),r.headers=lt.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=[Kd.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(y){m.call(this,y);break}}try{u=Kd.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=_r(this.defaults,t);const r=lf(t.baseURL,t.url,t.allowAbsoluteUrls);return rf(r,t.params,t.paramsSerializer)}};H.forEach(["delete","get","head","options"],function(t){Cr.prototype[t]=function(r,n){return this.request(_r(n||{},{method:t,url:r,data:(n||{}).data}))}});H.forEach(["post","put","patch"],function(t){function r(n){return function(o,s,i){return this.request(_r(i||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}Cr.prototype[t]=r(),Cr.prototype[t+"Form"]=r(!0)});let kE=class mf{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 Mn(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 mf(function(a){t=a}),cancel:t}}};function $E(e){return function(r){return e.apply(null,r)}}function UE(e){return H.isObject(e)&&e.isAxiosError===!0}const fl={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(fl).forEach(([e,t])=>{fl[t]=e});function ff(e){const t=new Cr(e),r=Hm(Cr.prototype.request,t);return H.extend(r,Cr.prototype,t,{allOwnKeys:!0}),H.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return ff(_r(e,a))},r}const V=ff(ja);V.Axios=Cr;V.CanceledError=Mn;V.CancelToken=kE;V.isCancel=of;V.VERSION=pf;V.toFormData=Us;V.AxiosError=he;V.Cancel=V.CanceledError;V.all=function(t){return Promise.all(t)};V.spread=$E;V.isAxiosError=UE;V.mergeConfig=_r;V.AxiosHeaders=lt;V.formToJSON=e=>af(H.isHTMLForm(e)?new FormData(e):e);V.getAdapter=hf.getAdapter;V.HttpStatusCode=fl;V.default=V;const{Axios:oj,AxiosError:gl,CanceledError:sj,isCancel:ij,CancelToken:lj,VERSION:cj,all:uj,Cancel:dj,isAxiosError:LE,spread:hj,toFormData:pj,AxiosHeaders:mj,HttpStatusCode:fj,formToJSON:gj,getAdapter:yj,mergeConfig:bj}=V,M="/api/v1".replace(/\/+$/,"");class Ve{constructor(t,r=M,n=V){kn(this,"basePath");kn(this,"axios");kn(this,"configuration");this.basePath=r,this.axios=n,t&&(this.configuration=t,this.basePath=t.basePath??r)}}class DE extends Error{constructor(r,n){super(n);kn(this,"field");this.field=r,this.name="RequiredError"}}const j={},k="https://example.com",v=function(e,t,r){if(r==null)throw new DE(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},$=function(e,t){t&&(t.username||t.password)&&(e.auth={username:t.username,password:t.password})},U=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 yl(e,t,r=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(n=>yl(e,n,r)):Object.keys(t).forEach(n=>yl(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);yl(r,t),e.search=r.toString()},de=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||""},D=function(e){return e.pathname+e.search+e.hash},B=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)}},BE=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,k);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};$(l,e),await U(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=de(r,l,e),{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await U(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:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...a},c={},u={};$(l,e),await U(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:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(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,k);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={};$(c,e),await U(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=de(n,c,e),{url:D(i),options:c}}}},Kr=function(e){const t=BE(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=j["ApplicationApi.addApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["ApplicationApi.clearApps"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ApplicationApi.deleteApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["ApplicationApi.getApp"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ApplicationApi.listApps"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["ApplicationApi.updateApp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,V,M,e)(h,c||p)}}};class Xd extends Ve{addApp(t,r,n,a){return Kr(this.configuration).addApp(t,r,n,a).then(o=>o(this.axios,this.basePath))}clearApps(t,r,n){return Kr(this.configuration).clearApps(t,r,n).then(a=>a(this.axios,this.basePath))}deleteApp(t,r,n,a){return Kr(this.configuration).deleteApp(t,r,n,a).then(o=>o(this.axios,this.basePath))}getApp(t,r,n){return Kr(this.configuration).getApp(t,r,n).then(a=>a(this.axios,this.basePath))}listApps(t,r){return Kr(this.configuration).listApps(t,r).then(n=>n(this.axios,this.basePath))}updateApp(t,r,n,a,o){return Kr(this.configuration).updateApp(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}const NE=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,k);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await U(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:D(o),options:i}},deployCell:async(t,r,n={})=>{v("deployCell","cell",t);const a="/cells",o=new URL(a,k);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};$(i,e),await U(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=de(t,i,e),{url:D(o),options:i}},getCell:async(t,r={})=>{v("getCell","cell",t);const n="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,k);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(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,k);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},listCells:async(t={})=>{const r="/cells",n=new URL(r,k);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...t},s={},i={};$(o,e),await U(s,e),L(n,i);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...t.headers},{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await U(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=de(r,l,e),{url:D(s),options:l}}}},Qr=function(e){const t=NE(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=j["CellApi.deleteCell"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["CellApi.deployCell"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["CellApi.getCell"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["CellApi.getCellStatus"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["CellApi.listCells"])==null?void 0:s[a])==null?void 0:i.url;return(l,c)=>B(n,V,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=j["CellApi.updateCell"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,M,e)(d,l||h)}}};class FE extends Ve{deleteCell(t,r,n){return Qr(this.configuration).deleteCell(t,r,n).then(a=>a(this.axios,this.basePath))}deployCell(t,r,n){return Qr(this.configuration).deployCell(t,r,n).then(a=>a(this.axios,this.basePath))}getCell(t,r){return Qr(this.configuration).getCell(t,r).then(n=>n(this.axios,this.basePath))}getCellStatus(t,r){return Qr(this.configuration).getCellStatus(t,r).then(n=>n(this.axios,this.basePath))}listCells(t){return Qr(this.configuration).listCells(t).then(r=>r(this.axios,this.basePath))}updateCell(t,r,n,a){return Qr(this.configuration).updateCell(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const zE=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,k);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};$(l,e),await U(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=de(r,l,e),{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await U(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:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...a},c={},u={};$(l,e),await U(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:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await U(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:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await U(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:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await U(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:D(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,k);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={};$(c,e),await U(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=de(n,c,e),{url:D(i),options:c}}}},nt=function(e){const t=zE(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=j["ControllerApi.addRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["ControllerApi.clearRobotControllers"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ControllerApi.deleteRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["ControllerApi.getCurrentRobotControllerState"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ControllerApi.getMode"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ControllerApi.getRobotController"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ControllerApi.getSupportedModes"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ControllerApi.getVirtualRobotConfiguration"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ControllerApi.listControllers"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["ControllerApi.setDefaultMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["ControllerApi.streamFreeDrive"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["ControllerApi.streamModeChange"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ControllerApi.streamRobotControllerState"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["ControllerApi.updateRobotController"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,V,M,e)(h,c||p)}}};class GE extends Ve{addRobotController(t,r,n,a){return nt(this.configuration).addRobotController(t,r,n,a).then(o=>o(this.axios,this.basePath))}clearRobotControllers(t,r,n){return nt(this.configuration).clearRobotControllers(t,r,n).then(a=>a(this.axios,this.basePath))}deleteRobotController(t,r,n,a){return nt(this.configuration).deleteRobotController(t,r,n,a).then(o=>o(this.axios,this.basePath))}getCurrentRobotControllerState(t,r,n){return nt(this.configuration).getCurrentRobotControllerState(t,r,n).then(a=>a(this.axios,this.basePath))}getMode(t,r,n){return nt(this.configuration).getMode(t,r,n).then(a=>a(this.axios,this.basePath))}getRobotController(t,r,n){return nt(this.configuration).getRobotController(t,r,n).then(a=>a(this.axios,this.basePath))}getSupportedModes(t,r,n){return nt(this.configuration).getSupportedModes(t,r,n).then(a=>a(this.axios,this.basePath))}getVirtualRobotConfiguration(t,r,n){return nt(this.configuration).getVirtualRobotConfiguration(t,r,n).then(a=>a(this.axios,this.basePath))}listControllers(t,r){return nt(this.configuration).listControllers(t,r).then(n=>n(this.axios,this.basePath))}setDefaultMode(t,r,n,a){return nt(this.configuration).setDefaultMode(t,r,n,a).then(o=>o(this.axios,this.basePath))}streamFreeDrive(t,r,n,a){return nt(this.configuration).streamFreeDrive(t,r,n,a).then(o=>o(this.axios,this.basePath))}streamModeChange(t,r,n){return nt(this.configuration).streamModeChange(t,r,n).then(a=>a(this.axios,this.basePath))}streamRobotControllerState(t,r,n,a){return nt(this.configuration).streamRobotControllerState(t,r,n,a).then(o=>o(this.axios,this.basePath))}updateRobotController(t,r,n,a,o){return nt(this.configuration).updateRobotController(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}const HE=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,k);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await U(c,e),n&&(u.ios=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await U(c,e),n&&(u.ios=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await U(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=de(n,l,e),{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await U(c,e),n&&(u.ios=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(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,k);let d;e&&(d=e.baseOptions);const h={method:"GET",...d,...l},p={},f={};$(h,e),await U(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:D(u),options:h}}}},Wn=function(e){const t=HE(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=j["ControllerIOsApi.listIODescriptions"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["ControllerIOsApi.listIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["ControllerIOsApi.setOutputValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["ControllerIOsApi.streamIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["ControllerIOsApi.waitForIOEvent"])==null?void 0:p[d])==null?void 0:f.url;return(m,y)=>B(u,V,M,e)(m,h||y)}}};class qE extends Ve{listIODescriptions(t,r,n,a){return Wn(this.configuration).listIODescriptions(t,r,n,a).then(o=>o(this.axios,this.basePath))}listIOValues(t,r,n,a){return Wn(this.configuration).listIOValues(t,r,n,a).then(o=>o(this.axios,this.basePath))}setOutputValues(t,r,n,a){return Wn(this.configuration).setOutputValues(t,r,n,a).then(o=>o(this.axios,this.basePath))}streamIOValues(t,r,n,a){return Wn(this.configuration).streamIOValues(t,r,n,a).then(o=>o(this.axios,this.basePath))}waitForIOEvent(t,r,n,a,o,s,i,l){return Wn(this.configuration).waitForIOEvent(t,r,n,a,o,s,i,l).then(c=>c(this.axios,this.basePath))}}const WE=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,k);let s;e&&(s=e.baseOptions);const i={method:"PUT",...s,...n},l={},c={};$(i,e),await U(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=de(r,i,e),{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await U(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:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(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:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};$(l,e),await U(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=de(n,l,e),{url:D(s),options:l}}}},Jn=function(e){const t=WE(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=j["CoordinateSystemsApi.addCoordinateSystem"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["CoordinateSystemsApi.deleteCoordinateSystem"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["CoordinateSystemsApi.getCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["CoordinateSystemsApi.listCoordinateSystems"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["CoordinateSystemsApi.transformInCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,M,e)(d,l||h)}}};class JE extends Ve{addCoordinateSystem(t,r,n){return Jn(this.configuration).addCoordinateSystem(t,r,n).then(a=>a(this.axios,this.basePath))}deleteCoordinateSystem(t,r,n){return Jn(this.configuration).deleteCoordinateSystem(t,r,n).then(a=>a(this.axios,this.basePath))}getCoordinateSystem(t,r,n,a){return Jn(this.configuration).getCoordinateSystem(t,r,n,a).then(o=>o(this.axios,this.basePath))}listCoordinateSystems(t,r,n){return Jn(this.configuration).listCoordinateSystems(t,r,n).then(a=>a(this.axios,this.basePath))}transformInCoordinateSystem(t,r,n,a){return Jn(this.configuration).transformInCoordinateSystem(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const YE=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,k);let o;e&&(o=e.baseOptions);const s={method:"DELETE",...o,...r},i={},l={};$(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};$(i,e),await U(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=de(r,i,e),{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}}}},Yn=function(e){const t=YE(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=j["DeviceConfigurationApi.clearDevices"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["DeviceConfigurationApi.createDevice"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["DeviceConfigurationApi.deleteDevice"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["DeviceConfigurationApi.getDevice"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["DeviceConfigurationApi.listDevices"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,M,e)(c,s||u)}}};class KE extends Ve{clearDevices(t,r){return Yn(this.configuration).clearDevices(t,r).then(n=>n(this.axios,this.basePath))}createDevice(t,r,n){return Yn(this.configuration).createDevice(t,r,n).then(a=>a(this.axios,this.basePath))}deleteDevice(t,r,n){return Yn(this.configuration).deleteDevice(t,r,n).then(a=>a(this.axios,this.basePath))}getDevice(t,r,n){return Yn(this.configuration).getDevice(t,r,n).then(a=>a(this.axios,this.basePath))}listDevices(t,r){return Yn(this.configuration).listDevices(t,r).then(n=>n(this.axios,this.basePath))}}const QE=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,k);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};$(l,e),await U(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=de(r,l,e),{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await U(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:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await U(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=de(n,l,e),{url:D(s),options:l}}}},Kn=function(e){const t=QE(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=j["LibraryProgramApi.createProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["LibraryProgramApi.deleteProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["LibraryProgramApi.deleteProgramList"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["LibraryProgramApi.getProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["LibraryProgramApi.updateProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,M,e)(d,l||h)}}};class XE extends Ve{createProgram(t,r,n,a){return Kn(this.configuration).createProgram(t,r,n,a).then(o=>o(this.axios,this.basePath))}deleteProgram(t,r,n){return Kn(this.configuration).deleteProgram(t,r,n).then(a=>a(this.axios,this.basePath))}deleteProgramList(t,r,n){return Kn(this.configuration).deleteProgramList(t,r,n).then(a=>a(this.axios,this.basePath))}getProgram(t,r,n){return Kn(this.configuration).getProgram(t,r,n).then(a=>a(this.axios,this.basePath))}updateProgram(t,r,n,a){return Kn(this.configuration).updateProgram(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const ZE=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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(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:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await U(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=de(n,l,e),{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={},d=new(e&&e.formDataCtor||FormData);$(l,e),await U(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:D(s),options:l}}}},ro=function(e){const t=ZE(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=j["LibraryProgramMetadataApi.getProgramMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["LibraryProgramMetadataApi.listProgramMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["LibraryProgramMetadataApi.updateProgramMetadata"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["LibraryProgramMetadataApi.uploadProgramMetadataImage"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,M,e)(d,l||h)}}};class eV extends Ve{getProgramMetadata(t,r,n){return ro(this.configuration).getProgramMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}listProgramMetadata(t,r,n){return ro(this.configuration).listProgramMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}updateProgramMetadata(t,r,n,a){return ro(this.configuration).updateProgramMetadata(t,r,n,a).then(o=>o(this.axios,this.basePath))}uploadProgramMetadataImage(t,r,n,a){return ro(this.configuration).uploadProgramMetadataImage(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const tV=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,k);let l;e&&(l=e.baseOptions);const c={method:"POST",...l,...o},u={},d={};$(c,e),await U(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=de(n,c,e),{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await U(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:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await U(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=de(n,l,e),{url:D(s),options:l}}}},Qn=function(e){const t=tV(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=j["LibraryRecipeApi.createRecipe"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,V,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=j["LibraryRecipeApi.deleteRecipe"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["LibraryRecipeApi.deleteRecipeList"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["LibraryRecipeApi.getRecipe"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["LibraryRecipeApi.updateRecipe"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,M,e)(d,l||h)}}};class rV extends Ve{createRecipe(t,r,n,a,o){return Qn(this.configuration).createRecipe(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}deleteRecipe(t,r,n){return Qn(this.configuration).deleteRecipe(t,r,n).then(a=>a(this.axios,this.basePath))}deleteRecipeList(t,r,n){return Qn(this.configuration).deleteRecipeList(t,r,n).then(a=>a(this.axios,this.basePath))}getRecipe(t,r,n){return Qn(this.configuration).getRecipe(t,r,n).then(a=>a(this.axios,this.basePath))}updateRecipe(t,r,n,a){return Qn(this.configuration).updateRecipe(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const nV=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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await U(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=de(n,l,e),{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={},d=new(e&&e.formDataCtor||FormData);$(l,e),await U(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:D(s),options:l}}}},no=function(e){const t=nV(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=j["LibraryRecipeMetadataApi.getRecipeMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["LibraryRecipeMetadataApi.listRecipeMetadata"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["LibraryRecipeMetadataApi.updateRecipeMetadata"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["LibraryRecipeMetadataApi.uploadRecipeMetadataImage"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,M,e)(d,l||h)}}};class aV extends Ve{getRecipeMetadata(t,r,n){return no(this.configuration).getRecipeMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}listRecipeMetadata(t,r){return no(this.configuration).listRecipeMetadata(t,r).then(n=>n(this.axios,this.basePath))}updateRecipeMetadata(t,r,n,a){return no(this.configuration).updateRecipeMetadata(t,r,n,a).then(o=>o(this.axios,this.basePath))}uploadRecipeMetadataImage(t,r,n,a){return no(this.configuration).uploadRecipeMetadataImage(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const oV=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,k);let o;e&&(o=e.baseOptions);const s={method:"DELETE",...o,...r},i={},l={};$(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(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=de(r,i,e),{url:D(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,k);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...o},u={},d={};$(c,e),await U(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:D(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,k);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...o},u={},d={};$(c,e),await U(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:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await U(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:D(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,k);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(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,k);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};$(i,e),await U(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=de(r,i,e),{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};$(i,e),await U(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=de(r,i,e),{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};$(i,e),await U(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=de(r,i,e),{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};$(i,e),await U(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=de(r,i,e),{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"PUT",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(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=de(r,i,e),{url:D(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,k);let u;e&&(u=e.baseOptions);const d={method:"GET",...u,...i},h={},p={};$(d,e),await U(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:D(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,k);let u;e&&(u=e.baseOptions);const d={method:"GET",...u,...i},h={},p={};$(d,e),await U(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:D(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,k);let f;e&&(f=e.baseOptions);const m={method:"GET",...f,...d},y={},S={};$(m,e),await U(y,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={...y,...E,...d.headers},{url:D(p),options:m}}}},Ye=function(e){const t=oV(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=j["MotionApi.deleteAllMotions"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["MotionApi.deleteMotion"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionApi.executeTrajectory"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionApi.getMotionTrajectory"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,V,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=j["MotionApi.getMotionTrajectorySample"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,V,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=j["MotionApi.getPlannedMotion"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["MotionApi.getPlanningMotionGroupModels"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["MotionApi.listMotions"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["MotionApi.loadPlannedMotion"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionApi.planCollisionFreePTP"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionApi.planMotion"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionApi.planTrajectory"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionApi.stopExecution"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionApi.streamMove"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionApi.streamMoveBackward"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>B(c,V,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=j["MotionApi.streamMoveForward"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>B(c,V,M,e)(f,d||m)},async streamMoveToTrajectoryViaJointPTP(r,n,a,o,s,i,l,c,u,d,h){var y,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=(y=j["MotionApi.streamMoveToTrajectoryViaJointPTP"])==null?void 0:y[f])==null?void 0:S.url;return(E,O)=>B(p,V,M,e)(E,m||O)}}};class sV extends Ve{deleteAllMotions(t,r){return Ye(this.configuration).deleteAllMotions(t,r).then(n=>n(this.axios,this.basePath))}deleteMotion(t,r,n){return Ye(this.configuration).deleteMotion(t,r,n).then(a=>a(this.axios,this.basePath))}executeTrajectory(t,r,n){return Ye(this.configuration).executeTrajectory(t,r,n).then(a=>a(this.axios,this.basePath))}getMotionTrajectory(t,r,n,a,o){return Ye(this.configuration).getMotionTrajectory(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}getMotionTrajectorySample(t,r,n,a,o){return Ye(this.configuration).getMotionTrajectorySample(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}getPlannedMotion(t,r,n,a){return Ye(this.configuration).getPlannedMotion(t,r,n,a).then(o=>o(this.axios,this.basePath))}getPlanningMotionGroupModels(t,r){return Ye(this.configuration).getPlanningMotionGroupModels(t,r).then(n=>n(this.axios,this.basePath))}listMotions(t,r){return Ye(this.configuration).listMotions(t,r).then(n=>n(this.axios,this.basePath))}loadPlannedMotion(t,r,n){return Ye(this.configuration).loadPlannedMotion(t,r,n).then(a=>a(this.axios,this.basePath))}planCollisionFreePTP(t,r,n){return Ye(this.configuration).planCollisionFreePTP(t,r,n).then(a=>a(this.axios,this.basePath))}planMotion(t,r,n){return Ye(this.configuration).planMotion(t,r,n).then(a=>a(this.axios,this.basePath))}planTrajectory(t,r,n){return Ye(this.configuration).planTrajectory(t,r,n).then(a=>a(this.axios,this.basePath))}stopExecution(t,r,n){return Ye(this.configuration).stopExecution(t,r,n).then(a=>a(this.axios,this.basePath))}streamMove(t,r,n){return Ye(this.configuration).streamMove(t,r,n).then(a=>a(this.axios,this.basePath))}streamMoveBackward(t,r,n,a,o,s,i){return Ye(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 Ye(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 Ye(this.configuration).streamMoveToTrajectoryViaJointPTP(t,r,n,a,o,s,i,l,c,u,d).then(h=>h(this.axios,this.basePath))}}const iV=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,k);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};$(i,e),await U(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:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};$(i,e),await U(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:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}}}},ao=function(e){const t=iV(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=j["MotionGroupApi.activateAllMotionGroups"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionGroupApi.activateMotionGroup"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionGroupApi.deactivateMotionGroup"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionGroupApi.listMotionGroups"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,M,e)(c,s||u)}}};class lV extends Ve{activateAllMotionGroups(t,r,n){return ao(this.configuration).activateAllMotionGroups(t,r,n).then(a=>a(this.axios,this.basePath))}activateMotionGroup(t,r,n){return ao(this.configuration).activateMotionGroup(t,r,n).then(a=>a(this.axios,this.basePath))}deactivateMotionGroup(t,r,n){return ao(this.configuration).deactivateMotionGroup(t,r,n).then(a=>a(this.axios,this.basePath))}listMotionGroups(t,r){return ao(this.configuration).listMotionGroups(t,r).then(n=>n(this.axios,this.basePath))}}const cV=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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await U(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:D(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,k);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...o},u={},d={};$(c,e),await U(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:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await U(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:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await U(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:D(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,k);let c;e&&(c=e.baseOptions);const u={method:"GET",...c,...s},d={},h={};$(u,e),await U(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:D(l),options:u}}}},vt=function(e){const t=cV(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=j["MotionGroupInfosApi.getActivePayload"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionGroupInfosApi.getActiveTcp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["MotionGroupInfosApi.getCurrentMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,V,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=j["MotionGroupInfosApi.getInfoCapabilities"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionGroupInfosApi.getMotionGroupSpecification"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionGroupInfosApi.getMounting"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionGroupInfosApi.getOptimizerConfiguration"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["MotionGroupInfosApi.getSafetySetup"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionGroupInfosApi.listPayloads"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionGroupInfosApi.listTcps"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["MotionGroupInfosApi.streamMotionGroupState"])==null?void 0:d[c])==null?void 0:h.url;return(p,f)=>B(l,V,M,e)(p,u||f)}}};class uV extends Ve{getActivePayload(t,r,n){return vt(this.configuration).getActivePayload(t,r,n).then(a=>a(this.axios,this.basePath))}getActiveTcp(t,r,n,a){return vt(this.configuration).getActiveTcp(t,r,n,a).then(o=>o(this.axios,this.basePath))}getCurrentMotionGroupState(t,r,n,a,o){return vt(this.configuration).getCurrentMotionGroupState(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}getInfoCapabilities(t,r,n){return vt(this.configuration).getInfoCapabilities(t,r,n).then(a=>a(this.axios,this.basePath))}getMotionGroupSpecification(t,r,n){return vt(this.configuration).getMotionGroupSpecification(t,r,n).then(a=>a(this.axios,this.basePath))}getMounting(t,r,n){return vt(this.configuration).getMounting(t,r,n).then(a=>a(this.axios,this.basePath))}getOptimizerConfiguration(t,r,n,a){return vt(this.configuration).getOptimizerConfiguration(t,r,n,a).then(o=>o(this.axios,this.basePath))}getSafetySetup(t,r,n){return vt(this.configuration).getSafetySetup(t,r,n).then(a=>a(this.axios,this.basePath))}listPayloads(t,r,n){return vt(this.configuration).listPayloads(t,r,n).then(a=>a(this.axios,this.basePath))}listTcps(t,r,n,a){return vt(this.configuration).listTcps(t,r,n,a).then(o=>o(this.axios,this.basePath))}streamMotionGroupState(t,r,n,a,o,s){return vt(this.configuration).streamMotionGroupState(t,r,n,a,o,s).then(i=>i(this.axios,this.basePath))}}const dV=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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(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=de(r,i,e),{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(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=de(r,i,e),{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"PUT",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}}}},oo=function(e){const t=dV(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=j["MotionGroupJoggingApi.directionJogging"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionGroupJoggingApi.getJoggingCapabilities"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionGroupJoggingApi.jointJogging"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionGroupJoggingApi.stopJogging"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,M,e)(u,i||d)}}};class hV extends Ve{directionJogging(t,r,n){return oo(this.configuration).directionJogging(t,r,n).then(a=>a(this.axios,this.basePath))}getJoggingCapabilities(t,r,n){return oo(this.configuration).getJoggingCapabilities(t,r,n).then(a=>a(this.axios,this.basePath))}jointJogging(t,r,n){return oo(this.configuration).jointJogging(t,r,n).then(a=>a(this.axios,this.basePath))}stopJogging(t,r,n){return oo(this.configuration).stopJogging(t,r,n).then(a=>a(this.axios,this.basePath))}}const pV=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,k);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};$(l,e),await U(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=de(n,l,e),{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};$(l,e),await U(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=de(n,l,e),{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};$(l,e),await U(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=de(n,l,e),{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}}}},so=function(e){const t=pV(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=j["MotionGroupKinematicApi.calculateAllInverseKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["MotionGroupKinematicApi.calculateForwardKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["MotionGroupKinematicApi.calculateInverseKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["MotionGroupKinematicApi.getKinematicCapabilities"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,M,e)(u,i||d)}}};class mV extends Ve{calculateAllInverseKinematic(t,r,n,a){return so(this.configuration).calculateAllInverseKinematic(t,r,n,a).then(o=>o(this.axios,this.basePath))}calculateForwardKinematic(t,r,n,a){return so(this.configuration).calculateForwardKinematic(t,r,n,a).then(o=>o(this.axios,this.basePath))}calculateInverseKinematic(t,r,n,a){return so(this.configuration).calculateInverseKinematic(t,r,n,a).then(o=>o(this.axios,this.basePath))}getKinematicCapabilities(t,r,n){return so(this.configuration).getKinematicCapabilities(t,r,n).then(a=>a(this.axios,this.basePath))}}const fV=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,k);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};$(i,e),await U(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=de(r,i,e),{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};$(i,e),await U(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=de(r,i,e),{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};$(i,e),await U(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=de(r,i,e),{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};$(l,e),await U(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=de(r,l,e),{url:D(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,k);let o;e&&(o=e.baseOptions);const s={method:"POST",...o,...r},i={},l={};$(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}}}},rr=function(e){const t=fV(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=j["ProgramApi.createProgramRunner"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ProgramApi.executeProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ProgramApi.getProgramRunner"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ProgramApi.listProgramRunners"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["ProgramApi.migrateProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ProgramApi.planProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["ProgramApi.stopAllProgramRunner"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["ProgramApi.stopProgramRunner"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,M,e)(u,i||d)}}};class gV extends Ve{createProgramRunner(t,r,n){return rr(this.configuration).createProgramRunner(t,r,n).then(a=>a(this.axios,this.basePath))}executeProgram(t,r,n){return rr(this.configuration).executeProgram(t,r,n).then(a=>a(this.axios,this.basePath))}getProgramRunner(t,r,n){return rr(this.configuration).getProgramRunner(t,r,n).then(a=>a(this.axios,this.basePath))}listProgramRunners(t,r){return rr(this.configuration).listProgramRunners(t,r).then(n=>n(this.axios,this.basePath))}migrateProgram(t,r,n){return rr(this.configuration).migrateProgram(t,r,n).then(a=>a(this.axios,this.basePath))}planProgram(t,r,n,a){return rr(this.configuration).planProgram(t,r,n,a).then(o=>o(this.axios,this.basePath))}stopAllProgramRunner(t,r){return rr(this.configuration).stopAllProgramRunner(t,r).then(n=>n(this.axios,this.basePath))}stopProgramRunner(t,r,n){return rr(this.configuration).stopProgramRunner(t,r,n).then(a=>a(this.axios,this.basePath))}}const yV=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,k);let o;e&&(o=e.baseOptions);const s={method:"DELETE",...o,...r},i={},l={};$(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};$(i,e),await U(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=de(r,i,e),{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await U(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=de(n,l,e),{url:D(s),options:l}}}},Xr=function(e){const t=yV(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=j["ProgramValuesApi.clearProgramsValues"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["ProgramValuesApi.createProgramsValue"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ProgramValuesApi.deleteProgramValue"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ProgramValuesApi.getProgramValue"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ProgramValuesApi.listProgramsValues"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["ProgramValuesApi.updateProgramValue"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,M,e)(d,l||h)}}};class bV extends Ve{clearProgramsValues(t,r){return Xr(this.configuration).clearProgramsValues(t,r).then(n=>n(this.axios,this.basePath))}createProgramsValue(t,r,n){return Xr(this.configuration).createProgramsValue(t,r,n).then(a=>a(this.axios,this.basePath))}deleteProgramValue(t,r,n){return Xr(this.configuration).deleteProgramValue(t,r,n).then(a=>a(this.axios,this.basePath))}getProgramValue(t,r,n){return Xr(this.configuration).getProgramValue(t,r,n).then(a=>a(this.axios,this.basePath))}listProgramsValues(t,r){return Xr(this.configuration).listProgramsValues(t,r).then(n=>n(this.axios,this.basePath))}updateProgramValue(t,r,n,a){return Xr(this.configuration).updateProgramValue(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const xV=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,k);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(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,k);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(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,k);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await U(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=de(n,l,e),{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await U(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=de(n,l,e),{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await U(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=de(n,l,e),{url:D(s),options:l}}}},ut=function(e){const t=xV(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=j["StoreCollisionComponentsApi.deleteStoredCollider"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["StoreCollisionComponentsApi.deleteStoredCollisionLinkChain"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["StoreCollisionComponentsApi.deleteStoredCollisionTool"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["StoreCollisionComponentsApi.getDefaultLinkChain"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["StoreCollisionComponentsApi.getStoredCollider"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["StoreCollisionComponentsApi.getStoredCollisionLinkChain"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["StoreCollisionComponentsApi.getStoredCollisionTool"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["StoreCollisionComponentsApi.listCollisionLinkChains"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["StoreCollisionComponentsApi.listStoredColliders"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["StoreCollisionComponentsApi.listStoredCollisionTools"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["StoreCollisionComponentsApi.storeCollider"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["StoreCollisionComponentsApi.storeCollisionLinkChain"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["StoreCollisionComponentsApi.storeCollisionTool"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,M,e)(d,l||h)}}};class vV extends Ve{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 SV=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,k);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await U(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=de(n,l,e),{url:D(s),options:l}}}},io=function(e){const t=SV(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=j["StoreCollisionScenesApi.deleteStoredCollisionScene"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["StoreCollisionScenesApi.getStoredCollisionScene"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["StoreCollisionScenesApi.listStoredCollisionScenes"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["StoreCollisionScenesApi.storeCollisionScene"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,M,e)(d,l||h)}}};class OV extends Ve{deleteStoredCollisionScene(t,r,n){return io(this.configuration).deleteStoredCollisionScene(t,r,n).then(a=>a(this.axios,this.basePath))}getStoredCollisionScene(t,r,n){return io(this.configuration).getStoredCollisionScene(t,r,n).then(a=>a(this.axios,this.basePath))}listStoredCollisionScenes(t,r){return io(this.configuration).listStoredCollisionScenes(t,r).then(n=>n(this.axios,this.basePath))}storeCollisionScene(t,r,n,a){return io(this.configuration).storeCollisionScene(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const wV=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,k);let o;e&&(o=e.baseOptions);const s={method:"DELETE",...o,...r},i={},l={};$(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"HEAD",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(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,k);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={},h=new(e&&e.formDataCtor||FormData);$(c,e),await U(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:D(i),options:c}}}},Zr=function(e){const t=wV(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=j["StoreObjectApi.clearAllObjects"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["StoreObjectApi.deleteObject"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["StoreObjectApi.getObject"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["StoreObjectApi.getObjectMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["StoreObjectApi.listAllObjectKeys"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["StoreObjectApi.storeObject"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,V,M,e)(h,c||p)}}};class CV extends Ve{clearAllObjects(t,r){return Zr(this.configuration).clearAllObjects(t,r).then(n=>n(this.axios,this.basePath))}deleteObject(t,r,n){return Zr(this.configuration).deleteObject(t,r,n).then(a=>a(this.axios,this.basePath))}getObject(t,r,n){return Zr(this.configuration).getObject(t,r,n).then(a=>a(this.axios,this.basePath))}getObjectMetadata(t,r,n){return Zr(this.configuration).getObjectMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}listAllObjectKeys(t,r){return Zr(this.configuration).listAllObjectKeys(t,r).then(n=>n(this.axios,this.basePath))}storeObject(t,r,n,a,o){return Zr(this.configuration).storeObject(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}const PV=function(e){return{checkNovaVersionUpdate:async(t,r={})=>{v("checkNovaVersionUpdate","channel",t);const n="/system/update",a=new URL(n,k);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await U(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:D(a),options:s}},getDiagnosePackage:async(t={})=>{const r="/system/diagnosis-package/zip",n=new URL(r,k);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...t},s={},i={};$(o,e),await U(s,e),L(n,i);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...t.headers},{url:D(n),options:o}},getSystemStatus:async(t={})=>{const r="/system/status",n=new URL(r,k);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...t},s={},i={};$(o,e),await U(s,e),L(n,i);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...t.headers},{url:D(n),options:o}},getSystemVersion:async(t={})=>{const r="/system/version",n=new URL(r,k);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...t},s={},i={};$(o,e),await U(s,e),L(n,i);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...t.headers},{url:D(n),options:o}},updateNovaVersion:async(t,r={})=>{v("updateNovaVersion","updateNovaVersionRequest",t);const n="/system/update",a=new URL(n,k);let o;e&&(o=e.baseOptions);const s={method:"PUT",...o,...r},i={},l={};$(s,e),await U(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=de(t,s,e),{url:D(a),options:s}}}},Xn=function(e){const t=PV(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=j["SystemApi.checkNovaVersionUpdate"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["SystemApi.getDiagnosePackage"])==null?void 0:s[a])==null?void 0:i.url;return(l,c)=>B(n,V,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=j["SystemApi.getSystemStatus"])==null?void 0:s[a])==null?void 0:i.url;return(l,c)=>B(n,V,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=j["SystemApi.getSystemVersion"])==null?void 0:s[a])==null?void 0:i.url;return(l,c)=>B(n,V,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=j["SystemApi.updateNovaVersion"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,M,e)(c,s||u)}}};class TV extends Ve{checkNovaVersionUpdate(t,r){return Xn(this.configuration).checkNovaVersionUpdate(t,r).then(n=>n(this.axios,this.basePath))}getDiagnosePackage(t){return Xn(this.configuration).getDiagnosePackage(t).then(r=>r(this.axios,this.basePath))}getSystemStatus(t){return Xn(this.configuration).getSystemStatus(t).then(r=>r(this.axios,this.basePath))}getSystemVersion(t){return Xn(this.configuration).getSystemVersion(t).then(r=>r(this.axios,this.basePath))}updateNovaVersion(t,r){return Xn(this.configuration).updateNovaVersion(t,r).then(n=>n(this.axios,this.basePath))}}const RV=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,k);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await U(c,e),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await U(c,e),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={};$(c,e),await U(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=de(a,c,e),{url:D(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,k);let u;e&&(u=e.baseOptions);const d={method:"PUT",...u,...i},h={},p={};$(d,e),await U(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:D(c),options:d}}}},en=function(e){const t=RV(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=j["VirtualRobotApi.getMotionGroupState"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["VirtualRobotApi.getMotionGroups"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["VirtualRobotApi.getVirtualRobotIOValue"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["VirtualRobotApi.listIOs"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["VirtualRobotApi.setMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,V,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=j["VirtualRobotApi.setVirtualRobotIOValue"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>B(c,V,M,e)(f,d||m)}}};class AV extends Ve{getMotionGroupState(t,r,n,a){return en(this.configuration).getMotionGroupState(t,r,n,a).then(o=>o(this.axios,this.basePath))}getMotionGroups(t,r,n){return en(this.configuration).getMotionGroups(t,r,n).then(a=>a(this.axios,this.basePath))}getVirtualRobotIOValue(t,r,n,a){return en(this.configuration).getVirtualRobotIOValue(t,r,n,a).then(o=>o(this.axios,this.basePath))}listIOs(t,r,n){return en(this.configuration).listIOs(t,r,n).then(a=>a(this.axios,this.basePath))}setMotionGroupState(t,r,n,a,o){return en(this.configuration).setMotionGroupState(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}setVirtualRobotIOValue(t,r,n,a,o,s,i){return en(this.configuration).setVirtualRobotIOValue(t,r,n,a,o,s,i).then(l=>l(this.axios,this.basePath))}}const _V=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,k);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await U(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=de(n,l,e),{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await U(c,e),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(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,k);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={};$(c,e),await U(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:D(i),options:c}}}},Ii=function(e){const t=_V(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=j["VirtualRobotBehaviorApi.externalJointsStream"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["VirtualRobotBehaviorApi.getMotionGroupBehavior"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["VirtualRobotBehaviorApi.setMotionGroupBehavior"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,V,M,e)(h,c||p)}}};class EV extends Ve{externalJointsStream(t,r,n,a){return Ii(this.configuration).externalJointsStream(t,r,n,a).then(o=>o(this.axios,this.basePath))}getMotionGroupBehavior(t,r,n,a){return Ii(this.configuration).getMotionGroupBehavior(t,r,n,a).then(o=>o(this.axios,this.basePath))}setMotionGroupBehavior(t,r,n,a,o){return Ii(this.configuration).setMotionGroupBehavior(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}const VV=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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"PUT",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"PUT",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await U(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:D(s),options:l}}}},tn=function(e){const t=VV(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=j["VirtualRobotModeApi.getCycleTime"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["VirtualRobotModeApi.getEStop"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["VirtualRobotModeApi.getOperationMode"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["VirtualRobotModeApi.pushEStop"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["VirtualRobotModeApi.releaseEStop"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["VirtualRobotModeApi.setOperationMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,M,e)(d,l||h)}}};class IV extends Ve{getCycleTime(t,r,n){return tn(this.configuration).getCycleTime(t,r,n).then(a=>a(this.axios,this.basePath))}getEStop(t,r,n){return tn(this.configuration).getEStop(t,r,n).then(a=>a(this.axios,this.basePath))}getOperationMode(t,r,n){return tn(this.configuration).getOperationMode(t,r,n).then(a=>a(this.axios,this.basePath))}pushEStop(t,r,n){return tn(this.configuration).pushEStop(t,r,n).then(a=>a(this.axios,this.basePath))}releaseEStop(t,r,n){return tn(this.configuration).releaseEStop(t,r,n).then(a=>a(this.axios,this.basePath))}setOperationMode(t,r,n,a){return tn(this.configuration).setOperationMode(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const MV=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,k);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await U(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=de(n,l,e),{url:D(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,k);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={};$(c,e),await U(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=de(a,c,e),{url:D(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,k);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...o},u={},d={};$(c,e),await U(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:D(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,k);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...o},u={},d={};$(c,e),await U(u,e),L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await U(c,e),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(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,k);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(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,k);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await U(c,e),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(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,k);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={};$(c,e),await U(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=de(a,c,e),{url:D(i),options:c}}}},nr=function(e){const t=MV(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=j["VirtualRobotSetupApi.addVirtualRobotCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["VirtualRobotSetupApi.addVirtualRobotTcp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,V,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=j["VirtualRobotSetupApi.deleteVirtualRobotCoordinateSystem"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,V,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=j["VirtualRobotSetupApi.deleteVirtualRobotTcp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,V,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=j["VirtualRobotSetupApi.getVirtualRobotMounting"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["VirtualRobotSetupApi.listVirtualRobotCoordinateSystems"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["VirtualRobotSetupApi.listVirtualRobotTcps"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["VirtualRobotSetupApi.setVirtualRobotMounting"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,V,M,e)(h,c||p)}}};class jV extends Ve{addVirtualRobotCoordinateSystem(t,r,n,a){return nr(this.configuration).addVirtualRobotCoordinateSystem(t,r,n,a).then(o=>o(this.axios,this.basePath))}addVirtualRobotTcp(t,r,n,a,o){return nr(this.configuration).addVirtualRobotTcp(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}deleteVirtualRobotCoordinateSystem(t,r,n,a,o){return nr(this.configuration).deleteVirtualRobotCoordinateSystem(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}deleteVirtualRobotTcp(t,r,n,a,o){return nr(this.configuration).deleteVirtualRobotTcp(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}getVirtualRobotMounting(t,r,n,a){return nr(this.configuration).getVirtualRobotMounting(t,r,n,a).then(o=>o(this.axios,this.basePath))}listVirtualRobotCoordinateSystems(t,r,n){return nr(this.configuration).listVirtualRobotCoordinateSystems(t,r,n).then(a=>a(this.axios,this.basePath))}listVirtualRobotTcps(t,r,n,a){return nr(this.configuration).listVirtualRobotTcps(t,r,n,a).then(o=>o(this.axios,this.basePath))}setVirtualRobotMounting(t,r,n,a,o){return nr(this.configuration).setVirtualRobotMounting(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}function Bt(e,t,r){return Math.max(t,Math.min(r,e))}class kV{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 y=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 T=Math.sqrt(O),P=Math.atan2(T,S*E);y=Math.sin(y*P)/T,i=Math.sin(i*P)/T}const w=i*E;if(l=l*y+h*w,c=c*y+p*w,u=u*y+f*w,d=d*y+m*w,y===1-i){const T=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=T,c*=T,u*=T,d*=T}}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(Bt(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 hn{constructor(t=0,r=0,n=0){hn.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(Zd.setFromEuler(t))}applyAxisAngle(t,r){return this.applyQuaternion(Zd.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=Bt(this.x,t.x,r.x),this.y=Bt(this.y,t.y,r.y),this.z=Bt(this.z,t.z,r.z),this}clampScalar(t,r){return this.x=Bt(this.x,t,r),this.y=Bt(this.y,t,r),this.z=Bt(this.z,t,r),this}clampLength(t,r){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Bt(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 Mi.copy(this).projectOnVector(t),this.sub(Mi)}reflect(t){return this.sub(Mi.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(Bt(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 Mi=new hn,Zd=new kV;function $V(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 ji(){var e;return typeof arguments[0]=="object"?e=arguments[0]:e=[].slice.call(arguments),$V(e)}var Vt={},eh;function UV(){if(eh)return Vt;eh=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.TokenData=void 0,Vt.parse=d,Vt.compile=h,Vt.match=m,Vt.pathToRegexp=y,Vt.stringify=w;const e="/",t=C=>C,r=/^[$_\p{ID_Start}]$/u,n=/^[$\u200c\u200d\p{ID_Continue}]$/u,a="https://git.new/pathToRegexpError",o={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function s(C){return C.replace(/[{}()\[\]+?!:*]/g,"\\$&")}function i(C){return C.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}function*l(C){const I=[...C];let z=0;function b(){let A="";if(r.test(I[++z]))for(A+=I[z];n.test(I[++z]);)A+=I[z];else if(I[z]==='"'){let G=z;for(;z<I.length;){if(I[++z]==='"'){z++,G=0;break}I[z]==="\\"?A+=I[++z]:A+=I[z]}if(G)throw new TypeError(`Unterminated quote at ${G}: ${a}`)}if(!A)throw new TypeError(`Missing parameter name at ${z}: ${a}`);return A}for(;z<I.length;){const A=I[z],G=o[A];if(G)yield{type:G,index:z++,value:A};else if(A==="\\")yield{type:"ESCAPED",index:z++,value:I[z++]};else if(A===":"){const _=b();yield{type:"PARAM",index:z,value:_}}else if(A==="*"){const _=b();yield{type:"WILDCARD",index:z,value:_}}else yield{type:"CHAR",index:z,value:I[z++]}}return{type:"END",index:z,value:""}}class c{constructor(I){this.tokens=I}peek(){if(!this._peek){const I=this.tokens.next();this._peek=I.value}return this._peek}tryConsume(I){const z=this.peek();if(z.type===I)return this._peek=void 0,z.value}consume(I){const z=this.tryConsume(I);if(z!==void 0)return z;const{type:b,index:A}=this.peek();throw new TypeError(`Unexpected ${b} at ${A}, expected ${I}: ${a}`)}text(){let I="",z;for(;z=this.tryConsume("CHAR")||this.tryConsume("ESCAPED");)I+=z;return I}}class u{constructor(I){this.tokens=I}}Vt.TokenData=u;function d(C,I={}){const{encodePath:z=t}=I,b=new c(l(C));function A(_){const F=[];for(;;){const re=b.text();re&&F.push({type:"text",value:z(re)});const ee=b.tryConsume("PARAM");if(ee){F.push({type:"param",name:ee});continue}const ae=b.tryConsume("WILDCARD");if(ae){F.push({type:"wildcard",name:ae});continue}if(b.tryConsume("{")){F.push({type:"group",tokens:A("}")});continue}return b.consume(_),F}}const G=A("END");return new u(G)}function h(C,I={}){const{encode:z=encodeURIComponent,delimiter:b=e}=I,A=C instanceof u?C:d(C,I),G=p(A.tokens,b,z);return function(F={}){const[re,...ee]=G(F);if(ee.length)throw new TypeError(`Missing parameters: ${ee.join(", ")}`);return re}}function p(C,I,z){const b=C.map(A=>f(A,I,z));return A=>{const G=[""];for(const _ of b){const[F,...re]=_(A);G[0]+=F,G.push(...re)}return G}}function f(C,I,z){if(C.type==="text")return()=>[C.value];if(C.type==="group"){const A=p(C.tokens,I,z);return G=>{const[_,...F]=A(G);return F.length?[""]:[_]}}const b=z||t;return C.type==="wildcard"&&z!==!1?A=>{const G=A[C.name];if(G==null)return["",C.name];if(!Array.isArray(G)||G.length===0)throw new TypeError(`Expected "${C.name}" to be a non-empty array`);return[G.map((_,F)=>{if(typeof _!="string")throw new TypeError(`Expected "${C.name}/${F}" to be a string`);return b(_)}).join(I)]}:A=>{const G=A[C.name];if(G==null)return["",C.name];if(typeof G!="string")throw new TypeError(`Expected "${C.name}" to be a string`);return[b(G)]}}function m(C,I={}){const{decode:z=decodeURIComponent,delimiter:b=e}=I,{regexp:A,keys:G}=y(C,I),_=G.map(F=>z===!1?t:F.type==="param"?z:re=>re.split(b).map(z));return function(re){const ee=A.exec(re);if(!ee)return!1;const ae=ee[0],te=Object.create(null);for(let se=1;se<ee.length;se++){if(ee[se]===void 0)continue;const W=G[se-1],X=_[se-1];te[W.name]=X(ee[se])}return{path:ae,params:te}}}function y(C,I={}){const{delimiter:z=e,end:b=!0,sensitive:A=!1,trailing:G=!0}=I,_=[],F=[],re=A?"":"i",ae=(Array.isArray(C)?C:[C]).map(W=>W instanceof u?W:d(W,I));for(const{tokens:W}of ae)for(const X of S(W,0,[])){const ue=E(X,z,_);F.push(ue)}let te=`^(?:${F.join("|")})`;return G&&(te+=`(?:${i(z)}$)?`),te+=b?"$":`(?=${i(z)}|$)`,{regexp:new RegExp(te,re),keys:_}}function*S(C,I,z){if(I===C.length)return yield z;const b=C[I];if(b.type==="group"){const A=z.slice();for(const G of S(b.tokens,0,A))yield*S(C,I+1,G)}else z.push(b);yield*S(C,I+1,z)}function E(C,I,z){let b="",A="",G=!0;for(let _=0;_<C.length;_++){const F=C[_];if(F.type==="text"){b+=i(F.value),A+=F.value,G||(G=F.value.includes(I));continue}if(F.type==="param"||F.type==="wildcard"){if(!G&&!A)throw new TypeError(`Missing text after "${F.name}": ${a}`);F.type==="param"?b+=`(${O(I,G?"":A)}+)`:b+="([\\s\\S]+)",z.push(F),A="",G=!1;continue}}return b}function O(C,I){return I.length<2?C.length<2?`[^${i(C+I)}]`:`(?:(?!${i(C)})[^${i(I)}])`:C.length<2?`(?:(?!${i(I)})[^${i(C)}])`:`(?:(?!${i(I)}|${i(C)})[\\s\\S])`}function w(C){return C.tokens.map(function I(z,b,A){if(z.type==="text")return s(z.value);if(z.type==="group")return`{${z.tokens.map(I).join("")}}`;const _=T(z.name)&&P(A[b+1])?z.name:JSON.stringify(z.name);if(z.type==="param")return`:${_}`;if(z.type==="wildcard")return`*${_}`;throw new TypeError(`Unexpected token: ${z}`)}).join("")}function T(C){const[I,...z]=C;return r.test(I)?z.every(b=>n.test(b)):!1}function P(C){return(C==null?void 0:C.type)!=="text"?!0:!n.test(C.value[0])}return Vt}var LV=UV();function gf(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 yf(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 th=1e-4,DV=class bf{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=ir(p.data))==null?void 0:f.result;m&&je.runInAction(()=>{this.controllerState=m})}),o.addEventListener("message",p=>{var f;const m=(f=ir(p.data))==null?void 0:f.result;if(!m)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${p.data}`);gf(this.rapidlyChangingMotionState.state.joint_position.joints,m.state.joint_position.joints,th)||je.runInAction(()=>{this.rapidlyChangingMotionState.state=m.state}),yf(this.rapidlyChangingMotionState.tcp_pose,m.tcp_pose,th)||je.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose=m.tcp_pose})}),je.makeAutoObservable(this)}static connect(t,r,n){return Ee(this,null,function*(){var a,o;const[s,i]=r.split("@"),l=n.find(P=>P.controller===i),c=l==null?void 0:l.physical_motion_groups.find(P=>P.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=ir(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:
149
+ `):" "+Yd(o[0]):"as no adapter specified";throw new he("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:ml};function Vi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Mn(null,e)}function Kd(e){return Vi(e),e.headers=lt.from(e.headers),e.data=Ei.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),hf.getAdapter(e.adapter||ja.adapter)(e).then(function(n){return Vi(e),n.data=Ei.call(e,e.transformResponse,n),n.headers=lt.from(n.headers),n},function(n){return of(n)||(Vi(e),n&&n.response&&(n.response.data=Ei.call(e,e.transformResponse,n.response),n.response.headers=lt.from(n.response.headers))),Promise.reject(n)})}const pf="1.8.3",Ls={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ls[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Qd={};Ls.transitional=function(t,r,n){function a(o,s){return"[Axios v"+pf+"] Transitional option '"+o+"'"+s+(n?". "+n:"")}return(o,s,i)=>{if(t===!1)throw new he(a(s," has been removed"+(r?" in "+r:"")),he.ERR_DEPRECATED);return r&&!Qd[s]&&(Qd[s]=!0,console.warn(a(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(o,s,i):!0}};Ls.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function jE(e,t,r){if(typeof e!="object")throw new he("options must be an object",he.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let a=n.length;for(;a-- >0;){const o=n[a],s=t[o];if(s){const i=e[o],l=i===void 0||s(i,o,e);if(l!==!0)throw new he("option "+o+" must be "+l,he.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new he("Unknown option "+o,he.ERR_BAD_OPTION)}}const Oo={assertOptions:jE,validators:Ls},Et=Oo.validators;let Cr=class{constructor(t){this.defaults=t,this.interceptors={request:new Fd,response:new Fd}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const o=a.stack?a.stack.replace(/^.+\n/,""):"";try{n.stack?o&&!String(n.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(n.stack+=`
150
+ `+o):n.stack=o}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=_r(this.defaults,r);const{transitional:n,paramsSerializer:a,headers:o}=r;n!==void 0&&Oo.assertOptions(n,{silentJSONParsing:Et.transitional(Et.boolean),forcedJSONParsing:Et.transitional(Et.boolean),clarifyTimeoutError:Et.transitional(Et.boolean)},!1),a!=null&&(H.isFunction(a)?r.paramsSerializer={serialize:a}:Oo.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),Oo.assertOptions(r,{baseUrl:Et.spelling("baseURL"),withXsrfToken:Et.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=o&&H.merge(o.common,o[r.method]);o&&H.forEach(["delete","get","head","post","put","patch","common"],f=>{delete o[f]}),r.headers=lt.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=[Kd.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(y){m.call(this,y);break}}try{u=Kd.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=_r(this.defaults,t);const r=lf(t.baseURL,t.url,t.allowAbsoluteUrls);return rf(r,t.params,t.paramsSerializer)}};H.forEach(["delete","get","head","options"],function(t){Cr.prototype[t]=function(r,n){return this.request(_r(n||{},{method:t,url:r,data:(n||{}).data}))}});H.forEach(["post","put","patch"],function(t){function r(n){return function(o,s,i){return this.request(_r(i||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}Cr.prototype[t]=r(),Cr.prototype[t+"Form"]=r(!0)});let $E=class mf{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 Mn(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 mf(function(a){t=a}),cancel:t}}};function kE(e){return function(r){return e.apply(null,r)}}function UE(e){return H.isObject(e)&&e.isAxiosError===!0}const fl={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(fl).forEach(([e,t])=>{fl[t]=e});function ff(e){const t=new Cr(e),r=Hm(Cr.prototype.request,t);return H.extend(r,Cr.prototype,t,{allOwnKeys:!0}),H.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return ff(_r(e,a))},r}const V=ff(ja);V.Axios=Cr;V.CanceledError=Mn;V.CancelToken=$E;V.isCancel=of;V.VERSION=pf;V.toFormData=Us;V.AxiosError=he;V.Cancel=V.CanceledError;V.all=function(t){return Promise.all(t)};V.spread=kE;V.isAxiosError=UE;V.mergeConfig=_r;V.AxiosHeaders=lt;V.formToJSON=e=>af(H.isHTMLForm(e)?new FormData(e):e);V.getAdapter=hf.getAdapter;V.HttpStatusCode=fl;V.default=V;const{Axios:oj,AxiosError:gl,CanceledError:sj,isCancel:ij,CancelToken:lj,VERSION:cj,all:uj,Cancel:dj,isAxiosError:DE,spread:hj,toFormData:pj,AxiosHeaders:mj,HttpStatusCode:fj,formToJSON:gj,getAdapter:yj,mergeConfig:bj}=V,M="/api/v1".replace(/\/+$/,"");class Ve{constructor(t,r=M,n=V){$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 LE extends Error{constructor(r,n){super(n);$n(this,"field");this.field=r,this.name="RequiredError"}}const j={},$="https://example.com",v=function(e,t,r){if(r==null)throw new LE(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},k=function(e,t){t&&(t.username||t.password)&&(e.auth={username:t.username,password:t.password})},U=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 yl(e,t,r=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(n=>yl(e,n,r)):Object.keys(t).forEach(n=>yl(e,t[n],`${r}${r!==""?".":""}${n}`)):e.has(r)?e.append(r,t):e.set(r,t))}const D=function(e,...t){const r=new URLSearchParams(e.search);yl(r,t),e.search=r.toString()},de=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||""},L=function(e){return e.pathname+e.search+e.hash},B=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)}},BE=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={};k(l,e),await U(c,e),n!==void 0&&(u.completionTimeout=n),c["Content-Type"]="application/json",D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(r,l,e),{url:L(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={};k(i,e),await U(l,e),r!==void 0&&(c.completionTimeout=r),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(l,e),await U(c,e),n!==void 0&&(u.completionTimeout=n),D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(s,e),await U(i,e),D(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:L(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={};k(c,e),await U(u,e),a!==void 0&&(d.completionTimeout=a),u["Content-Type"]="application/json",D(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},c.data=de(n,c,e),{url:L(i),options:c}}}},Kr=function(e){const t=BE(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=j["ApplicationApi.addApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["ApplicationApi.clearApps"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ApplicationApi.deleteApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["ApplicationApi.getApp"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ApplicationApi.listApps"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["ApplicationApi.updateApp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,V,M,e)(h,c||p)}}};class Xd extends Ve{addApp(t,r,n,a){return Kr(this.configuration).addApp(t,r,n,a).then(o=>o(this.axios,this.basePath))}clearApps(t,r,n){return Kr(this.configuration).clearApps(t,r,n).then(a=>a(this.axios,this.basePath))}deleteApp(t,r,n,a){return Kr(this.configuration).deleteApp(t,r,n,a).then(o=>o(this.axios,this.basePath))}getApp(t,r,n){return Kr(this.configuration).getApp(t,r,n).then(a=>a(this.axios,this.basePath))}listApps(t,r){return Kr(this.configuration).listApps(t,r).then(n=>n(this.axios,this.basePath))}updateApp(t,r,n,a,o){return Kr(this.configuration).updateApp(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}const NE=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={};k(i,e),await U(l,e),r!==void 0&&(c.completionTimeout=r),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),r!==void 0&&(c.completionTimeout=r),l["Content-Type"]="application/json",D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(t,i,e),{url:L(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={};k(s,e),await U(i,e),D(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:L(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={};k(s,e),await U(i,e),D(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:L(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={};k(o,e),await U(s,e),D(n,i);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...t.headers},{url:L(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={};k(l,e),await U(c,e),n!==void 0&&(u.completionTimeout=n),c["Content-Type"]="application/json",D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(r,l,e),{url:L(s),options:l}}}},Qr=function(e){const t=NE(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=j["CellApi.deleteCell"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["CellApi.deployCell"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["CellApi.getCell"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["CellApi.getCellStatus"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["CellApi.listCells"])==null?void 0:s[a])==null?void 0:i.url;return(l,c)=>B(n,V,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=j["CellApi.updateCell"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,M,e)(d,l||h)}}};class FE extends Ve{deleteCell(t,r,n){return Qr(this.configuration).deleteCell(t,r,n).then(a=>a(this.axios,this.basePath))}deployCell(t,r,n){return Qr(this.configuration).deployCell(t,r,n).then(a=>a(this.axios,this.basePath))}getCell(t,r){return Qr(this.configuration).getCell(t,r).then(n=>n(this.axios,this.basePath))}getCellStatus(t,r){return Qr(this.configuration).getCellStatus(t,r).then(n=>n(this.axios,this.basePath))}listCells(t){return Qr(this.configuration).listCells(t).then(r=>r(this.axios,this.basePath))}updateCell(t,r,n,a){return Qr(this.configuration).updateCell(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const zE=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={};k(l,e),await U(c,e),n!==void 0&&(u.completionTimeout=n),c["Content-Type"]="application/json",D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(r,l,e),{url:L(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={};k(i,e),await U(l,e),r!==void 0&&(c.completionTimeout=r),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(l,e),await U(c,e),n!==void 0&&(u.completionTimeout=n),D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(s,e),await U(i,e),D(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:L(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={};k(l,e),await U(c,e),n!==void 0&&(u.mode=n),D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:L(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={};k(l,e),await U(c,e),n!==void 0&&(u.response_rate=n),D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(l,e),await U(c,e),n!==void 0&&(u.response_rate=n),D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:L(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={};k(c,e),await U(u,e),a!==void 0&&(d.completionTimeout=a),u["Content-Type"]="application/json",D(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},c.data=de(n,c,e),{url:L(i),options:c}}}},nt=function(e){const t=zE(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=j["ControllerApi.addRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["ControllerApi.clearRobotControllers"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ControllerApi.deleteRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["ControllerApi.getCurrentRobotControllerState"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ControllerApi.getMode"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ControllerApi.getRobotController"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ControllerApi.getSupportedModes"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ControllerApi.getVirtualRobotConfiguration"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ControllerApi.listControllers"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["ControllerApi.setDefaultMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["ControllerApi.streamFreeDrive"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["ControllerApi.streamModeChange"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ControllerApi.streamRobotControllerState"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["ControllerApi.updateRobotController"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,V,M,e)(h,c||p)}}};class GE extends Ve{addRobotController(t,r,n,a){return nt(this.configuration).addRobotController(t,r,n,a).then(o=>o(this.axios,this.basePath))}clearRobotControllers(t,r,n){return nt(this.configuration).clearRobotControllers(t,r,n).then(a=>a(this.axios,this.basePath))}deleteRobotController(t,r,n,a){return nt(this.configuration).deleteRobotController(t,r,n,a).then(o=>o(this.axios,this.basePath))}getCurrentRobotControllerState(t,r,n){return nt(this.configuration).getCurrentRobotControllerState(t,r,n).then(a=>a(this.axios,this.basePath))}getMode(t,r,n){return nt(this.configuration).getMode(t,r,n).then(a=>a(this.axios,this.basePath))}getRobotController(t,r,n){return nt(this.configuration).getRobotController(t,r,n).then(a=>a(this.axios,this.basePath))}getSupportedModes(t,r,n){return nt(this.configuration).getSupportedModes(t,r,n).then(a=>a(this.axios,this.basePath))}getVirtualRobotConfiguration(t,r,n){return nt(this.configuration).getVirtualRobotConfiguration(t,r,n).then(a=>a(this.axios,this.basePath))}listControllers(t,r){return nt(this.configuration).listControllers(t,r).then(n=>n(this.axios,this.basePath))}setDefaultMode(t,r,n,a){return nt(this.configuration).setDefaultMode(t,r,n,a).then(o=>o(this.axios,this.basePath))}streamFreeDrive(t,r,n,a){return nt(this.configuration).streamFreeDrive(t,r,n,a).then(o=>o(this.axios,this.basePath))}streamModeChange(t,r,n){return nt(this.configuration).streamModeChange(t,r,n).then(a=>a(this.axios,this.basePath))}streamRobotControllerState(t,r,n,a){return nt(this.configuration).streamRobotControllerState(t,r,n,a).then(o=>o(this.axios,this.basePath))}updateRobotController(t,r,n,a,o){return nt(this.configuration).updateRobotController(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}const HE=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={};k(l,e),await U(c,e),n&&(u.ios=n),D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:L(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={};k(l,e),await U(c,e),n&&(u.ios=n),D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:L(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={};k(l,e),await U(c,e),c["Content-Type"]="application/json",D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:L(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={};k(l,e),await U(c,e),n&&(u.ios=n),D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:L(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={};k(h,e),await U(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),D(u,f);let m=d&&d.headers?d.headers:{};return h.headers={...p,...m,...l.headers},{url:L(u),options:h}}}},Wn=function(e){const t=HE(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=j["ControllerIOsApi.listIODescriptions"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["ControllerIOsApi.listIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["ControllerIOsApi.setOutputValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["ControllerIOsApi.streamIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["ControllerIOsApi.waitForIOEvent"])==null?void 0:p[d])==null?void 0:f.url;return(m,y)=>B(u,V,M,e)(m,h||y)}}};class qE extends Ve{listIODescriptions(t,r,n,a){return Wn(this.configuration).listIODescriptions(t,r,n,a).then(o=>o(this.axios,this.basePath))}listIOValues(t,r,n,a){return Wn(this.configuration).listIOValues(t,r,n,a).then(o=>o(this.axios,this.basePath))}setOutputValues(t,r,n,a){return Wn(this.configuration).setOutputValues(t,r,n,a).then(o=>o(this.axios,this.basePath))}streamIOValues(t,r,n,a){return Wn(this.configuration).streamIOValues(t,r,n,a).then(o=>o(this.axios,this.basePath))}waitForIOEvent(t,r,n,a,o,s,i,l){return Wn(this.configuration).waitForIOEvent(t,r,n,a,o,s,i,l).then(c=>c(this.axios,this.basePath))}}const WE=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={};k(i,e),await U(l,e),l["Content-Type"]="application/json",D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(l,e),await U(c,e),n!==void 0&&(u.rotation_type=n),D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:L(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={};k(i,e),await U(l,e),r!==void 0&&(c.rotation_type=r),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(l,e),await U(c,e),c["Content-Type"]="application/json",D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:L(s),options:l}}}},Jn=function(e){const t=WE(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=j["CoordinateSystemsApi.addCoordinateSystem"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["CoordinateSystemsApi.deleteCoordinateSystem"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["CoordinateSystemsApi.getCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["CoordinateSystemsApi.listCoordinateSystems"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["CoordinateSystemsApi.transformInCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,M,e)(d,l||h)}}};class JE extends Ve{addCoordinateSystem(t,r,n){return Jn(this.configuration).addCoordinateSystem(t,r,n).then(a=>a(this.axios,this.basePath))}deleteCoordinateSystem(t,r,n){return Jn(this.configuration).deleteCoordinateSystem(t,r,n).then(a=>a(this.axios,this.basePath))}getCoordinateSystem(t,r,n,a){return Jn(this.configuration).getCoordinateSystem(t,r,n,a).then(o=>o(this.axios,this.basePath))}listCoordinateSystems(t,r,n){return Jn(this.configuration).listCoordinateSystems(t,r,n).then(a=>a(this.axios,this.basePath))}transformInCoordinateSystem(t,r,n,a){return Jn(this.configuration).transformInCoordinateSystem(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const YE=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={};k(s,e),await U(i,e),D(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:L(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={};k(i,e),await U(l,e),l["Content-Type"]="application/json",D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(s,e),await U(i,e),D(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:L(a),options:s}}}},Yn=function(e){const t=YE(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=j["DeviceConfigurationApi.clearDevices"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["DeviceConfigurationApi.createDevice"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["DeviceConfigurationApi.deleteDevice"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["DeviceConfigurationApi.getDevice"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["DeviceConfigurationApi.listDevices"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,M,e)(c,s||u)}}};class KE extends Ve{clearDevices(t,r){return Yn(this.configuration).clearDevices(t,r).then(n=>n(this.axios,this.basePath))}createDevice(t,r,n){return Yn(this.configuration).createDevice(t,r,n).then(a=>a(this.axios,this.basePath))}deleteDevice(t,r,n){return Yn(this.configuration).deleteDevice(t,r,n).then(a=>a(this.axios,this.basePath))}getDevice(t,r,n){return Yn(this.configuration).getDevice(t,r,n).then(a=>a(this.axios,this.basePath))}listDevices(t,r){return Yn(this.configuration).listDevices(t,r).then(n=>n(this.axios,this.basePath))}}const QE=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={};k(l,e),await U(c,e),n!==void 0&&(u.name=n),c["Content-Type"]="text/plain",D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(r,l,e),{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),r&&(c.program_ids=r),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(l,e),await U(c,e),c["Content-Type"]="text/plain",D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:L(s),options:l}}}},Kn=function(e){const t=QE(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=j["LibraryProgramApi.createProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["LibraryProgramApi.deleteProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["LibraryProgramApi.deleteProgramList"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["LibraryProgramApi.getProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["LibraryProgramApi.updateProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,M,e)(d,l||h)}}};class XE extends Ve{createProgram(t,r,n,a){return Kn(this.configuration).createProgram(t,r,n,a).then(o=>o(this.axios,this.basePath))}deleteProgram(t,r,n){return Kn(this.configuration).deleteProgram(t,r,n).then(a=>a(this.axios,this.basePath))}deleteProgramList(t,r,n){return Kn(this.configuration).deleteProgramList(t,r,n).then(a=>a(this.axios,this.basePath))}getProgram(t,r,n){return Kn(this.configuration).getProgram(t,r,n).then(a=>a(this.axios,this.basePath))}updateProgram(t,r,n,a){return Kn(this.configuration).updateProgram(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const ZE=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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),r!==void 0&&(c.show_hidden=r),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(l,e),await U(c,e),c["Content-Type"]="application/json",D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:L(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);k(l,e),await U(c,e),n!==void 0&&d.append("file",n),c["Content-Type"]="multipart/form-data",D(s,u);let h=i&&i.headers?i.headers:{};return l.headers={...c,...h,...a.headers},l.data=d,{url:L(s),options:l}}}},ro=function(e){const t=ZE(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=j["LibraryProgramMetadataApi.getProgramMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["LibraryProgramMetadataApi.listProgramMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["LibraryProgramMetadataApi.updateProgramMetadata"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["LibraryProgramMetadataApi.uploadProgramMetadataImage"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,M,e)(d,l||h)}}};class eV extends Ve{getProgramMetadata(t,r,n){return ro(this.configuration).getProgramMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}listProgramMetadata(t,r,n){return ro(this.configuration).listProgramMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}updateProgramMetadata(t,r,n,a){return ro(this.configuration).updateProgramMetadata(t,r,n,a).then(o=>o(this.axios,this.basePath))}uploadProgramMetadataImage(t,r,n,a){return ro(this.configuration).uploadProgramMetadataImage(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const tV=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={};k(c,e),await U(u,e),r!==void 0&&(d.program_id=r),a!==void 0&&(d.name=a),u["Content-Type"]="application/json",D(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},c.data=de(n,c,e),{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),r&&(c.recipe_ids=r),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(l,e),await U(c,e),c["Content-Type"]="application/json",D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:L(s),options:l}}}},Qn=function(e){const t=tV(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=j["LibraryRecipeApi.createRecipe"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,V,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=j["LibraryRecipeApi.deleteRecipe"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["LibraryRecipeApi.deleteRecipeList"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["LibraryRecipeApi.getRecipe"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["LibraryRecipeApi.updateRecipe"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,M,e)(d,l||h)}}};class rV extends Ve{createRecipe(t,r,n,a,o){return Qn(this.configuration).createRecipe(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}deleteRecipe(t,r,n){return Qn(this.configuration).deleteRecipe(t,r,n).then(a=>a(this.axios,this.basePath))}deleteRecipeList(t,r,n){return Qn(this.configuration).deleteRecipeList(t,r,n).then(a=>a(this.axios,this.basePath))}getRecipe(t,r,n){return Qn(this.configuration).getRecipe(t,r,n).then(a=>a(this.axios,this.basePath))}updateRecipe(t,r,n,a){return Qn(this.configuration).updateRecipe(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const nV=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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(s,e),await U(i,e),D(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:L(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={};k(l,e),await U(c,e),c["Content-Type"]="application/json",D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:L(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);k(l,e),await U(c,e),n!==void 0&&d.append("file",n),c["Content-Type"]="multipart/form-data",D(s,u);let h=i&&i.headers?i.headers:{};return l.headers={...c,...h,...a.headers},l.data=d,{url:L(s),options:l}}}},no=function(e){const t=nV(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=j["LibraryRecipeMetadataApi.getRecipeMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["LibraryRecipeMetadataApi.listRecipeMetadata"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["LibraryRecipeMetadataApi.updateRecipeMetadata"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["LibraryRecipeMetadataApi.uploadRecipeMetadataImage"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,M,e)(d,l||h)}}};class aV extends Ve{getRecipeMetadata(t,r,n){return no(this.configuration).getRecipeMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}listRecipeMetadata(t,r){return no(this.configuration).listRecipeMetadata(t,r).then(n=>n(this.axios,this.basePath))}updateRecipeMetadata(t,r,n,a){return no(this.configuration).updateRecipeMetadata(t,r,n,a).then(o=>o(this.axios,this.basePath))}uploadRecipeMetadataImage(t,r,n,a){return no(this.configuration).uploadRecipeMetadataImage(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const oV=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={};k(s,e),await U(i,e),D(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),l["Content-Type"]="application/json",D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:L(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={};k(c,e),await U(u,e),n!==void 0&&(d.sample_time=n),a!==void 0&&(d.responses_coordinate_system=a),D(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},{url:L(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={};k(c,e),await U(u,e),n!==void 0&&(d.location_on_trajectory=n),a!==void 0&&(d.response_coordinate_system=a),D(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},{url:L(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={};k(l,e),await U(c,e),n!==void 0&&(u.sample_time=n),D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:L(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={};k(s,e),await U(i,e),D(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:L(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={};k(s,e),await U(i,e),D(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:L(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={};k(i,e),await U(l,e),l["Content-Type"]="application/json",D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:L(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={};k(i,e),await U(l,e),l["Content-Type"]="application/json",D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:L(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={};k(i,e),await U(l,e),l["Content-Type"]="application/json",D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:L(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={};k(i,e),await U(l,e),l["Content-Type"]="application/json",D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),l["Content-Type"]="application/json",D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:L(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={};k(d,e),await U(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),D(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:L(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={};k(d,e),await U(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),D(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:L(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},y={},S={};k(m,e),await U(y,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),D(p,S);let E=f&&f.headers?f.headers:{};return m.headers={...y,...E,...d.headers},{url:L(p),options:m}}}},Ye=function(e){const t=oV(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=j["MotionApi.deleteAllMotions"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["MotionApi.deleteMotion"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionApi.executeTrajectory"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionApi.getMotionTrajectory"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,V,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=j["MotionApi.getMotionTrajectorySample"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,V,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=j["MotionApi.getPlannedMotion"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["MotionApi.getPlanningMotionGroupModels"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["MotionApi.listMotions"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["MotionApi.loadPlannedMotion"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionApi.planCollisionFreePTP"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionApi.planMotion"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionApi.planTrajectory"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionApi.stopExecution"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionApi.streamMove"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionApi.streamMoveBackward"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>B(c,V,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=j["MotionApi.streamMoveForward"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>B(c,V,M,e)(f,d||m)},async streamMoveToTrajectoryViaJointPTP(r,n,a,o,s,i,l,c,u,d,h){var y,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=(y=j["MotionApi.streamMoveToTrajectoryViaJointPTP"])==null?void 0:y[f])==null?void 0:S.url;return(E,O)=>B(p,V,M,e)(E,m||O)}}};class sV extends Ve{deleteAllMotions(t,r){return Ye(this.configuration).deleteAllMotions(t,r).then(n=>n(this.axios,this.basePath))}deleteMotion(t,r,n){return Ye(this.configuration).deleteMotion(t,r,n).then(a=>a(this.axios,this.basePath))}executeTrajectory(t,r,n){return Ye(this.configuration).executeTrajectory(t,r,n).then(a=>a(this.axios,this.basePath))}getMotionTrajectory(t,r,n,a,o){return Ye(this.configuration).getMotionTrajectory(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}getMotionTrajectorySample(t,r,n,a,o){return Ye(this.configuration).getMotionTrajectorySample(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}getPlannedMotion(t,r,n,a){return Ye(this.configuration).getPlannedMotion(t,r,n,a).then(o=>o(this.axios,this.basePath))}getPlanningMotionGroupModels(t,r){return Ye(this.configuration).getPlanningMotionGroupModels(t,r).then(n=>n(this.axios,this.basePath))}listMotions(t,r){return Ye(this.configuration).listMotions(t,r).then(n=>n(this.axios,this.basePath))}loadPlannedMotion(t,r,n){return Ye(this.configuration).loadPlannedMotion(t,r,n).then(a=>a(this.axios,this.basePath))}planCollisionFreePTP(t,r,n){return Ye(this.configuration).planCollisionFreePTP(t,r,n).then(a=>a(this.axios,this.basePath))}planMotion(t,r,n){return Ye(this.configuration).planMotion(t,r,n).then(a=>a(this.axios,this.basePath))}planTrajectory(t,r,n){return Ye(this.configuration).planTrajectory(t,r,n).then(a=>a(this.axios,this.basePath))}stopExecution(t,r,n){return Ye(this.configuration).stopExecution(t,r,n).then(a=>a(this.axios,this.basePath))}streamMove(t,r,n){return Ye(this.configuration).streamMove(t,r,n).then(a=>a(this.axios,this.basePath))}streamMoveBackward(t,r,n,a,o,s,i){return Ye(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 Ye(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 Ye(this.configuration).streamMoveToTrajectoryViaJointPTP(t,r,n,a,o,s,i,l,c,u,d).then(h=>h(this.axios,this.basePath))}}const iV=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={};k(i,e),await U(l,e),r!==void 0&&(c.controller=r),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),r!==void 0&&(c.motion_group=r),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(s,e),await U(i,e),D(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:L(a),options:s}}}},ao=function(e){const t=iV(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=j["MotionGroupApi.activateAllMotionGroups"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionGroupApi.activateMotionGroup"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionGroupApi.deactivateMotionGroup"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionGroupApi.listMotionGroups"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,M,e)(c,s||u)}}};class lV extends Ve{activateAllMotionGroups(t,r,n){return ao(this.configuration).activateAllMotionGroups(t,r,n).then(a=>a(this.axios,this.basePath))}activateMotionGroup(t,r,n){return ao(this.configuration).activateMotionGroup(t,r,n).then(a=>a(this.axios,this.basePath))}deactivateMotionGroup(t,r,n){return ao(this.configuration).deactivateMotionGroup(t,r,n).then(a=>a(this.axios,this.basePath))}listMotionGroups(t,r){return ao(this.configuration).listMotionGroups(t,r).then(n=>n(this.axios,this.basePath))}}const cV=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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(l,e),await U(c,e),n!==void 0&&(u.rotation_type=n),D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:L(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={};k(c,e),await U(u,e),n!==void 0&&(d.tcp=n),a!==void 0&&(d.response_coordinate_system=a),D(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(l,e),await U(c,e),n!==void 0&&(u.tcp=n),D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(l,e),await U(c,e),n!==void 0&&(u.rotation_type=n),D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:L(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={};k(u,e),await U(d,e),n!==void 0&&(h.response_rate=n),a!==void 0&&(h.response_coordinate_system=a),o!==void 0&&(h.tcp=o),D(l,h);let p=c&&c.headers?c.headers:{};return u.headers={...d,...p,...s.headers},{url:L(l),options:u}}}},St=function(e){const t=cV(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=j["MotionGroupInfosApi.getActivePayload"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionGroupInfosApi.getActiveTcp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["MotionGroupInfosApi.getCurrentMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,V,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=j["MotionGroupInfosApi.getInfoCapabilities"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionGroupInfosApi.getMotionGroupSpecification"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionGroupInfosApi.getMounting"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionGroupInfosApi.getOptimizerConfiguration"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["MotionGroupInfosApi.getSafetySetup"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionGroupInfosApi.listPayloads"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionGroupInfosApi.listTcps"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["MotionGroupInfosApi.streamMotionGroupState"])==null?void 0:d[c])==null?void 0:h.url;return(p,f)=>B(l,V,M,e)(p,u||f)}}};class uV extends Ve{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 dV=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={};k(i,e),await U(l,e),l["Content-Type"]="application/json",D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),l["Content-Type"]="application/json",D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(o),options:i}}}},oo=function(e){const t=dV(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=j["MotionGroupJoggingApi.directionJogging"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionGroupJoggingApi.getJoggingCapabilities"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionGroupJoggingApi.jointJogging"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["MotionGroupJoggingApi.stopJogging"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,M,e)(u,i||d)}}};class hV extends Ve{directionJogging(t,r,n){return oo(this.configuration).directionJogging(t,r,n).then(a=>a(this.axios,this.basePath))}getJoggingCapabilities(t,r,n){return oo(this.configuration).getJoggingCapabilities(t,r,n).then(a=>a(this.axios,this.basePath))}jointJogging(t,r,n){return oo(this.configuration).jointJogging(t,r,n).then(a=>a(this.axios,this.basePath))}stopJogging(t,r,n){return oo(this.configuration).stopJogging(t,r,n).then(a=>a(this.axios,this.basePath))}}const pV=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={};k(l,e),await U(c,e),c["Content-Type"]="application/json",D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:L(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={};k(l,e),await U(c,e),c["Content-Type"]="application/json",D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:L(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={};k(l,e),await U(c,e),c["Content-Type"]="application/json",D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(o),options:i}}}},so=function(e){const t=pV(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=j["MotionGroupKinematicApi.calculateAllInverseKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["MotionGroupKinematicApi.calculateForwardKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["MotionGroupKinematicApi.calculateInverseKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["MotionGroupKinematicApi.getKinematicCapabilities"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,M,e)(u,i||d)}}};class mV extends Ve{calculateAllInverseKinematic(t,r,n,a){return so(this.configuration).calculateAllInverseKinematic(t,r,n,a).then(o=>o(this.axios,this.basePath))}calculateForwardKinematic(t,r,n,a){return so(this.configuration).calculateForwardKinematic(t,r,n,a).then(o=>o(this.axios,this.basePath))}calculateInverseKinematic(t,r,n,a){return so(this.configuration).calculateInverseKinematic(t,r,n,a).then(o=>o(this.axios,this.basePath))}getKinematicCapabilities(t,r,n){return so(this.configuration).getKinematicCapabilities(t,r,n).then(a=>a(this.axios,this.basePath))}}const fV=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={};k(i,e),await U(l,e),l["Content-Type"]="text/plain",D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:L(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={};k(i,e),await U(l,e),l["Content-Type"]="application/json",D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(s,e),await U(i,e),D(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:L(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={};k(i,e),await U(l,e),l["Content-Type"]="text/plain",D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:L(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={};k(l,e),await U(c,e),n!==void 0&&(u.identifier=n),c["Content-Type"]="text/plain",D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(r,l,e),{url:L(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={};k(s,e),await U(i,e),D(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(o),options:i}}}},rr=function(e){const t=fV(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=j["ProgramApi.createProgramRunner"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ProgramApi.executeProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ProgramApi.getProgramRunner"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ProgramApi.listProgramRunners"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["ProgramApi.migrateProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ProgramApi.planProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["ProgramApi.stopAllProgramRunner"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["ProgramApi.stopProgramRunner"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,M,e)(u,i||d)}}};class gV extends Ve{createProgramRunner(t,r,n){return rr(this.configuration).createProgramRunner(t,r,n).then(a=>a(this.axios,this.basePath))}executeProgram(t,r,n){return rr(this.configuration).executeProgram(t,r,n).then(a=>a(this.axios,this.basePath))}getProgramRunner(t,r,n){return rr(this.configuration).getProgramRunner(t,r,n).then(a=>a(this.axios,this.basePath))}listProgramRunners(t,r){return rr(this.configuration).listProgramRunners(t,r).then(n=>n(this.axios,this.basePath))}migrateProgram(t,r,n){return rr(this.configuration).migrateProgram(t,r,n).then(a=>a(this.axios,this.basePath))}planProgram(t,r,n,a){return rr(this.configuration).planProgram(t,r,n,a).then(o=>o(this.axios,this.basePath))}stopAllProgramRunner(t,r){return rr(this.configuration).stopAllProgramRunner(t,r).then(n=>n(this.axios,this.basePath))}stopProgramRunner(t,r,n){return rr(this.configuration).stopProgramRunner(t,r,n).then(a=>a(this.axios,this.basePath))}}const yV=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={};k(s,e),await U(i,e),D(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:L(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={};k(i,e),await U(l,e),l["Content-Type"]="application/json",D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(s,e),await U(i,e),D(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:L(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={};k(l,e),await U(c,e),c["Content-Type"]="application/json",D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:L(s),options:l}}}},Xr=function(e){const t=yV(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=j["ProgramValuesApi.clearProgramsValues"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["ProgramValuesApi.createProgramsValue"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ProgramValuesApi.deleteProgramValue"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ProgramValuesApi.getProgramValue"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["ProgramValuesApi.listProgramsValues"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["ProgramValuesApi.updateProgramValue"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,M,e)(d,l||h)}}};class bV extends Ve{clearProgramsValues(t,r){return Xr(this.configuration).clearProgramsValues(t,r).then(n=>n(this.axios,this.basePath))}createProgramsValue(t,r,n){return Xr(this.configuration).createProgramsValue(t,r,n).then(a=>a(this.axios,this.basePath))}deleteProgramValue(t,r,n){return Xr(this.configuration).deleteProgramValue(t,r,n).then(a=>a(this.axios,this.basePath))}getProgramValue(t,r,n){return Xr(this.configuration).getProgramValue(t,r,n).then(a=>a(this.axios,this.basePath))}listProgramsValues(t,r){return Xr(this.configuration).listProgramsValues(t,r).then(n=>n(this.axios,this.basePath))}updateProgramValue(t,r,n,a){return Xr(this.configuration).updateProgramValue(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const xV=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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(s,e),await U(i,e),D(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:L(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={};k(s,e),await U(i,e),D(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:L(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={};k(s,e),await U(i,e),D(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:L(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={};k(l,e),await U(c,e),c["Content-Type"]="application/json",D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:L(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={};k(l,e),await U(c,e),c["Content-Type"]="application/json",D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:L(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={};k(l,e),await U(c,e),c["Content-Type"]="application/json",D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:L(s),options:l}}}},ut=function(e){const t=xV(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=j["StoreCollisionComponentsApi.deleteStoredCollider"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["StoreCollisionComponentsApi.deleteStoredCollisionLinkChain"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["StoreCollisionComponentsApi.deleteStoredCollisionTool"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["StoreCollisionComponentsApi.getDefaultLinkChain"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["StoreCollisionComponentsApi.getStoredCollider"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["StoreCollisionComponentsApi.getStoredCollisionLinkChain"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["StoreCollisionComponentsApi.getStoredCollisionTool"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["StoreCollisionComponentsApi.listCollisionLinkChains"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["StoreCollisionComponentsApi.listStoredColliders"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["StoreCollisionComponentsApi.listStoredCollisionTools"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["StoreCollisionComponentsApi.storeCollider"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["StoreCollisionComponentsApi.storeCollisionLinkChain"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["StoreCollisionComponentsApi.storeCollisionTool"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,M,e)(d,l||h)}}};class vV extends Ve{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 SV=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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(s,e),await U(i,e),D(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:L(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={};k(l,e),await U(c,e),c["Content-Type"]="application/json",D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:L(s),options:l}}}},io=function(e){const t=SV(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=j["StoreCollisionScenesApi.deleteStoredCollisionScene"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["StoreCollisionScenesApi.getStoredCollisionScene"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["StoreCollisionScenesApi.listStoredCollisionScenes"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["StoreCollisionScenesApi.storeCollisionScene"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,M,e)(d,l||h)}}};class OV extends Ve{deleteStoredCollisionScene(t,r,n){return io(this.configuration).deleteStoredCollisionScene(t,r,n).then(a=>a(this.axios,this.basePath))}getStoredCollisionScene(t,r,n){return io(this.configuration).getStoredCollisionScene(t,r,n).then(a=>a(this.axios,this.basePath))}listStoredCollisionScenes(t,r){return io(this.configuration).listStoredCollisionScenes(t,r).then(n=>n(this.axios,this.basePath))}storeCollisionScene(t,r,n,a){return io(this.configuration).storeCollisionScene(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const wV=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={};k(s,e),await U(i,e),D(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(s,e),await U(i,e),D(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:L(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);k(c,e),await U(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)),D(i,d);let p=l&&l.headers?l.headers:{};return c.headers={...u,...p,...o.headers},c.data=h,{url:L(i),options:c}}}},Zr=function(e){const t=wV(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=j["StoreObjectApi.clearAllObjects"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["StoreObjectApi.deleteObject"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["StoreObjectApi.getObject"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["StoreObjectApi.getObjectMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["StoreObjectApi.listAllObjectKeys"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["StoreObjectApi.storeObject"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,V,M,e)(h,c||p)}}};class CV extends Ve{clearAllObjects(t,r){return Zr(this.configuration).clearAllObjects(t,r).then(n=>n(this.axios,this.basePath))}deleteObject(t,r,n){return Zr(this.configuration).deleteObject(t,r,n).then(a=>a(this.axios,this.basePath))}getObject(t,r,n){return Zr(this.configuration).getObject(t,r,n).then(a=>a(this.axios,this.basePath))}getObjectMetadata(t,r,n){return Zr(this.configuration).getObjectMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}listAllObjectKeys(t,r){return Zr(this.configuration).listAllObjectKeys(t,r).then(n=>n(this.axios,this.basePath))}storeObject(t,r,n,a,o){return Zr(this.configuration).storeObject(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}const PV=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={};k(s,e),await U(i,e),t!==void 0&&(l.channel=t),D(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:L(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={};k(o,e),await U(s,e),D(n,i);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...t.headers},{url:L(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={};k(o,e),await U(s,e),D(n,i);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...t.headers},{url:L(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={};k(o,e),await U(s,e),D(n,i);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...t.headers},{url:L(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={};k(s,e),await U(i,e),i["Content-Type"]="application/json",D(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},s.data=de(t,s,e),{url:L(a),options:s}}}},Xn=function(e){const t=PV(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=j["SystemApi.checkNovaVersionUpdate"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,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=j["SystemApi.getDiagnosePackage"])==null?void 0:s[a])==null?void 0:i.url;return(l,c)=>B(n,V,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=j["SystemApi.getSystemStatus"])==null?void 0:s[a])==null?void 0:i.url;return(l,c)=>B(n,V,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=j["SystemApi.getSystemVersion"])==null?void 0:s[a])==null?void 0:i.url;return(l,c)=>B(n,V,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=j["SystemApi.updateNovaVersion"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>B(a,V,M,e)(c,s||u)}}};class TV extends Ve{checkNovaVersionUpdate(t,r){return Xn(this.configuration).checkNovaVersionUpdate(t,r).then(n=>n(this.axios,this.basePath))}getDiagnosePackage(t){return Xn(this.configuration).getDiagnosePackage(t).then(r=>r(this.axios,this.basePath))}getSystemStatus(t){return Xn(this.configuration).getSystemStatus(t).then(r=>r(this.axios,this.basePath))}getSystemVersion(t){return Xn(this.configuration).getSystemVersion(t).then(r=>r(this.axios,this.basePath))}updateNovaVersion(t,r){return Xn(this.configuration).updateNovaVersion(t,r).then(n=>n(this.axios,this.basePath))}}const RV=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={};k(l,e),await U(c,e),D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(l,e),await U(c,e),D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(c,e),await U(u,e),u["Content-Type"]="application/json",D(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},c.data=de(a,c,e),{url:L(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={};k(d,e),await U(h,e),a!==void 0&&(p.bool=a),o!==void 0&&(p.integer=o),s!==void 0&&(p.double=s),D(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:L(c),options:d}}}},en=function(e){const t=RV(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=j["VirtualRobotApi.getMotionGroupState"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["VirtualRobotApi.getMotionGroups"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["VirtualRobotApi.getVirtualRobotIOValue"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["VirtualRobotApi.listIOs"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["VirtualRobotApi.setMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,V,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=j["VirtualRobotApi.setVirtualRobotIOValue"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>B(c,V,M,e)(f,d||m)}}};class AV extends Ve{getMotionGroupState(t,r,n,a){return en(this.configuration).getMotionGroupState(t,r,n,a).then(o=>o(this.axios,this.basePath))}getMotionGroups(t,r,n){return en(this.configuration).getMotionGroups(t,r,n).then(a=>a(this.axios,this.basePath))}getVirtualRobotIOValue(t,r,n,a){return en(this.configuration).getVirtualRobotIOValue(t,r,n,a).then(o=>o(this.axios,this.basePath))}listIOs(t,r,n){return en(this.configuration).listIOs(t,r,n).then(a=>a(this.axios,this.basePath))}setMotionGroupState(t,r,n,a,o){return en(this.configuration).setMotionGroupState(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}setVirtualRobotIOValue(t,r,n,a,o,s,i){return en(this.configuration).setVirtualRobotIOValue(t,r,n,a,o,s,i).then(l=>l(this.axios,this.basePath))}}const _V=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={};k(l,e),await U(c,e),c["Content-Type"]="application/json",D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:L(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={};k(l,e),await U(c,e),D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:L(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={};k(c,e),await U(u,e),a!==void 0&&(d.behavior=a),D(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},{url:L(i),options:c}}}},Ii=function(e){const t=_V(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=j["VirtualRobotBehaviorApi.externalJointsStream"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["VirtualRobotBehaviorApi.getMotionGroupBehavior"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["VirtualRobotBehaviorApi.setMotionGroupBehavior"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,V,M,e)(h,c||p)}}};class EV extends Ve{externalJointsStream(t,r,n,a){return Ii(this.configuration).externalJointsStream(t,r,n,a).then(o=>o(this.axios,this.basePath))}getMotionGroupBehavior(t,r,n,a){return Ii(this.configuration).getMotionGroupBehavior(t,r,n,a).then(o=>o(this.axios,this.basePath))}setMotionGroupBehavior(t,r,n,a,o){return Ii(this.configuration).setMotionGroupBehavior(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}const VV=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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(l,e),await U(c,e),n!==void 0&&(u.mode=n),D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:L(s),options:l}}}},tn=function(e){const t=VV(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=j["VirtualRobotModeApi.getCycleTime"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["VirtualRobotModeApi.getEStop"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["VirtualRobotModeApi.getOperationMode"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["VirtualRobotModeApi.pushEStop"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["VirtualRobotModeApi.releaseEStop"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["VirtualRobotModeApi.setOperationMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,M,e)(d,l||h)}}};class IV extends Ve{getCycleTime(t,r,n){return tn(this.configuration).getCycleTime(t,r,n).then(a=>a(this.axios,this.basePath))}getEStop(t,r,n){return tn(this.configuration).getEStop(t,r,n).then(a=>a(this.axios,this.basePath))}getOperationMode(t,r,n){return tn(this.configuration).getOperationMode(t,r,n).then(a=>a(this.axios,this.basePath))}pushEStop(t,r,n){return tn(this.configuration).pushEStop(t,r,n).then(a=>a(this.axios,this.basePath))}releaseEStop(t,r,n){return tn(this.configuration).releaseEStop(t,r,n).then(a=>a(this.axios,this.basePath))}setOperationMode(t,r,n,a){return tn(this.configuration).setOperationMode(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const MV=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={};k(l,e),await U(c,e),c["Content-Type"]="application/json",D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:L(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={};k(c,e),await U(u,e),u["Content-Type"]="application/json",D(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},c.data=de(a,c,e),{url:L(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={};k(c,e),await U(u,e),a!==void 0&&(d.delete_dependent=a),D(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},{url:L(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={};k(c,e),await U(u,e),D(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},{url:L(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={};k(l,e),await U(c,e),D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:L(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={};k(i,e),await U(l,e),D(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:L(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={};k(l,e),await U(c,e),D(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:L(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={};k(c,e),await U(u,e),u["Content-Type"]="application/json",D(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},c.data=de(a,c,e),{url:L(i),options:c}}}},nr=function(e){const t=MV(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=j["VirtualRobotSetupApi.addVirtualRobotCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["VirtualRobotSetupApi.addVirtualRobotTcp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,V,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=j["VirtualRobotSetupApi.deleteVirtualRobotCoordinateSystem"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,V,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=j["VirtualRobotSetupApi.deleteVirtualRobotTcp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,V,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=j["VirtualRobotSetupApi.getVirtualRobotMounting"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["VirtualRobotSetupApi.listVirtualRobotCoordinateSystems"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>B(o,V,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=j["VirtualRobotSetupApi.listVirtualRobotTcps"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(s,V,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=j["VirtualRobotSetupApi.setVirtualRobotMounting"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,V,M,e)(h,c||p)}}};class jV extends Ve{addVirtualRobotCoordinateSystem(t,r,n,a){return nr(this.configuration).addVirtualRobotCoordinateSystem(t,r,n,a).then(o=>o(this.axios,this.basePath))}addVirtualRobotTcp(t,r,n,a,o){return nr(this.configuration).addVirtualRobotTcp(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}deleteVirtualRobotCoordinateSystem(t,r,n,a,o){return nr(this.configuration).deleteVirtualRobotCoordinateSystem(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}deleteVirtualRobotTcp(t,r,n,a,o){return nr(this.configuration).deleteVirtualRobotTcp(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}getVirtualRobotMounting(t,r,n,a){return nr(this.configuration).getVirtualRobotMounting(t,r,n,a).then(o=>o(this.axios,this.basePath))}listVirtualRobotCoordinateSystems(t,r,n){return nr(this.configuration).listVirtualRobotCoordinateSystems(t,r,n).then(a=>a(this.axios,this.basePath))}listVirtualRobotTcps(t,r,n,a){return nr(this.configuration).listVirtualRobotTcps(t,r,n,a).then(o=>o(this.axios,this.basePath))}setVirtualRobotMounting(t,r,n,a,o){return nr(this.configuration).setVirtualRobotMounting(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}function Bt(e,t,r){return Math.max(t,Math.min(r,e))}class $V{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 y=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 T=Math.sqrt(O),P=Math.atan2(T,S*E);y=Math.sin(y*P)/T,i=Math.sin(i*P)/T}const C=i*E;if(l=l*y+h*C,c=c*y+p*C,u=u*y+f*C,d=d*y+m*C,y===1-i){const T=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=T,c*=T,u*=T,d*=T}}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(Bt(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 hn{constructor(t=0,r=0,n=0){hn.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(Zd.setFromEuler(t))}applyAxisAngle(t,r){return this.applyQuaternion(Zd.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=Bt(this.x,t.x,r.x),this.y=Bt(this.y,t.y,r.y),this.z=Bt(this.z,t.z,r.z),this}clampScalar(t,r){return this.x=Bt(this.x,t,r),this.y=Bt(this.y,t,r),this.z=Bt(this.z,t,r),this}clampLength(t,r){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Bt(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 Mi.copy(this).projectOnVector(t),this.sub(Mi)}reflect(t){return this.sub(Mi.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(Bt(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 Mi=new hn,Zd=new $V;function kV(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 ji(){var e;return typeof arguments[0]=="object"?e=arguments[0]:e=[].slice.call(arguments),kV(e)}var Vt={},eh;function UV(){if(eh)return Vt;eh=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.TokenData=void 0,Vt.parse=d,Vt.compile=h,Vt.match=m,Vt.pathToRegexp=y,Vt.stringify=C;const e="/",t=w=>w,r=/^[$_\p{ID_Start}]$/u,n=/^[$\u200c\u200d\p{ID_Continue}]$/u,a="https://git.new/pathToRegexpError",o={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function s(w){return w.replace(/[{}()\[\]+?!:*]/g,"\\$&")}function i(w){return w.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}function*l(w){const I=[...w];let z=0;function b(){let A="";if(r.test(I[++z]))for(A+=I[z];n.test(I[++z]);)A+=I[z];else if(I[z]==='"'){let G=z;for(;z<I.length;){if(I[++z]==='"'){z++,G=0;break}I[z]==="\\"?A+=I[++z]:A+=I[z]}if(G)throw new TypeError(`Unterminated quote at ${G}: ${a}`)}if(!A)throw new TypeError(`Missing parameter name at ${z}: ${a}`);return A}for(;z<I.length;){const A=I[z],G=o[A];if(G)yield{type:G,index:z++,value:A};else if(A==="\\")yield{type:"ESCAPED",index:z++,value:I[z++]};else if(A===":"){const _=b();yield{type:"PARAM",index:z,value:_}}else if(A==="*"){const _=b();yield{type:"WILDCARD",index:z,value:_}}else yield{type:"CHAR",index:z,value:I[z++]}}return{type:"END",index:z,value:""}}class c{constructor(I){this.tokens=I}peek(){if(!this._peek){const I=this.tokens.next();this._peek=I.value}return this._peek}tryConsume(I){const z=this.peek();if(z.type===I)return this._peek=void 0,z.value}consume(I){const z=this.tryConsume(I);if(z!==void 0)return z;const{type:b,index:A}=this.peek();throw new TypeError(`Unexpected ${b} at ${A}, expected ${I}: ${a}`)}text(){let I="",z;for(;z=this.tryConsume("CHAR")||this.tryConsume("ESCAPED");)I+=z;return I}}class u{constructor(I){this.tokens=I}}Vt.TokenData=u;function d(w,I={}){const{encodePath:z=t}=I,b=new c(l(w));function A(_){const F=[];for(;;){const re=b.text();re&&F.push({type:"text",value:z(re)});const ee=b.tryConsume("PARAM");if(ee){F.push({type:"param",name:ee});continue}const ae=b.tryConsume("WILDCARD");if(ae){F.push({type:"wildcard",name:ae});continue}if(b.tryConsume("{")){F.push({type:"group",tokens:A("}")});continue}return b.consume(_),F}}const G=A("END");return new u(G)}function h(w,I={}){const{encode:z=encodeURIComponent,delimiter:b=e}=I,A=w instanceof u?w:d(w,I),G=p(A.tokens,b,z);return function(F={}){const[re,...ee]=G(F);if(ee.length)throw new TypeError(`Missing parameters: ${ee.join(", ")}`);return re}}function p(w,I,z){const b=w.map(A=>f(A,I,z));return A=>{const G=[""];for(const _ of b){const[F,...re]=_(A);G[0]+=F,G.push(...re)}return G}}function f(w,I,z){if(w.type==="text")return()=>[w.value];if(w.type==="group"){const A=p(w.tokens,I,z);return G=>{const[_,...F]=A(G);return F.length?[""]:[_]}}const b=z||t;return w.type==="wildcard"&&z!==!1?A=>{const G=A[w.name];if(G==null)return["",w.name];if(!Array.isArray(G)||G.length===0)throw new TypeError(`Expected "${w.name}" to be a non-empty array`);return[G.map((_,F)=>{if(typeof _!="string")throw new TypeError(`Expected "${w.name}/${F}" to be a string`);return b(_)}).join(I)]}:A=>{const G=A[w.name];if(G==null)return["",w.name];if(typeof G!="string")throw new TypeError(`Expected "${w.name}" to be a string`);return[b(G)]}}function m(w,I={}){const{decode:z=decodeURIComponent,delimiter:b=e}=I,{regexp:A,keys:G}=y(w,I),_=G.map(F=>z===!1?t:F.type==="param"?z:re=>re.split(b).map(z));return function(re){const ee=A.exec(re);if(!ee)return!1;const ae=ee[0],te=Object.create(null);for(let se=1;se<ee.length;se++){if(ee[se]===void 0)continue;const W=G[se-1],X=_[se-1];te[W.name]=X(ee[se])}return{path:ae,params:te}}}function y(w,I={}){const{delimiter:z=e,end:b=!0,sensitive:A=!1,trailing:G=!0}=I,_=[],F=[],re=A?"":"i",ae=(Array.isArray(w)?w:[w]).map(W=>W instanceof u?W:d(W,I));for(const{tokens:W}of ae)for(const X of S(W,0,[])){const ue=E(X,z,_);F.push(ue)}let te=`^(?:${F.join("|")})`;return G&&(te+=`(?:${i(z)}$)?`),te+=b?"$":`(?=${i(z)}|$)`,{regexp:new RegExp(te,re),keys:_}}function*S(w,I,z){if(I===w.length)return yield z;const b=w[I];if(b.type==="group"){const A=z.slice();for(const G of S(b.tokens,0,A))yield*S(w,I+1,G)}else z.push(b);yield*S(w,I+1,z)}function E(w,I,z){let b="",A="",G=!0;for(let _=0;_<w.length;_++){const F=w[_];if(F.type==="text"){b+=i(F.value),A+=F.value,G||(G=F.value.includes(I));continue}if(F.type==="param"||F.type==="wildcard"){if(!G&&!A)throw new TypeError(`Missing text after "${F.name}": ${a}`);F.type==="param"?b+=`(${O(I,G?"":A)}+)`:b+="([\\s\\S]+)",z.push(F),A="",G=!1;continue}}return b}function O(w,I){return I.length<2?w.length<2?`[^${i(w+I)}]`:`(?:(?!${i(w)})[^${i(I)}])`:w.length<2?`(?:(?!${i(I)})[^${i(w)}])`:`(?:(?!${i(I)}|${i(w)})[\\s\\S])`}function C(w){return w.tokens.map(function I(z,b,A){if(z.type==="text")return s(z.value);if(z.type==="group")return`{${z.tokens.map(I).join("")}}`;const _=T(z.name)&&P(A[b+1])?z.name:JSON.stringify(z.name);if(z.type==="param")return`:${_}`;if(z.type==="wildcard")return`*${_}`;throw new TypeError(`Unexpected token: ${z}`)}).join("")}function T(w){const[I,...z]=w;return r.test(I)?z.every(b=>n.test(b)):!1}function P(w){return(w==null?void 0:w.type)!=="text"?!0:!n.test(w.value[0])}return Vt}var DV=UV();function gf(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 yf(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 th=1e-4,LV=class bf{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=ir(p.data))==null?void 0:f.result;m&&je.runInAction(()=>{this.controllerState=m})}),o.addEventListener("message",p=>{var f;const m=(f=ir(p.data))==null?void 0:f.result;if(!m)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${p.data}`);gf(this.rapidlyChangingMotionState.state.joint_position.joints,m.state.joint_position.joints,th)||je.runInAction(()=>{this.rapidlyChangingMotionState.state=m.state}),yf(this.rapidlyChangingMotionState.tcp_pose,m.tcp_pose,th)||je.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose=m.tcp_pose})}),je.makeAutoObservable(this)}static connect(t,r,n){return Ee(this,null,function*(){var a,o;const[s,i]=r.split("@"),l=n.find(P=>P.controller===i),c=l==null?void 0:l.physical_motion_groups.find(P=>P.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=ir(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
151
  `,h);const f=(yield t.api.controller.getRobotController(l.controller)).configuration.kind==="VirtualController",m=yield Ee(this,null,function*(){try{return yield t.api.motionGroupInfos.getMounting(c.motion_group)}catch(P){return console.error(`Error fetching mounting for ${c.motion_group}`,P),null}}),y=t.openReconnectingWebsocket(`/controllers/${l.controller}/state-stream?response_rate=1000`),S=yield y.firstMessage(),E=(o=ir(S.data))==null?void 0:o.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),T=yield t.api.motionGroupInfos.getSafetySetup(r);return new bf(t,l,c,h,u,f,O,w,T,m,E,y)})}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 Le.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 Le.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 Ee(this,null,function*(){if(this.activationState!=="active"){console.error("Tried to deactivate while already deactivating");return}je.runInAction(()=>{this.activationState="deactivating"});try{yield this.nova.api.controller.setDefaultMode(this.controllerId,"MODE_MONITOR"),je.runInAction(()=>{this.activationState="inactive"})}catch(t){throw je.runInAction(()=>{this.activationState="active"}),t}})}activate(){return Ee(this,null,function*(){if(this.activationState!=="inactive"){console.error("Tried to activate while already activating");return}je.runInAction(()=>{this.activationState="activating"});try{yield this.nova.api.controller.setDefaultMode(this.controllerId,"MODE_CONTROL"),je.runInAction(()=>{this.activationState="active"})}catch(t){throw je.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}},BV=class xf{constructor(t,r={}){this.motionStream=t,this.opts=r,this.cartesianWebsocket=null,this.jointWebsocket=null,this.cartesianJoggingOpts={}}static open(t,r){return Ee(this,arguments,function*(n,a,o={}){const s=yield n.connectMotionStream(a);return new xf(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 Ee(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&&(GA(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=ir(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=ir(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 Ee(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 Ee(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 Ee(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 Ee(this,arguments,function*({currentTcpPose:r,currentJoints:n,coordSystemId:a,velocityInRelevantUnits:o,axis:s,direction:i,motion:l}){var c;const u=[];if(!s_(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 hn(r.orientation.x,r.orientation.y,r.orientation.z),f=p.length(),m=p.clone().normalize(),y=l.distanceRads*(i==="-"?-1:1),S=new hn(0,0,0);S[s]=1;const E=Math.cos(.5*y)*Math.cos(.5*f),O=Math.sin(.5*y)*Math.sin(.5*f),w=Math.sin(.5*y)*Math.cos(.5*f),T=Math.cos(.5*y)*Math.sin(.5*f),P=S.dot(m),C=S.clone().cross(m),I=2*Math.acos(E-O*P),z=I/Math.sin(.5*I),b=new hn().addScaledVector(C,O).addScaledVector(S,w).addScaledVector(m,T).multiplyScalar(z);u.push({settings:{limits_override:{tcp_orientation_velocity_limit:o}},line:{position:r.position,orientation:b,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 Ee(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})})}},rh=1e-4;function NV(e,t){const r=new St.Vector3(t.x,t.y,t.z),n=new St.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 FV=class vf{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=ir(s.data))==null?void 0:i.result;if(!l)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${s.data}`);gf(this.rapidlyChangingMotionState.state.joint_position.joints,l.state.joint_position.joints,rh)||je.runInAction(()=>{this.rapidlyChangingMotionState.state=l.state}),yf(this.rapidlyChangingMotionState.tcp_pose,l.tcp_pose,rh)||je.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose==null?this.rapidlyChangingMotionState.tcp_pose=l.tcp_pose:this.rapidlyChangingMotionState.tcp_pose={position:l.tcp_pose.position,orientation:NV(l.tcp_pose.orientation,this.rapidlyChangingMotionState.tcp_pose.orientation),tcp:l.tcp_pose.tcp,coordinate_system:l.tcp_pose.coordinate_system}})}),je.makeAutoObservable(this)}static open(t,r){return Ee(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=ir(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 vf(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()}},zV=class{constructor(e,t){this.cellId=e,this.opts=t,this.system=this.withUnwrappedResponsesOnly(TV),this.cell=this.withUnwrappedResponsesOnly(FE),this.deviceConfig=this.withCellId(KE),this.motionGroup=this.withCellId(lV),this.motionGroupInfos=this.withCellId(uV),this.controller=this.withCellId(GE),this.program=this.withCellId(gV),this.programValues=this.withCellId(bV),this.controllerIOs=this.withCellId(qE),this.motionGroupKinematic=this.withCellId(mV),this.motion=this.withCellId(sV),this.coordinateSystems=this.withCellId(JE),this.application=this.withCellId(Xd),this.applicationGlobal=this.withUnwrappedResponsesOnly(Xd),this.motionGroupJogging=this.withCellId(hV),this.virtualRobot=this.withCellId(AV),this.virtualRobotSetup=this.withCellId(jV),this.virtualRobotMode=this.withCellId(IV),this.virtualRobotBehavior=this.withCellId(EV),this.libraryProgramMetadata=this.withCellId(eV),this.libraryProgram=this.withCellId(XE),this.libraryRecipeMetadata=this.withCellId(aV),this.libraryRecipe=this.withCellId(rV),this.storeObject=this.withCellId(CV),this.storeCollisionComponents=this.withCellId(vV),this.storeCollisionScenes=this.withCellId(OV)}withCellId(e){var t,r;const n=new e(cl(on({},this.opts),{isJsonMime:a=>a==="application/json"}),(t=this.opts.basePath)!=null?t:"",(r=this.opts.axiosInstance)!=null?r:V.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(cl(on({},this.opts),{isJsonMime:a=>a==="application/json"}),(t=this.opts.basePath)!=null?t:"",(r=this.opts.axiosInstance)!=null?r:V.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}},GV=class{constructor(){this.connections=[]}handleAPIRequest(e){return Ee(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=LV.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 gl(`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(HV)})),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)}},HV={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"}}},qV=class{constructor(e){this.authPromise=null,this.accessToken=null;var t;const r=(t=e.cellId)!=null?t:"cell";this.config=on({cellId:r},e),this.accessToken=e.accessToken||Ri.getString("wbjs.access_token")||null,this.config.instanceUrl==="https://mock.example.com"&&(this.mock=new GV);const n=V.create({baseURL:ji(this.config.instanceUrl,"/api/v1"),headers:{"User-Agent":"Wandelbots-Nova-JS-SDK"}});n.interceptors.request.use(a=>Ee(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=>Ee(this,null,function*(){var o,s;if(LE(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 zV(r,cl(on({},e),{basePath:ji(this.config.instanceUrl,"/api/v1"),isJsonMime:a=>a==="application/json",baseOptions:on(on({},this.mock?{adapter:a=>this.mock.handleAPIRequest(a)}:{}),e.baseOptions),axiosInstance:n}))}renewAuthentication(){return Ee(this,null,function*(){if(!this.authPromise){this.authPromise=l_(this.config.instanceUrl);try{this.accessToken=yield this.authPromise,this.accessToken?Ri.setString("wbjs.access_token",this.accessToken):Ri.delete("wbjs.access_token")}finally{this.authPromise=null}}})}makeWebsocketURL(e){const t=new URL(ji(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 a_(this.makeWebsocketURL(e),{mock:this.mock})}connectMotionStream(e){return Ee(this,null,function*(){return yield FV.open(this,e)})}connectJogger(e){return Ee(this,null,function*(){return yield BV.open(this,e)})}connectMotionGroups(e){return Ee(this,null,function*(){const{instances:t}=yield this.api.controller.listControllers();return Promise.all(e.map(r=>DV.connect(this,r,t)))})}connectMotionGroup(e){return Ee(this,null,function*(){return(yield this.connectMotionGroups([e]))[0]})}};function WV(e){try{return JSON.stringify(e)}catch{return}}function JV(e,t){throw new Error(t+` ${JSON.stringify(e)}`)}function YV(e){var t,r,n,a;return e instanceof gl&&e.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":e instanceof gl&&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: ${WV(e)||e}`}const Sc=e=>{const t=e.softTimeout||3e3,[r,n]=J.useState(!1),a=R.useTheme();return J.useEffect(()=>{const o=setTimeout(()=>{n(!0)},t);return()=>clearTimeout(o)}),g.jsx(R.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{color:a.palette.text.primary},children:e.error?g.jsx(Sf,{loadingMessage:e.message,error:e.error}):g.jsxs(g.Fragment,{children:[g.jsx(R.CircularProgress,{sx:{marginBottom:"24px"}}),!!e.message&&g.jsx("div",{children:e.message}),g.jsx(R.Stack,{sx:{visibility:r?"visible":"hidden",marginTop:"1rem",color:a.palette.text.secondary},children:"This is taking longer than expected..."})]})})},Sf=e=>{const t=YV(e.error),r=e.error instanceof Error?e.error.stack:null,n=R.useTheme();return g.jsxs(R.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 ${Pl.lowerFirst(R.capitalize(e.loadingMessage))} - `:"")+t,g.jsx("br",{}),r&&g.jsx("pre",{children:r})]})},KV=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0",clipRule:"evenodd"})),QV=J.forwardRef(KV),XV=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0",clipRule:"evenodd"})),ZV=J.forwardRef(XV),e2=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:19,fill:"none",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M9.522 14.811A.899.899 0 1 0 8.25 13.54L6.19 15.601V3.16L8.25 5.221A.9.9 0 0 0 9.522 3.95L5.926.354a.9.9 0 0 0-1.272 0L1.058 3.95a.9.9 0 1 0 1.271 1.271L4.391 3.16v12.442L2.329 13.54a.899.899 0 1 0-1.271 1.271l3.596 3.597a.9.9 0 0 0 1.272 0z",clipRule:"evenodd"})),t2=J.forwardRef(e2),r2=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.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"})),n2=J.forwardRef(r2);function a2(){this.__data__=[],this.size=0}function Of(e,t){return e===t||e!==e&&t!==t}function Bs(e,t){for(var r=e.length;r--;)if(Of(e[r][0],t))return r;return-1}var o2=Array.prototype,s2=o2.splice;function i2(e){var t=this.__data__,r=Bs(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():s2.call(t,r,1),--this.size,!0}function l2(e){var t=this.__data__,r=Bs(t,e);return r<0?void 0:t[r][1]}function c2(e){return Bs(this.__data__,e)>-1}function u2(e,t){var r=this.__data__,n=Bs(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Xt(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])}}Xt.prototype.clear=a2;Xt.prototype.delete=i2;Xt.prototype.get=l2;Xt.prototype.has=c2;Xt.prototype.set=u2;function d2(){this.__data__=new Xt,this.size=0}function h2(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function p2(e){return this.__data__.get(e)}function m2(e){return this.__data__.has(e)}var f2="[object AsyncFunction]",g2="[object Function]",y2="[object GeneratorFunction]",b2="[object Proxy]";function wf(e){if(!Rr(e))return!1;var t=Ur(e);return t==g2||t==y2||t==f2||t==b2}var ki=Ut["__core-js_shared__"],nh=function(){var e=/[^.]+$/.exec(ki&&ki.keys&&ki.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function x2(e){return!!nh&&nh in e}var v2=Function.prototype,S2=v2.toString;function Dr(e){if(e!=null){try{return S2.call(e)}catch{}try{return e+""}catch{}}return""}var O2=/[\\^$.*+?()[\]{}|]/g,w2=/^\[object .+?Constructor\]$/,C2=Function.prototype,P2=Object.prototype,T2=C2.toString,R2=P2.hasOwnProperty,A2=RegExp("^"+T2.call(R2).replace(O2,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _2(e){if(!Rr(e)||x2(e))return!1;var t=wf(e)?A2:w2;return t.test(Dr(e))}function E2(e,t){return e==null?void 0:e[t]}function Br(e,t){var r=E2(e,t);return _2(r)?r:void 0}var Oa=Br(Ut,"Map"),wa=Br(Object,"create");function V2(){this.__data__=wa?wa(null):{},this.size=0}function I2(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var M2="__lodash_hash_undefined__",j2=Object.prototype,k2=j2.hasOwnProperty;function $2(e){var t=this.__data__;if(wa){var r=t[e];return r===M2?void 0:r}return k2.call(t,e)?t[e]:void 0}var U2=Object.prototype,L2=U2.hasOwnProperty;function D2(e){var t=this.__data__;return wa?t[e]!==void 0:L2.call(t,e)}var B2="__lodash_hash_undefined__";function N2(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=wa&&t===void 0?B2:t,this}function Er(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Er.prototype.clear=V2;Er.prototype.delete=I2;Er.prototype.get=$2;Er.prototype.has=D2;Er.prototype.set=N2;function F2(){this.size=0,this.__data__={hash:new Er,map:new(Oa||Xt),string:new Er}}function z2(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ns(e,t){var r=e.__data__;return z2(t)?r[typeof t=="string"?"string":"hash"]:r.map}function G2(e){var t=Ns(this,e).delete(e);return this.size-=t?1:0,t}function H2(e){return Ns(this,e).get(e)}function q2(e){return Ns(this,e).has(e)}function W2(e,t){var r=Ns(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,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=F2;Zt.prototype.delete=G2;Zt.prototype.get=H2;Zt.prototype.has=q2;Zt.prototype.set=W2;var J2=200;function Y2(e,t){var r=this.__data__;if(r instanceof Xt){var n=r.__data__;if(!Oa||n.length<J2-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Zt(n)}return r.set(e,t),this.size=r.size,this}function Ht(e){var t=this.__data__=new Xt(e);this.size=t.size}Ht.prototype.clear=d2;Ht.prototype.delete=h2;Ht.prototype.get=p2;Ht.prototype.has=m2;Ht.prototype.set=Y2;var K2="__lodash_hash_undefined__";function Q2(e){return this.__data__.set(e,K2),this}function X2(e){return this.__data__.has(e)}function Ko(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Zt;++t<r;)this.add(e[t])}Ko.prototype.add=Ko.prototype.push=Q2;Ko.prototype.has=X2;function Z2(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 eI(e,t){return e.has(t)}var tI=1,rI=2;function Cf(e,t,r,n,a,o){var s=r&tI,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&rI?new Ko:void 0;for(o.set(e,t),o.set(t,e);++d<i;){var f=e[d],m=t[d];if(n)var y=s?n(m,f,d,t,e,o):n(f,m,d,e,t,o);if(y!==void 0){if(y)continue;h=!1;break}if(p){if(!Z2(t,function(S,E){if(!eI(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 ah=Ut.Uint8Array;function nI(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function aI(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var oI=1,sI=2,iI="[object Boolean]",lI="[object Date]",cI="[object Error]",uI="[object Map]",dI="[object Number]",hI="[object RegExp]",pI="[object Set]",mI="[object String]",fI="[object Symbol]",gI="[object ArrayBuffer]",yI="[object DataView]",oh=dr?dr.prototype:void 0,$i=oh?oh.valueOf:void 0;function bI(e,t,r,n,a,o,s){switch(r){case yI:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case gI:return!(e.byteLength!=t.byteLength||!o(new ah(e),new ah(t)));case iI:case lI:case dI:return Of(+e,+t);case cI:return e.name==t.name&&e.message==t.message;case hI:case mI:return e==t+"";case uI:var i=nI;case pI:var l=n&oI;if(i||(i=aI),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;n|=sI,s.set(e,t);var u=Cf(i(e),i(t),n,a,o,s);return s.delete(e),u;case fI:if($i)return $i.call(e)==$i.call(t)}return!1}function xI(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var $t=Array.isArray;function vI(e,t,r){var n=t(e);return $t(e)?n:xI(n,r(e))}function SI(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 OI(){return[]}var wI=Object.prototype,CI=wI.propertyIsEnumerable,sh=Object.getOwnPropertySymbols,PI=sh?function(e){return e==null?[]:(e=Object(e),SI(sh(e),function(t){return CI.call(e,t)}))}:OI;function TI(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var RI="[object Arguments]";function ih(e){return Ar(e)&&Ur(e)==RI}var Pf=Object.prototype,AI=Pf.hasOwnProperty,_I=Pf.propertyIsEnumerable,Tf=ih(function(){return arguments}())?ih:function(e){return Ar(e)&&AI.call(e,"callee")&&!_I.call(e,"callee")};function EI(){return!1}var Rf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,lh=Rf&&typeof module=="object"&&module&&!module.nodeType&&module,VI=lh&&lh.exports===Rf,ch=VI?Ut.Buffer:void 0,II=ch?ch.isBuffer:void 0,bl=II||EI,MI=9007199254740991,jI=/^(?:0|[1-9]\d*)$/;function Af(e,t){var r=typeof e;return t=t??MI,!!t&&(r=="number"||r!="symbol"&&jI.test(e))&&e>-1&&e%1==0&&e<t}var kI=9007199254740991;function Oc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=kI}var $I="[object Arguments]",UI="[object Array]",LI="[object Boolean]",DI="[object Date]",BI="[object Error]",NI="[object Function]",FI="[object Map]",zI="[object Number]",GI="[object Object]",HI="[object RegExp]",qI="[object Set]",WI="[object String]",JI="[object WeakMap]",YI="[object ArrayBuffer]",KI="[object DataView]",QI="[object Float32Array]",XI="[object Float64Array]",ZI="[object Int8Array]",eM="[object Int16Array]",tM="[object Int32Array]",rM="[object Uint8Array]",nM="[object Uint8ClampedArray]",aM="[object Uint16Array]",oM="[object Uint32Array]",_e={};_e[QI]=_e[XI]=_e[ZI]=_e[eM]=_e[tM]=_e[rM]=_e[nM]=_e[aM]=_e[oM]=!0;_e[$I]=_e[UI]=_e[YI]=_e[LI]=_e[KI]=_e[DI]=_e[BI]=_e[NI]=_e[FI]=_e[zI]=_e[GI]=_e[HI]=_e[qI]=_e[WI]=_e[JI]=!1;function sM(e){return Ar(e)&&Oc(e.length)&&!!_e[Ur(e)]}function iM(e){return function(t){return e(t)}}var _f=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ia=_f&&typeof module=="object"&&module&&!module.nodeType&&module,lM=ia&&ia.exports===_f,Ui=lM&&Rm.process,uh=function(){try{var e=ia&&ia.require&&ia.require("util").types;return e||Ui&&Ui.binding&&Ui.binding("util")}catch{}}(),dh=uh&&uh.isTypedArray,Ef=dh?iM(dh):sM,cM=Object.prototype,uM=cM.hasOwnProperty;function dM(e,t){var r=$t(e),n=!r&&Tf(e),a=!r&&!n&&bl(e),o=!r&&!n&&!a&&Ef(e),s=r||n||a||o,i=s?TI(e.length,String):[],l=i.length;for(var c in e)uM.call(e,c)&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Af(c,l)))&&i.push(c);return i}var hM=Object.prototype;function pM(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||hM;return e===r}function mM(e,t){return function(r){return e(t(r))}}var fM=mM(Object.keys,Object),gM=Object.prototype,yM=gM.hasOwnProperty;function bM(e){if(!pM(e))return fM(e);var t=[];for(var r in Object(e))yM.call(e,r)&&r!="constructor"&&t.push(r);return t}function Vf(e){return e!=null&&Oc(e.length)&&!wf(e)}function wc(e){return Vf(e)?dM(e):bM(e)}function hh(e){return vI(e,wc,PI)}var xM=1,vM=Object.prototype,SM=vM.hasOwnProperty;function OM(e,t,r,n,a,o){var s=r&xM,i=hh(e),l=i.length,c=hh(t),u=c.length;if(l!=u&&!s)return!1;for(var d=l;d--;){var h=i[d];if(!(s?h in t:SM.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 y=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}y||(y=h=="constructor")}if(m&&!y){var w=e.constructor,T=t.constructor;w!=T&&"constructor"in e&&"constructor"in t&&!(typeof w=="function"&&w instanceof w&&typeof T=="function"&&T instanceof T)&&(m=!1)}return o.delete(e),o.delete(t),m}var xl=Br(Ut,"DataView"),vl=Br(Ut,"Promise"),Sl=Br(Ut,"Set"),Ol=Br(Ut,"WeakMap"),ph="[object Map]",wM="[object Object]",mh="[object Promise]",fh="[object Set]",gh="[object WeakMap]",yh="[object DataView]",CM=Dr(xl),PM=Dr(Oa),TM=Dr(vl),RM=Dr(Sl),AM=Dr(Ol),or=Ur;(xl&&or(new xl(new ArrayBuffer(1)))!=yh||Oa&&or(new Oa)!=ph||vl&&or(vl.resolve())!=mh||Sl&&or(new Sl)!=fh||Ol&&or(new Ol)!=gh)&&(or=function(e){var t=Ur(e),r=t==wM?e.constructor:void 0,n=r?Dr(r):"";if(n)switch(n){case CM:return yh;case PM:return ph;case TM:return mh;case RM:return fh;case AM:return gh}return t});var _M=1,bh="[object Arguments]",xh="[object Array]",lo="[object Object]",EM=Object.prototype,vh=EM.hasOwnProperty;function VM(e,t,r,n,a,o){var s=$t(e),i=$t(t),l=s?xh:or(e),c=i?xh:or(t);l=l==bh?lo:l,c=c==bh?lo:c;var u=l==lo,d=c==lo,h=l==c;if(h&&bl(e)){if(!bl(t))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new Ht),s||Ef(e)?Cf(e,t,r,n,a,o):bI(e,t,l,r,n,a,o);if(!(r&_M)){var p=u&&vh.call(e,"__wrapped__"),f=d&&vh.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,y=f?t.value():t;return o||(o=new Ht),a(m,y,r,n,o)}}return h?(o||(o=new Ht),OM(e,t,r,n,a,o)):!1}function Fs(e,t,r,n,a){return e===t?!0:e==null||t==null||!Ar(e)&&!Ar(t)?e!==e&&t!==t:VM(e,t,r,n,Fs,a)}function IM(e,t){return Fs(e,t)}const If=({store:e})=>{const{t}=Re.useTranslation(),[r,n]=J.useState(e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached),a=J.useRef(r);Tn(()=>{const s=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached;IM(a.current,s)||(a.current=s,n(s))});const o=[];for(const[s,i]of r.entries())i&&o.push(s);return g.jsx(R.Typography,{color:"error",sx:{margin:"0.5rem 1rem",textAlign:"center",minHeight:"1.5rem",visibility:o.length?"visible":"hidden"},children:t("Jogging.JointLimitsReached.lb",{jointNumbers:o.map(s=>s+1).join(", ")})})},MM=R.styled(R.FormControl)(({theme:e})=>({"&.MuiFormControl-root":{".MuiSelect-select":{paddingTop:"20px",paddingLeft:"12px"},label:{pointerEvents:"none",fontSize:"16px"},".MuiInputLabel-root":{"&.Mui-focused":{color:e.palette.text.primary}}}}));function co({labelValue:e,...t}){return g.jsxs(MM,{fullWidth:!0,variant:"filled",children:[g.jsx(R.InputLabel,{id:t.labelId,children:e}),g.jsx(R.Select,{...t})]})}var Sh=function(){try{var e=Br(Object,"defineProperty");return e({},"",{}),e}catch{}}();function jM(e,t,r){t=="__proto__"&&Sh?Sh(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function kM(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 $M(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 UM=$M();function LM(e,t){return e&&UM(e,t,wc)}function DM(e,t){return function(r,n){if(r==null)return r;if(!Vf(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 BM=DM(LM);function NM(e,t,r,n){return BM(e,function(a,o,s){t(n,a,r(a),s)}),n}var FM=1,zM=2;function GM(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 Ht,d;if(!(d===void 0?Fs(c,l,FM|zM,n,u):d))return!1}}return!0}function Mf(e){return e===e&&!Rr(e)}function HM(e){for(var t=wc(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,Mf(a)]}return t}function jf(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function qM(e){var t=HM(e);return t.length==1&&t[0][2]?jf(t[0][0],t[0][1]):function(r){return r===e||GM(r,e,t)}}var WM=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,JM=/^\w*$/;function Cc(e,t){if($t(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Es(e)?!0:JM.test(e)||!WM.test(e)||t!=null&&e in Object(t)}var YM="Expected a function";function Pc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(YM);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(Pc.Cache||Zt),r}Pc.Cache=Zt;var KM=500;function QM(e){var t=Pc(e,function(n){return r.size===KM&&r.clear(),n}),r=t.cache;return t}var XM=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ZM=/\\(\\)?/g,e5=QM(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(XM,function(r,n,a,o){t.push(a?o.replace(ZM,"$1"):n||r)}),t});function t5(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 Oh=dr?dr.prototype:void 0,wh=Oh?Oh.toString:void 0;function kf(e){if(typeof e=="string")return e;if($t(e))return t5(e,kf)+"";if(Es(e))return wh?wh.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function $f(e){return e==null?"":kf(e)}function Uf(e,t){return $t(e)?e:Cc(e,t)?[e]:e5($f(e))}function zs(e){if(typeof e=="string"||Es(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Lf(e,t){t=Uf(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[zs(t[r++])];return r&&r==n?e:void 0}function r5(e,t,r){var n=e==null?void 0:Lf(e,t);return n===void 0?r:n}function n5(e,t){return e!=null&&t in Object(e)}function a5(e,t,r){t=Uf(t,e);for(var n=-1,a=t.length,o=!1;++n<a;){var s=zs(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&&Oc(a)&&Af(s,a)&&($t(e)||Tf(e)))}function o5(e,t){return e!=null&&a5(e,t,n5)}var s5=1,i5=2;function l5(e,t){return Cc(e)&&Mf(t)?jf(zs(e),t):function(r){var n=r5(r,e);return n===void 0&&n===t?o5(r,e):Fs(t,n,s5|i5)}}function c5(e){return e}function u5(e){return function(t){return t==null?void 0:t[e]}}function d5(e){return function(t){return Lf(t,e)}}function h5(e){return Cc(e)?u5(zs(e)):d5(e)}function p5(e){return typeof e=="function"?e:e==null?c5:typeof e=="object"?$t(e)?l5(e[0],e[1]):qM(e):h5(e)}function m5(e,t){return function(r,n){var a=$t(r)?kM:NM,o={};return a(r,e,p5(n),o)}}var uo=m5(function(e,t,r){jM(e,r,t)}),f5=0;function g5(e){var t=++f5;return $f(e)+t}const wl=[{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}],y5=[{id:"continuous"},...wl],b5=["coordsys","tool"];class Gs{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)||"",je.makeAutoObservable(this,{},{autoBind:!0}),this.loadFromLocalStorage(),this.disposers.push(je.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 Gs(t,n,a||[],o||[])}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}get coordSystemCountByName(){return Pl.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=Or.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 y5}get discreteIncrementOptions(){return wl}get incrementOptionsById(){return uo(this.incrementOptions,t=>t.id)}get tabsById(){return uo(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 uo(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 uo(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:wl.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=g5();this.lock(r);try{return await t()}finally{this.unlock(r)}}}const x5=ye.observer(({store:e})=>{var a;const{t}=Re.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(co,{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(R.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(co,{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(R.MenuItem,{value:o.id,children:o.id},o.id))},"tcp")),e.showOrientationSelect&&r.push(g.jsx(co,{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:b5.map(o=>g.jsx(R.MenuItem,{value:o,children:n(o)},o))},"orientation")),e.showIncrementSelect&&r.push(g.jsxs(co,{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(R.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(o=>g.jsx(R.MenuItem,{value:o.id,children:e.currentMotionType==="translate"?`${o.mm}mm`:`${o.degrees}°`},o.id))]},"increment")),g.jsx(R.Box,{component:"div",sx:{display:"grid",gap:"16px",gridTemplateColumns:"1fr 1fr",gridAutoRows:"min-content","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:r.map((o,s)=>g.jsx(R.Box,{sx:{gridColumn:r.length%2===1&&s===r.length-1?"span 2":"auto"},children:o},s))})}),v5=R.styled(R.ToggleButtonGroup)(({theme:e})=>{var t;return{"&.MuiToggleButtonGroup-root":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[8],borderRadius:"8px",padding:"4px",gap:"4px",button:{border:"none",borderRadius:"4px",flex:"1 1 0px",minWidth:0,"&.MuiToggleButtonGroup-firstButton":{borderRadius:"8px 4px 4px 8px"},"&.MuiToggleButtonGroup-lastButton":{borderRadius:"4px 8px 8px 4px"}}}}});function Ch(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function S5(e){return typeof e=="string"}function O5(e,t,r){return e===void 0||S5(e)?t:{...t,ownerState:{...t.ownerState,...r}}}function wo(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 Ph(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 w5(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:a,className:o}=e;if(!t){const p=Ct(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=wo({...a,...n}),i=Ph(n),l=Ph(a),c=t(s),u=Ct(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 C5(e,t,r){return typeof e=="function"?e(t,r):e}function ar(e){var d;const{elementType:t,externalSlotProps:r,ownerState:n,skipResolvingSlotProps:a=!1,...o}=e,s=a?{}:C5(r,n),{props:i,internalRef:l}=w5({...o,externalSlotProps:s}),c=ds(l,s==null?void 0:s.ref,(d=e.additionalProps)==null?void 0:d.ref);return O5(t,{...i,ref:c},n)}function Th(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 P5={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function T5(e,t,r=(n,a)=>n===a){return e.length===t.length&&e.every((n,a)=>r(n,t[a]))}const R5=2;function rn(e,t,r,n,a){return r===1?Math.min(e+t,a):Math.max(e-t,n)}function Df(e,t){return e-t}function Rh(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 ho(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 Qo(e,t,r){return(e-t)*100/(r-t)}function A5(e,t,r){return(r-t)*e+t}function _5(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 E5(e,t,r){const n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(_5(t)))}function Ah({values:e,newValue:t,index:r}){const n=e.slice();return n[r]=t,n.sort(Df)}function po({sliderRef:e,activeIndex:t,setActive:r}){var a,o,s;const n=aa(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 mo(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?T5(e,t):!1}const V5={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}%`})}},I5=e=>e;let fo;function _h(){return fo===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?fo=CSS.supports("touch-action","none"):fo=!0),fo}function M5(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=I5,step:m=1,shiftStep:y=10,tabIndex:S,value:E}=e,O=N.useRef(void 0),[w,T]=N.useState(-1),[P,C]=N.useState(-1),[I,z]=N.useState(!1),b=N.useRef(0),A=N.useRef(null),[G,_]=Hw({controlled:E,default:r??l,name:"Slider"}),F=u&&((Q,ne,ie)=>{const fe=Q.nativeEvent||Q,Ce=new fe.constructor(fe.type,fe);Object.defineProperty(Ce,"target",{writable:!0,value:{value:ne,name:c}}),A.current=ne,u(Ce,ne,ie)}),re=Array.isArray(G);let ee=re?G.slice().sort(Df):[G];ee=ee.map(Q=>Q==null?l:nn(Q,l,i));const ae=s===!0&&m!==null?[...Array(Math.floor((i-l)/m)+1)].map((Q,ne)=>({value:l+m*ne})):s||[],te=ae.map(Q=>Q.value),[se,W]=N.useState(-1),X=N.useRef(null),ue=ds(p,X),ve=Q=>ne=>{var fe;const ie=Number(ne.currentTarget.getAttribute("data-index"));Th(ne.target)&&W(ie),C(ie),(fe=Q==null?void 0:Q.onFocus)==null||fe.call(Q,ne)},Ue=Q=>ne=>{var ie;Th(ne.target)||W(-1),C(-1),(ie=Q==null?void 0:Q.onBlur)==null||ie.call(Q,ne)},we=(Q,ne)=>{const ie=Number(Q.currentTarget.getAttribute("data-index")),fe=ee[ie],Ce=te.indexOf(fe);let le=ne;if(ae&&m==null){const He=te[te.length-1];le>=He?le=He:le<=te[0]?le=te[0]:le=le<fe?te[Ce-1]:te[Ce+1]}if(le=nn(le,l,i),re){a&&(le=nn(le,ee[ie-1]||-1/0,ee[ie+1]||1/0));const He=le;le=Ah({values:ee,newValue:le,index:ie});let Ze=ie;a||(Ze=le.indexOf(He)),po({sliderRef:X,activeIndex:Ze})}_(le),W(ie),F&&!mo(le,G)&&F(Q,le,ie),d&&d(Q,A.current??le)},ct=Q=>ne=>{var ie;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(ne.key)){ne.preventDefault();const fe=Number(ne.currentTarget.getAttribute("data-index")),Ce=ee[fe];let le=null;if(m!=null){const He=ne.shiftKey?y:m;switch(ne.key){case"ArrowUp":le=rn(Ce,He,1,l,i);break;case"ArrowRight":le=rn(Ce,He,o?-1:1,l,i);break;case"ArrowDown":le=rn(Ce,He,-1,l,i);break;case"ArrowLeft":le=rn(Ce,He,o?1:-1,l,i);break;case"PageUp":le=rn(Ce,y,1,l,i);break;case"PageDown":le=rn(Ce,y,-1,l,i);break;case"Home":le=l;break;case"End":le=i;break}}else if(ae){const He=te[te.length-1],Ze=te.indexOf(Ce),Ne=[o?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],mt=[o?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];Ne.includes(ne.key)?Ze===0?le=te[0]:le=te[Ze-1]:mt.includes(ne.key)&&(Ze===te.length-1?le=He:le=te[Ze+1])}le!=null&&we(ne,le)}(ie=Q==null?void 0:Q.onKeyDown)==null||ie.call(Q,ne)};kt(()=>{var Q;n&&X.current.contains(document.activeElement)&&((Q=document.activeElement)==null||Q.blur())},[n]),n&&w!==-1&&T(-1),n&&se!==-1&&W(-1);const rt=Q=>ne=>{var ie;(ie=Q.onChange)==null||ie.call(Q,ne),we(ne,ne.target.valueAsNumber)},be=N.useRef(void 0);let Z=h;o&&h==="horizontal"&&(Z+="-reverse");const oe=({finger:Q,move:ne=!1})=>{const{current:ie}=X,{width:fe,height:Ce,bottom:le,left:He}=ie.getBoundingClientRect();let Ze;Z.startsWith("vertical")?Ze=(le-Q.y)/Ce:Ze=(Q.x-He)/fe,Z.includes("-reverse")&&(Ze=1-Ze);let Ne;if(Ne=A5(Ze,l,i),m)Ne=E5(Ne,m,l);else{const jn=Rh(te,Ne);Ne=te[jn]}Ne=nn(Ne,l,i);let mt=0;if(re){ne?mt=be.current:mt=Rh(ee,Ne),a&&(Ne=nn(Ne,ee[mt-1]||-1/0,ee[mt+1]||1/0));const jn=Ne;Ne=Ah({values:ee,newValue:Ne,index:mt}),a&&ne||(mt=Ne.indexOf(jn),be.current=mt)}return{newValue:Ne,activeIndex:mt}},ce=Gt(Q=>{const ne=ho(Q,O);if(!ne)return;if(b.current+=1,Q.type==="mousemove"&&Q.buttons===0){Y(Q);return}const{newValue:ie,activeIndex:fe}=oe({finger:ne,move:!0});po({sliderRef:X,activeIndex:fe,setActive:T}),_(ie),!I&&b.current>R5&&z(!0),F&&!mo(ie,G)&&F(Q,ie,fe)}),Y=Gt(Q=>{const ne=ho(Q,O);if(z(!1),!ne)return;const{newValue:ie}=oe({finger:ne,move:!0});T(-1),Q.type==="touchend"&&C(-1),d&&d(Q,A.current??ie),O.current=void 0,me()}),xe=Gt(Q=>{if(n)return;_h()||Q.preventDefault();const ne=Q.changedTouches[0];ne!=null&&(O.current=ne.identifier);const ie=ho(Q,O);if(ie!==!1){const{newValue:Ce,activeIndex:le}=oe({finger:ie});po({sliderRef:X,activeIndex:le,setActive:T}),_(Ce),F&&!mo(Ce,G)&&F(Q,Ce,le)}b.current=0;const fe=aa(X.current);fe.addEventListener("touchmove",ce,{passive:!0}),fe.addEventListener("touchend",Y,{passive:!0})}),me=N.useCallback(()=>{const Q=aa(X.current);Q.removeEventListener("mousemove",ce),Q.removeEventListener("mouseup",Y),Q.removeEventListener("touchmove",ce),Q.removeEventListener("touchend",Y)},[Y,ce]);N.useEffect(()=>{const{current:Q}=X;return Q.addEventListener("touchstart",xe,{passive:_h()}),()=>{Q.removeEventListener("touchstart",xe),me()}},[me,xe]),N.useEffect(()=>{n&&me()},[n,me]);const We=Q=>ne=>{var Ce;if((Ce=Q.onMouseDown)==null||Ce.call(Q,ne),n||ne.defaultPrevented||ne.button!==0)return;ne.preventDefault();const ie=ho(ne,O);if(ie!==!1){const{newValue:le,activeIndex:He}=oe({finger:ie});po({sliderRef:X,activeIndex:He,setActive:T}),_(le),F&&!mo(le,G)&&F(ne,le,He)}b.current=0;const fe=aa(X.current);fe.addEventListener("mousemove",ce,{passive:!0}),fe.addEventListener("mouseup",Y)},Ge=Qo(re?ee[0]:l,l,i),Me=Qo(ee[ee.length-1],l,i)-Ge,er=(Q={})=>{const ne=wo(Q),ie={onMouseDown:We(ne||{})},fe={...ne,...ie};return{...Q,ref:ue,...fe}},ka=Q=>ne=>{var fe;(fe=Q.onMouseOver)==null||fe.call(Q,ne);const ie=Number(ne.currentTarget.getAttribute("data-index"));C(ie)},$a=Q=>ne=>{var ie;(ie=Q.onMouseLeave)==null||ie.call(Q,ne),C(-1)},Ua=(Q={})=>{const ne=wo(Q),ie={onMouseOver:ka(ne||{}),onMouseLeave:$a(ne||{})};return{...Q,...ne,...ie}},La=Q=>({pointerEvents:w!==-1&&w!==Q?"none":void 0});let Nr;return h==="vertical"&&(Nr=o?"vertical-rl":"vertical-lr"),{active:w,axis:Z,axisProps:V5,dragging:I,focusedThumbIndex:se,getHiddenInputProps:(Q={})=>{const ne=wo(Q),ie={onChange:rt(ne||{}),onFocus:ve(ne||{}),onBlur:Ue(ne||{}),onKeyDown:ct(ne||{})},fe={...ne,...ie};return{tabIndex:S,"aria-labelledby":t,"aria-orientation":h,"aria-valuemax":f(i),"aria-valuemin":f(l),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":e.step??void 0,disabled:n,...Q,...fe,style:{...P5,direction:o?"rtl":"ltr",width:"100%",height:"100%",writingMode:Nr}}},getRootProps:er,getThumbProps:Ua,marks:ae,open:P,range:re,rootRef:ue,trackLeap:Me,trackOffset:Ge,values:ee,getThumbStyle:La}}function Co(e){return typeof e=="string"}const j5=e=>!e||!Co(e);function k5(e){return typeof e.main=="string"}function $5(e,t=[]){if(!k5(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function Tc(e=[]){return([,t])=>t&&$5(t,e)}function U5(e){return On("MuiSlider",e)}const bt=Al("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"]),L5=e=>{const{open:t}=e;return{offset:Ct(t&&bt.valueLabelOpen),circle:bt.valueLabelCircle,label:bt.valueLabelLabel}};function Bf(e){const{children:t,className:r,value:n}=e,a=L5(e);return t?N.cloneElement(t,{className:t.props.className},g.jsxs(N.Fragment,{children:[t.props.children,g.jsx("span",{className:Ct(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"&&(Bf.propTypes={children:x.element.isRequired,className:x.string,value:x.node});function Eh(e){return e}const D5=pt("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${et(r.color)}`],r.size!=="medium"&&t[`size${et(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})($r(({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(Tc()).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}}]}))),B5=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}}]}),N5=pt("span",{name:"MuiSlider",slot:"Track"})($r(({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(Tc()).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:ca(e.palette[t].main,.62),borderColor:ca(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:la(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:la(e.palette[t].main,.5)})}}}))]}))),F5=pt("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${et(r.color)}`],r.size!=="medium"&&t[`thumbSize${et(r.size)}`]]}})($r(({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(Tc()).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 ${Ni(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 ${Ni(e.palette[t].main,.16)}`}}}}))]}))),Nf=pt(Bf,{name:"MuiSlider",slot:"ValueLabel"})($r(({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"&&(Nf.propTypes={children:x.element.isRequired,index:x.number.isRequired,open:x.bool.isRequired,value:x.node});const z5=pt("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>Vl(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})($r(({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}}]}))),G5=pt("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>Vl(e)&&e!=="markLabelActive"})($r(({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}}]}))),H5=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${et(i)}`,l&&`size${et(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${et(l)}`,i&&`thumbColor${et(i)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Xo(c,U5,s)},q5=({children:e})=>e,Ff=N.forwardRef(function(t,r){const n=yc({props:t,name:"MuiSlider"}),a=l0(),{"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:y,getAriaValueText:S,marks:E=!1,max:O=100,min:w=0,name:T,onChange:P,onChangeCommitted:C,orientation:I="horizontal",shiftStep:z=10,size:b="medium",step:A=1,scale:G=Eh,slotProps:_,slots:F,tabIndex:re,track:ee="normal",value:ae,valueLabelDisplay:te="off",valueLabelFormat:se=Eh,...W}=n,X={...n,isRtl:a,max:O,min:w,classes:h,disabled:m,disableSwap:f,orientation:I,marks:E,color:d,size:b,step:A,shiftStep:z,scale:G,track:ee,valueLabelDisplay:te,valueLabelFormat:se},{axisProps:ue,getRootProps:ve,getHiddenInputProps:Ue,getThumbProps:we,open:ct,active:rt,axis:be,focusedThumbIndex:Z,range:oe,dragging:ce,marks:Y,values:xe,trackOffset:me,trackLeap:We,getThumbStyle:Ge}=M5({...X,rootRef:r});X.marked=Y.length>0&&Y.some(Be=>Be.label),X.dragging=ce,X.focusedThumbIndex=Z;const Me=H5(X),er=(F==null?void 0:F.root)??c.Root??D5,ka=(F==null?void 0:F.rail)??c.Rail??B5,$a=(F==null?void 0:F.track)??c.Track??N5,Ua=(F==null?void 0:F.thumb)??c.Thumb??F5,La=(F==null?void 0:F.valueLabel)??c.ValueLabel??Nf,Nr=(F==null?void 0:F.mark)??c.Mark??z5,Da=(F==null?void 0:F.markLabel)??c.MarkLabel??G5,Q=(F==null?void 0:F.input)??c.Input??"input",ne=(_==null?void 0:_.root)??u.root,ie=(_==null?void 0:_.rail)??u.rail,fe=(_==null?void 0:_.track)??u.track,Ce=(_==null?void 0:_.thumb)??u.thumb,le=(_==null?void 0:_.valueLabel)??u.valueLabel,He=(_==null?void 0:_.mark)??u.mark,Ze=(_==null?void 0:_.markLabel)??u.markLabel,Ne=(_==null?void 0:_.input)??u.input,mt=ar({elementType:er,getSlotProps:ve,externalSlotProps:ne,externalForwardedProps:W,additionalProps:{...j5(er)&&{as:l}},ownerState:{...X,...ne==null?void 0:ne.ownerState},className:[Me.root,p]}),jn=ar({elementType:ka,externalSlotProps:ie,ownerState:X,className:Me.rail}),tg=ar({elementType:$a,externalSlotProps:fe,additionalProps:{style:{...ue[be].offset(me),...ue[be].leap(We)}},ownerState:{...X,...fe==null?void 0:fe.ownerState},className:Me.track}),Hs=ar({elementType:Ua,getSlotProps:we,externalSlotProps:Ce,ownerState:{...X,...Ce==null?void 0:Ce.ownerState},className:Me.thumb}),rg=ar({elementType:La,externalSlotProps:le,ownerState:{...X,...le==null?void 0:le.ownerState},className:Me.valueLabel}),qs=ar({elementType:Nr,externalSlotProps:He,ownerState:X,className:Me.mark}),Ws=ar({elementType:Da,externalSlotProps:Ze,ownerState:X,className:Me.markLabel}),ng=ar({elementType:Q,getSlotProps:Ue,externalSlotProps:Ne,ownerState:X});return g.jsxs(er,{...mt,children:[g.jsx(ka,{...jn}),g.jsx($a,{...tg}),Y.filter(Be=>Be.value>=w&&Be.value<=O).map((Be,Je)=>{const Js=Qo(Be.value,w,O),Ba=ue[be].offset(Js);let Lt;return ee===!1?Lt=xe.includes(Be.value):Lt=ee==="normal"&&(oe?Be.value>=xe[0]&&Be.value<=xe[xe.length-1]:Be.value<=xe[0])||ee==="inverted"&&(oe?Be.value<=xe[0]||Be.value>=xe[xe.length-1]:Be.value>=xe[0]),g.jsxs(N.Fragment,{children:[g.jsx(Nr,{"data-index":Je,...qs,...!Co(Nr)&&{markActive:Lt},style:{...Ba,...qs.style},className:Ct(qs.className,Lt&&Me.markActive)}),Be.label!=null?g.jsx(Da,{"aria-hidden":!0,"data-index":Je,...Ws,...!Co(Da)&&{markLabelActive:Lt},style:{...Ba,...Ws.style},className:Ct(Me.markLabel,Ws.className,Lt&&Me.markLabelActive),children:Be.label}):null]},Je)}),xe.map((Be,Je)=>{const Js=Qo(Be,w,O),Ba=ue[be].offset(Js),Lt=te==="off"?q5:La;return g.jsx(Lt,{...!Co(Lt)&&{valueLabelFormat:se,valueLabelDisplay:te,value:typeof se=="function"?se(G(Be),Je):se,index:Je,open:ct===Je||rt===Je||te==="on",disabled:m},...rg,children:g.jsx(Ua,{"data-index":Je,...Hs,className:Ct(Me.thumb,Hs.className,rt===Je&&Me.active,Z===Je&&Me.focusVisible),style:{...Ba,...Ge(Je),...Hs.style},children:g.jsx(Q,{"data-index":Je,"aria-label":y?y(Je):o,"aria-valuenow":G(Be),"aria-labelledby":i,"aria-valuetext":S?S(G(Be),Je):s,value:xe[Je],...ng})})},Je)})]})});process.env.NODE_ENV!=="production"&&(Ff.propTypes={"aria-label":Ch(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":Ch(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 W5="[object Number]";function J5(e){return typeof e=="number"||Ar(e)&&Ur(e)==W5}const zf=ye.observer(e=>{var o,s,i;const t=R.useTheme(),{store:r}=e,{t:n}=Re.useTranslation();function a(l,c){c===e.velocity||!J5(c)||e.onVelocityChange(c)}return g.jsxs(R.Stack,{direction:"row",gap:2,alignItems:"center",children:[r.showVelocityLegend&&g.jsx(R.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(Ff,{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(Rc,{value:e.velocity.toString()}))]})});function Rc({value:e,sx:t}){var n;const r=R.useTheme();return g.jsx(R.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(R.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:r.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const Gf=ye.observer(({store:e})=>{const{t}=Re.useTranslation(),r=ye.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(zf,{store:e,velocity:e.velocityInDisplayUnits,min:e.minVelocityInDisplayUnits,max:e.maxVelocityInDisplayUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,renderValue:n=>g.jsx(Rc,{value:r.valueLabelFormat(n),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),Y5=ye.observer(({store:e,children:t})=>{const{t:r}=Re.useTranslation(),n=R.useTheme();function a(h,p){(p==="translate"||p==="rotate")&&e.setSelectedCartesianMotionType(p)}Tm(()=>[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,y=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:y,coordSystemId:e.activeCoordSystemId,velocityInRelevantUnits:e.selectedCartesianMotionType==="translate"?e.translationVelocityMmPerSec:e.rotationVelocityRadsPerSec,axis:h.axis,direction:h.direction,motion:e.selectedCartesianMotionType==="translate"?{type:"translate",distanceMm:p.mm}:{type:"rotate",distanceRads:Or.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 y,S,E;const m=(E=(S=(y=f.componentsExt)==null?void 0:y.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(QV,{}),colors:l("X",e.selectedCartesianMotionType,n)},{id:"y",icon:g.jsx(ZV,{}),colors:l("Y",e.selectedCartesianMotionType,n)},{id:"z",icon:g.jsx(t2,{}),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:Or.radiansToDegrees(h).toFixed(1)})}return g.jsxs(R.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsxs(R.Stack,{gap:2,children:[g.jsx(x5,{store:e}),g.jsx(Gf,{store:e}),g.jsx(R.Divider,{})]}),g.jsx(R.Stack,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:g.jsxs(R.Stack,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[g.jsxs(v5,{value:e.selectedCartesianMotionType,onChange:a,exclusive:!0,"aria-label":r("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[g.jsx(R.ToggleButton,{value:"translate",children:r("Jogging.Cartesian.Translation.bt")}),g.jsx(R.ToggleButton,{value:"rotate",children:r("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&c.map(h=>{var p,f;return g.jsx(rl,{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(R.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(rl,{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(n2,{}),g.jsx(R.Typography,{sx:{fontSize:"24px",color:((f=h.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var m,y;return d(((y=(m=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:m.orientation)==null?void 0:y[h.id])||0)},startJogging:m=>s({axis:h.id,motionType:"rotate",direction:m}),stopJogging:i},h.id)})]})}),g.jsx(If,{store:e}),t&&g.jsx(R.Divider,{}),t]})}),K5=ye.observer(({store:e,children:t})=>{const r=R.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(R.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsx(Gf,{store:e}),g.jsx(R.Divider,{}),g.jsx(R.Stack,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},id:"JointControls",children:g.jsx(R.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?Or.radiansToDegrees(s.lower_limit):void 0,l=(s==null?void 0:s.upper_limit)!==void 0?Or.radiansToDegrees(s.upper_limit):void 0;return g.jsxs(R.Stack,{direction:"row",alignItems:"center",justifyContent:"center",spacing:1.5,width:"100%",children:[e.showJointsLegend&&g.jsx(R.Typography,{color:e.isLocked?r.palette.text.disabled:r.palette.text.secondary,children:`G${o.index+1}`}),g.jsx(_m,{disabled:e.isLocked,lowerLimitDegs:i,upperLimitDegs:l,getValueDegs:()=>{const u=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position.joints[o.index];return u!==void 0?Or.radiansToDegrees(u):void 0},startJogging:u=>n({joint:o.index,direction:u}),stopJogging:a})]},`joint-${o.index}`)})})}),g.jsx(If,{store:e}),t&&g.jsx(R.Divider,{}),t]})}),Q5=Ke(ye.observer(e=>{const t=Pl.isString(e.nova)?new qV({instanceUrl:e.nova}):e.nova,r=ye.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function n(){je.runInAction(()=>{r.loadingError=null,r.joggingStore=null});try{let a=e.store;if(!a){const o=await t.connectJogger(e.motionGroupId);a=await Gs.loadFor(o)}je.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(R.Stack,{sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:r.joggingStore?g.jsx(X5,{store:r.joggingStore,children:e.children}):g.jsx(Sc,{message:"Loading jogging",error:r.loadingError})})})),X5=ye.observer(({store:e,children:t})=>{const{t:r}=Re.useTranslation();function n(){if(e.currentTab.id==="cartesian")return g.jsx(g.Fragment,{children:g.jsx(Y5,{store:e,children:t})});if(e.currentTab.id==="joint")return g.jsx(g.Fragment,{children:g.jsx(K5,{store:e,children:t})})}return g.jsxs(R.Stack,{flexGrow:1,sx:{overflow:"hidden"},children:[g.jsx(R.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(PC,{fontSize:"small",sx:{mr:1}}):g.jsx(TC,{fontSize:"small",sx:{mr:1}});return g.jsx(R.Tab,{label:e.showTabIcons?g.jsxs(R.Stack,{direction:"row",alignItems:"center",children:[s,o]}):o,id:`jogging-tab-${a.id}`,"aria-controls":`jogging-tab-${a.id}`},a.id)})}),g.jsx(R.Stack,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:n()})]})}),Hf=J.forwardRef(({label:e,value:t},r)=>{var i;const n=R.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(R.Tooltip,{open:a,title:"Copied!",children:g.jsx(R.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(R.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})})})}),Z5=ye.observer(({motionStream:e})=>{const t=J.useRef(null);function r(){const n=e.rapidlyChangingMotionState.tcp_pose;return n?Or.poseToWandelscriptString(n):""}return Tn(()=>{if(!t.current)return;const n=r();t.current.textContent!==n&&(t.current.textContent=n)}),g.jsx(R.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:g.jsx(Hf,{value:r(),ref:t})})}),e3=ye.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 Tn(()=>{if(!t.current)return;const n=r();t.current.textContent!==n&&(t.current.textContent=n)}),g.jsx(R.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:g.jsx(Hf,{value:r(),ref:t})})});class qf{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")},je.makeObservable(this,{messages:je.observable,addMessage:je.action,clearMessages:je.action})}}const Wf=Ke(ye.observer(e=>{var u;const{messages:t=[],onClear:r,height:n=400,sx:a}=e,o=R.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":default:return o.palette.text.secondary}},c=({message:d})=>{const[h,p]=J.useState(!1),[f,m]=J.useState(!1),[y,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(T){console.error("Failed to copy message:",T)}},w=E&&!h?d.message.substring(0,150)+"...":d.message;return g.jsx(R.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(R.Box,{sx:{display:"flex",gap:1},children:[g.jsxs(R.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:o.palette.text.disabled,whiteSpace:"nowrap",flexShrink:0},children:["[",i(d.timestamp),"]"]}),g.jsx(R.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:l(d.level),wordBreak:"break-word",overflowWrap:"anywhere",hyphens:"auto",flex:1,whiteSpace:"pre-wrap"},children:w}),g.jsxs(R.Box,{sx:{display:"flex",alignItems:"flex-start",gap:.5,opacity:y?1:0,transition:"opacity 0.2s ease-in-out",visibility:y?"visible":"hidden"},children:[g.jsx(R.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(Nt.ContentCopy,{sx:{fontSize:12}})}),E&&g.jsx(R.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(Nt.ExpandLess,{sx:{fontSize:12}}):g.jsx(Nt.ExpandMore,{sx:{fontSize:12}})})]})]})},d.id)};return g.jsxs(R.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(R.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px"},children:[g.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(Nt.DescriptionOutlined,{sx:{fontSize:16,color:o.palette.action.active,opacity:.56}}),g.jsx(R.Typography,{sx:{fontWeight:500,fontSize:"14px",lineHeight:"143%",letterSpacing:"0.17px",color:o.palette.text.primary},children:"Log"})]}),g.jsx(R.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(R.Box,{ref:s,sx:{flex:1,overflow:"auto",padding:"8px 16px",display:"flex",flexDirection:"column",gap:"2px"},children:t.length===0?g.jsx(R.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))})]})})),t3=Ke(ye.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 qf;return(l=a.current)==null||l.call(a,i),i},[t]),s=()=>{o.clearMessages()};return g.jsx(Wf,{...n,messages:o.messages,onClear:s})}));function r3(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function n3({baseUrl:e=r3(),...t}){return g.jsxs(R.Dialog,{"aria-labelledby":"no-motion-group-modal-title",open:!0,fullWidth:!0,sx:{"& .MuiModal-backdrop":{backdropFilter:"blur(10px)"},"& .MuiDialog-paper":{"::before":{content:'""',height:"8px",width:"100%",background:"linear-gradient(90deg, #FF0E65 0%, #47D3FF 100%)"},background:"#101629"}},children:[g.jsx(R.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),g.jsxs(R.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[g.jsx(R.Typography,{color:"#fff",children:"Found no devices to connect to."}),g.jsx(R.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),g.jsx(R.DialogActions,{children:g.jsxs(R.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[g.jsx(R.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),g.jsx(R.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}var sn=(e=>(e.IDLE="idle",e.RUNNING="running",e.PAUSED="paused",e.STOPPING="stopping",e))(sn||{});const a3=Ke(ye.observer(({state:e,onRun:t,onPause:r,onStop:n,onReset:a,requiresManualReset:o=!1,variant:s="with_pause",className:i})=>{const l=R.useTheme(),{t:c}=Re.useTranslation(),u=()=>{const p={run:{enabled:e==="idle"||e==="paused",label:c(e==="paused"?"ProgramControl.Resume.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(Nt.PlayArrow,{...f}):g.jsx(Nt.Stop,{...f});switch(p){case 0:return g.jsx(Nt.PlayArrow,{...f});case 1:return g.jsx(Nt.Pause,{...f});case 2:return g.jsx(Nt.Stop,{...f});default:return null}},h=u();return g.jsx(R.Box,{className:i,sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:g.jsx(R.Box,{sx:{display:"flex",gap:"40px",flexWrap:"wrap",justifyContent:"center",alignItems:"center"},children:h.map((p,f)=>g.jsxs(R.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[g.jsx(R.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(R.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))})})})),Cl=Ke(ye.observer(({programState:e,safetyState:t,operationMode:r,className:n})=>{const a=R.useTheme(),{t:o}=Re.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 sn.RUNNING:return{label:o("ProgramStateIndicator.Running.lb"),color:a.palette.success.main};case sn.PAUSED:return{label:o("ProgramStateIndicator.Paused.lb"),color:a.palette.grey[600]};case sn.STOPPING:return{label:o("ProgramStateIndicator.Stopped.lb"),color:a.palette.error.main};case sn.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(R.Chip,{className:n,label:g.jsx(R.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}}})})),Vh="0.0.0-semantically-released";function Ac(e){let t=Vh;return Vh.startsWith("0.")&&(t=""),`https://cdn.jsdelivr.net/gh/wandelbotsgmbh/wandelbots-js-react-components${t?`@${t}`:""}/public/models/${e}.glb`}function o3(e){function t(r){return r.children.length===0?[r]:[r,...r.children.flatMap(n=>t(n))]}return t(e).filter(r=>Yf(r))}function Jf(e){return e.name.endsWith("_FLG")}function Yf(e){return/_J[0-9]+$/.test(e.name)}function s3(e,t){let r;function n(a){if(Jf(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}Yf(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 Kf({rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:r,children:n}){const a=J.useRef([]),o=J.useRef([]),s=J.useRef(null),{invalidate:i}=Po.useThree();J.useEffect(()=>{const d=e.state.joint_position.joints.filter(h=>h!==void 0);return s.current=new gc(d,{tension:120,friction:20,threshold:.001}),()=>{var h;(h=s.current)==null||h.destroy()}},[]),Po.useFrame((d,h)=>{if(s.current){const p=s.current.update(h);u(),p||i()}});function l(d){d&&(o.current=o3(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],y=m.theta||0,S=m.reverse_rotation_direction?-1:1;f.rotation.y=S*(d[p]||0)+y}}return Pm(()=>{const d=e.state.joint_position.joints.filter(h=>h!==void 0);requestAnimationFrame(()=>c(d))}),g.jsx("group",{ref:l,children:n})}const i3="line",l3="mesh";function c3({rapidlyChangingMotionState:e,dhParameters:t,...r}){const n=new St.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 St.Vector3,h=new St.Quaternion,p=new St.Vector3;n.decompose(d,h,p);const f=d.clone(),m=new St.Matrix4().makeRotationY(c.theta+u*(c.reverse_rotation_direction?-1:1)).multiply(new St.Matrix4().makeTranslation(0,c.d/1e3,0)).multiply(new St.Matrix4().makeTranslation(c.a/1e3,0,0)).multiply(new St.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(Kf,{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(ot.Line,{ref:f=>{a.current[u]=f},name:i3,points:[d,h],color:"white",lineWidth:5}),g.jsxs("mesh",{ref:f=>{o.current[u]=f},name:l3,position:h,children:[g.jsx("sphereGeometry",{args:[.01,32,32]}),g.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]},"mesh_"+u)]},p)})]})})})}const u3=console.warn;function d3(){return J.useEffect(()=>{console.warn=e=>{e!=="Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"&&u3(e)}},[]),g.jsx(g.Fragment,{})}function h3(e){return e.type==="Mesh"}function p3({modelURL:e,flangeRef:t,postModelRender:r,...n}){const{gltf:a}=s3(ot.useGLTF(e),e.split("/").pop()||e),o=J.useCallback(i=>{i&&r&&r()},[e]);function s(i){return h3(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:Jf(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 m3=(e,t)=>{e.userData.isGhost||(e.traverse(r=>{if(r instanceof Le.Mesh){r.material instanceof Le.Material&&(r.material.colorWrite=!1);const n=r.clone(),a=r.clone();n.material=new Le.MeshStandardMaterial({depthTest:!0,depthWrite:!0,colorWrite:!1,polygonOffset:!0,polygonOffsetFactor:-1,side:Le.DoubleSide}),n.userData.isGhost=!0,a.material=new Le.MeshStandardMaterial({color:t,opacity:.3,depthTest:!0,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-2,side:Le.DoubleSide}),a.userData.isGhost=!0,r.parent&&(r.parent.add(n),r.parent.add(a))}}),e.userData.isGhost=!0)},f3=e=>{if(!e.userData.isGhost)return;const t=[];e.traverse(r=>{var n;r instanceof Le.Mesh&&((n=r.userData)!=null&&n.isGhost?t.push(r):r.material instanceof Le.Material&&(r.material.colorWrite=!0))}),t.forEach(r=>{r.parent&&r.parent.remove(r)}),e.userData.isGhost=!1},Qf=Ke(({rapidlyChangingMotionState:e,modelFromController:t,dhParameters:r,getModel:n=Ac,flangeRef:a,postModelRender:o,transparentColor:s,...i})=>{const[l,c]=J.useState(null),u=J.useCallback(h=>{c(h)},[]);J.useEffect(()=>{l&&(s?m3(l,s):f3(l))},[l,s]);const d=g.jsx(c3,{rapidlyChangingMotionState:e,dhParameters:r,...i});return g.jsxs(gg.ErrorBoundary,{fallback:d,onError:h=>{console.error(h)},children:[g.jsx(J.Suspense,{fallback:d,children:g.jsx("group",{ref:u,children:g.jsx(Kf,{rapidlyChangingMotionState:e,dhParameters:r,children:g.jsx(p3,{modelURL:n(t),postModelRender:o,flangeRef:a,...i})})})}),g.jsx(d3,{})]})});function Xf({connectedMotionGroup:e,getModel:t=Ac,flangeRef:r,transparentColor:n,postModelRender:a,...o}){return e.dhParameters?g.jsx(Qf,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:e.modelFromController||"",dhParameters:e.dhParameters,getModel:t,flangeRef:r,transparentColor:n,postModelRender:a,...o}):null}function Ih({modelRenderTrigger:e,children:t}){const r=ot.useBounds();return J.useEffect(()=>{e>0&&r.refresh().clip().fit()},[e,r]),g.jsx(g.Fragment,{children:t})}const g3=Ke(ye.observer(({robotName:e,programState:t,safetyState:r,operationMode:n,driveToHomeEnabled:a=!1,onDriveToHomePress:o,onDriveToHomeRelease:s,connectedMotionGroup:i,robotComponent:l=Xf,cycleTimerComponent:c=wm,onCycleTimerReady:u,onCycleEnd:d,cycleTimerAutoStart:h=!0,className:p})=>{var W;const f=R.useTheme(),{t:m}=Re.useTranslation(),[y,S]=J.useState(!1),E=J.useRef(null),O=J.useRef(null),w=J.useRef(null),[T,P]=J.useState(!1),[C,I]=J.useState({width:400,height:600}),[z,b]=J.useState(0),A=J.useRef(null);J.useEffect(()=>{const X=()=>{if(w.current){const{offsetWidth:ve,offsetHeight:Ue}=w.current;P(ve>Ue),I({width:ve,height:Ue})}};X();const ue=new ResizeObserver(X);return w.current&&ue.observe(w.current),()=>{ue.disconnect()}},[]);const G=J.useCallback(()=>{b(X=>X+1)},[]),_=J.useCallback(()=>{!a||!o||(S(!0),o())},[a,o]),F=J.useCallback(()=>{!a||!s||(S(!1),s())},[a,s]),re=J.useCallback(()=>{y&&s&&(S(!1),s())},[y,s]),ee=J.useCallback(X=>{A.current=X,u&&u(X)},[u]),ae=T?C.width<350||C.height<250:C.width<250||C.height<180,se=ae?0:T?C.width<450?.8:C.width<550?.9:1:C.width<300?.8:C.width<400?.9:1;return g.jsx(R.Card,{ref:w,className:p,sx:{width:"100%",height:"100%",display:"flex",flexDirection:T?"row":"column",position:"relative",overflow:"hidden",minWidth:{xs:180,sm:220,md:250},minHeight:T?{xs:160,sm:200,md:250}:{xs:200,sm:280,md:350},border:`1px solid ${f.palette.divider}`,borderRadius:"18px",boxShadow:"none",backgroundColor:((W=f.palette.backgroundPaperElevation)==null?void 0:W[8])||"#2A2A3F",backgroundImage:"none"},children:T?g.jsxs(g.Fragment,{children:[g.jsx(R.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:ae?"none":"block"},children:!ae&&g.jsxs(Po.Canvas,{camera:{position:[4,4,4],fov:15},shadows:!0,frameloop:"demand",style:{borderRadius:f.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(Di,{}),g.jsx(ot.Bounds,{fit:!0,clip:!0,observe:!0,margin:1,children:g.jsx(Ih,{modelRenderTrigger:z,children:g.jsx("group",{ref:O,scale:se,children:g.jsx(l,{connectedMotionGroup:i,postModelRender:G})})})})]})}),g.jsxs(R.Box,{sx:{flex:"1",display:"flex",flexDirection:"column",justifyContent:"flex-start",width:ae?"100%":"50%"},children:[g.jsxs(R.Box,{sx:{p:{xs:1.5,sm:2,md:3},pb:{xs:1,sm:1.5,md:2},textAlign:"left"},children:[g.jsx(R.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(Cl,{programState:t,safetyState:r,operationMode:n})]}),g.jsxs(R.Box,{sx:{p:{xs:1.5,sm:2,md:3},pt:0,flex:"1",display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[g.jsxs(R.Box,{children:[g.jsx(R.Typography,{variant:"body1",sx:{mb:0,color:f.palette.text.secondary,textAlign:"left"},children:m("RobotCard.Runtime.lb")}),g.jsx(R.Box,{sx:{textAlign:"left"},children:g.jsx(c,{variant:"small",compact:!0,onCycleComplete:ee,onCycleEnd:d,autoStart:h})}),g.jsx(R.Divider,{sx:{mt:1,mb:0,borderColor:f.palette.divider,opacity:.5}})]}),g.jsx(R.Box,{sx:{mt:"auto"},children:g.jsx(R.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(R.Button,{ref:E,variant:"contained",color:"secondary",size:"small",disabled:!a,onMouseDown:_,onMouseUp:F,onMouseLeave:re,onTouchStart:_,onTouchEnd:F,sx:{textTransform:"none",px:1.5,py:.5},children:m("RobotCard.DriveToHome.bt")})})})]})]})]}):g.jsx(g.Fragment,{children:g.jsxs(R.Box,{sx:{p:3,height:"100%",display:"flex",flexDirection:"column"},children:[g.jsxs(R.Box,{children:[g.jsx(R.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(Cl,{programState:t,safetyState:r,operationMode:n})]}),g.jsx(R.Box,{sx:{flex:ae?0:1,position:"relative",minHeight:ae?0:{xs:120,sm:150,md:200},height:ae?0:"auto",borderRadius:1,overflow:"hidden",display:ae?"none":"block"},children:!ae&&g.jsxs(Po.Canvas,{camera:{position:[3,3,3],fov:20},shadows:!0,frameloop:"demand",style:{borderRadius:f.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(Di,{}),g.jsx(ot.Bounds,{fit:!0,observe:!0,margin:1,children:g.jsx(Ih,{modelRenderTrigger:z,children:g.jsx("group",{ref:O,scale:se,children:g.jsx(l,{connectedMotionGroup:i,postModelRender:G})})})})]})}),g.jsxs(R.Box,{children:[g.jsx(R.Typography,{variant:"body1",sx:{mb:0,color:f.palette.text.secondary},children:m("RobotCard.Runtime.lb")}),g.jsx(c,{variant:"small",compact:!0,onCycleComplete:ee,onCycleEnd:d,autoStart:h}),g.jsx(R.Divider,{sx:{mt:1,mb:0,borderColor:f.palette.divider,opacity:.5}}),g.jsx(R.Box,{sx:{display:"flex",justifyContent:"flex-start",mt:{xs:1,sm:2,md:5},mb:{xs:.5,sm:.75,md:1}},children:g.jsx(R.Button,{ref:E,variant:"contained",color:"secondary",size:"small",disabled:!a,onMouseDown:_,onMouseUp:F,onMouseLeave:re,onTouchStart:_,onTouchEnd:F,sx:{textTransform:"none",px:1.5,py:.5},children:m("RobotCard.DriveToHome.bt")})})]})]})})})})),y3=mr(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"),b3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,fill:"none",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.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"})),x3=J.forwardRef(b3);var _c=(e=>(e.PRECONDITION_NOT_FULFILLED="PRECONDITION_NOT_FULFILLED",e.ROBOT_DISCONNECTED="ROBOT_DISCONNECTED",e.READY="READY",e))(_c||{});const Zf=Ke(ye.observer(({setupState:e,className:t})=>{const r=R.useTheme(),{t:n}=Re.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(R.Chip,{className:t,label:g.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(R.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:s,flexShrink:0}}),g.jsx(R.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}}})})),v3=Ke(ye.observer(({robotName:e,robotType:t,setupState:r,PreconditionComponent:n=Zf,className:a})=>{var l;const o=R.useTheme(),s=t||"Robot",i=r===_c.READY;return g.jsxs(R.Box,{className:a,sx:{border:`1px solid ${o.palette.divider}`,background:((l=o.palette.backgroundPaperElevation)==null?void 0:l[8])||"#292B3F",height:80,minHeight:"80px",borderRadius:"8px",padding:"20px",display:"flex",alignItems:"center",justifyContent:"space-between",opacity:1},children:[g.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",gap:2,flex:1},children:[i?g.jsx(R.Box,{sx:{fontSize:24,display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,"& svg":{fill:`${o.palette.primary.main} !important`},"& svg path":{fill:`${o.palette.primary.main} !important`}},children:g.jsx(x3,{})}):g.jsx(y3,{sx:{color:o.palette.error.main,fontSize:24}}),g.jsx(R.Typography,{variant:"body1",sx:{fontWeight:500,color:o.palette.text.primary},children:e}),g.jsx(R.Divider,{orientation:"vertical",flexItem:!0,sx:{backgroundColor:o.palette.text.secondary,opacity:.3,width:"1px"}}),g.jsx(R.Typography,{variant:"body2",sx:{color:o.palette.text.secondary},children:s})]}),n&&g.jsx(n,{setupState:r})]})})),S3=Array(6).fill(2*Math.PI),O3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.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"})),w3=J.forwardRef(O3),C3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.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"})),P3=J.forwardRef(C3),Mt=ye.observer(({id:e,icon:t,color:r,title:n,name:a,label:o,explanation:s,literalValue:i,anchorOrigin:l,transformOrigin:c})=>{const u=ye.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(R.Stack,{"aria-owns":u.isPopoverOpen?e:void 0,"aria-haspopup":"true",onMouseEnter:u.openPopover,onMouseLeave:u.closePopover,direction:"row",spacing:1,sx:{cursor:"pointer"},children:[g.jsx(R.SvgIcon,{component:t,sx:{color:r}}),o&&g.jsx("div",{style:{color:r},children:o})]}),g.jsx(R.Popover,{id:e,sx:{pointerEvents:"none"},open:u.isPopoverOpen,anchorEl:u.anchorEl,anchorOrigin:l??{vertical:"bottom",horizontal:"left"},transformOrigin:c??{vertical:"top",horizontal:"left"},onClose:u.closePopover,disableRestoreFocus:!0,children:g.jsxs(R.Stack,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[g.jsxs("div",{children:[n&&g.jsx(R.Typography,{component:"span",fontSize:"14px",children:`${n}: `}),g.jsx(R.Typography,{component:"span",color:r,fontWeight:"bold",fontSize:"14px",children:a})]}),g.jsx(R.Typography,{fontSize:"14px",children:s}),i&&g.jsx(R.Typography,{fontSize:"12px",children:i})]})})]})}),T3=ye.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:r,transformOrigin:n,compact:a})=>{const o=R.useTheme(),{t:s}=Re.useTranslation();return e?g.jsx(Mt,{id:"motion-group-virtual",icon:P3,color:o.palette.tertiary.main,name:s("SafetyBar.ControllerType.Virtual.lb"),label:a?null:s("SafetyBar.ControllerType.Virtual.lb"),explanation:g.jsxs(Re.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(Mt,{id:"motion-group-physical",icon:w3,color:o.palette.primary.main,name:s("SafetyBar.ControllerType.Physical.lb"),label:a?null:s("SafetyBar.ControllerType.Physical.lb"),explanation:g.jsx(Re.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:g.jsx("code",{}),strong:g.jsx("strong",{})}}),anchorOrigin:r,transformOrigin:n})}),R3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.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"})),A3=J.forwardRef(R3),_3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.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})),E3=J.forwardRef(_3),V3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.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"})),I3=J.forwardRef(V3),M3=ye.observer(({operationMode:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:a}=Re.useTranslation(),o=R.useTheme();switch(e){case"OPERATION_MODE_AUTO":return g.jsx(Mt,{id:"operation-mode-auto",icon:A3,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(Re.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(Mt,{id:"operation-mode-manual",icon:I3,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(Re.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(Mt,{id:"operation-mode-error",icon:E3,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(Re.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})}}),j3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.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"})),k3=J.forwardRef(j3),$3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),N.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"}),N.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"})),U3=J.forwardRef($3),L3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.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})),D3=J.forwardRef(L3),B3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.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"})),N3=J.forwardRef(B3),F3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.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"})),z3=J.forwardRef(F3),G3=ye.observer(({safetyState:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:a}=Re.useTranslation(),o=R.useTheme();switch(e){case"SAFETY_STATE_NORMAL":return g.jsx(Mt,{id:"safety-state-normal",title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Normal.lb"),label:n?null:a("SafetyBar.SafetyState.Normal.lb"),icon:N3,color:o.palette.text.secondary,explanation:g.jsx(Re.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(Mt,{id:"safety-state-estop",title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Estop.lb"),label:n?null:a("SafetyBar.SafetyState.Estop.lb"),icon:U3,color:o.palette.error.main,explanation:g.jsx(Re.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(Mt,{id:"safety-state-stop",icon:z3,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(Re.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(Mt,{id:"safety-state-manual-action-required",icon:D3,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(Re.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(Mt,{id:"safety-state-error",icon:k3,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(Re.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:JV(e,`Unknown safety state ${e}`)}}),H3=Ke(ye.observer(({isVirtual:e,motionGroupId:t,operationMode:r,safetyState:n,anchorOrigin:a,transformOrigin:o,compact:s=!0})=>{const i=s?1:2;return g.jsxs(R.Stack,{direction:"row",gap:i,alignItems:"center",sx:{height:"24px"},children:[g.jsx(G3,{safetyState:n,anchorOrigin:a,transformOrigin:o,compact:s}),g.jsx(R.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(M3,{operationMode:r,anchorOrigin:a,transformOrigin:o,compact:s}),g.jsx(R.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(T3,{isVirtual:e,motionGroupId:t,anchorOrigin:a,transformOrigin:o,compact:s})]})})),q3=R.styled(R.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}}]}}),W3=J.forwardRef((e,t)=>g.jsx(q3,{ref:t,selected:e.selected,...e,color:"secondary",variant:"circular"}));function J3(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(R.Box,{children:t})})}const Y3=Ke(ye.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(R.Box,{sx:{height:"100%",display:"flex",flexDirection:"column",...a},children:[g.jsx(R.Box,{sx:{px:3,pt:3,pb:3},children:g.jsx(R.Tabs,{value:o,onChange:i,sx:{minHeight:"auto",backgroundColor:"transparent",mt:3,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:4}},children:t.map((l,c)=>g.jsx(R.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(R.Box,{sx:{mx:3,borderBottom:1,borderColor:"divider"}}),g.jsx(R.Box,{sx:{flex:1,overflow:"auto"},children:t.map((l,c)=>g.jsx(J3,{value:o,index:c,children:l.content},l.id))})]})})),K3={$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"},Q3=J.lazy(()=>import("@monaco-editor/react"));let Li=null;async function X3(){if(!Li){const[{createHighlighter:e},{shikiToMonaco:t}]=await Promise.all([import("shiki"),import("@shikijs/monaco")]);Li={shiki:await e({langs:[K3],themes:["dark-plus","light-plus"]}),shikiToMonaco:t}}return Li}const Z3=Ke(e=>{const t=R.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 X3();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(Sc,{}),children:g.jsx(Q3,{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 eg(){var t,r,n,a,o,s,i;const e=R.createTheme({palette:{mode:"dark",text:{primary:"rgba(255, 255, 255, 1)",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.38)"},primary:{main:"rgba(142, 86, 252, 1)",dark:"rgba(136, 58, 255, 1)",light:"rgba(157, 131, 246, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},secondary:{main:"rgba(255, 255, 255, 1)",dark:"rgba(255, 255, 255, 0.06)",contrastText:"rgba(255, 255, 255, 0.87)"},tertiary:{main:"rgba(100, 255, 218, 1)",dark:"rgba(38, 166, 154, 1)",light:"rgba(167, 255, 235, 1)",contrastText:"rgba(0, 0, 0, 1)"},error:{main:"rgba(239, 83, 80, 1)",dark:"rgba(229, 57, 53, 1)",light:"rgba(239, 154, 154, 1)",contrastText:"rgba(255, 255, 255, 1)"},warning:{main:"rgba(255, 171, 64, 1)",dark:"rgba(255, 145, 0, 1)",light:"rgba(255, 209, 128, 1)",contrastText:"rgba(0, 0, 0, 0.87)"},success:{main:"rgba(38, 166, 154, 1)",dark:"rgba(0, 121, 107, 1)",light:"rgba(128, 203, 196, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},background:{default:"rgba(2, 6, 23, 1)",paper:"rgba(17, 19, 31, 1)"},action:{active:"rgba(255, 255, 255, 0.56)",hover:"rgba(255, 255, 255, 0.08)",selected:"rgba(255, 255, 255, 0.16)",disabledBackground:"rgba(255, 255, 255, 0.12)",focus:"rgba(255, 255, 255, 0.12)",disabled:"rgba(255, 255, 255, 0.38)"},common:{white:"rgba(255, 255, 255, 1)",black:"rgba(0, 0, 0, 1)"},divider:"rgba(255, 255, 255, 0.12)",backgroundPaperElevation:{0:"rgba(17,19,31,1.0)",1:"rgba(20,22,35,1.0)",2:"rgba(23,25,39,1.0)",3:"rgba(26,28,43,1.0)",4:"rgba(29,31,47,1.0)",5:"rgba(32,34,51,1.0)",6:"rgba(35,37,55,1.0)",7:"rgba(38,40,59,1.0)",8:"rgba(41,43,63,1.0)",9:"rgba(44,46,67,1.0)",10:"rgba(47,49,71,1.0)",11:"rgba(50,52,75,1.0)",12:"rgba(53,55,79,1.0)",13:"rgba(56,58,83,1.0)",14:"rgba(59,61,87,1.0)",15:"rgba(62,64,91,1.0)",16:"rgba(57,63,87,1.0)"}},paletteExt:{primary:{hover:"rgba(142, 86, 252, 0.08)",selected:"rgba(142, 86, 252, 0.16)",focus:"rgba(142, 86, 252, 0.12)",focusVisible:"rgba(142, 86, 252, 0.3)",outlineBorder:"rgba(142, 86, 252, 0.5)"},secondary:{tonal:"rgba(255,255,255,0.1)"}}});return{...e,components:{MuiCssBaseline:{styleOverrides:{"html, body, *":{scrollbarWidth:"none",msOverflowStyle:"none"},"html:hover, body:hover, *:hover":{scrollbarWidth:"thin",scrollbarColor:`${e.palette.divider} transparent`}}},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":R.rgbToHex(((i=e.palette.backgroundPaperElevation)==null?void 0:i[5])??""),"editor.foreground":"#d4d4d4","editorLineNumber.foreground":"#797979","editorLineNumber.activeForeground":"#e9e9e9","editor.lineHighlightBorder":"#e9e9e911"}}}}}}function ej(){const e=eg();return e.palette.mode="light",e}function tj(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?eg():ej();return ep(r,e)}exports.AppTopBar=_g;exports.CycleTimer=wm;exports.JoggingCartesianAxisControl=rl;exports.JoggingJointRotationControl=_m;exports.JoggingPanel=Q5;exports.JoggingStore=Gs;exports.LoadingCover=Sc;exports.LoadingErrorMessage=Sf;exports.LogPanel=t3;exports.LogStore=qf;exports.LogViewer=Wf;exports.NoMotionGroupModal=n3;exports.PoseCartesianValues=Z5;exports.PoseJointValues=e3;exports.PresetEnvironment=Di;exports.ProgramControl=a3;exports.ProgramState=sn;exports.ProgramStateIndicator=Cl;exports.Robot=Xf;exports.RobotCard=g3;exports.RobotListItem=v3;exports.RobotSetupReadinessIndicator=Zf;exports.RobotSetupReadinessState=_c;exports.SafetyBar=H3;exports.SafetyZonesRenderer=wg;exports.SelectableFab=W3;exports.SupportedRobot=Qf;exports.TabBar=Y3;exports.TrajectoryRenderer=Cg;exports.ValueInterpolator=gc;exports.VelocitySlider=zf;exports.VelocitySliderLabel=Rc;exports.WandelbotsDataGrid=Cm;exports.WandelscriptEditor=Z3;exports.createNovaMuiTheme=tj;exports.defaultAxisConfig=S3;exports.defaultGetModel=Ac;exports.i18n=Tl;exports.useAnimationFrame=Tn;exports.useAutorun=Pm;exports.useInterpolation=Om;exports.useMounted=_s;exports.useReaction=Tm;
152
+ `,E);const{tcps:O}=yield t.api.motionGroupInfos.listTcps(r),C=yield t.api.motionGroupInfos.getMotionGroupSpecification(r),T=yield t.api.motionGroupInfos.getSafetySetup(r);return new bf(t,l,c,h,u,f,O,C,T,m,E,y)})}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 De.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 De.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 Ee(this,null,function*(){if(this.activationState!=="active"){console.error("Tried to deactivate while already deactivating");return}je.runInAction(()=>{this.activationState="deactivating"});try{yield this.nova.api.controller.setDefaultMode(this.controllerId,"MODE_MONITOR"),je.runInAction(()=>{this.activationState="inactive"})}catch(t){throw je.runInAction(()=>{this.activationState="active"}),t}})}activate(){return Ee(this,null,function*(){if(this.activationState!=="inactive"){console.error("Tried to activate while already activating");return}je.runInAction(()=>{this.activationState="activating"});try{yield this.nova.api.controller.setDefaultMode(this.controllerId,"MODE_CONTROL"),je.runInAction(()=>{this.activationState="active"})}catch(t){throw je.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}},BV=class xf{constructor(t,r={}){this.motionStream=t,this.opts=r,this.cartesianWebsocket=null,this.jointWebsocket=null,this.cartesianJoggingOpts={}}static open(t,r){return Ee(this,arguments,function*(n,a,o={}){const s=yield n.connectMotionStream(a);return new xf(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 Ee(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&&(GA(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=ir(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=ir(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 Ee(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 Ee(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 Ee(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 Ee(this,arguments,function*({currentTcpPose:r,currentJoints:n,coordSystemId:a,velocityInRelevantUnits:o,axis:s,direction:i,motion:l}){var c;const u=[];if(!s_(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 hn(r.orientation.x,r.orientation.y,r.orientation.z),f=p.length(),m=p.clone().normalize(),y=l.distanceRads*(i==="-"?-1:1),S=new hn(0,0,0);S[s]=1;const E=Math.cos(.5*y)*Math.cos(.5*f),O=Math.sin(.5*y)*Math.sin(.5*f),C=Math.sin(.5*y)*Math.cos(.5*f),T=Math.cos(.5*y)*Math.sin(.5*f),P=S.dot(m),w=S.clone().cross(m),I=2*Math.acos(E-O*P),z=I/Math.sin(.5*I),b=new hn().addScaledVector(w,O).addScaledVector(S,C).addScaledVector(m,T).multiplyScalar(z);u.push({settings:{limits_override:{tcp_orientation_velocity_limit:o}},line:{position:r.position,orientation:b,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 Ee(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})})}},rh=1e-4;function NV(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 FV=class vf{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=ir(s.data))==null?void 0:i.result;if(!l)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${s.data}`);gf(this.rapidlyChangingMotionState.state.joint_position.joints,l.state.joint_position.joints,rh)||je.runInAction(()=>{this.rapidlyChangingMotionState.state=l.state}),yf(this.rapidlyChangingMotionState.tcp_pose,l.tcp_pose,rh)||je.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose==null?this.rapidlyChangingMotionState.tcp_pose=l.tcp_pose:this.rapidlyChangingMotionState.tcp_pose={position:l.tcp_pose.position,orientation:NV(l.tcp_pose.orientation,this.rapidlyChangingMotionState.tcp_pose.orientation),tcp:l.tcp_pose.tcp,coordinate_system:l.tcp_pose.coordinate_system}})}),je.makeAutoObservable(this)}static open(t,r){return Ee(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=ir(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 vf(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()}},zV=class{constructor(e,t){this.cellId=e,this.opts=t,this.system=this.withUnwrappedResponsesOnly(TV),this.cell=this.withUnwrappedResponsesOnly(FE),this.deviceConfig=this.withCellId(KE),this.motionGroup=this.withCellId(lV),this.motionGroupInfos=this.withCellId(uV),this.controller=this.withCellId(GE),this.program=this.withCellId(gV),this.programValues=this.withCellId(bV),this.controllerIOs=this.withCellId(qE),this.motionGroupKinematic=this.withCellId(mV),this.motion=this.withCellId(sV),this.coordinateSystems=this.withCellId(JE),this.application=this.withCellId(Xd),this.applicationGlobal=this.withUnwrappedResponsesOnly(Xd),this.motionGroupJogging=this.withCellId(hV),this.virtualRobot=this.withCellId(AV),this.virtualRobotSetup=this.withCellId(jV),this.virtualRobotMode=this.withCellId(IV),this.virtualRobotBehavior=this.withCellId(EV),this.libraryProgramMetadata=this.withCellId(eV),this.libraryProgram=this.withCellId(XE),this.libraryRecipeMetadata=this.withCellId(aV),this.libraryRecipe=this.withCellId(rV),this.storeObject=this.withCellId(CV),this.storeCollisionComponents=this.withCellId(vV),this.storeCollisionScenes=this.withCellId(OV)}withCellId(e){var t,r;const n=new e(cl(on({},this.opts),{isJsonMime:a=>a==="application/json"}),(t=this.opts.basePath)!=null?t:"",(r=this.opts.axiosInstance)!=null?r:V.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(cl(on({},this.opts),{isJsonMime:a=>a==="application/json"}),(t=this.opts.basePath)!=null?t:"",(r=this.opts.axiosInstance)!=null?r:V.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}},GV=class{constructor(){this.connections=[]}handleAPIRequest(e){return Ee(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=DV.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 gl(`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(HV)})),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)}},HV={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"}}},qV=class{constructor(e){this.authPromise=null,this.accessToken=null;var t;const r=(t=e.cellId)!=null?t:"cell";this.config=on({cellId:r},e),this.accessToken=e.accessToken||Ri.getString("wbjs.access_token")||null,this.config.instanceUrl==="https://mock.example.com"&&(this.mock=new GV);const n=V.create({baseURL:ji(this.config.instanceUrl,"/api/v1"),headers:{"User-Agent":"Wandelbots-Nova-JS-SDK"}});n.interceptors.request.use(a=>Ee(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=>Ee(this,null,function*(){var o,s;if(DE(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 zV(r,cl(on({},e),{basePath:ji(this.config.instanceUrl,"/api/v1"),isJsonMime:a=>a==="application/json",baseOptions:on(on({},this.mock?{adapter:a=>this.mock.handleAPIRequest(a)}:{}),e.baseOptions),axiosInstance:n}))}renewAuthentication(){return Ee(this,null,function*(){if(!this.authPromise){this.authPromise=l_(this.config.instanceUrl);try{this.accessToken=yield this.authPromise,this.accessToken?Ri.setString("wbjs.access_token",this.accessToken):Ri.delete("wbjs.access_token")}finally{this.authPromise=null}}})}makeWebsocketURL(e){const t=new URL(ji(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 a_(this.makeWebsocketURL(e),{mock:this.mock})}connectMotionStream(e){return Ee(this,null,function*(){return yield FV.open(this,e)})}connectJogger(e){return Ee(this,null,function*(){return yield BV.open(this,e)})}connectMotionGroups(e){return Ee(this,null,function*(){const{instances:t}=yield this.api.controller.listControllers();return Promise.all(e.map(r=>LV.connect(this,r,t)))})}connectMotionGroup(e){return Ee(this,null,function*(){return(yield this.connectMotionGroups([e]))[0]})}};function WV(e){try{return JSON.stringify(e)}catch{return}}function JV(e,t){throw new Error(t+` ${JSON.stringify(e)}`)}function YV(e){var t,r,n,a;return e instanceof gl&&e.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":e instanceof gl&&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: ${WV(e)||e}`}const Sc=e=>{const t=e.softTimeout||3e3,[r,n]=J.useState(!1),a=R.useTheme();return J.useEffect(()=>{const o=setTimeout(()=>{n(!0)},t);return()=>clearTimeout(o)}),g.jsx(R.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{color:a.palette.text.primary},children:e.error?g.jsx(Sf,{loadingMessage:e.message,error:e.error}):g.jsxs(g.Fragment,{children:[g.jsx(R.CircularProgress,{sx:{marginBottom:"24px"}}),!!e.message&&g.jsx("div",{children:e.message}),g.jsx(R.Stack,{sx:{visibility:r?"visible":"hidden",marginTop:"1rem",color:a.palette.text.secondary},children:"This is taking longer than expected..."})]})})},Sf=e=>{const t=YV(e.error),r=e.error instanceof Error?e.error.stack:null,n=R.useTheme();return g.jsxs(R.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 ${Pl.lowerFirst(R.capitalize(e.loadingMessage))} - `:"")+t,g.jsx("br",{}),r&&g.jsx("pre",{children:r})]})},KV=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0",clipRule:"evenodd"})),QV=J.forwardRef(KV),XV=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0",clipRule:"evenodd"})),ZV=J.forwardRef(XV),e2=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:19,fill:"none",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M9.522 14.811A.899.899 0 1 0 8.25 13.54L6.19 15.601V3.16L8.25 5.221A.9.9 0 0 0 9.522 3.95L5.926.354a.9.9 0 0 0-1.272 0L1.058 3.95a.9.9 0 1 0 1.271 1.271L4.391 3.16v12.442L2.329 13.54a.899.899 0 1 0-1.271 1.271l3.596 3.597a.9.9 0 0 0 1.272 0z",clipRule:"evenodd"})),t2=J.forwardRef(e2),r2=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.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"})),n2=J.forwardRef(r2);function a2(){this.__data__=[],this.size=0}function Of(e,t){return e===t||e!==e&&t!==t}function Bs(e,t){for(var r=e.length;r--;)if(Of(e[r][0],t))return r;return-1}var o2=Array.prototype,s2=o2.splice;function i2(e){var t=this.__data__,r=Bs(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():s2.call(t,r,1),--this.size,!0}function l2(e){var t=this.__data__,r=Bs(t,e);return r<0?void 0:t[r][1]}function c2(e){return Bs(this.__data__,e)>-1}function u2(e,t){var r=this.__data__,n=Bs(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Xt(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])}}Xt.prototype.clear=a2;Xt.prototype.delete=i2;Xt.prototype.get=l2;Xt.prototype.has=c2;Xt.prototype.set=u2;function d2(){this.__data__=new Xt,this.size=0}function h2(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function p2(e){return this.__data__.get(e)}function m2(e){return this.__data__.has(e)}var f2="[object AsyncFunction]",g2="[object Function]",y2="[object GeneratorFunction]",b2="[object Proxy]";function wf(e){if(!Rr(e))return!1;var t=Ur(e);return t==g2||t==y2||t==f2||t==b2}var $i=Ut["__core-js_shared__"],nh=function(){var e=/[^.]+$/.exec($i&&$i.keys&&$i.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function x2(e){return!!nh&&nh in e}var v2=Function.prototype,S2=v2.toString;function Lr(e){if(e!=null){try{return S2.call(e)}catch{}try{return e+""}catch{}}return""}var O2=/[\\^$.*+?()[\]{}|]/g,w2=/^\[object .+?Constructor\]$/,C2=Function.prototype,P2=Object.prototype,T2=C2.toString,R2=P2.hasOwnProperty,A2=RegExp("^"+T2.call(R2).replace(O2,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _2(e){if(!Rr(e)||x2(e))return!1;var t=wf(e)?A2:w2;return t.test(Lr(e))}function E2(e,t){return e==null?void 0:e[t]}function Br(e,t){var r=E2(e,t);return _2(r)?r:void 0}var Oa=Br(Ut,"Map"),wa=Br(Object,"create");function V2(){this.__data__=wa?wa(null):{},this.size=0}function I2(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var M2="__lodash_hash_undefined__",j2=Object.prototype,$2=j2.hasOwnProperty;function k2(e){var t=this.__data__;if(wa){var r=t[e];return r===M2?void 0:r}return $2.call(t,e)?t[e]:void 0}var U2=Object.prototype,D2=U2.hasOwnProperty;function L2(e){var t=this.__data__;return wa?t[e]!==void 0:D2.call(t,e)}var B2="__lodash_hash_undefined__";function N2(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=wa&&t===void 0?B2:t,this}function Er(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Er.prototype.clear=V2;Er.prototype.delete=I2;Er.prototype.get=k2;Er.prototype.has=L2;Er.prototype.set=N2;function F2(){this.size=0,this.__data__={hash:new Er,map:new(Oa||Xt),string:new Er}}function z2(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ns(e,t){var r=e.__data__;return z2(t)?r[typeof t=="string"?"string":"hash"]:r.map}function G2(e){var t=Ns(this,e).delete(e);return this.size-=t?1:0,t}function H2(e){return Ns(this,e).get(e)}function q2(e){return Ns(this,e).has(e)}function W2(e,t){var r=Ns(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,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=F2;Zt.prototype.delete=G2;Zt.prototype.get=H2;Zt.prototype.has=q2;Zt.prototype.set=W2;var J2=200;function Y2(e,t){var r=this.__data__;if(r instanceof Xt){var n=r.__data__;if(!Oa||n.length<J2-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Zt(n)}return r.set(e,t),this.size=r.size,this}function Ht(e){var t=this.__data__=new Xt(e);this.size=t.size}Ht.prototype.clear=d2;Ht.prototype.delete=h2;Ht.prototype.get=p2;Ht.prototype.has=m2;Ht.prototype.set=Y2;var K2="__lodash_hash_undefined__";function Q2(e){return this.__data__.set(e,K2),this}function X2(e){return this.__data__.has(e)}function Ko(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Zt;++t<r;)this.add(e[t])}Ko.prototype.add=Ko.prototype.push=Q2;Ko.prototype.has=X2;function Z2(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 eI(e,t){return e.has(t)}var tI=1,rI=2;function Cf(e,t,r,n,a,o){var s=r&tI,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&rI?new Ko:void 0;for(o.set(e,t),o.set(t,e);++d<i;){var f=e[d],m=t[d];if(n)var y=s?n(m,f,d,t,e,o):n(f,m,d,e,t,o);if(y!==void 0){if(y)continue;h=!1;break}if(p){if(!Z2(t,function(S,E){if(!eI(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 ah=Ut.Uint8Array;function nI(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function aI(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var oI=1,sI=2,iI="[object Boolean]",lI="[object Date]",cI="[object Error]",uI="[object Map]",dI="[object Number]",hI="[object RegExp]",pI="[object Set]",mI="[object String]",fI="[object Symbol]",gI="[object ArrayBuffer]",yI="[object DataView]",oh=dr?dr.prototype:void 0,ki=oh?oh.valueOf:void 0;function bI(e,t,r,n,a,o,s){switch(r){case yI:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case gI:return!(e.byteLength!=t.byteLength||!o(new ah(e),new ah(t)));case iI:case lI:case dI:return Of(+e,+t);case cI:return e.name==t.name&&e.message==t.message;case hI:case mI:return e==t+"";case uI:var i=nI;case pI:var l=n&oI;if(i||(i=aI),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;n|=sI,s.set(e,t);var u=Cf(i(e),i(t),n,a,o,s);return s.delete(e),u;case fI:if(ki)return ki.call(e)==ki.call(t)}return!1}function xI(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var kt=Array.isArray;function vI(e,t,r){var n=t(e);return kt(e)?n:xI(n,r(e))}function SI(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 OI(){return[]}var wI=Object.prototype,CI=wI.propertyIsEnumerable,sh=Object.getOwnPropertySymbols,PI=sh?function(e){return e==null?[]:(e=Object(e),SI(sh(e),function(t){return CI.call(e,t)}))}:OI;function TI(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var RI="[object Arguments]";function ih(e){return Ar(e)&&Ur(e)==RI}var Pf=Object.prototype,AI=Pf.hasOwnProperty,_I=Pf.propertyIsEnumerable,Tf=ih(function(){return arguments}())?ih:function(e){return Ar(e)&&AI.call(e,"callee")&&!_I.call(e,"callee")};function EI(){return!1}var Rf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,lh=Rf&&typeof module=="object"&&module&&!module.nodeType&&module,VI=lh&&lh.exports===Rf,ch=VI?Ut.Buffer:void 0,II=ch?ch.isBuffer:void 0,bl=II||EI,MI=9007199254740991,jI=/^(?:0|[1-9]\d*)$/;function Af(e,t){var r=typeof e;return t=t??MI,!!t&&(r=="number"||r!="symbol"&&jI.test(e))&&e>-1&&e%1==0&&e<t}var $I=9007199254740991;function Oc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=$I}var kI="[object Arguments]",UI="[object Array]",DI="[object Boolean]",LI="[object Date]",BI="[object Error]",NI="[object Function]",FI="[object Map]",zI="[object Number]",GI="[object Object]",HI="[object RegExp]",qI="[object Set]",WI="[object String]",JI="[object WeakMap]",YI="[object ArrayBuffer]",KI="[object DataView]",QI="[object Float32Array]",XI="[object Float64Array]",ZI="[object Int8Array]",eM="[object Int16Array]",tM="[object Int32Array]",rM="[object Uint8Array]",nM="[object Uint8ClampedArray]",aM="[object Uint16Array]",oM="[object Uint32Array]",_e={};_e[QI]=_e[XI]=_e[ZI]=_e[eM]=_e[tM]=_e[rM]=_e[nM]=_e[aM]=_e[oM]=!0;_e[kI]=_e[UI]=_e[YI]=_e[DI]=_e[KI]=_e[LI]=_e[BI]=_e[NI]=_e[FI]=_e[zI]=_e[GI]=_e[HI]=_e[qI]=_e[WI]=_e[JI]=!1;function sM(e){return Ar(e)&&Oc(e.length)&&!!_e[Ur(e)]}function iM(e){return function(t){return e(t)}}var _f=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ia=_f&&typeof module=="object"&&module&&!module.nodeType&&module,lM=ia&&ia.exports===_f,Ui=lM&&Rm.process,uh=function(){try{var e=ia&&ia.require&&ia.require("util").types;return e||Ui&&Ui.binding&&Ui.binding("util")}catch{}}(),dh=uh&&uh.isTypedArray,Ef=dh?iM(dh):sM,cM=Object.prototype,uM=cM.hasOwnProperty;function dM(e,t){var r=kt(e),n=!r&&Tf(e),a=!r&&!n&&bl(e),o=!r&&!n&&!a&&Ef(e),s=r||n||a||o,i=s?TI(e.length,String):[],l=i.length;for(var c in e)uM.call(e,c)&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Af(c,l)))&&i.push(c);return i}var hM=Object.prototype;function pM(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||hM;return e===r}function mM(e,t){return function(r){return e(t(r))}}var fM=mM(Object.keys,Object),gM=Object.prototype,yM=gM.hasOwnProperty;function bM(e){if(!pM(e))return fM(e);var t=[];for(var r in Object(e))yM.call(e,r)&&r!="constructor"&&t.push(r);return t}function Vf(e){return e!=null&&Oc(e.length)&&!wf(e)}function wc(e){return Vf(e)?dM(e):bM(e)}function hh(e){return vI(e,wc,PI)}var xM=1,vM=Object.prototype,SM=vM.hasOwnProperty;function OM(e,t,r,n,a,o){var s=r&xM,i=hh(e),l=i.length,c=hh(t),u=c.length;if(l!=u&&!s)return!1;for(var d=l;d--;){var h=i[d];if(!(s?h in t:SM.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 y=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}y||(y=h=="constructor")}if(m&&!y){var C=e.constructor,T=t.constructor;C!=T&&"constructor"in e&&"constructor"in t&&!(typeof C=="function"&&C instanceof C&&typeof T=="function"&&T instanceof T)&&(m=!1)}return o.delete(e),o.delete(t),m}var xl=Br(Ut,"DataView"),vl=Br(Ut,"Promise"),Sl=Br(Ut,"Set"),Ol=Br(Ut,"WeakMap"),ph="[object Map]",wM="[object Object]",mh="[object Promise]",fh="[object Set]",gh="[object WeakMap]",yh="[object DataView]",CM=Lr(xl),PM=Lr(Oa),TM=Lr(vl),RM=Lr(Sl),AM=Lr(Ol),or=Ur;(xl&&or(new xl(new ArrayBuffer(1)))!=yh||Oa&&or(new Oa)!=ph||vl&&or(vl.resolve())!=mh||Sl&&or(new Sl)!=fh||Ol&&or(new Ol)!=gh)&&(or=function(e){var t=Ur(e),r=t==wM?e.constructor:void 0,n=r?Lr(r):"";if(n)switch(n){case CM:return yh;case PM:return ph;case TM:return mh;case RM:return fh;case AM:return gh}return t});var _M=1,bh="[object Arguments]",xh="[object Array]",lo="[object Object]",EM=Object.prototype,vh=EM.hasOwnProperty;function VM(e,t,r,n,a,o){var s=kt(e),i=kt(t),l=s?xh:or(e),c=i?xh:or(t);l=l==bh?lo:l,c=c==bh?lo:c;var u=l==lo,d=c==lo,h=l==c;if(h&&bl(e)){if(!bl(t))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new Ht),s||Ef(e)?Cf(e,t,r,n,a,o):bI(e,t,l,r,n,a,o);if(!(r&_M)){var p=u&&vh.call(e,"__wrapped__"),f=d&&vh.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,y=f?t.value():t;return o||(o=new Ht),a(m,y,r,n,o)}}return h?(o||(o=new Ht),OM(e,t,r,n,a,o)):!1}function Fs(e,t,r,n,a){return e===t?!0:e==null||t==null||!Ar(e)&&!Ar(t)?e!==e&&t!==t:VM(e,t,r,n,Fs,a)}function IM(e,t){return Fs(e,t)}const If=({store:e})=>{const{t}=Re.useTranslation(),[r,n]=J.useState(e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached),a=J.useRef(r);Tn(()=>{const s=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached;IM(a.current,s)||(a.current=s,n(s))});const o=[];for(const[s,i]of r.entries())i&&o.push(s);return g.jsx(R.Typography,{color:"error",sx:{margin:"0.5rem 1rem",textAlign:"center",minHeight:"1.5rem",visibility:o.length?"visible":"hidden"},children:t("Jogging.JointLimitsReached.lb",{jointNumbers:o.map(s=>s+1).join(", ")})})},MM=R.styled(R.FormControl)(({theme:e})=>({"&.MuiFormControl-root":{".MuiSelect-select":{paddingTop:"20px",paddingLeft:"12px"},label:{pointerEvents:"none",fontSize:"16px"},".MuiInputLabel-root":{"&.Mui-focused":{color:e.palette.text.primary}}}}));function co({labelValue:e,...t}){return g.jsxs(MM,{fullWidth:!0,variant:"filled",children:[g.jsx(R.InputLabel,{id:t.labelId,children:e}),g.jsx(R.Select,{...t})]})}var Sh=function(){try{var e=Br(Object,"defineProperty");return e({},"",{}),e}catch{}}();function jM(e,t,r){t=="__proto__"&&Sh?Sh(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function $M(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 kM(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 UM=kM();function DM(e,t){return e&&UM(e,t,wc)}function LM(e,t){return function(r,n){if(r==null)return r;if(!Vf(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 BM=LM(DM);function NM(e,t,r,n){return BM(e,function(a,o,s){t(n,a,r(a),s)}),n}var FM=1,zM=2;function GM(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 Ht,d;if(!(d===void 0?Fs(c,l,FM|zM,n,u):d))return!1}}return!0}function Mf(e){return e===e&&!Rr(e)}function HM(e){for(var t=wc(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,Mf(a)]}return t}function jf(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function qM(e){var t=HM(e);return t.length==1&&t[0][2]?jf(t[0][0],t[0][1]):function(r){return r===e||GM(r,e,t)}}var WM=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,JM=/^\w*$/;function Cc(e,t){if(kt(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Es(e)?!0:JM.test(e)||!WM.test(e)||t!=null&&e in Object(t)}var YM="Expected a function";function Pc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(YM);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(Pc.Cache||Zt),r}Pc.Cache=Zt;var KM=500;function QM(e){var t=Pc(e,function(n){return r.size===KM&&r.clear(),n}),r=t.cache;return t}var XM=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ZM=/\\(\\)?/g,e5=QM(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(XM,function(r,n,a,o){t.push(a?o.replace(ZM,"$1"):n||r)}),t});function t5(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 Oh=dr?dr.prototype:void 0,wh=Oh?Oh.toString:void 0;function $f(e){if(typeof e=="string")return e;if(kt(e))return t5(e,$f)+"";if(Es(e))return wh?wh.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function kf(e){return e==null?"":$f(e)}function Uf(e,t){return kt(e)?e:Cc(e,t)?[e]:e5(kf(e))}function zs(e){if(typeof e=="string"||Es(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Df(e,t){t=Uf(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[zs(t[r++])];return r&&r==n?e:void 0}function r5(e,t,r){var n=e==null?void 0:Df(e,t);return n===void 0?r:n}function n5(e,t){return e!=null&&t in Object(e)}function a5(e,t,r){t=Uf(t,e);for(var n=-1,a=t.length,o=!1;++n<a;){var s=zs(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&&Oc(a)&&Af(s,a)&&(kt(e)||Tf(e)))}function o5(e,t){return e!=null&&a5(e,t,n5)}var s5=1,i5=2;function l5(e,t){return Cc(e)&&Mf(t)?jf(zs(e),t):function(r){var n=r5(r,e);return n===void 0&&n===t?o5(r,e):Fs(t,n,s5|i5)}}function c5(e){return e}function u5(e){return function(t){return t==null?void 0:t[e]}}function d5(e){return function(t){return Df(t,e)}}function h5(e){return Cc(e)?u5(zs(e)):d5(e)}function p5(e){return typeof e=="function"?e:e==null?c5:typeof e=="object"?kt(e)?l5(e[0],e[1]):qM(e):h5(e)}function m5(e,t){return function(r,n){var a=kt(r)?$M:NM,o={};return a(r,e,p5(n),o)}}var uo=m5(function(e,t,r){jM(e,r,t)}),f5=0;function g5(e){var t=++f5;return kf(e)+t}const wl=[{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}],y5=[{id:"continuous"},...wl],b5=["coordsys","tool"];class Gs{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)||"",je.makeAutoObservable(this,{},{autoBind:!0}),this.loadFromLocalStorage(),this.disposers.push(je.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 Gs(t,n,a||[],o||[])}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}get coordSystemCountByName(){return Pl.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=Or.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 y5}get discreteIncrementOptions(){return wl}get incrementOptionsById(){return uo(this.incrementOptions,t=>t.id)}get tabsById(){return uo(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 uo(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 uo(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:wl.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=g5();this.lock(r);try{return await t()}finally{this.unlock(r)}}}const x5=ye.observer(({store:e})=>{var a;const{t}=Re.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(co,{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(R.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(co,{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(R.MenuItem,{value:o.id,children:o.id},o.id))},"tcp")),e.showOrientationSelect&&r.push(g.jsx(co,{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:b5.map(o=>g.jsx(R.MenuItem,{value:o,children:n(o)},o))},"orientation")),e.showIncrementSelect&&r.push(g.jsxs(co,{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(R.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(o=>g.jsx(R.MenuItem,{value:o.id,children:e.currentMotionType==="translate"?`${o.mm}mm`:`${o.degrees}°`},o.id))]},"increment")),g.jsx(R.Box,{component:"div",sx:{display:"grid",gap:"16px",gridTemplateColumns:"1fr 1fr",gridAutoRows:"min-content","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:r.map((o,s)=>g.jsx(R.Box,{sx:{gridColumn:r.length%2===1&&s===r.length-1?"span 2":"auto"},children:o},s))})}),v5=R.styled(R.ToggleButtonGroup)(({theme:e})=>{var t;return{"&.MuiToggleButtonGroup-root":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[8],borderRadius:"8px",padding:"4px",gap:"4px",button:{border:"none",borderRadius:"4px",flex:"1 1 0px",minWidth:0,"&.MuiToggleButtonGroup-firstButton":{borderRadius:"8px 4px 4px 8px"},"&.MuiToggleButtonGroup-lastButton":{borderRadius:"4px 8px 8px 4px"}}}}});function Ch(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function S5(e){return typeof e=="string"}function O5(e,t,r){return e===void 0||S5(e)?t:{...t,ownerState:{...t.ownerState,...r}}}function wo(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 Ph(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 w5(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=wo({...a,...n}),i=Ph(n),l=Ph(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 C5(e,t,r){return typeof e=="function"?e(t,r):e}function ar(e){var d;const{elementType:t,externalSlotProps:r,ownerState:n,skipResolvingSlotProps:a=!1,...o}=e,s=a?{}:C5(r,n),{props:i,internalRef:l}=w5({...o,externalSlotProps:s}),c=ds(l,s==null?void 0:s.ref,(d=e.additionalProps)==null?void 0:d.ref);return O5(t,{...i,ref:c},n)}function Th(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 P5={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function T5(e,t,r=(n,a)=>n===a){return e.length===t.length&&e.every((n,a)=>r(n,t[a]))}const R5=2;function rn(e,t,r,n,a){return r===1?Math.min(e+t,a):Math.max(e-t,n)}function Lf(e,t){return e-t}function Rh(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 ho(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 Qo(e,t,r){return(e-t)*100/(r-t)}function A5(e,t,r){return(r-t)*e+t}function _5(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 E5(e,t,r){const n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(_5(t)))}function Ah({values:e,newValue:t,index:r}){const n=e.slice();return n[r]=t,n.sort(Lf)}function po({sliderRef:e,activeIndex:t,setActive:r}){var a,o,s;const n=aa(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 mo(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?T5(e,t):!1}const V5={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}%`})}},I5=e=>e;let fo;function _h(){return fo===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?fo=CSS.supports("touch-action","none"):fo=!0),fo}function M5(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=I5,step:m=1,shiftStep:y=10,tabIndex:S,value:E}=e,O=N.useRef(void 0),[C,T]=N.useState(-1),[P,w]=N.useState(-1),[I,z]=N.useState(!1),b=N.useRef(0),A=N.useRef(null),[G,_]=Hw({controlled:E,default:r??l,name:"Slider"}),F=u&&((Q,ne,ie)=>{const fe=Q.nativeEvent||Q,Ce=new fe.constructor(fe.type,fe);Object.defineProperty(Ce,"target",{writable:!0,value:{value:ne,name:c}}),A.current=ne,u(Ce,ne,ie)}),re=Array.isArray(G);let ee=re?G.slice().sort(Lf):[G];ee=ee.map(Q=>Q==null?l:nn(Q,l,i));const ae=s===!0&&m!==null?[...Array(Math.floor((i-l)/m)+1)].map((Q,ne)=>({value:l+m*ne})):s||[],te=ae.map(Q=>Q.value),[se,W]=N.useState(-1),X=N.useRef(null),ue=ds(p,X),ve=Q=>ne=>{var fe;const ie=Number(ne.currentTarget.getAttribute("data-index"));Th(ne.target)&&W(ie),w(ie),(fe=Q==null?void 0:Q.onFocus)==null||fe.call(Q,ne)},Ue=Q=>ne=>{var ie;Th(ne.target)||W(-1),w(-1),(ie=Q==null?void 0:Q.onBlur)==null||ie.call(Q,ne)},we=(Q,ne)=>{const ie=Number(Q.currentTarget.getAttribute("data-index")),fe=ee[ie],Ce=te.indexOf(fe);let le=ne;if(ae&&m==null){const He=te[te.length-1];le>=He?le=He:le<=te[0]?le=te[0]:le=le<fe?te[Ce-1]:te[Ce+1]}if(le=nn(le,l,i),re){a&&(le=nn(le,ee[ie-1]||-1/0,ee[ie+1]||1/0));const He=le;le=Ah({values:ee,newValue:le,index:ie});let Ze=ie;a||(Ze=le.indexOf(He)),po({sliderRef:X,activeIndex:Ze})}_(le),W(ie),F&&!mo(le,G)&&F(Q,le,ie),d&&d(Q,A.current??le)},ct=Q=>ne=>{var ie;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(ne.key)){ne.preventDefault();const fe=Number(ne.currentTarget.getAttribute("data-index")),Ce=ee[fe];let le=null;if(m!=null){const He=ne.shiftKey?y:m;switch(ne.key){case"ArrowUp":le=rn(Ce,He,1,l,i);break;case"ArrowRight":le=rn(Ce,He,o?-1:1,l,i);break;case"ArrowDown":le=rn(Ce,He,-1,l,i);break;case"ArrowLeft":le=rn(Ce,He,o?1:-1,l,i);break;case"PageUp":le=rn(Ce,y,1,l,i);break;case"PageDown":le=rn(Ce,y,-1,l,i);break;case"Home":le=l;break;case"End":le=i;break}}else if(ae){const He=te[te.length-1],Ze=te.indexOf(Ce),Ne=[o?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],mt=[o?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];Ne.includes(ne.key)?Ze===0?le=te[0]:le=te[Ze-1]:mt.includes(ne.key)&&(Ze===te.length-1?le=He:le=te[Ze+1])}le!=null&&we(ne,le)}(ie=Q==null?void 0:Q.onKeyDown)==null||ie.call(Q,ne)};$t(()=>{var Q;n&&X.current.contains(document.activeElement)&&((Q=document.activeElement)==null||Q.blur())},[n]),n&&C!==-1&&T(-1),n&&se!==-1&&W(-1);const rt=Q=>ne=>{var ie;(ie=Q.onChange)==null||ie.call(Q,ne),we(ne,ne.target.valueAsNumber)},be=N.useRef(void 0);let Z=h;o&&h==="horizontal"&&(Z+="-reverse");const oe=({finger:Q,move:ne=!1})=>{const{current:ie}=X,{width:fe,height:Ce,bottom:le,left:He}=ie.getBoundingClientRect();let Ze;Z.startsWith("vertical")?Ze=(le-Q.y)/Ce:Ze=(Q.x-He)/fe,Z.includes("-reverse")&&(Ze=1-Ze);let Ne;if(Ne=A5(Ze,l,i),m)Ne=E5(Ne,m,l);else{const jn=Rh(te,Ne);Ne=te[jn]}Ne=nn(Ne,l,i);let mt=0;if(re){ne?mt=be.current:mt=Rh(ee,Ne),a&&(Ne=nn(Ne,ee[mt-1]||-1/0,ee[mt+1]||1/0));const jn=Ne;Ne=Ah({values:ee,newValue:Ne,index:mt}),a&&ne||(mt=Ne.indexOf(jn),be.current=mt)}return{newValue:Ne,activeIndex:mt}},ce=Gt(Q=>{const ne=ho(Q,O);if(!ne)return;if(b.current+=1,Q.type==="mousemove"&&Q.buttons===0){Y(Q);return}const{newValue:ie,activeIndex:fe}=oe({finger:ne,move:!0});po({sliderRef:X,activeIndex:fe,setActive:T}),_(ie),!I&&b.current>R5&&z(!0),F&&!mo(ie,G)&&F(Q,ie,fe)}),Y=Gt(Q=>{const ne=ho(Q,O);if(z(!1),!ne)return;const{newValue:ie}=oe({finger:ne,move:!0});T(-1),Q.type==="touchend"&&w(-1),d&&d(Q,A.current??ie),O.current=void 0,me()}),xe=Gt(Q=>{if(n)return;_h()||Q.preventDefault();const ne=Q.changedTouches[0];ne!=null&&(O.current=ne.identifier);const ie=ho(Q,O);if(ie!==!1){const{newValue:Ce,activeIndex:le}=oe({finger:ie});po({sliderRef:X,activeIndex:le,setActive:T}),_(Ce),F&&!mo(Ce,G)&&F(Q,Ce,le)}b.current=0;const fe=aa(X.current);fe.addEventListener("touchmove",ce,{passive:!0}),fe.addEventListener("touchend",Y,{passive:!0})}),me=N.useCallback(()=>{const Q=aa(X.current);Q.removeEventListener("mousemove",ce),Q.removeEventListener("mouseup",Y),Q.removeEventListener("touchmove",ce),Q.removeEventListener("touchend",Y)},[Y,ce]);N.useEffect(()=>{const{current:Q}=X;return Q.addEventListener("touchstart",xe,{passive:_h()}),()=>{Q.removeEventListener("touchstart",xe),me()}},[me,xe]),N.useEffect(()=>{n&&me()},[n,me]);const We=Q=>ne=>{var Ce;if((Ce=Q.onMouseDown)==null||Ce.call(Q,ne),n||ne.defaultPrevented||ne.button!==0)return;ne.preventDefault();const ie=ho(ne,O);if(ie!==!1){const{newValue:le,activeIndex:He}=oe({finger:ie});po({sliderRef:X,activeIndex:He,setActive:T}),_(le),F&&!mo(le,G)&&F(ne,le,He)}b.current=0;const fe=aa(X.current);fe.addEventListener("mousemove",ce,{passive:!0}),fe.addEventListener("mouseup",Y)},Ge=Qo(re?ee[0]:l,l,i),Me=Qo(ee[ee.length-1],l,i)-Ge,er=(Q={})=>{const ne=wo(Q),ie={onMouseDown:We(ne||{})},fe={...ne,...ie};return{...Q,ref:ue,...fe}},$a=Q=>ne=>{var fe;(fe=Q.onMouseOver)==null||fe.call(Q,ne);const ie=Number(ne.currentTarget.getAttribute("data-index"));w(ie)},ka=Q=>ne=>{var ie;(ie=Q.onMouseLeave)==null||ie.call(Q,ne),w(-1)},Ua=(Q={})=>{const ne=wo(Q),ie={onMouseOver:$a(ne||{}),onMouseLeave:ka(ne||{})};return{...Q,...ne,...ie}},Da=Q=>({pointerEvents:C!==-1&&C!==Q?"none":void 0});let Nr;return h==="vertical"&&(Nr=o?"vertical-rl":"vertical-lr"),{active:C,axis:Z,axisProps:V5,dragging:I,focusedThumbIndex:se,getHiddenInputProps:(Q={})=>{const ne=wo(Q),ie={onChange:rt(ne||{}),onFocus:ve(ne||{}),onBlur:Ue(ne||{}),onKeyDown:ct(ne||{})},fe={...ne,...ie};return{tabIndex:S,"aria-labelledby":t,"aria-orientation":h,"aria-valuemax":f(i),"aria-valuemin":f(l),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":e.step??void 0,disabled:n,...Q,...fe,style:{...P5,direction:o?"rtl":"ltr",width:"100%",height:"100%",writingMode:Nr}}},getRootProps:er,getThumbProps:Ua,marks:ae,open:P,range:re,rootRef:ue,trackLeap:Me,trackOffset:Ge,values:ee,getThumbStyle:Da}}function Co(e){return typeof e=="string"}const j5=e=>!e||!Co(e);function $5(e){return typeof e.main=="string"}function k5(e,t=[]){if(!$5(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function Tc(e=[]){return([,t])=>t&&k5(t,e)}function U5(e){return On("MuiSlider",e)}const bt=Al("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"]),D5=e=>{const{open:t}=e;return{offset:Pt(t&&bt.valueLabelOpen),circle:bt.valueLabelCircle,label:bt.valueLabelLabel}};function Bf(e){const{children:t,className:r,value:n}=e,a=D5(e);return t?N.cloneElement(t,{className:t.props.className},g.jsxs(N.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"&&(Bf.propTypes={children:x.element.isRequired,className:x.string,value:x.node});function Eh(e){return e}const L5=pt("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${et(r.color)}`],r.size!=="medium"&&t[`size${et(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})(kr(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${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(Tc()).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}}]}))),B5=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}}]}),N5=pt("span",{name:"MuiSlider",slot:"Track"})(kr(({theme:e})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(e.palette).filter(Tc()).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:ca(e.palette[t].main,.62),borderColor:ca(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:la(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:la(e.palette[t].main,.5)})}}}))]}))),F5=pt("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${et(r.color)}`],r.size!=="medium"&&t[`thumbSize${et(r.size)}`]]}})(kr(({theme:e})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${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(Tc()).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 ${Ni(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 ${Ni(e.palette[t].main,.16)}`}}}}))]}))),Nf=pt(Bf,{name:"MuiSlider",slot:"ValueLabel"})(kr(({theme:e})=>({zIndex:1,whiteSpace:"nowrap",...e.typography.body2,fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${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"&&(Nf.propTypes={children:x.element.isRequired,index:x.number.isRequired,open:x.bool.isRequired,value:x.node});const z5=pt("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>Vl(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})(kr(({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]}))),G5=pt("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>Vl(e)&&e!=="markLabelActive"})(kr(({theme:e})=>({...e.typography.body2,color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]}))),H5=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${et(i)}`,l&&`size${et(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${et(l)}`,i&&`thumbColor${et(i)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Xo(c,U5,s)},q5=({children:e})=>e,Ff=N.forwardRef(function(t,r){const n=yc({props:t,name:"MuiSlider"}),a=l0(),{"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:y,getAriaValueText:S,marks:E=!1,max:O=100,min:C=0,name:T,onChange:P,onChangeCommitted:w,orientation:I="horizontal",shiftStep:z=10,size:b="medium",step:A=1,scale:G=Eh,slotProps:_,slots:F,tabIndex:re,track:ee="normal",value:ae,valueLabelDisplay:te="off",valueLabelFormat:se=Eh,...W}=n,X={...n,isRtl:a,max:O,min:C,classes:h,disabled:m,disableSwap:f,orientation:I,marks:E,color:d,size:b,step:A,shiftStep:z,scale:G,track:ee,valueLabelDisplay:te,valueLabelFormat:se},{axisProps:ue,getRootProps:ve,getHiddenInputProps:Ue,getThumbProps:we,open:ct,active:rt,axis:be,focusedThumbIndex:Z,range:oe,dragging:ce,marks:Y,values:xe,trackOffset:me,trackLeap:We,getThumbStyle:Ge}=M5({...X,rootRef:r});X.marked=Y.length>0&&Y.some(Be=>Be.label),X.dragging=ce,X.focusedThumbIndex=Z;const Me=H5(X),er=(F==null?void 0:F.root)??c.Root??L5,$a=(F==null?void 0:F.rail)??c.Rail??B5,ka=(F==null?void 0:F.track)??c.Track??N5,Ua=(F==null?void 0:F.thumb)??c.Thumb??F5,Da=(F==null?void 0:F.valueLabel)??c.ValueLabel??Nf,Nr=(F==null?void 0:F.mark)??c.Mark??z5,La=(F==null?void 0:F.markLabel)??c.MarkLabel??G5,Q=(F==null?void 0:F.input)??c.Input??"input",ne=(_==null?void 0:_.root)??u.root,ie=(_==null?void 0:_.rail)??u.rail,fe=(_==null?void 0:_.track)??u.track,Ce=(_==null?void 0:_.thumb)??u.thumb,le=(_==null?void 0:_.valueLabel)??u.valueLabel,He=(_==null?void 0:_.mark)??u.mark,Ze=(_==null?void 0:_.markLabel)??u.markLabel,Ne=(_==null?void 0:_.input)??u.input,mt=ar({elementType:er,getSlotProps:ve,externalSlotProps:ne,externalForwardedProps:W,additionalProps:{...j5(er)&&{as:l}},ownerState:{...X,...ne==null?void 0:ne.ownerState},className:[Me.root,p]}),jn=ar({elementType:$a,externalSlotProps:ie,ownerState:X,className:Me.rail}),tg=ar({elementType:ka,externalSlotProps:fe,additionalProps:{style:{...ue[be].offset(me),...ue[be].leap(We)}},ownerState:{...X,...fe==null?void 0:fe.ownerState},className:Me.track}),Hs=ar({elementType:Ua,getSlotProps:we,externalSlotProps:Ce,ownerState:{...X,...Ce==null?void 0:Ce.ownerState},className:Me.thumb}),rg=ar({elementType:Da,externalSlotProps:le,ownerState:{...X,...le==null?void 0:le.ownerState},className:Me.valueLabel}),qs=ar({elementType:Nr,externalSlotProps:He,ownerState:X,className:Me.mark}),Ws=ar({elementType:La,externalSlotProps:Ze,ownerState:X,className:Me.markLabel}),ng=ar({elementType:Q,getSlotProps:Ue,externalSlotProps:Ne,ownerState:X});return g.jsxs(er,{...mt,children:[g.jsx($a,{...jn}),g.jsx(ka,{...tg}),Y.filter(Be=>Be.value>=C&&Be.value<=O).map((Be,Je)=>{const Js=Qo(Be.value,C,O),Ba=ue[be].offset(Js);let Dt;return ee===!1?Dt=xe.includes(Be.value):Dt=ee==="normal"&&(oe?Be.value>=xe[0]&&Be.value<=xe[xe.length-1]:Be.value<=xe[0])||ee==="inverted"&&(oe?Be.value<=xe[0]||Be.value>=xe[xe.length-1]:Be.value>=xe[0]),g.jsxs(N.Fragment,{children:[g.jsx(Nr,{"data-index":Je,...qs,...!Co(Nr)&&{markActive:Dt},style:{...Ba,...qs.style},className:Pt(qs.className,Dt&&Me.markActive)}),Be.label!=null?g.jsx(La,{"aria-hidden":!0,"data-index":Je,...Ws,...!Co(La)&&{markLabelActive:Dt},style:{...Ba,...Ws.style},className:Pt(Me.markLabel,Ws.className,Dt&&Me.markLabelActive),children:Be.label}):null]},Je)}),xe.map((Be,Je)=>{const Js=Qo(Be,C,O),Ba=ue[be].offset(Js),Dt=te==="off"?q5:Da;return g.jsx(Dt,{...!Co(Dt)&&{valueLabelFormat:se,valueLabelDisplay:te,value:typeof se=="function"?se(G(Be),Je):se,index:Je,open:ct===Je||rt===Je||te==="on",disabled:m},...rg,children:g.jsx(Ua,{"data-index":Je,...Hs,className:Pt(Me.thumb,Hs.className,rt===Je&&Me.active,Z===Je&&Me.focusVisible),style:{...Ba,...Ge(Je),...Hs.style},children:g.jsx(Q,{"data-index":Je,"aria-label":y?y(Je):o,"aria-valuenow":G(Be),"aria-labelledby":i,"aria-valuetext":S?S(G(Be),Je):s,value:xe[Je],...ng})})},Je)})]})});process.env.NODE_ENV!=="production"&&(Ff.propTypes={"aria-label":Ch(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":Ch(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 W5="[object Number]";function J5(e){return typeof e=="number"||Ar(e)&&Ur(e)==W5}const zf=ye.observer(e=>{var o,s,i;const t=R.useTheme(),{store:r}=e,{t:n}=Re.useTranslation();function a(l,c){c===e.velocity||!J5(c)||e.onVelocityChange(c)}return g.jsxs(R.Stack,{direction:"row",gap:2,alignItems:"center",children:[r.showVelocityLegend&&g.jsx(R.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(Ff,{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(Rc,{value:e.velocity.toString()}))]})});function Rc({value:e,sx:t}){var n;const r=R.useTheme();return g.jsx(R.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(R.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:r.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const Gf=ye.observer(({store:e})=>{const{t}=Re.useTranslation(),r=ye.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(zf,{store:e,velocity:e.velocityInDisplayUnits,min:e.minVelocityInDisplayUnits,max:e.maxVelocityInDisplayUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,renderValue:n=>g.jsx(Rc,{value:r.valueLabelFormat(n),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),Y5=ye.observer(({store:e,children:t})=>{const{t:r}=Re.useTranslation(),n=R.useTheme();function a(h,p){(p==="translate"||p==="rotate")&&e.setSelectedCartesianMotionType(p)}Tm(()=>[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,y=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:y,coordSystemId:e.activeCoordSystemId,velocityInRelevantUnits:e.selectedCartesianMotionType==="translate"?e.translationVelocityMmPerSec:e.rotationVelocityRadsPerSec,axis:h.axis,direction:h.direction,motion:e.selectedCartesianMotionType==="translate"?{type:"translate",distanceMm:p.mm}:{type:"rotate",distanceRads:Or.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 y,S,E;const m=(E=(S=(y=f.componentsExt)==null?void 0:y.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(QV,{}),colors:l("X",e.selectedCartesianMotionType,n)},{id:"y",icon:g.jsx(ZV,{}),colors:l("Y",e.selectedCartesianMotionType,n)},{id:"z",icon:g.jsx(t2,{}),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:Or.radiansToDegrees(h).toFixed(1)})}return g.jsxs(R.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsxs(R.Stack,{gap:2,children:[g.jsx(x5,{store:e}),g.jsx(Gf,{store:e}),g.jsx(R.Divider,{})]}),g.jsx(R.Stack,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:g.jsxs(R.Stack,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[g.jsxs(v5,{value:e.selectedCartesianMotionType,onChange:a,exclusive:!0,"aria-label":r("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[g.jsx(R.ToggleButton,{value:"translate",children:r("Jogging.Cartesian.Translation.bt")}),g.jsx(R.ToggleButton,{value:"rotate",children:r("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&c.map(h=>{var p,f;return g.jsx(rl,{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(R.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(rl,{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(n2,{}),g.jsx(R.Typography,{sx:{fontSize:"24px",color:((f=h.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var m,y;return d(((y=(m=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:m.orientation)==null?void 0:y[h.id])||0)},startJogging:m=>s({axis:h.id,motionType:"rotate",direction:m}),stopJogging:i},h.id)})]})}),g.jsx(If,{store:e}),t&&g.jsx(R.Divider,{}),t]})}),K5=ye.observer(({store:e,children:t})=>{const r=R.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(R.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsx(Gf,{store:e}),g.jsx(R.Divider,{}),g.jsx(R.Stack,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},id:"JointControls",children:g.jsx(R.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?Or.radiansToDegrees(s.lower_limit):void 0,l=(s==null?void 0:s.upper_limit)!==void 0?Or.radiansToDegrees(s.upper_limit):void 0;return g.jsxs(R.Stack,{direction:"row",alignItems:"center",justifyContent:"center",spacing:1.5,width:"100%",children:[e.showJointsLegend&&g.jsx(R.Typography,{color:e.isLocked?r.palette.text.disabled:r.palette.text.secondary,children:`G${o.index+1}`}),g.jsx(_m,{disabled:e.isLocked,lowerLimitDegs:i,upperLimitDegs:l,getValueDegs:()=>{const u=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position.joints[o.index];return u!==void 0?Or.radiansToDegrees(u):void 0},startJogging:u=>n({joint:o.index,direction:u}),stopJogging:a})]},`joint-${o.index}`)})})}),g.jsx(If,{store:e}),t&&g.jsx(R.Divider,{}),t]})}),Q5=Ke(ye.observer(e=>{const t=Pl.isString(e.nova)?new qV({instanceUrl:e.nova}):e.nova,r=ye.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function n(){je.runInAction(()=>{r.loadingError=null,r.joggingStore=null});try{let a=e.store;if(!a){const o=await t.connectJogger(e.motionGroupId);a=await Gs.loadFor(o)}je.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(R.Stack,{sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:r.joggingStore?g.jsx(X5,{store:r.joggingStore,children:e.children}):g.jsx(Sc,{message:"Loading jogging",error:r.loadingError})})})),X5=ye.observer(({store:e,children:t})=>{const{t:r}=Re.useTranslation();function n(){if(e.currentTab.id==="cartesian")return g.jsx(g.Fragment,{children:g.jsx(Y5,{store:e,children:t})});if(e.currentTab.id==="joint")return g.jsx(g.Fragment,{children:g.jsx(K5,{store:e,children:t})})}return g.jsxs(R.Stack,{flexGrow:1,sx:{overflow:"hidden"},children:[g.jsx(R.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(PC,{fontSize:"small",sx:{mr:1}}):g.jsx(TC,{fontSize:"small",sx:{mr:1}});return g.jsx(R.Tab,{label:e.showTabIcons?g.jsxs(R.Stack,{direction:"row",alignItems:"center",children:[s,o]}):o,id:`jogging-tab-${a.id}`,"aria-controls":`jogging-tab-${a.id}`},a.id)})}),g.jsx(R.Stack,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:n()})]})}),Hf=J.forwardRef(({label:e,value:t},r)=>{var i;const n=R.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(R.Tooltip,{open:a,title:"Copied!",children:g.jsx(R.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(R.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})})})}),Z5=ye.observer(({motionStream:e})=>{const t=J.useRef(null);function r(){const n=e.rapidlyChangingMotionState.tcp_pose;return n?Or.poseToWandelscriptString(n):""}return Tn(()=>{if(!t.current)return;const n=r();t.current.textContent!==n&&(t.current.textContent=n)}),g.jsx(R.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:g.jsx(Hf,{value:r(),ref:t})})}),e3=ye.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 Tn(()=>{if(!t.current)return;const n=r();t.current.textContent!==n&&(t.current.textContent=n)}),g.jsx(R.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:g.jsx(Hf,{value:r(),ref:t})})});class qf{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")},je.makeObservable(this,{messages:je.observable,addMessage:je.action,clearMessages:je.action})}}const Wf=Ke(ye.observer(e=>{var u;const{messages:t=[],onClear:r,height:n=400,sx:a}=e,o=R.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":default:return o.palette.text.secondary}},c=({message:d})=>{const[h,p]=J.useState(!1),[f,m]=J.useState(!1),[y,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(T){console.error("Failed to copy message:",T)}},C=E&&!h?d.message.substring(0,150)+"...":d.message;return g.jsx(R.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(R.Box,{sx:{display:"flex",gap:1},children:[g.jsxs(R.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:o.palette.text.disabled,whiteSpace:"nowrap",flexShrink:0},children:["[",i(d.timestamp),"]"]}),g.jsx(R.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:l(d.level),wordBreak:"break-word",overflowWrap:"anywhere",hyphens:"auto",flex:1,whiteSpace:"pre-wrap"},children:C}),g.jsxs(R.Box,{sx:{display:"flex",alignItems:"flex-start",gap:.5,opacity:y?1:0,transition:"opacity 0.2s ease-in-out",visibility:y?"visible":"hidden"},children:[g.jsx(R.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(Nt.ContentCopy,{sx:{fontSize:12}})}),E&&g.jsx(R.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(Nt.ExpandLess,{sx:{fontSize:12}}):g.jsx(Nt.ExpandMore,{sx:{fontSize:12}})})]})]})},d.id)};return g.jsxs(R.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(R.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px"},children:[g.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(Nt.DescriptionOutlined,{sx:{fontSize:16,color:o.palette.action.active,opacity:.56}}),g.jsx(R.Typography,{sx:{fontWeight:500,fontSize:"14px",lineHeight:"143%",letterSpacing:"0.17px",color:o.palette.text.primary},children:"Log"})]}),g.jsx(R.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(R.Box,{ref:s,sx:{flex:1,overflow:"auto",padding:"8px 16px",display:"flex",flexDirection:"column",gap:"2px"},children:t.length===0?g.jsx(R.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))})]})})),t3=Ke(ye.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 qf;return(l=a.current)==null||l.call(a,i),i},[t]),s=()=>{o.clearMessages()};return g.jsx(Wf,{...n,messages:o.messages,onClear:s})}));function r3(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function n3({baseUrl:e=r3(),...t}){return g.jsxs(R.Dialog,{"aria-labelledby":"no-motion-group-modal-title",open:!0,fullWidth:!0,sx:{"& .MuiModal-backdrop":{backdropFilter:"blur(10px)"},"& .MuiDialog-paper":{"::before":{content:'""',height:"8px",width:"100%",background:"linear-gradient(90deg, #FF0E65 0%, #47D3FF 100%)"},background:"#101629"}},children:[g.jsx(R.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),g.jsxs(R.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[g.jsx(R.Typography,{color:"#fff",children:"Found no devices to connect to."}),g.jsx(R.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),g.jsx(R.DialogActions,{children:g.jsxs(R.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[g.jsx(R.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),g.jsx(R.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}var sn=(e=>(e.IDLE="idle",e.RUNNING="running",e.PAUSED="paused",e.STOPPING="stopping",e))(sn||{});const a3=Ke(ye.observer(({state:e,onRun:t,onPause:r,onStop:n,onReset:a,requiresManualReset:o=!1,variant:s="with_pause",className:i})=>{const l=R.useTheme(),{t:c}=Re.useTranslation(),u=()=>{const p={run:{enabled:e==="idle"||e==="paused",label:c(e==="paused"?"ProgramControl.Resume.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(Nt.PlayArrow,{...f}):g.jsx(Nt.Stop,{...f});switch(p){case 0:return g.jsx(Nt.PlayArrow,{...f});case 1:return g.jsx(Nt.Pause,{...f});case 2:return g.jsx(Nt.Stop,{...f});default:return null}},h=u();return g.jsx(R.Box,{className:i,sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:g.jsx(R.Box,{sx:{display:"flex",gap:"40px",flexWrap:"wrap",justifyContent:"center",alignItems:"center"},children:h.map((p,f)=>g.jsxs(R.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[g.jsx(R.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(R.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))})})})),Cl=Ke(ye.observer(({programState:e,safetyState:t,operationMode:r,className:n})=>{const a=R.useTheme(),{t:o}=Re.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 sn.RUNNING:return{label:o("ProgramStateIndicator.Running.lb"),color:a.palette.success.main};case sn.PAUSED:return{label:o("ProgramStateIndicator.Paused.lb"),color:a.palette.grey[600]};case sn.STOPPING:return{label:o("ProgramStateIndicator.Stopped.lb"),color:a.palette.error.main};case sn.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(R.Chip,{className:n,label:g.jsx(R.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}}})})),Vh="0.0.0-semantically-released";function Ac(e){let t=Vh;return Vh.startsWith("0.")&&(t=""),`https://cdn.jsdelivr.net/gh/wandelbotsgmbh/wandelbots-js-react-components${t?`@${t}`:""}/public/models/${e}.glb`}function o3(e){function t(r){return r.children.length===0?[r]:[r,...r.children.flatMap(n=>t(n))]}return t(e).filter(r=>Yf(r))}function Jf(e){return e.name.endsWith("_FLG")}function Yf(e){return/_J[0-9]+$/.test(e.name)}function s3(e,t){let r;function n(a){if(Jf(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}Yf(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 Kf({rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:r,children:n}){const a=J.useRef([]),o=J.useRef([]),s=J.useRef(null),{invalidate:i}=Po.useThree();J.useEffect(()=>{const d=e.state.joint_position.joints.filter(h=>h!==void 0);return s.current=new gc(d,{tension:120,friction:20,threshold:.001}),()=>{var h;(h=s.current)==null||h.destroy()}},[]),Po.useFrame((d,h)=>{if(s.current){const p=s.current.update(h);u(),p||i()}});function l(d){d&&(o.current=o3(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],y=m.theta||0,S=m.reverse_rotation_direction?-1:1;f.rotation.y=S*(d[p]||0)+y}}return Pm(()=>{const d=e.state.joint_position.joints.filter(h=>h!==void 0);requestAnimationFrame(()=>c(d))}),g.jsx("group",{ref:l,children:n})}const i3="line",l3="mesh";function c3({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(Kf,{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(ot.Line,{ref:f=>{a.current[u]=f},name:i3,points:[d,h],color:"white",lineWidth:5}),g.jsxs("mesh",{ref:f=>{o.current[u]=f},name:l3,position:h,children:[g.jsx("sphereGeometry",{args:[.01,32,32]}),g.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]},"mesh_"+u)]},p)})]})})})}const u3=console.warn;function d3(){return J.useEffect(()=>{console.warn=e=>{e!=="Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"&&u3(e)}},[]),g.jsx(g.Fragment,{})}function h3(e){return e.type==="Mesh"}function p3({modelURL:e,flangeRef:t,postModelRender:r,...n}){const{gltf:a}=s3(ot.useGLTF(e),e.split("/").pop()||e),o=J.useCallback(i=>{i&&r&&r()},[e]);function s(i){return h3(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:Jf(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 m3=(e,t)=>{e.userData.isGhost||(e.traverse(r=>{if(r instanceof De.Mesh){r.material instanceof De.Material&&(r.material.colorWrite=!1);const n=r.clone(),a=r.clone();n.material=new De.MeshStandardMaterial({depthTest:!0,depthWrite:!0,colorWrite:!1,polygonOffset:!0,polygonOffsetFactor:-1,side:De.DoubleSide}),n.userData.isGhost=!0,a.material=new De.MeshStandardMaterial({color:t,opacity:.3,depthTest:!0,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-2,side:De.DoubleSide}),a.userData.isGhost=!0,r.parent&&(r.parent.add(n),r.parent.add(a))}}),e.userData.isGhost=!0)},f3=e=>{if(!e.userData.isGhost)return;const t=[];e.traverse(r=>{var n;r instanceof De.Mesh&&((n=r.userData)!=null&&n.isGhost?t.push(r):r.material instanceof De.Material&&(r.material.colorWrite=!0))}),t.forEach(r=>{r.parent&&r.parent.remove(r)}),e.userData.isGhost=!1},Qf=Ke(({rapidlyChangingMotionState:e,modelFromController:t,dhParameters:r,getModel:n=Ac,flangeRef:a,postModelRender:o,transparentColor:s,...i})=>{const[l,c]=J.useState(null),u=J.useCallback(h=>{c(h)},[]);J.useEffect(()=>{l&&(s?m3(l,s):f3(l))},[l,s]);const d=g.jsx(c3,{rapidlyChangingMotionState:e,dhParameters:r,...i});return g.jsxs(gg.ErrorBoundary,{fallback:d,onError:h=>{console.error(h)},children:[g.jsx(J.Suspense,{fallback:d,children:g.jsx("group",{ref:u,children:g.jsx(Kf,{rapidlyChangingMotionState:e,dhParameters:r,children:g.jsx(p3,{modelURL:n(t),postModelRender:o,flangeRef:a,...i})})})}),g.jsx(d3,{})]})});function Xf({connectedMotionGroup:e,getModel:t=Ac,flangeRef:r,transparentColor:n,postModelRender:a,...o}){return e.dhParameters?g.jsx(Qf,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:e.modelFromController||"",dhParameters:e.dhParameters,getModel:t,flangeRef:r,transparentColor:n,postModelRender:a,...o}):null}function Ih({modelRenderTrigger:e,children:t}){const r=ot.useBounds();return J.useEffect(()=>{e>0&&r.refresh().clip().fit()},[e,r]),g.jsx(g.Fragment,{children:t})}const g3=Ke(ye.observer(({robotName:e,programState:t,safetyState:r,operationMode:n,driveToHomeEnabled:a=!1,onDriveToHomePress:o,onDriveToHomeRelease:s,connectedMotionGroup:i,robotComponent:l=Xf,cycleTimerComponent:c=wm,onCycleTimerReady:u,onCycleEnd:d,cycleTimerAutoStart:h=!0,className:p})=>{var W;const f=R.useTheme(),{t:m}=Re.useTranslation(),[y,S]=J.useState(!1),E=J.useRef(null),O=J.useRef(null),C=J.useRef(null),[T,P]=J.useState(!1),[w,I]=J.useState({width:400,height:600}),[z,b]=J.useState(0),A=J.useRef(null);J.useEffect(()=>{const X=()=>{if(C.current){const{offsetWidth:ve,offsetHeight:Ue}=C.current;P(ve>Ue),I({width:ve,height:Ue})}};X();const ue=new ResizeObserver(X);return C.current&&ue.observe(C.current),()=>{ue.disconnect()}},[]);const G=J.useCallback(()=>{b(X=>X+1)},[]),_=J.useCallback(()=>{!a||!o||(S(!0),o())},[a,o]),F=J.useCallback(()=>{!a||!s||(S(!1),s())},[a,s]),re=J.useCallback(()=>{y&&s&&(S(!1),s())},[y,s]),ee=J.useCallback(X=>{A.current=X,u&&u(X)},[u]),ae=T?w.width<350||w.height<250:w.width<250||w.height<180,se=ae?0:T?w.width<450?.8:w.width<550?.9:1:w.width<300?.8:w.width<400?.9:1;return g.jsx(R.Card,{ref:C,className:p,sx:{width:"100%",height:"100%",display:"flex",flexDirection:T?"row":"column",position:"relative",overflow:"hidden",minWidth:{xs:180,sm:220,md:250},minHeight:T?{xs:160,sm:200,md:250}:{xs:200,sm:280,md:350},border:`1px solid ${f.palette.divider}`,borderRadius:"18px",boxShadow:"none",backgroundColor:((W=f.palette.backgroundPaperElevation)==null?void 0:W[8])||"#2A2A3F",backgroundImage:"none"},children:T?g.jsxs(g.Fragment,{children:[g.jsx(R.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:ae?"none":"block"},children:!ae&&g.jsxs(Po.Canvas,{camera:{position:[4,4,4],fov:15},shadows:!0,frameloop:"demand",style:{borderRadius:f.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(Li,{}),g.jsx(ot.Bounds,{fit:!0,clip:!0,observe:!0,margin:1,children:g.jsx(Ih,{modelRenderTrigger:z,children:g.jsx("group",{ref:O,scale:se,children:g.jsx(l,{connectedMotionGroup:i,postModelRender:G})})})})]})}),g.jsxs(R.Box,{sx:{flex:"1",display:"flex",flexDirection:"column",justifyContent:"flex-start",width:ae?"100%":"50%"},children:[g.jsxs(R.Box,{sx:{p:{xs:1.5,sm:2,md:3},pb:{xs:1,sm:1.5,md:2},textAlign:"left"},children:[g.jsx(R.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(Cl,{programState:t,safetyState:r,operationMode:n})]}),g.jsxs(R.Box,{sx:{p:{xs:1.5,sm:2,md:3},pt:0,flex:"1",display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[g.jsxs(R.Box,{children:[g.jsx(R.Typography,{variant:"body1",sx:{mb:0,color:f.palette.text.secondary,textAlign:"left"},children:m("RobotCard.Runtime.lb")}),g.jsx(R.Box,{sx:{textAlign:"left"},children:g.jsx(c,{variant:"small",compact:!0,onCycleComplete:ee,onCycleEnd:d,autoStart:h})}),g.jsx(R.Divider,{sx:{mt:1,mb:0,borderColor:f.palette.divider,opacity:.5}})]}),g.jsx(R.Box,{sx:{mt:"auto"},children:g.jsx(R.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(R.Button,{ref:E,variant:"contained",color:"secondary",size:"small",disabled:!a,onMouseDown:_,onMouseUp:F,onMouseLeave:re,onTouchStart:_,onTouchEnd:F,sx:{textTransform:"none",px:1.5,py:.5},children:m("RobotCard.DriveToHome.bt")})})})]})]})]}):g.jsx(g.Fragment,{children:g.jsxs(R.Box,{sx:{p:3,height:"100%",display:"flex",flexDirection:"column"},children:[g.jsxs(R.Box,{children:[g.jsx(R.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(Cl,{programState:t,safetyState:r,operationMode:n})]}),g.jsx(R.Box,{sx:{flex:ae?0:1,position:"relative",minHeight:ae?0:{xs:120,sm:150,md:200},height:ae?0:"auto",borderRadius:1,overflow:"hidden",display:ae?"none":"block"},children:!ae&&g.jsxs(Po.Canvas,{camera:{position:[3,3,3],fov:20},shadows:!0,frameloop:"demand",style:{borderRadius:f.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(Li,{}),g.jsx(ot.Bounds,{fit:!0,observe:!0,margin:1,children:g.jsx(Ih,{modelRenderTrigger:z,children:g.jsx("group",{ref:O,scale:se,children:g.jsx(l,{connectedMotionGroup:i,postModelRender:G})})})})]})}),g.jsxs(R.Box,{children:[g.jsx(R.Typography,{variant:"body1",sx:{mb:0,color:f.palette.text.secondary},children:m("RobotCard.Runtime.lb")}),g.jsx(c,{variant:"small",compact:!0,onCycleComplete:ee,onCycleEnd:d,autoStart:h}),g.jsx(R.Divider,{sx:{mt:1,mb:0,borderColor:f.palette.divider,opacity:.5}}),g.jsx(R.Box,{sx:{display:"flex",justifyContent:"flex-start",mt:{xs:1,sm:2,md:5},mb:{xs:.5,sm:.75,md:1}},children:g.jsx(R.Button,{ref:E,variant:"contained",color:"secondary",size:"small",disabled:!a,onMouseDown:_,onMouseUp:F,onMouseLeave:re,onTouchStart:_,onTouchEnd:F,sx:{textTransform:"none",px:1.5,py:.5},children:m("RobotCard.DriveToHome.bt")})})]})]})})})})),y3=mr(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"),b3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,fill:"none",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.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"})),x3=J.forwardRef(b3);var _c=(e=>(e.PRECONDITION_NOT_FULFILLED="PRECONDITION_NOT_FULFILLED",e.ROBOT_DISCONNECTED="ROBOT_DISCONNECTED",e.READY="READY",e))(_c||{});const Zf=Ke(ye.observer(({setupState:e,className:t})=>{const r=R.useTheme(),{t:n}=Re.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(R.Chip,{className:t,label:g.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(R.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:s,flexShrink:0}}),g.jsx(R.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}}})})),v3=Ke(ye.observer(({robotName:e,robotType:t,setupState:r,PreconditionComponent:n=Zf,className:a})=>{var l;const o=R.useTheme(),s=t||"Robot",i=r===_c.READY;return g.jsxs(R.Box,{className:a,sx:{border:`1px solid ${o.palette.divider}`,background:((l=o.palette.backgroundPaperElevation)==null?void 0:l[8])||"#292B3F",height:80,minHeight:"80px",borderRadius:"8px",padding:"20px",display:"flex",alignItems:"center",justifyContent:"space-between",opacity:1},children:[g.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",gap:2,flex:1},children:[i?g.jsx(R.Box,{sx:{fontSize:24,display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,"& svg":{fill:`${o.palette.primary.main} !important`},"& svg path":{fill:`${o.palette.primary.main} !important`}},children:g.jsx(x3,{})}):g.jsx(y3,{sx:{color:o.palette.error.main,fontSize:24}}),g.jsx(R.Typography,{variant:"body1",sx:{fontWeight:500,color:o.palette.text.primary},children:e}),g.jsx(R.Divider,{orientation:"vertical",flexItem:!0,sx:{backgroundColor:o.palette.text.secondary,opacity:.3,width:"1px"}}),g.jsx(R.Typography,{variant:"body2",sx:{color:o.palette.text.secondary},children:s})]}),n&&g.jsx(n,{setupState:r})]})})),S3=Array(6).fill(2*Math.PI),O3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.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"})),w3=J.forwardRef(O3),C3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.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"})),P3=J.forwardRef(C3),Mt=ye.observer(({id:e,icon:t,color:r,title:n,name:a,label:o,explanation:s,literalValue:i,anchorOrigin:l,transformOrigin:c})=>{const u=ye.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(R.Stack,{"aria-owns":u.isPopoverOpen?e:void 0,"aria-haspopup":"true",onMouseEnter:u.openPopover,onMouseLeave:u.closePopover,direction:"row",spacing:1,sx:{cursor:"pointer"},children:[g.jsx(R.SvgIcon,{component:t,sx:{color:r}}),o&&g.jsx("div",{style:{color:r},children:o})]}),g.jsx(R.Popover,{id:e,sx:{pointerEvents:"none"},open:u.isPopoverOpen,anchorEl:u.anchorEl,anchorOrigin:l??{vertical:"bottom",horizontal:"left"},transformOrigin:c??{vertical:"top",horizontal:"left"},onClose:u.closePopover,disableRestoreFocus:!0,children:g.jsxs(R.Stack,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[g.jsxs("div",{children:[n&&g.jsx(R.Typography,{component:"span",fontSize:"14px",children:`${n}: `}),g.jsx(R.Typography,{component:"span",color:r,fontWeight:"bold",fontSize:"14px",children:a})]}),g.jsx(R.Typography,{fontSize:"14px",children:s}),i&&g.jsx(R.Typography,{fontSize:"12px",children:i})]})})]})}),T3=ye.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:r,transformOrigin:n,compact:a})=>{const o=R.useTheme(),{t:s}=Re.useTranslation();return e?g.jsx(Mt,{id:"motion-group-virtual",icon:P3,color:o.palette.tertiary.main,name:s("SafetyBar.ControllerType.Virtual.lb"),label:a?null:s("SafetyBar.ControllerType.Virtual.lb"),explanation:g.jsxs(Re.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(Mt,{id:"motion-group-physical",icon:w3,color:o.palette.primary.main,name:s("SafetyBar.ControllerType.Physical.lb"),label:a?null:s("SafetyBar.ControllerType.Physical.lb"),explanation:g.jsx(Re.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:g.jsx("code",{}),strong:g.jsx("strong",{})}}),anchorOrigin:r,transformOrigin:n})}),R3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.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"})),A3=J.forwardRef(R3),_3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.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})),E3=J.forwardRef(_3),V3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.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"})),I3=J.forwardRef(V3),M3=ye.observer(({operationMode:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:a}=Re.useTranslation(),o=R.useTheme();switch(e){case"OPERATION_MODE_AUTO":return g.jsx(Mt,{id:"operation-mode-auto",icon:A3,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(Re.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(Mt,{id:"operation-mode-manual",icon:I3,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(Re.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(Mt,{id:"operation-mode-error",icon:E3,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(Re.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})}}),j3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.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"})),$3=J.forwardRef(j3),k3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),N.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"}),N.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"})),U3=J.forwardRef(k3),D3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.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})),L3=J.forwardRef(D3),B3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.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"})),N3=J.forwardRef(B3),F3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.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"})),z3=J.forwardRef(F3),G3=ye.observer(({safetyState:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:a}=Re.useTranslation(),o=R.useTheme();switch(e){case"SAFETY_STATE_NORMAL":return g.jsx(Mt,{id:"safety-state-normal",title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Normal.lb"),label:n?null:a("SafetyBar.SafetyState.Normal.lb"),icon:N3,color:o.palette.text.secondary,explanation:g.jsx(Re.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(Mt,{id:"safety-state-estop",title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Estop.lb"),label:n?null:a("SafetyBar.SafetyState.Estop.lb"),icon:U3,color:o.palette.error.main,explanation:g.jsx(Re.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(Mt,{id:"safety-state-stop",icon:z3,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(Re.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(Mt,{id:"safety-state-manual-action-required",icon:L3,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(Re.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(Mt,{id:"safety-state-error",icon:$3,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(Re.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:JV(e,`Unknown safety state ${e}`)}}),H3=Ke(ye.observer(({isVirtual:e,motionGroupId:t,operationMode:r,safetyState:n,anchorOrigin:a,transformOrigin:o,compact:s=!0})=>{const i=s?1:2;return g.jsxs(R.Stack,{direction:"row",gap:i,alignItems:"center",sx:{height:"24px"},children:[g.jsx(G3,{safetyState:n,anchorOrigin:a,transformOrigin:o,compact:s}),g.jsx(R.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(M3,{operationMode:r,anchorOrigin:a,transformOrigin:o,compact:s}),g.jsx(R.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(T3,{isVirtual:e,motionGroupId:t,anchorOrigin:a,transformOrigin:o,compact:s})]})})),q3=R.styled(R.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}}]}}),W3=J.forwardRef((e,t)=>g.jsx(q3,{ref:t,selected:e.selected,...e,color:"secondary",variant:"circular"}));function J3(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(R.Box,{children:t})})}const Y3=Ke(ye.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(R.Box,{sx:{height:"100%",display:"flex",flexDirection:"column",...a},children:[g.jsx(R.Box,{sx:{px:3,pt:3,pb:3},children:g.jsx(R.Tabs,{value:o,onChange:i,sx:{minHeight:"auto",backgroundColor:"transparent",mt:3,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:4}},children:t.map((l,c)=>g.jsx(R.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(R.Box,{sx:{mx:3,borderBottom:1,borderColor:"divider"}}),g.jsx(R.Box,{sx:{flex:1,overflow:"auto"},children:t.map((l,c)=>g.jsx(J3,{value:o,index:c,children:l.content},l.id))})]})})),K3={$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"},Q3=J.lazy(()=>import("@monaco-editor/react"));let Di=null;async function X3(){if(!Di){const[{createHighlighter:e},{shikiToMonaco:t}]=await Promise.all([import("shiki"),import("@shikijs/monaco")]);Di={shiki:await e({langs:[K3],themes:["dark-plus","light-plus"]}),shikiToMonaco:t}}return Di}const Z3=Ke(e=>{const t=R.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 X3();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(Sc,{}),children:g.jsx(Q3,{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 eg(){var t,r,n,a,o,s,i;const e=R.createTheme({palette:{mode:"dark",text:{primary:"rgba(255, 255, 255, 1)",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.38)"},primary:{main:"rgba(142, 86, 252, 1)",dark:"rgba(136, 58, 255, 1)",light:"rgba(157, 131, 246, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},secondary:{main:"rgba(255, 255, 255, 1)",dark:"rgba(255, 255, 255, 0.06)",contrastText:"rgba(255, 255, 255, 0.87)"},tertiary:{main:"rgba(100, 255, 218, 1)",dark:"rgba(38, 166, 154, 1)",light:"rgba(167, 255, 235, 1)",contrastText:"rgba(0, 0, 0, 1)"},error:{main:"rgba(239, 83, 80, 1)",dark:"rgba(229, 57, 53, 1)",light:"rgba(239, 154, 154, 1)",contrastText:"rgba(255, 255, 255, 1)"},warning:{main:"rgba(255, 171, 64, 1)",dark:"rgba(255, 145, 0, 1)",light:"rgba(255, 209, 128, 1)",contrastText:"rgba(0, 0, 0, 0.87)"},success:{main:"rgba(38, 166, 154, 1)",dark:"rgba(0, 121, 107, 1)",light:"rgba(128, 203, 196, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},background:{default:"rgba(2, 6, 23, 1)",paper:"rgba(17, 19, 31, 1)"},action:{active:"rgba(255, 255, 255, 0.56)",hover:"rgba(255, 255, 255, 0.08)",selected:"rgba(255, 255, 255, 0.16)",disabledBackground:"rgba(255, 255, 255, 0.12)",focus:"rgba(255, 255, 255, 0.12)",disabled:"rgba(255, 255, 255, 0.38)"},common:{white:"rgba(255, 255, 255, 1)",black:"rgba(0, 0, 0, 1)"},divider:"rgba(255, 255, 255, 0.12)",backgroundPaperElevation:{0:"rgba(17,19,31,1.0)",1:"rgba(20,22,35,1.0)",2:"rgba(23,25,39,1.0)",3:"rgba(26,28,43,1.0)",4:"rgba(29,31,47,1.0)",5:"rgba(32,34,51,1.0)",6:"rgba(35,37,55,1.0)",7:"rgba(38,40,59,1.0)",8:"rgba(41,43,63,1.0)",9:"rgba(44,46,67,1.0)",10:"rgba(47,49,71,1.0)",11:"rgba(50,52,75,1.0)",12:"rgba(53,55,79,1.0)",13:"rgba(56,58,83,1.0)",14:"rgba(59,61,87,1.0)",15:"rgba(62,64,91,1.0)",16:"rgba(57,63,87,1.0)"}},paletteExt:{primary:{hover:"rgba(142, 86, 252, 0.08)",selected:"rgba(142, 86, 252, 0.16)",focus:"rgba(142, 86, 252, 0.12)",focusVisible:"rgba(142, 86, 252, 0.3)",outlineBorder:"rgba(142, 86, 252, 0.5)"},secondary:{tonal:"rgba(255,255,255,0.1)"}}});return{...e,components:{MuiCssBaseline:{styleOverrides:{"html, body, *":{scrollbarWidth:"none",msOverflowStyle:"none"},"html:hover, body:hover, *:hover":{scrollbarWidth:"thin",scrollbarColor:`${e.palette.divider} transparent`}}},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":R.rgbToHex(((i=e.palette.backgroundPaperElevation)==null?void 0:i[5])??""),"editor.foreground":"#d4d4d4","editorLineNumber.foreground":"#797979","editorLineNumber.activeForeground":"#e9e9e9","editor.lineHighlightBorder":"#e9e9e911"}}}}}}function ej(){const e=eg();return e.palette.mode="light",e}function tj(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?eg():ej();return ep(r,e)}exports.AppTopBar=_g;exports.CycleTimer=wm;exports.JoggingCartesianAxisControl=rl;exports.JoggingJointRotationControl=_m;exports.JoggingPanel=Q5;exports.JoggingStore=Gs;exports.LoadingCover=Sc;exports.LoadingErrorMessage=Sf;exports.LogPanel=t3;exports.LogStore=qf;exports.LogViewer=Wf;exports.NoMotionGroupModal=n3;exports.PoseCartesianValues=Z5;exports.PoseJointValues=e3;exports.PresetEnvironment=Li;exports.ProgramControl=a3;exports.ProgramState=sn;exports.ProgramStateIndicator=Cl;exports.Robot=Xf;exports.RobotCard=g3;exports.RobotListItem=v3;exports.RobotSetupReadinessIndicator=Zf;exports.RobotSetupReadinessState=_c;exports.SafetyBar=H3;exports.SafetyZonesRenderer=wg;exports.SelectableFab=W3;exports.SupportedRobot=Qf;exports.TabBar=Y3;exports.TrajectoryRenderer=Cg;exports.ValueInterpolator=gc;exports.VelocitySlider=zf;exports.VelocitySliderLabel=Rc;exports.WandelbotsDataGrid=Cm;exports.WandelscriptEditor=Z3;exports.createNovaMuiTheme=tj;exports.defaultAxisConfig=S3;exports.defaultGetModel=Ac;exports.i18n=Tl;exports.useAnimationFrame=Tn;exports.useAutorun=Pm;exports.useInterpolation=Om;exports.useMounted=_s;exports.useReaction=Tm;
155
155
  //# sourceMappingURL=index.cjs.map