@wandelbots/wandelbots-js-react-components 2.54.5-pr.feat-upgrade-jogging-to-v2.404.a6b053a → 2.54.5-pr.feat-upgrade-jogging-to-v2.404.8d3f7c5
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 +38 -38
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2185 -3268
- package/dist/index.js.map +1 -1
- package/dist/lib/JoggerConnection.test.d.ts +2 -0
- package/dist/lib/JoggerConnection.test.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/lib/JoggerConnection.test.ts +120 -0
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var $f=Object.create;var ql=Object.defineProperty;var Nf=Object.getOwnPropertyDescriptor;var zf=Object.getOwnPropertyNames;var Gf=Object.getPrototypeOf,Hf=Object.prototype.hasOwnProperty;var qf=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of zf(t))!Hf.call(e,o)&&o!==r&&ql(e,o,{get:()=>t[o],enumerable:!(n=Nf(t,o))||n.enumerable});return e};var ga=(e,t,r)=>(r=e!=null?$f(Gf(e)):{},qf(t||!e||!e.__esModule?ql(r,"default",{value:e,enumerable:!0}):r,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("react"),wt=require("three"),kd=require("three-stdlib"),ht=require("@react-three/drei"),Xo=require("@react-three/fiber"),E=require("@mui/material"),ge=require("mobx-react-lite"),Ce=require("react-i18next"),Wf=require("i18next"),Jf=require("i18next-browser-languagedetector"),Yf=require("@mui/x-charts"),x=require("prop-types"),Kf=require("@emotion/react"),Qf=require("@emotion/styled"),Ct=require("@mui/x-data-grid"),We=require("mobx"),ji=require("lodash-es"),et=require("@wandelbots/nova-js"),Gt=require("@mui/icons-material"),Xf=require("react-error-boundary");function jd(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 _=jd(D),Te=jd(wt);function Zf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var So={exports:{}},Sn={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -14,19 +14,19 @@
|
|
|
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 Jl;function tm(){return Jl||(Jl=1,process.env.NODE_ENV!=="production"&&function(){function e(
|
|
17
|
+
*/var Jl;function tm(){return Jl||(Jl=1,process.env.NODE_ENV!=="production"&&function(){function e(F){if(F==null)return null;if(typeof F=="function")return F.$$typeof===y?null:F.displayName||F.name||null;if(typeof F=="string")return F;switch(F){case m:return"Fragment";case S:return"Profiler";case b:return"StrictMode";case I:return"Suspense";case T:return"SuspenseList";case k:return"Activity"}if(typeof F=="object")switch(typeof F.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),F.$$typeof){case f:return"Portal";case v:return(F.displayName||"Context")+".Provider";case P:return(F._context.displayName||"Context")+".Consumer";case O:var ee=F.render;return F=F.displayName,F||(F=ee.displayName||ee.name||"",F=F!==""?"ForwardRef("+F+")":"ForwardRef"),F;case w:return ee=F.displayName||null,ee!==null?ee:e(F.type)||"Memo";case R:ee=F._payload,F=F._init;try{return e(F(ee))}catch{}}return null}function t(F){return""+F}function r(F){try{t(F);var ee=!1}catch{ee=!0}if(ee){ee=console;var ce=ee.error,be=typeof Symbol=="function"&&Symbol.toStringTag&&F[Symbol.toStringTag]||F.constructor.name||"Object";return ce.call(ee,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",be),t(F)}}function n(F){if(F===m)return"<>";if(typeof F=="object"&&F!==null&&F.$$typeof===R)return"<...>";try{var ee=e(F);return ee?"<"+ee+">":"<...>"}catch{return"<...>"}}function o(){var F=A.A;return F===null?null:F.getOwner()}function s(){return Error("react-stack-top-frame")}function a(F){if(V.call(F,"key")){var ee=Object.getOwnPropertyDescriptor(F,"key").get;if(ee&&ee.isReactWarning)return!1}return F.key!==void 0}function i(F,ee){function ce(){ne||(ne=!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)",ee))}ce.isReactWarning=!0,Object.defineProperty(F,"key",{get:ce,configurable:!0})}function l(){var F=e(this.type);return Q[F]||(Q[F]=!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.")),F=this.props.ref,F!==void 0?F:null}function c(F,ee,ce,be,Me,xe,ut,nt){return ce=xe.ref,F={$$typeof:p,type:F,key:ee,props:xe,_owner:Me},(ce!==void 0?ce:null)!==null?Object.defineProperty(F,"ref",{enumerable:!1,get:l}):Object.defineProperty(F,"ref",{enumerable:!1,value:null}),F._store={},Object.defineProperty(F._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(F,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(F,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ut}),Object.defineProperty(F,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:nt}),Object.freeze&&(Object.freeze(F.props),Object.freeze(F)),F}function u(F,ee,ce,be,Me,xe,ut,nt){var Se=ee.children;if(Se!==void 0)if(be)if(M(Se)){for(be=0;be<Se.length;be++)d(Se[be]);Object.freeze&&Object.freeze(Se)}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(Se);if(V.call(ee,"key")){Se=e(F);var te=Object.keys(ee).filter(function(ue){return ue!=="key"});be=0<te.length?"{key: someKey, "+te.join(": ..., ")+": ...}":"{key: someKey}",se[Se+be]||(te=0<te.length?"{"+te.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} />`,be,Se,te,Se),se[Se+be]=!0)}if(Se=null,ce!==void 0&&(r(ce),Se=""+ce),a(ee)&&(r(ee.key),Se=""+ee.key),"key"in ee){ce={};for(var ae in ee)ae!=="key"&&(ce[ae]=ee[ae])}else ce=ee;return Se&&i(ce,typeof
|
|
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}}","CycleTimer.Time.lb":"{{time}}","CycleTimer.Error.lb":"Fehler","CycleTimer.WaitingForCycle.lb":"Warten auf Programmzyklus","CycleTimer.CycleTime.lb":"Zykluszeit","CycleTimer.Measuring.lb":"wird gemessen...","CycleTimer.Determined.lb":"bestimmt","Timer.error":"Fehler","ProgramControl.Start.bt":"Start","ProgramControl.Resume.bt":"Weiter","ProgramControl.Retry.bt":"Wiederholen","ProgramControl.Pause.bt":"Pause","ProgramControl.Stop.bt":"Stopp","ProgramStateIndicator.Preparing.lb":"Vorbereitung","ProgramStateIndicator.Starting.lb":"Startet","ProgramStateIndicator.Running.lb":"In Betrieb","ProgramStateIndicator.Pausing.lb":"Pausiert","ProgramStateIndicator.Stopping.lb":"Stoppt","ProgramStateIndicator.Completed.lb":"Abgeschlossen","ProgramStateIndicator.Failed.lb":"Fehlgeschlagen","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.CellOpen.lb":"Zelle offen","RobotSetupReadinessIndicator.EStop.lb":"Not-Stopp","RobotSetupReadinessIndicator.ManualMode.lb":"Manueller Modus","RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb":"Voraussetzung nicht erfüllt","RobotCard.Runtime.lb":"Laufzeit","RobotCard.DriveToHome.bt":"Zur Home-Position fahren"},hm={"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}}","CycleTimer.Time.lb":"{{time}}","CycleTimer.Error.lb":"Error","CycleTimer.WaitingForCycle.lb":"Waiting for program cycle","CycleTimer.CycleTime.lb":"Cycle Time","CycleTimer.Measuring.lb":"measuring...","CycleTimer.Determined.lb":"determined","Timer.error":"Error","ProgramControl.Start.bt":"Start","ProgramControl.Resume.bt":"Resume","ProgramControl.Retry.bt":"Retry","ProgramControl.Pause.bt":"Pause","ProgramControl.Stop.bt":"Stop","ProgramStateIndicator.Preparing.lb":"Preparing","ProgramStateIndicator.Starting.lb":"Starting","ProgramStateIndicator.Running.lb":"Running","ProgramStateIndicator.Pausing.lb":"Pausing","ProgramStateIndicator.Stopping.lb":"Stopping","ProgramStateIndicator.Completed.lb":"Completed","ProgramStateIndicator.Failed.lb":"Failed","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.CellOpen.lb":"Cell open","RobotSetupReadinessIndicator.EStop.lb":"E-Stop","RobotSetupReadinessIndicator.ManualMode.lb":"Manual mode","RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb":"Precondition not fulfilled","RobotCard.Runtime.lb":"Runtime","RobotCard.DriveToHome.bt":"Drive to Home"},Di=Wf.createInstance();Di.use(Jf).init({supportedLngs:["en","de"],resources:{en:{translations:hm},de:{translations:dm}},ns:["translations"],defaultNS:"translations",detection:{order:["navigator","htmlTag"]}});function Ue(e){return r=>g.jsx(pm,{children:g.jsx(e,{...r})})}const pm=({children:e})=>g.jsx(Ce.I18nextProvider,{i18n:Di,children:e}),fm=e=>g.jsx(E.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"})}),mm=Ue(ge.observer(e=>{const{appIcon:t,appName:r,apps:n=[],onAppSelect:o,disabled:s=!1,sx:a}=e,[i,l]=D.useState(null),c=!!i,u=p=>{l(p.currentTarget)},d=()=>{l(null)},h=p=>{d(),p.onClick?p.onClick():p.href&&(window.location.href=p.href),o==null||o(p)};return g.jsxs(g.Fragment,{children:[g.jsx(E.AppBar,{position:"static",sx:{boxShadow:"none",backgroundImage:"none","& .MuiAppBar-root":{backgroundImage:"none",backgroundColor:"transparent"},...a},children:g.jsxs(E.Toolbar,{sx:{minHeight:"62px !important"},children:[g.jsx(E.Box,{sx:{mr:1,display:"flex",alignItems:"center"},children:t}),g.jsxs(E.Box,{sx:{display:"flex",alignItems:"center",flexGrow:1},children:[g.jsx(E.Typography,{component:"h1",sx:{fontWeight:"bold",fontSize:"1rem"},children:r}),n.length>0&&g.jsx(E.IconButton,{color:"inherit","aria-label":"switch app","aria-controls":"app-menu","aria-haspopup":"true",onClick:u,disabled:s,sx:{ml:1,width:28,height:28,borderRadius:"6px",padding:0,backgroundColor:p=>E.alpha(p.palette.common.white,.1),opacity:1,"&:hover":{backgroundColor:p=>E.alpha(p.palette.common.white,.16)},"& .MuiSvgIcon-root":{fontSize:"8px",width:"8px",height:"6px"}},children:g.jsx(fm,{})})]})]})}),g.jsx(E.Backdrop,{open:c,onClick:d,sx:{backdropFilter:"blur(4px)",backgroundColor:"rgba(0, 0, 0, 0.3)",zIndex:p=>p.zIndex.modal-1}}),g.jsx(E.Menu,{id:"app-menu",anchorEl:i,open:c,onClose:d,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sx:{zIndex:p=>p.zIndex.modal,"& .MuiPaper-root":{minWidth:200,mt:1}},children:n.map(p=>g.jsxs(E.MenuItem,{onClick:()=>h(p),children:[g.jsx(E.Box,{sx:{display:"flex",alignItems:"center"},children:p.icon}),g.jsx(E.Typography,{variant:"body1",sx:{ml:2},children:p.name})]},p.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 ir(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 Cs(e,t,r=void 0){const n={};for(const o in e){const s=e[o];let a="",i=!0;for(let l=0;l<s.length;l+=1){const c=s[l];c&&(a+=(i===!0?"":" ")+t(c),i=!1,r&&r[c]&&(a+=" "+r[c]))}n[o]=a}return n}function Dd(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Dd(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Et(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Dd(e))&&(n&&(n+=" "),n+=t);return n}function lr(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 Ui="$$material";function gm(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var ym={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 bm(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var xm=/[A-Z]|^ms/g,Sm=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ud=function(t){return t.charCodeAt(1)===45},Kl=function(t){return t!=null&&typeof t!="boolean"},ya=bm(function(e){return Ud(e)?e:e.replace(xm,"-$&").toLowerCase()}),Xl=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Sm,function(n,o,s){return ar={name:o,styles:s,next:ar},o})}return ym[t]!==1&&!Ud(t)&&typeof r=="number"&&r!==0?r+"px":r};function Zo(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var o=r;if(o.anim===1)return ar={name:o.name,styles:o.styles,next:ar},o.name;var s=r;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)ar={name:a.name,styles:a.styles,next:ar},a=a.next;var i=s.styles+";";return i}return vm(e,t,r)}}var l=r;return l}function vm(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=Zo(e,t,r[o])+";";else for(var s in r){var a=r[s];if(typeof a!="object"){var i=a;Kl(i)&&(n+=ya(s)+":"+Xl(s,i)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var l=0;l<a.length;l++)Kl(a[l])&&(n+=ya(s)+":"+Xl(s,a[l])+";");else{var c=Zo(e,t,a);switch(s){case"animation":case"animationName":{n+=ya(s)+":"+c+";";break}default:n+=s+"{"+c+"}"}}}return n}var Ql=/label:\s*([^\s;{]+)\s*(;|$)/g,ar;function Cm(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";ar=void 0;var s=e[0];if(s==null||s.raw===void 0)n=!1,o+=Zo(r,t,s);else{var a=s;o+=a[0]}for(var i=1;i<e.length;i++)if(o+=Zo(r,t,e[i]),n){var l=s;o+=l[i]}Ql.lastIndex=0;for(var c="",u;(u=Ql.exec(o))!==null;)c+="-"+u[1];var d=gm(o)+c;return{name:d,styles:o,next:ar}}/**
|
|
22
|
+
<%s key={someKey} {...props} />`,be,Se,te,Se),se[Se+be]=!0)}if(Se=null,ce!==void 0&&(r(ce),Se=""+ce),a(ee)&&(r(ee.key),Se=""+ee.key),"key"in ee){ce={};for(var ae in ee)ae!=="key"&&(ce[ae]=ee[ae])}else ce=ee;return Se&&i(ce,typeof F=="function"?F.displayName||F.name||"Unknown":F),c(F,Se,xe,Me,o(),ce,ut,nt)}function d(F){typeof F=="object"&&F!==null&&F.$$typeof===p&&F._store&&(F._store.validated=1)}var h=D,p=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),P=Symbol.for("react.consumer"),v=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),y=Symbol.for("react.client.reference"),A=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=Object.prototype.hasOwnProperty,M=Array.isArray,j=console.createTask?console.createTask:function(){return null};h={"react-stack-bottom-frame":function(F){return F()}};var ne,Q={},oe=h["react-stack-bottom-frame"].bind(h,s)(),X=j(n(s)),se={};vn.Fragment=m,vn.jsx=function(F,ee,ce,be,Me){var xe=1e4>A.recentlyCreatedOwnerStacks++;return u(F,ee,ce,!1,be,Me,xe?Error("react-stack-top-frame"):oe,xe?j(n(F)):X)},vn.jsxs=function(F,ee,ce,be,Me){var xe=1e4>A.recentlyCreatedOwnerStacks++;return u(F,ee,ce,!0,be,Me,xe?Error("react-stack-top-frame"):oe,xe?j(n(F)):X)}}()),vn}var Yl;function rm(){return Yl||(Yl=1,process.env.NODE_ENV==="production"?So.exports=em():So.exports=tm()),So.exports}var g=rm();function nm(e){switch(e.shape_type){case"convex_hull":return new kd.ConvexGeometry(e.vertices.map(r=>new Te.Vector3(r[0]/1e3,r[1]/1e3,r[2]/1e3)));case"box":return new Te.BoxGeometry(e.size_x/1e3,e.size_y/1e3,e.size_z/1e3);case"sphere":return new Te.SphereGeometry(e.radius/1e3);case"capsule":return new Te.CapsuleGeometry(e.radius/1e3,e.cylinder_height/1e3);case"cylinder":return new Te.CylinderGeometry(e.radius/1e3,e.radius/1e3,e.height/1e3);case"rectangle":return new Te.BoxGeometry(e.size_x/1e3,e.size_y/1e3,0);default:return console.warn(`${e.shape_type} is not supported`),new Te.BufferGeometry}}function om({name:e,collider:t,children:r}){var s,a;const n=((s=t.pose)==null?void 0:s.position)??[0,0,0],o=((a=t.pose)==null?void 0:a.orientation)??[0,0,0];return t.margin&&console.warn(`${e} margin is not supported`),g.jsx("mesh",{name:e,position:new Te.Vector3(n[0],n[1],n[2]).divideScalar(1e3),rotation:new Te.Euler(o[0],o[1],o[2],"XYZ"),geometry:nm(t.shape),children:r})}function sm({name:e,colliders:t,meshChildrenProvider:r,...n}){return g.jsx("group",{name:e,...n,children:Object.entries(t).map(([o,s])=>g.jsx(om,{name:o,collider:s,children:r(o,s)},o))})}function am({scene:e,meshChildrenProvider:t}){const r=e.colliders;return g.jsx("group",{children:r&&g.jsx(sm,{meshChildrenProvider:t,colliders:r})})}function ri(){return g.jsx(ht.Environment,{children:g.jsx(im,{})})}function im({positions:e=[2,0,2,0,2,0,2,0]}){return g.jsxs(g.Fragment,{children:[g.jsx(ht.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(ht.Lightformer,{form:"circle",intensity:5,rotation:[Math.PI/2,0,0],position:[t,4,r*4],scale:[3,1,1]},r))})}),g.jsx(ht.Lightformer,{intensity:40,"rotation-y":Math.PI/2,position:[-5,1,-1],scale:[20,.1,1]}),g.jsx(ht.Lightformer,{intensity:20,"rotation-y":-Math.PI,position:[-5,-2,-1],scale:[20,.1,1]}),g.jsx(ht.Lightformer,{"rotation-y":Math.PI/2,position:[-5,-1,-1],scale:[20,.5,1],intensity:5}),g.jsx(ht.Lightformer,{"rotation-y":-Math.PI/2,position:[10,1,0],scale:[20,1,1],intensity:10}),g.jsx(ht.Lightformer,{form:"ring",color:"white",intensity:5,scale:10,position:[-15,4,-18],target:[0,0,0]})]})}function lm(e){if(e.length<3)return console.log("Not enough vertices to define a plane"),{isCoplanar:!1};const t=new Te.Vector3(e[0].x,e[0].y,e[0].z),r=new Te.Vector3(e[1].x,e[1].y,e[1].z),n=new Te.Vector3(e[2].x,e[2].y,e[2].z),o=new Te.Vector3().subVectors(r,t),s=new Te.Vector3().subVectors(n,t),a=new Te.Vector3().crossVectors(o,s).normalize();for(let i=3;i<e.length;i++){const l=new Te.Vector3(e[i].x,e[i].y,e[i].z),c=new Te.Vector3().subVectors(l,t),u=a.dot(c);if(Math.abs(u)>1e-6)return console.log("Vertices are not on the same plane"),{isCoplanar:!1}}return{isCoplanar:!0,normal:a}}function cm({safetyZones:e,...t}){return g.jsx("group",{...t,children:e.map((r,n)=>{let o=[];return r.geometry&&(r.geometry.compound?o=r.geometry.compound.child_geometries:r.geometry.convex_hull&&(o=[r.geometry])),o.map((s,a)=>{if(!s.convex_hull)return null;const i=s.convex_hull.vertices.map(u=>new Te.Vector3(u.x/1e3,u.y/1e3,u.z/1e3)),l=lm(i);if(l.isCoplanar&&l.normal){const d=new Te.Vector3().addVectors(i[0],l.normal.multiplyScalar(1e-4));i.push(d)}let c;try{c=new kd.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:-a},n)},`${n}-${a}`)})})})}function um({trajectory:e,...t}){var n;const r=((n=e.trajectory)==null?void 0:n.map(o=>o.tcp_pose?new Te.Vector3(o.tcp_pose.position.x/1e3,o.tcp_pose.position.z/1e3,-o.tcp_pose.position.y/1e3):null).filter(o=>o!==null))||[];return g.jsx("group",{...t,children:r.length>0&&g.jsx(ht.Line,{points:r,lineWidth:3,polygonOffset:!0,polygonOffsetFactor:10,polygonOffsetUnits:10})})}const dm={"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}}","CycleTimer.Time.lb":"{{time}}","CycleTimer.Error.lb":"Fehler","CycleTimer.WaitingForCycle.lb":"Warten auf Programmzyklus","CycleTimer.CycleTime.lb":"Zykluszeit","CycleTimer.Measuring.lb":"wird gemessen...","CycleTimer.Determined.lb":"bestimmt","Timer.error":"Fehler","ProgramControl.Start.bt":"Start","ProgramControl.Resume.bt":"Weiter","ProgramControl.Retry.bt":"Wiederholen","ProgramControl.Pause.bt":"Pause","ProgramControl.Stop.bt":"Stopp","ProgramStateIndicator.Preparing.lb":"Vorbereitung","ProgramStateIndicator.Starting.lb":"Startet","ProgramStateIndicator.Running.lb":"In Betrieb","ProgramStateIndicator.Pausing.lb":"Pausiert","ProgramStateIndicator.Stopping.lb":"Stoppt","ProgramStateIndicator.Completed.lb":"Abgeschlossen","ProgramStateIndicator.Failed.lb":"Fehlgeschlagen","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.CellOpen.lb":"Zelle offen","RobotSetupReadinessIndicator.EStop.lb":"Not-Stopp","RobotSetupReadinessIndicator.ManualMode.lb":"Manueller Modus","RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb":"Voraussetzung nicht erfüllt","RobotCard.Runtime.lb":"Laufzeit","RobotCard.DriveToHome.bt":"Zur Home-Position fahren"},hm={"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}}","CycleTimer.Time.lb":"{{time}}","CycleTimer.Error.lb":"Error","CycleTimer.WaitingForCycle.lb":"Waiting for program cycle","CycleTimer.CycleTime.lb":"Cycle Time","CycleTimer.Measuring.lb":"measuring...","CycleTimer.Determined.lb":"determined","Timer.error":"Error","ProgramControl.Start.bt":"Start","ProgramControl.Resume.bt":"Resume","ProgramControl.Retry.bt":"Retry","ProgramControl.Pause.bt":"Pause","ProgramControl.Stop.bt":"Stop","ProgramStateIndicator.Preparing.lb":"Preparing","ProgramStateIndicator.Starting.lb":"Starting","ProgramStateIndicator.Running.lb":"Running","ProgramStateIndicator.Pausing.lb":"Pausing","ProgramStateIndicator.Stopping.lb":"Stopping","ProgramStateIndicator.Completed.lb":"Completed","ProgramStateIndicator.Failed.lb":"Failed","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.CellOpen.lb":"Cell open","RobotSetupReadinessIndicator.EStop.lb":"E-Stop","RobotSetupReadinessIndicator.ManualMode.lb":"Manual mode","RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb":"Precondition not fulfilled","RobotCard.Runtime.lb":"Runtime","RobotCard.DriveToHome.bt":"Drive to Home"},Di=Wf.createInstance();Di.use(Jf).init({supportedLngs:["en","de"],resources:{en:{translations:hm},de:{translations:dm}},ns:["translations"],defaultNS:"translations",detection:{order:["navigator","htmlTag"]}});function Ue(e){return r=>g.jsx(pm,{children:g.jsx(e,{...r})})}const pm=({children:e})=>g.jsx(Ce.I18nextProvider,{i18n:Di,children:e}),fm=e=>g.jsx(E.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"})}),mm=Ue(ge.observer(e=>{const{appIcon:t,appName:r,apps:n=[],onAppSelect:o,disabled:s=!1,sx:a}=e,[i,l]=D.useState(null),c=!!i,u=p=>{l(p.currentTarget)},d=()=>{l(null)},h=p=>{d(),p.onClick?p.onClick():p.href&&(window.location.href=p.href),o==null||o(p)};return g.jsxs(g.Fragment,{children:[g.jsx(E.AppBar,{position:"static",sx:{boxShadow:"none",backgroundImage:"none","& .MuiAppBar-root":{backgroundImage:"none",backgroundColor:"transparent"},...a},children:g.jsxs(E.Toolbar,{sx:{minHeight:"62px !important"},children:[g.jsx(E.Box,{sx:{mr:1,display:"flex",alignItems:"center"},children:t}),g.jsxs(E.Box,{sx:{display:"flex",alignItems:"center",flexGrow:1},children:[g.jsx(E.Typography,{component:"h1",sx:{fontWeight:"bold",fontSize:"1rem"},children:r}),n.length>0&&g.jsx(E.IconButton,{color:"inherit","aria-label":"switch app","aria-controls":"app-menu","aria-haspopup":"true",onClick:u,disabled:s,sx:{ml:1,width:28,height:28,borderRadius:"6px",padding:0,backgroundColor:p=>E.alpha(p.palette.common.white,.1),opacity:1,"&:hover":{backgroundColor:p=>E.alpha(p.palette.common.white,.16)},"& .MuiSvgIcon-root":{fontSize:"8px",width:"8px",height:"6px"}},children:g.jsx(fm,{})})]})]})}),g.jsx(E.Backdrop,{open:c,onClick:d,sx:{backdropFilter:"blur(4px)",backgroundColor:"rgba(0, 0, 0, 0.3)",zIndex:p=>p.zIndex.modal-1}}),g.jsx(E.Menu,{id:"app-menu",anchorEl:i,open:c,onClose:d,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sx:{zIndex:p=>p.zIndex.modal,"& .MuiPaper-root":{minWidth:200,mt:1}},children:n.map(p=>g.jsxs(E.MenuItem,{onClick:()=>h(p),children:[g.jsx(E.Box,{sx:{display:"flex",alignItems:"center"},children:p.icon}),g.jsx(E.Typography,{variant:"body1",sx:{ml:2},children:p.name})]},p.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 ir(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 Cs(e,t,r=void 0){const n={};for(const o in e){const s=e[o];let a="",i=!0;for(let l=0;l<s.length;l+=1){const c=s[l];c&&(a+=(i===!0?"":" ")+t(c),i=!1,r&&r[c]&&(a+=" "+r[c]))}n[o]=a}return n}function Dd(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Dd(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Et(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Dd(e))&&(n&&(n+=" "),n+=t);return n}function lr(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 Ui="$$material";function gm(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var ym={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 bm(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var xm=/[A-Z]|^ms/g,Sm=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ud=function(t){return t.charCodeAt(1)===45},Kl=function(t){return t!=null&&typeof t!="boolean"},ya=bm(function(e){return Ud(e)?e:e.replace(xm,"-$&").toLowerCase()}),Ql=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Sm,function(n,o,s){return ar={name:o,styles:s,next:ar},o})}return ym[t]!==1&&!Ud(t)&&typeof r=="number"&&r!==0?r+"px":r};function Zo(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var o=r;if(o.anim===1)return ar={name:o.name,styles:o.styles,next:ar},o.name;var s=r;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)ar={name:a.name,styles:a.styles,next:ar},a=a.next;var i=s.styles+";";return i}return vm(e,t,r)}}var l=r;return l}function vm(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=Zo(e,t,r[o])+";";else for(var s in r){var a=r[s];if(typeof a!="object"){var i=a;Kl(i)&&(n+=ya(s)+":"+Ql(s,i)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var l=0;l<a.length;l++)Kl(a[l])&&(n+=ya(s)+":"+Ql(s,a[l])+";");else{var c=Zo(e,t,a);switch(s){case"animation":case"animationName":{n+=ya(s)+":"+c+";";break}default:n+=s+"{"+c+"}"}}}return n}var Xl=/label:\s*([^\s;{]+)\s*(;|$)/g,ar;function Cm(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";ar=void 0;var s=e[0];if(s==null||s.raw===void 0)n=!1,o+=Zo(r,t,s);else{var a=s;o+=a[0]}for(var i=1;i<e.length;i++)if(o+=Zo(r,t,e[i]),n){var l=s;o+=l[i]}Xl.lastIndex=0;for(var c="",u;(u=Xl.exec(o))!==null;)c+="-"+u[1];var d=gm(o)+c;return{name:d,styles:o,next:ar}}/**
|
|
24
24
|
* @mui/styled-engine v7.1.1
|
|
25
25
|
*
|
|
26
26
|
* @license MIT
|
|
27
27
|
* This source code is licensed under the MIT license found in the
|
|
28
28
|
* LICENSE file in the root directory of this source tree.
|
|
29
|
-
*/function wm(e,t){const r=
|
|
29
|
+
*/function wm(e,t){const r=Qf(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const o=typeof e=="string"?`"${e}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
30
30
|
`)):n.some(s=>s===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),r(...n)}:r}function Om(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Zl=[];function ec(e){return Zl[0]=e,Cm(Zl)}var vo={exports:{}},we={};/**
|
|
31
31
|
* @license React
|
|
32
32
|
* react-is.production.js
|
|
@@ -43,14 +43,14 @@ 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 rc;function Em(){return rc||(rc=1,process.env.NODE_ENV!=="production"&&function(){function e(m){if(typeof m=="object"&&m!==null){var b=m.$$typeof;switch(b){case t:switch(m=m.type,m){case n:case s:case o:case c:case u:case p:return m;default:switch(m=m&&m.$$typeof,m){case i:case l:case h:case d:return m;case a:return m;default:return b}}case r:return b}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=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=a,Oe.ContextProvider=i,Oe.Element=t,Oe.ForwardRef=l,Oe.Fragment=n,Oe.Lazy=h,Oe.Memo=d,Oe.Portal=r,Oe.Profiler=s,Oe.StrictMode=o,Oe.Suspense=c,Oe.SuspenseList=u,Oe.isContextConsumer=function(m){return e(m)===a},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)===s},Oe.isStrictMode=function(m){return e(m)===o},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===s||m===o||m===c||m===u||typeof m=="object"&&m!==null&&(m.$$typeof===h||m.$$typeof===d||m.$$typeof===i||m.$$typeof===a||m.$$typeof===l||m.$$typeof===f||m.getModuleId!==void 0)},Oe.typeOf=e}()),Oe}var nc;function Im(){return nc||(nc=1,process.env.NODE_ENV==="production"?vo.exports=Tm():vo.exports=Em()),vo.exports}var es=Im();function
|
|
47
|
-
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:lr(18,`(${t})`));return null}const[,n,o]=r,s=Number.isNaN(+n)?n||0:+n;return e.containerQueries(o).up(s)}function
|
|
46
|
+
*/var rc;function Em(){return rc||(rc=1,process.env.NODE_ENV!=="production"&&function(){function e(m){if(typeof m=="object"&&m!==null){var b=m.$$typeof;switch(b){case t:switch(m=m.type,m){case n:case s:case o:case c:case u:case p:return m;default:switch(m=m&&m.$$typeof,m){case i:case l:case h:case d:return m;case a:return m;default:return b}}case r:return b}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=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=a,Oe.ContextProvider=i,Oe.Element=t,Oe.ForwardRef=l,Oe.Fragment=n,Oe.Lazy=h,Oe.Memo=d,Oe.Portal=r,Oe.Profiler=s,Oe.StrictMode=o,Oe.Suspense=c,Oe.SuspenseList=u,Oe.isContextConsumer=function(m){return e(m)===a},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)===s},Oe.isStrictMode=function(m){return e(m)===o},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===s||m===o||m===c||m===u||typeof m=="object"&&m!==null&&(m.$$typeof===h||m.$$typeof===d||m.$$typeof===i||m.$$typeof===a||m.$$typeof===l||m.$$typeof===f||m.getModuleId!==void 0)},Oe.typeOf=e}()),Oe}var nc;function Im(){return nc||(nc=1,process.env.NODE_ENV==="production"?vo.exports=Tm():vo.exports=Em()),vo.exports}var es=Im();function _t(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 Ld(e){if(_.isValidElement(e)||es.isValidElementType(e)||!_t(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=Ld(e[r])}),t}function rt(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return _t(e)&&_t(t)&&Object.keys(t).forEach(o=>{_.isValidElement(t[o])||es.isValidElementType(t[o])?n[o]=t[o]:_t(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&_t(e[o])?n[o]=rt(e[o],t[o],r):r.clone?n[o]=_t(t[o])?Ld(t[o]):t[o]:n[o]=t[o]}),n}const Am=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 Pm(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...o}=e,s=Am(t),a=Object.keys(s);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=a.indexOf(p);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${r}) and (max-width:${(f!==-1&&typeof t[a[f]]=="number"?t[a[f]]:p)-n/100}${r})`}function u(h){return a.indexOf(h)+1<a.length?c(h,a[a.indexOf(h)+1]):i(h)}function d(h){const p=a.indexOf(h);return p===0?i(a[1]):p===a.length-1?l(a[p]):c(h,a[a.indexOf(h)+1]).replace("@media","@media not all and")}return{keys:a,values:s,up:i,down:l,between:c,only:u,not:d,unit:r,...o}}function Rm(e,t){if(!e.containerQueries)return t;const r=Object.keys(t).filter(n=>n.startsWith("@container")).sort((n,o)=>{var a,i;const s=/min-width:\s*([0-9.]+)/;return+(((a=n.match(s))==null?void 0:a[1])||0)-+(((i=o.match(s))==null?void 0:i[1])||0)});return r.length?r.reduce((n,o)=>{const s=t[o];return delete n[o],n[o]=s,n},{...t}):t}function Mm(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function Vm(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\`.`:lr(18,`(${t})`));return null}const[,n,o]=r,s=Number.isNaN(+n)?n||0:+n;return e.containerQueries(o).up(s)}function _m(e){const t=(s,a)=>s.replace("@media",a?`@container ${a}`:"@container");function r(s,a){s.up=(...i)=>t(e.breakpoints.up(...i),a),s.down=(...i)=>t(e.breakpoints.down(...i),a),s.between=(...i)=>t(e.breakpoints.between(...i),a),s.only=(...i)=>t(e.breakpoints.only(...i),a),s.not=(...i)=>{const l=t(e.breakpoints.not(...i),a);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const n={},o=s=>(r(n,s),n);return r(o),{...e,containerQueries:o}}const km={borderRadius:4},dr=process.env.NODE_ENV!=="production"?x.oneOfType([x.number,x.string,x.object,x.array]):{};function Un(e,t){return t?rt(e,t,{clone:!1}):e}const ws={xs:0,sm:600,md:900,lg:1200,xl:1536},oc={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ws[e]}px)`},jm={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:ws[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function It(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const s=n.breakpoints||oc;return t.reduce((a,i,l)=>(a[s.up(s.keys[l])]=r(t[l]),a),{})}if(typeof t=="object"){const s=n.breakpoints||oc;return Object.keys(t).reduce((a,i)=>{if(Mm(s.keys,i)){const l=Vm(n.containerQueries?n:jm,i);l&&(a[l]=r(t[i],i))}else if(Object.keys(s.values||ws).includes(i)){const l=s.up(i);a[l]=r(t[i],i)}else{const l=i;a[l]=t[l]}return a},{})}return r(t)}function Bd(e={}){var r;return((r=e.keys)==null?void 0:r.reduce((n,o)=>{const s=e.up(o);return n[s]={},n},{}))||{}}function Fd(e,t){return e.reduce((r,n)=>{const o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},t)}function Dm(e,...t){const r=Bd(e),n=[r,...t].reduce((o,s)=>rt(o,s),{});return Fd(Object.keys(r),n)}function Um(e,t){if(typeof e!="object")return{};const r={},n=Object.keys(t);return Array.isArray(e)?n.forEach((o,s)=>{s<e.length&&(r[o]=!0)}):n.forEach(o=>{e[o]!=null&&(r[o]=!0)}),r}function ba({values:e,breakpoints:t,base:r}){const n=r||Um(e,t),o=Object.keys(n);if(o.length===0)return e;let s;return o.reduce((a,i,l)=>(Array.isArray(e)?(a[i]=e[l]!=null?e[l]:e[s],s=l):typeof e=="object"?(a[i]=e[i]!=null?e[i]:e[s],s=i):a[i]=e,a),{})}function tt(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":lr(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Os(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((o,s)=>o&&o[s]?o[s]:null,e);if(n!=null)return n}return t.split(".").reduce((n,o)=>n&&n[o]!=null?n[o]:null,e)}function ts(e,t,r,n=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||n:o=Os(e,r)||n,t&&(o=t(o,n,e)),o}function je(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:o}=e,s=a=>{if(a[t]==null)return null;const i=a[t],l=a.theme,c=Os(l,n)||{};return It(a,i,d=>{let h=ts(c,o,d);return d===h&&typeof d=="string"&&(h=ts(c,o,`${t}${d==="default"?"":tt(d)}`,d)),r===!1?h:{[r]:h}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[t]:dr}:{},s.filterProps=[t],s}function Lm(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const Bm={m:"margin",p:"padding"},Fm={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},sc={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},$m=Lm(e=>{if(e.length>2)if(sc[e])e=sc[e];else return[e];const[t,r]=e.split(""),n=Bm[t],o=Fm[r]||"";return Array.isArray(o)?o.map(s=>n+s):[n+o]}),Ts=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Es=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Nm=[...Ts,...Es];function eo(e,t,r,n){const o=Os(e,t,!0)??r;return typeof o=="number"||typeof o=="string"?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&typeof s!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${s}.`),typeof o=="string"?o.startsWith("var(")&&s===0?0:o.startsWith("var(")&&s===1?o:`calc(${s} * ${o})`:o*s):Array.isArray(o)?s=>{if(typeof s=="string")return s;const a=Math.abs(s);process.env.NODE_ENV!=="production"&&(Number.isInteger(a)?a>o.length-1&&console.error([`MUI: The value provided (${a}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${a} > ${o.length-1}, you need to add the missing values.`].join(`
|
|
48
48
|
`)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
|
|
49
49
|
`)));const i=o[a];return s>=0?i:typeof i=="number"?-i:typeof i=="string"&&i.startsWith("var(")?`calc(-1 * ${i})`:`-${i}`}:typeof o=="function"?o:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join(`
|
|
50
|
-
`)),()=>{})}function Is(e){return eo(e,"spacing",8,"spacing")}function wr(e,t){return typeof t=="string"||t==null?t:e(t)}function zm(e,t){return r=>e.reduce((n,o)=>(n[o]=wr(t,r),n),{})}function Gm(e,t,r,n){if(!t.includes(r))return null;const o=Fm(r),s=zm(o,n),a=e[r];return It(e,a,s)}function Fd(e,t){const r=Is(e.theme);return Object.keys(e).map(n=>Gm(e,t,n,r)).reduce(Un,{})}function Ve(e){return Fd(e,Ts)}Ve.propTypes=process.env.NODE_ENV!=="production"?Ts.reduce((e,t)=>(e[t]=dr,e),{}):{};Ve.filterProps=Ts;function ke(e){return Fd(e,Es)}ke.propTypes=process.env.NODE_ENV!=="production"?Es.reduce((e,t)=>(e[t]=dr,e),{}):{};ke.filterProps=Es;process.env.NODE_ENV!=="production"&&$m.reduce((e,t)=>(e[t]=dr,e),{});function $d(e=8,t=Is({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(s=>{const a=t(s);return typeof a=="number"?`${a}px`:a}).join(" "));return r.mui=!0,r}function As(...e){const t=e.reduce((n,o)=>(o.filterProps.forEach(s=>{n[s]=o}),n),{}),r=n=>Object.keys(n).reduce((o,s)=>t[s]?Un(o,t[s](n)):o,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,o)=>Object.assign(n,o.propTypes),{}):{},r.filterProps=e.reduce((n,o)=>n.concat(o.filterProps),[]),r}function yt(e){return typeof e!="number"?e:`${e}px solid`}function vt(e,t){return je({prop:e,themeKey:"borders",transform:t})}const Hm=vt("border",yt),qm=vt("borderTop",yt),Wm=vt("borderRight",yt),Jm=vt("borderBottom",yt),Ym=vt("borderLeft",yt),Km=vt("borderColor"),Xm=vt("borderTopColor"),Qm=vt("borderRightColor"),Zm=vt("borderBottomColor"),eg=vt("borderLeftColor"),tg=vt("outline",yt),rg=vt("outlineColor"),Rs=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=eo(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:wr(t,n)});return It(e,e.borderRadius,r)}return null};Rs.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:dr}:{};Rs.filterProps=["borderRadius"];As(Hm,qm,Wm,Jm,Ym,Km,Xm,Qm,Zm,eg,Rs,tg,rg);const Ps=e=>{if(e.gap!==void 0&&e.gap!==null){const t=eo(e.theme,"spacing",8,"gap"),r=n=>({gap:wr(t,n)});return It(e,e.gap,r)}return null};Ps.propTypes=process.env.NODE_ENV!=="production"?{gap:dr}:{};Ps.filterProps=["gap"];const _s=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=eo(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:wr(t,n)});return It(e,e.columnGap,r)}return null};_s.propTypes=process.env.NODE_ENV!=="production"?{columnGap:dr}:{};_s.filterProps=["columnGap"];const Ms=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=eo(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:wr(t,n)});return It(e,e.rowGap,r)}return null};Ms.propTypes=process.env.NODE_ENV!=="production"?{rowGap:dr}:{};Ms.filterProps=["rowGap"];const ng=je({prop:"gridColumn"}),og=je({prop:"gridRow"}),sg=je({prop:"gridAutoFlow"}),ag=je({prop:"gridAutoColumns"}),ig=je({prop:"gridAutoRows"}),lg=je({prop:"gridTemplateColumns"}),cg=je({prop:"gridTemplateRows"}),ug=je({prop:"gridTemplateAreas"}),dg=je({prop:"gridArea"});As(Ps,_s,Ms,ng,og,sg,ag,ig,lg,cg,ug,dg);function Qr(e,t){return t==="grey"?t:e}const hg=je({prop:"color",themeKey:"palette",transform:Qr}),pg=je({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Qr}),fg=je({prop:"backgroundColor",themeKey:"palette",transform:Qr});As(hg,pg,fg);function pt(e){return e<=1&&e!==0?`${e*100}%`:e}const mg=je({prop:"width",transform:pt}),Li=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var o,s,a,i,l;const n=((a=(s=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:s.values)==null?void 0:a[r])||ws[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:pt(r)}};return It(e,e.maxWidth,t)}return null};Li.filterProps=["maxWidth"];const gg=je({prop:"minWidth",transform:pt}),yg=je({prop:"height",transform:pt}),bg=je({prop:"maxHeight",transform:pt}),xg=je({prop:"minHeight",transform:pt});je({prop:"size",cssProperty:"width",transform:pt});je({prop:"size",cssProperty:"height",transform:pt});const Sg=je({prop:"boxSizing"});As(mg,Li,gg,yg,bg,xg,Sg);const to={border:{themeKey:"borders",transform:yt},borderTop:{themeKey:"borders",transform:yt},borderRight:{themeKey:"borders",transform:yt},borderBottom:{themeKey:"borders",transform:yt},borderLeft:{themeKey:"borders",transform:yt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:yt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Rs},color:{themeKey:"palette",transform:Qr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Qr},backgroundColor:{themeKey:"palette",transform:Qr},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:Ve},mt:{style:Ve},mr:{style:Ve},mb:{style:Ve},ml:{style:Ve},mx:{style:Ve},my:{style:Ve},margin:{style:Ve},marginTop:{style:Ve},marginRight:{style:Ve},marginBottom:{style:Ve},marginLeft:{style:Ve},marginX:{style:Ve},marginY:{style:Ve},marginInline:{style:Ve},marginInlineStart:{style:Ve},marginInlineEnd:{style:Ve},marginBlock:{style:Ve},marginBlockStart:{style:Ve},marginBlockEnd:{style:Ve},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:Ps},rowGap:{style:Ms},columnGap:{style:_s},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:pt},maxWidth:{style:Li},minWidth:{transform:pt},height:{transform:pt},maxHeight:{transform:pt},minHeight:{transform:pt},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 vg(...e){const t=e.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function Cg(e,t){return typeof e=="function"?e(t):e}function wg(){function e(r,n,o,s){const a={[r]:n,theme:o},i=s[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=Os(o,c)||{};return d?d(a):It(a,n,f=>{let m=ts(h,u,f);return f===m&&typeof f=="string"&&(m=ts(h,u,`${r}${f==="default"?"":tt(f)}`,f)),l===!1?m:{[l]:m}})}function t(r){const{sx:n,theme:o={}}=r||{};if(!n)return null;const s=o.unstable_sxConfig??to;function a(i){let l=i;if(typeof i=="function")l=i(o);else if(typeof i!="object")return i;if(!l)return null;const c=Bd(o.breakpoints),u=Object.keys(c);let d=c;return Object.keys(l).forEach(h=>{const p=Cg(l[h],o);if(p!=null)if(typeof p=="object")if(s[h])d=Un(d,e(h,p,o,s));else{const f=It({theme:o},p,m=>({[h]:m}));vg(f,p)?d[h]=t({sx:p,theme:o}):d=Un(d,f)}else d=Un(d,e(h,p,o,s))}),Pm(o,Nd(u,d))}return Array.isArray(n)?n.map(a):a(n)}return t}const nn=wg();nn.filterProps=["sx"];function Og(e,t){var n;const r=this;if(r.vars){if(!((n=r.colorSchemes)!=null&&n[e])||typeof r.getColorSchemeSelector!="function")return{};let o=r.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return r.palette.mode===e?t:{}}function Vs(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:s={},...a}=e,i=Rm(r),l=$d(o);let c=rt({breakpoints:i,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:l,shape:{...km,...s}},a);return c=Vm(c),c.applyStyles=Og,c=t.reduce((u,d)=>rt(u,d),c),c.unstable_sxConfig={...to,...a==null?void 0:a.unstable_sxConfig},c.unstable_sx=function(d){return nn({sx:d,theme:this})},c}function Tg(e){return Object.keys(e).length===0}function Eg(e=null){const t=V.useContext(Kf.ThemeContext);return!t||Tg(t)?e:t}const Ig=Vs();function zd(e=Ig){return Eg(e)}const Ag=e=>{var n;const t={systemProps:{},otherProps:{}},r=((n=e==null?void 0:e.theme)==null?void 0:n.unstable_sxConfig)??to;return Object.keys(e).forEach(o=>{r[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t};function Rg(e){const{sx:t,...r}=e,{systemProps:n,otherProps:o}=Ag(r);let s;return Array.isArray(t)?s=[n,...t]:typeof t=="function"?s=(...a)=>{const i=t(...a);return Vt(i)?{...n,...i}:n}:s={...n,...t},{...o,sx:s}}const ac=e=>e,Pg=()=>{let e=ac;return{configure(t){e=t},generate(t){return e(t)},reset(){e=ac}}},_g=Pg(),Mg={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 pn(e,t,r="Mui"){const n=Mg[t];return n?`${r}-${n}`:`${_g.generate(e)}-${t}`}function Bi(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=pn(e,o,r)}),n}function Gd(e,t=""){return e.displayName||e.name||t}function ic(e,t,r){const n=Gd(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function Vg(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Gd(e,"Component");if(typeof e=="object")switch(e.$$typeof){case es.ForwardRef:return ic(e,e.render,"ForwardRef");case es.Memo:return ic(e,e.type,"memo");default:return}}}function Hd(e){const{variants:t,...r}=e,n={variants:t,style:ec(r),isProcessed:!0};return n.style===r||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=ec(o.style))}),n}const kg=Vs();function xa(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function jg(e){return e?(t,r)=>r[e]:null}function Dg(e,t,r){e.theme=Bg(e.theme)?r:e.theme[t]||e.theme}function zo(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>zo(e,n));if(Array.isArray(r==null?void 0:r.variants)){let n;if(r.isProcessed)n=r.style;else{const{variants:o,...s}=r;n=s}return qd(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function qd(e,t,r=[]){var o;let n;e:for(let s=0;s<t.length;s+=1){const a=t[s];if(typeof a.props=="function"){if(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),!a.props(n))continue}else for(const i in a.props)if(e[i]!==a.props[i]&&((o=e.ownerState)==null?void 0:o[i])!==a.props[i])continue e;typeof a.style=="function"?(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),r.push(a.style(n))):r.push(a.style)}return r}function Wd(e={}){const{themeId:t,defaultTheme:r=kg,rootShouldForwardProp:n=xa,slotShouldForwardProp:o=xa}=e;function s(i){Dg(i,t,r)}return(i,l={})=>{Om(i,I=>I.filter(T=>T!==nn));const{name:c,slot:u,skipVariantsResolver:d,skipSx:h,overridesResolver:p=jg(Jd(u)),...f}=l,m=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,b=h||!1;let S=xa;u==="Root"||u==="root"?S=n:u?S=o:Ng(i)&&(S=void 0);const R=wm(i,{shouldForwardProp:S,label:Lg(c,u),...f}),v=I=>{if(I.__emotion_real===I)return I;if(typeof I=="function")return function(w){return zo(w,I)};if(Vt(I)){const T=Hd(I);return T.variants?function(P){return zo(P,T)}:T.style}return I},O=(...I)=>{const T=[],w=I.map(v),P=[];if(T.push(s),c&&p&&P.push(function(M){var X,oe;const j=(oe=(X=M.theme.components)==null?void 0:X[c])==null?void 0:oe.styleOverrides;if(!j)return null;const ne={};for(const Q in j)ne[Q]=zo(M,j[Q]);return p(M,ne)}),c&&!m&&P.push(function(M){var ne,X;const _=M.theme,j=(X=(ne=_==null?void 0:_.components)==null?void 0:ne[c])==null?void 0:X.variants;return j?qd(M,j):null}),b||P.push(nn),Array.isArray(w[0])){const A=w.shift(),M=new Array(T.length).fill(""),_=new Array(P.length).fill("");let j;j=[...M,...A,..._],j.raw=[...M,...A.raw,..._],T.unshift(j)}const k=[...T,...w,...P],y=R(...k);return i.muiName&&(y.muiName=i.muiName),process.env.NODE_ENV!=="production"&&(y.displayName=Ug(c,u,i)),y};return R.withConfig&&(O.withConfig=R.withConfig),O}}function Ug(e,t,r){return e?`${e}${tt(t||"")}`:`Styled(${Vg(r)})`}function Lg(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${Jd(t||"Root")}`),r}function Bg(e){for(const t in e)return!1;return!0}function Ng(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Jd(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const Fg=Wd();function rs(e,t,r=!1){const n={...t};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const s=o;if(s==="components"||s==="slots")n[s]={...e[s],...n[s]};else if(s==="componentsProps"||s==="slotProps"){const a=e[s],i=t[s];if(!i)n[s]=a||{};else if(!a)n[s]=i;else{n[s]={...i};for(const l in a)if(Object.prototype.hasOwnProperty.call(a,l)){const c=l;n[s][c]=rs(a[c],i[c],r)}}}else s==="className"&&r&&t.className?n.className=Et(e==null?void 0:e.className,t==null?void 0:t.className):s==="style"&&r&&t.style?n.style={...e==null?void 0:e.style,...t==null?void 0:t.style}:n[s]===void 0&&(n[s]=e[s])}return n}function $g(e){const{theme:t,name:r,props:n}=e;return!t||!t.components||!t.components[r]||!t.components[r].defaultProps?n:rs(t.components[r].defaultProps,n)}function Yd({props:e,name:t,defaultTheme:r,themeId:n}){let o=zd(r);return n&&(o=o[n]||o),$g({theme:o,name:t,props:e})}const Ut=typeof window<"u"?V.useLayoutEffect:V.useEffect;function Kr(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function Ni(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}].`),Kr(e,t,r)}function zg(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),r?`rgb${r.length===4?"a":""}(${r.map((n,o)=>o<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function cr(e){if(e.type)return e;if(e.charAt(0)==="#")return cr(zg(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 Is(e){return eo(e,"spacing",8,"spacing")}function wr(e,t){return typeof t=="string"||t==null?t:e(t)}function zm(e,t){return r=>e.reduce((n,o)=>(n[o]=wr(t,r),n),{})}function Gm(e,t,r,n){if(!t.includes(r))return null;const o=$m(r),s=zm(o,n),a=e[r];return It(e,a,s)}function $d(e,t){const r=Is(e.theme);return Object.keys(e).map(n=>Gm(e,t,n,r)).reduce(Un,{})}function _e(e){return $d(e,Ts)}_e.propTypes=process.env.NODE_ENV!=="production"?Ts.reduce((e,t)=>(e[t]=dr,e),{}):{};_e.filterProps=Ts;function ke(e){return $d(e,Es)}ke.propTypes=process.env.NODE_ENV!=="production"?Es.reduce((e,t)=>(e[t]=dr,e),{}):{};ke.filterProps=Es;process.env.NODE_ENV!=="production"&&Nm.reduce((e,t)=>(e[t]=dr,e),{});function Nd(e=8,t=Is({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(s=>{const a=t(s);return typeof a=="number"?`${a}px`:a}).join(" "));return r.mui=!0,r}function As(...e){const t=e.reduce((n,o)=>(o.filterProps.forEach(s=>{n[s]=o}),n),{}),r=n=>Object.keys(n).reduce((o,s)=>t[s]?Un(o,t[s](n)):o,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,o)=>Object.assign(n,o.propTypes),{}):{},r.filterProps=e.reduce((n,o)=>n.concat(o.filterProps),[]),r}function yt(e){return typeof e!="number"?e:`${e}px solid`}function vt(e,t){return je({prop:e,themeKey:"borders",transform:t})}const Hm=vt("border",yt),qm=vt("borderTop",yt),Wm=vt("borderRight",yt),Jm=vt("borderBottom",yt),Ym=vt("borderLeft",yt),Km=vt("borderColor"),Qm=vt("borderTopColor"),Xm=vt("borderRightColor"),Zm=vt("borderBottomColor"),eg=vt("borderLeftColor"),tg=vt("outline",yt),rg=vt("outlineColor"),Ps=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=eo(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:wr(t,n)});return It(e,e.borderRadius,r)}return null};Ps.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:dr}:{};Ps.filterProps=["borderRadius"];As(Hm,qm,Wm,Jm,Ym,Km,Qm,Xm,Zm,eg,Ps,tg,rg);const Rs=e=>{if(e.gap!==void 0&&e.gap!==null){const t=eo(e.theme,"spacing",8,"gap"),r=n=>({gap:wr(t,n)});return It(e,e.gap,r)}return null};Rs.propTypes=process.env.NODE_ENV!=="production"?{gap:dr}:{};Rs.filterProps=["gap"];const Ms=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=eo(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:wr(t,n)});return It(e,e.columnGap,r)}return null};Ms.propTypes=process.env.NODE_ENV!=="production"?{columnGap:dr}:{};Ms.filterProps=["columnGap"];const Vs=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=eo(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:wr(t,n)});return It(e,e.rowGap,r)}return null};Vs.propTypes=process.env.NODE_ENV!=="production"?{rowGap:dr}:{};Vs.filterProps=["rowGap"];const ng=je({prop:"gridColumn"}),og=je({prop:"gridRow"}),sg=je({prop:"gridAutoFlow"}),ag=je({prop:"gridAutoColumns"}),ig=je({prop:"gridAutoRows"}),lg=je({prop:"gridTemplateColumns"}),cg=je({prop:"gridTemplateRows"}),ug=je({prop:"gridTemplateAreas"}),dg=je({prop:"gridArea"});As(Rs,Ms,Vs,ng,og,sg,ag,ig,lg,cg,ug,dg);function Xr(e,t){return t==="grey"?t:e}const hg=je({prop:"color",themeKey:"palette",transform:Xr}),pg=je({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Xr}),fg=je({prop:"backgroundColor",themeKey:"palette",transform:Xr});As(hg,pg,fg);function pt(e){return e<=1&&e!==0?`${e*100}%`:e}const mg=je({prop:"width",transform:pt}),Li=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var o,s,a,i,l;const n=((a=(s=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:s.values)==null?void 0:a[r])||ws[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:pt(r)}};return It(e,e.maxWidth,t)}return null};Li.filterProps=["maxWidth"];const gg=je({prop:"minWidth",transform:pt}),yg=je({prop:"height",transform:pt}),bg=je({prop:"maxHeight",transform:pt}),xg=je({prop:"minHeight",transform:pt});je({prop:"size",cssProperty:"width",transform:pt});je({prop:"size",cssProperty:"height",transform:pt});const Sg=je({prop:"boxSizing"});As(mg,Li,gg,yg,bg,xg,Sg);const to={border:{themeKey:"borders",transform:yt},borderTop:{themeKey:"borders",transform:yt},borderRight:{themeKey:"borders",transform:yt},borderBottom:{themeKey:"borders",transform:yt},borderLeft:{themeKey:"borders",transform:yt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:yt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ps},color:{themeKey:"palette",transform:Xr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Xr},backgroundColor:{themeKey:"palette",transform:Xr},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:Rs},rowGap:{style:Vs},columnGap:{style:Ms},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:pt},maxWidth:{style:Li},minWidth:{transform:pt},height:{transform:pt},maxHeight:{transform:pt},minHeight:{transform:pt},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 vg(...e){const t=e.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function Cg(e,t){return typeof e=="function"?e(t):e}function wg(){function e(r,n,o,s){const a={[r]:n,theme:o},i=s[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=Os(o,c)||{};return d?d(a):It(a,n,f=>{let m=ts(h,u,f);return f===m&&typeof f=="string"&&(m=ts(h,u,`${r}${f==="default"?"":tt(f)}`,f)),l===!1?m:{[l]:m}})}function t(r){const{sx:n,theme:o={}}=r||{};if(!n)return null;const s=o.unstable_sxConfig??to;function a(i){let l=i;if(typeof i=="function")l=i(o);else if(typeof i!="object")return i;if(!l)return null;const c=Bd(o.breakpoints),u=Object.keys(c);let d=c;return Object.keys(l).forEach(h=>{const p=Cg(l[h],o);if(p!=null)if(typeof p=="object")if(s[h])d=Un(d,e(h,p,o,s));else{const f=It({theme:o},p,m=>({[h]:m}));vg(f,p)?d[h]=t({sx:p,theme:o}):d=Un(d,f)}else d=Un(d,e(h,p,o,s))}),Rm(o,Fd(u,d))}return Array.isArray(n)?n.map(a):a(n)}return t}const nn=wg();nn.filterProps=["sx"];function Og(e,t){var n;const r=this;if(r.vars){if(!((n=r.colorSchemes)!=null&&n[e])||typeof r.getColorSchemeSelector!="function")return{};let o=r.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return r.palette.mode===e?t:{}}function _s(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:s={},...a}=e,i=Pm(r),l=Nd(o);let c=rt({breakpoints:i,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:l,shape:{...km,...s}},a);return c=_m(c),c.applyStyles=Og,c=t.reduce((u,d)=>rt(u,d),c),c.unstable_sxConfig={...to,...a==null?void 0:a.unstable_sxConfig},c.unstable_sx=function(d){return nn({sx:d,theme:this})},c}function Tg(e){return Object.keys(e).length===0}function Eg(e=null){const t=_.useContext(Kf.ThemeContext);return!t||Tg(t)?e:t}const Ig=_s();function zd(e=Ig){return Eg(e)}const Ag=e=>{var n;const t={systemProps:{},otherProps:{}},r=((n=e==null?void 0:e.theme)==null?void 0:n.unstable_sxConfig)??to;return Object.keys(e).forEach(o=>{r[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t};function Pg(e){const{sx:t,...r}=e,{systemProps:n,otherProps:o}=Ag(r);let s;return Array.isArray(t)?s=[n,...t]:typeof t=="function"?s=(...a)=>{const i=t(...a);return _t(i)?{...n,...i}:n}:s={...n,...t},{...o,sx:s}}const ac=e=>e,Rg=()=>{let e=ac;return{configure(t){e=t},generate(t){return e(t)},reset(){e=ac}}},Mg=Rg(),Vg={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 pn(e,t,r="Mui"){const n=Vg[t];return n?`${r}-${n}`:`${Mg.generate(e)}-${t}`}function Bi(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=pn(e,o,r)}),n}function Gd(e,t=""){return e.displayName||e.name||t}function ic(e,t,r){const n=Gd(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function _g(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Gd(e,"Component");if(typeof e=="object")switch(e.$$typeof){case es.ForwardRef:return ic(e,e.render,"ForwardRef");case es.Memo:return ic(e,e.type,"memo");default:return}}}function Hd(e){const{variants:t,...r}=e,n={variants:t,style:ec(r),isProcessed:!0};return n.style===r||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=ec(o.style))}),n}const kg=_s();function xa(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function jg(e){return e?(t,r)=>r[e]:null}function Dg(e,t,r){e.theme=Bg(e.theme)?r:e.theme[t]||e.theme}function zo(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>zo(e,n));if(Array.isArray(r==null?void 0:r.variants)){let n;if(r.isProcessed)n=r.style;else{const{variants:o,...s}=r;n=s}return qd(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function qd(e,t,r=[]){var o;let n;e:for(let s=0;s<t.length;s+=1){const a=t[s];if(typeof a.props=="function"){if(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),!a.props(n))continue}else for(const i in a.props)if(e[i]!==a.props[i]&&((o=e.ownerState)==null?void 0:o[i])!==a.props[i])continue e;typeof a.style=="function"?(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),r.push(a.style(n))):r.push(a.style)}return r}function Wd(e={}){const{themeId:t,defaultTheme:r=kg,rootShouldForwardProp:n=xa,slotShouldForwardProp:o=xa}=e;function s(i){Dg(i,t,r)}return(i,l={})=>{Om(i,I=>I.filter(T=>T!==nn));const{name:c,slot:u,skipVariantsResolver:d,skipSx:h,overridesResolver:p=jg(Jd(u)),...f}=l,m=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,b=h||!1;let S=xa;u==="Root"||u==="root"?S=n:u?S=o:Fg(i)&&(S=void 0);const P=wm(i,{shouldForwardProp:S,label:Lg(c,u),...f}),v=I=>{if(I.__emotion_real===I)return I;if(typeof I=="function")return function(w){return zo(w,I)};if(_t(I)){const T=Hd(I);return T.variants?function(R){return zo(R,T)}:T.style}return I},O=(...I)=>{const T=[],w=I.map(v),R=[];if(T.push(s),c&&p&&R.push(function(V){var Q,oe;const j=(oe=(Q=V.theme.components)==null?void 0:Q[c])==null?void 0:oe.styleOverrides;if(!j)return null;const ne={};for(const X in j)ne[X]=zo(V,j[X]);return p(V,ne)}),c&&!m&&R.push(function(V){var ne,Q;const M=V.theme,j=(Q=(ne=M==null?void 0:M.components)==null?void 0:ne[c])==null?void 0:Q.variants;return j?qd(V,j):null}),b||R.push(nn),Array.isArray(w[0])){const A=w.shift(),V=new Array(T.length).fill(""),M=new Array(R.length).fill("");let j;j=[...V,...A,...M],j.raw=[...V,...A.raw,...M],T.unshift(j)}const k=[...T,...w,...R],y=P(...k);return i.muiName&&(y.muiName=i.muiName),process.env.NODE_ENV!=="production"&&(y.displayName=Ug(c,u,i)),y};return P.withConfig&&(O.withConfig=P.withConfig),O}}function Ug(e,t,r){return e?`${e}${tt(t||"")}`:`Styled(${_g(r)})`}function Lg(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${Jd(t||"Root")}`),r}function Bg(e){for(const t in e)return!1;return!0}function Fg(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Jd(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const $g=Wd();function rs(e,t,r=!1){const n={...t};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const s=o;if(s==="components"||s==="slots")n[s]={...e[s],...n[s]};else if(s==="componentsProps"||s==="slotProps"){const a=e[s],i=t[s];if(!i)n[s]=a||{};else if(!a)n[s]=i;else{n[s]={...i};for(const l in a)if(Object.prototype.hasOwnProperty.call(a,l)){const c=l;n[s][c]=rs(a[c],i[c],r)}}}else s==="className"&&r&&t.className?n.className=Et(e==null?void 0:e.className,t==null?void 0:t.className):s==="style"&&r&&t.style?n.style={...e==null?void 0:e.style,...t==null?void 0:t.style}:n[s]===void 0&&(n[s]=e[s])}return n}function Ng(e){const{theme:t,name:r,props:n}=e;return!t||!t.components||!t.components[r]||!t.components[r].defaultProps?n:rs(t.components[r].defaultProps,n)}function Yd({props:e,name:t,defaultTheme:r,themeId:n}){let o=zd(r);return n&&(o=o[n]||o),Ng({theme:o,name:t,props:e})}const Ut=typeof window<"u"?_.useLayoutEffect:_.useEffect;function Kr(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function Fi(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}].`),Kr(e,t,r)}function zg(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),r?`rgb${r.length===4?"a":""}(${r.map((n,o)=>o<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function cr(e){if(e.type)return e;if(e.charAt(0)==="#")return cr(zg(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().`:lr(9,e));let n=e.substring(t+1,e.length-1),o;if(r==="color"){if(n=n.split(" "),o=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${o}\` color space.
|
|
52
|
-
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:lr(10,o))}else n=n.split(",");return n=n.map(s=>parseFloat(s)),{type:r,values:n,colorSpace:o}}const Gg=e=>{const t=cr(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},Vn=(e,t)=>{try{return Gg(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function ks(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((o,s)=>s<3?parseInt(o,10):o):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function Kd(e){e=cr(e);const{values:t}=e,r=t[0],n=t[1]/100,o=t[2]/100,s=n*Math.min(o,1-o),a=(c,u=(c+r/30)%12)=>o-s*Math.max(Math.min(u-3,9-u,1),-1);let i="rgb";const l=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(i+="a",l.push(t[3])),ks({type:i,values:l})}function ni(e){e=cr(e);let t=e.type==="hsl"||e.type==="hsla"?cr(Kd(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 lc(e,t){const r=ni(e),n=ni(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function oi(e,t){return e=cr(e),t=Ni(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,ks(e)}function Co(e,t,r){try{return oi(e,t)}catch{return e}}function Fn(e,t){if(e=cr(e),t=Ni(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 ks(e)}function Ie(e,t,r){try{return Fn(e,t)}catch{return e}}function $n(e,t){if(e=cr(e),t=Ni(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 ks(e)}function Ae(e,t,r){try{return $n(e,t)}catch{return e}}function Hg(e,t=.15){return ni(e)>.5?Fn(e,t):$n(e,t)}function wo(e,t,r){try{return Hg(e,t)}catch{return e}}const qg=V.createContext();process.env.NODE_ENV!=="production"&&(x.node,x.bool);const Wg=()=>V.useContext(qg)??!1,Jg=V.createContext(void 0);process.env.NODE_ENV!=="production"&&(x.node,x.object);function Yg(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const o=t.components[r];return o.defaultProps?rs(o.defaultProps,n):!o.styleOverrides&&!o.variants?rs(o,n):n}function Kg({props:e,name:t}){const r=V.useContext(Jg);return Yg({props:e,name:t,theme:{components:r}})}const cc={theme:void 0};function Xg(e){let t,r;return function(o){let s=t;return(s===void 0||o.theme!==r)&&(cc.theme=o.theme,s=Hd(e(cc)),t=s,r=o.theme),s}}function Qg(e=""){function t(...n){if(!n.length)return"";const o=n[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${o}${t(...n.slice(1))})`:`, ${o}`}return(n,...o)=>`var(--${e?`${e}-`:""}${n}${t(...o)})`}const uc=(e,t,r,n=[])=>{let o=e;t.forEach((s,a)=>{a===t.length-1?Array.isArray(o)?o[Number(s)]=r:o&&typeof o=="object"&&(o[s]=r):o&&typeof o=="object"&&(o[s]||(o[s]=n.includes(s)?[]:{}),o=o[s])})},Zg=(e,t,r)=>{function n(o,s=[],a=[]){Object.entries(o).forEach(([i,l])=>{(!r||r&&!r([...s,i]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?n(l,[...s,i],Array.isArray(l)?[...a,i]:a):t([...s,i],l,a))})}n(e)},e0=(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 Sa(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},o={},s={},a={};return Zg(e,(i,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!n||!n(i,l))){const u=`--${r?`${r}-`:""}${i.join("-")}`,d=e0(i,l);Object.assign(o,{[u]:d}),uc(s,i,`var(${u})`,c),uc(a,i,`var(${u}, ${d})`,c)}},i=>i[0]==="vars"),{css:o,vars:s,varsWithDefaults:a}}function t0(e,t={}){const{getSelector:r=b,disableCssColorScheme:n,colorSchemeSelector:o}=t,{colorSchemes:s={},components:a,defaultColorScheme:i="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=Sa(l,t);let h=d;const p={},{[i]:f,...m}=s;if(Object.entries(m||{}).forEach(([v,O])=>{const{vars:I,css:T,varsWithDefaults:w}=Sa(O,t);h=rt(h,w),p[v]={css:T,vars:I}}),f){const{css:v,vars:O,varsWithDefaults:I}=Sa(f,t);h=rt(h,I),p[i]={css:v,vars:O}}function b(v,O){var T,w;let I=o;if(o==="class"&&(I=".%s"),o==="data"&&(I="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(I=`[${o}="%s"]`),v){if(I==="media")return e.defaultColorScheme===v?":root":{[`@media (prefers-color-scheme: ${((w=(T=s[v])==null?void 0:T.palette)==null?void 0:w.mode)||v})`]:{":root":O}};if(I)return e.defaultColorScheme===v?`:root, ${I.replace("%s",String(v))}`:I.replace("%s",String(v))}return":root"}return{vars:h,generateThemeVars:()=>{let v={...c};return Object.entries(p).forEach(([,{vars:O}])=>{v=rt(v,O)}),v},generateStyleSheets:()=>{var P,k;const v=[],O=e.defaultColorScheme||"light";function I(y,A){Object.keys(A).length&&v.push(typeof y=="string"?{[y]:{...A}}:y)}I(r(void 0,{...u}),u);const{[O]:T,...w}=p;if(T){const{css:y}=T,A=(k=(P=s[O])==null?void 0:P.palette)==null?void 0:k.mode,M=!n&&A?{colorScheme:A,...y}:{...y};I(r(O,{...M}),M)}return Object.entries(w).forEach(([y,{css:A}])=>{var j,ne;const M=(ne=(j=s[y])==null?void 0:j.palette)==null?void 0:ne.mode,_=!n&&M?{colorScheme:M,...A}:{...A};I(r(y,{..._}),_)}),v}}}function r0(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 n0=Vs(),o0=Fg("div",{name:"MuiStack",slot:"Root"});function s0(e){return Yd({props:e,name:"MuiStack",defaultTheme:n0})}function a0(e,t){const r=V.Children.toArray(e).filter(Boolean);return r.reduce((n,o,s)=>(n.push(o),s<r.length-1&&n.push(V.cloneElement(t,{key:`separator-${s}`})),n),[])}const i0=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],l0=({ownerState:e,theme:t})=>{let r={display:"flex",flexDirection:"column",...It({theme:t},ba({values:e.direction,breakpoints:t.breakpoints.values}),n=>({flexDirection:n}))};if(e.spacing){const n=Is(t),o=Object.keys(t.breakpoints.values).reduce((l,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(l[c]=!0),l),{}),s=ba({values:e.direction,base:o}),a=ba({values:e.spacing,base:o});typeof s=="object"&&Object.keys(s).forEach((l,c,u)=>{if(!s[l]){const h=c>0?s[u[c-1]]:"column";s[l]=h}}),r=rt(r,It({theme:t},a,(l,c)=>e.useFlexGap?{gap:wr(n,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${i0(c?s[c]:e.direction)}`]:wr(n,l)}}))}return r=Dm(t.breakpoints,r),r};function c0(e={}){const{createStyledComponent:t=o0,useThemeProps:r=s0,componentName:n="MuiStack"}=e,o=()=>Cs({root:["root"]},l=>pn(n,l),{}),s=t(l0),a=V.forwardRef(function(l,c){const u=r(l),d=Rg(u),{component:h="div",direction:p="column",spacing:f=0,divider:m,children:b,className:S,useFlexGap:R=!1,...v}=d,O={direction:p,spacing:f,useFlexGap:R},I=o();return g.jsx(s,{as:h,ownerState:O,ref:c,className:Et(I.root,S),...v,children:m?a0(b,m):b})});return process.env.NODE_ENV!=="production"&&(a.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])}),a}const zn={black:"#000",white:"#fff"},u0={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"},Br={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Nr={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Cn={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Fr={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},$r={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},zr={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Xd(){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:zn.white,default:zn.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 d0=Xd();function Qd(){return{text:{primary:zn.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:zn.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 dc=Qd();function hc(e,t,r,n){const o=n.light||n,s=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=$n(e.main,o):t==="dark"&&(e.dark=Fn(e.main,s)))}function h0(e="light"){return e==="dark"?{main:Fr[200],light:Fr[50],dark:Fr[400]}:{main:Fr[700],light:Fr[400],dark:Fr[800]}}function p0(e="light"){return e==="dark"?{main:Br[200],light:Br[50],dark:Br[400]}:{main:Br[500],light:Br[300],dark:Br[700]}}function f0(e="light"){return e==="dark"?{main:Nr[500],light:Nr[300],dark:Nr[700]}:{main:Nr[700],light:Nr[400],dark:Nr[800]}}function m0(e="light"){return e==="dark"?{main:$r[400],light:$r[300],dark:$r[700]}:{main:$r[700],light:$r[500],dark:$r[900]}}function g0(e="light"){return e==="dark"?{main:zr[400],light:zr[300],dark:zr[700]}:{main:zr[800],light:zr[500],dark:zr[900]}}function y0(e="light"){return e==="dark"?{main:Cn[400],light:Cn[300],dark:Cn[700]}:{main:"#ed6c02",light:Cn[500],dark:Cn[900]}}function Fi(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...o}=e,s=e.primary||h0(t),a=e.secondary||p0(t),i=e.error||f0(t),l=e.info||m0(t),c=e.success||g0(t),u=e.warning||y0(t);function d(m){const b=lc(m,dc.text.primary)>=r?dc.text.primary:d0.text.primary;if(process.env.NODE_ENV!=="production"){const S=lc(m,b);S<3&&console.error([`MUI: The contrast ratio of ${S}:1 for ${b} on ${m}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
|
|
53
|
-
`))}return b}const h=({color:m,name:b,mainShade:S=500,lightShade:
|
|
52
|
+
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:lr(10,o))}else n=n.split(",");return n=n.map(s=>parseFloat(s)),{type:r,values:n,colorSpace:o}}const Gg=e=>{const t=cr(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},_n=(e,t)=>{try{return Gg(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function ks(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((o,s)=>s<3?parseInt(o,10):o):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function Kd(e){e=cr(e);const{values:t}=e,r=t[0],n=t[1]/100,o=t[2]/100,s=n*Math.min(o,1-o),a=(c,u=(c+r/30)%12)=>o-s*Math.max(Math.min(u-3,9-u,1),-1);let i="rgb";const l=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(i+="a",l.push(t[3])),ks({type:i,values:l})}function ni(e){e=cr(e);let t=e.type==="hsl"||e.type==="hsla"?cr(Kd(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 lc(e,t){const r=ni(e),n=ni(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function oi(e,t){return e=cr(e),t=Fi(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,ks(e)}function Co(e,t,r){try{return oi(e,t)}catch{return e}}function $n(e,t){if(e=cr(e),t=Fi(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 ks(e)}function Ie(e,t,r){try{return $n(e,t)}catch{return e}}function Nn(e,t){if(e=cr(e),t=Fi(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 ks(e)}function Ae(e,t,r){try{return Nn(e,t)}catch{return e}}function Hg(e,t=.15){return ni(e)>.5?$n(e,t):Nn(e,t)}function wo(e,t,r){try{return Hg(e,t)}catch{return e}}const qg=_.createContext();process.env.NODE_ENV!=="production"&&(x.node,x.bool);const Wg=()=>_.useContext(qg)??!1,Jg=_.createContext(void 0);process.env.NODE_ENV!=="production"&&(x.node,x.object);function Yg(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const o=t.components[r];return o.defaultProps?rs(o.defaultProps,n):!o.styleOverrides&&!o.variants?rs(o,n):n}function Kg({props:e,name:t}){const r=_.useContext(Jg);return Yg({props:e,name:t,theme:{components:r}})}const cc={theme:void 0};function Qg(e){let t,r;return function(o){let s=t;return(s===void 0||o.theme!==r)&&(cc.theme=o.theme,s=Hd(e(cc)),t=s,r=o.theme),s}}function Xg(e=""){function t(...n){if(!n.length)return"";const o=n[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${o}${t(...n.slice(1))})`:`, ${o}`}return(n,...o)=>`var(--${e?`${e}-`:""}${n}${t(...o)})`}const uc=(e,t,r,n=[])=>{let o=e;t.forEach((s,a)=>{a===t.length-1?Array.isArray(o)?o[Number(s)]=r:o&&typeof o=="object"&&(o[s]=r):o&&typeof o=="object"&&(o[s]||(o[s]=n.includes(s)?[]:{}),o=o[s])})},Zg=(e,t,r)=>{function n(o,s=[],a=[]){Object.entries(o).forEach(([i,l])=>{(!r||r&&!r([...s,i]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?n(l,[...s,i],Array.isArray(l)?[...a,i]:a):t([...s,i],l,a))})}n(e)},e0=(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 Sa(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},o={},s={},a={};return Zg(e,(i,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!n||!n(i,l))){const u=`--${r?`${r}-`:""}${i.join("-")}`,d=e0(i,l);Object.assign(o,{[u]:d}),uc(s,i,`var(${u})`,c),uc(a,i,`var(${u}, ${d})`,c)}},i=>i[0]==="vars"),{css:o,vars:s,varsWithDefaults:a}}function t0(e,t={}){const{getSelector:r=b,disableCssColorScheme:n,colorSchemeSelector:o}=t,{colorSchemes:s={},components:a,defaultColorScheme:i="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=Sa(l,t);let h=d;const p={},{[i]:f,...m}=s;if(Object.entries(m||{}).forEach(([v,O])=>{const{vars:I,css:T,varsWithDefaults:w}=Sa(O,t);h=rt(h,w),p[v]={css:T,vars:I}}),f){const{css:v,vars:O,varsWithDefaults:I}=Sa(f,t);h=rt(h,I),p[i]={css:v,vars:O}}function b(v,O){var T,w;let I=o;if(o==="class"&&(I=".%s"),o==="data"&&(I="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(I=`[${o}="%s"]`),v){if(I==="media")return e.defaultColorScheme===v?":root":{[`@media (prefers-color-scheme: ${((w=(T=s[v])==null?void 0:T.palette)==null?void 0:w.mode)||v})`]:{":root":O}};if(I)return e.defaultColorScheme===v?`:root, ${I.replace("%s",String(v))}`:I.replace("%s",String(v))}return":root"}return{vars:h,generateThemeVars:()=>{let v={...c};return Object.entries(p).forEach(([,{vars:O}])=>{v=rt(v,O)}),v},generateStyleSheets:()=>{var R,k;const v=[],O=e.defaultColorScheme||"light";function I(y,A){Object.keys(A).length&&v.push(typeof y=="string"?{[y]:{...A}}:y)}I(r(void 0,{...u}),u);const{[O]:T,...w}=p;if(T){const{css:y}=T,A=(k=(R=s[O])==null?void 0:R.palette)==null?void 0:k.mode,V=!n&&A?{colorScheme:A,...y}:{...y};I(r(O,{...V}),V)}return Object.entries(w).forEach(([y,{css:A}])=>{var j,ne;const V=(ne=(j=s[y])==null?void 0:j.palette)==null?void 0:ne.mode,M=!n&&V?{colorScheme:V,...A}:{...A};I(r(y,{...M}),M)}),v}}}function r0(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 n0=_s(),o0=$g("div",{name:"MuiStack",slot:"Root"});function s0(e){return Yd({props:e,name:"MuiStack",defaultTheme:n0})}function a0(e,t){const r=_.Children.toArray(e).filter(Boolean);return r.reduce((n,o,s)=>(n.push(o),s<r.length-1&&n.push(_.cloneElement(t,{key:`separator-${s}`})),n),[])}const i0=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],l0=({ownerState:e,theme:t})=>{let r={display:"flex",flexDirection:"column",...It({theme:t},ba({values:e.direction,breakpoints:t.breakpoints.values}),n=>({flexDirection:n}))};if(e.spacing){const n=Is(t),o=Object.keys(t.breakpoints.values).reduce((l,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(l[c]=!0),l),{}),s=ba({values:e.direction,base:o}),a=ba({values:e.spacing,base:o});typeof s=="object"&&Object.keys(s).forEach((l,c,u)=>{if(!s[l]){const h=c>0?s[u[c-1]]:"column";s[l]=h}}),r=rt(r,It({theme:t},a,(l,c)=>e.useFlexGap?{gap:wr(n,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${i0(c?s[c]:e.direction)}`]:wr(n,l)}}))}return r=Dm(t.breakpoints,r),r};function c0(e={}){const{createStyledComponent:t=o0,useThemeProps:r=s0,componentName:n="MuiStack"}=e,o=()=>Cs({root:["root"]},l=>pn(n,l),{}),s=t(l0),a=_.forwardRef(function(l,c){const u=r(l),d=Pg(u),{component:h="div",direction:p="column",spacing:f=0,divider:m,children:b,className:S,useFlexGap:P=!1,...v}=d,O={direction:p,spacing:f,useFlexGap:P},I=o();return g.jsx(s,{as:h,ownerState:O,ref:c,className:Et(I.root,S),...v,children:m?a0(b,m):b})});return process.env.NODE_ENV!=="production"&&(a.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])}),a}const zn={black:"#000",white:"#fff"},u0={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"},Br={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Fr={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Cn={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},$r={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Nr={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},zr={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Qd(){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:zn.white,default:zn.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 d0=Qd();function Xd(){return{text:{primary:zn.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:zn.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 dc=Xd();function hc(e,t,r,n){const o=n.light||n,s=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=Nn(e.main,o):t==="dark"&&(e.dark=$n(e.main,s)))}function h0(e="light"){return e==="dark"?{main:$r[200],light:$r[50],dark:$r[400]}:{main:$r[700],light:$r[400],dark:$r[800]}}function p0(e="light"){return e==="dark"?{main:Br[200],light:Br[50],dark:Br[400]}:{main:Br[500],light:Br[300],dark:Br[700]}}function f0(e="light"){return e==="dark"?{main:Fr[500],light:Fr[300],dark:Fr[700]}:{main:Fr[700],light:Fr[400],dark:Fr[800]}}function m0(e="light"){return e==="dark"?{main:Nr[400],light:Nr[300],dark:Nr[700]}:{main:Nr[700],light:Nr[500],dark:Nr[900]}}function g0(e="light"){return e==="dark"?{main:zr[400],light:zr[300],dark:zr[700]}:{main:zr[800],light:zr[500],dark:zr[900]}}function y0(e="light"){return e==="dark"?{main:Cn[400],light:Cn[300],dark:Cn[700]}:{main:"#ed6c02",light:Cn[500],dark:Cn[900]}}function $i(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...o}=e,s=e.primary||h0(t),a=e.secondary||p0(t),i=e.error||f0(t),l=e.info||m0(t),c=e.success||g0(t),u=e.warning||y0(t);function d(m){const b=lc(m,dc.text.primary)>=r?dc.text.primary:d0.text.primary;if(process.env.NODE_ENV!=="production"){const S=lc(m,b);S<3&&console.error([`MUI: The contrast ratio of ${S}:1 for ${b} on ${m}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
|
|
53
|
+
`))}return b}const h=({color:m,name:b,mainShade:S=500,lightShade:P=300,darkShade:v=700})=>{if(m={...m},!m.main&&m[S]&&(m.main=m[S]),!m.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
|
|
54
54
|
The color object needs to have a \`main\` property or a \`${S}\` property.`:lr(11,b?` (${b})`:"",S));if(typeof m.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
|
|
55
55
|
\`color.main\` should be a string, but \`${JSON.stringify(m.main)}\` was provided instead.
|
|
56
56
|
|
|
@@ -64,23 +64,23 @@ const theme1 = createTheme({ palette: {
|
|
|
64
64
|
|
|
65
65
|
const theme2 = createTheme({ palette: {
|
|
66
66
|
primary: { main: green[500] },
|
|
67
|
-
} });`:lr(12,b?` (${b})`:"",JSON.stringify(m.main)));return hc(m,"light",
|
|
68
|
-
`)),Object.keys(c).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(c).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(u=>`${u} ${typeof a=="string"?a:mc(a)} ${i} ${typeof l=="string"?l:mc(l)}`).join(",")},...e,easing:t,duration:r}}const
|
|
67
|
+
} });`:lr(12,b?` (${b})`:"",JSON.stringify(m.main)));return hc(m,"light",P,n),hc(m,"dark",v,n),m.contrastText||(m.contrastText=d(m.main)),m};let p;return t==="light"?p=Qd():t==="dark"&&(p=Xd()),process.env.NODE_ENV!=="production"&&(p||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),rt({common:{...zn},mode:t,primary:h({color:s,name:"primary"}),secondary:h({color:a,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:u0,contrastThreshold:r,getContrastText:d,augmentColor:h,tonalOffset:n,...p},o)}function b0(e){const t={};return Object.entries(e).forEach(n=>{const[o,s]=n;typeof s=="object"&&(t[o]=`${s.fontStyle?`${s.fontStyle} `:""}${s.fontVariant?`${s.fontVariant} `:""}${s.fontWeight?`${s.fontWeight} `:""}${s.fontStretch?`${s.fontStretch} `:""}${s.fontSize||""}${s.lineHeight?`/${s.lineHeight} `:""}${s.fontFamily||""}`)}),t}function x0(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function S0(e){return Math.round(e*1e5)/1e5}const pc={textTransform:"uppercase"},fc='"Roboto", "Helvetica", "Arial", sans-serif';function v0(e,t){const{fontFamily:r=fc,fontSize:n=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:i=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...d}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof n!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof l!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const h=n/14,p=u||(b=>`${b/l*h}rem`),f=(b,S,P,v,O)=>({fontFamily:r,fontWeight:b,fontSize:p(S),lineHeight:P,...r===fc?{letterSpacing:`${S0(v/S)}em`}:{},...O,...c}),m={h1:f(o,96,1.167,-1.5),h2:f(o,60,1.2,-.5),h3:f(s,48,1.167,0),h4:f(s,34,1.235,.25),h5:f(s,24,1.334,0),h6:f(a,20,1.6,.15),subtitle1:f(s,16,1.75,.15),subtitle2:f(a,14,1.57,.1),body1:f(s,16,1.5,.15),body2:f(s,14,1.43,.15),button:f(a,14,1.75,.4,pc),caption:f(s,12,1.66,.4),overline:f(s,12,2.66,1,pc),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return rt({htmlFontSize:l,pxToRem:p,fontFamily:r,fontSize:n,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:i,...m},d,{clone:!1})}const C0=.2,w0=.14,O0=.12;function Re(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${C0})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${w0})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${O0})`].join(",")}const T0=["none",Re(0,2,1,-1,0,1,1,0,0,1,3,0),Re(0,3,1,-2,0,2,2,0,0,1,5,0),Re(0,3,3,-2,0,3,4,0,0,1,8,0),Re(0,2,4,-1,0,4,5,0,0,1,10,0),Re(0,3,5,-1,0,5,8,0,0,1,14,0),Re(0,3,5,-1,0,6,10,0,0,1,18,0),Re(0,4,5,-2,0,7,10,1,0,2,16,1),Re(0,5,5,-3,0,8,10,1,0,3,14,2),Re(0,5,6,-3,0,9,12,1,0,3,16,2),Re(0,6,6,-3,0,10,14,1,0,4,18,3),Re(0,6,7,-4,0,11,15,1,0,4,20,3),Re(0,7,8,-4,0,12,17,2,0,5,22,4),Re(0,7,8,-4,0,13,19,2,0,5,24,4),Re(0,7,9,-4,0,14,21,2,0,5,26,4),Re(0,8,9,-5,0,15,22,2,0,6,28,5),Re(0,8,10,-5,0,16,24,2,0,6,30,5),Re(0,8,11,-5,0,17,26,2,0,6,32,5),Re(0,9,11,-5,0,18,28,2,0,7,34,6),Re(0,9,12,-6,0,19,29,2,0,7,36,6),Re(0,10,13,-6,0,20,31,3,0,8,38,7),Re(0,10,13,-6,0,21,33,3,0,8,40,7),Re(0,10,14,-6,0,22,35,3,0,8,42,7),Re(0,11,14,-7,0,23,36,3,0,9,44,8),Re(0,11,15,-7,0,24,38,3,0,9,46,8)],E0={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)"},I0={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function mc(e){return`${Math.round(e)}ms`}function A0(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function P0(e){const t={...E0,...e.easing},r={...I0,...e.duration};return{getAutoHeightDuration:A0,create:(o=["all"],s={})=>{const{duration:a=r.standard,easing:i=t.easeInOut,delay:l=0,...c}=s;if(process.env.NODE_ENV!=="production"){const u=h=>typeof h=="string",d=h=>!Number.isNaN(parseFloat(h));!u(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!d(a)&&!u(a)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${a}.`),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 s!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
|
|
68
|
+
`)),Object.keys(c).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(c).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(u=>`${u} ${typeof a=="string"?a:mc(a)} ${i} ${typeof l=="string"?l:mc(l)}`).join(",")},...e,easing:t,duration:r}}const R0={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function M0(e){return _t(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Zd(e={}){const t={...e};function r(n){const o=Object.entries(n);for(let s=0;s<o.length;s++){const[a,i]=o[s];!M0(i)||a.startsWith("unstable_")?delete n[a]:_t(i)&&(n[a]={...i},r(n[a]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
69
69
|
|
|
70
70
|
const theme = ${JSON.stringify(t,null,2)};
|
|
71
71
|
|
|
72
72
|
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
73
73
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
74
74
|
|
|
75
|
-
export default theme;`}function si(e={},...t){const{breakpoints:r,mixins:n={},spacing:o,palette:s={},transitions:a={},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.":lr(20));const u
|
|
76
|
-
`))}m[S]={}}}};Object.keys(h.components).forEach(m=>{const b=h.components[m].styleOverrides;b&&m.startsWith("Mui")&&f(b,m)})}return h.unstable_sxConfig={...to,...c==null?void 0:c.unstable_sxConfig},h.unstable_sx=function(f){return nn({sx:f,theme:this})},h.toRuntimeSource=Zd,h}function
|
|
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 B0(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Rt=e=>{try{return e()}catch{}},N0=(e="mui")=>Qg(e);function va(e,t,r,n){if(!t)return;t=t===!0?{}:t;const o=n==="dark"?"dark":"light";if(!r){e[n]=k0({...t,palette:{mode:o,...t==null?void 0:t.palette}});return}const{palette:s,...a}=si({...r,palette:{mode:o,...t==null?void 0:t.palette}});return e[n]={...t,palette:s,opacity:{...eh(o),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||th(o)},a}function F0(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:o=!1,cssVarPrefix:s="mui",shouldSkipGeneratingVar:a=j0,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=N0(s),{[d]:p,light:f,dark:m,...b}=r,S={...b};let R=p;if((d==="dark"&&!("dark"in r)||d==="light"&&!("light"in r))&&(R=!0),!R)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${d}\` option is either missing or invalid.`:lr(21,d));const v=va(S,R,c,d);f&&!S.light&&va(S,f,void 0,"light"),m&&!S.dark&&va(S,m,void 0,"dark");let O={defaultColorScheme:d,...v,cssVarPrefix:s,colorSchemeSelector:i,rootSelector:l,getCssVar:h,colorSchemes:S,font:{...b0(v.typography),...v.font},spacing:B0(c.spacing)};Object.keys(O.colorSchemes).forEach(k=>{const y=O.colorSchemes[k].palette,A=M=>{const _=M.split("-"),j=_[1],ne=_[2];return h(M,y[j][ne])};if(y.mode==="light"&&(B(y.common,"background","#fff"),B(y.common,"onBackground","#000")),y.mode==="dark"&&(B(y.common,"background","#000"),B(y.common,"onBackground","#fff")),L0(y,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),y.mode==="light"){B(y.Alert,"errorColor",Ie(y.error.light,.6)),B(y.Alert,"infoColor",Ie(y.info.light,.6)),B(y.Alert,"successColor",Ie(y.success.light,.6)),B(y.Alert,"warningColor",Ie(y.warning.light,.6)),B(y.Alert,"errorFilledBg",A("palette-error-main")),B(y.Alert,"infoFilledBg",A("palette-info-main")),B(y.Alert,"successFilledBg",A("palette-success-main")),B(y.Alert,"warningFilledBg",A("palette-warning-main")),B(y.Alert,"errorFilledColor",Rt(()=>y.getContrastText(y.error.main))),B(y.Alert,"infoFilledColor",Rt(()=>y.getContrastText(y.info.main))),B(y.Alert,"successFilledColor",Rt(()=>y.getContrastText(y.success.main))),B(y.Alert,"warningFilledColor",Rt(()=>y.getContrastText(y.warning.main))),B(y.Alert,"errorStandardBg",Ae(y.error.light,.9)),B(y.Alert,"infoStandardBg",Ae(y.info.light,.9)),B(y.Alert,"successStandardBg",Ae(y.success.light,.9)),B(y.Alert,"warningStandardBg",Ae(y.warning.light,.9)),B(y.Alert,"errorIconColor",A("palette-error-main")),B(y.Alert,"infoIconColor",A("palette-info-main")),B(y.Alert,"successIconColor",A("palette-success-main")),B(y.Alert,"warningIconColor",A("palette-warning-main")),B(y.AppBar,"defaultBg",A("palette-grey-100")),B(y.Avatar,"defaultBg",A("palette-grey-400")),B(y.Button,"inheritContainedBg",A("palette-grey-300")),B(y.Button,"inheritContainedHoverBg",A("palette-grey-A100")),B(y.Chip,"defaultBorder",A("palette-grey-400")),B(y.Chip,"defaultAvatarColor",A("palette-grey-700")),B(y.Chip,"defaultIconColor",A("palette-grey-700")),B(y.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),B(y.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),B(y.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),B(y.LinearProgress,"primaryBg",Ae(y.primary.main,.62)),B(y.LinearProgress,"secondaryBg",Ae(y.secondary.main,.62)),B(y.LinearProgress,"errorBg",Ae(y.error.main,.62)),B(y.LinearProgress,"infoBg",Ae(y.info.main,.62)),B(y.LinearProgress,"successBg",Ae(y.success.main,.62)),B(y.LinearProgress,"warningBg",Ae(y.warning.main,.62)),B(y.Skeleton,"bg",`rgba(${A("palette-text-primaryChannel")} / 0.11)`),B(y.Slider,"primaryTrack",Ae(y.primary.main,.62)),B(y.Slider,"secondaryTrack",Ae(y.secondary.main,.62)),B(y.Slider,"errorTrack",Ae(y.error.main,.62)),B(y.Slider,"infoTrack",Ae(y.info.main,.62)),B(y.Slider,"successTrack",Ae(y.success.main,.62)),B(y.Slider,"warningTrack",Ae(y.warning.main,.62));const M=wo(y.background.default,.8);B(y.SnackbarContent,"bg",M),B(y.SnackbarContent,"color",Rt(()=>y.getContrastText(M))),B(y.SpeedDialAction,"fabHoverBg",wo(y.background.paper,.15)),B(y.StepConnector,"border",A("palette-grey-400")),B(y.StepContent,"border",A("palette-grey-400")),B(y.Switch,"defaultColor",A("palette-common-white")),B(y.Switch,"defaultDisabledColor",A("palette-grey-100")),B(y.Switch,"primaryDisabledColor",Ae(y.primary.main,.62)),B(y.Switch,"secondaryDisabledColor",Ae(y.secondary.main,.62)),B(y.Switch,"errorDisabledColor",Ae(y.error.main,.62)),B(y.Switch,"infoDisabledColor",Ae(y.info.main,.62)),B(y.Switch,"successDisabledColor",Ae(y.success.main,.62)),B(y.Switch,"warningDisabledColor",Ae(y.warning.main,.62)),B(y.TableCell,"border",Ae(Co(y.divider,1),.88)),B(y.Tooltip,"bg",Co(y.grey[700],.92))}if(y.mode==="dark"){B(y.Alert,"errorColor",Ae(y.error.light,.6)),B(y.Alert,"infoColor",Ae(y.info.light,.6)),B(y.Alert,"successColor",Ae(y.success.light,.6)),B(y.Alert,"warningColor",Ae(y.warning.light,.6)),B(y.Alert,"errorFilledBg",A("palette-error-dark")),B(y.Alert,"infoFilledBg",A("palette-info-dark")),B(y.Alert,"successFilledBg",A("palette-success-dark")),B(y.Alert,"warningFilledBg",A("palette-warning-dark")),B(y.Alert,"errorFilledColor",Rt(()=>y.getContrastText(y.error.dark))),B(y.Alert,"infoFilledColor",Rt(()=>y.getContrastText(y.info.dark))),B(y.Alert,"successFilledColor",Rt(()=>y.getContrastText(y.success.dark))),B(y.Alert,"warningFilledColor",Rt(()=>y.getContrastText(y.warning.dark))),B(y.Alert,"errorStandardBg",Ie(y.error.light,.9)),B(y.Alert,"infoStandardBg",Ie(y.info.light,.9)),B(y.Alert,"successStandardBg",Ie(y.success.light,.9)),B(y.Alert,"warningStandardBg",Ie(y.warning.light,.9)),B(y.Alert,"errorIconColor",A("palette-error-main")),B(y.Alert,"infoIconColor",A("palette-info-main")),B(y.Alert,"successIconColor",A("palette-success-main")),B(y.Alert,"warningIconColor",A("palette-warning-main")),B(y.AppBar,"defaultBg",A("palette-grey-900")),B(y.AppBar,"darkBg",A("palette-background-paper")),B(y.AppBar,"darkColor",A("palette-text-primary")),B(y.Avatar,"defaultBg",A("palette-grey-600")),B(y.Button,"inheritContainedBg",A("palette-grey-800")),B(y.Button,"inheritContainedHoverBg",A("palette-grey-700")),B(y.Chip,"defaultBorder",A("palette-grey-700")),B(y.Chip,"defaultAvatarColor",A("palette-grey-300")),B(y.Chip,"defaultIconColor",A("palette-grey-300")),B(y.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),B(y.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),B(y.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),B(y.LinearProgress,"primaryBg",Ie(y.primary.main,.5)),B(y.LinearProgress,"secondaryBg",Ie(y.secondary.main,.5)),B(y.LinearProgress,"errorBg",Ie(y.error.main,.5)),B(y.LinearProgress,"infoBg",Ie(y.info.main,.5)),B(y.LinearProgress,"successBg",Ie(y.success.main,.5)),B(y.LinearProgress,"warningBg",Ie(y.warning.main,.5)),B(y.Skeleton,"bg",`rgba(${A("palette-text-primaryChannel")} / 0.13)`),B(y.Slider,"primaryTrack",Ie(y.primary.main,.5)),B(y.Slider,"secondaryTrack",Ie(y.secondary.main,.5)),B(y.Slider,"errorTrack",Ie(y.error.main,.5)),B(y.Slider,"infoTrack",Ie(y.info.main,.5)),B(y.Slider,"successTrack",Ie(y.success.main,.5)),B(y.Slider,"warningTrack",Ie(y.warning.main,.5));const M=wo(y.background.default,.98);B(y.SnackbarContent,"bg",M),B(y.SnackbarContent,"color",Rt(()=>y.getContrastText(M))),B(y.SpeedDialAction,"fabHoverBg",wo(y.background.paper,.15)),B(y.StepConnector,"border",A("palette-grey-600")),B(y.StepContent,"border",A("palette-grey-600")),B(y.Switch,"defaultColor",A("palette-grey-300")),B(y.Switch,"defaultDisabledColor",A("palette-grey-600")),B(y.Switch,"primaryDisabledColor",Ie(y.primary.main,.55)),B(y.Switch,"secondaryDisabledColor",Ie(y.secondary.main,.55)),B(y.Switch,"errorDisabledColor",Ie(y.error.main,.55)),B(y.Switch,"infoDisabledColor",Ie(y.info.main,.55)),B(y.Switch,"successDisabledColor",Ie(y.success.main,.55)),B(y.Switch,"warningDisabledColor",Ie(y.warning.main,.55)),B(y.TableCell,"border",Ie(Co(y.divider,1),.68)),B(y.Tooltip,"bg",Co(y.grey[700],.92))}Ft(y.background,"default"),Ft(y.background,"paper"),Ft(y.common,"background"),Ft(y.common,"onBackground"),Ft(y,"divider"),Object.keys(y).forEach(M=>{const _=y[M];M!=="tonalOffset"&&_&&typeof _=="object"&&(_.main&&B(y[M],"mainChannel",Vn(kn(_.main))),_.light&&B(y[M],"lightChannel",Vn(kn(_.light))),_.dark&&B(y[M],"darkChannel",Vn(kn(_.dark))),_.contrastText&&B(y[M],"contrastTextChannel",Vn(kn(_.contrastText))),M==="text"&&(Ft(y[M],"primary"),Ft(y[M],"secondary")),M==="action"&&(_.active&&Ft(y[M],"active"),_.selected&&Ft(y[M],"selected")))})}),O=t.reduce((k,y)=>rt(k,y),O);const I={prefix:s,disableCssColorScheme:o,shouldSkipGeneratingVar:a,getSelector:U0(O)},{vars:T,generateThemeVars:w,generateStyleSheets:P}=t0(O,I);return O.vars=T,Object.entries(O.colorSchemes[O.defaultColorScheme]).forEach(([k,y])=>{O[k]=y}),O.generateThemeVars=w,O.generateStyleSheets=P,O.generateSpacing=function(){return $d(c.spacing,Is(this))},O.getColorSchemeSelector=r0(i),O.spacing=O.generateSpacing(),O.shouldSkipGeneratingVar=a,O.unstable_sxConfig={...to,...c==null?void 0:c.unstable_sxConfig},O.unstable_sx=function(y){return nn({sx:y,theme:this})},O.toRuntimeSource=Zd,O}function gc(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:Fi({...r===!0?{}:r.palette,mode:t})})}function rh(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:o=r?void 0:{light:!0},defaultColorScheme:s=r==null?void 0:r.mode,...a}=e,i=s||"light",l=o==null?void 0:o[i],c={...o,...r?{[i]:{...typeof l!="boolean"&&l,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return si(e,...t);let u=r;"palette"in e||c[i]&&(c[i]!==!0?u=c[i].palette:i==="dark"&&(u={mode:"dark"}));const d=si({...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},gc(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},gc(d,"light",c.light)),d}return!r&&!("light"in c)&&i==="light"&&(c.light=!0),F0({...a,colorSchemes:c,defaultColorScheme:i,...typeof n!="boolean"&&n},...t)}const $i=rh();function nh(){const e=zd($i);return process.env.NODE_ENV!=="production"&&V.useDebugValue(e),e[Ui]||e}function $0({props:e,name:t}){return Yd({props:e,name:t,defaultTheme:$i,themeId:Ui})}function zi(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const z0=e=>zi(e)&&e!=="classes",ft=Wd({themeId:Ui,defaultTheme:$i,rootShouldForwardProp:z0});function js(...e){const t=V.useRef(void 0),r=V.useCallback(n=>{const o=e.map(s=>{if(s==null)return null;if(typeof s=="function"){const a=s,i=a(n);return typeof i=="function"?i:()=>{a(null)}}return s.current=n,()=>{s.current=null}});return()=>{o.forEach(s=>s==null?void 0:s())}},e);return V.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}let yc=0;function G0(e){const[t,r]=V.useState(e),n=t;return V.useEffect(()=>{t==null&&(yc+=1,r(`mui-${yc}`))},[t]),n}const H0={...V},bc=H0.useId;function q0(e){return bc!==void 0?bc():G0(e)}class W0{constructor(t){this.value=void 0,this.listeners=void 0,this.subscribe=r=>(this.listeners.add(r),()=>{this.listeners.delete(r)}),this.getSnapshot=()=>this.value,this.update=r=>{const n=r(this.value);n!==this.value&&(this.value=n,this.listeners.forEach(o=>o(n)))},this.value=t,this.listeners=new Set}}const Ds=({params:e,store:t})=>{V.useEffect(()=>{t.update(n=>K({},n,{animation:K({},n.animation,{skip:e.skipAnimation})}))},[t,e.skipAnimation]);const r=V.useCallback(()=>{let n=!1;return t.update(o=>K({},o,{animation:K({},o.animation,{skipAnimationRequests:o.animation.skipAnimationRequests+1})})),()=>{n||(n=!0,t.update(o=>K({},o,{animation:K({},o.animation,{skipAnimationRequests:o.animation.skipAnimationRequests-1})})))}},[t]);return Ut(()=>{if(typeof window>"u"||!(window!=null&&window.matchMedia))return;let o;const s=i=>{i.matches?o=r():o==null||o()},a=window.matchMedia("(prefers-reduced-motion)");return s(a),a.addEventListener("change",s),()=>{a.removeEventListener("change",s)}},[r,t]),{instance:{disableAnimation:r}}};Ds.params={skipAnimation:!0};Ds.getDefaultizedParams=({params:e})=>K({},e,{skipAnimation:e.skipAnimation??!1});Ds.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 J0=(e,t,r)=>{if(t.length===1&&t[0]===r){let n=!1;try{const o={};e(o)===o&&(n=!0)}catch{}if(n){let o;try{throw new Error}catch(s){({stack:o}=s)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
75
|
+
export default theme;`}function si(e={},...t){const{breakpoints:r,mixins:n={},spacing:o,palette:s={},transitions:a={},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.":lr(20));const u=$i(s),d=_s(e);let h=rt(d,{mixins:x0(d.breakpoints,n),palette:u,shadows:T0.slice(),typography:v0(u,i),transitions:P0(a),zIndex:{...R0}});if(h=rt(h,c),h=t.reduce((p,f)=>rt(p,f),h),process.env.NODE_ENV!=="production"){const p=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],f=(m,b)=>{let S;for(S in m){const P=m[S];if(p.includes(S)&&Object.keys(P).length>0){if(process.env.NODE_ENV!=="production"){const v=pn("",S);console.error([`MUI: The \`${b}\` component increases the CSS specificity of the \`${S}\` internal state.`,"You can not override it like this: ",JSON.stringify(m,null,2),"",`Instead, you need to use the '&.${v}' syntax:`,JSON.stringify({root:{[`&.${v}`]:P}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
76
|
+
`))}m[S]={}}}};Object.keys(h.components).forEach(m=>{const b=h.components[m].styleOverrides;b&&m.startsWith("Mui")&&f(b,m)})}return h.unstable_sxConfig={...to,...c==null?void 0:c.unstable_sxConfig},h.unstable_sx=function(f){return nn({sx:f,theme:this})},h.toRuntimeSource=Zd,h}function V0(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 _0=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=V0(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function eh(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function th(e){return e==="dark"?_0:[]}function k0(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...o}=e,s=$i(t);return{palette:s,opacity:{...eh(s.mode),...r},overlays:n||th(s.mode),...o}}function j0(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 D0=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],U0=e=>(t,r)=>{const n=e.rootSelector||":root",o=e.colorSchemeSelector;let s=o;if(o==="class"&&(s=".%s"),o==="data"&&(s="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(s=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return D0(e.cssVarPrefix).forEach(i=>{a[i]=r[i],delete r[i]}),s==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:a}}:s?{[s.replace("%s",t)]:a,[`${n}, ${s.replace("%s",t)}`]:r}:{[n]:{...r,...a}}}if(s&&s!=="media")return`${n}, ${s.replace("%s",String(t))}`}else if(t){if(s==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(s)return s.replace("%s",String(t))}return n};function L0(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function B(e,t,r){!e[t]&&r&&(e[t]=r)}function kn(e){return typeof e!="string"||!e.startsWith("hsl")?e:Kd(e)}function $t(e,t){`${t}Channel`in e||(e[`${t}Channel`]=_n(kn(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 B0(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Pt=e=>{try{return e()}catch{}},F0=(e="mui")=>Xg(e);function va(e,t,r,n){if(!t)return;t=t===!0?{}:t;const o=n==="dark"?"dark":"light";if(!r){e[n]=k0({...t,palette:{mode:o,...t==null?void 0:t.palette}});return}const{palette:s,...a}=si({...r,palette:{mode:o,...t==null?void 0:t.palette}});return e[n]={...t,palette:s,opacity:{...eh(o),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||th(o)},a}function $0(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:o=!1,cssVarPrefix:s="mui",shouldSkipGeneratingVar:a=j0,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=F0(s),{[d]:p,light:f,dark:m,...b}=r,S={...b};let P=p;if((d==="dark"&&!("dark"in r)||d==="light"&&!("light"in r))&&(P=!0),!P)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${d}\` option is either missing or invalid.`:lr(21,d));const v=va(S,P,c,d);f&&!S.light&&va(S,f,void 0,"light"),m&&!S.dark&&va(S,m,void 0,"dark");let O={defaultColorScheme:d,...v,cssVarPrefix:s,colorSchemeSelector:i,rootSelector:l,getCssVar:h,colorSchemes:S,font:{...b0(v.typography),...v.font},spacing:B0(c.spacing)};Object.keys(O.colorSchemes).forEach(k=>{const y=O.colorSchemes[k].palette,A=V=>{const M=V.split("-"),j=M[1],ne=M[2];return h(V,y[j][ne])};if(y.mode==="light"&&(B(y.common,"background","#fff"),B(y.common,"onBackground","#000")),y.mode==="dark"&&(B(y.common,"background","#000"),B(y.common,"onBackground","#fff")),L0(y,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),y.mode==="light"){B(y.Alert,"errorColor",Ie(y.error.light,.6)),B(y.Alert,"infoColor",Ie(y.info.light,.6)),B(y.Alert,"successColor",Ie(y.success.light,.6)),B(y.Alert,"warningColor",Ie(y.warning.light,.6)),B(y.Alert,"errorFilledBg",A("palette-error-main")),B(y.Alert,"infoFilledBg",A("palette-info-main")),B(y.Alert,"successFilledBg",A("palette-success-main")),B(y.Alert,"warningFilledBg",A("palette-warning-main")),B(y.Alert,"errorFilledColor",Pt(()=>y.getContrastText(y.error.main))),B(y.Alert,"infoFilledColor",Pt(()=>y.getContrastText(y.info.main))),B(y.Alert,"successFilledColor",Pt(()=>y.getContrastText(y.success.main))),B(y.Alert,"warningFilledColor",Pt(()=>y.getContrastText(y.warning.main))),B(y.Alert,"errorStandardBg",Ae(y.error.light,.9)),B(y.Alert,"infoStandardBg",Ae(y.info.light,.9)),B(y.Alert,"successStandardBg",Ae(y.success.light,.9)),B(y.Alert,"warningStandardBg",Ae(y.warning.light,.9)),B(y.Alert,"errorIconColor",A("palette-error-main")),B(y.Alert,"infoIconColor",A("palette-info-main")),B(y.Alert,"successIconColor",A("palette-success-main")),B(y.Alert,"warningIconColor",A("palette-warning-main")),B(y.AppBar,"defaultBg",A("palette-grey-100")),B(y.Avatar,"defaultBg",A("palette-grey-400")),B(y.Button,"inheritContainedBg",A("palette-grey-300")),B(y.Button,"inheritContainedHoverBg",A("palette-grey-A100")),B(y.Chip,"defaultBorder",A("palette-grey-400")),B(y.Chip,"defaultAvatarColor",A("palette-grey-700")),B(y.Chip,"defaultIconColor",A("palette-grey-700")),B(y.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),B(y.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),B(y.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),B(y.LinearProgress,"primaryBg",Ae(y.primary.main,.62)),B(y.LinearProgress,"secondaryBg",Ae(y.secondary.main,.62)),B(y.LinearProgress,"errorBg",Ae(y.error.main,.62)),B(y.LinearProgress,"infoBg",Ae(y.info.main,.62)),B(y.LinearProgress,"successBg",Ae(y.success.main,.62)),B(y.LinearProgress,"warningBg",Ae(y.warning.main,.62)),B(y.Skeleton,"bg",`rgba(${A("palette-text-primaryChannel")} / 0.11)`),B(y.Slider,"primaryTrack",Ae(y.primary.main,.62)),B(y.Slider,"secondaryTrack",Ae(y.secondary.main,.62)),B(y.Slider,"errorTrack",Ae(y.error.main,.62)),B(y.Slider,"infoTrack",Ae(y.info.main,.62)),B(y.Slider,"successTrack",Ae(y.success.main,.62)),B(y.Slider,"warningTrack",Ae(y.warning.main,.62));const V=wo(y.background.default,.8);B(y.SnackbarContent,"bg",V),B(y.SnackbarContent,"color",Pt(()=>y.getContrastText(V))),B(y.SpeedDialAction,"fabHoverBg",wo(y.background.paper,.15)),B(y.StepConnector,"border",A("palette-grey-400")),B(y.StepContent,"border",A("palette-grey-400")),B(y.Switch,"defaultColor",A("palette-common-white")),B(y.Switch,"defaultDisabledColor",A("palette-grey-100")),B(y.Switch,"primaryDisabledColor",Ae(y.primary.main,.62)),B(y.Switch,"secondaryDisabledColor",Ae(y.secondary.main,.62)),B(y.Switch,"errorDisabledColor",Ae(y.error.main,.62)),B(y.Switch,"infoDisabledColor",Ae(y.info.main,.62)),B(y.Switch,"successDisabledColor",Ae(y.success.main,.62)),B(y.Switch,"warningDisabledColor",Ae(y.warning.main,.62)),B(y.TableCell,"border",Ae(Co(y.divider,1),.88)),B(y.Tooltip,"bg",Co(y.grey[700],.92))}if(y.mode==="dark"){B(y.Alert,"errorColor",Ae(y.error.light,.6)),B(y.Alert,"infoColor",Ae(y.info.light,.6)),B(y.Alert,"successColor",Ae(y.success.light,.6)),B(y.Alert,"warningColor",Ae(y.warning.light,.6)),B(y.Alert,"errorFilledBg",A("palette-error-dark")),B(y.Alert,"infoFilledBg",A("palette-info-dark")),B(y.Alert,"successFilledBg",A("palette-success-dark")),B(y.Alert,"warningFilledBg",A("palette-warning-dark")),B(y.Alert,"errorFilledColor",Pt(()=>y.getContrastText(y.error.dark))),B(y.Alert,"infoFilledColor",Pt(()=>y.getContrastText(y.info.dark))),B(y.Alert,"successFilledColor",Pt(()=>y.getContrastText(y.success.dark))),B(y.Alert,"warningFilledColor",Pt(()=>y.getContrastText(y.warning.dark))),B(y.Alert,"errorStandardBg",Ie(y.error.light,.9)),B(y.Alert,"infoStandardBg",Ie(y.info.light,.9)),B(y.Alert,"successStandardBg",Ie(y.success.light,.9)),B(y.Alert,"warningStandardBg",Ie(y.warning.light,.9)),B(y.Alert,"errorIconColor",A("palette-error-main")),B(y.Alert,"infoIconColor",A("palette-info-main")),B(y.Alert,"successIconColor",A("palette-success-main")),B(y.Alert,"warningIconColor",A("palette-warning-main")),B(y.AppBar,"defaultBg",A("palette-grey-900")),B(y.AppBar,"darkBg",A("palette-background-paper")),B(y.AppBar,"darkColor",A("palette-text-primary")),B(y.Avatar,"defaultBg",A("palette-grey-600")),B(y.Button,"inheritContainedBg",A("palette-grey-800")),B(y.Button,"inheritContainedHoverBg",A("palette-grey-700")),B(y.Chip,"defaultBorder",A("palette-grey-700")),B(y.Chip,"defaultAvatarColor",A("palette-grey-300")),B(y.Chip,"defaultIconColor",A("palette-grey-300")),B(y.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),B(y.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),B(y.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),B(y.LinearProgress,"primaryBg",Ie(y.primary.main,.5)),B(y.LinearProgress,"secondaryBg",Ie(y.secondary.main,.5)),B(y.LinearProgress,"errorBg",Ie(y.error.main,.5)),B(y.LinearProgress,"infoBg",Ie(y.info.main,.5)),B(y.LinearProgress,"successBg",Ie(y.success.main,.5)),B(y.LinearProgress,"warningBg",Ie(y.warning.main,.5)),B(y.Skeleton,"bg",`rgba(${A("palette-text-primaryChannel")} / 0.13)`),B(y.Slider,"primaryTrack",Ie(y.primary.main,.5)),B(y.Slider,"secondaryTrack",Ie(y.secondary.main,.5)),B(y.Slider,"errorTrack",Ie(y.error.main,.5)),B(y.Slider,"infoTrack",Ie(y.info.main,.5)),B(y.Slider,"successTrack",Ie(y.success.main,.5)),B(y.Slider,"warningTrack",Ie(y.warning.main,.5));const V=wo(y.background.default,.98);B(y.SnackbarContent,"bg",V),B(y.SnackbarContent,"color",Pt(()=>y.getContrastText(V))),B(y.SpeedDialAction,"fabHoverBg",wo(y.background.paper,.15)),B(y.StepConnector,"border",A("palette-grey-600")),B(y.StepContent,"border",A("palette-grey-600")),B(y.Switch,"defaultColor",A("palette-grey-300")),B(y.Switch,"defaultDisabledColor",A("palette-grey-600")),B(y.Switch,"primaryDisabledColor",Ie(y.primary.main,.55)),B(y.Switch,"secondaryDisabledColor",Ie(y.secondary.main,.55)),B(y.Switch,"errorDisabledColor",Ie(y.error.main,.55)),B(y.Switch,"infoDisabledColor",Ie(y.info.main,.55)),B(y.Switch,"successDisabledColor",Ie(y.success.main,.55)),B(y.Switch,"warningDisabledColor",Ie(y.warning.main,.55)),B(y.TableCell,"border",Ie(Co(y.divider,1),.68)),B(y.Tooltip,"bg",Co(y.grey[700],.92))}$t(y.background,"default"),$t(y.background,"paper"),$t(y.common,"background"),$t(y.common,"onBackground"),$t(y,"divider"),Object.keys(y).forEach(V=>{const M=y[V];V!=="tonalOffset"&&M&&typeof M=="object"&&(M.main&&B(y[V],"mainChannel",_n(kn(M.main))),M.light&&B(y[V],"lightChannel",_n(kn(M.light))),M.dark&&B(y[V],"darkChannel",_n(kn(M.dark))),M.contrastText&&B(y[V],"contrastTextChannel",_n(kn(M.contrastText))),V==="text"&&($t(y[V],"primary"),$t(y[V],"secondary")),V==="action"&&(M.active&&$t(y[V],"active"),M.selected&&$t(y[V],"selected")))})}),O=t.reduce((k,y)=>rt(k,y),O);const I={prefix:s,disableCssColorScheme:o,shouldSkipGeneratingVar:a,getSelector:U0(O)},{vars:T,generateThemeVars:w,generateStyleSheets:R}=t0(O,I);return O.vars=T,Object.entries(O.colorSchemes[O.defaultColorScheme]).forEach(([k,y])=>{O[k]=y}),O.generateThemeVars=w,O.generateStyleSheets=R,O.generateSpacing=function(){return Nd(c.spacing,Is(this))},O.getColorSchemeSelector=r0(i),O.spacing=O.generateSpacing(),O.shouldSkipGeneratingVar=a,O.unstable_sxConfig={...to,...c==null?void 0:c.unstable_sxConfig},O.unstable_sx=function(y){return nn({sx:y,theme:this})},O.toRuntimeSource=Zd,O}function gc(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:$i({...r===!0?{}:r.palette,mode:t})})}function rh(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:o=r?void 0:{light:!0},defaultColorScheme:s=r==null?void 0:r.mode,...a}=e,i=s||"light",l=o==null?void 0:o[i],c={...o,...r?{[i]:{...typeof l!="boolean"&&l,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return si(e,...t);let u=r;"palette"in e||c[i]&&(c[i]!==!0?u=c[i].palette:i==="dark"&&(u={mode:"dark"}));const d=si({...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},gc(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},gc(d,"light",c.light)),d}return!r&&!("light"in c)&&i==="light"&&(c.light=!0),$0({...a,colorSchemes:c,defaultColorScheme:i,...typeof n!="boolean"&&n},...t)}const Ni=rh();function nh(){const e=zd(Ni);return process.env.NODE_ENV!=="production"&&_.useDebugValue(e),e[Ui]||e}function N0({props:e,name:t}){return Yd({props:e,name:t,defaultTheme:Ni,themeId:Ui})}function zi(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const z0=e=>zi(e)&&e!=="classes",ft=Wd({themeId:Ui,defaultTheme:Ni,rootShouldForwardProp:z0});function js(...e){const t=_.useRef(void 0),r=_.useCallback(n=>{const o=e.map(s=>{if(s==null)return null;if(typeof s=="function"){const a=s,i=a(n);return typeof i=="function"?i:()=>{a(null)}}return s.current=n,()=>{s.current=null}});return()=>{o.forEach(s=>s==null?void 0:s())}},e);return _.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}let yc=0;function G0(e){const[t,r]=_.useState(e),n=t;return _.useEffect(()=>{t==null&&(yc+=1,r(`mui-${yc}`))},[t]),n}const H0={..._},bc=H0.useId;function q0(e){return bc!==void 0?bc():G0(e)}class W0{constructor(t){this.value=void 0,this.listeners=void 0,this.subscribe=r=>(this.listeners.add(r),()=>{this.listeners.delete(r)}),this.getSnapshot=()=>this.value,this.update=r=>{const n=r(this.value);n!==this.value&&(this.value=n,this.listeners.forEach(o=>o(n)))},this.value=t,this.listeners=new Set}}const Ds=({params:e,store:t})=>{_.useEffect(()=>{t.update(n=>K({},n,{animation:K({},n.animation,{skip:e.skipAnimation})}))},[t,e.skipAnimation]);const r=_.useCallback(()=>{let n=!1;return t.update(o=>K({},o,{animation:K({},o.animation,{skipAnimationRequests:o.animation.skipAnimationRequests+1})})),()=>{n||(n=!0,t.update(o=>K({},o,{animation:K({},o.animation,{skipAnimationRequests:o.animation.skipAnimationRequests-1})})))}},[t]);return Ut(()=>{if(typeof window>"u"||!(window!=null&&window.matchMedia))return;let o;const s=i=>{i.matches?o=r():o==null||o()},a=window.matchMedia("(prefers-reduced-motion)");return s(a),a.addEventListener("change",s),()=>{a.removeEventListener("change",s)}},[r,t]),{instance:{disableAnimation:r}}};Ds.params={skipAnimation:!0};Ds.getDefaultizedParams=({params:e})=>K({},e,{skipAnimation:e.skipAnimation??!1});Ds.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 J0=(e,t,r)=>{if(t.length===1&&t[0]===r){let n=!1;try{const o={};e(o)===o&&(n=!0)}catch{}if(n){let o;try{throw new Error}catch(s){({stack:o}=s)}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:o})}}},Y0=(e,t,r)=>{const{memoize:n,memoizeOptions:o}=t,{inputSelectorResults:s,inputSelectorResultsCopy:a}=e,i=n(()=>({}),...o);if(!(i.apply(null,s)===i.apply(null,a))){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:s,secondInputs:a,stack:c})}},K0={inputStabilityCheck:"once",identityFunctionCheck:"once"},ns=Symbol("NOT_FOUND");function
|
|
83
|
+
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:r,firstInputs:s,secondInputs:a,stack:c})}},K0={inputStabilityCheck:"once",identityFunctionCheck:"once"},ns=Symbol("NOT_FOUND");function Q0(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function X0(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Z0(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 xc=e=>Array.isArray(e)?e:[e];function ey(e){const t=Array.isArray(e[0])?e[0]:e;return Z0(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Sc(e,t){const r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var ty=(e,t)=>{const{identityFunctionCheck:r,inputStabilityCheck:n}={...K0,...t};return{identityFunctionCheck:{shouldRun:r==="always"||r==="once"&&e,run:J0},inputStabilityCheck:{shouldRun:n==="always"||n==="once"&&e,run:Y0}}};function ry(e){let t;return{get(r){return t&&e(t.key,r)?t.value:ns},put(r,n){t={key:r,value:n}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function ny(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 ns}function o(i,l){n(i)===ns&&(r.unshift({key:i,value:l}),r.length>e&&r.pop())}function s(){return r}function a(){r=[]}return{get:n,put:o,getEntries:s,clear:a}}var oy=(e,t)=>e===t;function sy(e){return function(r,n){if(r===null||n===null||r.length!==n.length)return!1;const{length:o}=r;for(let s=0;s<o;s++)if(!e(r[s],n[s]))return!1;return!0}}function ay(e,t){const r=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:n=oy,maxSize:o=1,resultEqualityCheck:s}=r,a=sy(n);let i=0;const l=o<=1?ry(a):ny(o,a);function c(){let u=l.get(arguments);if(u===ns){if(u=e.apply(null,arguments),i++,s){const h=l.getEntries().find(p=>s(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 iy=class{constructor(e){this.value=e}deref(){return this.value}},ly=typeof WeakRef<"u"?WeakRef:iy,cy=0,vc=1;function Oo(){return{s:cy,v:void 0,o:null,p:null}}function oh(e,t={}){let r=Oo();const{resultEqualityCheck:n}=t;let o,s=0;function a(){var d;let i=r;const{length:l}=arguments;for(let h=0,p=l;h<p;h++){const f=arguments[h];if(typeof f=="function"||typeof f=="object"&&f!==null){let m=i.o;m===null&&(i.o=m=new WeakMap);const b=m.get(f);b===void 0?(i=Oo(),m.set(f,i)):i=b}else{let m=i.p;m===null&&(i.p=m=new Map);const b=m.get(f);b===void 0?(i=Oo(),m.set(f,i)):i=b}}const c=i;let u;if(i.s===vc)u=i.v;else if(u=e.apply(null,arguments),s++,n){const h=((d=o==null?void 0:o.deref)==null?void 0:d.call(o))??o;h!=null&&n(h,u)&&(u=h,s!==0&&s--),o=typeof u=="object"&&u!==null||typeof u=="function"?new ly(u):u}return c.s=vc,c.v=u,u}return a.clearCache=()=>{r=Oo(),a.resetResultsCount()},a.resultsCount=()=>s,a.resetResultsCount=()=>{s=0},a}function sh(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let s=0,a=0,i,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),Q0(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...r,...l},{memoize:d,memoizeOptions:h=[],argsMemoize:p=oh,argsMemoizeOptions:f=[],devModeChecks:m={}}=u,b=xc(h),S=xc(f),P=ey(o),v=d(function(){return s++,c.apply(null,arguments)},...b);let O=!0;const I=p(function(){a++;const w=Sc(P,arguments);if(i=v.apply(null,w),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:R,inputStabilityCheck:k}=ty(O,m);if(R.shouldRun&&R.run(c,w,i),k.shouldRun){const y=Sc(P,arguments);k.run({inputSelectorResults:w,inputSelectorResultsCopy:y},{memoize:d,memoizeOptions:b},arguments)}O&&(O=!1)}return i},...S);return Object.assign(I,{resultFunc:c,memoizedResultFunc:v,dependencies:P,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>i,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:d,argsMemoize:p})};return Object.assign(n,{withTypes:()=>n}),n}var uy=sh(oh),dy=Object.assign((e,t=uy)=>{X0(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(s=>e[s]);return t(n,(...s)=>s.reduce((a,i,l)=>(a[r[l]]=i,a),{}))},{withTypes:()=>dy});const hy=sh({memoize:ay,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),Cc=new WeakMap,he=(...e)=>(r,...n)=>{const o=r.cacheKey;let s=Cc.get(o);s||(s=new Map,Cc.set(o,s));const a=s.get(e);if(a)return a(r,...n);const i=hy(...e);return s.set(e,i),i(r,...n)},py=e=>e.animation,fy=he([py],e=>e.skip||e.skipAnimationRequests>0);function Ln(e){return e&&e.ownerDocument||document}function my(e){return Ln(e).defaultView||window}var To={exports:{}},Ca={},Eo={exports:{}},wa={};/**
|
|
84
84
|
* @license React
|
|
85
85
|
* use-sync-external-store-shim.production.js
|
|
86
86
|
*
|
|
@@ -96,7 +96,7 @@ Avoid returning a new reference inside your input selector, e.g.
|
|
|
96
96
|
*
|
|
97
97
|
* This source code is licensed under the MIT license found in the
|
|
98
98
|
* LICENSE file in the root directory of this source tree.
|
|
99
|
-
*/var Oc;function yy(){return Oc||(Oc=1,process.env.NODE_ENV!=="production"&&function(){function e(p,f){return p===f&&(p!==0||1/p===1/f)||p!==p&&f!==f}function t(p,f){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=f();if(!d){var b=f();s(m,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}b=a({inst:{value:m,getSnapshot:f}});var S=b[0].inst,
|
|
99
|
+
*/var Oc;function yy(){return Oc||(Oc=1,process.env.NODE_ENV!=="production"&&function(){function e(p,f){return p===f&&(p!==0||1/p===1/f)||p!==p&&f!==f}function t(p,f){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=f();if(!d){var b=f();s(m,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}b=a({inst:{value:m,getSnapshot:f}});var S=b[0].inst,P=b[1];return l(function(){S.value=m,S.getSnapshot=f,r(S)&&P({inst:S})},[p,m,f]),i(function(){return r(S)&&P({inst:S}),p(function(){r(S)&&P({inst:S})})},[p]),c(m),m}function r(p){var f=p.getSnapshot;p=p.value;try{var m=f();return!s(p,m)}catch{return!0}}function n(p,f){return f()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=D,s=typeof Object.is=="function"?Object.is:e,a=o.useState,i=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:t;Oa.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Oa}var Tc;function ah(){return Tc||(Tc=1,process.env.NODE_ENV==="production"?Eo.exports=gy():Eo.exports=yy()),Eo.exports}/**
|
|
100
100
|
* @license React
|
|
101
101
|
* use-sync-external-store-shim/with-selector.production.js
|
|
102
102
|
*
|
|
@@ -104,7 +104,7 @@ Avoid returning a new reference inside your input selector, e.g.
|
|
|
104
104
|
*
|
|
105
105
|
* This source code is licensed under the MIT license found in the
|
|
106
106
|
* LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/var Ec;function by(){if(Ec)return Ca;Ec=1;var e=D,t=ah();function r(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var n=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,s=e.useRef,a=e.useEffect,i=e.useMemo,l=e.useDebugValue;return Ca.useSyncExternalStoreWithSelector=function(c,u,d,h,p){var f=s(null);if(f.current===null){var m={hasValue:!1,value:null};f.current=m}else m=f.current;f=i(function(){function S(T){if(!
|
|
107
|
+
*/var Ec;function by(){if(Ec)return Ca;Ec=1;var e=D,t=ah();function r(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var n=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,s=e.useRef,a=e.useEffect,i=e.useMemo,l=e.useDebugValue;return Ca.useSyncExternalStoreWithSelector=function(c,u,d,h,p){var f=s(null);if(f.current===null){var m={hasValue:!1,value:null};f.current=m}else m=f.current;f=i(function(){function S(T){if(!P){if(P=!0,v=T,T=h(T),p!==void 0&&m.hasValue){var w=m.value;if(p(w,T))return O=w}return O=T}if(w=O,n(v,T))return w;var R=h(T);return p!==void 0&&p(w,R)?(v=T,w):(v=T,O=R)}var P=!1,v,O,I=d===void 0?null:d;return[function(){return S(u())},I===null?void 0:function(){return S(I())}]},[u,d,h,p]);var b=o(c,f[0],f[1]);return a(function(){m.hasValue=!0,m.value=b},[b]),l(b),b},Ca}var Ta={};/**
|
|
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 Ic;function xy(){return Ic||(Ic=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=D,r=ah(),n=typeof Object.is=="function"?Object.is:e,o=r.useSyncExternalStore,s=t.useRef,a=t.useEffect,i=t.useMemo,l=t.useDebugValue;Ta.useSyncExternalStoreWithSelector=function(c,u,d,h,p){var f=s(null);if(f.current===null){var m={hasValue:!1,value:null};f.current=m}else m=f.current;f=i(function(){function S(T){if(!R){if(R=!0,v=T,T=h(T),p!==void 0&&m.hasValue){var w=m.value;if(p(w,T))return O=w}return O=T}if(w=O,n(v,T))return w;var P=h(T);return p!==void 0&&p(w,P)?(v=T,w):(v=T,O=P)}var R=!1,v,O,I=d===void 0?null:d;return[function(){return S(u())},I===null?void 0:function(){return S(I())}]},[u,d,h,p]);var b=o(c,f[0],f[1]);return a(function(){m.hasValue=!0,m.value=b},[b]),l(b),b},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Ta}var Ac;function Sy(){return Ac||(Ac=1,process.env.NODE_ENV==="production"?To.exports=by():To.exports=xy()),To.exports}var vy=Sy();const Cy=Object.is,at=(e,t,r=[],n=Cy)=>{const o=s=>t(s,...r);return vy.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,o,n)},wy="DEFAULT_X_AXIS_KEY",Oy="DEFAULT_Y_AXIS_KEY",Ty={top:20,bottom:20,left:20,right:20},Ey=45,Iy=25,ih=20,fn=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.x},mn=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.y},Ay=he([mn],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)),Ry=he([mn],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)),Py=he([fn],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)),_y=he([fn],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)),My=e=>e.dimensions,lh=e=>e.dimensions.width,ch=e=>e.dimensions.height,Vy=e=>e.dimensions.margin.top,ky=e=>e.dimensions.margin.right,jy=e=>e.dimensions.margin.bottom,Dy=e=>e.dimensions.margin.left,ro=he([lh,ch,Vy,ky,jy,Dy,Py,Ry,_y,Ay],(e,t,r,n,o,s,a,i,l,c)=>({width:e-s-n-c-i,left:s+c,right:n+i,height:t-r-o-a-l,top:r+a,bottom:o+l})),Uy=he([My],e=>({width:e.propsWidth,height:e.propsHeight})),Ly=he([lh,ch],(e,t)=>({width:e,height:t}));function uh(e,t){return typeof e=="number"?{top:e,bottom:e,left:e,right:e}:t?K({},t,e):e}const By=10,Us=({params:e,store:t,svgRef:r})=>{const n=e.width!==void 0&&e.height!==void 0,o=V.useRef({displayError:!1,initialCompute:!0,computeRun:0}),[s,a]=V.useState(0),[i,l]=V.useState(0),c=V.useCallback(()=>{const f=r==null?void 0:r.current;if(!f)return{};const b=my(f).getComputedStyle(f),S=Math.floor(parseFloat(b.height))||0,R=Math.floor(parseFloat(b.width))||0;return t.update(v=>v.dimensions.width===R&&v.dimensions.height===S?v:K({},v,{dimensions:{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:e.width??R,height:e.height??S,propsWidth:e.width,propsHeight:e.height}})),{height:S,width:R}},[t,r,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]);V.useEffect(()=>{t.update(f=>{const m=e.width??f.dimensions.width,b=e.height??f.dimensions.height;return K({},f,{dimensions:{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:m,height:b,propsHeight:e.height,propsWidth:e.width}})})},[t,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]),V.useEffect(()=>{o.current.displayError=!0},[]),Ut(()=>{if(n||!o.current.initialCompute||o.current.computeRun>By)return;const f=c();f.width!==s||f.height!==i?(o.current.computeRun+=1,f.width!==void 0&&a(f.width),f.height!==void 0&&l(f.height)):o.current.initialCompute&&(o.current.initialCompute=!1)},[i,s,c,n]),Ut(()=>{if(n)return()=>{};c();const f=r.current;if(typeof ResizeObserver>"u")return()=>{};let m;const b=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{c()})});return f&&b.observe(f),()=>{m&&cancelAnimationFrame(m),f&&b.unobserve(f)}},[c,n,r]),process.env.NODE_ENV!=="production"&&(o.current.displayError&&e.width===void 0&&s===0&&(console.error("MUI X Charts: ChartContainer does not have `width` prop, and its container has no `width` defined."),o.current.displayError=!1),o.current.displayError&&e.height===void 0&&i===0&&(console.error("MUI X Charts: ChartContainer does not have `height` prop, and its container has no `height` defined."),o.current.displayError=!1));const u=at(t,ro),d=V.useCallback(f=>f>=u.left-1&&f<=u.left+u.width,[u.left,u.width]),h=V.useCallback(f=>f>=u.top-1&&f<=u.top+u.height,[u.height,u.top]);return{instance:{isPointInside:V.useCallback((f,m,b)=>b&&"closest"in b&&b.closest("[data-drawing-container]")?!0:d(f)&&h(m),[d,h]),isXInside:d,isYInside:h}}};Us.params={width:!0,height:!0,margin:!0};Us.getDefaultizedParams=({params:e})=>K({},e,{margin:uh(e.margin,Ty)});Us.getInitialState=({width:e,height:t,margin:r})=>({dimensions:{margin:r,width:e??0,height:t??0,propsWidth:e,propsHeight:t}});const Gi=({params:e,store:t})=>(Ut(()=>{t.update(r=>K({},r,{experimentalFeatures:e.experimentalFeatures}))},[t,e.experimentalFeatures]),{});Gi.params={experimentalFeatures:!0};Gi.getInitialState=({experimentalFeatures:e})=>({experimentalFeatures:e});const Ny=e=>e.experimentalFeatures,dh=he([Ny],e=>!!(e!=null&&e.preferStrictDomainInLineCharts));let Rc=0;const Fy=()=>(Rc+=1,`mui-chart-${Rc}`),Hi=({params:e,store:t})=>(V.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??Fy()})}))},[t,e.id]),{});Hi.params={id:!0};Hi.getInitialState=({id:e})=>({id:{chartId:e,providedChartId:e}});const $y=e=>e.id,zy=he([$y],e=>e.chartId),Gy=["#4254FB","#FFB422","#FA4F58","#0DBEFF","#22BF75","#FA83B4","#FF7511"],Hy=["#495AFB","#FFC758","#F35865","#30C8FF","#44CE8D","#F286B3","#FF8C39"],hh=e=>e==="dark"?Hy:Gy,ph=({series:e,colors:t,seriesConfig:r,dataset:n})=>{const o={};e.forEach((a,i)=>{var u;const l=r[a.type].getSeriesWithDefaultValues(a,i,t),c=l.id;if(o[a.type]===void 0&&(o[a.type]={series:{},seriesOrder:[]}),((u=o[a.type])==null?void 0:u.series[c])!==void 0)throw new Error(`MUI X Charts: series' id "${c}" is not unique.`);o[a.type].series[c]=l,o[a.type].seriesOrder.push(c)});const s={};return Object.keys(r).forEach(a=>{var l,c;const i=o[a];i!==void 0&&(s[a]=((c=(l=r[a])==null?void 0:l.seriesProcessor)==null?void 0:c.call(l,i,n))??o[a])}),s},Ls=({params:e,store:t,seriesConfig:r})=>{const{series:n,dataset:o,theme:s,colors:a}=e,i=V.useRef(!0);return V.useEffect(()=>{if(i.current){i.current=!1;return}t.update(l=>K({},l,{series:K({},l.series,{processedSeries:ph({series:n,colors:typeof a=="function"?a(s):a,seriesConfig:r,dataset:o})})}))},[a,o,n,s,r,t]),{}};Ls.params={dataset:!0,series:!0,colors:!0,theme:!0};const qy=[];Ls.getDefaultizedParams=({params:e})=>{var t;return K({},e,{series:(t=e.series)!=null&&t.length?e.series:qy,colors:e.colors??hh,theme:e.theme??"light"})};Ls.getInitialState=({series:e=[],colors:t,theme:r,dataset:n},o,s)=>({series:{seriesConfig:s,processedSeries:ph({series:e,colors:typeof t=="function"?t(r):t,seriesConfig:s,dataset:n})}});const fh=e=>e.series,no=he([fh],e=>e.processedSeries),Bs=he([fh],e=>e.seriesConfig),Wy={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 mh{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 Wy)throw new Error(`Gesture can't be created with a native event name. Tried to use "${t.name}". Please use a custom name instead.`);this.name=t.name,this.preventDefault=t.preventDefault??!1,this.stopPropagation=t.stopPropagation??!1,this.preventIf=t.preventIf??[],this.requiredKeys=t.requiredKeys??[],this.pointerMode=t.pointerMode??[]}init(t,r,n,o){this.element=t,this.pointerManager=r,this.gesturesRegistry=n,this.keyboardManager=o;const s=`${this.name}ChangeOptions`;this.element.addEventListener(s,this.handleOptionsChange.bind(this));const a=`${this.name}ChangeState`;this.element.addEventListener(a,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 Jy{constructor(){this.activeGestures=new Map}registerActiveGesture(t,r){this.activeGestures.has(t)||this.activeGestures.set(t,new Set);const n=this.activeGestures.get(t),o={gesture:r,element:t};n.add(o)}unregisterActiveGesture(t,r){const n=this.activeGestures.get(t);n&&(n.forEach(o=>{o.gesture===r&&n.delete(o)}),n.size===0&&this.activeGestures.delete(t))}getActiveGestures(t){const r=this.activeGestures.get(t);return r?Array.from(r).reduce((n,o)=>(n[o.gesture.name]=!0,n),{}):{}}isGestureActive(t,r){const n=this.activeGestures.get(t);return n?Array.from(n).some(o=>o.gesture===r):!1}destroy(){this.activeGestures.clear()}unregisterElement(t){this.activeGestures.delete(t)}}class Yy{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 Ky{constructor(t){this.root=void 0,this.touchAction=void 0,this.passive=void 0,this.preventEventInterruption=!0,this.pointers=new Map,this.gestureHandlers=new Set,this.handleInterruptEvents=r=>{if(this.preventEventInterruption&&"pointerType"in r&&r.pointerType==="touch"){r.preventDefault();return}const n=new PointerEvent("forceCancel",{bubbles:!1,cancelable:!1}),o=this.pointers.values().next().value;if(this.pointers.size>0&&o){Object.defineProperties(n,{clientX:{value:o.clientX},clientY:{value:o.clientY},pointerId:{value:o.pointerId},pointerType:{value:o.pointerType}});for(const[s,a]of this.pointers.entries()){const i=K({},a,{type:"forceCancel"});this.pointers.set(s,i)}}this.notifyHandlers(n),this.pointers.clear()},this.handlePointerEvent=r=>{const{type:n,pointerId:o}=r;if(n==="pointerdown"){if(this.pointers.set(o,this.createPointerData(r)),r.target instanceof Element)try{r.target.setPointerCapture(o)}catch{}}else if(n==="pointermove")this.pointers.set(o,this.createPointerData(r));else if(n==="pointerup"||n==="pointercancel"||n==="forceCancel"){if(r.target instanceof Element)try{r.target.releasePointerCapture(o)}catch{}this.pointers.set(o,this.createPointerData(r)),this.notifyHandlers(r),this.pointers.delete(o);return}this.notifyHandlers(r)},this.root=t.root??document.documentElement,this.touchAction=t.touchAction||"auto",this.passive=t.passive!==!1,this.preventEventInterruption=t.preventEventInterruption!==!1,this.setupEventListeners()}registerGestureHandler(t){return this.gestureHandlers.add(t),()=>{this.gestureHandlers.delete(t)}}getPointers(){return new Map(this.pointers)}setupEventListeners(){this.touchAction!=="auto"&&(this.root.style.touchAction=this.touchAction),this.root.addEventListener("pointerdown",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointermove",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointerup",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointercancel",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("forceCancel",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("blur",this.handleInterruptEvents),this.root.addEventListener("contextmenu",this.handleInterruptEvents)}notifyHandlers(t){this.gestureHandlers.forEach(r=>r(this.pointers,t))}createPointerData(t){return{pointerId:t.pointerId,clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY,target:t.target,timeStamp:t.timeStamp,type:t.type,isPrimary:t.isPrimary,pressure:t.pressure,width:t.width,height:t.height,pointerType:t.pointerType,srcEvent:t}}destroy(){this.root.removeEventListener("pointerdown",this.handlePointerEvent),this.root.removeEventListener("pointermove",this.handlePointerEvent),this.root.removeEventListener("pointerup",this.handlePointerEvent),this.root.removeEventListener("pointercancel",this.handlePointerEvent),this.root.removeEventListener("forceCancel",this.handlePointerEvent),this.root.removeEventListener("blur",this.handleInterruptEvents),this.root.removeEventListener("contextmenu",this.handleInterruptEvents),this.pointers.clear(),this.gestureHandlers.clear()}}class Xy{constructor(t){this.gestureTemplates=new Map,this.elementGestureMap=new Map,this.activeGesturesRegistry=new Jy,this.pointerManager=void 0,this.keyboardManager=new Yy,this.pointerManager=new Ky({root:t.root,touchAction:t.touchAction,passive:t.passive}),t.gestures&&t.gestures.length>0&&t.gestures.forEach(r=>{this.addGestureTemplate(r)})}addGestureTemplate(t){this.gestureTemplates.has(t.name)&&console.warn(`Gesture template with name "${t.name}" already exists. It will be overwritten.`),this.gestureTemplates.set(t.name,t)}setGestureOptions(t,r,n){const o=this.elementGestureMap.get(r);if(!o||!o.has(t)){console.error(`Gesture "${t}" not found on the provided element.`);return}const s=new CustomEvent(`${t}ChangeOptions`,{detail:n,bubbles:!1,cancelable:!1});r.dispatchEvent(s)}setGestureState(t,r,n){const o=this.elementGestureMap.get(r);if(!o||!o.has(t)){console.error(`Gesture "${t}" not found on the provided element.`);return}const s=new CustomEvent(`${t}ChangeState`,{detail:n,bubbles:!1,cancelable:!1});r.dispatchEvent(s)}registerElement(t,r,n){if(Array.isArray(t))return t.forEach(s=>{const a=n==null?void 0:n[s];this.registerSingleGesture(s,r,a)}),r;const o=n==null?void 0:n[t];return this.registerSingleGesture(t,r,o),r}registerSingleGesture(t,r,n){const o=this.gestureTemplates.get(t);if(!o)return console.error(`Gesture template "${t}" not found.`),!1;this.elementGestureMap.has(r)||this.elementGestureMap.set(r,new Map);const s=this.elementGestureMap.get(r);s.has(t)&&(console.warn(`Element already has gesture "${t}" registered. It will be replaced.`),this.unregisterElement(t,r));const a=o.clone(n);return a.init(r,this.pointerManager,this.activeGesturesRegistry,this.keyboardManager),s.set(t,a),!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 oo extends mh{constructor(t){super(t),this.unregisterHandler=null,this.originalTarget=null,this.optionsType=void 0,this.mutableOptionsType=void 0,this.minPointers=void 0,this.maxPointers=void 0,this.minPointers=t.minPointers??1,this.maxPointers=t.maxPointers??1/0}init(t,r,n,o){super.init(t,r,n,o),this.unregisterHandler=this.pointerManager.registerGestureHandler((s,a)=>this.handlePointerEvent(s,a))}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 Qy(e,t){const r=t.x-e.x,n=t.y-e.y;return Math.sqrt(r*r+n*n)}function Ea(e){if(e.length<2)return 0;let t=0,r=0;for(let n=0;n<e.length;n+=1)for(let o=n+1;o<e.length;o+=1)t+=Qy({x:e[n].clientX,y:e[n].clientY},{x:e[o].clientX,y:e[o].clientY}),r+=1;return r>0?t/r:0}function Yt(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 gn(e,t){return`${e}${t==="ongoing"?"":t.charAt(0).toUpperCase()+t.slice(1)}`}const Io=1e-5,nr=1e-5,Pc=.15;function Zy(e,t){const r=t.x-e.x,n=t.y-e.y,o={vertical:null,horizontal:null,mainAxis:null},s=eb(t,e),a=Math.abs(r)>Math.abs(n)?"horizontal":"vertical",i=s||a==="horizontal"?Io:Pc,l=s?Io:a==="horizontal"?Pc:Io;return Math.abs(r)>i&&(o.horizontal=r>0?"right":"left"),Math.abs(n)>l&&(o.vertical=n>0?"down":"up"),o.mainAxis=s?"diagonal":a,o}function eb(e,t){const r=t.x-e.x,n=t.y-e.y,o=Math.atan2(n,r)*180/Math.PI;return o>=-45+nr&&o<=-22.5+nr||o>=22.5+nr&&o<=45+nr||o>=135+nr&&o<=157.5+nr||o>=-157.5+nr&&o<=-135+nr}function tb(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 rb=0,nb=e=>e>rb?1:e<-0?-1:0;class qi extends oo{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 qi(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}init(t,r,n,o){super.init(t,r,n,o),this.element.addEventListener("pointerenter",this.handleElementEnterBound),this.element.addEventListener("pointerleave",this.handleElementLeaveBound)}destroy(){this.element.removeEventListener("pointerenter",this.handleElementEnterBound),this.element.removeEventListener("pointerleave",this.handleElementLeaveBound),this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t)}resetState(){this.isActive=!1,this.state={lastPosition:null}}handleElementEnter(t){if(t.pointerType!=="mouse"&&t.pointerType!=="pen")return;const r=this.pointerManager.getPointers()||new Map,n=Array.from(r.values());if(n.length>=this.minPointers&&n.length<=this.maxPointers){this.isActive=!0;const o={x:t.clientX,y:t.clientY};this.state.lastPosition=o,this.emitMoveEvent(this.element,"start",n,t),this.emitMoveEvent(this.element,"ongoing",n,t)}}handleElementLeave(t){if(t.pointerType!=="mouse"&&t.pointerType!=="pen"||!this.isActive)return;const r=this.pointerManager.getPointers()||new Map,n=Array.from(r.values());this.emitMoveEvent(this.element,"end",n,t),this.resetState()}handlePointerEvent(t,r){if(r.type!=="pointermove"||r.pointerType!=="mouse"&&r.pointerType!=="pen")return;this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation();const n=Array.from(t.values()),o=this.getTargetElement(r);if(!o||n.length<this.minPointers||n.length>this.maxPointers)return;if(this.shouldPreventGesture(o)){if(!this.isActive)return;this.resetState(),this.emitMoveEvent(o,"end",n,r);return}const s={x:r.clientX,y:r.clientY};this.state.lastPosition=s,this.isActive||(this.isActive=!0,this.emitMoveEvent(o,"start",n,r)),this.emitMoveEvent(o,"ongoing",n,r)}emitMoveEvent(t,r,n,o){const s=this.state.lastPosition||Yt(n),a=this.gesturesRegistry.getActiveGestures(t),i={gestureName:this.name,centroid:s,target:o.target,srcEvent:o,phase:r,pointers:n,timeStamp:o.timeStamp,activeGestures:a,customData:this.customData},l=gn(this.name,r),c=new CustomEvent(l,{bubbles:!0,cancelable:!0,detail:i});t.dispatchEvent(c)}}class Wi extends oo{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 Wi(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,direction:[...this.direction],requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t),this.direction=t.direction||this.direction}resetState(){this.isActive=!1,this.state=K({},this.state,{startPointers:new Map,startCentroid:null,lastCentroid:null,lastDeltas:null,activeDeltaX:0,activeDeltaY:0,movementThresholdReached:!1,lastDirection:{vertical:null,horizontal:null,mainAxis:null}})}handlePointerEvent(t,r){const n=Array.from(t.values());if(r.type==="forceCancel"){this.cancel(r.target,n,r);return}const o=this.getTargetElement(r);if(!o)return;if(this.shouldPreventGesture(o)){this.cancel(o,n,r);return}const s=this.getRelevantPointers(n,o);if(s.length<this.minPointers||s.length>this.maxPointers){this.cancel(o,s,r);return}switch(r.type){case"pointerdown":!this.isActive&&!this.state.startCentroid&&(s.forEach(a=>{this.state.startPointers.set(a.pointerId,a)}),this.originalTarget=o,this.state.startCentroid=Yt(s),this.state.lastCentroid=K({},this.state.startCentroid));break;case"pointermove":if(this.state.startCentroid&&s.length>=this.minPointers){const a=Yt(s),i=a.x-this.state.startCentroid.x,l=a.y-this.state.startCentroid.y,c=Math.sqrt(i*i+l*l),u=Zy(this.state.lastCentroid??this.state.startCentroid,a),d=this.state.lastCentroid?a.x-this.state.lastCentroid.x:0,h=this.state.lastCentroid?a.y-this.state.lastCentroid.y:0;!this.state.movementThresholdReached&&c>=this.threshold&&tb(u,this.direction)?(this.state.movementThresholdReached=!0,this.isActive=!0,this.state.lastDeltas={x:d,y:h},this.state.totalDeltaX+=d,this.state.totalDeltaY+=h,this.state.activeDeltaX+=d,this.state.activeDeltaY+=h,this.emitPanEvent(o,"start",s,r,a),this.emitPanEvent(o,"ongoing",s,r,a)):this.state.movementThresholdReached&&this.isActive&&(this.state.lastDeltas={x:d,y:h},this.state.totalDeltaX+=d,this.state.totalDeltaY+=h,this.state.activeDeltaX+=d,this.state.activeDeltaY+=h,this.emitPanEvent(o,"ongoing",s,r,a)),this.state.lastCentroid=a,this.state.lastDirection=u}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive&&this.state.movementThresholdReached){if(s.filter(a=>a.type!=="pointerup"&&a.type!=="pointercancel").length<this.minPointers){const a=this.state.lastCentroid||this.state.startCentroid;r.type==="pointercancel"&&this.emitPanEvent(o,"cancel",s,r,a),this.emitPanEvent(o,"end",s,r,a),this.resetState()}}else this.resetState();break}}emitPanEvent(t,r,n,o,s){var S,R;if(!this.state.startCentroid)return;const a=((S=this.state.lastDeltas)==null?void 0:S.x)??0,i=((R=this.state.lastDeltas)==null?void 0:R.y)??0,l=this.state.startPointers.values().next().value,c=l?(o.timeStamp-l.timeStamp)/1e3:0,u=c>0?a/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:s,target:o.target,srcEvent:o,phase:r,pointers:n,timeStamp:o.timeStamp,deltaX:a,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=gn(this.name,r),b=new CustomEvent(m,{bubbles:!0,cancelable:!0,detail:f});t.dispatchEvent(b),this.preventDefault&&o.preventDefault(),this.stopPropagation&&o.stopPropagation()}cancel(t,r,n){if(this.isActive){const o=t??this.element;this.emitPanEvent(o,"cancel",r,n,this.state.lastCentroid),this.emitPanEvent(o,"end",r,n,this.state.lastCentroid)}this.resetState()}}class Ji extends oo{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 Ji(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t)}resetState(){this.isActive=!1,this.state=K({},this.state,{startDistance:0,lastDistance:0,lastScale:1,lastTime:0,velocity:0,deltaScale:0})}handlePointerEvent(t,r){const n=Array.from(t.values()),o=this.getTargetElement(r);if(!o)return;if(this.shouldPreventGesture(o)){this.isActive&&(this.emitPinchEvent(o,"cancel",n,r),this.resetState());return}const s=this.getRelevantPointers(n,o);switch(r.type){case"pointerdown":if(s.length>=2&&!this.isActive){const a=Ea(s);this.state.startDistance=a,this.state.lastDistance=a,this.state.lastTime=r.timeStamp,this.originalTarget=o}break;case"pointermove":if(this.state.startDistance&&s.length>=this.minPointers){const a=Ea(s),i=Math.abs(a-this.state.lastDistance);if(i!==0&&i>=this.threshold){const l=this.state.startDistance?a/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=(a-this.state.lastDistance)/u;this.state.velocity=Number.isNaN(h)?0:h}this.state.lastDistance=a,this.state.deltaScale=l-this.state.lastScale,this.state.lastScale=l,this.state.lastTime=r.timeStamp,this.isActive?this.emitPinchEvent(o,"ongoing",s,r):(this.isActive=!0,this.emitPinchEvent(o,"start",s,r),this.emitPinchEvent(o,"ongoing",s,r))}}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive){const a=s.filter(i=>i.type!=="pointerup"&&i.type!=="pointercancel");if(a.length<this.minPointers)r.type==="pointercancel"&&this.emitPinchEvent(o,"cancel",s,r),this.emitPinchEvent(o,"end",s,r),this.resetState();else if(a.length>=2){const i=Ea(a);this.state.startDistance=i/this.state.lastScale}}break}}emitPinchEvent(t,r,n,o){const s=Yt(n),a=this.state.lastDistance,i=this.state.lastScale,l=this.gesturesRegistry.getActiveGestures(t),c={gestureName:this.name,centroid:s,target:o.target,srcEvent:o,phase:r,pointers:n,timeStamp:o.timeStamp,scale:i,deltaScale:this.state.deltaScale,totalScale:this.state.totalScale,distance:a,velocity:this.state.velocity,activeGestures:l,direction:nb(this.state.velocity),customData:this.customData};this.preventDefault&&o.preventDefault(),this.stopPropagation&&o.stopPropagation();const u=gn(this.name,r),d=new CustomEvent(u,{bubbles:!0,cancelable:!0,detail:c});t.dispatchEvent(d)}}class Yi extends oo{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 Yi(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,duration:this.duration,maxDistance:this.maxDistance,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.clearPressTimer(),this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t),this.duration=t.duration??this.duration,this.maxDistance=t.maxDistance??this.maxDistance}resetState(){this.clearPressTimer(),this.isActive=!1,this.state=K({},this.state,{startCentroid:null,lastPosition:null,timerId:null,startTime:0,pressThresholdReached:!1})}clearPressTimer(){this.state.timerId!==null&&(clearTimeout(this.state.timerId),this.state.timerId=null)}handlePointerEvent(t,r){const n=Array.from(t.values());if(r.type==="forceCancel"){this.cancelPress(r.target,n,r);return}const o=this.getTargetElement(r);if(!o)return;if(this.shouldPreventGesture(o)){this.isActive&&this.cancelPress(o,n,r);return}const s=this.getRelevantPointers(n,o);if(s.length<this.minPointers||s.length>this.maxPointers){this.isActive&&this.cancelPress(o,s,r);return}switch(r.type){case"pointerdown":!this.isActive&&!this.state.startCentroid&&(this.state.startCentroid=Yt(s),this.state.lastPosition=K({},this.state.startCentroid),this.state.startTime=r.timeStamp,this.isActive=!0,this.originalTarget=o,this.clearPressTimer(),this.state.timerId=setTimeout(()=>{if(this.isActive&&this.state.startCentroid){this.state.pressThresholdReached=!0;const a=this.state.lastPosition;this.emitPressEvent(o,"start",s,r,a),this.emitPressEvent(o,"ongoing",s,r,a)}},this.duration));break;case"pointermove":if(this.isActive&&this.state.startCentroid){const a=Yt(s);this.state.lastPosition=a;const i=a.x-this.state.startCentroid.x,l=a.y-this.state.startCentroid.y;Math.sqrt(i*i+l*l)>this.maxDistance&&this.cancelPress(o,s,r)}break;case"pointerup":if(this.isActive){if(this.state.pressThresholdReached){const a=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(o,"end",s,r,a)}this.resetState()}break;case"pointercancel":case"forceCancel":this.cancelPress(o,s,r);break}}emitPressEvent(t,r,n,o,s){const a=this.gesturesRegistry.getActiveGestures(t),i=o.timeStamp-this.state.startTime,l={gestureName:this.name,centroid:s,target:o.target,srcEvent:o,phase:r,pointers:n,timeStamp:o.timeStamp,x:s.x,y:s.y,duration:i,activeGestures:a,customData:this.customData},c=gn(this.name,r),u=new CustomEvent(c,{bubbles:!0,cancelable:!0,detail:l});t.dispatchEvent(u),this.preventDefault&&o.preventDefault(),this.stopPropagation&&o.stopPropagation()}cancelPress(t,r,n){if(this.isActive&&this.state.pressThresholdReached){const o=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(t??this.element,"cancel",r,n,o),this.emitPressEvent(t??this.element,"end",r,n,o)}this.resetState()}}class Ki extends oo{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 Ki(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,maxDistance:this.maxDistance,taps:this.taps,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t),this.maxDistance=t.maxDistance??this.maxDistance,this.taps=t.taps??this.taps}resetState(){this.isActive=!1,this.state={startCentroid:null,currentTapCount:0,lastTapTime:0,lastPosition:null}}handlePointerEvent(t,r){const n=Array.from(t.values()),o=this.getTargetElement(r);if(!o)return;const s=this.getRelevantPointers(n,o);if(this.shouldPreventGesture(o)||s.length<this.minPointers||s.length>this.maxPointers){this.isActive&&this.cancelTap(o,s,r);return}switch(r.type){case"pointerdown":this.isActive||(this.state.startCentroid=Yt(s),this.state.lastPosition=K({},this.state.startCentroid),this.isActive=!0,this.originalTarget=o);break;case"pointermove":if(this.isActive&&this.state.startCentroid){const a=Yt(s);this.state.lastPosition=a;const i=a.x-this.state.startCentroid.x,l=a.y-this.state.startCentroid.y;Math.sqrt(i*i+l*l)>this.maxDistance&&this.cancelTap(o,s,r)}break;case"pointerup":if(this.isActive){this.state.currentTapCount+=1;const a=this.state.lastPosition||this.state.startCentroid;if(!a){this.cancelTap(o,s,r);return}this.state.currentTapCount>=this.taps?(this.fireTapEvent(o,s,r,a),this.resetState()):(this.state.lastTapTime=r.timeStamp,this.isActive=!1,this.state.startCentroid=null,setTimeout(()=>{this.state&&this.state.currentTapCount>0&&this.state.currentTapCount<this.taps&&(this.state.currentTapCount=0)},300))}break;case"pointercancel":case"forceCancel":this.cancelTap(o,s,r);break}}fireTapEvent(t,r,n,o){const s=this.gesturesRegistry.getActiveGestures(t),a={gestureName:this.name,centroid:o,target:n.target,srcEvent:n,phase:"end",pointers:r,timeStamp:n.timeStamp,x:o.x,y:o.y,tapCount:this.state.currentTapCount,activeGestures:s,customData:this.customData},i=new CustomEvent(this.name,{bubbles:!0,cancelable:!0,detail:a});t.dispatchEvent(i),this.preventDefault&&n.preventDefault(),this.stopPropagation&&n.stopPropagation()}cancelTap(t,r,n){if(this.state.startCentroid||this.state.lastPosition){const o=this.state.lastPosition||this.state.startCentroid,s=this.gesturesRegistry.getActiveGestures(t),a={gestureName:this.name,centroid:o,target:n.target,srcEvent:n,phase:"cancel",pointers:r,timeStamp:n.timeStamp,x:o.x,y:o.y,tapCount:this.state.currentTapCount,activeGestures:s,customData:this.customData},i=gn(this.name,"cancel"),l=new CustomEvent(i,{bubbles:!0,cancelable:!0,detail:a});t.dispatchEvent(l)}this.resetState()}}class Xi extends mh{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 Xi(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,sensitivity:this.sensitivity,max:this.max,min:this.min,initialDelta:this.initialDelta,invert:this.invert,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}init(t,r,n,o){super.init(t,r,n,o),this.element.addEventListener("wheel",this.handleWheelEventBound)}destroy(){this.element.removeEventListener("wheel",this.handleWheelEventBound),this.resetState(),super.destroy()}resetState(){this.isActive=!1,this.state={totalDeltaX:0,totalDeltaY:0,totalDeltaZ:0}}updateOptions(t){super.updateOptions(t),this.sensitivity=t.sensitivity??this.sensitivity,this.max=t.max??this.max,this.min=t.min??this.min,this.initialDelta=t.initialDelta??this.initialDelta,this.invert=t.invert??this.invert}handleWheelEvent(t){if(this.shouldPreventGesture(this.element))return;const r=this.pointerManager.getPointers()||new Map,n=Array.from(r.values());this.state.totalDeltaX+=t.deltaX*this.sensitivity*(this.invert?-1:1),this.state.totalDeltaY+=t.deltaY*this.sensitivity*(this.invert?-1:1),this.state.totalDeltaZ+=t.deltaZ*this.sensitivity*(this.invert?-1:1),["totalDeltaX","totalDeltaY","totalDeltaZ"].forEach(o=>{this.state[o]<this.min&&(this.state[o]=this.min),this.state[o]>this.max&&(this.state[o]=this.max)}),this.emitWheelEvent(n,t)}emitWheelEvent(t,r){const n=t.length>0?Yt(t):{x:r.clientX,y:r.clientY},o=this.gesturesRegistry.getActiveGestures(this.element),s={gestureName:this.name,centroid:n,target:r.target,srcEvent:r,phase:"ongoing",pointers:t,timeStamp:r.timeStamp,deltaX:r.deltaX*this.sensitivity*(this.invert?-1:1),deltaY:r.deltaY*this.sensitivity*(this.invert?-1:1),deltaZ:r.deltaZ*this.sensitivity*(this.invert?-1:1),deltaMode:r.deltaMode,totalDeltaX:this.state.totalDeltaX,totalDeltaY:this.state.totalDeltaY,totalDeltaZ:this.state.totalDeltaZ,activeGestures:o,customData:this.customData};this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation();const a=gn(this.name,"ongoing"),i=new CustomEvent(a,{bubbles:!0,cancelable:!0,detail:s});this.element.dispatchEvent(i)}}const Gr=e=>e.preventDefault(),Qi=({svgRef:e})=>{V.useEffect(()=>{const r=e.current;if(!r)return;const n=new Xy({gestures:[new Wi({name:"pan",threshold:0,maxPointers:1}),new qi({name:"move",preventIf:["pan","pinch"]}),new Ji({name:"pinch",threshold:5,preventIf:["pan"]}),new Xi({name:"turnWheel",sensitivity:.01,initialDelta:1}),new Ki({name:"tap",maxDistance:10,preventIf:["pan","pinch"]}),new Yi({name:"quickPress",duration:50,maxDistance:10})]});return n.registerElement(["pan","move","pinch","turnWheel","tap","quickPress"],r),()=>{n.destroy()}},[e]);const t=V.useCallback((r,n,o)=>{const s=e.current;return s==null||s.addEventListener(r,n,o),{cleanup:()=>s==null?void 0:s.removeEventListener(r,n)}},[e]);return V.useEffect(()=>{const r=e.current;return r==null||r.addEventListener("gesturestart",Gr),r==null||r.addEventListener("gesturechange",Gr),r==null||r.addEventListener("gestureend",Gr),()=>{r==null||r.removeEventListener("gesturestart",Gr),r==null||r.removeEventListener("gesturechange",Gr),r==null||r.removeEventListener("gestureend",Gr)}},[e]),{instance:{addInteractionListener:t}}};Qi.params={};Qi.getInitialState=()=>({});const ob=[Hi,Gi,Us,Ls,Qi,Ds],sb=["apiRef"],ab=e=>{let{plugins:t}=e,r=ir(e.props,sb);const n={};t.forEach(a=>{Object.assign(n,a.params)});const o={};return Object.keys(r).forEach(a=>{const i=r[a];n[a]&&(o[a]=i)}),t.reduce((a,i)=>i.getDefaultizedParams?i.getDefaultizedParams({params:a}):a,o)};let _c=0;function ib(e,t,r){const n=q0(),o=V.useMemo(()=>[...ob,...e],[e]),s=ab({plugins:o,props:t});s.id=s.id??n;const i=V.useRef({}).current,l=cb(t.apiRef),c=V.useRef(null),u=V.useRef(null),d=V.useRef(null);if(d.current==null){_c+=1;const f={cacheKey:{id:_c}};o.forEach(m=>{m.getInitialState&&Object.assign(f,m.getInitialState(s,f,r))}),d.current=new W0(f)}const h=f=>{const m=f({instance:i,params:s,plugins:o,store:d.current,svgRef:u,chartRootRef:c,seriesConfig:r});m.publicAPI&&Object.assign(l.current,m.publicAPI),m.instance&&Object.assign(i,m.instance)};return o.forEach(h),{contextValue:V.useMemo(()=>({store:d.current,publicAPI:l.current,instance:i,svgRef:u,chartRootRef:c}),[i,l])}}function lb(e){return e.current==null&&(e.current={}),e}function cb(e){const t=V.useRef({});return e?lb(e):t}const Zi=V.createContext(null);process.env.NODE_ENV!=="production"&&(Zi.displayName="ChartContext");const Mc=new Set;function Gn(e,t="warning"){if(process.env.NODE_ENV==="production")return;const r=Array.isArray(e)?e.join(`
|
|
116
|
-
`):e;Mc.has(r)||(Mc.add(r),t==="error"?console.error(r):console.warn(r))}function ub(e){const{componentName:t,propName:r,controlled:n,defaultValue:o,warningPrefix:s="MUI X"}=e,[{initialDefaultValue:a,isControlled:i}]=V.useState({initialDefaultValue:o,isControlled:n!==void 0});i!==(n!==void 0)&&Gn([`${s}: 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(a)!==JSON.stringify(o)&&Gn([`${s}: 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 gh=process.env.NODE_ENV==="production"?()=>{}:ub,yh=4,bh=20+2*yh,db=40+2*yh,hb="hover",Ao={minStart:0,maxEnd:100,step:5,minSpan:10,maxSpan:100,panning:!0,filterMode:"keep",slider:{enabled:!1,preview:!1,size:bh,showTooltip:hb}},el=(e,t,r)=>{var n;if(e)return e===!0?K({axisId:t,axisDirection:r},Ao):K({axisId:t,axisDirection:r},Ao,e,{slider:K({},Ao.slider,{size:((n=e.slider)==null?void 0:n.preview)??Ao.slider.preview?db:bh},e.slider)})};function xh(e,t){const r={top:0,bottom:0,none:0};return(e&&e.length>0?e:[{id:wy,scaleType:"linear"}]).map((s,a)=>{var p;const i=s.dataKey,l=a===0?"bottom":"none",c=s.position??l,u=Iy+(s.label?ih:0),d=s.id??`defaultized-x-axis-${a}`,h=K({offset:r[c]},s,{id:d,position:c,height:s.height??u,zoom:el(s.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||s.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 Sh(e,t){const r={right:0,left:0,none:0};return(e&&e.length>0?e:[{id:Oy,scaleType:"linear"}]).map((s,a)=>{var p;const i=s.dataKey,l=a===0?"left":"none",c=s.position??l,u=Ey+(s.label?ih:0),d=s.id??`defaultized-y-axis-${a}`,h=K({offset:r[c]},s,{id:d,position:c,width:s.width??u,zoom:el(s.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||s.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 Go(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function pb(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tl(e){let t,r,n;e.length!==2?(t=Go,r=(i,l)=>Go(e(i),l),n=(i,l)=>e(i)-l):(t=e===Go||e===pb?e:fb,r=e,n=e);function o(i,l,c=0,u=i.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;r(i[d],l)<0?c=d+1:u=d}while(c<u)}return c}function s(i,l,c=0,u=i.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;r(i[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function a(i,l,c=0,u=i.length){const d=o(i,l,c,u-1);return d>c&&n(i[d-1],l)>-n(i[d],l)?d-1:d}return{left:o,center:a,right:s}}function fb(){return 0}function mb(e){return e===null?NaN:+e}const gb=tl(Go),vh=gb.right;tl(mb).center;class Vc extends Map{constructor(t,r=xb){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,o]of t)this.set(n,o)}get(t){return super.get(kc(this,t))}has(t){return super.has(kc(this,t))}set(t,r){return super.set(yb(this,t),r)}delete(t){return super.delete(bb(this,t))}}function kc({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function yb({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function bb({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function xb(e){return e!==null&&typeof e=="object"?e.valueOf():e}const Sb=Math.sqrt(50),vb=Math.sqrt(10),Cb=Math.sqrt(2);function os(e,t,r){const n=(t-e)/Math.max(0,r),o=Math.floor(Math.log10(n)),s=n/Math.pow(10,o),a=s>=Sb?10:s>=vb?5:s>=Cb?2:1;let i,l,c;return o<0?(c=Math.pow(10,-o)/a,i=Math.round(e*c),l=Math.round(t*c),i/c<e&&++i,l/c>t&&--l,c=-c):(c=Math.pow(10,o)*a,i=Math.round(e/c),l=Math.round(t/c),i*c<e&&++i,l*c>t&&--l),l<i&&.5<=r&&r<2?os(e,t,r*2):[i,l,c]}function ai(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[o,s,a]=n?os(t,e,r):os(e,t,r);if(!(s>=o))return[];const i=s-o+1,l=new Array(i);if(n)if(a<0)for(let c=0;c<i;++c)l[c]=(s-c)/-a;else for(let c=0;c<i;++c)l[c]=(s-c)*a;else if(a<0)for(let c=0;c<i;++c)l[c]=(o+c)/-a;else for(let c=0;c<i;++c)l[c]=(o+c)*a;return l}function ii(e,t,r){return t=+t,e=+e,r=+r,os(e,t,r)[2]}function li(e,t,r){t=+t,e=+e,r=+r;const n=t<e,o=n?ii(t,e,r):ii(e,t,r);return(n?-1:1)*(o<0?1/-o:o)}function wb(e,t,r){e=+e,t=+t,r=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+r;for(var n=-1,o=Math.max(0,Math.ceil((t-e)/r))|0,s=new Array(o);++n<o;)s[n]=e+n*r;return s}function hr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Ob(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 jc=Symbol("implicit");function ss(){var e=new Vc,t=[],r=[],n=jc;function o(s){let a=e.get(s);if(a===void 0){if(n!==jc)return n;e.set(s,a=t.push(s)-1)}return r[a%r.length]}return o.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new Vc;for(const a of s)e.has(a)||e.set(a,t.push(a)-1);return o},o.range=function(s){return arguments.length?(r=Array.from(s),o):r.slice()},o.unknown=function(s){return arguments.length?(n=s,o):n},o.copy=function(){return ss(t,r).unknown(n)},hr.apply(o,arguments),o}function rl(){var e=ss().unknown(void 0),t=e.domain,r=e.range,n=0,o=1,s,a,i=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var h=t().length,p=o<n,f=p?o:n,m=p?n:o;s=(m-f)/Math.max(1,h-l+c*2),i&&(s=Math.floor(s)),f+=(m-f-s*(h-l))*u,a=s*(1-l),i&&(f=Math.round(f),a=Math.round(a));var b=wb(h).map(function(S){return f+s*S});return r(p?b.reverse():b)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([n,o]=h,n=+n,o=+o,d()):[n,o]},e.rangeRound=function(h){return[n,o]=h,n=+n,o=+o,i=!0,d()},e.bandwidth=function(){return a},e.step=function(){return s},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 rl(t(),[n,o]).round(i).paddingInner(l).paddingOuter(c).align(u)},hr.apply(d(),arguments)}function Ch(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Ch(t())},e}function Tb(){return Ch(rl.apply(null,arguments).paddingInner(1))}function nl(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function wh(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function so(){}var Hn=.7,as=1/Hn,Zr="\\s*([+-]?\\d+)\\s*",qn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Dt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Eb=/^#([0-9a-f]{3,8})$/,Ib=new RegExp(`^rgb\\(${Zr},${Zr},${Zr}\\)$`),Ab=new RegExp(`^rgb\\(${Dt},${Dt},${Dt}\\)$`),Rb=new RegExp(`^rgba\\(${Zr},${Zr},${Zr},${qn}\\)$`),Pb=new RegExp(`^rgba\\(${Dt},${Dt},${Dt},${qn}\\)$`),_b=new RegExp(`^hsl\\(${qn},${Dt},${Dt}\\)$`),Mb=new RegExp(`^hsla\\(${qn},${Dt},${Dt},${qn}\\)$`),Dc={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};nl(so,Wn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Uc,formatHex:Uc,formatHex8:Vb,formatHsl:kb,formatRgb:Lc,toString:Lc});function Uc(){return this.rgb().formatHex()}function Vb(){return this.rgb().formatHex8()}function kb(){return Oh(this).formatHsl()}function Lc(){return this.rgb().formatRgb()}function Wn(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Eb.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Bc(t):r===3?new it(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Ro(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Ro(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=Ib.exec(e))?new it(t[1],t[2],t[3],1):(t=Ab.exec(e))?new it(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Rb.exec(e))?Ro(t[1],t[2],t[3],t[4]):(t=Pb.exec(e))?Ro(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=_b.exec(e))?$c(t[1],t[2]/100,t[3]/100,1):(t=Mb.exec(e))?$c(t[1],t[2]/100,t[3]/100,t[4]):Dc.hasOwnProperty(e)?Bc(Dc[e]):e==="transparent"?new it(NaN,NaN,NaN,0):null}function Bc(e){return new it(e>>16&255,e>>8&255,e&255,1)}function Ro(e,t,r,n){return n<=0&&(e=t=r=NaN),new it(e,t,r,n)}function jb(e){return e instanceof so||(e=Wn(e)),e?(e=e.rgb(),new it(e.r,e.g,e.b,e.opacity)):new it}function ci(e,t,r,n){return arguments.length===1?jb(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}nl(it,ci,wh(so,{brighter(e){return e=e==null?as:Math.pow(as,e),new it(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Hn:Math.pow(Hn,e),new it(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new it(vr(this.r),vr(this.g),vr(this.b),is(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:Nc,formatHex:Nc,formatHex8:Db,formatRgb:Fc,toString:Fc}));function Nc(){return`#${br(this.r)}${br(this.g)}${br(this.b)}`}function Db(){return`#${br(this.r)}${br(this.g)}${br(this.b)}${br((isNaN(this.opacity)?1:this.opacity)*255)}`}function Fc(){const e=is(this.opacity);return`${e===1?"rgb(":"rgba("}${vr(this.r)}, ${vr(this.g)}, ${vr(this.b)}${e===1?")":`, ${e})`}`}function is(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function vr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function br(e){return e=vr(e),(e<16?"0":"")+e.toString(16)}function $c(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 Oh(e){if(e instanceof Ot)return new Ot(e.h,e.s,e.l,e.opacity);if(e instanceof so||(e=Wn(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,o=Math.min(t,r,n),s=Math.max(t,r,n),a=NaN,i=s-o,l=(s+o)/2;return i?(t===s?a=(r-n)/i+(r<n)*6:r===s?a=(n-t)/i+2:a=(t-r)/i+4,i/=l<.5?s+o:2-s-o,a*=60):i=l>0&&l<1?0:a,new Ot(a,i,l,e.opacity)}function Ub(e,t,r,n){return arguments.length===1?Oh(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}nl(Ot,Ub,wh(so,{brighter(e){return e=e==null?as:Math.pow(as,e),new Ot(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Hn:Math.pow(Hn,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,o=2*r-n;return new it(Ia(e>=240?e-240:e+120,o,n),Ia(e,o,n),Ia(e<120?e+240:e-120,o,n),this.opacity)},clamp(){return new Ot(zc(this.h),Po(this.s),Po(this.l),is(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=is(this.opacity);return`${e===1?"hsl(":"hsla("}${zc(this.h)}, ${Po(this.s)*100}%, ${Po(this.l)*100}%${e===1?")":`, ${e})`}`}}));function zc(e){return e=(e||0)%360,e<0?e+360:e}function Po(e){return Math.max(0,Math.min(1,e||0))}function Ia(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 ol=e=>()=>e;function Lb(e,t){return function(r){return e+r*t}}function Bb(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 Nb(e){return(e=+e)==1?Th:function(t,r){return r-t?Bb(t,r,e):ol(isNaN(t)?r:t)}}function Th(e,t){var r=t-e;return r?Lb(e,r):ol(isNaN(e)?t:e)}const Gc=function e(t){var r=Nb(t);function n(o,s){var a=r((o=ci(o)).r,(s=ci(s)).r),i=r(o.g,s.g),l=r(o.b,s.b),c=Th(o.opacity,s.opacity);return function(u){return o.r=a(u),o.g=i(u),o.b=l(u),o.opacity=c(u),o+""}}return n.gamma=e,n}(1);function Fb(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),o;return function(s){for(o=0;o<r;++o)n[o]=e[o]*(1-s)+t[o]*s;return n}}function $b(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function zb(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,o=new Array(n),s=new Array(r),a;for(a=0;a<n;++a)o[a]=Ns(e[a],t[a]);for(;a<r;++a)s[a]=t[a];return function(i){for(a=0;a<n;++a)s[a]=o[a](i);return s}}function sl(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Tt(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function Gb(e,t){var r={},n={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?r[o]=Ns(e[o],t[o]):n[o]=t[o];return function(s){for(o in r)n[o]=r[o](s);return n}}var ui=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Aa=new RegExp(ui.source,"g");function Hb(e){return function(){return e}}function qb(e){return function(t){return e(t)+""}}function Wb(e,t){var r=ui.lastIndex=Aa.lastIndex=0,n,o,s,a=-1,i=[],l=[];for(e=e+"",t=t+"";(n=ui.exec(e))&&(o=Aa.exec(t));)(s=o.index)>r&&(s=t.slice(r,s),i[a]?i[a]+=s:i[++a]=s),(n=n[0])===(o=o[0])?i[a]?i[a]+=o:i[++a]=o:(i[++a]=null,l.push({i:a,x:Tt(n,o)})),r=Aa.lastIndex;return r<t.length&&(s=t.slice(r),i[a]?i[a]+=s:i[++a]=s),i.length<2?l[0]?qb(l[0].x):Hb(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 Ns(e,t){var r=typeof t,n;return t==null||r==="boolean"?ol(t):(r==="number"?Tt:r==="string"?(n=Wn(t))?(t=n,Gc):Wb:t instanceof Wn?Gc:t instanceof Date?sl:$b(t)?Fb:Array.isArray(t)?zb:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Gb:Tt)(e,t)}function Eh(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function Jb(e){return function(){return e}}function Yb(e){return+e}var Hc=[0,1];function bt(e){return e}function di(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:Jb(isNaN(t)?NaN:.5)}function Kb(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function Xb(e,t,r){var n=e[0],o=e[1],s=t[0],a=t[1];return o<n?(n=di(o,n),s=r(a,s)):(n=di(n,o),s=r(s,a)),function(i){return s(n(i))}}function Qb(e,t,r){var n=Math.min(e.length,t.length)-1,o=new Array(n),s=new Array(n),a=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<n;)o[a]=di(e[a],e[a+1]),s[a]=r(t[a],t[a+1]);return function(i){var l=vh(e,i,1,n)-1;return s[l](o[l](i))}}function Fs(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function al(){var e=Hc,t=Hc,r=Ns,n,o,s,a=bt,i,l,c;function u(){var h=Math.min(e.length,t.length);return a!==bt&&(a=Kb(e[0],e[h-1])),i=h>2?Qb:Xb,l=c=null,d}function d(h){return h==null||isNaN(h=+h)?s:(l||(l=i(e.map(n),t,r)))(n(a(h)))}return d.invert=function(h){return a(o((c||(c=i(t,e.map(n),Tt)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,Yb),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=Eh,u()},d.clamp=function(h){return arguments.length?(a=h?!0:bt,u()):a!==bt},d.interpolate=function(h){return arguments.length?(r=h,u()):r},d.unknown=function(h){return arguments.length?(s=h,d):s},function(h,p){return n=h,o=p,u()}}function Ih(){return al()(bt,bt)}function Zb(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function ls(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 on(e){return e=ls(Math.abs(e)),e?e[1]:NaN}function e1(e,t){return function(r,n){for(var o=r.length,s=[],a=0,i=e[0],l=0;o>0&&i>0&&(l+i+1>n&&(i=Math.max(1,n-l)),s.push(r.substring(o-=i,o+i)),!((l+=i+1)>n));)i=e[a=(a+1)%e.length];return s.reverse().join(t)}}function t1(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var r1=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Jn(e){if(!(t=r1.exec(e)))throw new Error("invalid format: "+e);var t;return new il({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]})}Jn.prototype=il.prototype;function il(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+""}il.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 n1(e){e:for(var t=e.length,r=1,n=-1,o;r<t;++r)switch(e[r]){case".":n=o=r;break;case"0":n===0&&(n=r),o=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(o+1):e}var Ah;function o1(e,t){var r=ls(e,t);if(!r)return e+"";var n=r[0],o=r[1],s=o-(Ah=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=n.length;return s===a?n:s>a?n+new Array(s-a+1).join("0"):s>0?n.slice(0,s)+"."+n.slice(s):"0."+new Array(1-s).join("0")+ls(e,Math.max(0,t+s-1))[0]}function qc(e,t){var r=ls(e,t);if(!r)return e+"";var n=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+n:n.length>o+1?n.slice(0,o+1)+"."+n.slice(o+1):n+new Array(o-n.length+2).join("0")}const Wc={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Zb,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)=>qc(e*100,t),r:qc,s:o1,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Jc(e){return e}var Yc=Array.prototype.map,Kc=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function s1(e){var t=e.grouping===void 0||e.thousands===void 0?Jc:e1(Yc.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?Jc:t1(Yc.call(e.numerals,String)),a=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=Jn(d);var h=d.fill,p=d.align,f=d.sign,m=d.symbol,b=d.zero,S=d.width,R=d.comma,v=d.precision,O=d.trim,I=d.type;I==="n"?(R=!0,I="g"):Wc[I]||(v===void 0&&(v=12),O=!0,I="g"),(b||h==="0"&&p==="=")&&(b=!0,h="0",p="=");var T=m==="$"?r:m==="#"&&/[boxX]/.test(I)?"0"+I.toLowerCase():"",w=m==="$"?n:/[%p]/.test(I)?a:"",P=Wc[I],k=/[defgprs%]/.test(I);v=v===void 0?6:/[gprs]/.test(I)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function y(A){var M=T,_=w,j,ne,X;if(I==="c")_=P(A)+_,A="";else{A=+A;var oe=A<0||1/A<0;if(A=isNaN(A)?l:P(Math.abs(A),v),O&&(A=n1(A)),oe&&+A==0&&f!=="+"&&(oe=!1),M=(oe?f==="("?f:i:f==="-"||f==="("?"":f)+M,_=(I==="s"?Kc[8+Ah/3]:"")+_+(oe&&f==="("?")":""),k){for(j=-1,ne=A.length;++j<ne;)if(X=A.charCodeAt(j),48>X||X>57){_=(X===46?o+A.slice(j+1):A.slice(j))+_,A=A.slice(0,j);break}}}R&&!b&&(A=t(A,1/0));var Q=M.length+A.length+_.length,se=Q<S?new Array(S-Q+1).join(h):"";switch(R&&b&&(A=t(se+A,se.length?S-_.length:1/0),se=""),p){case"<":A=M+A+_+se;break;case"=":A=M+se+A+_;break;case"^":A=se.slice(0,Q=se.length>>1)+M+A+_+se.slice(Q);break;default:A=se+M+A+_;break}return s(A)}return y.toString=function(){return d+""},y}function u(d,h){var p=c((d=Jn(d),d.type="f",d)),f=Math.max(-8,Math.min(8,Math.floor(on(h)/3)))*3,m=Math.pow(10,-f),b=Kc[8+f/3];return function(S){return p(m*S)+b}}return{format:c,formatPrefix:u}}var _o,ll,Rh;a1({thousands:",",grouping:[3],currency:["$",""]});function a1(e){return _o=s1(e),ll=_o.format,Rh=_o.formatPrefix,_o}function i1(e){return Math.max(0,-on(Math.abs(e)))}function l1(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(on(t)/3)))*3-on(Math.abs(e)))}function c1(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,on(t)-on(e))+1}function u1(e,t,r,n){var o=li(e,t,r),s;switch(n=Jn(n??",f"),n.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(s=l1(o,a))&&(n.precision=s),Rh(n,a)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(s=c1(o,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=s-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(s=i1(o))&&(n.precision=s-(n.type==="%")*2);break}}return ll(n)}function cl(e){var t=e.domain;return e.ticks=function(r){var n=t();return ai(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var o=t();return u1(o[0],o[o.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),o=0,s=n.length-1,a=n[o],i=n[s],l,c,u=10;for(i<a&&(c=a,a=i,i=c,c=o,o=s,s=c);u-- >0;){if(c=ii(a,i,r),c===l)return n[o]=a,n[s]=i,t(n);if(c>0)a=Math.floor(a/c)*c,i=Math.ceil(i/c)*c;else if(c<0)a=Math.ceil(a*c)/c,i=Math.floor(i*c)/c;else break;l=c}return e},e}function Ph(){var e=Ih();return e.copy=function(){return Fs(e,Ph())},hr.apply(e,arguments),cl(e)}function _h(e,t){e=e.slice();var r=0,n=e.length-1,o=e[r],s=e[n],a;return s<o&&(a=r,r=n,n=a,a=o,o=s,s=a),e[r]=t.floor(o),e[n]=t.ceil(s),e}function Xc(e){return Math.log(e)}function Qc(e){return Math.exp(e)}function d1(e){return-Math.log(-e)}function h1(e){return-Math.exp(-e)}function p1(e){return isFinite(e)?+("1e"+e):e<0?0:e}function f1(e){return e===10?p1:e===Math.E?Math.exp:t=>Math.pow(e,t)}function m1(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 Zc(e){return(t,r)=>-e(-t,r)}function g1(e){const t=e(Xc,Qc),r=t.domain;let n=10,o,s;function a(){return o=m1(n),s=f1(n),r()[0]<0?(o=Zc(o),s=Zc(s),e(d1,h1)):e(Xc,Qc),t}return t.base=function(i){return arguments.length?(n=+i,a()):n},t.domain=function(i){return arguments.length?(r(i),a()):r()},t.ticks=i=>{const l=r();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let h=o(c),p=o(u),f,m;const b=i==null?10:+i;let S=[];if(!(n%1)&&p-h<b){if(h=Math.floor(h),p=Math.ceil(p),c>0){for(;h<=p;++h)for(f=1;f<n;++f)if(m=h<0?f/s(-h):f*s(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/s(-h):f*s(h),!(m<c)){if(m>u)break;S.push(m)}S.length*2<b&&(S=ai(c,u,b))}else S=ai(h,p,Math.min(p-h,b)).map(s);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=Jn(l)).precision==null&&(l.trim=!0),l=ll(l)),i===1/0)return l;const c=Math.max(1,n*i/t.ticks().length);return u=>{let d=u/s(Math.round(o(u)));return d*n<n-.5&&(d*=n),d<=c?l(u):""}},t.nice=()=>r(_h(r(),{floor:i=>s(Math.floor(o(i))),ceil:i=>s(Math.ceil(o(i)))})),t}function Mh(){const e=g1(al()).domain([1,10]);return e.copy=()=>Fs(e,Mh()).base(e.base()),hr.apply(e,arguments),e}function eu(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function y1(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function b1(e){return e<0?-e*e:e*e}function x1(e){var t=e(bt,bt),r=1;function n(){return r===1?e(bt,bt):r===.5?e(y1,b1):e(eu(r),eu(1/r))}return t.exponent=function(o){return arguments.length?(r=+o,n()):r},cl(t)}function ul(){var e=x1(al());return e.copy=function(){return Fs(e,ul()).exponent(e.exponent())},hr.apply(e,arguments),e}function S1(){return ul.apply(null,arguments).exponent(.5)}function Vh(){var e=[.5],t=[0,1],r,n=1;function o(s){return s!=null&&s<=s?t[vh(e,s,0,n)]:r}return o.domain=function(s){return arguments.length?(e=Array.from(s),n=Math.min(e.length,t.length-1),o):e.slice()},o.range=function(s){return arguments.length?(t=Array.from(s),n=Math.min(e.length,t.length-1),o):t.slice()},o.invertExtent=function(s){var a=t.indexOf(s);return[e[a-1],e[a]]},o.unknown=function(s){return arguments.length?(r=s,o):r},o.copy=function(){return Vh().domain(e).range(t).unknown(r)},hr.apply(o,arguments)}const Ra=new Date,Pa=new Date;function Ne(e,t,r,n){function o(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return o.floor=s=>(e(s=new Date(+s)),s),o.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),o.round=s=>{const a=o(s),i=o.ceil(s);return s-a<i-s?a:i},o.offset=(s,a)=>(t(s=new Date(+s),a==null?1:Math.floor(a)),s),o.range=(s,a,i)=>{const l=[];if(s=o.ceil(s),i=i==null?1:Math.floor(i),!(s<a)||!(i>0))return l;let c;do l.push(c=new Date(+s)),t(s,i),e(s);while(c<s&&s<a);return l},o.filter=s=>Ne(a=>{if(a>=a)for(;e(a),!s(a);)a.setTime(a-1)},(a,i)=>{if(a>=a)if(i<0)for(;++i<=0;)for(;t(a,-1),!s(a););else for(;--i>=0;)for(;t(a,1),!s(a););}),r&&(o.count=(s,a)=>(Ra.setTime(+s),Pa.setTime(+a),e(Ra),e(Pa),Math.floor(r(Ra,Pa))),o.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?o.filter(n?a=>n(a)%s===0:a=>o.count(0,a)%s===0):o)),o}const cs=Ne(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);cs.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ne(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):cs);cs.range;const Ht=1e3,xt=Ht*60,qt=xt*60,Kt=qt*24,dl=Kt*7,tu=Kt*30,_a=Kt*365,xr=Ne(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ht)},(e,t)=>(t-e)/Ht,e=>e.getUTCSeconds());xr.range;const hl=Ne(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ht)},(e,t)=>{e.setTime(+e+t*xt)},(e,t)=>(t-e)/xt,e=>e.getMinutes());hl.range;const pl=Ne(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*xt)},(e,t)=>(t-e)/xt,e=>e.getUTCMinutes());pl.range;const fl=Ne(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ht-e.getMinutes()*xt)},(e,t)=>{e.setTime(+e+t*qt)},(e,t)=>(t-e)/qt,e=>e.getHours());fl.range;const ml=Ne(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*qt)},(e,t)=>(t-e)/qt,e=>e.getUTCHours());ml.range;const ao=Ne(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*xt)/Kt,e=>e.getDate()-1);ao.range;const $s=Ne(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Kt,e=>e.getUTCDate()-1);$s.range;const kh=Ne(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Kt,e=>Math.floor(e/Kt));kh.range;function Rr(e){return Ne(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())*xt)/dl)}const zs=Rr(0),us=Rr(1),v1=Rr(2),C1=Rr(3),sn=Rr(4),w1=Rr(5),O1=Rr(6);zs.range;us.range;v1.range;C1.range;sn.range;w1.range;O1.range;function Pr(e){return Ne(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)/dl)}const Gs=Pr(0),ds=Pr(1),T1=Pr(2),E1=Pr(3),an=Pr(4),I1=Pr(5),A1=Pr(6);Gs.range;ds.range;T1.range;E1.range;an.range;I1.range;A1.range;const gl=Ne(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());gl.range;const yl=Ne(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());yl.range;const Xt=Ne(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());Xt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ne(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)});Xt.range;const Qt=Ne(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());Qt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ne(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)});Qt.range;function jh(e,t,r,n,o,s){const a=[[xr,1,Ht],[xr,5,5*Ht],[xr,15,15*Ht],[xr,30,30*Ht],[s,1,xt],[s,5,5*xt],[s,15,15*xt],[s,30,30*xt],[o,1,qt],[o,3,3*qt],[o,6,6*qt],[o,12,12*qt],[n,1,Kt],[n,2,2*Kt],[r,1,dl],[t,1,tu],[t,3,3*tu],[e,1,_a]];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=tl(([,,b])=>b).right(a,h);if(p===a.length)return e.every(li(c/_a,u/_a,d));if(p===0)return cs.every(Math.max(li(c,u,d),1));const[f,m]=a[h/a[p-1][2]<a[p][2]/h?p-1:p];return f.every(m)}return[i,l]}const[R1,P1]=jh(Qt,yl,Gs,kh,ml,pl),[_1,M1]=jh(Xt,gl,zs,ao,fl,hl);function Ma(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 Va(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 wn(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function V1(e){var t=e.dateTime,r=e.date,n=e.time,o=e.periods,s=e.days,a=e.shortDays,i=e.months,l=e.shortMonths,c=On(o),u=Tn(o),d=On(s),h=Tn(s),p=On(a),f=Tn(a),m=On(i),b=Tn(i),S=On(l),R=Tn(l),v={a:oe,A:Q,b:se,B:N,c:null,d:iu,e:iu,f:rx,g:hx,G:fx,H:Z1,I:ex,j:tx,L:Dh,m:nx,M:ox,p:ee,q:ce,Q:uu,s:du,S:sx,u:ax,U:ix,V:lx,w:cx,W:ux,x:null,X:null,y:dx,Y:px,Z:mx,"%":cu},O={a:be,A:_e,b:xe,B:ut,c:null,d:lu,e:lu,f:xx,g:Rx,G:_x,H:gx,I:yx,j:bx,L:Lh,m:Sx,M:vx,p:nt,q:Se,Q:uu,s:du,S:Cx,u:wx,U:Ox,V:Tx,w:Ex,W:Ix,x:null,X:null,y:Ax,Y:Px,Z:Mx,"%":cu},I={a:y,A,b:M,B:_,c:j,d:su,e:su,f:Y1,g:ou,G:nu,H:au,I:au,j:H1,L:J1,m:G1,M:q1,p:k,q:z1,Q:X1,s:Q1,S:W1,u:L1,U:B1,V:N1,w:U1,W:F1,x:ne,X,y:ou,Y:nu,Z:$1,"%":K1};v.x=T(r,v),v.X=T(n,v),v.c=T(t,v),O.x=T(r,O),O.X=T(n,O),O.c=T(t,O);function T(te,ae){return function(ue){var Y=[],ve=-1,pe=0,He=te.length,$e,Me,rr;for(ue instanceof Date||(ue=new Date(+ue));++ve<He;)te.charCodeAt(ve)===37&&(Y.push(te.slice(pe,ve)),(Me=ru[$e=te.charAt(++ve)])!=null?$e=te.charAt(++ve):Me=$e==="e"?" ":"0",(rr=ae[$e])&&($e=rr(ue,Me)),Y.push($e),pe=ve+1);return Y.push(te.slice(pe,ve)),Y.join("")}}function w(te,ae){return function(ue){var Y=wn(1900,void 0,1),ve=P(Y,te,ue+="",0),pe,He;if(ve!=ue.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(ae&&!("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?(pe=Va(wn(Y.y,0,1)),He=pe.getUTCDay(),pe=He>4||He===0?ds.ceil(pe):ds(pe),pe=$s.offset(pe,(Y.V-1)*7),Y.y=pe.getUTCFullYear(),Y.m=pe.getUTCMonth(),Y.d=pe.getUTCDate()+(Y.w+6)%7):(pe=Ma(wn(Y.y,0,1)),He=pe.getDay(),pe=He>4||He===0?us.ceil(pe):us(pe),pe=ao.offset(pe,(Y.V-1)*7),Y.y=pe.getFullYear(),Y.m=pe.getMonth(),Y.d=pe.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),He="Z"in Y?Va(wn(Y.y,0,1)).getUTCDay():Ma(wn(Y.y,0,1)).getDay(),Y.m=0,Y.d="W"in Y?(Y.w+6)%7+Y.W*7-(He+5)%7:Y.w+Y.U*7-(He+6)%7);return"Z"in Y?(Y.H+=Y.Z/100|0,Y.M+=Y.Z%100,Va(Y)):Ma(Y)}}function P(te,ae,ue,Y){for(var ve=0,pe=ae.length,He=ue.length,$e,Me;ve<pe;){if(Y>=He)return-1;if($e=ae.charCodeAt(ve++),$e===37){if($e=ae.charAt(ve++),Me=I[$e in ru?ae.charAt(ve++):$e],!Me||(Y=Me(te,ue,Y))<0)return-1}else if($e!=ue.charCodeAt(Y++))return-1}return Y}function k(te,ae,ue){var Y=c.exec(ae.slice(ue));return Y?(te.p=u.get(Y[0].toLowerCase()),ue+Y[0].length):-1}function y(te,ae,ue){var Y=p.exec(ae.slice(ue));return Y?(te.w=f.get(Y[0].toLowerCase()),ue+Y[0].length):-1}function A(te,ae,ue){var Y=d.exec(ae.slice(ue));return Y?(te.w=h.get(Y[0].toLowerCase()),ue+Y[0].length):-1}function M(te,ae,ue){var Y=S.exec(ae.slice(ue));return Y?(te.m=R.get(Y[0].toLowerCase()),ue+Y[0].length):-1}function _(te,ae,ue){var Y=m.exec(ae.slice(ue));return Y?(te.m=b.get(Y[0].toLowerCase()),ue+Y[0].length):-1}function j(te,ae,ue){return P(te,t,ae,ue)}function ne(te,ae,ue){return P(te,r,ae,ue)}function X(te,ae,ue){return P(te,n,ae,ue)}function oe(te){return a[te.getDay()]}function Q(te){return s[te.getDay()]}function se(te){return l[te.getMonth()]}function N(te){return i[te.getMonth()]}function ee(te){return o[+(te.getHours()>=12)]}function ce(te){return 1+~~(te.getMonth()/3)}function be(te){return a[te.getUTCDay()]}function _e(te){return s[te.getUTCDay()]}function xe(te){return l[te.getUTCMonth()]}function ut(te){return i[te.getUTCMonth()]}function nt(te){return o[+(te.getUTCHours()>=12)]}function Se(te){return 1+~~(te.getUTCMonth()/3)}return{format:function(te){var ae=T(te+="",v);return ae.toString=function(){return te},ae},parse:function(te){var ae=w(te+="",!1);return ae.toString=function(){return te},ae},utcFormat:function(te){var ae=T(te+="",O);return ae.toString=function(){return te},ae},utcParse:function(te){var ae=w(te+="",!0);return ae.toString=function(){return te},ae}}}var ru={"-":"",_:" ",0:"0"},Ge=/^\s*\d+/,k1=/^%/,j1=/[\\^$*+?|[\]().{}]/g;function ye(e,t,r){var n=e<0?"-":"",o=(n?-e:e)+"",s=o.length;return n+(s<r?new Array(r-s+1).join(t)+o:o)}function D1(e){return e.replace(j1,"\\$&")}function On(e){return new RegExp("^(?:"+e.map(D1).join("|")+")","i")}function Tn(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function U1(e,t,r){var n=Ge.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function L1(e,t,r){var n=Ge.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function B1(e,t,r){var n=Ge.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function N1(e,t,r){var n=Ge.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function F1(e,t,r){var n=Ge.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function nu(e,t,r){var n=Ge.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function ou(e,t,r){var n=Ge.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function $1(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 z1(e,t,r){var n=Ge.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function G1(e,t,r){var n=Ge.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function su(e,t,r){var n=Ge.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function H1(e,t,r){var n=Ge.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function au(e,t,r){var n=Ge.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function q1(e,t,r){var n=Ge.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function W1(e,t,r){var n=Ge.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function J1(e,t,r){var n=Ge.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function Y1(e,t,r){var n=Ge.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function K1(e,t,r){var n=k1.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function X1(e,t,r){var n=Ge.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function Q1(e,t,r){var n=Ge.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function iu(e,t){return ye(e.getDate(),t,2)}function Z1(e,t){return ye(e.getHours(),t,2)}function ex(e,t){return ye(e.getHours()%12||12,t,2)}function tx(e,t){return ye(1+ao.count(Xt(e),e),t,3)}function Dh(e,t){return ye(e.getMilliseconds(),t,3)}function rx(e,t){return Dh(e,t)+"000"}function nx(e,t){return ye(e.getMonth()+1,t,2)}function ox(e,t){return ye(e.getMinutes(),t,2)}function sx(e,t){return ye(e.getSeconds(),t,2)}function ax(e){var t=e.getDay();return t===0?7:t}function ix(e,t){return ye(zs.count(Xt(e)-1,e),t,2)}function Uh(e){var t=e.getDay();return t>=4||t===0?sn(e):sn.ceil(e)}function lx(e,t){return e=Uh(e),ye(sn.count(Xt(e),e)+(Xt(e).getDay()===4),t,2)}function cx(e){return e.getDay()}function ux(e,t){return ye(us.count(Xt(e)-1,e),t,2)}function dx(e,t){return ye(e.getFullYear()%100,t,2)}function hx(e,t){return e=Uh(e),ye(e.getFullYear()%100,t,2)}function px(e,t){return ye(e.getFullYear()%1e4,t,4)}function fx(e,t){var r=e.getDay();return e=r>=4||r===0?sn(e):sn.ceil(e),ye(e.getFullYear()%1e4,t,4)}function mx(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ye(t/60|0,"0",2)+ye(t%60,"0",2)}function lu(e,t){return ye(e.getUTCDate(),t,2)}function gx(e,t){return ye(e.getUTCHours(),t,2)}function yx(e,t){return ye(e.getUTCHours()%12||12,t,2)}function bx(e,t){return ye(1+$s.count(Qt(e),e),t,3)}function Lh(e,t){return ye(e.getUTCMilliseconds(),t,3)}function xx(e,t){return Lh(e,t)+"000"}function Sx(e,t){return ye(e.getUTCMonth()+1,t,2)}function vx(e,t){return ye(e.getUTCMinutes(),t,2)}function Cx(e,t){return ye(e.getUTCSeconds(),t,2)}function wx(e){var t=e.getUTCDay();return t===0?7:t}function Ox(e,t){return ye(Gs.count(Qt(e)-1,e),t,2)}function Bh(e){var t=e.getUTCDay();return t>=4||t===0?an(e):an.ceil(e)}function Tx(e,t){return e=Bh(e),ye(an.count(Qt(e),e)+(Qt(e).getUTCDay()===4),t,2)}function Ex(e){return e.getUTCDay()}function Ix(e,t){return ye(ds.count(Qt(e)-1,e),t,2)}function Ax(e,t){return ye(e.getUTCFullYear()%100,t,2)}function Rx(e,t){return e=Bh(e),ye(e.getUTCFullYear()%100,t,2)}function Px(e,t){return ye(e.getUTCFullYear()%1e4,t,4)}function _x(e,t){var r=e.getUTCDay();return e=r>=4||r===0?an(e):an.ceil(e),ye(e.getUTCFullYear()%1e4,t,4)}function Mx(){return"+0000"}function cu(){return"%"}function uu(e){return+e}function du(e){return Math.floor(+e/1e3)}var Hr,Nh,Fh;Vx({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 Vx(e){return Hr=V1(e),Nh=Hr.format,Hr.parse,Fh=Hr.utcFormat,Hr.utcParse,Hr}function kx(e){return new Date(e)}function jx(e){return e instanceof Date?+e:+new Date(+e)}function bl(e,t,r,n,o,s,a,i,l,c){var u=Ih(),d=u.invert,h=u.domain,p=c(".%L"),f=c(":%S"),m=c("%I:%M"),b=c("%I %p"),S=c("%a %d"),R=c("%b %d"),v=c("%B"),O=c("%Y");function I(T){return(l(T)<T?p:i(T)<T?f:a(T)<T?m:s(T)<T?b:n(T)<T?o(T)<T?S:R:r(T)<T?v:O)(T)}return u.invert=function(T){return new Date(d(T))},u.domain=function(T){return arguments.length?h(Array.from(T,jx)):h().map(kx)},u.ticks=function(T){var w=h();return e(w[0],w[w.length-1],T??10)},u.tickFormat=function(T,w){return w==null?I:c(w)},u.nice=function(T){var w=h();return(!T||typeof T.range!="function")&&(T=t(w[0],w[w.length-1],T??10)),T?h(_h(w,T)):u},u.copy=function(){return Fs(u,bl(e,t,r,n,o,s,a,i,l,c))},u}function $h(){return hr.apply(bl(_1,M1,Xt,gl,zs,ao,fl,hl,xr,Nh).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Dx(){return hr.apply(bl(R1,P1,Qt,yl,Gs,$s,ml,pl,xr,Fh).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Ux(){var e=0,t=1,r,n,o,s,a=bt,i=!1,l;function c(d){return d==null||isNaN(d=+d)?l:a(o===0?.5:(d=(s(d)-r)*o,i?Math.max(0,Math.min(1,d)):d))}c.domain=function(d){return arguments.length?([e,t]=d,r=s(e=+e),n=s(t=+t),o=r===n?0:1/(n-r),c):[e,t]},c.clamp=function(d){return arguments.length?(i=!!d,c):i},c.interpolator=function(d){return arguments.length?(a=d,c):a};function u(d){return function(h){var p,f;return arguments.length?([p,f]=h,a=d(p,f),c):[a(0),a(1)]}}return c.range=u(Ns),c.rangeRound=u(Eh),c.unknown=function(d){return arguments.length?(l=d,c):l},function(d){return s=d,r=d(e),n=d(t),o=r===n?0:1/(n-r),c}}function Lx(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function zh(){var e=cl(Ux()(bt));return e.copy=function(){return Lx(e,zh())},Ob.apply(e,arguments)}function Bx(e,t){return function(n,o){return o.location==="tick"?o.scale.tickFormat(e)(n):o.location==="zoom-slider-tooltip"?t.tickFormat(2)(n):`${n}`}}function Nx(e){return e.scaleType==="band"}function Fx(e){return e.scaleType==="point"}function $x(e){return e.type==="piecewise"?Vh(e.thresholds,e.colors):zh([e.min??0,e.max??100],e.color)}function hs(e){return e.values?ss(e.values,e.colors).unknown(e.unknownColor??null):ss(e.colors.map((t,r)=>r),e.colors).unknown(e.unknownColor??null)}function Ho(e){return e.type==="ordinal"?hs(e):$x(e)}function zx(e){const{tickMaxStep:t,tickMinStep:r,tickNumber:n,range:o,domain:s}=e,a=r===void 0?999:Math.floor(Math.abs(s[1]-s[0])/r),i=t===void 0?2:Math.ceil(Math.abs(s[1]-s[0])/t),l=n??Math.floor(Math.abs(o[1]-o[0])/50);return Math.min(a,Math.max(i,l))}function Gx(e,t){return t[1]-t[0]===0?1:e/((t[1]-t[0])/100)}function hi(e,t,r){switch(e){case"log":return Mh(t,r);case"pow":return ul(t,r);case"sqrt":return S1(t,r);case"time":return $h(t,r);case"utc":return Dx(t,r);default:return Ph(t,r)}}const hu=e=>(e==null?void 0:e[0])instanceof Date;function pu(e,t){const r=$h(e.data,t);return(n,{location:o})=>o==="tick"?r.tickFormat(e.tickNumber)(n):`${n.toLocaleString()}`}const ka=(e,t)=>{const r=e[1]-e[0],n=t[1]-t[0],o=e[0]-t[0]*r/n,s=e[1]+(100-t[1])*r/n;return[o,s]};let fu,mu;class Hx{constructor(){if(this.types=new Set,fu)throw new Error("You can only create one instance!");fu=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}class qx{constructor(){if(this.types=new Set,mu)throw new Error("You can only create one instance!");mu=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}const Hs=new Hx;Hs.addType("bar");Hs.addType("line");Hs.addType("scatter");const Wx=new qx;Wx.addType("radar");function Gh(e){return Hs.getTypes().has(e)}const Jx=(e,t,r,n,o,s,a,i)=>{var f;const l=n==="x"?o[t].xExtremumGetter:o[t].yExtremumGetter,c=((f=a[t])==null?void 0:f.series)??{},[u,d]=(l==null?void 0:l({series:c,axis:r,axisIndex:s,isDefaultAxis:s===0,getFilters:i}))??[1/0,-1/0],[h,p]=e;return[Math.min(u,h),Math.max(d,p)]},Hh=(e,t,r,n,o,s)=>{const i=Object.keys(r).filter(Gh).reduce((l,c)=>Jx(l,c,e,t,r,n,o,s),[1/0,-1/0]);return Number.isNaN(i[0])||Number.isNaN(i[1])?[1/0,-1/0]:i},Yx=(e,t,r,n)=>{const o=new Set;return Object.keys(t).filter(Gh).forEach(a=>{var c,u,d;const i=((c=r[a])==null?void 0:c.series)??{},l=(d=(u=t[a]).axisTooltipGetter)==null?void 0:d.call(u,i);l!==void 0&&l.forEach(({axisId:h,direction:p})=>{p===e&&o.add(h??n)})}),o},Kx=(e,t,r,n)=>{var o;if(e.domainLimit!==void 0)return e.domainLimit;if(t==="x")for(const s of((o=n.line)==null?void 0:o.seriesOrder)??[]){const a=n.line.series[s];if(a.xAxisId===e.id||a.xAxisId===void 0&&r===0)return"strict"}return"nice"};function Xx(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 Qx=.2,Zx=.1;function qh({drawingArea:e,formattedSeries:t,axis:r,seriesConfig:n,axisDirection:o,zoomMap:s,zoomOptions:a,getFilters:i,preferStrictDomainInLineCharts:l}){if(r===void 0)return{axis:{},axisIds:[]};const c=Yx(o,n,t,r[0].id),u={};return r.forEach((d,h)=>{const p=d,f=a==null?void 0:a[p.id],m=s==null?void 0:s.get(p.id),b=m?[m.start,m.end]:[0,100],S=Xx(e,o,p),[R,v]=Hh(p,o,n,h,t,m===void 0&&!f?i:void 0),O=!p.ignoreTooltip&&c.has(p.id),I=p.data??[];if(Nx(p)){const oe=p.categoryGapRatio??Qx,Q=p.barGapRatio??Zx,se=o==="y"?[S[1],S[0]]:S,N=ka(se,b);if(u[p.id]=K({offset:0,height:0,categoryGapRatio:oe,barGapRatio:Q,triggerTooltip:O},p,{data:I,scale:rl(p.data,N).paddingInner(oe).paddingOuter(oe/2),tickNumber:p.data.length,colorScale:p.colorMap&&(p.colorMap.type==="ordinal"?hs(K({values:p.data},p.colorMap)):Ho(p.colorMap))}),hu(p.data)){const ee=pu(p,se);u[p.id].valueFormatter=p.valueFormatter??ee}}if(Fx(p)){const oe=o==="y"?[...S].reverse():S,Q=ka(oe,b);if(u[p.id]=K({offset:0,height:0,triggerTooltip:O},p,{data:I,scale:Tb(p.data,Q),tickNumber:p.data.length,colorScale:p.colorMap&&(p.colorMap.type==="ordinal"?hs(K({values:p.data},p.colorMap)):Ho(p.colorMap))}),hu(p.data)){const se=pu(p,oe);u[p.id].valueFormatter=p.valueFormatter??se}}if(p.scaleType==="band"||p.scaleType==="point")return;const T=p.scaleType??"linear",w=l?Kx(p,o,h,t):p.domainLimit??"nice",P=[p.min??R,p.max??v];if(typeof w=="function"){const{min:oe,max:Q}=w(R,v);P[0]=oe,P[1]=Q}const k=zx(K({},p,{range:S,domain:P})),y=Gx(k,b),A=ka(S,b),M=hi(T,P,A),_=w==="nice"?M.nice(k):M,[j,ne]=_.domain(),X=[p.min??j,p.max??ne];u[p.id]=K({offset:0,height:0,triggerTooltip:O},p,{data:I,scaleType:T,scale:_.domain(X),tickNumber:y,colorScale:p.colorMap&&Ho(p.colorMap),valueFormatter:p.valueFormatter??Bx(y,hi(T,S.map(oe=>M.invert(oe)),S))})}),{axis:u,axisIds:r.map(({id:d})=>d)}}function eS(e){return e!=null}function Wh({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:o}){return(s,a)=>{var b;const i=t[s.id];if(!i||i.filterMode!=="discard")return null;const l=e==null?void 0:e.get(s.id);if(l===void 0||l.start<=0&&l.end>=100)return null;let c=[];const u=s.scaleType;u==="point"||u==="band"?c=[0,(((b=s.data)==null?void 0:b.length)??1)-1]:c=Hh(s,o,r,a,n);let d,h;[d,h]=hi(!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,R)=>{var O;const v=S[o]??((O=s.data)==null?void 0:O[R]);return v==null?!0:s.scaleType==="point"||s.scaleType==="band"||typeof v=="string"?R>=f&&R<=m:v>=f&&v<=m}}}const tS=e=>({currentAxisId:t,seriesXAxisId:r,seriesYAxisId:n,isDefaultAxis:o})=>(s,a)=>{var c,u;return!(t===r?n:r)||o?((u=(c=Object.values(e??{}))[0])==null?void 0:u.call(c,s,a))??!0:[n,r].filter(d=>d!==t).map(d=>e[d??""]).filter(eS).every(d=>d(s,a))},gu=e=>(t=[])=>t.reduce((r,n)=>{const{zoom:o,id:s}=n,a=el(o,s,e);return a&&(r[s]=a),r},{}),rS=e=>{const t=new Map;return e.forEach(r=>{t.set(r.axisId,r)}),t},Jh=e=>e.zoom;he([Jh],e=>e==null?void 0:e.isInteracting);const qs=he([Jh],e=>(e==null?void 0:e.zoomData)&&rS(e==null?void 0:e.zoomData)),io=he([fn,mn],(e,t)=>K({},gu("x")(e),gu("y")(t)));he([io,(e,t)=>t],(e,t)=>e[t]);const nS=he([qs,io,Bs,no],(e,t,r,n)=>e&&t&&Wh({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:"x"})),oS=he([qs,io,Bs,no],(e,t,r,n)=>e&&t&&Wh({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:"y"})),Yh=he([nS,oS,fn,mn],(e,t,r,n)=>{if(e===void 0||t===void 0)return;const o=r==null?void 0:r.reduce((a,i,l)=>{const c=e(i,l);return c!==null&&(a[i.id]=c),a},{}),s=n==null?void 0:n.reduce((a,i,l)=>{const c=t(i,l);return c!==null&&(a[i.id]=c),a},{});if(!(Object.keys(o??{}).length===0&&Object.keys(s??{}).length===0))return tS(K({},o,s))}),_r=he([fn,ro,no,Bs,qs,io,Yh,dh],(e,t,r,n,o,s,a,i)=>qh({drawingArea:t,formattedSeries:r,axis:e,seriesConfig:n,axisDirection:"x",zoomMap:o,zoomOptions:s,getFilters:a,preferStrictDomainInLineCharts:i})),Mr=he([mn,ro,no,Bs,qs,io,Yh,dh],(e,t,r,n,o,s,a,i)=>qh({drawingArea:t,formattedSeries:r,axis:e,seriesConfig:n,axisDirection:"y",zoomMap:o,zoomOptions:s,getFilters:a,preferStrictDomainInLineCharts:i}));he([_r,Mr,(e,t)=>t],(e,t,r)=>(e==null?void 0:e.axis[r])??(t==null?void 0:t.axis[r]));he([fn,mn,(e,t)=>t],(e,t,r)=>{const n=(e==null?void 0:e.find(o=>o.id===r))??(t==null?void 0:t.find(o=>o.id===r))??null;if(n)return n});function Kh(e){return e.bandwidth!==void 0}function qr(e){return e instanceof Date?e.getTime():e}function ln(e,t){const{scale:r,data:n,reverse:o}=e;if(!Kh(r)){const a=r.invert(t);if(n===void 0)return-1;const i=qr(a);return n==null?void 0:n.findIndex((c,u)=>{const d=qr(c);return d>i&&(u===0||Math.abs(i-d)<=Math.abs(i-qr(n[u-1])))||d<=i&&(u===n.length-1||Math.abs(qr(a)-d)<Math.abs(qr(a)-qr(n[u+1])))})}const s=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 s<0||s>=n.length?-1:o?n.length-1-s:s}function yu(e,t,r){const{scale:n,data:o}=e;if(!Kh(n)){const s=n.invert(t);return r<0?s:o[r]}return r<0||r>=o.length?null:o[r]}function bu(e,t){const r=e.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r.matrixTransform(e.getScreenCTM().inverse())}function Wt(e){const t=V.useRef(e);return Ut(()=>{t.current=e}),V.useRef((...r)=>(0,t.current)(...r)).current}const sS=Object.is;function Xh(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let r=0,n=0;for(const o in e)if(r+=1,!sS(e[o],t[o])||!(o in t))return!1;for(const o in t)n+=1;return r===n}const xl=({store:e})=>{const t=Wt(function(){e.update(a=>K({},a,{interaction:{pointer:null,item:null}}))}),r=Wt(function(a){e.update(i=>{const l=i.interaction.item;return a?l===null||Object.keys(a).some(c=>a[c]!==l[c])?i:K({},i,{interaction:K({},i.interaction,{item:null})}):l===null?i:K({},i,{interaction:K({},i.interaction,{item:null})})})}),n=Wt(function(a){e.update(i=>Xh(i.interaction.item,a)?i:K({},i,{interaction:K({},i.interaction,{item:a})}))}),o=Wt(function(a){e.update(i=>K({},i,{interaction:K({},i.interaction,{pointer:a})}))});return{instance:{cleanInteraction:t,setItemInteraction:n,removeItemInteraction:r,setPointerCoordinate:o}}};xl.getInitialState=()=>({interaction:{item:null,pointer:null}});xl.params={};const Sl=e=>e.interaction,aS=he([Sl],e=>e!==void 0),iS=he([Sl],e=>(e==null?void 0:e.item)??null),Qh=he([Sl],e=>(e==null?void 0:e.pointer)??null),Ws=he([Qh],e=>e&&e.x),Js=he([Qh],e=>e&&e.y);he([iS],e=>e!==null);function Bn(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const o=e.length;if(o!==t.length)return!1;for(let s=0;s<o;s+=1)if(!Bn(e[s],t[s]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;const o=Array.from(e.entries());for(let s=0;s<o.length;s+=1)if(!t.has(o[s][0]))return!1;for(let s=0;s<o.length;s+=1){const a=o[s];if(!Bn(a[1],t.get(a[0])))return!1}return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;const o=Array.from(e.entries());for(let s=0;s<o.length;s+=1)if(!t.has(o[s][0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const o=e.length;if(o!==t.length)return!1;for(let s=0;s<o;s+=1)if(e[s]!==t[s])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const r=Object.keys(e),n=r.length;if(n!==Object.keys(t).length)return!1;for(let o=0;o<n;o+=1)if(!Object.prototype.hasOwnProperty.call(t,r[o]))return!1;for(let o=0;o<n;o+=1){const s=r[o];if(!Bn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}const Ys=(e,t)=>t;function pi(e,t,r=t.axisIds[0]){return Array.isArray(r)?r.map(n=>ln(t.axis[n],e)):ln(t.axis[r],e)}const Zh=(e,t,r)=>{if(e===null)return null;const n=pi(e,t,r);return n===-1?null:n},lS=he([Ws,_r,Ys],Zh),cS=he([Js,Mr,Ys],Zh),uS=he([Ws,Js,_r,Mr],(e,t,r,n)=>[...e===null?[]:r.axisIds.map(o=>({axisId:o,dataIndex:pi(e,r,o)})),...t===null?[]:n.axisIds.map(o=>({axisId:o,dataIndex:pi(t,n,o)}))].filter(o=>o.dataIndex!==null&&o.dataIndex>=0));function ep(e,t,r,n=t.axisIds[0]){return Array.isArray(n)?n.map((o,s)=>yu(t.axis[o],e,r[s])):yu(t.axis[n],e,r)}he([Ws,_r,lS,Ys],(e,t,r,n)=>e===null||r===null||t.axisIds.length===0?null:ep(e,t,r,n));he([Js,Mr,cS,Ys],(e,t,r,n)=>e===null||r===null||t.axisIds.length===0?null:ep(e,t,r,n));const dS=he([Ws,_r],(e,t)=>e===null?[]:t.axisIds.filter(r=>t.axis[r].triggerTooltip).map(r=>({axisId:r,dataIndex:ln(t.axis[r],e)})).filter(({dataIndex:r})=>r>=0),{memoizeOptions:{resultEqualityCheck:Bn}}),hS=he([Js,Mr],(e,t)=>e===null?[]:t.axisIds.filter(r=>t.axis[r].triggerTooltip).map(r=>({axisId:r,dataIndex:ln(t.axis[r],e)})).filter(({dataIndex:r})=>r>=0),{memoizeOptions:{resultEqualityCheck:Bn}});he([dS,hS],(e,t)=>e.length>0||t.length>0);const xu={};function pS(e,t){const r=V.useRef(xu);return r.current===xu&&(r.current=e(t)),r}const fS=()=>{};function mS(e,t,r,n){const o=pS(gS,{store:e,selector:t,skip:n}).current;o.effect=r,V.useEffect(o.onMount(n),[n])}function gS(e){const{store:t,selector:r,skip:n}=e;let o=!1,s;const a=()=>{i.dispose??(i.dispose=t.subscribe(l=>{const c=r(l);i.effect(s,c),s=c}))},i={effect:fS,dispose:null,onMount:l=>()=>{if(!l)return o||(o=!0,s=r(t.value)),a(),()=>{var c;(c=i.dispose)==null||c.call(i),i.dispose=null}}};return n||(o=!0,s=r(t.value),a()),i}const Ks=({params:e,store:t,seriesConfig:r,svgRef:n,instance:o})=>{const{xAxis:s,yAxis:a,dataset:i,onHighlightedAxisChange:l}=e;if(process.env.NODE_ENV!=="production"){const v=[...s??[],...a??[]].filter(I=>I.id).map(I=>I.id),O=new Set(v.filter((I,T)=>v.indexOf(I)!==T));O.size>0&&Gn([`MUI X Charts: The following axis ids are duplicated: ${Array.from(O).join(", ")}.`,"Please make sure that each axis has a unique id."].join(`
|
|
117
|
-
`),"error")}const c=at(t,ro),u=at(t,no),d=at(t,aS),{axis:h,axisIds:p}=at(t,_r),{axis:f,axisIds:m}=at(t,Mr);gh({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedAxis",controlled:e.highlightedAxis,defaultValue:void 0}),Ut(()=>{e.highlightedAxis!==void 0&&t.update(v=>v.controlledCartesianAxisHighlight===e.highlightedAxis?v:K({},v,{controlledCartesianAxisHighlight:e.highlightedAxis}))},[t,e.highlightedAxis]);const b=V.useRef(!0);V.useEffect(()=>{if(b.current){b.current=!1;return}t.update(v=>K({},v,{cartesianAxis:K({},v.cartesianAxis,{x:xh(s,i),y:Sh(a,i)})}))},[r,c,s,a,i,t]);const S=p[0],R=m[0];return mS(t,uS,(v,O)=>{if(!Object.is(v,O)){if(v.length!==O.length){l(O);return}v!=null&&v.some(({axisId:I,dataIndex:T},w)=>O[w].axisId!==I||O[w].dataIndex!==T)&&l(O)}},!l),V.useEffect(()=>{const v=n.current;if(!d||!v||e.disableAxisListener)return()=>{};const O=o.addInteractionListener("moveEnd",A=>{var M;A.detail.activeGestures.pan||(M=o.cleanInteraction)==null||M.call(o)}),I=o.addInteractionListener("panEnd",A=>{var M;A.detail.activeGestures.move||(M=o.cleanInteraction)==null||M.call(o)}),T=o.addInteractionListener("quickPressEnd",A=>{var M;!A.detail.activeGestures.move&&!A.detail.activeGestures.pan&&((M=o.cleanInteraction)==null||M.call(o))}),w=A=>{var ne,X;const M=A.detail.srcEvent,_=A.detail.target,j=bu(v,M);if(A.detail.srcEvent.buttons>=1&&(_!=null&&_.hasPointerCapture(A.detail.srcEvent.pointerId))&&!(_!=null&&_.closest("[data-charts-zoom-slider]"))&&(_==null||_.releasePointerCapture(A.detail.srcEvent.pointerId)),!o.isPointInside(j.x,j.y,_)){(ne=o.cleanInteraction)==null||ne.call(o);return}(X=o.setPointerCoordinate)==null||X.call(o,j)},P=o.addInteractionListener("move",w),k=o.addInteractionListener("pan",w),y=o.addInteractionListener("quickPress",w);return()=>{P.cleanup(),O.cleanup(),k.cleanup(),I.cleanup(),y.cleanup(),T.cleanup()}},[n,t,h,S,f,R,o,e.disableAxisListener,d]),V.useEffect(()=>{const v=n.current,O=e.onAxisClick;if(v===null||!O)return()=>{};const I=o.addInteractionListener("tap",T=>{let w=null,P=!1;const k=bu(v,T.detail.srcEvent),y=ln(h[S],k.x);P=y!==-1,w=P?y:ln(f[R],k.y);const A=P?p[0]:m[0];if(w==null||w===-1)return;const M=(P?h:f)[A].data[w],_={};Object.keys(u).filter(j=>["bar","line"].includes(j)).forEach(j=>{var ne;(ne=u[j])==null||ne.seriesOrder.forEach(X=>{const oe=u[j].series[X],Q=oe.xAxisId,se=oe.yAxisId,N=P?Q:se;(N===void 0||N===A)&&(_[X]=oe.data[w])})}),O(T.detail.srcEvent,{dataIndex:w,axisValue:M,seriesValues:_})});return()=>{I.cleanup()}},[e.onAxisClick,u,n,h,p,f,m,S,R,o]),{}};Ks.params={xAxis:!0,yAxis:!0,dataset:!0,onAxisClick:!0,disableAxisListener:!0,onHighlightedAxisChange:!0,highlightedAxis:!0};Ks.getDefaultizedParams=({params:e})=>K({},e,{colors:e.colors??hh,theme:e.theme??"light",defaultizedXAxis:xh(e.xAxis,e.dataset),defaultizedYAxis:Sh(e.yAxis,e.dataset)});Ks.getInitialState=e=>K({cartesianAxis:{x:e.defaultizedXAxis,y:e.defaultizedYAxis}},e.highlightedAxis===void 0?{}:{controlledCartesianAxisHighlight:e.highlightedAxis});function Su(e,t){return e.id!==void 0?e:K({id:t},e)}function vu(e){return e.colorMap?K({},e,{colorScale:e.colorMap.type==="ordinal"&&e.data?hs(K({values:e.data},e.colorMap)):Ho(e.colorMap.type==="continuous"?K({min:e.min,max:e.max},e.colorMap):e.colorMap)}):e}function tp(e,t){if(!e||e.length===0)return{axis:{},axisIds:[]};const r={},n=[];return e.forEach((o,s)=>{const a=o.dataKey,i=o.id??`defaultized-z-axis-${s}`;if(a===void 0||o.data!==void 0){r[i]=vu(Su(o,i)),n.push(i);return}if(t===void 0)throw new Error("MUI X Charts: z-axis uses `dataKey` but no `dataset` is provided.");r[i]=vu(Su(K({},o,{data:t.map(l=>l[a])}),i)),n.push(i)}),{axis:r,axisIds:n}}const vl=({params:e,store:t})=>{const{zAxis:r,dataset:n}=e,o=V.useRef(!0);return V.useEffect(()=>{if(o.current){o.current=!1;return}t.update(s=>K({},s,{zAxis:tp(r,n)}))},[r,n,t]),{}};vl.params={zAxis:!0,dataset:!0};vl.getInitialState=e=>({zAxis:tp(e.zAxis,e.dataset)});const yS=e=>e,bS=he([yS],e=>e.zAxis),Xs=({store:e,params:t})=>{gh({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedItem",controlled:t.highlightedItem,defaultValue:null}),Ut(()=>{e.update(o=>o.highlight.item===t.highlightedItem?o:K({},o,{highlight:K({},o.highlight,{item:t.highlightedItem})}))},[e,t.highlightedItem]);const r=Wt(()=>{var o;(o=t.onHighlightChange)==null||o.call(t,null),e.update(s=>K({},s,{highlight:{item:null}}))}),n=Wt(o=>{var a;const s=e.getSnapshot().highlight.item;Xh(s,o)||((a=t.onHighlightChange)==null||a.call(t,o),e.update(i=>K({},i,{highlight:{item:o}})))});return{instance:{clearHighlight:r,setHighlight:n}}};Xs.getDefaultizedParams=({params:e})=>K({},e,{highlightedItem:e.highlightedItem??null});Xs.getInitialState=e=>({highlight:{item:e.highlightedItem}});Xs.params={highlightedItem:!0,onHighlightChange:!0};const Cu=(e,t)=>t==="x"?{x:e,y:null}:{x:null,y:e},rp=e=>{var l;const{axis:t,getFilters:r,isDefaultAxis:n}=e,o=r==null?void 0:r({currentAxisId:t.id,isDefaultAxis:n}),s=o?(l=t.data)==null?void 0:l.filter((c,u)=>o({x:null,y:null},u)):t.data,a=Math.min(...s??[]),i=Math.max(...s??[]);return[a,i]},np=e=>t=>{const{series:r,axis:n,getFilters:o,isDefaultAxis:s}=t;return Object.keys(r).filter(a=>{const i=e==="x"?r[a].xAxisId:r[a].yAxisId;return i===n.id||s&&i===void 0}).reduce((a,i)=>{const{stackedData:l}=r[i],c=o==null?void 0:o({currentAxisId:n.id,isDefaultAxis:s,seriesXAxisId:r[i].xAxisId,seriesYAxisId:r[i].yAxisId}),[u,d]=(l==null?void 0:l.reduce((h,p,f)=>c&&(!c(Cu(p[0],e),f)||!c(Cu(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,a[0]),Math.max(d,a[1])]},[1/0,-1/0])},xS=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?np("x")(e):rp(e),SS=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?rp(e):np("y")(e);function Be(e){return function(){return e}}const wu=Math.abs,Je=Math.atan2,fr=Math.cos,vS=Math.max,ja=Math.min,Pt=Math.sin,Xr=Math.sqrt,st=1e-12,Yn=Math.PI,ps=Yn/2,qo=2*Yn;function CS(e){return e>1?0:e<-1?Yn:Math.acos(e)}function Ou(e){return e>=1?ps:e<=-1?-ps:Math.asin(e)}const fi=Math.PI,mi=2*fi,yr=1e-6,wS=mi-yr;function op(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function OS(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return op;const r=10**t;return function(n){this._+=n[0];for(let o=1,s=n.length;o<s;++o)this._+=Math.round(arguments[o]*r)/r+n[o]}}class TS{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?op:OS(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,o){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+o}`}bezierCurveTo(t,r,n,o,s,a){this._append`C${+t},${+r},${+n},${+o},${this._x1=+s},${this._y1=+a}`}arcTo(t,r,n,o,s){if(t=+t,r=+r,n=+n,o=+o,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,i=this._y1,l=n-t,c=o-r,u=a-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)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-a,f=o-i,m=l*l+c*c,b=p*p+f*f,S=Math.sqrt(m),R=Math.sqrt(h),v=s*Math.tan((fi-Math.acos((m+h-b)/(2*S*R)))/2),O=v/R,I=v/S;Math.abs(O-1)>yr&&this._append`L${t+O*u},${r+O*d}`,this._append`A${s},${s},0,0,${+(d*p>u*f)},${this._x1=t+I*l},${this._y1=r+I*c}`}}arc(t,r,n,o,s,a){if(t=+t,r=+r,n=+n,a=!!a,n<0)throw new Error(`negative radius: ${n}`);let i=n*Math.cos(o),l=n*Math.sin(o),c=t+i,u=r+l,d=1^a,h=a?o-s:s-o;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%mi+mi),h>wS?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>=fi)},${d},${this._x1=t+n*Math.cos(s)},${this._y1=r+n*Math.sin(s)}`)}rect(t,r,n,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+o}h${-n}Z`}toString(){return this._}}function ES(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 TS(t)}function IS(e){return e.innerRadius}function AS(e){return e.outerRadius}function RS(e){return e.startAngle}function PS(e){return e.endAngle}function _S(e){return e&&e.padAngle}function MS(e,t,r,n,o,s,a,i){var l=r-e,c=n-t,u=a-o,d=i-s,h=d*l-u*c;if(!(h*h<st))return h=(u*(t-s)-d*(e-o))/h,[e+h*l,t+h*c]}function Mo(e,t,r,n,o,s,a){var i=e-r,l=t-n,c=(a?s:-s)/Xr(i*i+l*l),u=c*l,d=-c*i,h=e+u,p=t+d,f=r+u,m=n+d,b=(h+f)/2,S=(p+m)/2,R=f-h,v=m-p,O=R*R+v*v,I=o-s,T=h*m-f*p,w=(v<0?-1:1)*Xr(vS(0,I*I*O-T*T)),P=(T*v-R*w)/O,k=(-T*R-v*w)/O,y=(T*v+R*w)/O,A=(-T*R+v*w)/O,M=P-b,_=k-S,j=y-b,ne=A-S;return M*M+_*_>j*j+ne*ne&&(P=y,k=A),{cx:P,cy:k,x01:-u,y01:-d,x11:P*(o/I-1),y11:k*(o/I-1)}}function sp(){var e=IS,t=AS,r=Be(0),n=null,o=RS,s=PS,a=_S,i=null,l=ES(c);function c(){var u,d,h=+e.apply(this,arguments),p=+t.apply(this,arguments),f=o.apply(this,arguments)-ps,m=s.apply(this,arguments)-ps,b=wu(m-f),S=m>f;if(i||(i=u=l()),p<h&&(d=p,p=h,h=d),!(p>st))i.moveTo(0,0);else if(b>qo-st)i.moveTo(p*fr(f),p*Pt(f)),i.arc(0,0,p,f,m,!S),h>st&&(i.moveTo(h*fr(m),h*Pt(m)),i.arc(0,0,h,m,f,S));else{var R=f,v=m,O=f,I=m,T=b,w=b,P=a.apply(this,arguments)/2,k=P>st&&(n?+n.apply(this,arguments):Xr(h*h+p*p)),y=ja(wu(p-h)/2,+r.apply(this,arguments)),A=y,M=y,_,j;if(k>st){var ne=Ou(k/h*Pt(P)),X=Ou(k/p*Pt(P));(T-=ne*2)>st?(ne*=S?1:-1,O+=ne,I-=ne):(T=0,O=I=(f+m)/2),(w-=X*2)>st?(X*=S?1:-1,R+=X,v-=X):(w=0,R=v=(f+m)/2)}var oe=p*fr(R),Q=p*Pt(R),se=h*fr(I),N=h*Pt(I);if(y>st){var ee=p*fr(v),ce=p*Pt(v),be=h*fr(O),_e=h*Pt(O),xe;if(b<Yn)if(xe=MS(oe,Q,be,_e,ee,ce,se,N)){var ut=oe-xe[0],nt=Q-xe[1],Se=ee-xe[0],te=ce-xe[1],ae=1/Pt(CS((ut*Se+nt*te)/(Xr(ut*ut+nt*nt)*Xr(Se*Se+te*te)))/2),ue=Xr(xe[0]*xe[0]+xe[1]*xe[1]);A=ja(y,(h-ue)/(ae-1)),M=ja(y,(p-ue)/(ae+1))}else A=M=0}w>st?M>st?(_=Mo(be,_e,oe,Q,p,M,S),j=Mo(ee,ce,se,N,p,M,S),i.moveTo(_.cx+_.x01,_.cy+_.y01),M<y?i.arc(_.cx,_.cy,M,Je(_.y01,_.x01),Je(j.y01,j.x01),!S):(i.arc(_.cx,_.cy,M,Je(_.y01,_.x01),Je(_.y11,_.x11),!S),i.arc(0,0,p,Je(_.cy+_.y11,_.cx+_.x11),Je(j.cy+j.y11,j.cx+j.x11),!S),i.arc(j.cx,j.cy,M,Je(j.y11,j.x11),Je(j.y01,j.x01),!S))):(i.moveTo(oe,Q),i.arc(0,0,p,R,v,!S)):i.moveTo(oe,Q),!(h>st)||!(T>st)?i.lineTo(se,N):A>st?(_=Mo(se,N,ee,ce,h,-A,S),j=Mo(oe,Q,be,_e,h,-A,S),i.lineTo(_.cx+_.x01,_.cy+_.y01),A<y?i.arc(_.cx,_.cy,A,Je(_.y01,_.x01),Je(j.y01,j.x01),!S):(i.arc(_.cx,_.cy,A,Je(_.y01,_.x01),Je(_.y11,_.x11),!S),i.arc(0,0,h,Je(_.cy+_.y11,_.cx+_.x11),Je(j.cy+j.y11,j.cx+j.x11),S),i.arc(j.cx,j.cy,A,Je(j.y11,j.x11),Je(j.y01,j.x01),!S))):i.arc(0,0,h,I,O,S)}if(i.closePath(),u)return i=null,u+""||null}return c.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+o.apply(this,arguments)+ +s.apply(this,arguments))/2-Yn/2;return[fr(d)*u,Pt(d)*u]},c.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:Be(+u),c):e},c.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:Be(+u),c):t},c.cornerRadius=function(u){return arguments.length?(r=typeof u=="function"?u:Be(+u),c):r},c.padRadius=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:Be(+u),c):n},c.startAngle=function(u){return arguments.length?(o=typeof u=="function"?u:Be(+u),c):o},c.endAngle=function(u){return arguments.length?(s=typeof u=="function"?u:Be(+u),c):s},c.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:Be(+u),c):a},c.context=function(u){return arguments.length?(i=u??null,c):i},c}function ap(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function VS(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function kS(e){return e}function jS(){var e=kS,t=VS,r=null,n=Be(0),o=Be(qo),s=Be(0);function a(i){var l,c=(i=ap(i)).length,u,d,h=0,p=new Array(c),f=new Array(c),m=+n.apply(this,arguments),b=Math.min(qo,Math.max(-qo,o.apply(this,arguments)-m)),S,R=Math.min(Math.abs(b)/c,s.apply(this,arguments)),v=R*(b<0?-1:1),O;for(l=0;l<c;++l)(O=f[p[l]=l]=+e(i[l],l,i))>0&&(h+=O);for(t!=null?p.sort(function(I,T){return t(f[I],f[T])}):r!=null&&p.sort(function(I,T){return r(i[I],i[T])}),l=0,d=h?(b-c*v)/h:0;l<c;++l,m=S)u=p[l],O=f[u],S=m+(O>0?O*d:0)+v,f[u]={data:i[u],index:l,value:O,startAngle:m,endAngle:S,padAngle:R};return f}return a.value=function(i){return arguments.length?(e=typeof i=="function"?i:Be(+i),a):e},a.sortValues=function(i){return arguments.length?(t=i,r=null,a):t},a.sort=function(i){return arguments.length?(r=i,t=null,a):r},a.startAngle=function(i){return arguments.length?(n=typeof i=="function"?i:Be(+i),a):n},a.endAngle=function(i){return arguments.length?(o=typeof i=="function"?i:Be(+i),a):o},a.padAngle=function(i){return arguments.length?(s=typeof i=="function"?i:Be(+i),a):s},a}function cn(e,t){if((a=e.length)>1)for(var r=1,n,o,s=e[t[0]],a,i=s.length;r<a;++r)for(o=s,s=e[t[r]],n=0;n<i;++n)s[n][1]+=s[n][0]=isNaN(o[n][1])?o[n][0]:o[n][1]}function un(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function DS(e,t){return e[t]}function US(e){const t=[];return t.key=e,t}function ip(){var e=Be([]),t=un,r=cn,n=DS;function o(s){var a=Array.from(e.apply(this,arguments),US),i,l=a.length,c=-1,u;for(const d of s)for(i=0,++c;i<l;++i)(a[i][c]=[0,+n(d,a[i].key,c,s)]).data=d;for(i=0,u=ap(t(a));i<l;++i)a[u[i]].index=i;return r(a,u),a}return o.keys=function(s){return arguments.length?(e=typeof s=="function"?s:Be(Array.from(s)),o):e},o.value=function(s){return arguments.length?(n=typeof s=="function"?s:Be(+s),o):n},o.order=function(s){return arguments.length?(t=s==null?un:typeof s=="function"?s:Be(Array.from(s)),o):t},o.offset=function(s){return arguments.length?(r=s??cn,o):r},o}function LS(e,t){if((n=e.length)>0){for(var r,n,o=0,s=e[0].length,a;o<s;++o){for(a=r=0;r<n;++r)a+=e[r][o][1]||0;if(a)for(r=0;r<n;++r)e[r][o][1]/=a}cn(e,t)}}function BS(e,t){if((l=e.length)>0)for(var r,n=0,o,s,a,i,l,c=e[t[0]].length;n<c;++n)for(a=i=0,r=0;r<l;++r)(s=(o=e[t[r]][n])[1]-o[0])>0?(o[0]=a,o[1]=a+=s):s<0?(o[1]=i,o[0]=i+=s):(o[0]=0,o[1]=s)}function NS(e,t){if((o=e.length)>0){for(var r=0,n=e[t[0]],o,s=n.length;r<s;++r){for(var a=0,i=0;a<o;++a)i+=e[a][r][1]||0;n[r][1]+=n[r][0]=-i/2}cn(e,t)}}function FS(e,t){if(!(!((a=e.length)>0)||!((s=(o=e[t[0]]).length)>0))){for(var r=0,n=1,o,s,a;n<s;++n){for(var i=0,l=0,c=0;i<a;++i){for(var u=e[t[i]],d=u[n][1]||0,h=u[n-1][1]||0,p=(d-h)/2,f=0;f<i;++f){var m=e[t[f]],b=m[n][1]||0,S=m[n-1][1]||0;p+=b-S}l+=d,c+=p*d}o[n-1][1]+=o[n-1][0]=r,l&&(r-=c/l)}o[n-1][1]+=o[n-1][0]=r,cn(e,t)}}function lp(e){var t=e.map($S);return un(e).sort(function(r,n){return t[r]-t[n]})}function $S(e){for(var t=-1,r=0,n=e.length,o,s=-1/0;++t<n;)(o=+e[t][1])>s&&(s=o,r=t);return r}function cp(e){var t=e.map(up);return un(e).sort(function(r,n){return t[r]-t[n]})}function up(e){for(var t=0,r=-1,n=e.length,o;++r<n;)(o=+e[r][1])&&(t+=o);return t}function zS(e){return cp(e).reverse()}function GS(e){var t=e.length,r,n,o=e.map(up),s=lp(e),a=0,i=0,l=[],c=[];for(r=0;r<t;++r)n=s[r],a<i?(a+=o[n],l.push(n)):(i+=o[n],c.push(n));return c.reverse().concat(l)}function HS(e){return un(e).reverse()}const Da={appearance:lp,ascending:cp,descending:zS,insideOut:GS,none:un,reverse:HS},Ua={expand:LS,diverging:BS,none:cn,silhouette:NS,wiggle:FS},dp=e=>{const{series:t,seriesOrder:r,defaultStrategy:n}=e,o=[],s={};return r.forEach(a=>{const{stack:i,stackOrder:l,stackOffset:c}=t[a];i===void 0?o.push({ids:[a],stackingOrder:Da.none,stackingOffset:Ua.none}):s[i]===void 0?(s[i]=o.length,o.push({ids:[a],stackingOrder:Da[l??(n==null?void 0:n.stackOrder)??"none"],stackingOffset:Ua[c??(n==null?void 0:n.stackOffset)??"diverging"]})):(o[s[i]].ids.push(a),l!==void 0&&(o[s[i]].stackingOrder=Da[l]),c!==void 0&&(o[s[i]].stackingOffset=Ua[c]))}),o},qS=e=>e==null?"":e.toLocaleString(),WS=(e,t)=>{const{seriesOrder:r,series:n}=e,o=dp(e),s=t??[];r.forEach(i=>{const l=n[i].data;if(l!==void 0)l.forEach((c,u)=>{s.length<=u?s.push({[i]:c}):s[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 a={};return o.forEach(i=>{const{ids:l,stackingOffset:c,stackingOrder:u}=i,d=ip().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)(s);l.forEach((h,p)=>{const f=n[h].dataKey;a[h]=K({layout:"vertical",labelMarkType:"square",minBarSize:0,valueFormatter:n[h].valueFormatter??qS},n[h],{data:f?t.map(m=>{const b=m[f];return typeof b!="number"?(process.env.NODE_ENV!=="production"&&b!==null&&Gn([`MUI X Charts: your dataset key "${f}" is used for plotting bars, but contains nonnumerical elements.`,"Bar plots only support numbers and null values."]),null):b}):n[h].data,stackedData:d[p].map(([m,b])=>[m,b])})})}),{seriesOrder:r,stackingGroups:o,series:a}};function Zt(e,t){return typeof e=="function"?e(t):e}const JS=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,o)=>{const s=Zt(r[o].label,"legend");return s===void 0||n.push({markType:r[o].labelMarkType,id:o,seriesId:o,color:r[o].color,label:s}),n},[])},YS=(e,t,r)=>{const n=e.layout==="vertical",o=n?t==null?void 0:t.colorScale:r==null?void 0:r.colorScale,s=n?r==null?void 0:r.colorScale:t==null?void 0:t.colorScale,a=n?t==null?void 0:t.data:r==null?void 0:r.data;return s?i=>{if(i===void 0)return e.color;const l=e.data[i],c=l===null?e.color:s(l);return c===null?e.color:c}:o&&a?i=>{if(i===void 0)return e.color;const l=a[i],c=l===null?e.color:o(l);return c===null?e.color:c}:()=>e.color},KS=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const o=Zt(t.label,"tooltip"),s=t.data[n.dataIndex];if(s==null)return null;const a=t.valueFormatter(s,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:o,value:s,formattedValue:a,markType:t.labelMarkType}},
|
|
115
|
+
*/var Ic;function xy(){return Ic||(Ic=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=D,r=ah(),n=typeof Object.is=="function"?Object.is:e,o=r.useSyncExternalStore,s=t.useRef,a=t.useEffect,i=t.useMemo,l=t.useDebugValue;Ta.useSyncExternalStoreWithSelector=function(c,u,d,h,p){var f=s(null);if(f.current===null){var m={hasValue:!1,value:null};f.current=m}else m=f.current;f=i(function(){function S(T){if(!P){if(P=!0,v=T,T=h(T),p!==void 0&&m.hasValue){var w=m.value;if(p(w,T))return O=w}return O=T}if(w=O,n(v,T))return w;var R=h(T);return p!==void 0&&p(w,R)?(v=T,w):(v=T,O=R)}var P=!1,v,O,I=d===void 0?null:d;return[function(){return S(u())},I===null?void 0:function(){return S(I())}]},[u,d,h,p]);var b=o(c,f[0],f[1]);return a(function(){m.hasValue=!0,m.value=b},[b]),l(b),b},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Ta}var Ac;function Sy(){return Ac||(Ac=1,process.env.NODE_ENV==="production"?To.exports=by():To.exports=xy()),To.exports}var vy=Sy();const Cy=Object.is,at=(e,t,r=[],n=Cy)=>{const o=s=>t(s,...r);return vy.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,o,n)},wy="DEFAULT_X_AXIS_KEY",Oy="DEFAULT_Y_AXIS_KEY",Ty={top:20,bottom:20,left:20,right:20},Ey=45,Iy=25,ih=20,fn=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.x},mn=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.y},Ay=he([mn],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)),Py=he([mn],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)),Ry=he([fn],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)),My=he([fn],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)),Vy=e=>e.dimensions,lh=e=>e.dimensions.width,ch=e=>e.dimensions.height,_y=e=>e.dimensions.margin.top,ky=e=>e.dimensions.margin.right,jy=e=>e.dimensions.margin.bottom,Dy=e=>e.dimensions.margin.left,ro=he([lh,ch,_y,ky,jy,Dy,Ry,Py,My,Ay],(e,t,r,n,o,s,a,i,l,c)=>({width:e-s-n-c-i,left:s+c,right:n+i,height:t-r-o-a-l,top:r+a,bottom:o+l})),Uy=he([Vy],e=>({width:e.propsWidth,height:e.propsHeight})),Ly=he([lh,ch],(e,t)=>({width:e,height:t}));function uh(e,t){return typeof e=="number"?{top:e,bottom:e,left:e,right:e}:t?K({},t,e):e}const By=10,Us=({params:e,store:t,svgRef:r})=>{const n=e.width!==void 0&&e.height!==void 0,o=_.useRef({displayError:!1,initialCompute:!0,computeRun:0}),[s,a]=_.useState(0),[i,l]=_.useState(0),c=_.useCallback(()=>{const f=r==null?void 0:r.current;if(!f)return{};const b=my(f).getComputedStyle(f),S=Math.floor(parseFloat(b.height))||0,P=Math.floor(parseFloat(b.width))||0;return t.update(v=>v.dimensions.width===P&&v.dimensions.height===S?v:K({},v,{dimensions:{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:e.width??P,height:e.height??S,propsWidth:e.width,propsHeight:e.height}})),{height:S,width:P}},[t,r,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]);_.useEffect(()=>{t.update(f=>{const m=e.width??f.dimensions.width,b=e.height??f.dimensions.height;return K({},f,{dimensions:{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:m,height:b,propsHeight:e.height,propsWidth:e.width}})})},[t,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]),_.useEffect(()=>{o.current.displayError=!0},[]),Ut(()=>{if(n||!o.current.initialCompute||o.current.computeRun>By)return;const f=c();f.width!==s||f.height!==i?(o.current.computeRun+=1,f.width!==void 0&&a(f.width),f.height!==void 0&&l(f.height)):o.current.initialCompute&&(o.current.initialCompute=!1)},[i,s,c,n]),Ut(()=>{if(n)return()=>{};c();const f=r.current;if(typeof ResizeObserver>"u")return()=>{};let m;const b=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{c()})});return f&&b.observe(f),()=>{m&&cancelAnimationFrame(m),f&&b.unobserve(f)}},[c,n,r]),process.env.NODE_ENV!=="production"&&(o.current.displayError&&e.width===void 0&&s===0&&(console.error("MUI X Charts: ChartContainer does not have `width` prop, and its container has no `width` defined."),o.current.displayError=!1),o.current.displayError&&e.height===void 0&&i===0&&(console.error("MUI X Charts: ChartContainer does not have `height` prop, and its container has no `height` defined."),o.current.displayError=!1));const u=at(t,ro),d=_.useCallback(f=>f>=u.left-1&&f<=u.left+u.width,[u.left,u.width]),h=_.useCallback(f=>f>=u.top-1&&f<=u.top+u.height,[u.height,u.top]);return{instance:{isPointInside:_.useCallback((f,m,b)=>b&&"closest"in b&&b.closest("[data-drawing-container]")?!0:d(f)&&h(m),[d,h]),isXInside:d,isYInside:h}}};Us.params={width:!0,height:!0,margin:!0};Us.getDefaultizedParams=({params:e})=>K({},e,{margin:uh(e.margin,Ty)});Us.getInitialState=({width:e,height:t,margin:r})=>({dimensions:{margin:r,width:e??0,height:t??0,propsWidth:e,propsHeight:t}});const Gi=({params:e,store:t})=>(Ut(()=>{t.update(r=>K({},r,{experimentalFeatures:e.experimentalFeatures}))},[t,e.experimentalFeatures]),{});Gi.params={experimentalFeatures:!0};Gi.getInitialState=({experimentalFeatures:e})=>({experimentalFeatures:e});const Fy=e=>e.experimentalFeatures,dh=he([Fy],e=>!!(e!=null&&e.preferStrictDomainInLineCharts));let Pc=0;const $y=()=>(Pc+=1,`mui-chart-${Pc}`),Hi=({params:e,store:t})=>(_.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??$y()})}))},[t,e.id]),{});Hi.params={id:!0};Hi.getInitialState=({id:e})=>({id:{chartId:e,providedChartId:e}});const Ny=e=>e.id,zy=he([Ny],e=>e.chartId),Gy=["#4254FB","#FFB422","#FA4F58","#0DBEFF","#22BF75","#FA83B4","#FF7511"],Hy=["#495AFB","#FFC758","#F35865","#30C8FF","#44CE8D","#F286B3","#FF8C39"],hh=e=>e==="dark"?Hy:Gy,ph=({series:e,colors:t,seriesConfig:r,dataset:n})=>{const o={};e.forEach((a,i)=>{var u;const l=r[a.type].getSeriesWithDefaultValues(a,i,t),c=l.id;if(o[a.type]===void 0&&(o[a.type]={series:{},seriesOrder:[]}),((u=o[a.type])==null?void 0:u.series[c])!==void 0)throw new Error(`MUI X Charts: series' id "${c}" is not unique.`);o[a.type].series[c]=l,o[a.type].seriesOrder.push(c)});const s={};return Object.keys(r).forEach(a=>{var l,c;const i=o[a];i!==void 0&&(s[a]=((c=(l=r[a])==null?void 0:l.seriesProcessor)==null?void 0:c.call(l,i,n))??o[a])}),s},Ls=({params:e,store:t,seriesConfig:r})=>{const{series:n,dataset:o,theme:s,colors:a}=e,i=_.useRef(!0);return _.useEffect(()=>{if(i.current){i.current=!1;return}t.update(l=>K({},l,{series:K({},l.series,{processedSeries:ph({series:n,colors:typeof a=="function"?a(s):a,seriesConfig:r,dataset:o})})}))},[a,o,n,s,r,t]),{}};Ls.params={dataset:!0,series:!0,colors:!0,theme:!0};const qy=[];Ls.getDefaultizedParams=({params:e})=>{var t;return K({},e,{series:(t=e.series)!=null&&t.length?e.series:qy,colors:e.colors??hh,theme:e.theme??"light"})};Ls.getInitialState=({series:e=[],colors:t,theme:r,dataset:n},o,s)=>({series:{seriesConfig:s,processedSeries:ph({series:e,colors:typeof t=="function"?t(r):t,seriesConfig:s,dataset:n})}});const fh=e=>e.series,no=he([fh],e=>e.processedSeries),Bs=he([fh],e=>e.seriesConfig),Wy={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 mh{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 Wy)throw new Error(`Gesture can't be created with a native event name. Tried to use "${t.name}". Please use a custom name instead.`);this.name=t.name,this.preventDefault=t.preventDefault??!1,this.stopPropagation=t.stopPropagation??!1,this.preventIf=t.preventIf??[],this.requiredKeys=t.requiredKeys??[],this.pointerMode=t.pointerMode??[]}init(t,r,n,o){this.element=t,this.pointerManager=r,this.gesturesRegistry=n,this.keyboardManager=o;const s=`${this.name}ChangeOptions`;this.element.addEventListener(s,this.handleOptionsChange.bind(this));const a=`${this.name}ChangeState`;this.element.addEventListener(a,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 Jy{constructor(){this.activeGestures=new Map}registerActiveGesture(t,r){this.activeGestures.has(t)||this.activeGestures.set(t,new Set);const n=this.activeGestures.get(t),o={gesture:r,element:t};n.add(o)}unregisterActiveGesture(t,r){const n=this.activeGestures.get(t);n&&(n.forEach(o=>{o.gesture===r&&n.delete(o)}),n.size===0&&this.activeGestures.delete(t))}getActiveGestures(t){const r=this.activeGestures.get(t);return r?Array.from(r).reduce((n,o)=>(n[o.gesture.name]=!0,n),{}):{}}isGestureActive(t,r){const n=this.activeGestures.get(t);return n?Array.from(n).some(o=>o.gesture===r):!1}destroy(){this.activeGestures.clear()}unregisterElement(t){this.activeGestures.delete(t)}}class Yy{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 Ky{constructor(t){this.root=void 0,this.touchAction=void 0,this.passive=void 0,this.preventEventInterruption=!0,this.pointers=new Map,this.gestureHandlers=new Set,this.handleInterruptEvents=r=>{if(this.preventEventInterruption&&"pointerType"in r&&r.pointerType==="touch"){r.preventDefault();return}const n=new PointerEvent("forceCancel",{bubbles:!1,cancelable:!1}),o=this.pointers.values().next().value;if(this.pointers.size>0&&o){Object.defineProperties(n,{clientX:{value:o.clientX},clientY:{value:o.clientY},pointerId:{value:o.pointerId},pointerType:{value:o.pointerType}});for(const[s,a]of this.pointers.entries()){const i=K({},a,{type:"forceCancel"});this.pointers.set(s,i)}}this.notifyHandlers(n),this.pointers.clear()},this.handlePointerEvent=r=>{const{type:n,pointerId:o}=r;if(n==="pointerdown"){if(this.pointers.set(o,this.createPointerData(r)),r.target instanceof Element)try{r.target.setPointerCapture(o)}catch{}}else if(n==="pointermove")this.pointers.set(o,this.createPointerData(r));else if(n==="pointerup"||n==="pointercancel"||n==="forceCancel"){if(r.target instanceof Element)try{r.target.releasePointerCapture(o)}catch{}this.pointers.set(o,this.createPointerData(r)),this.notifyHandlers(r),this.pointers.delete(o);return}this.notifyHandlers(r)},this.root=t.root??document.documentElement,this.touchAction=t.touchAction||"auto",this.passive=t.passive!==!1,this.preventEventInterruption=t.preventEventInterruption!==!1,this.setupEventListeners()}registerGestureHandler(t){return this.gestureHandlers.add(t),()=>{this.gestureHandlers.delete(t)}}getPointers(){return new Map(this.pointers)}setupEventListeners(){this.touchAction!=="auto"&&(this.root.style.touchAction=this.touchAction),this.root.addEventListener("pointerdown",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointermove",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointerup",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointercancel",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("forceCancel",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("blur",this.handleInterruptEvents),this.root.addEventListener("contextmenu",this.handleInterruptEvents)}notifyHandlers(t){this.gestureHandlers.forEach(r=>r(this.pointers,t))}createPointerData(t){return{pointerId:t.pointerId,clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY,target:t.target,timeStamp:t.timeStamp,type:t.type,isPrimary:t.isPrimary,pressure:t.pressure,width:t.width,height:t.height,pointerType:t.pointerType,srcEvent:t}}destroy(){this.root.removeEventListener("pointerdown",this.handlePointerEvent),this.root.removeEventListener("pointermove",this.handlePointerEvent),this.root.removeEventListener("pointerup",this.handlePointerEvent),this.root.removeEventListener("pointercancel",this.handlePointerEvent),this.root.removeEventListener("forceCancel",this.handlePointerEvent),this.root.removeEventListener("blur",this.handleInterruptEvents),this.root.removeEventListener("contextmenu",this.handleInterruptEvents),this.pointers.clear(),this.gestureHandlers.clear()}}class Qy{constructor(t){this.gestureTemplates=new Map,this.elementGestureMap=new Map,this.activeGesturesRegistry=new Jy,this.pointerManager=void 0,this.keyboardManager=new Yy,this.pointerManager=new Ky({root:t.root,touchAction:t.touchAction,passive:t.passive}),t.gestures&&t.gestures.length>0&&t.gestures.forEach(r=>{this.addGestureTemplate(r)})}addGestureTemplate(t){this.gestureTemplates.has(t.name)&&console.warn(`Gesture template with name "${t.name}" already exists. It will be overwritten.`),this.gestureTemplates.set(t.name,t)}setGestureOptions(t,r,n){const o=this.elementGestureMap.get(r);if(!o||!o.has(t)){console.error(`Gesture "${t}" not found on the provided element.`);return}const s=new CustomEvent(`${t}ChangeOptions`,{detail:n,bubbles:!1,cancelable:!1});r.dispatchEvent(s)}setGestureState(t,r,n){const o=this.elementGestureMap.get(r);if(!o||!o.has(t)){console.error(`Gesture "${t}" not found on the provided element.`);return}const s=new CustomEvent(`${t}ChangeState`,{detail:n,bubbles:!1,cancelable:!1});r.dispatchEvent(s)}registerElement(t,r,n){if(Array.isArray(t))return t.forEach(s=>{const a=n==null?void 0:n[s];this.registerSingleGesture(s,r,a)}),r;const o=n==null?void 0:n[t];return this.registerSingleGesture(t,r,o),r}registerSingleGesture(t,r,n){const o=this.gestureTemplates.get(t);if(!o)return console.error(`Gesture template "${t}" not found.`),!1;this.elementGestureMap.has(r)||this.elementGestureMap.set(r,new Map);const s=this.elementGestureMap.get(r);s.has(t)&&(console.warn(`Element already has gesture "${t}" registered. It will be replaced.`),this.unregisterElement(t,r));const a=o.clone(n);return a.init(r,this.pointerManager,this.activeGesturesRegistry,this.keyboardManager),s.set(t,a),!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 oo extends mh{constructor(t){super(t),this.unregisterHandler=null,this.originalTarget=null,this.optionsType=void 0,this.mutableOptionsType=void 0,this.minPointers=void 0,this.maxPointers=void 0,this.minPointers=t.minPointers??1,this.maxPointers=t.maxPointers??1/0}init(t,r,n,o){super.init(t,r,n,o),this.unregisterHandler=this.pointerManager.registerGestureHandler((s,a)=>this.handlePointerEvent(s,a))}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 Xy(e,t){const r=t.x-e.x,n=t.y-e.y;return Math.sqrt(r*r+n*n)}function Ea(e){if(e.length<2)return 0;let t=0,r=0;for(let n=0;n<e.length;n+=1)for(let o=n+1;o<e.length;o+=1)t+=Xy({x:e[n].clientX,y:e[n].clientY},{x:e[o].clientX,y:e[o].clientY}),r+=1;return r>0?t/r:0}function Yt(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 gn(e,t){return`${e}${t==="ongoing"?"":t.charAt(0).toUpperCase()+t.slice(1)}`}const Io=1e-5,nr=1e-5,Rc=.15;function Zy(e,t){const r=t.x-e.x,n=t.y-e.y,o={vertical:null,horizontal:null,mainAxis:null},s=eb(t,e),a=Math.abs(r)>Math.abs(n)?"horizontal":"vertical",i=s||a==="horizontal"?Io:Rc,l=s?Io:a==="horizontal"?Rc:Io;return Math.abs(r)>i&&(o.horizontal=r>0?"right":"left"),Math.abs(n)>l&&(o.vertical=n>0?"down":"up"),o.mainAxis=s?"diagonal":a,o}function eb(e,t){const r=t.x-e.x,n=t.y-e.y,o=Math.atan2(n,r)*180/Math.PI;return o>=-45+nr&&o<=-22.5+nr||o>=22.5+nr&&o<=45+nr||o>=135+nr&&o<=157.5+nr||o>=-157.5+nr&&o<=-135+nr}function tb(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 rb=0,nb=e=>e>rb?1:e<-0?-1:0;class qi extends oo{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 qi(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}init(t,r,n,o){super.init(t,r,n,o),this.element.addEventListener("pointerenter",this.handleElementEnterBound),this.element.addEventListener("pointerleave",this.handleElementLeaveBound)}destroy(){this.element.removeEventListener("pointerenter",this.handleElementEnterBound),this.element.removeEventListener("pointerleave",this.handleElementLeaveBound),this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t)}resetState(){this.isActive=!1,this.state={lastPosition:null}}handleElementEnter(t){if(t.pointerType!=="mouse"&&t.pointerType!=="pen")return;const r=this.pointerManager.getPointers()||new Map,n=Array.from(r.values());if(n.length>=this.minPointers&&n.length<=this.maxPointers){this.isActive=!0;const o={x:t.clientX,y:t.clientY};this.state.lastPosition=o,this.emitMoveEvent(this.element,"start",n,t),this.emitMoveEvent(this.element,"ongoing",n,t)}}handleElementLeave(t){if(t.pointerType!=="mouse"&&t.pointerType!=="pen"||!this.isActive)return;const r=this.pointerManager.getPointers()||new Map,n=Array.from(r.values());this.emitMoveEvent(this.element,"end",n,t),this.resetState()}handlePointerEvent(t,r){if(r.type!=="pointermove"||r.pointerType!=="mouse"&&r.pointerType!=="pen")return;this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation();const n=Array.from(t.values()),o=this.getTargetElement(r);if(!o||n.length<this.minPointers||n.length>this.maxPointers)return;if(this.shouldPreventGesture(o)){if(!this.isActive)return;this.resetState(),this.emitMoveEvent(o,"end",n,r);return}const s={x:r.clientX,y:r.clientY};this.state.lastPosition=s,this.isActive||(this.isActive=!0,this.emitMoveEvent(o,"start",n,r)),this.emitMoveEvent(o,"ongoing",n,r)}emitMoveEvent(t,r,n,o){const s=this.state.lastPosition||Yt(n),a=this.gesturesRegistry.getActiveGestures(t),i={gestureName:this.name,centroid:s,target:o.target,srcEvent:o,phase:r,pointers:n,timeStamp:o.timeStamp,activeGestures:a,customData:this.customData},l=gn(this.name,r),c=new CustomEvent(l,{bubbles:!0,cancelable:!0,detail:i});t.dispatchEvent(c)}}class Wi extends oo{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 Wi(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,direction:[...this.direction],requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t),this.direction=t.direction||this.direction}resetState(){this.isActive=!1,this.state=K({},this.state,{startPointers:new Map,startCentroid:null,lastCentroid:null,lastDeltas:null,activeDeltaX:0,activeDeltaY:0,movementThresholdReached:!1,lastDirection:{vertical:null,horizontal:null,mainAxis:null}})}handlePointerEvent(t,r){const n=Array.from(t.values());if(r.type==="forceCancel"){this.cancel(r.target,n,r);return}const o=this.getTargetElement(r);if(!o)return;if(this.shouldPreventGesture(o)){this.cancel(o,n,r);return}const s=this.getRelevantPointers(n,o);if(s.length<this.minPointers||s.length>this.maxPointers){this.cancel(o,s,r);return}switch(r.type){case"pointerdown":!this.isActive&&!this.state.startCentroid&&(s.forEach(a=>{this.state.startPointers.set(a.pointerId,a)}),this.originalTarget=o,this.state.startCentroid=Yt(s),this.state.lastCentroid=K({},this.state.startCentroid));break;case"pointermove":if(this.state.startCentroid&&s.length>=this.minPointers){const a=Yt(s),i=a.x-this.state.startCentroid.x,l=a.y-this.state.startCentroid.y,c=Math.sqrt(i*i+l*l),u=Zy(this.state.lastCentroid??this.state.startCentroid,a),d=this.state.lastCentroid?a.x-this.state.lastCentroid.x:0,h=this.state.lastCentroid?a.y-this.state.lastCentroid.y:0;!this.state.movementThresholdReached&&c>=this.threshold&&tb(u,this.direction)?(this.state.movementThresholdReached=!0,this.isActive=!0,this.state.lastDeltas={x:d,y:h},this.state.totalDeltaX+=d,this.state.totalDeltaY+=h,this.state.activeDeltaX+=d,this.state.activeDeltaY+=h,this.emitPanEvent(o,"start",s,r,a),this.emitPanEvent(o,"ongoing",s,r,a)):this.state.movementThresholdReached&&this.isActive&&(this.state.lastDeltas={x:d,y:h},this.state.totalDeltaX+=d,this.state.totalDeltaY+=h,this.state.activeDeltaX+=d,this.state.activeDeltaY+=h,this.emitPanEvent(o,"ongoing",s,r,a)),this.state.lastCentroid=a,this.state.lastDirection=u}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive&&this.state.movementThresholdReached){if(s.filter(a=>a.type!=="pointerup"&&a.type!=="pointercancel").length<this.minPointers){const a=this.state.lastCentroid||this.state.startCentroid;r.type==="pointercancel"&&this.emitPanEvent(o,"cancel",s,r,a),this.emitPanEvent(o,"end",s,r,a),this.resetState()}}else this.resetState();break}}emitPanEvent(t,r,n,o,s){var S,P;if(!this.state.startCentroid)return;const a=((S=this.state.lastDeltas)==null?void 0:S.x)??0,i=((P=this.state.lastDeltas)==null?void 0:P.y)??0,l=this.state.startPointers.values().next().value,c=l?(o.timeStamp-l.timeStamp)/1e3:0,u=c>0?a/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:s,target:o.target,srcEvent:o,phase:r,pointers:n,timeStamp:o.timeStamp,deltaX:a,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=gn(this.name,r),b=new CustomEvent(m,{bubbles:!0,cancelable:!0,detail:f});t.dispatchEvent(b),this.preventDefault&&o.preventDefault(),this.stopPropagation&&o.stopPropagation()}cancel(t,r,n){if(this.isActive){const o=t??this.element;this.emitPanEvent(o,"cancel",r,n,this.state.lastCentroid),this.emitPanEvent(o,"end",r,n,this.state.lastCentroid)}this.resetState()}}class Ji extends oo{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 Ji(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t)}resetState(){this.isActive=!1,this.state=K({},this.state,{startDistance:0,lastDistance:0,lastScale:1,lastTime:0,velocity:0,deltaScale:0})}handlePointerEvent(t,r){const n=Array.from(t.values()),o=this.getTargetElement(r);if(!o)return;if(this.shouldPreventGesture(o)){this.isActive&&(this.emitPinchEvent(o,"cancel",n,r),this.resetState());return}const s=this.getRelevantPointers(n,o);switch(r.type){case"pointerdown":if(s.length>=2&&!this.isActive){const a=Ea(s);this.state.startDistance=a,this.state.lastDistance=a,this.state.lastTime=r.timeStamp,this.originalTarget=o}break;case"pointermove":if(this.state.startDistance&&s.length>=this.minPointers){const a=Ea(s),i=Math.abs(a-this.state.lastDistance);if(i!==0&&i>=this.threshold){const l=this.state.startDistance?a/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=(a-this.state.lastDistance)/u;this.state.velocity=Number.isNaN(h)?0:h}this.state.lastDistance=a,this.state.deltaScale=l-this.state.lastScale,this.state.lastScale=l,this.state.lastTime=r.timeStamp,this.isActive?this.emitPinchEvent(o,"ongoing",s,r):(this.isActive=!0,this.emitPinchEvent(o,"start",s,r),this.emitPinchEvent(o,"ongoing",s,r))}}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive){const a=s.filter(i=>i.type!=="pointerup"&&i.type!=="pointercancel");if(a.length<this.minPointers)r.type==="pointercancel"&&this.emitPinchEvent(o,"cancel",s,r),this.emitPinchEvent(o,"end",s,r),this.resetState();else if(a.length>=2){const i=Ea(a);this.state.startDistance=i/this.state.lastScale}}break}}emitPinchEvent(t,r,n,o){const s=Yt(n),a=this.state.lastDistance,i=this.state.lastScale,l=this.gesturesRegistry.getActiveGestures(t),c={gestureName:this.name,centroid:s,target:o.target,srcEvent:o,phase:r,pointers:n,timeStamp:o.timeStamp,scale:i,deltaScale:this.state.deltaScale,totalScale:this.state.totalScale,distance:a,velocity:this.state.velocity,activeGestures:l,direction:nb(this.state.velocity),customData:this.customData};this.preventDefault&&o.preventDefault(),this.stopPropagation&&o.stopPropagation();const u=gn(this.name,r),d=new CustomEvent(u,{bubbles:!0,cancelable:!0,detail:c});t.dispatchEvent(d)}}class Yi extends oo{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 Yi(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,duration:this.duration,maxDistance:this.maxDistance,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.clearPressTimer(),this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t),this.duration=t.duration??this.duration,this.maxDistance=t.maxDistance??this.maxDistance}resetState(){this.clearPressTimer(),this.isActive=!1,this.state=K({},this.state,{startCentroid:null,lastPosition:null,timerId:null,startTime:0,pressThresholdReached:!1})}clearPressTimer(){this.state.timerId!==null&&(clearTimeout(this.state.timerId),this.state.timerId=null)}handlePointerEvent(t,r){const n=Array.from(t.values());if(r.type==="forceCancel"){this.cancelPress(r.target,n,r);return}const o=this.getTargetElement(r);if(!o)return;if(this.shouldPreventGesture(o)){this.isActive&&this.cancelPress(o,n,r);return}const s=this.getRelevantPointers(n,o);if(s.length<this.minPointers||s.length>this.maxPointers){this.isActive&&this.cancelPress(o,s,r);return}switch(r.type){case"pointerdown":!this.isActive&&!this.state.startCentroid&&(this.state.startCentroid=Yt(s),this.state.lastPosition=K({},this.state.startCentroid),this.state.startTime=r.timeStamp,this.isActive=!0,this.originalTarget=o,this.clearPressTimer(),this.state.timerId=setTimeout(()=>{if(this.isActive&&this.state.startCentroid){this.state.pressThresholdReached=!0;const a=this.state.lastPosition;this.emitPressEvent(o,"start",s,r,a),this.emitPressEvent(o,"ongoing",s,r,a)}},this.duration));break;case"pointermove":if(this.isActive&&this.state.startCentroid){const a=Yt(s);this.state.lastPosition=a;const i=a.x-this.state.startCentroid.x,l=a.y-this.state.startCentroid.y;Math.sqrt(i*i+l*l)>this.maxDistance&&this.cancelPress(o,s,r)}break;case"pointerup":if(this.isActive){if(this.state.pressThresholdReached){const a=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(o,"end",s,r,a)}this.resetState()}break;case"pointercancel":case"forceCancel":this.cancelPress(o,s,r);break}}emitPressEvent(t,r,n,o,s){const a=this.gesturesRegistry.getActiveGestures(t),i=o.timeStamp-this.state.startTime,l={gestureName:this.name,centroid:s,target:o.target,srcEvent:o,phase:r,pointers:n,timeStamp:o.timeStamp,x:s.x,y:s.y,duration:i,activeGestures:a,customData:this.customData},c=gn(this.name,r),u=new CustomEvent(c,{bubbles:!0,cancelable:!0,detail:l});t.dispatchEvent(u),this.preventDefault&&o.preventDefault(),this.stopPropagation&&o.stopPropagation()}cancelPress(t,r,n){if(this.isActive&&this.state.pressThresholdReached){const o=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(t??this.element,"cancel",r,n,o),this.emitPressEvent(t??this.element,"end",r,n,o)}this.resetState()}}class Ki extends oo{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 Ki(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,maxDistance:this.maxDistance,taps:this.taps,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t),this.maxDistance=t.maxDistance??this.maxDistance,this.taps=t.taps??this.taps}resetState(){this.isActive=!1,this.state={startCentroid:null,currentTapCount:0,lastTapTime:0,lastPosition:null}}handlePointerEvent(t,r){const n=Array.from(t.values()),o=this.getTargetElement(r);if(!o)return;const s=this.getRelevantPointers(n,o);if(this.shouldPreventGesture(o)||s.length<this.minPointers||s.length>this.maxPointers){this.isActive&&this.cancelTap(o,s,r);return}switch(r.type){case"pointerdown":this.isActive||(this.state.startCentroid=Yt(s),this.state.lastPosition=K({},this.state.startCentroid),this.isActive=!0,this.originalTarget=o);break;case"pointermove":if(this.isActive&&this.state.startCentroid){const a=Yt(s);this.state.lastPosition=a;const i=a.x-this.state.startCentroid.x,l=a.y-this.state.startCentroid.y;Math.sqrt(i*i+l*l)>this.maxDistance&&this.cancelTap(o,s,r)}break;case"pointerup":if(this.isActive){this.state.currentTapCount+=1;const a=this.state.lastPosition||this.state.startCentroid;if(!a){this.cancelTap(o,s,r);return}this.state.currentTapCount>=this.taps?(this.fireTapEvent(o,s,r,a),this.resetState()):(this.state.lastTapTime=r.timeStamp,this.isActive=!1,this.state.startCentroid=null,setTimeout(()=>{this.state&&this.state.currentTapCount>0&&this.state.currentTapCount<this.taps&&(this.state.currentTapCount=0)},300))}break;case"pointercancel":case"forceCancel":this.cancelTap(o,s,r);break}}fireTapEvent(t,r,n,o){const s=this.gesturesRegistry.getActiveGestures(t),a={gestureName:this.name,centroid:o,target:n.target,srcEvent:n,phase:"end",pointers:r,timeStamp:n.timeStamp,x:o.x,y:o.y,tapCount:this.state.currentTapCount,activeGestures:s,customData:this.customData},i=new CustomEvent(this.name,{bubbles:!0,cancelable:!0,detail:a});t.dispatchEvent(i),this.preventDefault&&n.preventDefault(),this.stopPropagation&&n.stopPropagation()}cancelTap(t,r,n){if(this.state.startCentroid||this.state.lastPosition){const o=this.state.lastPosition||this.state.startCentroid,s=this.gesturesRegistry.getActiveGestures(t),a={gestureName:this.name,centroid:o,target:n.target,srcEvent:n,phase:"cancel",pointers:r,timeStamp:n.timeStamp,x:o.x,y:o.y,tapCount:this.state.currentTapCount,activeGestures:s,customData:this.customData},i=gn(this.name,"cancel"),l=new CustomEvent(i,{bubbles:!0,cancelable:!0,detail:a});t.dispatchEvent(l)}this.resetState()}}class Qi extends mh{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 Qi(K({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,sensitivity:this.sensitivity,max:this.max,min:this.min,initialDelta:this.initialDelta,invert:this.invert,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}init(t,r,n,o){super.init(t,r,n,o),this.element.addEventListener("wheel",this.handleWheelEventBound)}destroy(){this.element.removeEventListener("wheel",this.handleWheelEventBound),this.resetState(),super.destroy()}resetState(){this.isActive=!1,this.state={totalDeltaX:0,totalDeltaY:0,totalDeltaZ:0}}updateOptions(t){super.updateOptions(t),this.sensitivity=t.sensitivity??this.sensitivity,this.max=t.max??this.max,this.min=t.min??this.min,this.initialDelta=t.initialDelta??this.initialDelta,this.invert=t.invert??this.invert}handleWheelEvent(t){if(this.shouldPreventGesture(this.element))return;const r=this.pointerManager.getPointers()||new Map,n=Array.from(r.values());this.state.totalDeltaX+=t.deltaX*this.sensitivity*(this.invert?-1:1),this.state.totalDeltaY+=t.deltaY*this.sensitivity*(this.invert?-1:1),this.state.totalDeltaZ+=t.deltaZ*this.sensitivity*(this.invert?-1:1),["totalDeltaX","totalDeltaY","totalDeltaZ"].forEach(o=>{this.state[o]<this.min&&(this.state[o]=this.min),this.state[o]>this.max&&(this.state[o]=this.max)}),this.emitWheelEvent(n,t)}emitWheelEvent(t,r){const n=t.length>0?Yt(t):{x:r.clientX,y:r.clientY},o=this.gesturesRegistry.getActiveGestures(this.element),s={gestureName:this.name,centroid:n,target:r.target,srcEvent:r,phase:"ongoing",pointers:t,timeStamp:r.timeStamp,deltaX:r.deltaX*this.sensitivity*(this.invert?-1:1),deltaY:r.deltaY*this.sensitivity*(this.invert?-1:1),deltaZ:r.deltaZ*this.sensitivity*(this.invert?-1:1),deltaMode:r.deltaMode,totalDeltaX:this.state.totalDeltaX,totalDeltaY:this.state.totalDeltaY,totalDeltaZ:this.state.totalDeltaZ,activeGestures:o,customData:this.customData};this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation();const a=gn(this.name,"ongoing"),i=new CustomEvent(a,{bubbles:!0,cancelable:!0,detail:s});this.element.dispatchEvent(i)}}const Gr=e=>e.preventDefault(),Xi=({svgRef:e})=>{_.useEffect(()=>{const r=e.current;if(!r)return;const n=new Qy({gestures:[new Wi({name:"pan",threshold:0,maxPointers:1}),new qi({name:"move",preventIf:["pan","pinch"]}),new Ji({name:"pinch",threshold:5,preventIf:["pan"]}),new Qi({name:"turnWheel",sensitivity:.01,initialDelta:1}),new Ki({name:"tap",maxDistance:10,preventIf:["pan","pinch"]}),new Yi({name:"quickPress",duration:50,maxDistance:10})]});return n.registerElement(["pan","move","pinch","turnWheel","tap","quickPress"],r),()=>{n.destroy()}},[e]);const t=_.useCallback((r,n,o)=>{const s=e.current;return s==null||s.addEventListener(r,n,o),{cleanup:()=>s==null?void 0:s.removeEventListener(r,n)}},[e]);return _.useEffect(()=>{const r=e.current;return r==null||r.addEventListener("gesturestart",Gr),r==null||r.addEventListener("gesturechange",Gr),r==null||r.addEventListener("gestureend",Gr),()=>{r==null||r.removeEventListener("gesturestart",Gr),r==null||r.removeEventListener("gesturechange",Gr),r==null||r.removeEventListener("gestureend",Gr)}},[e]),{instance:{addInteractionListener:t}}};Xi.params={};Xi.getInitialState=()=>({});const ob=[Hi,Gi,Us,Ls,Xi,Ds],sb=["apiRef"],ab=e=>{let{plugins:t}=e,r=ir(e.props,sb);const n={};t.forEach(a=>{Object.assign(n,a.params)});const o={};return Object.keys(r).forEach(a=>{const i=r[a];n[a]&&(o[a]=i)}),t.reduce((a,i)=>i.getDefaultizedParams?i.getDefaultizedParams({params:a}):a,o)};let Mc=0;function ib(e,t,r){const n=q0(),o=_.useMemo(()=>[...ob,...e],[e]),s=ab({plugins:o,props:t});s.id=s.id??n;const i=_.useRef({}).current,l=cb(t.apiRef),c=_.useRef(null),u=_.useRef(null),d=_.useRef(null);if(d.current==null){Mc+=1;const f={cacheKey:{id:Mc}};o.forEach(m=>{m.getInitialState&&Object.assign(f,m.getInitialState(s,f,r))}),d.current=new W0(f)}const h=f=>{const m=f({instance:i,params:s,plugins:o,store:d.current,svgRef:u,chartRootRef:c,seriesConfig:r});m.publicAPI&&Object.assign(l.current,m.publicAPI),m.instance&&Object.assign(i,m.instance)};return o.forEach(h),{contextValue:_.useMemo(()=>({store:d.current,publicAPI:l.current,instance:i,svgRef:u,chartRootRef:c}),[i,l])}}function lb(e){return e.current==null&&(e.current={}),e}function cb(e){const t=_.useRef({});return e?lb(e):t}const Zi=_.createContext(null);process.env.NODE_ENV!=="production"&&(Zi.displayName="ChartContext");const Vc=new Set;function Gn(e,t="warning"){if(process.env.NODE_ENV==="production")return;const r=Array.isArray(e)?e.join(`
|
|
116
|
+
`):e;Vc.has(r)||(Vc.add(r),t==="error"?console.error(r):console.warn(r))}function ub(e){const{componentName:t,propName:r,controlled:n,defaultValue:o,warningPrefix:s="MUI X"}=e,[{initialDefaultValue:a,isControlled:i}]=_.useState({initialDefaultValue:o,isControlled:n!==void 0});i!==(n!==void 0)&&Gn([`${s}: 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(a)!==JSON.stringify(o)&&Gn([`${s}: 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 gh=process.env.NODE_ENV==="production"?()=>{}:ub,yh=4,bh=20+2*yh,db=40+2*yh,hb="hover",Ao={minStart:0,maxEnd:100,step:5,minSpan:10,maxSpan:100,panning:!0,filterMode:"keep",slider:{enabled:!1,preview:!1,size:bh,showTooltip:hb}},el=(e,t,r)=>{var n;if(e)return e===!0?K({axisId:t,axisDirection:r},Ao):K({axisId:t,axisDirection:r},Ao,e,{slider:K({},Ao.slider,{size:((n=e.slider)==null?void 0:n.preview)??Ao.slider.preview?db:bh},e.slider)})};function xh(e,t){const r={top:0,bottom:0,none:0};return(e&&e.length>0?e:[{id:wy,scaleType:"linear"}]).map((s,a)=>{var p;const i=s.dataKey,l=a===0?"bottom":"none",c=s.position??l,u=Iy+(s.label?ih:0),d=s.id??`defaultized-x-axis-${a}`,h=K({offset:r[c]},s,{id:d,position:c,height:s.height??u,zoom:el(s.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||s.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 Sh(e,t){const r={right:0,left:0,none:0};return(e&&e.length>0?e:[{id:Oy,scaleType:"linear"}]).map((s,a)=>{var p;const i=s.dataKey,l=a===0?"left":"none",c=s.position??l,u=Ey+(s.label?ih:0),d=s.id??`defaultized-y-axis-${a}`,h=K({offset:r[c]},s,{id:d,position:c,width:s.width??u,zoom:el(s.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||s.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 Go(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function pb(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tl(e){let t,r,n;e.length!==2?(t=Go,r=(i,l)=>Go(e(i),l),n=(i,l)=>e(i)-l):(t=e===Go||e===pb?e:fb,r=e,n=e);function o(i,l,c=0,u=i.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;r(i[d],l)<0?c=d+1:u=d}while(c<u)}return c}function s(i,l,c=0,u=i.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;r(i[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function a(i,l,c=0,u=i.length){const d=o(i,l,c,u-1);return d>c&&n(i[d-1],l)>-n(i[d],l)?d-1:d}return{left:o,center:a,right:s}}function fb(){return 0}function mb(e){return e===null?NaN:+e}const gb=tl(Go),vh=gb.right;tl(mb).center;class _c extends Map{constructor(t,r=xb){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,o]of t)this.set(n,o)}get(t){return super.get(kc(this,t))}has(t){return super.has(kc(this,t))}set(t,r){return super.set(yb(this,t),r)}delete(t){return super.delete(bb(this,t))}}function kc({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function yb({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function bb({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function xb(e){return e!==null&&typeof e=="object"?e.valueOf():e}const Sb=Math.sqrt(50),vb=Math.sqrt(10),Cb=Math.sqrt(2);function os(e,t,r){const n=(t-e)/Math.max(0,r),o=Math.floor(Math.log10(n)),s=n/Math.pow(10,o),a=s>=Sb?10:s>=vb?5:s>=Cb?2:1;let i,l,c;return o<0?(c=Math.pow(10,-o)/a,i=Math.round(e*c),l=Math.round(t*c),i/c<e&&++i,l/c>t&&--l,c=-c):(c=Math.pow(10,o)*a,i=Math.round(e/c),l=Math.round(t/c),i*c<e&&++i,l*c>t&&--l),l<i&&.5<=r&&r<2?os(e,t,r*2):[i,l,c]}function ai(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[o,s,a]=n?os(t,e,r):os(e,t,r);if(!(s>=o))return[];const i=s-o+1,l=new Array(i);if(n)if(a<0)for(let c=0;c<i;++c)l[c]=(s-c)/-a;else for(let c=0;c<i;++c)l[c]=(s-c)*a;else if(a<0)for(let c=0;c<i;++c)l[c]=(o+c)/-a;else for(let c=0;c<i;++c)l[c]=(o+c)*a;return l}function ii(e,t,r){return t=+t,e=+e,r=+r,os(e,t,r)[2]}function li(e,t,r){t=+t,e=+e,r=+r;const n=t<e,o=n?ii(t,e,r):ii(e,t,r);return(n?-1:1)*(o<0?1/-o:o)}function wb(e,t,r){e=+e,t=+t,r=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+r;for(var n=-1,o=Math.max(0,Math.ceil((t-e)/r))|0,s=new Array(o);++n<o;)s[n]=e+n*r;return s}function hr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Ob(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 jc=Symbol("implicit");function ss(){var e=new _c,t=[],r=[],n=jc;function o(s){let a=e.get(s);if(a===void 0){if(n!==jc)return n;e.set(s,a=t.push(s)-1)}return r[a%r.length]}return o.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new _c;for(const a of s)e.has(a)||e.set(a,t.push(a)-1);return o},o.range=function(s){return arguments.length?(r=Array.from(s),o):r.slice()},o.unknown=function(s){return arguments.length?(n=s,o):n},o.copy=function(){return ss(t,r).unknown(n)},hr.apply(o,arguments),o}function rl(){var e=ss().unknown(void 0),t=e.domain,r=e.range,n=0,o=1,s,a,i=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var h=t().length,p=o<n,f=p?o:n,m=p?n:o;s=(m-f)/Math.max(1,h-l+c*2),i&&(s=Math.floor(s)),f+=(m-f-s*(h-l))*u,a=s*(1-l),i&&(f=Math.round(f),a=Math.round(a));var b=wb(h).map(function(S){return f+s*S});return r(p?b.reverse():b)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([n,o]=h,n=+n,o=+o,d()):[n,o]},e.rangeRound=function(h){return[n,o]=h,n=+n,o=+o,i=!0,d()},e.bandwidth=function(){return a},e.step=function(){return s},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 rl(t(),[n,o]).round(i).paddingInner(l).paddingOuter(c).align(u)},hr.apply(d(),arguments)}function Ch(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Ch(t())},e}function Tb(){return Ch(rl.apply(null,arguments).paddingInner(1))}function nl(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function wh(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function so(){}var Hn=.7,as=1/Hn,Zr="\\s*([+-]?\\d+)\\s*",qn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Dt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Eb=/^#([0-9a-f]{3,8})$/,Ib=new RegExp(`^rgb\\(${Zr},${Zr},${Zr}\\)$`),Ab=new RegExp(`^rgb\\(${Dt},${Dt},${Dt}\\)$`),Pb=new RegExp(`^rgba\\(${Zr},${Zr},${Zr},${qn}\\)$`),Rb=new RegExp(`^rgba\\(${Dt},${Dt},${Dt},${qn}\\)$`),Mb=new RegExp(`^hsl\\(${qn},${Dt},${Dt}\\)$`),Vb=new RegExp(`^hsla\\(${qn},${Dt},${Dt},${qn}\\)$`),Dc={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};nl(so,Wn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Uc,formatHex:Uc,formatHex8:_b,formatHsl:kb,formatRgb:Lc,toString:Lc});function Uc(){return this.rgb().formatHex()}function _b(){return this.rgb().formatHex8()}function kb(){return Oh(this).formatHsl()}function Lc(){return this.rgb().formatRgb()}function Wn(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Eb.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Bc(t):r===3?new it(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Po(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Po(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=Ib.exec(e))?new it(t[1],t[2],t[3],1):(t=Ab.exec(e))?new it(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Pb.exec(e))?Po(t[1],t[2],t[3],t[4]):(t=Rb.exec(e))?Po(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Mb.exec(e))?Nc(t[1],t[2]/100,t[3]/100,1):(t=Vb.exec(e))?Nc(t[1],t[2]/100,t[3]/100,t[4]):Dc.hasOwnProperty(e)?Bc(Dc[e]):e==="transparent"?new it(NaN,NaN,NaN,0):null}function Bc(e){return new it(e>>16&255,e>>8&255,e&255,1)}function Po(e,t,r,n){return n<=0&&(e=t=r=NaN),new it(e,t,r,n)}function jb(e){return e instanceof so||(e=Wn(e)),e?(e=e.rgb(),new it(e.r,e.g,e.b,e.opacity)):new it}function ci(e,t,r,n){return arguments.length===1?jb(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}nl(it,ci,wh(so,{brighter(e){return e=e==null?as:Math.pow(as,e),new it(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Hn:Math.pow(Hn,e),new it(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new it(vr(this.r),vr(this.g),vr(this.b),is(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:Fc,formatHex:Fc,formatHex8:Db,formatRgb:$c,toString:$c}));function Fc(){return`#${br(this.r)}${br(this.g)}${br(this.b)}`}function Db(){return`#${br(this.r)}${br(this.g)}${br(this.b)}${br((isNaN(this.opacity)?1:this.opacity)*255)}`}function $c(){const e=is(this.opacity);return`${e===1?"rgb(":"rgba("}${vr(this.r)}, ${vr(this.g)}, ${vr(this.b)}${e===1?")":`, ${e})`}`}function is(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function vr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function br(e){return e=vr(e),(e<16?"0":"")+e.toString(16)}function Nc(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 Oh(e){if(e instanceof Ot)return new Ot(e.h,e.s,e.l,e.opacity);if(e instanceof so||(e=Wn(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,o=Math.min(t,r,n),s=Math.max(t,r,n),a=NaN,i=s-o,l=(s+o)/2;return i?(t===s?a=(r-n)/i+(r<n)*6:r===s?a=(n-t)/i+2:a=(t-r)/i+4,i/=l<.5?s+o:2-s-o,a*=60):i=l>0&&l<1?0:a,new Ot(a,i,l,e.opacity)}function Ub(e,t,r,n){return arguments.length===1?Oh(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}nl(Ot,Ub,wh(so,{brighter(e){return e=e==null?as:Math.pow(as,e),new Ot(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Hn:Math.pow(Hn,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,o=2*r-n;return new it(Ia(e>=240?e-240:e+120,o,n),Ia(e,o,n),Ia(e<120?e+240:e-120,o,n),this.opacity)},clamp(){return new Ot(zc(this.h),Ro(this.s),Ro(this.l),is(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=is(this.opacity);return`${e===1?"hsl(":"hsla("}${zc(this.h)}, ${Ro(this.s)*100}%, ${Ro(this.l)*100}%${e===1?")":`, ${e})`}`}}));function zc(e){return e=(e||0)%360,e<0?e+360:e}function Ro(e){return Math.max(0,Math.min(1,e||0))}function Ia(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 ol=e=>()=>e;function Lb(e,t){return function(r){return e+r*t}}function Bb(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 Fb(e){return(e=+e)==1?Th:function(t,r){return r-t?Bb(t,r,e):ol(isNaN(t)?r:t)}}function Th(e,t){var r=t-e;return r?Lb(e,r):ol(isNaN(e)?t:e)}const Gc=function e(t){var r=Fb(t);function n(o,s){var a=r((o=ci(o)).r,(s=ci(s)).r),i=r(o.g,s.g),l=r(o.b,s.b),c=Th(o.opacity,s.opacity);return function(u){return o.r=a(u),o.g=i(u),o.b=l(u),o.opacity=c(u),o+""}}return n.gamma=e,n}(1);function $b(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),o;return function(s){for(o=0;o<r;++o)n[o]=e[o]*(1-s)+t[o]*s;return n}}function Nb(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function zb(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,o=new Array(n),s=new Array(r),a;for(a=0;a<n;++a)o[a]=Fs(e[a],t[a]);for(;a<r;++a)s[a]=t[a];return function(i){for(a=0;a<n;++a)s[a]=o[a](i);return s}}function sl(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Tt(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function Gb(e,t){var r={},n={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?r[o]=Fs(e[o],t[o]):n[o]=t[o];return function(s){for(o in r)n[o]=r[o](s);return n}}var ui=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Aa=new RegExp(ui.source,"g");function Hb(e){return function(){return e}}function qb(e){return function(t){return e(t)+""}}function Wb(e,t){var r=ui.lastIndex=Aa.lastIndex=0,n,o,s,a=-1,i=[],l=[];for(e=e+"",t=t+"";(n=ui.exec(e))&&(o=Aa.exec(t));)(s=o.index)>r&&(s=t.slice(r,s),i[a]?i[a]+=s:i[++a]=s),(n=n[0])===(o=o[0])?i[a]?i[a]+=o:i[++a]=o:(i[++a]=null,l.push({i:a,x:Tt(n,o)})),r=Aa.lastIndex;return r<t.length&&(s=t.slice(r),i[a]?i[a]+=s:i[++a]=s),i.length<2?l[0]?qb(l[0].x):Hb(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 Fs(e,t){var r=typeof t,n;return t==null||r==="boolean"?ol(t):(r==="number"?Tt:r==="string"?(n=Wn(t))?(t=n,Gc):Wb:t instanceof Wn?Gc:t instanceof Date?sl:Nb(t)?$b:Array.isArray(t)?zb:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Gb:Tt)(e,t)}function Eh(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function Jb(e){return function(){return e}}function Yb(e){return+e}var Hc=[0,1];function bt(e){return e}function di(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:Jb(isNaN(t)?NaN:.5)}function Kb(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function Qb(e,t,r){var n=e[0],o=e[1],s=t[0],a=t[1];return o<n?(n=di(o,n),s=r(a,s)):(n=di(n,o),s=r(s,a)),function(i){return s(n(i))}}function Xb(e,t,r){var n=Math.min(e.length,t.length)-1,o=new Array(n),s=new Array(n),a=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<n;)o[a]=di(e[a],e[a+1]),s[a]=r(t[a],t[a+1]);return function(i){var l=vh(e,i,1,n)-1;return s[l](o[l](i))}}function $s(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function al(){var e=Hc,t=Hc,r=Fs,n,o,s,a=bt,i,l,c;function u(){var h=Math.min(e.length,t.length);return a!==bt&&(a=Kb(e[0],e[h-1])),i=h>2?Xb:Qb,l=c=null,d}function d(h){return h==null||isNaN(h=+h)?s:(l||(l=i(e.map(n),t,r)))(n(a(h)))}return d.invert=function(h){return a(o((c||(c=i(t,e.map(n),Tt)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,Yb),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=Eh,u()},d.clamp=function(h){return arguments.length?(a=h?!0:bt,u()):a!==bt},d.interpolate=function(h){return arguments.length?(r=h,u()):r},d.unknown=function(h){return arguments.length?(s=h,d):s},function(h,p){return n=h,o=p,u()}}function Ih(){return al()(bt,bt)}function Zb(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function ls(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 on(e){return e=ls(Math.abs(e)),e?e[1]:NaN}function ex(e,t){return function(r,n){for(var o=r.length,s=[],a=0,i=e[0],l=0;o>0&&i>0&&(l+i+1>n&&(i=Math.max(1,n-l)),s.push(r.substring(o-=i,o+i)),!((l+=i+1)>n));)i=e[a=(a+1)%e.length];return s.reverse().join(t)}}function tx(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var rx=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Jn(e){if(!(t=rx.exec(e)))throw new Error("invalid format: "+e);var t;return new il({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]})}Jn.prototype=il.prototype;function il(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+""}il.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 nx(e){e:for(var t=e.length,r=1,n=-1,o;r<t;++r)switch(e[r]){case".":n=o=r;break;case"0":n===0&&(n=r),o=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(o+1):e}var Ah;function ox(e,t){var r=ls(e,t);if(!r)return e+"";var n=r[0],o=r[1],s=o-(Ah=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=n.length;return s===a?n:s>a?n+new Array(s-a+1).join("0"):s>0?n.slice(0,s)+"."+n.slice(s):"0."+new Array(1-s).join("0")+ls(e,Math.max(0,t+s-1))[0]}function qc(e,t){var r=ls(e,t);if(!r)return e+"";var n=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+n:n.length>o+1?n.slice(0,o+1)+"."+n.slice(o+1):n+new Array(o-n.length+2).join("0")}const Wc={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Zb,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)=>qc(e*100,t),r:qc,s:ox,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Jc(e){return e}var Yc=Array.prototype.map,Kc=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function sx(e){var t=e.grouping===void 0||e.thousands===void 0?Jc:ex(Yc.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?Jc:tx(Yc.call(e.numerals,String)),a=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=Jn(d);var h=d.fill,p=d.align,f=d.sign,m=d.symbol,b=d.zero,S=d.width,P=d.comma,v=d.precision,O=d.trim,I=d.type;I==="n"?(P=!0,I="g"):Wc[I]||(v===void 0&&(v=12),O=!0,I="g"),(b||h==="0"&&p==="=")&&(b=!0,h="0",p="=");var T=m==="$"?r:m==="#"&&/[boxX]/.test(I)?"0"+I.toLowerCase():"",w=m==="$"?n:/[%p]/.test(I)?a:"",R=Wc[I],k=/[defgprs%]/.test(I);v=v===void 0?6:/[gprs]/.test(I)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function y(A){var V=T,M=w,j,ne,Q;if(I==="c")M=R(A)+M,A="";else{A=+A;var oe=A<0||1/A<0;if(A=isNaN(A)?l:R(Math.abs(A),v),O&&(A=nx(A)),oe&&+A==0&&f!=="+"&&(oe=!1),V=(oe?f==="("?f:i:f==="-"||f==="("?"":f)+V,M=(I==="s"?Kc[8+Ah/3]:"")+M+(oe&&f==="("?")":""),k){for(j=-1,ne=A.length;++j<ne;)if(Q=A.charCodeAt(j),48>Q||Q>57){M=(Q===46?o+A.slice(j+1):A.slice(j))+M,A=A.slice(0,j);break}}}P&&!b&&(A=t(A,1/0));var X=V.length+A.length+M.length,se=X<S?new Array(S-X+1).join(h):"";switch(P&&b&&(A=t(se+A,se.length?S-M.length:1/0),se=""),p){case"<":A=V+A+M+se;break;case"=":A=V+se+A+M;break;case"^":A=se.slice(0,X=se.length>>1)+V+A+M+se.slice(X);break;default:A=se+V+A+M;break}return s(A)}return y.toString=function(){return d+""},y}function u(d,h){var p=c((d=Jn(d),d.type="f",d)),f=Math.max(-8,Math.min(8,Math.floor(on(h)/3)))*3,m=Math.pow(10,-f),b=Kc[8+f/3];return function(S){return p(m*S)+b}}return{format:c,formatPrefix:u}}var Mo,ll,Ph;ax({thousands:",",grouping:[3],currency:["$",""]});function ax(e){return Mo=sx(e),ll=Mo.format,Ph=Mo.formatPrefix,Mo}function ix(e){return Math.max(0,-on(Math.abs(e)))}function lx(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(on(t)/3)))*3-on(Math.abs(e)))}function cx(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,on(t)-on(e))+1}function ux(e,t,r,n){var o=li(e,t,r),s;switch(n=Jn(n??",f"),n.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(s=lx(o,a))&&(n.precision=s),Ph(n,a)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(s=cx(o,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=s-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(s=ix(o))&&(n.precision=s-(n.type==="%")*2);break}}return ll(n)}function cl(e){var t=e.domain;return e.ticks=function(r){var n=t();return ai(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var o=t();return ux(o[0],o[o.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),o=0,s=n.length-1,a=n[o],i=n[s],l,c,u=10;for(i<a&&(c=a,a=i,i=c,c=o,o=s,s=c);u-- >0;){if(c=ii(a,i,r),c===l)return n[o]=a,n[s]=i,t(n);if(c>0)a=Math.floor(a/c)*c,i=Math.ceil(i/c)*c;else if(c<0)a=Math.ceil(a*c)/c,i=Math.floor(i*c)/c;else break;l=c}return e},e}function Rh(){var e=Ih();return e.copy=function(){return $s(e,Rh())},hr.apply(e,arguments),cl(e)}function Mh(e,t){e=e.slice();var r=0,n=e.length-1,o=e[r],s=e[n],a;return s<o&&(a=r,r=n,n=a,a=o,o=s,s=a),e[r]=t.floor(o),e[n]=t.ceil(s),e}function Qc(e){return Math.log(e)}function Xc(e){return Math.exp(e)}function dx(e){return-Math.log(-e)}function hx(e){return-Math.exp(-e)}function px(e){return isFinite(e)?+("1e"+e):e<0?0:e}function fx(e){return e===10?px:e===Math.E?Math.exp:t=>Math.pow(e,t)}function mx(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 Zc(e){return(t,r)=>-e(-t,r)}function gx(e){const t=e(Qc,Xc),r=t.domain;let n=10,o,s;function a(){return o=mx(n),s=fx(n),r()[0]<0?(o=Zc(o),s=Zc(s),e(dx,hx)):e(Qc,Xc),t}return t.base=function(i){return arguments.length?(n=+i,a()):n},t.domain=function(i){return arguments.length?(r(i),a()):r()},t.ticks=i=>{const l=r();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let h=o(c),p=o(u),f,m;const b=i==null?10:+i;let S=[];if(!(n%1)&&p-h<b){if(h=Math.floor(h),p=Math.ceil(p),c>0){for(;h<=p;++h)for(f=1;f<n;++f)if(m=h<0?f/s(-h):f*s(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/s(-h):f*s(h),!(m<c)){if(m>u)break;S.push(m)}S.length*2<b&&(S=ai(c,u,b))}else S=ai(h,p,Math.min(p-h,b)).map(s);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=Jn(l)).precision==null&&(l.trim=!0),l=ll(l)),i===1/0)return l;const c=Math.max(1,n*i/t.ticks().length);return u=>{let d=u/s(Math.round(o(u)));return d*n<n-.5&&(d*=n),d<=c?l(u):""}},t.nice=()=>r(Mh(r(),{floor:i=>s(Math.floor(o(i))),ceil:i=>s(Math.ceil(o(i)))})),t}function Vh(){const e=gx(al()).domain([1,10]);return e.copy=()=>$s(e,Vh()).base(e.base()),hr.apply(e,arguments),e}function eu(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function yx(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function bx(e){return e<0?-e*e:e*e}function xx(e){var t=e(bt,bt),r=1;function n(){return r===1?e(bt,bt):r===.5?e(yx,bx):e(eu(r),eu(1/r))}return t.exponent=function(o){return arguments.length?(r=+o,n()):r},cl(t)}function ul(){var e=xx(al());return e.copy=function(){return $s(e,ul()).exponent(e.exponent())},hr.apply(e,arguments),e}function Sx(){return ul.apply(null,arguments).exponent(.5)}function _h(){var e=[.5],t=[0,1],r,n=1;function o(s){return s!=null&&s<=s?t[vh(e,s,0,n)]:r}return o.domain=function(s){return arguments.length?(e=Array.from(s),n=Math.min(e.length,t.length-1),o):e.slice()},o.range=function(s){return arguments.length?(t=Array.from(s),n=Math.min(e.length,t.length-1),o):t.slice()},o.invertExtent=function(s){var a=t.indexOf(s);return[e[a-1],e[a]]},o.unknown=function(s){return arguments.length?(r=s,o):r},o.copy=function(){return _h().domain(e).range(t).unknown(r)},hr.apply(o,arguments)}const Pa=new Date,Ra=new Date;function Fe(e,t,r,n){function o(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return o.floor=s=>(e(s=new Date(+s)),s),o.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),o.round=s=>{const a=o(s),i=o.ceil(s);return s-a<i-s?a:i},o.offset=(s,a)=>(t(s=new Date(+s),a==null?1:Math.floor(a)),s),o.range=(s,a,i)=>{const l=[];if(s=o.ceil(s),i=i==null?1:Math.floor(i),!(s<a)||!(i>0))return l;let c;do l.push(c=new Date(+s)),t(s,i),e(s);while(c<s&&s<a);return l},o.filter=s=>Fe(a=>{if(a>=a)for(;e(a),!s(a);)a.setTime(a-1)},(a,i)=>{if(a>=a)if(i<0)for(;++i<=0;)for(;t(a,-1),!s(a););else for(;--i>=0;)for(;t(a,1),!s(a););}),r&&(o.count=(s,a)=>(Pa.setTime(+s),Ra.setTime(+a),e(Pa),e(Ra),Math.floor(r(Pa,Ra))),o.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?o.filter(n?a=>n(a)%s===0:a=>o.count(0,a)%s===0):o)),o}const cs=Fe(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);cs.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Fe(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):cs);cs.range;const Ht=1e3,xt=Ht*60,qt=xt*60,Kt=qt*24,dl=Kt*7,tu=Kt*30,Ma=Kt*365,xr=Fe(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ht)},(e,t)=>(t-e)/Ht,e=>e.getUTCSeconds());xr.range;const hl=Fe(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ht)},(e,t)=>{e.setTime(+e+t*xt)},(e,t)=>(t-e)/xt,e=>e.getMinutes());hl.range;const pl=Fe(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*xt)},(e,t)=>(t-e)/xt,e=>e.getUTCMinutes());pl.range;const fl=Fe(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ht-e.getMinutes()*xt)},(e,t)=>{e.setTime(+e+t*qt)},(e,t)=>(t-e)/qt,e=>e.getHours());fl.range;const ml=Fe(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*qt)},(e,t)=>(t-e)/qt,e=>e.getUTCHours());ml.range;const ao=Fe(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*xt)/Kt,e=>e.getDate()-1);ao.range;const Ns=Fe(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Kt,e=>e.getUTCDate()-1);Ns.range;const kh=Fe(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Kt,e=>Math.floor(e/Kt));kh.range;function Pr(e){return Fe(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())*xt)/dl)}const zs=Pr(0),us=Pr(1),vx=Pr(2),Cx=Pr(3),sn=Pr(4),wx=Pr(5),Ox=Pr(6);zs.range;us.range;vx.range;Cx.range;sn.range;wx.range;Ox.range;function Rr(e){return Fe(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)/dl)}const Gs=Rr(0),ds=Rr(1),Tx=Rr(2),Ex=Rr(3),an=Rr(4),Ix=Rr(5),Ax=Rr(6);Gs.range;ds.range;Tx.range;Ex.range;an.range;Ix.range;Ax.range;const gl=Fe(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());gl.range;const yl=Fe(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());yl.range;const Qt=Fe(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());Qt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Fe(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)});Qt.range;const Xt=Fe(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());Xt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Fe(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)});Xt.range;function jh(e,t,r,n,o,s){const a=[[xr,1,Ht],[xr,5,5*Ht],[xr,15,15*Ht],[xr,30,30*Ht],[s,1,xt],[s,5,5*xt],[s,15,15*xt],[s,30,30*xt],[o,1,qt],[o,3,3*qt],[o,6,6*qt],[o,12,12*qt],[n,1,Kt],[n,2,2*Kt],[r,1,dl],[t,1,tu],[t,3,3*tu],[e,1,Ma]];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=tl(([,,b])=>b).right(a,h);if(p===a.length)return e.every(li(c/Ma,u/Ma,d));if(p===0)return cs.every(Math.max(li(c,u,d),1));const[f,m]=a[h/a[p-1][2]<a[p][2]/h?p-1:p];return f.every(m)}return[i,l]}const[Px,Rx]=jh(Xt,yl,Gs,kh,ml,pl),[Mx,Vx]=jh(Qt,gl,zs,ao,fl,hl);function Va(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 _a(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 wn(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function _x(e){var t=e.dateTime,r=e.date,n=e.time,o=e.periods,s=e.days,a=e.shortDays,i=e.months,l=e.shortMonths,c=On(o),u=Tn(o),d=On(s),h=Tn(s),p=On(a),f=Tn(a),m=On(i),b=Tn(i),S=On(l),P=Tn(l),v={a:oe,A:X,b:se,B:F,c:null,d:iu,e:iu,f:r1,g:h1,G:f1,H:Zx,I:e1,j:t1,L:Dh,m:n1,M:o1,p:ee,q:ce,Q:uu,s:du,S:s1,u:a1,U:i1,V:l1,w:c1,W:u1,x:null,X:null,y:d1,Y:p1,Z:m1,"%":cu},O={a:be,A:Me,b:xe,B:ut,c:null,d:lu,e:lu,f:x1,g:P1,G:M1,H:g1,I:y1,j:b1,L:Lh,m:S1,M:v1,p:nt,q:Se,Q:uu,s:du,S:C1,u:w1,U:O1,V:T1,w:E1,W:I1,x:null,X:null,y:A1,Y:R1,Z:V1,"%":cu},I={a:y,A,b:V,B:M,c:j,d:su,e:su,f:Yx,g:ou,G:nu,H:au,I:au,j:Hx,L:Jx,m:Gx,M:qx,p:k,q:zx,Q:Qx,s:Xx,S:Wx,u:Lx,U:Bx,V:Fx,w:Ux,W:$x,x:ne,X:Q,y:ou,Y:nu,Z:Nx,"%":Kx};v.x=T(r,v),v.X=T(n,v),v.c=T(t,v),O.x=T(r,O),O.X=T(n,O),O.c=T(t,O);function T(te,ae){return function(ue){var Y=[],ve=-1,pe=0,He=te.length,Ne,Ve,rr;for(ue instanceof Date||(ue=new Date(+ue));++ve<He;)te.charCodeAt(ve)===37&&(Y.push(te.slice(pe,ve)),(Ve=ru[Ne=te.charAt(++ve)])!=null?Ne=te.charAt(++ve):Ve=Ne==="e"?" ":"0",(rr=ae[Ne])&&(Ne=rr(ue,Ve)),Y.push(Ne),pe=ve+1);return Y.push(te.slice(pe,ve)),Y.join("")}}function w(te,ae){return function(ue){var Y=wn(1900,void 0,1),ve=R(Y,te,ue+="",0),pe,He;if(ve!=ue.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(ae&&!("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?(pe=_a(wn(Y.y,0,1)),He=pe.getUTCDay(),pe=He>4||He===0?ds.ceil(pe):ds(pe),pe=Ns.offset(pe,(Y.V-1)*7),Y.y=pe.getUTCFullYear(),Y.m=pe.getUTCMonth(),Y.d=pe.getUTCDate()+(Y.w+6)%7):(pe=Va(wn(Y.y,0,1)),He=pe.getDay(),pe=He>4||He===0?us.ceil(pe):us(pe),pe=ao.offset(pe,(Y.V-1)*7),Y.y=pe.getFullYear(),Y.m=pe.getMonth(),Y.d=pe.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),He="Z"in Y?_a(wn(Y.y,0,1)).getUTCDay():Va(wn(Y.y,0,1)).getDay(),Y.m=0,Y.d="W"in Y?(Y.w+6)%7+Y.W*7-(He+5)%7:Y.w+Y.U*7-(He+6)%7);return"Z"in Y?(Y.H+=Y.Z/100|0,Y.M+=Y.Z%100,_a(Y)):Va(Y)}}function R(te,ae,ue,Y){for(var ve=0,pe=ae.length,He=ue.length,Ne,Ve;ve<pe;){if(Y>=He)return-1;if(Ne=ae.charCodeAt(ve++),Ne===37){if(Ne=ae.charAt(ve++),Ve=I[Ne in ru?ae.charAt(ve++):Ne],!Ve||(Y=Ve(te,ue,Y))<0)return-1}else if(Ne!=ue.charCodeAt(Y++))return-1}return Y}function k(te,ae,ue){var Y=c.exec(ae.slice(ue));return Y?(te.p=u.get(Y[0].toLowerCase()),ue+Y[0].length):-1}function y(te,ae,ue){var Y=p.exec(ae.slice(ue));return Y?(te.w=f.get(Y[0].toLowerCase()),ue+Y[0].length):-1}function A(te,ae,ue){var Y=d.exec(ae.slice(ue));return Y?(te.w=h.get(Y[0].toLowerCase()),ue+Y[0].length):-1}function V(te,ae,ue){var Y=S.exec(ae.slice(ue));return Y?(te.m=P.get(Y[0].toLowerCase()),ue+Y[0].length):-1}function M(te,ae,ue){var Y=m.exec(ae.slice(ue));return Y?(te.m=b.get(Y[0].toLowerCase()),ue+Y[0].length):-1}function j(te,ae,ue){return R(te,t,ae,ue)}function ne(te,ae,ue){return R(te,r,ae,ue)}function Q(te,ae,ue){return R(te,n,ae,ue)}function oe(te){return a[te.getDay()]}function X(te){return s[te.getDay()]}function se(te){return l[te.getMonth()]}function F(te){return i[te.getMonth()]}function ee(te){return o[+(te.getHours()>=12)]}function ce(te){return 1+~~(te.getMonth()/3)}function be(te){return a[te.getUTCDay()]}function Me(te){return s[te.getUTCDay()]}function xe(te){return l[te.getUTCMonth()]}function ut(te){return i[te.getUTCMonth()]}function nt(te){return o[+(te.getUTCHours()>=12)]}function Se(te){return 1+~~(te.getUTCMonth()/3)}return{format:function(te){var ae=T(te+="",v);return ae.toString=function(){return te},ae},parse:function(te){var ae=w(te+="",!1);return ae.toString=function(){return te},ae},utcFormat:function(te){var ae=T(te+="",O);return ae.toString=function(){return te},ae},utcParse:function(te){var ae=w(te+="",!0);return ae.toString=function(){return te},ae}}}var ru={"-":"",_:" ",0:"0"},Ge=/^\s*\d+/,kx=/^%/,jx=/[\\^$*+?|[\]().{}]/g;function ye(e,t,r){var n=e<0?"-":"",o=(n?-e:e)+"",s=o.length;return n+(s<r?new Array(r-s+1).join(t)+o:o)}function Dx(e){return e.replace(jx,"\\$&")}function On(e){return new RegExp("^(?:"+e.map(Dx).join("|")+")","i")}function Tn(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function Ux(e,t,r){var n=Ge.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function Lx(e,t,r){var n=Ge.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function Bx(e,t,r){var n=Ge.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function Fx(e,t,r){var n=Ge.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function $x(e,t,r){var n=Ge.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function nu(e,t,r){var n=Ge.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function ou(e,t,r){var n=Ge.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Nx(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 zx(e,t,r){var n=Ge.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function Gx(e,t,r){var n=Ge.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function su(e,t,r){var n=Ge.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function Hx(e,t,r){var n=Ge.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function au(e,t,r){var n=Ge.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function qx(e,t,r){var n=Ge.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function Wx(e,t,r){var n=Ge.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function Jx(e,t,r){var n=Ge.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function Yx(e,t,r){var n=Ge.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function Kx(e,t,r){var n=kx.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function Qx(e,t,r){var n=Ge.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function Xx(e,t,r){var n=Ge.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function iu(e,t){return ye(e.getDate(),t,2)}function Zx(e,t){return ye(e.getHours(),t,2)}function e1(e,t){return ye(e.getHours()%12||12,t,2)}function t1(e,t){return ye(1+ao.count(Qt(e),e),t,3)}function Dh(e,t){return ye(e.getMilliseconds(),t,3)}function r1(e,t){return Dh(e,t)+"000"}function n1(e,t){return ye(e.getMonth()+1,t,2)}function o1(e,t){return ye(e.getMinutes(),t,2)}function s1(e,t){return ye(e.getSeconds(),t,2)}function a1(e){var t=e.getDay();return t===0?7:t}function i1(e,t){return ye(zs.count(Qt(e)-1,e),t,2)}function Uh(e){var t=e.getDay();return t>=4||t===0?sn(e):sn.ceil(e)}function l1(e,t){return e=Uh(e),ye(sn.count(Qt(e),e)+(Qt(e).getDay()===4),t,2)}function c1(e){return e.getDay()}function u1(e,t){return ye(us.count(Qt(e)-1,e),t,2)}function d1(e,t){return ye(e.getFullYear()%100,t,2)}function h1(e,t){return e=Uh(e),ye(e.getFullYear()%100,t,2)}function p1(e,t){return ye(e.getFullYear()%1e4,t,4)}function f1(e,t){var r=e.getDay();return e=r>=4||r===0?sn(e):sn.ceil(e),ye(e.getFullYear()%1e4,t,4)}function m1(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ye(t/60|0,"0",2)+ye(t%60,"0",2)}function lu(e,t){return ye(e.getUTCDate(),t,2)}function g1(e,t){return ye(e.getUTCHours(),t,2)}function y1(e,t){return ye(e.getUTCHours()%12||12,t,2)}function b1(e,t){return ye(1+Ns.count(Xt(e),e),t,3)}function Lh(e,t){return ye(e.getUTCMilliseconds(),t,3)}function x1(e,t){return Lh(e,t)+"000"}function S1(e,t){return ye(e.getUTCMonth()+1,t,2)}function v1(e,t){return ye(e.getUTCMinutes(),t,2)}function C1(e,t){return ye(e.getUTCSeconds(),t,2)}function w1(e){var t=e.getUTCDay();return t===0?7:t}function O1(e,t){return ye(Gs.count(Xt(e)-1,e),t,2)}function Bh(e){var t=e.getUTCDay();return t>=4||t===0?an(e):an.ceil(e)}function T1(e,t){return e=Bh(e),ye(an.count(Xt(e),e)+(Xt(e).getUTCDay()===4),t,2)}function E1(e){return e.getUTCDay()}function I1(e,t){return ye(ds.count(Xt(e)-1,e),t,2)}function A1(e,t){return ye(e.getUTCFullYear()%100,t,2)}function P1(e,t){return e=Bh(e),ye(e.getUTCFullYear()%100,t,2)}function R1(e,t){return ye(e.getUTCFullYear()%1e4,t,4)}function M1(e,t){var r=e.getUTCDay();return e=r>=4||r===0?an(e):an.ceil(e),ye(e.getUTCFullYear()%1e4,t,4)}function V1(){return"+0000"}function cu(){return"%"}function uu(e){return+e}function du(e){return Math.floor(+e/1e3)}var Hr,Fh,$h;_1({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 _1(e){return Hr=_x(e),Fh=Hr.format,Hr.parse,$h=Hr.utcFormat,Hr.utcParse,Hr}function k1(e){return new Date(e)}function j1(e){return e instanceof Date?+e:+new Date(+e)}function bl(e,t,r,n,o,s,a,i,l,c){var u=Ih(),d=u.invert,h=u.domain,p=c(".%L"),f=c(":%S"),m=c("%I:%M"),b=c("%I %p"),S=c("%a %d"),P=c("%b %d"),v=c("%B"),O=c("%Y");function I(T){return(l(T)<T?p:i(T)<T?f:a(T)<T?m:s(T)<T?b:n(T)<T?o(T)<T?S:P:r(T)<T?v:O)(T)}return u.invert=function(T){return new Date(d(T))},u.domain=function(T){return arguments.length?h(Array.from(T,j1)):h().map(k1)},u.ticks=function(T){var w=h();return e(w[0],w[w.length-1],T??10)},u.tickFormat=function(T,w){return w==null?I:c(w)},u.nice=function(T){var w=h();return(!T||typeof T.range!="function")&&(T=t(w[0],w[w.length-1],T??10)),T?h(Mh(w,T)):u},u.copy=function(){return $s(u,bl(e,t,r,n,o,s,a,i,l,c))},u}function Nh(){return hr.apply(bl(Mx,Vx,Qt,gl,zs,ao,fl,hl,xr,Fh).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function D1(){return hr.apply(bl(Px,Rx,Xt,yl,Gs,Ns,ml,pl,xr,$h).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function U1(){var e=0,t=1,r,n,o,s,a=bt,i=!1,l;function c(d){return d==null||isNaN(d=+d)?l:a(o===0?.5:(d=(s(d)-r)*o,i?Math.max(0,Math.min(1,d)):d))}c.domain=function(d){return arguments.length?([e,t]=d,r=s(e=+e),n=s(t=+t),o=r===n?0:1/(n-r),c):[e,t]},c.clamp=function(d){return arguments.length?(i=!!d,c):i},c.interpolator=function(d){return arguments.length?(a=d,c):a};function u(d){return function(h){var p,f;return arguments.length?([p,f]=h,a=d(p,f),c):[a(0),a(1)]}}return c.range=u(Fs),c.rangeRound=u(Eh),c.unknown=function(d){return arguments.length?(l=d,c):l},function(d){return s=d,r=d(e),n=d(t),o=r===n?0:1/(n-r),c}}function L1(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function zh(){var e=cl(U1()(bt));return e.copy=function(){return L1(e,zh())},Ob.apply(e,arguments)}function B1(e,t){return function(n,o){return o.location==="tick"?o.scale.tickFormat(e)(n):o.location==="zoom-slider-tooltip"?t.tickFormat(2)(n):`${n}`}}function F1(e){return e.scaleType==="band"}function $1(e){return e.scaleType==="point"}function N1(e){return e.type==="piecewise"?_h(e.thresholds,e.colors):zh([e.min??0,e.max??100],e.color)}function hs(e){return e.values?ss(e.values,e.colors).unknown(e.unknownColor??null):ss(e.colors.map((t,r)=>r),e.colors).unknown(e.unknownColor??null)}function Ho(e){return e.type==="ordinal"?hs(e):N1(e)}function z1(e){const{tickMaxStep:t,tickMinStep:r,tickNumber:n,range:o,domain:s}=e,a=r===void 0?999:Math.floor(Math.abs(s[1]-s[0])/r),i=t===void 0?2:Math.ceil(Math.abs(s[1]-s[0])/t),l=n??Math.floor(Math.abs(o[1]-o[0])/50);return Math.min(a,Math.max(i,l))}function G1(e,t){return t[1]-t[0]===0?1:e/((t[1]-t[0])/100)}function hi(e,t,r){switch(e){case"log":return Vh(t,r);case"pow":return ul(t,r);case"sqrt":return Sx(t,r);case"time":return Nh(t,r);case"utc":return D1(t,r);default:return Rh(t,r)}}const hu=e=>(e==null?void 0:e[0])instanceof Date;function pu(e,t){const r=Nh(e.data,t);return(n,{location:o})=>o==="tick"?r.tickFormat(e.tickNumber)(n):`${n.toLocaleString()}`}const ka=(e,t)=>{const r=e[1]-e[0],n=t[1]-t[0],o=e[0]-t[0]*r/n,s=e[1]+(100-t[1])*r/n;return[o,s]};let fu,mu;class H1{constructor(){if(this.types=new Set,fu)throw new Error("You can only create one instance!");fu=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}class q1{constructor(){if(this.types=new Set,mu)throw new Error("You can only create one instance!");mu=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}const Hs=new H1;Hs.addType("bar");Hs.addType("line");Hs.addType("scatter");const W1=new q1;W1.addType("radar");function Gh(e){return Hs.getTypes().has(e)}const J1=(e,t,r,n,o,s,a,i)=>{var f;const l=n==="x"?o[t].xExtremumGetter:o[t].yExtremumGetter,c=((f=a[t])==null?void 0:f.series)??{},[u,d]=(l==null?void 0:l({series:c,axis:r,axisIndex:s,isDefaultAxis:s===0,getFilters:i}))??[1/0,-1/0],[h,p]=e;return[Math.min(u,h),Math.max(d,p)]},Hh=(e,t,r,n,o,s)=>{const i=Object.keys(r).filter(Gh).reduce((l,c)=>J1(l,c,e,t,r,n,o,s),[1/0,-1/0]);return Number.isNaN(i[0])||Number.isNaN(i[1])?[1/0,-1/0]:i},Y1=(e,t,r,n)=>{const o=new Set;return Object.keys(t).filter(Gh).forEach(a=>{var c,u,d;const i=((c=r[a])==null?void 0:c.series)??{},l=(d=(u=t[a]).axisTooltipGetter)==null?void 0:d.call(u,i);l!==void 0&&l.forEach(({axisId:h,direction:p})=>{p===e&&o.add(h??n)})}),o},K1=(e,t,r,n)=>{var o;if(e.domainLimit!==void 0)return e.domainLimit;if(t==="x")for(const s of((o=n.line)==null?void 0:o.seriesOrder)??[]){const a=n.line.series[s];if(a.xAxisId===e.id||a.xAxisId===void 0&&r===0)return"strict"}return"nice"};function Q1(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 X1=.2,Z1=.1;function qh({drawingArea:e,formattedSeries:t,axis:r,seriesConfig:n,axisDirection:o,zoomMap:s,zoomOptions:a,getFilters:i,preferStrictDomainInLineCharts:l}){if(r===void 0)return{axis:{},axisIds:[]};const c=Y1(o,n,t,r[0].id),u={};return r.forEach((d,h)=>{const p=d,f=a==null?void 0:a[p.id],m=s==null?void 0:s.get(p.id),b=m?[m.start,m.end]:[0,100],S=Q1(e,o,p),[P,v]=Hh(p,o,n,h,t,m===void 0&&!f?i:void 0),O=!p.ignoreTooltip&&c.has(p.id),I=p.data??[];if(F1(p)){const oe=p.categoryGapRatio??X1,X=p.barGapRatio??Z1,se=o==="y"?[S[1],S[0]]:S,F=ka(se,b);if(u[p.id]=K({offset:0,height:0,categoryGapRatio:oe,barGapRatio:X,triggerTooltip:O},p,{data:I,scale:rl(p.data,F).paddingInner(oe).paddingOuter(oe/2),tickNumber:p.data.length,colorScale:p.colorMap&&(p.colorMap.type==="ordinal"?hs(K({values:p.data},p.colorMap)):Ho(p.colorMap))}),hu(p.data)){const ee=pu(p,se);u[p.id].valueFormatter=p.valueFormatter??ee}}if($1(p)){const oe=o==="y"?[...S].reverse():S,X=ka(oe,b);if(u[p.id]=K({offset:0,height:0,triggerTooltip:O},p,{data:I,scale:Tb(p.data,X),tickNumber:p.data.length,colorScale:p.colorMap&&(p.colorMap.type==="ordinal"?hs(K({values:p.data},p.colorMap)):Ho(p.colorMap))}),hu(p.data)){const se=pu(p,oe);u[p.id].valueFormatter=p.valueFormatter??se}}if(p.scaleType==="band"||p.scaleType==="point")return;const T=p.scaleType??"linear",w=l?K1(p,o,h,t):p.domainLimit??"nice",R=[p.min??P,p.max??v];if(typeof w=="function"){const{min:oe,max:X}=w(P,v);R[0]=oe,R[1]=X}const k=z1(K({},p,{range:S,domain:R})),y=G1(k,b),A=ka(S,b),V=hi(T,R,A),M=w==="nice"?V.nice(k):V,[j,ne]=M.domain(),Q=[p.min??j,p.max??ne];u[p.id]=K({offset:0,height:0,triggerTooltip:O},p,{data:I,scaleType:T,scale:M.domain(Q),tickNumber:y,colorScale:p.colorMap&&Ho(p.colorMap),valueFormatter:p.valueFormatter??B1(y,hi(T,S.map(oe=>V.invert(oe)),S))})}),{axis:u,axisIds:r.map(({id:d})=>d)}}function eS(e){return e!=null}function Wh({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:o}){return(s,a)=>{var b;const i=t[s.id];if(!i||i.filterMode!=="discard")return null;const l=e==null?void 0:e.get(s.id);if(l===void 0||l.start<=0&&l.end>=100)return null;let c=[];const u=s.scaleType;u==="point"||u==="band"?c=[0,(((b=s.data)==null?void 0:b.length)??1)-1]:c=Hh(s,o,r,a,n);let d,h;[d,h]=hi(!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,P)=>{var O;const v=S[o]??((O=s.data)==null?void 0:O[P]);return v==null?!0:s.scaleType==="point"||s.scaleType==="band"||typeof v=="string"?P>=f&&P<=m:v>=f&&v<=m}}}const tS=e=>({currentAxisId:t,seriesXAxisId:r,seriesYAxisId:n,isDefaultAxis:o})=>(s,a)=>{var c,u;return!(t===r?n:r)||o?((u=(c=Object.values(e??{}))[0])==null?void 0:u.call(c,s,a))??!0:[n,r].filter(d=>d!==t).map(d=>e[d??""]).filter(eS).every(d=>d(s,a))},gu=e=>(t=[])=>t.reduce((r,n)=>{const{zoom:o,id:s}=n,a=el(o,s,e);return a&&(r[s]=a),r},{}),rS=e=>{const t=new Map;return e.forEach(r=>{t.set(r.axisId,r)}),t},Jh=e=>e.zoom;he([Jh],e=>e==null?void 0:e.isInteracting);const qs=he([Jh],e=>(e==null?void 0:e.zoomData)&&rS(e==null?void 0:e.zoomData)),io=he([fn,mn],(e,t)=>K({},gu("x")(e),gu("y")(t)));he([io,(e,t)=>t],(e,t)=>e[t]);const nS=he([qs,io,Bs,no],(e,t,r,n)=>e&&t&&Wh({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:"x"})),oS=he([qs,io,Bs,no],(e,t,r,n)=>e&&t&&Wh({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:"y"})),Yh=he([nS,oS,fn,mn],(e,t,r,n)=>{if(e===void 0||t===void 0)return;const o=r==null?void 0:r.reduce((a,i,l)=>{const c=e(i,l);return c!==null&&(a[i.id]=c),a},{}),s=n==null?void 0:n.reduce((a,i,l)=>{const c=t(i,l);return c!==null&&(a[i.id]=c),a},{});if(!(Object.keys(o??{}).length===0&&Object.keys(s??{}).length===0))return tS(K({},o,s))}),Mr=he([fn,ro,no,Bs,qs,io,Yh,dh],(e,t,r,n,o,s,a,i)=>qh({drawingArea:t,formattedSeries:r,axis:e,seriesConfig:n,axisDirection:"x",zoomMap:o,zoomOptions:s,getFilters:a,preferStrictDomainInLineCharts:i})),Vr=he([mn,ro,no,Bs,qs,io,Yh,dh],(e,t,r,n,o,s,a,i)=>qh({drawingArea:t,formattedSeries:r,axis:e,seriesConfig:n,axisDirection:"y",zoomMap:o,zoomOptions:s,getFilters:a,preferStrictDomainInLineCharts:i}));he([Mr,Vr,(e,t)=>t],(e,t,r)=>(e==null?void 0:e.axis[r])??(t==null?void 0:t.axis[r]));he([fn,mn,(e,t)=>t],(e,t,r)=>{const n=(e==null?void 0:e.find(o=>o.id===r))??(t==null?void 0:t.find(o=>o.id===r))??null;if(n)return n});function Kh(e){return e.bandwidth!==void 0}function qr(e){return e instanceof Date?e.getTime():e}function ln(e,t){const{scale:r,data:n,reverse:o}=e;if(!Kh(r)){const a=r.invert(t);if(n===void 0)return-1;const i=qr(a);return n==null?void 0:n.findIndex((c,u)=>{const d=qr(c);return d>i&&(u===0||Math.abs(i-d)<=Math.abs(i-qr(n[u-1])))||d<=i&&(u===n.length-1||Math.abs(qr(a)-d)<Math.abs(qr(a)-qr(n[u+1])))})}const s=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 s<0||s>=n.length?-1:o?n.length-1-s:s}function yu(e,t,r){const{scale:n,data:o}=e;if(!Kh(n)){const s=n.invert(t);return r<0?s:o[r]}return r<0||r>=o.length?null:o[r]}function bu(e,t){const r=e.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r.matrixTransform(e.getScreenCTM().inverse())}function Wt(e){const t=_.useRef(e);return Ut(()=>{t.current=e}),_.useRef((...r)=>(0,t.current)(...r)).current}const sS=Object.is;function Qh(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let r=0,n=0;for(const o in e)if(r+=1,!sS(e[o],t[o])||!(o in t))return!1;for(const o in t)n+=1;return r===n}const xl=({store:e})=>{const t=Wt(function(){e.update(a=>K({},a,{interaction:{pointer:null,item:null}}))}),r=Wt(function(a){e.update(i=>{const l=i.interaction.item;return a?l===null||Object.keys(a).some(c=>a[c]!==l[c])?i:K({},i,{interaction:K({},i.interaction,{item:null})}):l===null?i:K({},i,{interaction:K({},i.interaction,{item:null})})})}),n=Wt(function(a){e.update(i=>Qh(i.interaction.item,a)?i:K({},i,{interaction:K({},i.interaction,{item:a})}))}),o=Wt(function(a){e.update(i=>K({},i,{interaction:K({},i.interaction,{pointer:a})}))});return{instance:{cleanInteraction:t,setItemInteraction:n,removeItemInteraction:r,setPointerCoordinate:o}}};xl.getInitialState=()=>({interaction:{item:null,pointer:null}});xl.params={};const Sl=e=>e.interaction,aS=he([Sl],e=>e!==void 0),iS=he([Sl],e=>(e==null?void 0:e.item)??null),Xh=he([Sl],e=>(e==null?void 0:e.pointer)??null),Ws=he([Xh],e=>e&&e.x),Js=he([Xh],e=>e&&e.y);he([iS],e=>e!==null);function Bn(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const o=e.length;if(o!==t.length)return!1;for(let s=0;s<o;s+=1)if(!Bn(e[s],t[s]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;const o=Array.from(e.entries());for(let s=0;s<o.length;s+=1)if(!t.has(o[s][0]))return!1;for(let s=0;s<o.length;s+=1){const a=o[s];if(!Bn(a[1],t.get(a[0])))return!1}return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;const o=Array.from(e.entries());for(let s=0;s<o.length;s+=1)if(!t.has(o[s][0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const o=e.length;if(o!==t.length)return!1;for(let s=0;s<o;s+=1)if(e[s]!==t[s])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const r=Object.keys(e),n=r.length;if(n!==Object.keys(t).length)return!1;for(let o=0;o<n;o+=1)if(!Object.prototype.hasOwnProperty.call(t,r[o]))return!1;for(let o=0;o<n;o+=1){const s=r[o];if(!Bn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}const Ys=(e,t)=>t;function pi(e,t,r=t.axisIds[0]){return Array.isArray(r)?r.map(n=>ln(t.axis[n],e)):ln(t.axis[r],e)}const Zh=(e,t,r)=>{if(e===null)return null;const n=pi(e,t,r);return n===-1?null:n},lS=he([Ws,Mr,Ys],Zh),cS=he([Js,Vr,Ys],Zh),uS=he([Ws,Js,Mr,Vr],(e,t,r,n)=>[...e===null?[]:r.axisIds.map(o=>({axisId:o,dataIndex:pi(e,r,o)})),...t===null?[]:n.axisIds.map(o=>({axisId:o,dataIndex:pi(t,n,o)}))].filter(o=>o.dataIndex!==null&&o.dataIndex>=0));function ep(e,t,r,n=t.axisIds[0]){return Array.isArray(n)?n.map((o,s)=>yu(t.axis[o],e,r[s])):yu(t.axis[n],e,r)}he([Ws,Mr,lS,Ys],(e,t,r,n)=>e===null||r===null||t.axisIds.length===0?null:ep(e,t,r,n));he([Js,Vr,cS,Ys],(e,t,r,n)=>e===null||r===null||t.axisIds.length===0?null:ep(e,t,r,n));const dS=he([Ws,Mr],(e,t)=>e===null?[]:t.axisIds.filter(r=>t.axis[r].triggerTooltip).map(r=>({axisId:r,dataIndex:ln(t.axis[r],e)})).filter(({dataIndex:r})=>r>=0),{memoizeOptions:{resultEqualityCheck:Bn}}),hS=he([Js,Vr],(e,t)=>e===null?[]:t.axisIds.filter(r=>t.axis[r].triggerTooltip).map(r=>({axisId:r,dataIndex:ln(t.axis[r],e)})).filter(({dataIndex:r})=>r>=0),{memoizeOptions:{resultEqualityCheck:Bn}});he([dS,hS],(e,t)=>e.length>0||t.length>0);const xu={};function pS(e,t){const r=_.useRef(xu);return r.current===xu&&(r.current=e(t)),r}const fS=()=>{};function mS(e,t,r,n){const o=pS(gS,{store:e,selector:t,skip:n}).current;o.effect=r,_.useEffect(o.onMount(n),[n])}function gS(e){const{store:t,selector:r,skip:n}=e;let o=!1,s;const a=()=>{i.dispose??(i.dispose=t.subscribe(l=>{const c=r(l);i.effect(s,c),s=c}))},i={effect:fS,dispose:null,onMount:l=>()=>{if(!l)return o||(o=!0,s=r(t.value)),a(),()=>{var c;(c=i.dispose)==null||c.call(i),i.dispose=null}}};return n||(o=!0,s=r(t.value),a()),i}const Ks=({params:e,store:t,seriesConfig:r,svgRef:n,instance:o})=>{const{xAxis:s,yAxis:a,dataset:i,onHighlightedAxisChange:l}=e;if(process.env.NODE_ENV!=="production"){const v=[...s??[],...a??[]].filter(I=>I.id).map(I=>I.id),O=new Set(v.filter((I,T)=>v.indexOf(I)!==T));O.size>0&&Gn([`MUI X Charts: The following axis ids are duplicated: ${Array.from(O).join(", ")}.`,"Please make sure that each axis has a unique id."].join(`
|
|
117
|
+
`),"error")}const c=at(t,ro),u=at(t,no),d=at(t,aS),{axis:h,axisIds:p}=at(t,Mr),{axis:f,axisIds:m}=at(t,Vr);gh({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedAxis",controlled:e.highlightedAxis,defaultValue:void 0}),Ut(()=>{e.highlightedAxis!==void 0&&t.update(v=>v.controlledCartesianAxisHighlight===e.highlightedAxis?v:K({},v,{controlledCartesianAxisHighlight:e.highlightedAxis}))},[t,e.highlightedAxis]);const b=_.useRef(!0);_.useEffect(()=>{if(b.current){b.current=!1;return}t.update(v=>K({},v,{cartesianAxis:K({},v.cartesianAxis,{x:xh(s,i),y:Sh(a,i)})}))},[r,c,s,a,i,t]);const S=p[0],P=m[0];return mS(t,uS,(v,O)=>{if(!Object.is(v,O)){if(v.length!==O.length){l(O);return}v!=null&&v.some(({axisId:I,dataIndex:T},w)=>O[w].axisId!==I||O[w].dataIndex!==T)&&l(O)}},!l),_.useEffect(()=>{const v=n.current;if(!d||!v||e.disableAxisListener)return()=>{};const O=o.addInteractionListener("moveEnd",A=>{var V;A.detail.activeGestures.pan||(V=o.cleanInteraction)==null||V.call(o)}),I=o.addInteractionListener("panEnd",A=>{var V;A.detail.activeGestures.move||(V=o.cleanInteraction)==null||V.call(o)}),T=o.addInteractionListener("quickPressEnd",A=>{var V;!A.detail.activeGestures.move&&!A.detail.activeGestures.pan&&((V=o.cleanInteraction)==null||V.call(o))}),w=A=>{var ne,Q;const V=A.detail.srcEvent,M=A.detail.target,j=bu(v,V);if(A.detail.srcEvent.buttons>=1&&(M!=null&&M.hasPointerCapture(A.detail.srcEvent.pointerId))&&!(M!=null&&M.closest("[data-charts-zoom-slider]"))&&(M==null||M.releasePointerCapture(A.detail.srcEvent.pointerId)),!o.isPointInside(j.x,j.y,M)){(ne=o.cleanInteraction)==null||ne.call(o);return}(Q=o.setPointerCoordinate)==null||Q.call(o,j)},R=o.addInteractionListener("move",w),k=o.addInteractionListener("pan",w),y=o.addInteractionListener("quickPress",w);return()=>{R.cleanup(),O.cleanup(),k.cleanup(),I.cleanup(),y.cleanup(),T.cleanup()}},[n,t,h,S,f,P,o,e.disableAxisListener,d]),_.useEffect(()=>{const v=n.current,O=e.onAxisClick;if(v===null||!O)return()=>{};const I=o.addInteractionListener("tap",T=>{let w=null,R=!1;const k=bu(v,T.detail.srcEvent),y=ln(h[S],k.x);R=y!==-1,w=R?y:ln(f[P],k.y);const A=R?p[0]:m[0];if(w==null||w===-1)return;const V=(R?h:f)[A].data[w],M={};Object.keys(u).filter(j=>["bar","line"].includes(j)).forEach(j=>{var ne;(ne=u[j])==null||ne.seriesOrder.forEach(Q=>{const oe=u[j].series[Q],X=oe.xAxisId,se=oe.yAxisId,F=R?X:se;(F===void 0||F===A)&&(M[Q]=oe.data[w])})}),O(T.detail.srcEvent,{dataIndex:w,axisValue:V,seriesValues:M})});return()=>{I.cleanup()}},[e.onAxisClick,u,n,h,p,f,m,S,P,o]),{}};Ks.params={xAxis:!0,yAxis:!0,dataset:!0,onAxisClick:!0,disableAxisListener:!0,onHighlightedAxisChange:!0,highlightedAxis:!0};Ks.getDefaultizedParams=({params:e})=>K({},e,{colors:e.colors??hh,theme:e.theme??"light",defaultizedXAxis:xh(e.xAxis,e.dataset),defaultizedYAxis:Sh(e.yAxis,e.dataset)});Ks.getInitialState=e=>K({cartesianAxis:{x:e.defaultizedXAxis,y:e.defaultizedYAxis}},e.highlightedAxis===void 0?{}:{controlledCartesianAxisHighlight:e.highlightedAxis});function Su(e,t){return e.id!==void 0?e:K({id:t},e)}function vu(e){return e.colorMap?K({},e,{colorScale:e.colorMap.type==="ordinal"&&e.data?hs(K({values:e.data},e.colorMap)):Ho(e.colorMap.type==="continuous"?K({min:e.min,max:e.max},e.colorMap):e.colorMap)}):e}function tp(e,t){if(!e||e.length===0)return{axis:{},axisIds:[]};const r={},n=[];return e.forEach((o,s)=>{const a=o.dataKey,i=o.id??`defaultized-z-axis-${s}`;if(a===void 0||o.data!==void 0){r[i]=vu(Su(o,i)),n.push(i);return}if(t===void 0)throw new Error("MUI X Charts: z-axis uses `dataKey` but no `dataset` is provided.");r[i]=vu(Su(K({},o,{data:t.map(l=>l[a])}),i)),n.push(i)}),{axis:r,axisIds:n}}const vl=({params:e,store:t})=>{const{zAxis:r,dataset:n}=e,o=_.useRef(!0);return _.useEffect(()=>{if(o.current){o.current=!1;return}t.update(s=>K({},s,{zAxis:tp(r,n)}))},[r,n,t]),{}};vl.params={zAxis:!0,dataset:!0};vl.getInitialState=e=>({zAxis:tp(e.zAxis,e.dataset)});const yS=e=>e,bS=he([yS],e=>e.zAxis),Qs=({store:e,params:t})=>{gh({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedItem",controlled:t.highlightedItem,defaultValue:null}),Ut(()=>{e.update(o=>o.highlight.item===t.highlightedItem?o:K({},o,{highlight:K({},o.highlight,{item:t.highlightedItem})}))},[e,t.highlightedItem]);const r=Wt(()=>{var o;(o=t.onHighlightChange)==null||o.call(t,null),e.update(s=>K({},s,{highlight:{item:null}}))}),n=Wt(o=>{var a;const s=e.getSnapshot().highlight.item;Qh(s,o)||((a=t.onHighlightChange)==null||a.call(t,o),e.update(i=>K({},i,{highlight:{item:o}})))});return{instance:{clearHighlight:r,setHighlight:n}}};Qs.getDefaultizedParams=({params:e})=>K({},e,{highlightedItem:e.highlightedItem??null});Qs.getInitialState=e=>({highlight:{item:e.highlightedItem}});Qs.params={highlightedItem:!0,onHighlightChange:!0};const Cu=(e,t)=>t==="x"?{x:e,y:null}:{x:null,y:e},rp=e=>{var l;const{axis:t,getFilters:r,isDefaultAxis:n}=e,o=r==null?void 0:r({currentAxisId:t.id,isDefaultAxis:n}),s=o?(l=t.data)==null?void 0:l.filter((c,u)=>o({x:null,y:null},u)):t.data,a=Math.min(...s??[]),i=Math.max(...s??[]);return[a,i]},np=e=>t=>{const{series:r,axis:n,getFilters:o,isDefaultAxis:s}=t;return Object.keys(r).filter(a=>{const i=e==="x"?r[a].xAxisId:r[a].yAxisId;return i===n.id||s&&i===void 0}).reduce((a,i)=>{const{stackedData:l}=r[i],c=o==null?void 0:o({currentAxisId:n.id,isDefaultAxis:s,seriesXAxisId:r[i].xAxisId,seriesYAxisId:r[i].yAxisId}),[u,d]=(l==null?void 0:l.reduce((h,p,f)=>c&&(!c(Cu(p[0],e),f)||!c(Cu(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,a[0]),Math.max(d,a[1])]},[1/0,-1/0])},xS=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?np("x")(e):rp(e),SS=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?rp(e):np("y")(e);function Be(e){return function(){return e}}const wu=Math.abs,Je=Math.atan2,fr=Math.cos,vS=Math.max,ja=Math.min,Rt=Math.sin,Qr=Math.sqrt,st=1e-12,Yn=Math.PI,ps=Yn/2,qo=2*Yn;function CS(e){return e>1?0:e<-1?Yn:Math.acos(e)}function Ou(e){return e>=1?ps:e<=-1?-ps:Math.asin(e)}const fi=Math.PI,mi=2*fi,yr=1e-6,wS=mi-yr;function op(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function OS(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return op;const r=10**t;return function(n){this._+=n[0];for(let o=1,s=n.length;o<s;++o)this._+=Math.round(arguments[o]*r)/r+n[o]}}class TS{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?op:OS(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,o){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+o}`}bezierCurveTo(t,r,n,o,s,a){this._append`C${+t},${+r},${+n},${+o},${this._x1=+s},${this._y1=+a}`}arcTo(t,r,n,o,s){if(t=+t,r=+r,n=+n,o=+o,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,i=this._y1,l=n-t,c=o-r,u=a-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)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-a,f=o-i,m=l*l+c*c,b=p*p+f*f,S=Math.sqrt(m),P=Math.sqrt(h),v=s*Math.tan((fi-Math.acos((m+h-b)/(2*S*P)))/2),O=v/P,I=v/S;Math.abs(O-1)>yr&&this._append`L${t+O*u},${r+O*d}`,this._append`A${s},${s},0,0,${+(d*p>u*f)},${this._x1=t+I*l},${this._y1=r+I*c}`}}arc(t,r,n,o,s,a){if(t=+t,r=+r,n=+n,a=!!a,n<0)throw new Error(`negative radius: ${n}`);let i=n*Math.cos(o),l=n*Math.sin(o),c=t+i,u=r+l,d=1^a,h=a?o-s:s-o;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%mi+mi),h>wS?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>=fi)},${d},${this._x1=t+n*Math.cos(s)},${this._y1=r+n*Math.sin(s)}`)}rect(t,r,n,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+o}h${-n}Z`}toString(){return this._}}function ES(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 TS(t)}function IS(e){return e.innerRadius}function AS(e){return e.outerRadius}function PS(e){return e.startAngle}function RS(e){return e.endAngle}function MS(e){return e&&e.padAngle}function VS(e,t,r,n,o,s,a,i){var l=r-e,c=n-t,u=a-o,d=i-s,h=d*l-u*c;if(!(h*h<st))return h=(u*(t-s)-d*(e-o))/h,[e+h*l,t+h*c]}function Vo(e,t,r,n,o,s,a){var i=e-r,l=t-n,c=(a?s:-s)/Qr(i*i+l*l),u=c*l,d=-c*i,h=e+u,p=t+d,f=r+u,m=n+d,b=(h+f)/2,S=(p+m)/2,P=f-h,v=m-p,O=P*P+v*v,I=o-s,T=h*m-f*p,w=(v<0?-1:1)*Qr(vS(0,I*I*O-T*T)),R=(T*v-P*w)/O,k=(-T*P-v*w)/O,y=(T*v+P*w)/O,A=(-T*P+v*w)/O,V=R-b,M=k-S,j=y-b,ne=A-S;return V*V+M*M>j*j+ne*ne&&(R=y,k=A),{cx:R,cy:k,x01:-u,y01:-d,x11:R*(o/I-1),y11:k*(o/I-1)}}function sp(){var e=IS,t=AS,r=Be(0),n=null,o=PS,s=RS,a=MS,i=null,l=ES(c);function c(){var u,d,h=+e.apply(this,arguments),p=+t.apply(this,arguments),f=o.apply(this,arguments)-ps,m=s.apply(this,arguments)-ps,b=wu(m-f),S=m>f;if(i||(i=u=l()),p<h&&(d=p,p=h,h=d),!(p>st))i.moveTo(0,0);else if(b>qo-st)i.moveTo(p*fr(f),p*Rt(f)),i.arc(0,0,p,f,m,!S),h>st&&(i.moveTo(h*fr(m),h*Rt(m)),i.arc(0,0,h,m,f,S));else{var P=f,v=m,O=f,I=m,T=b,w=b,R=a.apply(this,arguments)/2,k=R>st&&(n?+n.apply(this,arguments):Qr(h*h+p*p)),y=ja(wu(p-h)/2,+r.apply(this,arguments)),A=y,V=y,M,j;if(k>st){var ne=Ou(k/h*Rt(R)),Q=Ou(k/p*Rt(R));(T-=ne*2)>st?(ne*=S?1:-1,O+=ne,I-=ne):(T=0,O=I=(f+m)/2),(w-=Q*2)>st?(Q*=S?1:-1,P+=Q,v-=Q):(w=0,P=v=(f+m)/2)}var oe=p*fr(P),X=p*Rt(P),se=h*fr(I),F=h*Rt(I);if(y>st){var ee=p*fr(v),ce=p*Rt(v),be=h*fr(O),Me=h*Rt(O),xe;if(b<Yn)if(xe=VS(oe,X,be,Me,ee,ce,se,F)){var ut=oe-xe[0],nt=X-xe[1],Se=ee-xe[0],te=ce-xe[1],ae=1/Rt(CS((ut*Se+nt*te)/(Qr(ut*ut+nt*nt)*Qr(Se*Se+te*te)))/2),ue=Qr(xe[0]*xe[0]+xe[1]*xe[1]);A=ja(y,(h-ue)/(ae-1)),V=ja(y,(p-ue)/(ae+1))}else A=V=0}w>st?V>st?(M=Vo(be,Me,oe,X,p,V,S),j=Vo(ee,ce,se,F,p,V,S),i.moveTo(M.cx+M.x01,M.cy+M.y01),V<y?i.arc(M.cx,M.cy,V,Je(M.y01,M.x01),Je(j.y01,j.x01),!S):(i.arc(M.cx,M.cy,V,Je(M.y01,M.x01),Je(M.y11,M.x11),!S),i.arc(0,0,p,Je(M.cy+M.y11,M.cx+M.x11),Je(j.cy+j.y11,j.cx+j.x11),!S),i.arc(j.cx,j.cy,V,Je(j.y11,j.x11),Je(j.y01,j.x01),!S))):(i.moveTo(oe,X),i.arc(0,0,p,P,v,!S)):i.moveTo(oe,X),!(h>st)||!(T>st)?i.lineTo(se,F):A>st?(M=Vo(se,F,ee,ce,h,-A,S),j=Vo(oe,X,be,Me,h,-A,S),i.lineTo(M.cx+M.x01,M.cy+M.y01),A<y?i.arc(M.cx,M.cy,A,Je(M.y01,M.x01),Je(j.y01,j.x01),!S):(i.arc(M.cx,M.cy,A,Je(M.y01,M.x01),Je(M.y11,M.x11),!S),i.arc(0,0,h,Je(M.cy+M.y11,M.cx+M.x11),Je(j.cy+j.y11,j.cx+j.x11),S),i.arc(j.cx,j.cy,A,Je(j.y11,j.x11),Je(j.y01,j.x01),!S))):i.arc(0,0,h,I,O,S)}if(i.closePath(),u)return i=null,u+""||null}return c.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+o.apply(this,arguments)+ +s.apply(this,arguments))/2-Yn/2;return[fr(d)*u,Rt(d)*u]},c.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:Be(+u),c):e},c.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:Be(+u),c):t},c.cornerRadius=function(u){return arguments.length?(r=typeof u=="function"?u:Be(+u),c):r},c.padRadius=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:Be(+u),c):n},c.startAngle=function(u){return arguments.length?(o=typeof u=="function"?u:Be(+u),c):o},c.endAngle=function(u){return arguments.length?(s=typeof u=="function"?u:Be(+u),c):s},c.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:Be(+u),c):a},c.context=function(u){return arguments.length?(i=u??null,c):i},c}function ap(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function _S(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function kS(e){return e}function jS(){var e=kS,t=_S,r=null,n=Be(0),o=Be(qo),s=Be(0);function a(i){var l,c=(i=ap(i)).length,u,d,h=0,p=new Array(c),f=new Array(c),m=+n.apply(this,arguments),b=Math.min(qo,Math.max(-qo,o.apply(this,arguments)-m)),S,P=Math.min(Math.abs(b)/c,s.apply(this,arguments)),v=P*(b<0?-1:1),O;for(l=0;l<c;++l)(O=f[p[l]=l]=+e(i[l],l,i))>0&&(h+=O);for(t!=null?p.sort(function(I,T){return t(f[I],f[T])}):r!=null&&p.sort(function(I,T){return r(i[I],i[T])}),l=0,d=h?(b-c*v)/h:0;l<c;++l,m=S)u=p[l],O=f[u],S=m+(O>0?O*d:0)+v,f[u]={data:i[u],index:l,value:O,startAngle:m,endAngle:S,padAngle:P};return f}return a.value=function(i){return arguments.length?(e=typeof i=="function"?i:Be(+i),a):e},a.sortValues=function(i){return arguments.length?(t=i,r=null,a):t},a.sort=function(i){return arguments.length?(r=i,t=null,a):r},a.startAngle=function(i){return arguments.length?(n=typeof i=="function"?i:Be(+i),a):n},a.endAngle=function(i){return arguments.length?(o=typeof i=="function"?i:Be(+i),a):o},a.padAngle=function(i){return arguments.length?(s=typeof i=="function"?i:Be(+i),a):s},a}function cn(e,t){if((a=e.length)>1)for(var r=1,n,o,s=e[t[0]],a,i=s.length;r<a;++r)for(o=s,s=e[t[r]],n=0;n<i;++n)s[n][1]+=s[n][0]=isNaN(o[n][1])?o[n][0]:o[n][1]}function un(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function DS(e,t){return e[t]}function US(e){const t=[];return t.key=e,t}function ip(){var e=Be([]),t=un,r=cn,n=DS;function o(s){var a=Array.from(e.apply(this,arguments),US),i,l=a.length,c=-1,u;for(const d of s)for(i=0,++c;i<l;++i)(a[i][c]=[0,+n(d,a[i].key,c,s)]).data=d;for(i=0,u=ap(t(a));i<l;++i)a[u[i]].index=i;return r(a,u),a}return o.keys=function(s){return arguments.length?(e=typeof s=="function"?s:Be(Array.from(s)),o):e},o.value=function(s){return arguments.length?(n=typeof s=="function"?s:Be(+s),o):n},o.order=function(s){return arguments.length?(t=s==null?un:typeof s=="function"?s:Be(Array.from(s)),o):t},o.offset=function(s){return arguments.length?(r=s??cn,o):r},o}function LS(e,t){if((n=e.length)>0){for(var r,n,o=0,s=e[0].length,a;o<s;++o){for(a=r=0;r<n;++r)a+=e[r][o][1]||0;if(a)for(r=0;r<n;++r)e[r][o][1]/=a}cn(e,t)}}function BS(e,t){if((l=e.length)>0)for(var r,n=0,o,s,a,i,l,c=e[t[0]].length;n<c;++n)for(a=i=0,r=0;r<l;++r)(s=(o=e[t[r]][n])[1]-o[0])>0?(o[0]=a,o[1]=a+=s):s<0?(o[1]=i,o[0]=i+=s):(o[0]=0,o[1]=s)}function FS(e,t){if((o=e.length)>0){for(var r=0,n=e[t[0]],o,s=n.length;r<s;++r){for(var a=0,i=0;a<o;++a)i+=e[a][r][1]||0;n[r][1]+=n[r][0]=-i/2}cn(e,t)}}function $S(e,t){if(!(!((a=e.length)>0)||!((s=(o=e[t[0]]).length)>0))){for(var r=0,n=1,o,s,a;n<s;++n){for(var i=0,l=0,c=0;i<a;++i){for(var u=e[t[i]],d=u[n][1]||0,h=u[n-1][1]||0,p=(d-h)/2,f=0;f<i;++f){var m=e[t[f]],b=m[n][1]||0,S=m[n-1][1]||0;p+=b-S}l+=d,c+=p*d}o[n-1][1]+=o[n-1][0]=r,l&&(r-=c/l)}o[n-1][1]+=o[n-1][0]=r,cn(e,t)}}function lp(e){var t=e.map(NS);return un(e).sort(function(r,n){return t[r]-t[n]})}function NS(e){for(var t=-1,r=0,n=e.length,o,s=-1/0;++t<n;)(o=+e[t][1])>s&&(s=o,r=t);return r}function cp(e){var t=e.map(up);return un(e).sort(function(r,n){return t[r]-t[n]})}function up(e){for(var t=0,r=-1,n=e.length,o;++r<n;)(o=+e[r][1])&&(t+=o);return t}function zS(e){return cp(e).reverse()}function GS(e){var t=e.length,r,n,o=e.map(up),s=lp(e),a=0,i=0,l=[],c=[];for(r=0;r<t;++r)n=s[r],a<i?(a+=o[n],l.push(n)):(i+=o[n],c.push(n));return c.reverse().concat(l)}function HS(e){return un(e).reverse()}const Da={appearance:lp,ascending:cp,descending:zS,insideOut:GS,none:un,reverse:HS},Ua={expand:LS,diverging:BS,none:cn,silhouette:FS,wiggle:$S},dp=e=>{const{series:t,seriesOrder:r,defaultStrategy:n}=e,o=[],s={};return r.forEach(a=>{const{stack:i,stackOrder:l,stackOffset:c}=t[a];i===void 0?o.push({ids:[a],stackingOrder:Da.none,stackingOffset:Ua.none}):s[i]===void 0?(s[i]=o.length,o.push({ids:[a],stackingOrder:Da[l??(n==null?void 0:n.stackOrder)??"none"],stackingOffset:Ua[c??(n==null?void 0:n.stackOffset)??"diverging"]})):(o[s[i]].ids.push(a),l!==void 0&&(o[s[i]].stackingOrder=Da[l]),c!==void 0&&(o[s[i]].stackingOffset=Ua[c]))}),o},qS=e=>e==null?"":e.toLocaleString(),WS=(e,t)=>{const{seriesOrder:r,series:n}=e,o=dp(e),s=t??[];r.forEach(i=>{const l=n[i].data;if(l!==void 0)l.forEach((c,u)=>{s.length<=u?s.push({[i]:c}):s[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 a={};return o.forEach(i=>{const{ids:l,stackingOffset:c,stackingOrder:u}=i,d=ip().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)(s);l.forEach((h,p)=>{const f=n[h].dataKey;a[h]=K({layout:"vertical",labelMarkType:"square",minBarSize:0,valueFormatter:n[h].valueFormatter??qS},n[h],{data:f?t.map(m=>{const b=m[f];return typeof b!="number"?(process.env.NODE_ENV!=="production"&&b!==null&&Gn([`MUI X Charts: your dataset key "${f}" is used for plotting bars, but contains nonnumerical elements.`,"Bar plots only support numbers and null values."]),null):b}):n[h].data,stackedData:d[p].map(([m,b])=>[m,b])})})}),{seriesOrder:r,stackingGroups:o,series:a}};function Zt(e,t){return typeof e=="function"?e(t):e}const JS=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,o)=>{const s=Zt(r[o].label,"legend");return s===void 0||n.push({markType:r[o].labelMarkType,id:o,seriesId:o,color:r[o].color,label:s}),n},[])},YS=(e,t,r)=>{const n=e.layout==="vertical",o=n?t==null?void 0:t.colorScale:r==null?void 0:r.colorScale,s=n?r==null?void 0:r.colorScale:t==null?void 0:t.colorScale,a=n?t==null?void 0:t.data:r==null?void 0:r.data;return s?i=>{if(i===void 0)return e.color;const l=e.data[i],c=l===null?e.color:s(l);return c===null?e.color:c}:o&&a?i=>{if(i===void 0)return e.color;const l=a[i],c=l===null?e.color:o(l);return c===null?e.color:c}:()=>e.color},KS=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const o=Zt(t.label,"tooltip"),s=t.data[n.dataIndex];if(s==null)return null;const a=t.valueFormatter(s,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:o,value:s,formattedValue:a,markType:t.labelMarkType}},QS=e=>Object.values(e).map(t=>t.layout==="horizontal"?{direction:"y",axisId:t.yAxisId}:{direction:"x",axisId:t.xAxisId}),XS=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`,color:r[t%r.length]},e),ZS={seriesProcessor:WS,colorProcessor:YS,legendGetter:JS,tooltipGetter:KS,axisTooltipGetter:QS,xExtremumGetter:xS,yExtremumGetter:SS,getSeriesWithDefaultValues:XS},fs=(e,t)=>[t[0]===null?e[0]:Math.min(e[0],t[0]),t[1]===null?e[1]:Math.max(e[1],t[1])],ev=e=>{const{series:t,axis:r,isDefaultAxis:n,getFilters:o}=e;return Object.keys(t).filter(s=>{const a=t[s].xAxisId;return a===r.id||a===void 0&&n}).reduce((s,a)=>{var c;const i=o==null?void 0:o({currentAxisId:r.id,isDefaultAxis:n,seriesXAxisId:t[a].xAxisId,seriesYAxisId:t[a].yAxisId}),l=(c=t[a].data)==null?void 0:c.reduce((u,d,h)=>i&&!i(d,h)?u:fs(u,[d.x,d.x]),[1/0,-1/0]);return fs(s,l??[1/0,-1/0])},[1/0,-1/0])},tv=e=>{const{series:t,axis:r,isDefaultAxis:n,getFilters:o}=e;return Object.keys(t).filter(s=>{const a=t[s].yAxisId;return a===r.id||a===void 0&&n}).reduce((s,a)=>{var c;const i=o==null?void 0:o({currentAxisId:r.id,isDefaultAxis:n,seriesXAxisId:t[a].xAxisId,seriesYAxisId:t[a].yAxisId}),l=(c=t[a].data)==null?void 0:c.reduce((u,d,h)=>i&&!i(d,h)?u:fs(u,[d.y,d.y]),[1/0,-1/0]);return fs(s,l??[1/0,-1/0])},[1/0,-1/0])},rv=({series:e,seriesOrder:t},r)=>({series:Object.fromEntries(Object.entries(e).map(([o,s])=>{const a=s==null?void 0:s.datasetKeys,i=["x","y","id"].filter(c=>typeof(a==null?void 0:a[c])!="string");if(s!=null&&s.datasetKeys&&i.length>0)throw new Error([`MUI X Charts: scatter series with id='${o}' has incomplete datasetKeys.`,`Properties ${i.map(c=>`"${c}"`).join(", ")} are missing.`].join(`
|
|
119
119
|
`));const l=a?(r==null?void 0:r.map(c=>({x:c[a.x]??null,y:c[a.y]??null,z:a.z&&c[a.z],id:a.id&&c[a.id]})))??[]:s.data??[];return[o,K({labelMarkType:"circle",markerSize:4},s,{preview:K({markerSize:1},s==null?void 0:s.preview),data:l,valueFormatter:s.valueFormatter??(c=>c&&`(${c.x}, ${c.y})`)})]})),seriesOrder:t}),nv=(e,t,r,n)=>{const o=n==null?void 0:n.colorScale,s=r==null?void 0:r.colorScale,a=t==null?void 0:t.colorScale;return o?i=>{var u,d;if(i===void 0)return e.color;if(((u=n==null?void 0:n.data)==null?void 0:u[i])!==void 0){const h=o((d=n==null?void 0:n.data)==null?void 0:d[i]);if(h!==null)return h}const l=e.data[i],c=l===null?e.color:o(l.z);return c===null?e.color:c}:s?i=>{if(i===void 0)return e.color;const l=e.data[i],c=l===null?e.color:s(l.y);return c===null?e.color:c}:a?i=>{if(i===void 0)return e.color;const l=e.data[i],c=l===null?e.color:a(l.x);return c===null?e.color:c}:()=>e.color},ov=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,o)=>{const s=Zt(r[o].label,"legend");return s===void 0||n.push({markType:r[o].labelMarkType,id:o,seriesId:o,color:r[o].color,label:s}),n},[])},sv=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const o=Zt(t.label,"tooltip"),s=t.data[n.dataIndex],a=t.valueFormatter(s,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:o,value:s,formattedValue:a,markType:t.labelMarkType}},av=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`,color:r[t%r.length]},e),iv={seriesProcessor:rv,colorProcessor:nv,legendGetter:ov,tooltipGetter:sv,xExtremumGetter:ev,yExtremumGetter:tv,getSeriesWithDefaultValues:av},lv=e=>{const{axis:t}=e,r=Math.min(...t.data??[]),n=Math.max(...t.data??[]);return[r,n]};function cv(e,t,r,n){return r.reduce((o,s,a)=>{if(t[a]===null)return o;const[i,l]=e(s);return n&&(!n({y:i,x:null},a)||!n({y:l,x:null},a))?o:[Math.min(i,l,o[0]),Math.max(i,l,o[1])]},[1/0,-1/0])}const uv=e=>{const{series:t,axis:r,isDefaultAxis:n,getFilters:o}=e;return Object.keys(t).filter(s=>{const a=t[s].yAxisId;return a===r.id||n&&a===void 0}).reduce((s,a)=>{const{area:i,stackedData:l,data:c}=t[a],u=i!==void 0,d=o==null?void 0:o({currentAxisId:r.id,isDefaultAxis:n,seriesXAxisId:t[a].xAxisId,seriesYAxisId:t[a].yAxisId}),h=u&&r.scaleType!=="log"&&typeof t[a].baseline!="string"?b=>b:b=>[b[1],b[1]],p=cv(h,c,l,d),[f,m]=p;return[Math.min(f,s[0]),Math.max(m,s[1])]},[1/0,-1/0])};function dv(e,t){const r={};return Object.keys(e).forEach(n=>{r[n]=K({},e[n],{valueFormatter:e[n].valueFormatter??t})}),r}const hv=(e,t)=>{const{seriesOrder:r,series:n}=e,o=dp(K({},e,{defaultStrategy:{stackOffset:"none"}})),s=t??[];r.forEach(i=>{const l=n[i].data;if(l!==void 0)l.forEach((c,u)=>{s.length<=u?s.push({[i]:c}):s[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 a={};return o.forEach(i=>{const{ids:l,stackingOrder:c,stackingOffset:u}=i,d=ip().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)(s);l.forEach((h,p)=>{const f=n[h].dataKey;a[h]=K({labelMarkType:"line"},n[h],{data:f?t.map(m=>{const b=m[f];return typeof b!="number"?(process.env.NODE_ENV!=="production"&&b!==null&&Gn([`MUI X Charts: Your dataset key "${f}" is used for plotting line, but contains nonnumerical elements.`,"Line plots only support numbers and null values."]),null):b}):n[h].data,stackedData:d[p].map(([m,b])=>[m,b])})})}),{seriesOrder:r,stackingGroups:o,series:dv(a,i=>i==null?"":i.toLocaleString())}},pv=(e,t,r)=>{const n=r==null?void 0:r.colorScale,o=t==null?void 0:t.colorScale;return n?s=>{if(s===void 0)return e.color;const a=e.data[s],i=a===null?e.color:n(a);return i===null?e.color:i}:o?s=>{var l;if(s===void 0)return e.color;const a=(l=t.data)==null?void 0:l[s],i=a===null?e.color:o(a);return i===null?e.color:i}:()=>e.color},fv=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,o)=>{const s=Zt(r[o].label,"legend");return s===void 0||n.push({markType:r[o].labelMarkType,id:o,seriesId:o,color:r[o].color,label:s}),n},[])},mv=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const o=Zt(t.label,"tooltip"),s=t.data[n.dataIndex],a=t.valueFormatter(s,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:o,value:s,formattedValue:a,markType:t.labelMarkType}},gv=e=>Object.values(e).map(t=>({direction:"x",axisId:t.xAxisId})),yv=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`,color:r[t%r.length]},e),bv={colorProcessor:pv,seriesProcessor:hv,legendGetter:fv,tooltipGetter:mv,axisTooltipGetter:gv,xExtremumGetter:lv,yExtremumGetter:uv,getSeriesWithDefaultValues:yv},xv=(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}},Sv=e=>{const{seriesOrder:t,series:r}=e,n={};return t.forEach(o=>{const s=jS().startAngle(2*Math.PI*(r[o].startAngle??0)/360).endAngle(2*Math.PI*(r[o].endAngle??360)/360).padAngle(2*Math.PI*(r[o].paddingAngle??0)/360).sortValues(xv(r[o].sortingValues??"none"))(r[o].data.map(a=>a.value));n[o]=K({labelMarkType:"circle",valueFormatter:a=>a.value.toLocaleString()},r[o],{data:r[o].data.map((a,i)=>K({},a,{id:a.id??`auto-generated-pie-id-${o}-${i}`},s[i])).map((a,i)=>{var l,c;return K({labelMarkType:"circle"},a,{formattedValue:((c=(l=r[o]).valueFormatter)==null?void 0:c.call(l,K({},a,{label:Zt(a.label,"arc")}),{dataIndex:i}))??a.value.toLocaleString()})})})}),{seriesOrder:t,series:n}},vv=e=>t=>e.data[t].color,Cv=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,o)=>(r[o].data.forEach((s,a)=>{const i=Zt(s.label,"legend");i!==void 0&&n.push({markType:s.labelMarkType??r[o].labelMarkType,id:s.id??a,seriesId:o,color:s.color,label:i,itemId:s.id??a})}),n),[])},wv=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const o=t.data[n.dataIndex];if(o==null)return null;const s=Zt(o.label,"tooltip"),a=K({},o,{label:s}),i=t.valueFormatter(a,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:s,value:a,formattedValue:i,markType:o.labelMarkType??t.labelMarkType}},Ov=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`},e,{data:e.data.map((n,o)=>K({color:r[o%r.length]},n))}),Tv={colorProcessor:vv,seriesProcessor:Sv,legendGetter:Cv,tooltipGetter:wv,getSeriesWithDefaultValues:Ov},Ev={bar:ZS,scatter:iv,line:bv,pie:Tv},Iv=[vl,Ks,xl,
|
|
121
|
-
`));return e};function
|
|
122
|
-
`));return e.store}function pp(){const e=
|
|
123
|
-
`));return e.svgRef}function Vv(){const e=fp();return V.useCallback(t=>`${e}-gradient-${t}`,[e])}function kv(){const e=fp();return V.useCallback(t=>`${e}-gradient-${t}-object-bound`,[e])}var La,Tu;function jv(){if(Tu)return La;Tu=1;var e=4,t=.001,r=1e-7,n=10,o=11,s=1/(o-1),a=typeof Float32Array=="function";function i(m,b){return 1-3*b+3*m}function l(m,b){return 3*b-6*m}function c(m){return 3*m}function u(m,b,S){return((i(b,S)*m+l(b,S))*m+c(b))*m}function d(m,b,S){return 3*i(b,S)*m*m+2*l(b,S)*m+c(b)}function h(m,b,S,R,v){var O,I,T=0;do I=b+(S-b)/2,O=u(I,R,v)-m,O>0?S=I:b=I;while(Math.abs(O)>r&&++T<n);return I}function p(m,b,S,R){for(var v=0;v<e;++v){var O=d(b,S,R);if(O===0)return b;var I=u(b,S,R)-m;b-=I/O}return b}function f(m){return m}return La=function(b,S,R,v){if(!(0<=b&&b<=1&&0<=R&&R<=1))throw new Error("bezier x values must be in [0, 1] range");if(b===S&&R===v)return f;for(var O=a?new Float32Array(o):new Array(o),I=0;I<o;++I)O[I]=u(I*s,b,R);function T(w){for(var P=0,k=1,y=o-1;k!==y&&O[k]<=w;++k)P+=s;--k;var A=(w-O[k])/(O[k+1]-O[k]),M=P+A*s,_=d(M,b,R);return _>=t?p(w,M,b,R):_===0?M:h(w,P,P+s,b,R)}return function(P){return P===0?0:P===1?1:u(T(P),S,v)}},La}var Dv=jv();const Uv=Zf(Dv),Lv=300,Bv=Uv(.66,0,.34,1);var dn=0,jn=0,En=0,mp=1e3,ms,Dn,gs=0,Or=0,Qs=0,Kn=typeof performance=="object"&&performance.now?performance:Date,gp=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Cl(){return Or||(gp(Nv),Or=Kn.now()+Qs)}function Nv(){Or=0}function ys(){this._call=this._time=this._next=null}ys.prototype=yp.prototype={constructor:ys,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Cl():+r)+(t==null?0:+t),!this._next&&Dn!==this&&(Dn?Dn._next=this:ms=this,Dn=this),this._call=e,this._time=r,bi()},stop:function(){this._call&&(this._call=null,this._time=1/0,bi())}};function yp(e,t,r){var n=new ys;return n.restart(e,t,r),n}function yi(){Cl(),++dn;for(var e=ms,t;e;)(t=Or-e._time)>=0&&e._call.call(void 0,t),e=e._next;--dn}function Eu(){Or=(gs=Kn.now())+Qs,dn=jn=0;try{yi()}finally{dn=0,$v(),Or=0}}function Fv(){var e=Kn.now(),t=e-gs;t>mp&&(Qs-=t,gs=e)}function $v(){for(var e,t=ms,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:ms=r);Dn=e,bi(n)}function bi(e){if(!dn){jn&&(jn=clearTimeout(jn));var t=e-Or;t>24?(e<1/0&&(jn=setTimeout(Eu,e-Kn.now()-Qs)),En&&(En=clearInterval(En))):(En||(gs=Kn.now(),En=setInterval(Fv,mp)),dn=1,gp(Eu))}}function zv(e,t,r){var n=new ys;return t=t==null?0:+t,n.restart(o=>{n.stop(),e(o+t)},t,r),n}class Gv{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=Cl()-this.elapsed;return this.timer=yp(r=>this.timerCallback(r),0,t),yi(),this}stop(){return this.running?(this.timer&&(this.timer.stop(),this.timer=null),this):this}finish(){return this.stop(),zv(()=>this.timerCallback(this.duration)),yi(),this}}function Hv(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let o=0;o<r.length;o+=1){const s=r[o];if(!Object.prototype.hasOwnProperty.call(t,s)||!Object.is(e[s],t[s]))return!1}return!0}function qv(e,{createInterpolator:t,applyProps:r,skip:n,initialProps:o=e}){const s=V.useRef(o),a=V.useRef(null),i=V.useRef(null),l=V.useRef(e);Ut(()=>{l.current=e},[e]),Ut(()=>{var d;n&&((d=a.current)==null||d.finish(),a.current=null,i.current=null,s.current=e)},[e,n]);const c=V.useCallback(d=>{const h=s.current,p=t(h,e);a.current=new Gv(Lv,Bv,f=>{const m=p(f);s.current=m,r(d,m)})},[r,t,e]);return V.useCallback(d=>{var p,f,m,b;if(d===null){(p=a.current)==null||p.stop();return}const h=i.current;if(h===d){if(Hv(l.current,e)){(f=a.current)==null||f.resume();return}(m=a.current)==null||m.stop()}h&&((b=a.current)==null||b.stop()),i.current=d,(a.current||!n)&&c(d)},[c,e,n])}function Wv(e,{createInterpolator:t,transformProps:r,applyProps:n,skip:o,initialProps:s=e,ref:a}){const i=r??(u=>u),l=qv(e,{initialProps:s,createInterpolator:t,applyProps:(u,d)=>n(u,i(d)),skip:o});return K({},r(o?e:s),{ref:js(l,a)})}function Iu(e){const{isReversed:t,gradientId:r,size:n,direction:o,scale:s,colorMap:a}=e;return n<=0?null:g.jsx("linearGradient",{id:r,x1:"0",x2:"0",y1:"0",y2:"0",[`${o}${t?1:2}`]:`${n}px`,gradientUnits:"userSpaceOnUse",children:a.thresholds.map((i,l)=>{const c=s(i);if(c===void 0)return null;const u=t?1-c/n:c/n;return Number.isNaN(u)?null:g.jsxs(V.Fragment,{children:[g.jsx("stop",{offset:u,stopColor:a.colors[l],stopOpacity:1}),g.jsx("stop",{offset:u,stopColor:a.colors[l+1],stopOpacity:1})]},i.toString()+l)})})}const Jv=10;function Au(e){const{gradientUnits:t,isReversed:r,gradientId:n,size:o,direction:s,scale:a,colorScale:i,colorMap:l}=e,c=[l.min??0,l.max??100],u=c.map(a).filter(f=>f!==void 0);if(u.length!==2)return null;const d=typeof c[0]=="number"?Tt(c[0],c[1]):sl(c[0],c[1]),h=Math.round((Math.max(...u)-Math.min(...u))/Jv),p=`${c[0]}-${c[1]}-`;return g.jsx("linearGradient",{id:n,x1:"0",x2:"0",y1:"0",y2:"0",[`${s}${r?1:2}`]:t==="objectBoundingBox"?1:`${o}px`,gradientUnits:t??"userSpaceOnUse",children:Array.from({length:h+1},(f,m)=>{const b=d(m/h);if(b===void 0)return null;const S=a(b);if(S===void 0)return null;const R=r?1-S/o:S/o,v=i(b);return v===null?null:g.jsx("stop",{offset:R,stopColor:v,stopOpacity:1},p+m)})})}const Yv=10,Kv=e=>e?{x1:"1",x2:"0",y1:"0",y2:"0"}:{x1:"0",x2:"1",y1:"0",y2:"0"};function Ba(e){const{isReversed:t,gradientId:r,colorScale:n,colorMap:o}=e,s=[o.min??0,o.max??100],a=typeof s[0]=="number"?Tt(s[0],s[1]):sl(s[0],s[1]),i=Yv,l=`${s[0]}-${s[1]}-`;return g.jsx("linearGradient",K({id:r},Kv(t),{gradientUnits:"objectBoundingBox",children:Array.from({length:i+1},(c,u)=>{const d=u/i,h=a(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 Xv(){const{top:e,height:t,bottom:r,left:n,width:o,right:s}=pp(),a=e+t+r,i=n+o+s,l=Vv(),c=kv(),{xAxis:u,xAxisIds:d}=Rv(),{yAxis:h,yAxisIds:p}=Pv(),{zAxis:f,zAxisIds:m}=_v(),b=p.filter(v=>h[v].colorMap!==void 0),S=d.filter(v=>u[v].colorMap!==void 0),R=m.filter(v=>f[v].colorMap!==void 0);return b.length===0&&S.length===0&&R.length===0?null:g.jsxs("defs",{children:[b.map(v=>{const O=l(v),I=c(v),{colorMap:T,scale:w,colorScale:P,reverse:k}=h[v];return(T==null?void 0:T.type)==="piecewise"?g.jsx(Iu,{isReversed:!k,scale:w,colorMap:T,size:a,gradientId:O,direction:"y"},O):(T==null?void 0:T.type)==="continuous"?g.jsxs(V.Fragment,{children:[g.jsx(Au,{isReversed:!k,scale:w,colorScale:P,colorMap:T,size:a,gradientId:O,direction:"y"}),g.jsx(Ba,{isReversed:k,colorScale:P,colorMap:T,gradientId:I})]},O):null}),S.map(v=>{const O=l(v),I=c(v),{colorMap:T,scale:w,reverse:P,colorScale:k}=u[v];return(T==null?void 0:T.type)==="piecewise"?g.jsx(Iu,{isReversed:P,scale:w,colorMap:T,size:i,gradientId:O,direction:"x"},O):(T==null?void 0:T.type)==="continuous"?g.jsxs(V.Fragment,{children:[g.jsx(Au,{isReversed:P,scale:w,colorScale:k,colorMap:T,size:i,gradientId:O,direction:"x"}),g.jsx(Ba,{isReversed:P,colorScale:k,colorMap:T,gradientId:I})]},O):null}),R.map(v=>{const O=c(v),{colorMap:I,colorScale:T}=f[v];return(I==null?void 0:I.type)==="continuous"?g.jsx(Ba,{colorScale:T,colorMap:I,gradientId:O},O):null})]})}const Qv=["children","className","title","desc"],Zv=ft("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"})),wl=V.forwardRef(function(t,r){const n=Vr(),{width:o,height:s}=at(n,Ly),{width:a,height:i}=at(n,Uy),l=Mv(),c=js(l,r),u=$0({props:t,name:"MuiChartsSurface"}),{children:d,className:h,title:p,desc:f}=u,m=ir(u,Qv),b=s>0&&o>0;return g.jsxs(Zv,K({ownerState:{width:a,height:i},viewBox:`0 0 ${o} ${s}`,className:h},m,{ref:c,children:[p&&g.jsx("title",{children:p}),f&&g.jsx("desc",{children:f}),g.jsx(Xv,{}),b&&d]}))});process.env.NODE_ENV!=="production"&&(wl.displayName="ChartsSurface");process.env.NODE_ENV!=="production"&&(wl.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 In(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 Na(e){const t=gi(e);return[Math.sin(t),-Math.cos(t)]}function eC(e,t){const r=[[0,0],Na(e),Na(t)],n=Math.min(e,t),o=Math.max(e,t),s=Math.floor(n/90)*90;for(let u=1;u<=4;u+=1){const d=s+u*90;d<o&&r.push(Na(d))}const a=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:-a/(i-a),cy:-l/(c-l),minX:a,maxX:i,minY:l,maxY:c}}function tC(e,t,r,n,{minX:o,maxX:s,minY:a,maxY:i}){return Math.min(...[{ratio:Math.abs(o),space:e},{ratio:Math.abs(s),space:r-e},{ratio:Math.abs(a),space:t},{ratio:Math.abs(i),space:n-t}].map(({ratio:l,space:c})=>l<1e-5?1/0:c/l))}const Ol=V.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"&&(Ol.displayName="GaugeContext");function rC(e){const{value:t=null,valueMin:r=0,valueMax:n=100,startAngle:o=0,endAngle:s=360,outerRadius:a,innerRadius:i,cornerRadius:l,cx:c,cy:u,children:d}=e,{left:h,top:p,width:f,height:m}=pp(),b=eC(o,s),S=c?In(c,f):b.cx*f,R=u?In(u,m):b.cy*m;let v=h+S,O=p+R;const I=tC(S,R,f,m,b);if(c===void 0){const y=I*(b.maxX-b.minX);v=h+(f-y)/2+b.cx*y}if(u===void 0){const y=I*(b.maxY-b.minY);O=p+(m-y)/2+b.cy*y}const T=In(a??I,I),w=In(i??"80%",I),P=In(l??0,T-w),k=V.useMemo(()=>{const y=gi(o),A=gi(s);return{value:t,valueMin:r,valueMax:n,startAngle:y,endAngle:A,outerRadius:T,innerRadius:w,cornerRadius:P,cx:v,cy:O,maxRadius:I,valueAngle:t===null?null:y+(A-y)*(t-r)/(n-r)}},[t,r,n,o,s,T,w,P,v,O,I]);return g.jsx(Ol.Provider,{value:k,children:d})}function Tl(){return V.useContext(Ol)}const nC=["width","height","margin","title","desc","value","valueMin","valueMax","startAngle","endAngle","outerRadius","innerRadius","cornerRadius","cx","cy","children"],oC=ft("g")(({theme:e})=>({"& text":{fill:(e.vars||e).palette.text.primary}})),El=V.forwardRef(function(t,r){const{width:n,height:o,margin:s,title:a,desc:i,value:l,valueMin:c=0,valueMax:u=100,startAngle:d,endAngle:h,outerRadius:p,innerRadius:f,cornerRadius:m,cx:b,cy:S,children:R}=t,v=ir(t,nC);return g.jsx(Av,{pluginParams:{width:n,height:o,margin:uh(s,{left:10,right:10,top:10,bottom:10})},plugins:[],children:g.jsx(rC,{value:l,valueMin:c,valueMax:u,startAngle:d,endAngle:h,outerRadius:p,innerRadius:f,cornerRadius:m,cx:b,cy:S,children:g.jsx(wl,K({title:a,desc:i,role:"meter","aria-valuenow":l===null?void 0:l,"aria-valuemin":c,"aria-valuemax":u},v,{ref:r,children:g.jsx(oC,{"aria-hidden":"true",children:R})}))})})});process.env.NODE_ENV!=="production"&&(El.displayName="GaugeContainer");process.env.NODE_ENV!=="production"&&(El.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 sC(e){const t=Vr(),r=at(t,fy);return e||r}function aC(e,t){const r=Tt(e.startAngle,t.startAngle),n=Tt(e.endAngle,t.endAngle),o=Tt(e.innerRadius,t.innerRadius),s=Tt(e.outerRadius,t.outerRadius),a=Tt(e.cornerRadius,t.cornerRadius);return i=>({startAngle:r(i),endAngle:n(i),innerRadius:o(i),outerRadius:s(i),cornerRadius:a(i)})}function iC(e){return Wv({startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius},{createInterpolator:aC,transformProps:t=>({d:sp().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 lC=["cx","cy","startAngle","endAngle","cornerRadius","innerRadius","outerRadius","skipAnimation"],cC=ft("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.primary.main}));function bp(e){const{value:t,valueMin:r,valueMax:n,startAngle:o,endAngle:s,outerRadius:a,innerRadius:i,cornerRadius:l,cx:c,cy:u}=Tl();if(t===null)return null;const d=o+(t-r)/(n-r)*(s-o);return g.jsx(xp,K({},e,{cx:c,cy:u,startAngle:o,endAngle:d,cornerRadius:l,innerRadius:i,outerRadius:a}))}process.env.NODE_ENV!=="production"&&(bp.propTypes={skipAnimation:x.bool});function xp(e){let{cx:t,cy:r,startAngle:n,endAngle:o,cornerRadius:s,innerRadius:a,outerRadius:i,skipAnimation:l}=e,c=ir(e,lC);const u=sC(l),d=iC({startAngle:n,endAngle:o,cornerRadius:s,innerRadius:a,outerRadius:i,skipAnimation:u});return g.jsx(cC,K({},d,{transform:`translate(${t}, ${r})`},c))}process.env.NODE_ENV!=="production"&&(xp.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 uC=ft("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.divider}));function dC(e){const{startAngle:t,endAngle:r,outerRadius:n,innerRadius:o,cornerRadius:s,cx:a,cy:i}=Tl();return g.jsx(uC,K({transform:`translate(${a}, ${i})`,d:sp().cornerRadius(s)({startAngle:t,endAngle:r,innerRadius:o,outerRadius:n})},e))}function hC(e){return pn("MuiGauge",e)}Bi("MuiGauge",["root","valueArc","referenceArc","valueText"]);function pC(){return typeof window>"u"}const Vo=new Map,fC=2e3,mC={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},gC=["minWidth","maxWidth","width","minHeight","maxHeight","height","top","left","fontSize","padding","margin","paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom"],Ru="mui_measurement_span";function Sp(e,t){return gC.indexOf(e)>=0&&t===+t?`${t}px`:t}function vp(e){return e.split("").reduce((n,o)=>o===o.toUpperCase()?[...n,"-",o.toLowerCase()]:[...n,o],[]).join("")}const yC=e=>Object.keys(e).sort().reduce((t,r)=>`${t}${vp(r)}:${Sp(r,e[r])};`,"");let Fa;const bC=(e,t={})=>{if(e==null||pC())return{width:0,height:0};const r=`${e}`,n=yC(t),o=`${r}-${n}`,s=Vo.get(o);if(s)return s;try{let a=document.getElementById(Ru);a===null&&(a=document.createElement("span"),a.setAttribute("id",Ru),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));const i=K({},mC,t);Object.keys(i).map(u=>(a.style[vp(u)]=Sp(u,i[u]),u)),a.textContent=r;const l=a.getBoundingClientRect(),c={width:l.width,height:l.height};return Vo.set(o,c),Vo.size+1>fC&&Vo.clear(),process.env.NODE_ENV==="test"?a.textContent="":(Fa&&clearTimeout(Fa),Fa=setTimeout(()=>{a.textContent=""},0)),c}catch{return{width:0,height:0}}};function xC({style:e,needsComputation:t,text:r}){return r.split(`
|
|
124
|
-
`).map(n=>K({text:n},t?bC(n,e):{width:0,height:0}))}function SC(){const[e,t]=
|
|
125
|
-
`),text:o}),[u,o,d]);let p;switch(c){case"hanging":case"text-before-edge":p=0;break;case"central":p=(h.length-1)/2*-h[0].height;break;default:p=(h.length-1)*-h[0].height;break}return g.jsx("text",K({},s,{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"&&(Cp.propTypes={lineHeight:x.number,needsComputation:x.bool,ownerState:x.any,style:x.object,text:x.string.isRequired});const wC=["text","className"];function OC({value:e}){return e===null?null:e.toLocaleString()}function wp(e){const{text:t=OC,className:r}=e,n=ir(e,wC),{value:o,valueMin:s,valueMax:a,cx:i,cy:l}=Tl(),c=typeof t=="function"?t({value:o,valueMin:s,valueMax:a}):t;return c===null?null:g.jsx("g",{className:r,children:g.jsx(Cp,K({x:i,y:l,text:c,style:{textAnchor:"middle",dominantBaseline:"central"}},n))})}process.env.NODE_ENV!=="production"&&(wp.propTypes={lineHeight:x.number,needsComputation:x.bool,ownerState:x.any,style:x.object,text:x.oneOfType([x.func,x.string])});const TC=["text","children","classes","className","skipAnimation"],EC=e=>{const{classes:t}=e;return Cs({root:["root"],valueArc:["valueArc"],referenceArc:["referenceArc"],valueText:["valueText"]},hC,t)},Il=V.forwardRef(function(t,r){const{text:n,children:o,className:s,skipAnimation:a}=t,i=ir(t,TC),l=EC(t);return g.jsxs(El,K({},i,{className:Et(l.root,s),ref:r,children:[g.jsx(dC,{className:l.referenceArc}),g.jsx(bp,{className:l.valueArc,skipAnimation:a}),g.jsx(wp,{className:l.valueText,text:n}),o]}))});process.env.NODE_ENV!=="production"&&(Il.displayName="Gauge");process.env.NODE_ENV!=="production"&&(Il.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});const IC=e=>{const t=Math.floor(e/86400),r=Math.floor(e%86400/3600),n=Math.floor(e%3600/60),o=e%60,s=[];return t>0?(s.push(t.toString()),s.push(r.toString().padStart(2,"0")),s.push(n.toString().padStart(2,"0")),s.push(o.toString().padStart(2,"0"))):r>0?(s.push(r.toString()),s.push(n.toString().padStart(2,"0")),s.push(o.toString().padStart(2,"0"))):(s.push(n.toString()),s.push(o.toString().padStart(2,"0"))),s.join(":")},Mt=(e,t)=>{const r=Math.floor(e/86400),n=Math.floor(e%86400/3600),o=Math.floor(e%3600/60),s=e%60;if(typeof Intl<"u"&&"DurationFormat"in Intl)try{const i={};return r>0&&(i.days=r),n>0&&(i.hours=n),o>0&&(i.minutes=o),(s>0||Object.keys(i).length===0)&&(i.seconds=s),new Intl.DurationFormat(t,{style:"narrow"}).format(i)}catch{}const a=[];return r>0&&a.push(`${r}d`),n>0&&a.push(`${n}h`),o>0&&a.push(`${o}m`),(s>0||a.length===0)&&a.push(`${s}s`),a.join(" ")},AC=(e,t,r)=>e==="countdown"&&r!==null?Math.min(100,t/r*100):e==="measuring"?t/60%1*100:0,RC=({timerState:e,animationState:t,hasError:r,className:n})=>{const{t:o,i18n:s}=Ce.useTranslation(),a=E.useTheme(),{currentState:i,remainingTime:l,maxTime:c,currentProgress:u}=e,{showErrorAnimation:d,showPauseAnimation:h,showPulsatingText:p,pulsatingFinished:f,showLabels:m,showMainText:b,showIdlePulsating:S,idleDotsCount:R}=t;return g.jsxs(E.Box,{className:n,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx(Il,{width:264,height:264,value:i==="idle"?0:u,valueMin:0,valueMax:100,innerRadius:"85%",outerRadius:"100%",margin:0,skipAnimation:!0,text:()=>"",sx:{opacity:h||d?.6:1,transition:"opacity 0.5s ease-out","& .MuiGauge-valueArc":{fill:r?a.palette.error.light:a.palette.success.main,transition:"fill 0.5s ease-out"},"& .MuiGauge-referenceArc":{fill:"#171927",stroke:"transparent",strokeWidth:0,transition:"fill 0.5s ease-out, stroke 0.5s ease-out, stroke-width 0.5s ease-out"},"& .MuiGauge-valueText":{display:"none"},"& .MuiGauge-text":{display:"none"}}}),g.jsxs(E.Box,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:225,height:225,borderRadius:"50%",backgroundColor:"#292B3F",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1,transition:"background-color 0.5s ease-out"},children:[g.jsx(E.Box,{sx:{height:"16px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:1},children:g.jsx(E.Fade,{in:m&&!r&&i!=="idle"&&i!=="success",timeout:300,children:g.jsx(E.Typography,{variant:"body2",sx:{fontSize:"12px",color:i==="measured"&&(p||f)?a.palette.success.main:a.palette.text.secondary,transition:"color 0.8s ease-in-out"},children:g.jsx("span",{style:{opacity:i==="measured"&&f?p?1:.6:1,transition:"opacity 2s ease-in-out"},children:i==="measuring"||i==="measured"?o("CycleTimer.CycleTime.lb","Cycle Time"):i==="countdown"?o("CycleTimer.RemainingTime.lb","Remaining Time"):""})})})}),g.jsxs(E.Box,{sx:{position:"relative",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:[g.jsx(E.Fade,{in:b&&i==="idle"&&!r,timeout:200,children:g.jsxs(E.Typography,{variant:"body2",sx:{position:"absolute",fontSize:"12px",fontWeight:400,color:"rgba(255, 255, 255, 0.7)",lineHeight:"166%",letterSpacing:"0.17px",textAlign:"center",width:"200px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx("span",{style:{opacity:S?1:.6,transition:"opacity 2s ease-in-out"},children:o("CycleTimer.WaitingForCycle.lb","Waiting for program cycle")}),g.jsx("span",{style:{display:"inline-block",width:"18px",textAlign:"left",opacity:S?1:.6,transition:"opacity 2s ease-in-out"},children:".".repeat(R)})]})}),g.jsx(E.Fade,{in:b&&r,timeout:200,children:g.jsx(E.Typography,{variant:"h3",sx:{position:"absolute",fontSize:"40px",fontWeight:400,color:"#FFFFFF",lineHeight:"116.7%"},children:o("CycleTimer.Error.lb","Error")})}),g.jsx(E.Fade,{in:b&&!r&&i!=="idle"&&i!=="success",timeout:300,children:g.jsx(E.Typography,{variant:"h1",sx:{position:"absolute",fontSize:"48px",fontWeight:500,color:a.palette.text.primary,lineHeight:1,transition:"color 0.8s ease-in-out"},children:g.jsx("span",{style:{opacity:1,transition:"opacity 2s ease-in-out"},children:IC(l)})})})]}),g.jsx(E.Box,{sx:{height:"16px",display:"flex",marginTop:.5,alignItems:"center",justifyContent:"center"},children:g.jsx(E.Fade,{in:m&&!r&&i!=="idle"&&i!=="success",timeout:300,children:g.jsx(E.Typography,{variant:"body2",sx:{fontSize:"12px",color:i==="measured"&&(p||f)?a.palette.success.main:a.palette.text.secondary,transition:"color 0.8s ease-in-out"},children:g.jsx("span",{style:{opacity:i==="measured"&&f?p?1:.6:1,transition:"opacity 2s ease-in-out"},children:i==="measuring"?o("CycleTimer.Measuring.lb","measuring..."):i==="measured"?o("CycleTimer.Determined.lb","determined"):i==="countdown"&&c!==null?o("CycleTimer.OfTime.lb",{time:Mt(c,s.language)}):""})})})})]})]})},PC=({timerState:e,animationState:t,hasError:r,compact:n,className:o})=>{const{t:s,i18n:a}=Ce.useTranslation(),i=E.useTheme(),{currentState:l,remainingTime:c,maxTime:u}=e,{showErrorAnimation:d,showPauseAnimation:h,showPulsatingText:p,pulsatingFinished:f,showIdlePulsating:m,idleDotsCount:b}=t;return n&&l==="idle"?g.jsx(E.Box,{className:o,sx:{display:"flex",alignItems:"center",m:0},children:g.jsx(E.Typography,{variant:"body2",sx:{color:r?i.palette.error.light:i.palette.text.primary,fontSize:"14px",transition:"color 0.5s ease-out"},children:r?s("CycleTimer.Error.lb","Error"):l==="idle"?"0s":Mt(c,a.language)})}):g.jsxs(E.Box,{className:o,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[!(l==="idle"&&n)&&g.jsx(E.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:h||d?.6:1,transition:"opacity 0.5s ease-out"},children:g.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)"},role:"img","aria-label":"Timer progress",children:[g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:r?i.palette.error.light:l==="measured"?p||f?i.palette.success.main:i.palette.text.secondary:i.palette.success.main,strokeWidth:"2",opacity:l==="measured"&&f?p?1:.6:.3,style:{transition:"stroke 0.8s ease-in-out, opacity 2s ease-in-out"}}),g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:r?i.palette.error.light:l==="measured"?p||f?i.palette.success.main:i.palette.text.secondary:i.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-(l==="idle"?0:e.currentProgress)/100)}`,style:{opacity:l==="measured"&&f?p?1:.6:1,transition:"stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"}})]})}),g.jsx(E.Typography,{variant:"body2",sx:{color:r?i.palette.error.light:l==="idle"?"rgba(255, 255, 255, 0.7)":l==="measured"?p||f?i.palette.success.main:i.palette.text.secondary:i.palette.text.primary,fontSize:"14px",lineHeight:"normal",letterSpacing:"normal",opacity:l==="idle"?m?1:.6:l==="measured"&&f?p?1:.6:1,transition:"color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"},children:r?s("CycleTimer.Error.lb","Error"):l==="idle"?g.jsxs(g.Fragment,{children:[g.jsx("span",{children:s("CycleTimer.WaitingForCycle.lb","Waiting for program cycle")}),g.jsx("span",{style:{display:"inline-block",width:"18px",textAlign:"left"},children:".".repeat(b)})]}):l==="measuring"?n?Mt(c,a.language):`${Mt(c,a.language)} / ${s("CycleTimer.Measuring.lb","measuring...")}`:l==="measured"?n?Mt(c,a.language):`${Mt(c,a.language)} / ${s("CycleTimer.Determined.lb","determined")}`:l==="countdown"&&u!==null?n?Mt(c,a.language):`${Mt(c,a.language)} / ${s("CycleTimer.Time.lb",{time:Mt(u,a.language)})}`:Mt(c,a.language)})]})},_C=()=>{const[e,t]=D.useState({showPauseAnimation:!1,showErrorAnimation:!1,showPulsatingText:!1,pulsatingFinished:!1,showLabels:!0,showMainText:!0,showIdlePulsating:!1,idleDotsCount:0}),r=D.useRef(null),n=D.useRef(null),o=D.useRef(null),s=D.useRef(null),a=D.useRef(0),i=D.useRef(null),l=D.useRef(null),c=D.useCallback(()=>{t(v=>({...v,showPauseAnimation:!0})),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(v=>({...v,showPauseAnimation:!1}))},800)},[]),u=D.useCallback(()=>{t(v=>({...v,showErrorAnimation:!0})),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{t(v=>({...v,showErrorAnimation:!1}))},600)},[]),d=D.useCallback(()=>{t(v=>({...v,showErrorAnimation:!1})),n.current&&clearTimeout(n.current)},[]),h=D.useCallback(v=>{a.current=0,t(O=>({...O,showPulsatingText:!0,pulsatingFinished:!1})),setTimeout(()=>{t(O=>({...O,pulsatingFinished:!0})),o.current=setInterval(()=>{t(O=>({...O,showPulsatingText:!O.showPulsatingText}))},2e3),v&&v()},800)},[]),p=D.useCallback(()=>{o.current&&(clearInterval(o.current),o.current=null),t(v=>({...v,showPulsatingText:!1,pulsatingFinished:!1})),a.current=0},[]),f=D.useCallback(()=>{t(v=>({...v,showIdlePulsating:!0})),i.current=setInterval(()=>{t(v=>({...v,showIdlePulsating:!v.showIdlePulsating}))},2e3),l.current=setInterval(()=>{t(v=>({...v,idleDotsCount:(v.idleDotsCount+1)%4}))},800)},[]),m=D.useCallback(()=>{i.current&&(clearInterval(i.current),i.current=null),l.current&&(clearInterval(l.current),l.current=null),t(v=>({...v,showIdlePulsating:!1,idleDotsCount:0}))},[]),b=D.useCallback(()=>{t(v=>({...v,showLabels:!1,showMainText:!1})),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{t(v=>({...v,showLabels:!0,showMainText:!0}))},200)},[]),S=D.useCallback(()=>{t(v=>({...v,showLabels:!0,showMainText:!0}))},[]),R=D.useCallback(()=>{r.current&&clearTimeout(r.current),n.current&&clearTimeout(n.current),s.current&&clearTimeout(s.current),o.current&&clearInterval(o.current),i.current&&clearInterval(i.current),l.current&&clearInterval(l.current)},[]);return{animationState:e,triggerPauseAnimation:c,triggerErrorAnimation:u,clearErrorAnimation:d,startPulsatingAnimation:h,stopPulsatingAnimation:p,startIdleAnimations:f,stopIdleAnimations:m,triggerFadeTransition:b,setInitialAnimationState:S,cleanup:R}};class Al{constructor(t=[],r={}){this.currentValues=[],this.targetValues=[],this.previousTargetValues=[],this.targetUpdateTime=0,this.animationId=null,this.updateCount=0,this.velocities=[],this.animate=()=>{this.update(.016666666666666666)?this.animationId=null:this.animationId=requestAnimationFrame(this.animate)},this.options={tension:120,friction:20,threshold:.001,onChange:()=>{},onComplete:()=>{},...r},this.currentValues=[...t],this.targetValues=[...t],this.previousTargetValues=[...t],this.velocities=new Array(t.length).fill(0),this.targetUpdateTime=performance.now(),this.updateCount=0}update(t=1/60){let r=!1,n=!0;this.updateCount++;const o=Math.min(t,1/15),s=this.updateCount===1?.7:1;for(let a=0;a<this.currentValues.length;a++){const i=this.currentValues[a],l=this.targetValues[a],c=this.velocities[a],u=l-i,d=u*this.options.tension*s,h=c*this.options.friction,p=d-h,f=c+p*o,m=i+f*o;Math.abs(u)<this.options.threshold&&Math.abs(f)<this.options.threshold*10?this.currentValues[a]!==l&&(this.currentValues[a]=l,this.velocities[a]=0,r=!0):(n=!1,this.currentValues[a]=m,this.velocities[a]=f,r=!0)}return r&&this.options.onChange(this.currentValues),n&&this.options.onComplete(this.currentValues),n}setTarget(t){const r=performance.now(),n=r-this.targetUpdateTime;this.previousTargetValues=[...this.targetValues],this.targetValues=[...t],this.targetUpdateTime=r,this.updateCount=0;const o=this.previousTargetValues.every((s,a)=>s===this.currentValues[a]);if(n<8&&n>0&&this.previousTargetValues.length>0&&!o){const s=Math.min(n/8,1);for(let a=0;a<this.targetValues.length;a++){const i=this.previousTargetValues[a]||0,l=t[a]||0;Math.abs(l-i)>.1&&(this.targetValues[a]=i+(l-i)*s)}}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 Rl(e=[],t={}){const r=D.useRef(null);return r.current||(r.current=new Al(e,t)),D.useEffect(()=>{var n;(n=r.current)==null||n.updateOptions(t)},[t]),D.useEffect(()=>()=>{var n;(n=r.current)==null||n.destroy()},[]),[r.current]}const MC=({autoStart:e,onCycleEnd:t,onMeasuringComplete:r,hasError:n,onPauseAnimation:o,onErrorAnimation:s,onClearErrorAnimation:a,onStartPulsating:i})=>{const[l,c]=D.useState({currentState:"idle",remainingTime:0,maxTime:null,isRunning:!1,isPausedState:!1,currentProgress:0,wasRunningBeforeError:!1}),u=D.useRef(null),d=D.useRef(null),h=D.useRef(0),[p]=Rl([0],{tension:80,friction:18,onChange:([I])=>{c(T=>({...T,currentProgress:I}))}}),f=D.useCallback(()=>{c(I=>({...I,currentState:"idle",maxTime:null,isRunning:!1,isPausedState:!1,currentProgress:0})),h.current=0,d.current=null,p.setImmediate([0])},[p]),m=D.useCallback((I=0)=>{const T=I/60%1*100;c(w=>({...w,currentState:"measuring",maxTime:null,remainingTime:I,isPausedState:!1,currentProgress:T})),h.current=0,p.setImmediate([T]),e?(d.current=Date.now()-I*1e3,c(w=>({...w,isRunning:!0}))):d.current=null},[e,p]),b=D.useCallback((I,T=0)=>{c(k=>({...k,isRunning:!1})),d.current=null,c(k=>({...k,currentState:"countdown",maxTime:I,isPausedState:!1})),h.current=0;const w=Math.max(0,I-T),P=T>0?T/I*100:0;c(k=>({...k,remainingTime:w,currentProgress:P})),p.setImmediate([P]),w===0?(c(k=>({...k,isRunning:!1})),d.current=null,t&&queueMicrotask(()=>t())):e?setTimeout(()=>{d.current=Date.now()-T*1e3,c(k=>({...k,isRunning:!0}))},0):d.current=null},[e,t,p]),S=D.useCallback(()=>{c(I=>({...I,isRunning:!1,currentState:"measured"})),d.current=null,i(()=>{r&&r()})},[i,r]),R=D.useCallback(()=>{if(d.current&&l.isRunning){const T=Date.now()-d.current;h.current+=T;const w=h.current/1e3,P=AC(l.currentState,w,l.maxTime);p.setTarget([P])}c(I=>({...I,isRunning:!1,isPausedState:!0})),o()},[l.isRunning,l.currentState,l.maxTime,p,o]),v=D.useCallback(()=>{l.isPausedState&&(l.remainingTime>0||l.currentState!=="countdown")&&(d.current=Date.now(),c(I=>({...I,isRunning:!0,isPausedState:!1})))},[l.isPausedState,l.remainingTime,l.currentState]),O=D.useCallback(()=>l.isPausedState,[l.isPausedState]);return D.useEffect(()=>{n?(l.isRunning&&!l.isPausedState&&(c(I=>({...I,wasRunningBeforeError:!0})),R()),s()):(l.wasRunningBeforeError&&l.isPausedState&&(c(I=>({...I,wasRunningBeforeError:!1})),v()),a())},[n,l.isRunning,l.isPausedState,l.wasRunningBeforeError,R,v,s,a]),D.useEffect(()=>{if(l.isRunning){const I=()=>{if(d.current){const w=(Date.now()-d.current+h.current)/1e3;if(l.currentState==="countdown"&&l.maxTime!==null){const P=Math.max(0,l.maxTime-w);c(y=>({...y,remainingTime:Math.ceil(P)}));const k=Math.min(100,w/l.maxTime*100);if(p.setTarget([k]),P<=0){c(y=>({...y,isRunning:!1,remainingTime:0})),d.current=null,p.setTarget([100]),t&&queueMicrotask(()=>t());return}}else if(l.currentState==="measuring"){c(k=>({...k,remainingTime:Math.floor(w)}));const P=w/60%1*100;p.setTarget([P])}l.isRunning&&(u.current=requestAnimationFrame(I))}};u.current=requestAnimationFrame(I)}else u.current&&(cancelAnimationFrame(u.current),u.current=null);return()=>{u.current&&cancelAnimationFrame(u.current)}},[l.isRunning,t,l.currentState,l.maxTime,p]),D.useEffect(()=>{let I=null;const T=()=>{p.update(1/60),I=requestAnimationFrame(T)};return I=requestAnimationFrame(T),()=>{I&&cancelAnimationFrame(I)}},[p]),{timerState:l,controls:{startNewCycle:b,startMeasuring:m,setIdle:f,completeMeasuring:S,pause:R,resume:v,isPaused:O}}},VC=Ue(ge.observer(({onCycleComplete:e,onCycleEnd:t,onMeasuringComplete:r,autoStart:n=!0,variant:o="default",compact:s=!1,className:a,hasError:i=!1})=>{const l=D.useRef(void 0),{animationState:c,triggerPauseAnimation:u,triggerErrorAnimation:d,clearErrorAnimation:h,startPulsatingAnimation:p,stopPulsatingAnimation:f,startIdleAnimations:m,stopIdleAnimations:b,triggerFadeTransition:S,setInitialAnimationState:R,cleanup:v}=_C(),{timerState:O,controls:I}=MC({autoStart:n,onCycleEnd:t,onMeasuringComplete:r,hasError:i,onPauseAnimation:u,onErrorAnimation:d,onClearErrorAnimation:h,onStartPulsating:p});return D.useEffect(()=>{const T=l.current;l.current!==void 0&&T!==O.currentState?(T==="measured"&&f(),T==="idle"&&b(),S()):R(),O.currentState==="idle"&&m(),l.current=O.currentState},[O.currentState,f,b,m,S,R]),D.useEffect(()=>{let T=!0;const w=setTimeout(()=>{T&&e(I)},0);return()=>{T=!1,clearTimeout(w)}},[e,I]),D.useEffect(()=>v,[v]),o==="small"?g.jsx(PC,{timerState:O,animationState:c,hasError:i,compact:s,className:a}):g.jsx(RC,{timerState:O,animationState:c,hasError:i,className:a})})),kC=e=>{const t=Math.floor(e/86400),r=Math.floor(e%86400/3600),n=Math.floor(e%3600/60),o=e%60,s=[];return t>0?(s.push(t.toString()),s.push(r.toString().padStart(2,"0")),s.push(n.toString().padStart(2,"0")),s.push(o.toString().padStart(2,"0"))):r>0?(s.push(r.toString()),s.push(n.toString().padStart(2,"0")),s.push(o.toString().padStart(2,"0"))):(s.push(n.toString()),s.push(o.toString().padStart(2,"0"))),s.join(":")},Pu=(e,t)=>{const r=Math.floor(e/86400),n=Math.floor(e%86400/3600),o=Math.floor(e%3600/60),s=e%60;if(typeof Intl<"u"&&"DurationFormat"in Intl)try{const i={};return r>0&&(i.days=r),n>0&&(i.hours=n),o>0&&(i.minutes=o),(s>0||Object.keys(i).length===0)&&(i.seconds=s),new Intl.DurationFormat(t,{style:"narrow"}).format(i)}catch{}const a=[];return r>0&&a.push(`${r}d`),n>0&&a.push(`${n}h`),o>0&&a.push(`${o}m`),(s>0||a.length===0)&&a.push(`${s}s`),a.join(" ")},jC=({timerState:e,animationState:t,hasError:r,className:n})=>{const{t:o}=Ce.useTranslation(),s=nh(),{elapsedTime:a,currentProgress:i}=e,{showErrorAnimation:l,showPauseAnimation:c,showMainText:u}=t;return g.jsxs(E.Box,{className:n,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx(Yf.Gauge,{width:264,height:264,value:i,valueMin:0,valueMax:100,innerRadius:"85%",outerRadius:"100%",margin:0,skipAnimation:!0,text:()=>"",sx:{opacity:c||l?.6:1,transition:"opacity 0.5s ease-out","& .MuiGauge-valueArc":{fill:r?s.palette.error.light:s.palette.success.main,transition:"fill 0.5s ease-out"},"& .MuiGauge-referenceArc":{fill:"#171927",stroke:"transparent",strokeWidth:0,transition:"fill 0.5s ease-out, stroke 0.5s ease-out, stroke-width 0.5s ease-out"},"& .MuiGauge-valueText":{display:"none"},"& .MuiGauge-text":{display:"none"}}}),g.jsx(E.Box,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:225,height:225,borderRadius:"50%",backgroundColor:"#292B3F",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1,transition:"background-color 0.5s ease-out"},children:g.jsxs(E.Box,{sx:{position:"relative",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:[g.jsx(E.Fade,{in:u&&r,timeout:200,children:g.jsx(E.Typography,{variant:"h6",sx:{position:"absolute",fontSize:"16px",fontWeight:500,color:s.palette.error.light},children:o("timer.error")})}),g.jsx(E.Fade,{in:u&&!r,timeout:300,children:g.jsx(E.Typography,{variant:"h1",sx:{position:"absolute",fontSize:"48px",fontWeight:500,color:s.palette.text.primary,lineHeight:1,letterSpacing:"-0.5px"},children:kC(a)})})]})})]})},DC=({timerState:e,animationState:t,hasError:r,compact:n,className:o})=>{const{t:s,i18n:a}=Ce.useTranslation(),i=nh(),{elapsedTime:l,currentProgress:c}=e,{showErrorAnimation:u,showPauseAnimation:d}=t;return n?g.jsx(E.Box,{className:o,sx:{display:"flex",alignItems:"center",m:0},children:g.jsx(E.Typography,{variant:"body2",sx:{color:r?i.palette.error.light:i.palette.text.primary,fontSize:"14px",transition:"color 0.5s ease-out"},children:r?s("timer.error"):Pu(l,a.language)})}):g.jsxs(E.Box,{className:o,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[g.jsx(E.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:d||u?.6:1,transition:"opacity 0.5s ease-out"},children:g.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)"},role:"img","aria-label":"Timer progress",children:[g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:r?i.palette.error.light:i.palette.success.main,strokeWidth:"2",opacity:.3,style:{transition:"stroke 0.8s ease-in-out, opacity 2s ease-in-out"}}),g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:r?i.palette.error.light:i.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-c/100)}`,style:{transition:"stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"}})]})}),g.jsx(E.Typography,{variant:"body2",sx:{color:r?i.palette.error.light:i.palette.text.primary,fontSize:"14px",lineHeight:"normal",letterSpacing:"normal",transition:"color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"},children:r?s("timer.error"):Pu(l,a.language)})]})},UC=()=>{const[e,t]=D.useState({showPauseAnimation:!1,showErrorAnimation:!1,showMainText:!0}),r=D.useRef(null),n=D.useRef(null),o=D.useRef(null),s=D.useCallback(()=>{t(d=>({...d,showPauseAnimation:!0})),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(d=>({...d,showPauseAnimation:!1}))},800)},[]),a=D.useCallback(()=>{t(d=>({...d,showErrorAnimation:!0})),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{t(d=>({...d,showErrorAnimation:!1}))},600)},[]),i=D.useCallback(()=>{t(d=>({...d,showErrorAnimation:!1})),n.current&&clearTimeout(n.current)},[]),l=D.useCallback(()=>{t(d=>({...d,showMainText:!1})),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{t(d=>({...d,showMainText:!0}))},200)},[]),c=D.useCallback(()=>{t(d=>({...d,showMainText:!0}))},[]),u=D.useCallback(()=>{r.current&&clearTimeout(r.current),n.current&&clearTimeout(n.current),o.current&&clearTimeout(o.current)},[]);return{animationState:e,triggerPauseAnimation:s,triggerErrorAnimation:a,clearErrorAnimation:i,triggerFadeTransition:l,setInitialAnimationState:c,cleanup:u}},LC=({autoStart:e,hasError:t,onPauseAnimation:r,onErrorAnimation:n,onClearErrorAnimation:o})=>{const[s,a]=D.useState({elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0,wasRunningBeforeError:!1}),i=D.useRef(null),l=D.useRef(null),c=D.useRef(0),u=D.useRef(0),[d]=Rl([0],{tension:80,friction:18,onChange:([S])=>{a(R=>({...R,currentProgress:S}))}}),h=D.useCallback((S=0)=>{const R=S/60%1*100;a(v=>({...v,elapsedTime:S,isPausedState:!1,currentProgress:R})),c.current=0,u.current=R,d.setImmediate([R]),e?(l.current=Date.now()-S*1e3,a(v=>({...v,isRunning:!0}))):l.current=null},[e,d]),p=D.useCallback(()=>{if(l.current&&s.isRunning){const R=(Date.now()-l.current)/1e3+c.current,v=R/60%1*100;d.setTarget([v]),a(O=>({...O,elapsedTime:Math.floor(R)}))}a(S=>({...S,isRunning:!1,isPausedState:!0})),r()},[s.isRunning,d,r]),f=D.useCallback(()=>{s.isPausedState&&(c.current=s.elapsedTime,l.current=Date.now(),a(S=>({...S,isRunning:!0,isPausedState:!1})))},[s.isPausedState,s.elapsedTime]),m=D.useCallback(()=>{a(S=>({...S,elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0})),c.current=0,l.current=null,u.current=0,d.setImmediate([0])},[d]),b=D.useCallback(()=>s.isPausedState,[s.isPausedState]);return D.useEffect(()=>{t?(s.isRunning&&(a(S=>({...S,wasRunningBeforeError:!0})),p()),n()):(s.wasRunningBeforeError&&!s.isRunning&&(a(S=>({...S,wasRunningBeforeError:!1})),f()),o())},[t,s.isRunning,s.wasRunningBeforeError,p,f,n,o]),D.useEffect(()=>{if(s.isRunning){const S=()=>{if(l.current){const v=(Date.now()-l.current)/1e3+c.current,O=v/60%1*100;a(T=>({...T,elapsedTime:Math.floor(v)})),Math.abs(O-u.current)>.1&&(d.setTarget([O]),u.current=O)}i.current=requestAnimationFrame(S)};i.current=requestAnimationFrame(S)}else i.current&&(cancelAnimationFrame(i.current),i.current=null);return()=>{i.current&&(cancelAnimationFrame(i.current),i.current=null)}},[s.isRunning,d]),D.useEffect(()=>{let S=null;const R=()=>{d.update(),S=requestAnimationFrame(R)};return S=requestAnimationFrame(R),()=>{S&&cancelAnimationFrame(S)}},[d]),{timerState:s,controls:{start:h,pause:p,resume:f,reset:m,isPaused:b}}},BC=Ue(ge.observer(({onTimerReady:e,autoStart:t=!0,variant:r="default",compact:n=!1,className:o,hasError:s=!1})=>{const{animationState:a,triggerPauseAnimation:i,triggerErrorAnimation:l,clearErrorAnimation:c,setInitialAnimationState:u,cleanup:d}=UC(),{timerState:h,controls:p}=LC({autoStart:t,hasError:s,onPauseAnimation:i,onErrorAnimation:l,onClearErrorAnimation:c});return D.useEffect(()=>{u()},[u]),D.useEffect(()=>{let f=!0;const m=setTimeout(()=>{f&&e(p)},0);return()=>{f=!1,clearTimeout(m)}},[e,p]),D.useEffect(()=>d,[d]),r==="small"?g.jsx(DC,{timerState:h,animationState:a,hasError:s,compact:n,className:o}):g.jsx(jC,{timerState:h,animationState:a,hasError:s,className:o})})),kr=Xg;process.env.NODE_ENV!=="production"&&(x.node,x.object.isRequired);function Pl(e){return Kg(e)}function NC(e){return pn("MuiSvgIcon",e)}Bi("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const FC=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${tt(t)}`,`fontSize${tt(r)}`]};return Cs(o,NC,n)},$C=ft("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${tt(r.color)}`],t[`fontSize${tt(r.fontSize)}`]]}})(kr(({theme:e})=>{var t,r,n,o,s,a,i,l,c,u,d,h,p,f;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(t=e.transitions)==null?void 0:t.create)==null?void 0:o.call(t,"fill",{duration:(n=(r=(e.vars??e).transitions)==null?void 0:r.duration)==null?void 0:n.shorter}),variants:[{props:m=>!m.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((a=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:a.call(s,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:l.call(i,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,m])=>m&&m.main).map(([m])=>{var b,S;return{props:{color:m},style:{color:(S=(b=(e.vars??e).palette)==null?void 0:b[m])==null?void 0:S.main}}}),{props:{color:"action"},style:{color:(h=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:h.active}},{props:{color:"disabled"},style:{color:(f=(p=(e.vars??e).palette)==null?void 0:p.action)==null?void 0:f.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),bs=V.forwardRef(function(t,r){const n=Pl({props:t,name:"MuiSvgIcon"}),{children:o,className:s,color:a="inherit",component:i="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:h="0 0 24 24",...p}=n,f=V.isValidElement(o)&&o.type==="svg",m={...n,color:a,component:i,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:f},b={};u||(b.viewBox=h);const S=FC(m);return g.jsxs($C,{as:i,className:Et(S.root,s),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r,...b,...p,...f&&o.props,ownerState:m,children:[f?o.props.children:o,d?g.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(bs.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});bs.muiName="SvgIcon";function pr(e,t){function r(n,o){return g.jsx(bs,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:o,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=bs.muiName,V.memo(V.forwardRef(r))}function zC(e){const{controlled:t,default:r,name:n,state:o="value"}=e,{current:s}=V.useRef(t!==void 0),[a,i]=V.useState(r),l=s?t:a;if(process.env.NODE_ENV!=="production"){V.useEffect(()=>{s!==(t!==void 0)&&console.error([`MUI: A component is changing the ${s?"":"un"}controlled ${o} state of ${n} to be ${s?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
126
|
-
`))},[o,n,t]);const{current:u}=
|
|
127
|
-
`))},[JSON.stringify(r)])}const c=V.useCallback(u=>{s||i(u)},[]);return[l,c]}const GC=pr(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"),HC=pr(g.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),_u=pr(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"),Op=Ue(ge.observer(({data:e,columns:t,getRowData:r,onRowClick:n,selectedItem:o,getItemId:s,title:a,showCount:i=!0,searchPlaceholder:l="Search programs",dataGridProps:c,CustomToolbar:u,selectFirstByDefault:d=!1,sx:h})=>{var P;const p=E.useTheme(),f=Ct.useGridApiRef(),m=D.useRef(null),[b,S]=D.useState(null),R=D.useMemo(()=>e.map(r),[e,r]);D.useEffect(()=>{f.current&&R.length>0&&f.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:t.map(k=>k.field)})},[R,t,f]),D.useEffect(()=>{if(!m.current||!f.current)return;const k=new ResizeObserver(()=>{setTimeout(()=>{f.current&&R.length>0&&f.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:t.map(y=>y.field)})},100)});return k.observe(m.current),()=>{k.disconnect()}},[f,R.length,t]);const v=D.useMemo(()=>{if(o!==void 0)return o;if(b!==null)return b;if(d&&e.length>0){const k=e[0];return S(k),k}return null},[d,e,o,b]),O=k=>{const y=e.find(A=>r(A).id===k.id);y&&(o===void 0&&S(y),n&&n(y,k))},I=D.useMemo(()=>!v||!s?null:s(v),[v,s]);function T(){return g.jsx(Ct.Toolbar,{children:g.jsxs(E.Box,{sx:{display:"flex",width:"100%",gap:1,p:.5,alignItems:"center"},children:[a&&g.jsxs(E.Typography,{variant:"h6",sx:{fontWeight:500,color:"white"},children:[a,i&&` (${e.length})`]}),g.jsxs(E.Box,{sx:{ml:"auto",display:"flex",gap:.5,alignItems:"center",pr:1},children:[g.jsx(Ct.FilterPanelTrigger,{render:g.jsx(Ct.ToolbarButton,{"aria-label":"Show filters",children:g.jsx(HC,{fontSize:"small"})})}),g.jsx(E.Divider,{orientation:"vertical",flexItem:!0,sx:{height:"24px",alignSelf:"center"}}),g.jsx(Ct.QuickFilter,{render:(k,y)=>g.jsxs(E.Box,{...k,sx:{display:"flex",overflow:"hidden"},children:[!y.expanded&&g.jsx(Ct.QuickFilterTrigger,{render:g.jsx(Ct.ToolbarButton,{"aria-label":"Search",children:g.jsx(_u,{fontSize:"small"})})}),g.jsxs(E.Box,{sx:{display:"flex",overflow:"hidden",transition:"all 0.3s ease-in-out",width:y.expanded?"200px":"0px",position:"relative"},children:[g.jsxs(E.Box,{sx:{flex:1,position:"relative","& .MuiInputBase-root":{height:"32px",borderRadius:"16px",backgroundColor:"#171927",paddingLeft:"40px",paddingRight:y.expanded&&y.value!==""?"40px":"12px",color:"white",fontSize:"14px",border:"none !important",outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"},"&:hover":{"&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"&:focus-within":{outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"&.Mui-focused":{outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"& .MuiInputBase-input":{padding:"8px 0",border:"none !important",outline:"none !important",boxShadow:"none !important","&:focus":{outline:"none !important",boxShadow:"none !important",border:"none !important"},"&::placeholder":{color:"rgba(255, 255, 255, 0.3)",opacity:1}},"& fieldset":{border:"none !important",display:"none !important"},"& .MuiOutlinedInput-notchedOutline":{border:"none !important",display:"none !important"}}},children:[y.expanded&&g.jsx(_u,{fontSize:"small",sx:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:"rgba(255, 255, 255, 0.6)",zIndex:1,pointerEvents:"none"}}),g.jsx(Ct.QuickFilterControl,{placeholder:l})]}),y.expanded&&y.value!==""&&g.jsx(Ct.QuickFilterClear,{render:g.jsx(E.Box,{sx:{position:"absolute",right:"8px",top:"50%",transform:"translateY(-50%)",zIndex:1},children:g.jsx(E.Box,{sx:{minWidth:"24px",width:"24px",height:"24px",padding:0,color:"rgba(255, 255, 255, 0.6)","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.1)"}},children:g.jsx(Ct.ToolbarButton,{"aria-label":"Clear",children:g.jsx(GC,{fontSize:"small"})})})})})]})]})})]})]})})}const w=u||T;return g.jsx(E.Box,{ref:m,sx:{height:"100%",display:"flex",flexDirection:"column","& *":{scrollbarWidth:"none",msOverflowStyle:"none","&::-webkit-scrollbar":{display:"none"}},"&:hover *":{scrollbarWidth:"thin",scrollbarColor:`${p.palette.divider} transparent`,"&::-webkit-scrollbar":{display:"block",width:"8px",height:"8px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:p.palette.divider,borderRadius:"4px"},"&::-webkit-scrollbar-thumb:hover":{background:p.palette.action.hover}},...h},children:g.jsx(Ct.DataGrid,{apiRef:f,rows:R,columns:t,onRowClick:O,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:!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(k=>k.field)},sx:{border:"none",width:"100%","& .MuiPaper-root":{boxShadow:"none !important"},"& .MuiDataGrid-overlay":{},"& .MuiDataGrid-main":{border:"none","& .MuiPaper-root":{}},"& .MuiDataGrid-container--top [role=row]":{},"& .MuiDataGrid-topContainer":{borderBottom:"none !important"},"& .MuiDataGrid-columnHeaders":{border:"none",borderBottom:"none !important"},"& .MuiDataGrid-row":{cursor:n?"pointer":"default",border:"none",margin:"1px 0",position:"relative",backgroundColor:"transparent !important","&:hover":{backgroundColor:"transparent !important","&::before":{content:'""',position:"absolute",top:0,left:"16px",right:"16px",bottom:0,backgroundColor:"action.hover",borderRadius:"16px",zIndex:0}},"&.Mui-selected":{backgroundColor:"transparent !important","&:hover":{backgroundColor:"transparent !important"}},...I!==null&&{[`&[data-id="${I}"]`]:{backgroundColor:"transparent !important","&::before":{content:'""',position:"absolute",top:0,left:"16px",right:"16px",bottom:0,backgroundColor:"rgba(255, 255, 255, 0.08) !important",borderRadius:"16px",zIndex:0},"&:hover":{backgroundColor:"transparent !important"},"&:hover::before":{backgroundColor:"rgba(255, 255, 255, 0.12) !important"}}}},"& .MuiDataGrid-cell--textLeft":{paddingLeft:"40px"},"& .MuiDataGrid-cell":{border:"none",position:"relative",zIndex:1,"&:focus":{outline:"none"},"&:focus-within":{outline:"none"},"&:hover":{backgroundColor:"transparent !important"}},"& .MuiDataGrid-columnHeader":{border:"none",paddingLeft:"40px",paddingRight:"40px","& .MuiDataGrid-columnHeaderTitle":{color:"rgba(255, 255, 255, 0.6)"}},"& .MuiDataGrid-toolbarContainer":{padding:"8px",border:"none !important",borderBottom:"none !important","& .MuiBox-root":{},"& .MuiFormControl-root":{},"& .MuiInputBase-root":{},"& .MuiPaper-root":{boxShadow:"none !important"},"& *":{borderBottom:"none !important"}},"& .MuiDataGrid-toolbar":{borderBottom:"none !important"},"& .MuiDataGrid-toolbarFilterList":{border:"none"},"& .MuiDataGrid-withBorderColor":{borderColor:"transparent !important"},"& .MuiDataGrid-columnSeparator":{display:"none"},"& .MuiDataGrid-footerContainer":{display:"none"},"& .MuiDataGrid-filler":{border:"none !important",borderTop:"none !important",borderBottom:"none !important",borderLeft:"none !important",borderRight:"none !important","--rowBorderColor":"none !important"},"& .MuiBackdrop-root":{},"& .MuiModal-backdrop":{},...c==null?void 0:c.sx}})})}));Op.displayName="WandelbotsDataGrid";const en=c0({createStyledComponent:ft("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>Pl({props:e,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(en.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 qC=({title:e,titleId:t,...r},n)=>V.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?V.createElement("title",{id:t},e):null,V.createElement("g",{id:"JogMinus"},V.createElement("path",{id:"Minus",d:"M0 13V8H21V13H0Z",fill:"white"}))),WC=D.forwardRef(qC),JC=({title:e,titleId:t,...r},n)=>V.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?V.createElement("title",{id:t},e):null,V.createElement("g",{id:"JogPlus"},V.createElement("g",{id:"Plus"},V.createElement("path",{d:"M0 13V8H8V13H0Z",fill:"white"}),V.createElement("path",{d:"M8 0L13 2.18557e-07L13 21H8L8 0Z",fill:"white"}),V.createElement("path",{d:"M13 13V8H21V13H13Z",fill:"white"})))),YC=D.forwardRef(JC);function Zs(e){D.useEffect(e,[])}function Tp(e){Zs(()=>We.autorun(e))}function Ep(e,t,r){Zs(()=>We.reaction(e,t,r))}function ea(e){return Zs(()=>{let t;function r(){e(),t=requestAnimationFrame(r)}return t=requestAnimationFrame(r),()=>{cancelAnimationFrame(t)}})}const xi=Ue(ge.observer(({colors:e,label:t,getDisplayedValue:r,startJogging:n,stopJogging:o,disabled:s,activeJoggingDirection:a,...i})=>{var v,O,I,T,w,P,k;ea(()=>{const y=r(),A=h.current;A&&(A.textContent=y)});const l=E.useTheme(),[c,u]=D.useState(null);D.useEffect(()=>{s&&R()},[s]);const d=a||c,h=D.useRef(null);e||(e={color:"#fff",backgroundColor:"#000",borderColor:"#000",buttonBackgroundColor:{disabled:"#000",default:"#000",hovered:"#000",pressed:"#000"},labelColor:"#000"});const p=d?(v=e.buttonBackgroundColor)==null?void 0:v.pressed:e.borderColor,f={width:"55px",color:e.color,path:{fill:e.color},alignContent:"center",fontSize:"37px",svg:{pointerEvents:"none"}},m={...f,backgroundColor:(O=e.buttonBackgroundColor)==null?void 0:O.default,":hover":{backgroundColor:(I=e.buttonBackgroundColor)==null?void 0:I.hovered},":active":{backgroundColor:(T=e.buttonBackgroundColor)==null?void 0:T.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}}},b={...f,backgroundColor:(P=e.buttonBackgroundColor)==null?void 0:P.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor},":disabled":{backgroundColor:(k=e.buttonBackgroundColor)==null?void 0:k.pressed,"svg path":{fill:l.palette.action.disabled}}};function S(y,A){s||y.button===0&&(u(A),n(A))}function R(){u(null),o()}return g.jsxs(en,{height:"64px",direction:"row",justifyContent:"center",...i,children:[g.jsx(E.IconButton,{disabled:s,disableRipple:!0,onPointerDown:y=>S(y,"-"),onPointerUp:R,onPointerOut:R,size:"large",sx:{...d==="-"?b:m,borderRadius:"16px 0px 0px 16px",borderLeft:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:g.jsx(WC,{})}),g.jsxs(en,{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(en,{height:"22px",direction:"row",alignItems:"center",justifyItems:"center",spacing:1,sx:{userSelect:"none",color:e.color,".MuiTypography-root":{fontWeight:700,...s?{color:l.palette.action.disabled}:{}},...s?{"svg path":{fill:l.palette.action.disabled}}:{}},children:t}),g.jsx(E.Typography,{height:"22px",sx:{fontSize:"15px",color:s?l.palette.action.disabled:e.color,fontWeight:700},ref:h,children:r()})]}),g.jsx(E.IconButton,{disableRipple:!0,disabled:s,onPointerDown:y=>S(y,"+"),onPointerUp:R,onPointerOut:R,size:"large",sx:{...d==="+"?b:m,borderRadius:"0px 16px 16px 0px",borderRight:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:g.jsx(YC,{})})]})})),KC=pr(g.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),XC=pr(g.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");function Tr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ip=typeof global=="object"&&global&&global.Object===Object&&global,QC=typeof self=="object"&&self&&self.Object===Object&&self,Bt=Ip||QC||Function("return this")(),$a=function(){return Bt.Date.now()},ZC=/\s/;function ew(e){for(var t=e.length;t--&&ZC.test(e.charAt(t)););return t}var tw=/^\s+/;function rw(e){return e&&e.slice(0,ew(e)+1).replace(tw,"")}var ur=Bt.Symbol,Ap=Object.prototype,nw=Ap.hasOwnProperty,ow=Ap.toString,An=ur?ur.toStringTag:void 0;function sw(e){var t=nw.call(e,An),r=e[An];try{e[An]=void 0;var n=!0}catch{}var o=ow.call(e);return n&&(t?e[An]=r:delete e[An]),o}var aw=Object.prototype,iw=aw.toString;function lw(e){return iw.call(e)}var cw="[object Null]",uw="[object Undefined]",Mu=ur?ur.toStringTag:void 0;function jr(e){return e==null?e===void 0?uw:cw:Mu&&Mu in Object(e)?sw(e):lw(e)}function Er(e){return e!=null&&typeof e=="object"}var dw="[object Symbol]";function ta(e){return typeof e=="symbol"||Er(e)&&jr(e)==dw}var Vu=NaN,hw=/^[-+]0x[0-9a-f]+$/i,pw=/^0b[01]+$/i,fw=/^0o[0-7]+$/i,mw=parseInt;function ku(e){if(typeof e=="number")return e;if(ta(e))return Vu;if(Tr(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Tr(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=rw(e);var r=pw.test(e);return r||fw.test(e)?mw(e.slice(2),r?2:8):hw.test(e)?Vu:+e}var gw="Expected a function",yw=Math.max,bw=Math.min;function xw(e,t,r){var n,o,s,a,i,l,c=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(gw);t=ku(t)||0,Tr(r)&&(u=!!r.leading,d="maxWait"in r,s=d?yw(ku(r.maxWait)||0,t):s,h="trailing"in r?!!r.trailing:h);function p(T){var w=n,P=o;return n=o=void 0,c=T,a=e.apply(P,w),a}function f(T){return c=T,i=setTimeout(S,t),u?p(T):a}function m(T){var w=T-l,P=T-c,k=t-w;return d?bw(k,s-P):k}function b(T){var w=T-l,P=T-c;return l===void 0||w>=t||w<0||d&&P>=s}function S(){var T=$a();if(b(T))return R(T);i=setTimeout(S,m(T))}function R(T){return i=void 0,h&&n?p(T):(n=o=void 0,a)}function v(){i!==void 0&&clearTimeout(i),c=0,n=l=o=i=void 0}function O(){return i===void 0?a:R($a())}function I(){var T=$a(),w=b(T);if(n=arguments,o=this,l=T,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)),a}return I.cancel=v,I.flush=O,I}var Sw="Expected a function";function vw(e,t,r){var n=!0,o=!0;if(typeof e!="function")throw new TypeError(Sw);return Tr(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),xw(e,t,{leading:n,maxWait:t,trailing:o})}const Rp=Ue(ge.observer(({startJogging:e,stopJogging:t,lowerLimitDegs:r,upperLimitDegs:n,getValueDegs:o,disabled:s,...a})=>{var v,O,I,T,w,P,k,y,A,M,_,j,ne,X,oe;const{t:i}=Ce.useTranslation(),[l,c]=D.useState(),u=E.useTheme(),d={background:(v=u.palette.backgroundPaperElevation)==null?void 0:v[4],color:(O=u.palette.backgroundPaperElevation)==null?void 0:O[11]},h=ge.useLocalObservable(()=>({activeJoggingDir:null,startJogging(Q){this.activeJoggingDir=Q,e(Q)},stopJogging(){this.activeJoggingDir=null,t()}})),p=vw(()=>{c(o())},50);ea(p);function f(Q){Q.button===0&&h.startJogging("-")}function m(Q){Q.button===0&&h.startJogging("+")}function b(Q){h.stopJogging()}function S(Q){h.stopJogging()}function R(Q,se=1){if(Q===void 0||isNaN(Q))return"";const N=i("General.degree.variable",{amount:Q.toFixed(se)});return Q>0&&se===0?`+${N}`:N}return g.jsxs(en,{height:"64px",width:"100%",maxWidth:"260px",direction:"row",...a,sx:{"& .MuiIconButton-root":{width:"52px",color:u.palette.text.primary,alignContent:"center",backgroundColor:(I=u.palette.backgroundPaperElevation)==null?void 0:I[11],"& svg":{width:"42px",height:"42px"},"&.Mui-disabled":{backgroundColor:(T=u.palette.backgroundPaperElevation)==null?void 0:T[11],color:u.palette.action.disabled,opacity:1},"&:hover":{backgroundColor:(w=u.palette.backgroundPaperElevation)==null?void 0:w[9]},"&:active":{...d}}},children:[g.jsx(E.IconButton,{onPointerDown:f,onPointerUp:b,onPointerOut:S,disabled:s,disableRipple:!0,sx:{borderRadius:"16px 0px 0px 16px",...h.activeJoggingDir==="-"?d:{}},children:g.jsx(KC,{sx:{pointerEvents:"none",color:(A=(y=(k=(P=u.componentsExt)==null?void 0:P.JoggingPanel)==null?void 0:k.JoggingJoint)==null?void 0:y.Joint)==null?void 0:A.arrowColor}})}),g.jsxs(en,{flexGrow:1,alignItems:"center",justifyContent:"center",sx:{borderStyle:"solid",borderLeftWidth:0,borderRightWidth:0,border:"none",backgroundColor:(M=u.palette.backgroundPaperElevation)==null?void 0:M[11],paddingLeft:"20px",paddingRight:"20px",zIndex:1},children:[g.jsx(E.Typography,{sx:{fontSize:"15px",fontWeight:700,position:"relative",top:"5px",color:s?u.palette.action.disabled:u.palette.text.primary},children:R(l)}),g.jsx(E.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:s?u.palette.action.disabled:u.palette.text.primary},"& .MuiSlider-markLabel":{top:"20px",fontSize:"12px",color:s?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:R(r,0)},{value:n,label:R(n,0)}]})]}),g.jsx(E.IconButton,{onPointerDown:m,onPointerUp:b,onPointerOut:S,disabled:s,disableRipple:!0,sx:{borderRadius:"0px 16px 16px 0px",...h.activeJoggingDir==="+"?d:{}},children:g.jsx(XC,{sx:{pointerEvents:"none",color:(oe=(X=(ne=(j=u.componentsExt)==null?void 0:j.JoggingPanel)==null?void 0:ne.JoggingJoint)==null?void 0:X.Joint)==null?void 0:oe.arrowColor}})})]})})),Cw=pr(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"),ww=pr(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");/*! *****************************************************************************
|
|
120
|
+
`))});const a={};return o.forEach(i=>{const{ids:l,stackingOrder:c,stackingOffset:u}=i,d=ip().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)(s);l.forEach((h,p)=>{const f=n[h].dataKey;a[h]=K({labelMarkType:"line"},n[h],{data:f?t.map(m=>{const b=m[f];return typeof b!="number"?(process.env.NODE_ENV!=="production"&&b!==null&&Gn([`MUI X Charts: Your dataset key "${f}" is used for plotting line, but contains nonnumerical elements.`,"Line plots only support numbers and null values."]),null):b}):n[h].data,stackedData:d[p].map(([m,b])=>[m,b])})})}),{seriesOrder:r,stackingGroups:o,series:dv(a,i=>i==null?"":i.toLocaleString())}},pv=(e,t,r)=>{const n=r==null?void 0:r.colorScale,o=t==null?void 0:t.colorScale;return n?s=>{if(s===void 0)return e.color;const a=e.data[s],i=a===null?e.color:n(a);return i===null?e.color:i}:o?s=>{var l;if(s===void 0)return e.color;const a=(l=t.data)==null?void 0:l[s],i=a===null?e.color:o(a);return i===null?e.color:i}:()=>e.color},fv=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,o)=>{const s=Zt(r[o].label,"legend");return s===void 0||n.push({markType:r[o].labelMarkType,id:o,seriesId:o,color:r[o].color,label:s}),n},[])},mv=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const o=Zt(t.label,"tooltip"),s=t.data[n.dataIndex],a=t.valueFormatter(s,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:o,value:s,formattedValue:a,markType:t.labelMarkType}},gv=e=>Object.values(e).map(t=>({direction:"x",axisId:t.xAxisId})),yv=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`,color:r[t%r.length]},e),bv={colorProcessor:pv,seriesProcessor:hv,legendGetter:fv,tooltipGetter:mv,axisTooltipGetter:gv,xExtremumGetter:lv,yExtremumGetter:uv,getSeriesWithDefaultValues:yv},xv=(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}},Sv=e=>{const{seriesOrder:t,series:r}=e,n={};return t.forEach(o=>{const s=jS().startAngle(2*Math.PI*(r[o].startAngle??0)/360).endAngle(2*Math.PI*(r[o].endAngle??360)/360).padAngle(2*Math.PI*(r[o].paddingAngle??0)/360).sortValues(xv(r[o].sortingValues??"none"))(r[o].data.map(a=>a.value));n[o]=K({labelMarkType:"circle",valueFormatter:a=>a.value.toLocaleString()},r[o],{data:r[o].data.map((a,i)=>K({},a,{id:a.id??`auto-generated-pie-id-${o}-${i}`},s[i])).map((a,i)=>{var l,c;return K({labelMarkType:"circle"},a,{formattedValue:((c=(l=r[o]).valueFormatter)==null?void 0:c.call(l,K({},a,{label:Zt(a.label,"arc")}),{dataIndex:i}))??a.value.toLocaleString()})})})}),{seriesOrder:t,series:n}},vv=e=>t=>e.data[t].color,Cv=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,o)=>(r[o].data.forEach((s,a)=>{const i=Zt(s.label,"legend");i!==void 0&&n.push({markType:s.labelMarkType??r[o].labelMarkType,id:s.id??a,seriesId:o,color:s.color,label:i,itemId:s.id??a})}),n),[])},wv=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const o=t.data[n.dataIndex];if(o==null)return null;const s=Zt(o.label,"tooltip"),a=K({},o,{label:s}),i=t.valueFormatter(a,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:s,value:a,formattedValue:i,markType:o.labelMarkType??t.labelMarkType}},Ov=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`},e,{data:e.data.map((n,o)=>K({color:r[o%r.length]},n))}),Tv={colorProcessor:vv,seriesProcessor:Sv,legendGetter:Cv,tooltipGetter:wv,getSeriesWithDefaultValues:Ov},Ev={bar:ZS,scatter:iv,line:bv,pie:Tv},Iv=[vl,Ks,xl,Qs];function Av(e){const{children:t,plugins:r=Iv,pluginParams:n={},seriesConfig:o=Ev}=e,{contextValue:s}=ib(r,n,o);return g.jsx(Zi.Provider,{value:s,children:t})}const hp=()=>{const e=_.useContext(Zi);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=hp();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 pp(){const e=_r();return at(e,ro)}function fp(){const e=_r();return at(e,zy)}const gi=(e,t)=>e===void 0?t:Math.PI*e/180;function Pv(){const e=_r(),{axis:t,axisIds:r}=at(e,Mr);return{xAxis:t,xAxisIds:r}}function Rv(){const e=_r(),{axis:t,axisIds:r}=at(e,Vr);return{yAxis:t,yAxisIds:r}}function Mv(){const e=_r(),{axis:t,axisIds:r}=at(e,bS)??{axis:{},axisIds:[]};return{zAxis:t,zAxisIds:r}}function Vv(){const e=hp();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 _v(){const e=fp();return _.useCallback(t=>`${e}-gradient-${t}`,[e])}function kv(){const e=fp();return _.useCallback(t=>`${e}-gradient-${t}-object-bound`,[e])}var La,Tu;function jv(){if(Tu)return La;Tu=1;var e=4,t=.001,r=1e-7,n=10,o=11,s=1/(o-1),a=typeof Float32Array=="function";function i(m,b){return 1-3*b+3*m}function l(m,b){return 3*b-6*m}function c(m){return 3*m}function u(m,b,S){return((i(b,S)*m+l(b,S))*m+c(b))*m}function d(m,b,S){return 3*i(b,S)*m*m+2*l(b,S)*m+c(b)}function h(m,b,S,P,v){var O,I,T=0;do I=b+(S-b)/2,O=u(I,P,v)-m,O>0?S=I:b=I;while(Math.abs(O)>r&&++T<n);return I}function p(m,b,S,P){for(var v=0;v<e;++v){var O=d(b,S,P);if(O===0)return b;var I=u(b,S,P)-m;b-=I/O}return b}function f(m){return m}return La=function(b,S,P,v){if(!(0<=b&&b<=1&&0<=P&&P<=1))throw new Error("bezier x values must be in [0, 1] range");if(b===S&&P===v)return f;for(var O=a?new Float32Array(o):new Array(o),I=0;I<o;++I)O[I]=u(I*s,b,P);function T(w){for(var R=0,k=1,y=o-1;k!==y&&O[k]<=w;++k)R+=s;--k;var A=(w-O[k])/(O[k+1]-O[k]),V=R+A*s,M=d(V,b,P);return M>=t?p(w,V,b,P):M===0?V:h(w,R,R+s,b,P)}return function(R){return R===0?0:R===1?1:u(T(R),S,v)}},La}var Dv=jv();const Uv=Zf(Dv),Lv=300,Bv=Uv(.66,0,.34,1);var dn=0,jn=0,En=0,mp=1e3,ms,Dn,gs=0,Or=0,Xs=0,Kn=typeof performance=="object"&&performance.now?performance:Date,gp=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Cl(){return Or||(gp(Fv),Or=Kn.now()+Xs)}function Fv(){Or=0}function ys(){this._call=this._time=this._next=null}ys.prototype=yp.prototype={constructor:ys,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Cl():+r)+(t==null?0:+t),!this._next&&Dn!==this&&(Dn?Dn._next=this:ms=this,Dn=this),this._call=e,this._time=r,bi()},stop:function(){this._call&&(this._call=null,this._time=1/0,bi())}};function yp(e,t,r){var n=new ys;return n.restart(e,t,r),n}function yi(){Cl(),++dn;for(var e=ms,t;e;)(t=Or-e._time)>=0&&e._call.call(void 0,t),e=e._next;--dn}function Eu(){Or=(gs=Kn.now())+Xs,dn=jn=0;try{yi()}finally{dn=0,Nv(),Or=0}}function $v(){var e=Kn.now(),t=e-gs;t>mp&&(Xs-=t,gs=e)}function Nv(){for(var e,t=ms,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:ms=r);Dn=e,bi(n)}function bi(e){if(!dn){jn&&(jn=clearTimeout(jn));var t=e-Or;t>24?(e<1/0&&(jn=setTimeout(Eu,e-Kn.now()-Xs)),En&&(En=clearInterval(En))):(En||(gs=Kn.now(),En=setInterval($v,mp)),dn=1,gp(Eu))}}function zv(e,t,r){var n=new ys;return t=t==null?0:+t,n.restart(o=>{n.stop(),e(o+t)},t,r),n}class Gv{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=Cl()-this.elapsed;return this.timer=yp(r=>this.timerCallback(r),0,t),yi(),this}stop(){return this.running?(this.timer&&(this.timer.stop(),this.timer=null),this):this}finish(){return this.stop(),zv(()=>this.timerCallback(this.duration)),yi(),this}}function Hv(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let o=0;o<r.length;o+=1){const s=r[o];if(!Object.prototype.hasOwnProperty.call(t,s)||!Object.is(e[s],t[s]))return!1}return!0}function qv(e,{createInterpolator:t,applyProps:r,skip:n,initialProps:o=e}){const s=_.useRef(o),a=_.useRef(null),i=_.useRef(null),l=_.useRef(e);Ut(()=>{l.current=e},[e]),Ut(()=>{var d;n&&((d=a.current)==null||d.finish(),a.current=null,i.current=null,s.current=e)},[e,n]);const c=_.useCallback(d=>{const h=s.current,p=t(h,e);a.current=new Gv(Lv,Bv,f=>{const m=p(f);s.current=m,r(d,m)})},[r,t,e]);return _.useCallback(d=>{var p,f,m,b;if(d===null){(p=a.current)==null||p.stop();return}const h=i.current;if(h===d){if(Hv(l.current,e)){(f=a.current)==null||f.resume();return}(m=a.current)==null||m.stop()}h&&((b=a.current)==null||b.stop()),i.current=d,(a.current||!n)&&c(d)},[c,e,n])}function Wv(e,{createInterpolator:t,transformProps:r,applyProps:n,skip:o,initialProps:s=e,ref:a}){const i=r??(u=>u),l=qv(e,{initialProps:s,createInterpolator:t,applyProps:(u,d)=>n(u,i(d)),skip:o});return K({},r(o?e:s),{ref:js(l,a)})}function Iu(e){const{isReversed:t,gradientId:r,size:n,direction:o,scale:s,colorMap:a}=e;return n<=0?null:g.jsx("linearGradient",{id:r,x1:"0",x2:"0",y1:"0",y2:"0",[`${o}${t?1:2}`]:`${n}px`,gradientUnits:"userSpaceOnUse",children:a.thresholds.map((i,l)=>{const c=s(i);if(c===void 0)return null;const u=t?1-c/n:c/n;return Number.isNaN(u)?null:g.jsxs(_.Fragment,{children:[g.jsx("stop",{offset:u,stopColor:a.colors[l],stopOpacity:1}),g.jsx("stop",{offset:u,stopColor:a.colors[l+1],stopOpacity:1})]},i.toString()+l)})})}const Jv=10;function Au(e){const{gradientUnits:t,isReversed:r,gradientId:n,size:o,direction:s,scale:a,colorScale:i,colorMap:l}=e,c=[l.min??0,l.max??100],u=c.map(a).filter(f=>f!==void 0);if(u.length!==2)return null;const d=typeof c[0]=="number"?Tt(c[0],c[1]):sl(c[0],c[1]),h=Math.round((Math.max(...u)-Math.min(...u))/Jv),p=`${c[0]}-${c[1]}-`;return g.jsx("linearGradient",{id:n,x1:"0",x2:"0",y1:"0",y2:"0",[`${s}${r?1:2}`]:t==="objectBoundingBox"?1:`${o}px`,gradientUnits:t??"userSpaceOnUse",children:Array.from({length:h+1},(f,m)=>{const b=d(m/h);if(b===void 0)return null;const S=a(b);if(S===void 0)return null;const P=r?1-S/o:S/o,v=i(b);return v===null?null:g.jsx("stop",{offset:P,stopColor:v,stopOpacity:1},p+m)})})}const Yv=10,Kv=e=>e?{x1:"1",x2:"0",y1:"0",y2:"0"}:{x1:"0",x2:"1",y1:"0",y2:"0"};function Ba(e){const{isReversed:t,gradientId:r,colorScale:n,colorMap:o}=e,s=[o.min??0,o.max??100],a=typeof s[0]=="number"?Tt(s[0],s[1]):sl(s[0],s[1]),i=Yv,l=`${s[0]}-${s[1]}-`;return g.jsx("linearGradient",K({id:r},Kv(t),{gradientUnits:"objectBoundingBox",children:Array.from({length:i+1},(c,u)=>{const d=u/i,h=a(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 Qv(){const{top:e,height:t,bottom:r,left:n,width:o,right:s}=pp(),a=e+t+r,i=n+o+s,l=_v(),c=kv(),{xAxis:u,xAxisIds:d}=Pv(),{yAxis:h,yAxisIds:p}=Rv(),{zAxis:f,zAxisIds:m}=Mv(),b=p.filter(v=>h[v].colorMap!==void 0),S=d.filter(v=>u[v].colorMap!==void 0),P=m.filter(v=>f[v].colorMap!==void 0);return b.length===0&&S.length===0&&P.length===0?null:g.jsxs("defs",{children:[b.map(v=>{const O=l(v),I=c(v),{colorMap:T,scale:w,colorScale:R,reverse:k}=h[v];return(T==null?void 0:T.type)==="piecewise"?g.jsx(Iu,{isReversed:!k,scale:w,colorMap:T,size:a,gradientId:O,direction:"y"},O):(T==null?void 0:T.type)==="continuous"?g.jsxs(_.Fragment,{children:[g.jsx(Au,{isReversed:!k,scale:w,colorScale:R,colorMap:T,size:a,gradientId:O,direction:"y"}),g.jsx(Ba,{isReversed:k,colorScale:R,colorMap:T,gradientId:I})]},O):null}),S.map(v=>{const O=l(v),I=c(v),{colorMap:T,scale:w,reverse:R,colorScale:k}=u[v];return(T==null?void 0:T.type)==="piecewise"?g.jsx(Iu,{isReversed:R,scale:w,colorMap:T,size:i,gradientId:O,direction:"x"},O):(T==null?void 0:T.type)==="continuous"?g.jsxs(_.Fragment,{children:[g.jsx(Au,{isReversed:R,scale:w,colorScale:k,colorMap:T,size:i,gradientId:O,direction:"x"}),g.jsx(Ba,{isReversed:R,colorScale:k,colorMap:T,gradientId:I})]},O):null}),P.map(v=>{const O=c(v),{colorMap:I,colorScale:T}=f[v];return(I==null?void 0:I.type)==="continuous"?g.jsx(Ba,{colorScale:T,colorMap:I,gradientId:O},O):null})]})}const Xv=["children","className","title","desc"],Zv=ft("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"})),wl=_.forwardRef(function(t,r){const n=_r(),{width:o,height:s}=at(n,Ly),{width:a,height:i}=at(n,Uy),l=Vv(),c=js(l,r),u=N0({props:t,name:"MuiChartsSurface"}),{children:d,className:h,title:p,desc:f}=u,m=ir(u,Xv),b=s>0&&o>0;return g.jsxs(Zv,K({ownerState:{width:a,height:i},viewBox:`0 0 ${o} ${s}`,className:h},m,{ref:c,children:[p&&g.jsx("title",{children:p}),f&&g.jsx("desc",{children:f}),g.jsx(Qv,{}),b&&d]}))});process.env.NODE_ENV!=="production"&&(wl.displayName="ChartsSurface");process.env.NODE_ENV!=="production"&&(wl.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 In(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 Fa(e){const t=gi(e);return[Math.sin(t),-Math.cos(t)]}function eC(e,t){const r=[[0,0],Fa(e),Fa(t)],n=Math.min(e,t),o=Math.max(e,t),s=Math.floor(n/90)*90;for(let u=1;u<=4;u+=1){const d=s+u*90;d<o&&r.push(Fa(d))}const a=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:-a/(i-a),cy:-l/(c-l),minX:a,maxX:i,minY:l,maxY:c}}function tC(e,t,r,n,{minX:o,maxX:s,minY:a,maxY:i}){return Math.min(...[{ratio:Math.abs(o),space:e},{ratio:Math.abs(s),space:r-e},{ratio:Math.abs(a),space:t},{ratio:Math.abs(i),space:n-t}].map(({ratio:l,space:c})=>l<1e-5?1/0:c/l))}const Ol=_.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"&&(Ol.displayName="GaugeContext");function rC(e){const{value:t=null,valueMin:r=0,valueMax:n=100,startAngle:o=0,endAngle:s=360,outerRadius:a,innerRadius:i,cornerRadius:l,cx:c,cy:u,children:d}=e,{left:h,top:p,width:f,height:m}=pp(),b=eC(o,s),S=c?In(c,f):b.cx*f,P=u?In(u,m):b.cy*m;let v=h+S,O=p+P;const I=tC(S,P,f,m,b);if(c===void 0){const y=I*(b.maxX-b.minX);v=h+(f-y)/2+b.cx*y}if(u===void 0){const y=I*(b.maxY-b.minY);O=p+(m-y)/2+b.cy*y}const T=In(a??I,I),w=In(i??"80%",I),R=In(l??0,T-w),k=_.useMemo(()=>{const y=gi(o),A=gi(s);return{value:t,valueMin:r,valueMax:n,startAngle:y,endAngle:A,outerRadius:T,innerRadius:w,cornerRadius:R,cx:v,cy:O,maxRadius:I,valueAngle:t===null?null:y+(A-y)*(t-r)/(n-r)}},[t,r,n,o,s,T,w,R,v,O,I]);return g.jsx(Ol.Provider,{value:k,children:d})}function Tl(){return _.useContext(Ol)}const nC=["width","height","margin","title","desc","value","valueMin","valueMax","startAngle","endAngle","outerRadius","innerRadius","cornerRadius","cx","cy","children"],oC=ft("g")(({theme:e})=>({"& text":{fill:(e.vars||e).palette.text.primary}})),El=_.forwardRef(function(t,r){const{width:n,height:o,margin:s,title:a,desc:i,value:l,valueMin:c=0,valueMax:u=100,startAngle:d,endAngle:h,outerRadius:p,innerRadius:f,cornerRadius:m,cx:b,cy:S,children:P}=t,v=ir(t,nC);return g.jsx(Av,{pluginParams:{width:n,height:o,margin:uh(s,{left:10,right:10,top:10,bottom:10})},plugins:[],children:g.jsx(rC,{value:l,valueMin:c,valueMax:u,startAngle:d,endAngle:h,outerRadius:p,innerRadius:f,cornerRadius:m,cx:b,cy:S,children:g.jsx(wl,K({title:a,desc:i,role:"meter","aria-valuenow":l===null?void 0:l,"aria-valuemin":c,"aria-valuemax":u},v,{ref:r,children:g.jsx(oC,{"aria-hidden":"true",children:P})}))})})});process.env.NODE_ENV!=="production"&&(El.displayName="GaugeContainer");process.env.NODE_ENV!=="production"&&(El.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 sC(e){const t=_r(),r=at(t,fy);return e||r}function aC(e,t){const r=Tt(e.startAngle,t.startAngle),n=Tt(e.endAngle,t.endAngle),o=Tt(e.innerRadius,t.innerRadius),s=Tt(e.outerRadius,t.outerRadius),a=Tt(e.cornerRadius,t.cornerRadius);return i=>({startAngle:r(i),endAngle:n(i),innerRadius:o(i),outerRadius:s(i),cornerRadius:a(i)})}function iC(e){return Wv({startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius},{createInterpolator:aC,transformProps:t=>({d:sp().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 lC=["cx","cy","startAngle","endAngle","cornerRadius","innerRadius","outerRadius","skipAnimation"],cC=ft("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.primary.main}));function bp(e){const{value:t,valueMin:r,valueMax:n,startAngle:o,endAngle:s,outerRadius:a,innerRadius:i,cornerRadius:l,cx:c,cy:u}=Tl();if(t===null)return null;const d=o+(t-r)/(n-r)*(s-o);return g.jsx(xp,K({},e,{cx:c,cy:u,startAngle:o,endAngle:d,cornerRadius:l,innerRadius:i,outerRadius:a}))}process.env.NODE_ENV!=="production"&&(bp.propTypes={skipAnimation:x.bool});function xp(e){let{cx:t,cy:r,startAngle:n,endAngle:o,cornerRadius:s,innerRadius:a,outerRadius:i,skipAnimation:l}=e,c=ir(e,lC);const u=sC(l),d=iC({startAngle:n,endAngle:o,cornerRadius:s,innerRadius:a,outerRadius:i,skipAnimation:u});return g.jsx(cC,K({},d,{transform:`translate(${t}, ${r})`},c))}process.env.NODE_ENV!=="production"&&(xp.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 uC=ft("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.divider}));function dC(e){const{startAngle:t,endAngle:r,outerRadius:n,innerRadius:o,cornerRadius:s,cx:a,cy:i}=Tl();return g.jsx(uC,K({transform:`translate(${a}, ${i})`,d:sp().cornerRadius(s)({startAngle:t,endAngle:r,innerRadius:o,outerRadius:n})},e))}function hC(e){return pn("MuiGauge",e)}Bi("MuiGauge",["root","valueArc","referenceArc","valueText"]);function pC(){return typeof window>"u"}const _o=new Map,fC=2e3,mC={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},gC=["minWidth","maxWidth","width","minHeight","maxHeight","height","top","left","fontSize","padding","margin","paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom"],Pu="mui_measurement_span";function Sp(e,t){return gC.indexOf(e)>=0&&t===+t?`${t}px`:t}function vp(e){return e.split("").reduce((n,o)=>o===o.toUpperCase()?[...n,"-",o.toLowerCase()]:[...n,o],[]).join("")}const yC=e=>Object.keys(e).sort().reduce((t,r)=>`${t}${vp(r)}:${Sp(r,e[r])};`,"");let $a;const bC=(e,t={})=>{if(e==null||pC())return{width:0,height:0};const r=`${e}`,n=yC(t),o=`${r}-${n}`,s=_o.get(o);if(s)return s;try{let a=document.getElementById(Pu);a===null&&(a=document.createElement("span"),a.setAttribute("id",Pu),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));const i=K({},mC,t);Object.keys(i).map(u=>(a.style[vp(u)]=Sp(u,i[u]),u)),a.textContent=r;const l=a.getBoundingClientRect(),c={width:l.width,height:l.height};return _o.set(o,c),_o.size+1>fC&&_o.clear(),process.env.NODE_ENV==="test"?a.textContent="":($a&&clearTimeout($a),$a=setTimeout(()=>{a.textContent=""},0)),c}catch{return{width:0,height:0}}};function xC({style:e,needsComputation:t,text:r}){return r.split(`
|
|
124
|
+
`).map(n=>K({text:n},t?bC(n,e):{width:0,height:0}))}function SC(){const[e,t]=_.useState(typeof window<"u"||process.env.NODE_ENV==="test");return _.useEffect(()=>{t(!0)},[]),e}const vC=["x","y","style","text","ownerState"],CC=["angle","textAnchor","dominantBaseline"];function Cp(e){const{x:t,y:r,style:n,text:o}=e,s=ir(e,vC),a=n??{},{angle:i,textAnchor:l,dominantBaseline:c}=a,u=ir(a,CC),d=SC(),h=_.useMemo(()=>xC({style:u,needsComputation:d&&o.includes(`
|
|
125
|
+
`),text:o}),[u,o,d]);let p;switch(c){case"hanging":case"text-before-edge":p=0;break;case"central":p=(h.length-1)/2*-h[0].height;break;default:p=(h.length-1)*-h[0].height;break}return g.jsx("text",K({},s,{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"&&(Cp.propTypes={lineHeight:x.number,needsComputation:x.bool,ownerState:x.any,style:x.object,text:x.string.isRequired});const wC=["text","className"];function OC({value:e}){return e===null?null:e.toLocaleString()}function wp(e){const{text:t=OC,className:r}=e,n=ir(e,wC),{value:o,valueMin:s,valueMax:a,cx:i,cy:l}=Tl(),c=typeof t=="function"?t({value:o,valueMin:s,valueMax:a}):t;return c===null?null:g.jsx("g",{className:r,children:g.jsx(Cp,K({x:i,y:l,text:c,style:{textAnchor:"middle",dominantBaseline:"central"}},n))})}process.env.NODE_ENV!=="production"&&(wp.propTypes={lineHeight:x.number,needsComputation:x.bool,ownerState:x.any,style:x.object,text:x.oneOfType([x.func,x.string])});const TC=["text","children","classes","className","skipAnimation"],EC=e=>{const{classes:t}=e;return Cs({root:["root"],valueArc:["valueArc"],referenceArc:["referenceArc"],valueText:["valueText"]},hC,t)},Il=_.forwardRef(function(t,r){const{text:n,children:o,className:s,skipAnimation:a}=t,i=ir(t,TC),l=EC(t);return g.jsxs(El,K({},i,{className:Et(l.root,s),ref:r,children:[g.jsx(dC,{className:l.referenceArc}),g.jsx(bp,{className:l.valueArc,skipAnimation:a}),g.jsx(wp,{className:l.valueText,text:n}),o]}))});process.env.NODE_ENV!=="production"&&(Il.displayName="Gauge");process.env.NODE_ENV!=="production"&&(Il.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});const IC=e=>{const t=Math.floor(e/86400),r=Math.floor(e%86400/3600),n=Math.floor(e%3600/60),o=e%60,s=[];return t>0?(s.push(t.toString()),s.push(r.toString().padStart(2,"0")),s.push(n.toString().padStart(2,"0")),s.push(o.toString().padStart(2,"0"))):r>0?(s.push(r.toString()),s.push(n.toString().padStart(2,"0")),s.push(o.toString().padStart(2,"0"))):(s.push(n.toString()),s.push(o.toString().padStart(2,"0"))),s.join(":")},Vt=(e,t)=>{const r=Math.floor(e/86400),n=Math.floor(e%86400/3600),o=Math.floor(e%3600/60),s=e%60;if(typeof Intl<"u"&&"DurationFormat"in Intl)try{const i={};return r>0&&(i.days=r),n>0&&(i.hours=n),o>0&&(i.minutes=o),(s>0||Object.keys(i).length===0)&&(i.seconds=s),new Intl.DurationFormat(t,{style:"narrow"}).format(i)}catch{}const a=[];return r>0&&a.push(`${r}d`),n>0&&a.push(`${n}h`),o>0&&a.push(`${o}m`),(s>0||a.length===0)&&a.push(`${s}s`),a.join(" ")},AC=(e,t,r)=>e==="countdown"&&r!==null?Math.min(100,t/r*100):e==="measuring"?t/60%1*100:0,PC=({timerState:e,animationState:t,hasError:r,className:n})=>{const{t:o,i18n:s}=Ce.useTranslation(),a=E.useTheme(),{currentState:i,remainingTime:l,maxTime:c,currentProgress:u}=e,{showErrorAnimation:d,showPauseAnimation:h,showPulsatingText:p,pulsatingFinished:f,showLabels:m,showMainText:b,showIdlePulsating:S,idleDotsCount:P}=t;return g.jsxs(E.Box,{className:n,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx(Il,{width:264,height:264,value:i==="idle"?0:u,valueMin:0,valueMax:100,innerRadius:"85%",outerRadius:"100%",margin:0,skipAnimation:!0,text:()=>"",sx:{opacity:h||d?.6:1,transition:"opacity 0.5s ease-out","& .MuiGauge-valueArc":{fill:r?a.palette.error.light:a.palette.success.main,transition:"fill 0.5s ease-out"},"& .MuiGauge-referenceArc":{fill:"#171927",stroke:"transparent",strokeWidth:0,transition:"fill 0.5s ease-out, stroke 0.5s ease-out, stroke-width 0.5s ease-out"},"& .MuiGauge-valueText":{display:"none"},"& .MuiGauge-text":{display:"none"}}}),g.jsxs(E.Box,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:225,height:225,borderRadius:"50%",backgroundColor:"#292B3F",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1,transition:"background-color 0.5s ease-out"},children:[g.jsx(E.Box,{sx:{height:"16px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:1},children:g.jsx(E.Fade,{in:m&&!r&&i!=="idle"&&i!=="success",timeout:300,children:g.jsx(E.Typography,{variant:"body2",sx:{fontSize:"12px",color:i==="measured"&&(p||f)?a.palette.success.main:a.palette.text.secondary,transition:"color 0.8s ease-in-out"},children:g.jsx("span",{style:{opacity:i==="measured"&&f?p?1:.6:1,transition:"opacity 2s ease-in-out"},children:i==="measuring"||i==="measured"?o("CycleTimer.CycleTime.lb","Cycle Time"):i==="countdown"?o("CycleTimer.RemainingTime.lb","Remaining Time"):""})})})}),g.jsxs(E.Box,{sx:{position:"relative",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:[g.jsx(E.Fade,{in:b&&i==="idle"&&!r,timeout:200,children:g.jsxs(E.Typography,{variant:"body2",sx:{position:"absolute",fontSize:"12px",fontWeight:400,color:"rgba(255, 255, 255, 0.7)",lineHeight:"166%",letterSpacing:"0.17px",textAlign:"center",width:"200px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx("span",{style:{opacity:S?1:.6,transition:"opacity 2s ease-in-out"},children:o("CycleTimer.WaitingForCycle.lb","Waiting for program cycle")}),g.jsx("span",{style:{display:"inline-block",width:"18px",textAlign:"left",opacity:S?1:.6,transition:"opacity 2s ease-in-out"},children:".".repeat(P)})]})}),g.jsx(E.Fade,{in:b&&r,timeout:200,children:g.jsx(E.Typography,{variant:"h3",sx:{position:"absolute",fontSize:"40px",fontWeight:400,color:"#FFFFFF",lineHeight:"116.7%"},children:o("CycleTimer.Error.lb","Error")})}),g.jsx(E.Fade,{in:b&&!r&&i!=="idle"&&i!=="success",timeout:300,children:g.jsx(E.Typography,{variant:"h1",sx:{position:"absolute",fontSize:"48px",fontWeight:500,color:a.palette.text.primary,lineHeight:1,transition:"color 0.8s ease-in-out"},children:g.jsx("span",{style:{opacity:1,transition:"opacity 2s ease-in-out"},children:IC(l)})})})]}),g.jsx(E.Box,{sx:{height:"16px",display:"flex",marginTop:.5,alignItems:"center",justifyContent:"center"},children:g.jsx(E.Fade,{in:m&&!r&&i!=="idle"&&i!=="success",timeout:300,children:g.jsx(E.Typography,{variant:"body2",sx:{fontSize:"12px",color:i==="measured"&&(p||f)?a.palette.success.main:a.palette.text.secondary,transition:"color 0.8s ease-in-out"},children:g.jsx("span",{style:{opacity:i==="measured"&&f?p?1:.6:1,transition:"opacity 2s ease-in-out"},children:i==="measuring"?o("CycleTimer.Measuring.lb","measuring..."):i==="measured"?o("CycleTimer.Determined.lb","determined"):i==="countdown"&&c!==null?o("CycleTimer.OfTime.lb",{time:Vt(c,s.language)}):""})})})})]})]})},RC=({timerState:e,animationState:t,hasError:r,compact:n,className:o})=>{const{t:s,i18n:a}=Ce.useTranslation(),i=E.useTheme(),{currentState:l,remainingTime:c,maxTime:u}=e,{showErrorAnimation:d,showPauseAnimation:h,showPulsatingText:p,pulsatingFinished:f,showIdlePulsating:m,idleDotsCount:b}=t;return n&&l==="idle"?g.jsx(E.Box,{className:o,sx:{display:"flex",alignItems:"center",m:0},children:g.jsx(E.Typography,{variant:"body2",sx:{color:r?i.palette.error.light:i.palette.text.primary,fontSize:"14px",transition:"color 0.5s ease-out"},children:r?s("CycleTimer.Error.lb","Error"):l==="idle"?"0s":Vt(c,a.language)})}):g.jsxs(E.Box,{className:o,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[!(l==="idle"&&n)&&g.jsx(E.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:h||d?.6:1,transition:"opacity 0.5s ease-out"},children:g.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)"},role:"img","aria-label":"Timer progress",children:[g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:r?i.palette.error.light:l==="measured"?p||f?i.palette.success.main:i.palette.text.secondary:i.palette.success.main,strokeWidth:"2",opacity:l==="measured"&&f?p?1:.6:.3,style:{transition:"stroke 0.8s ease-in-out, opacity 2s ease-in-out"}}),g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:r?i.palette.error.light:l==="measured"?p||f?i.palette.success.main:i.palette.text.secondary:i.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-(l==="idle"?0:e.currentProgress)/100)}`,style:{opacity:l==="measured"&&f?p?1:.6:1,transition:"stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"}})]})}),g.jsx(E.Typography,{variant:"body2",sx:{color:r?i.palette.error.light:l==="idle"?"rgba(255, 255, 255, 0.7)":l==="measured"?p||f?i.palette.success.main:i.palette.text.secondary:i.palette.text.primary,fontSize:"14px",lineHeight:"normal",letterSpacing:"normal",opacity:l==="idle"?m?1:.6:l==="measured"&&f?p?1:.6:1,transition:"color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"},children:r?s("CycleTimer.Error.lb","Error"):l==="idle"?g.jsxs(g.Fragment,{children:[g.jsx("span",{children:s("CycleTimer.WaitingForCycle.lb","Waiting for program cycle")}),g.jsx("span",{style:{display:"inline-block",width:"18px",textAlign:"left"},children:".".repeat(b)})]}):l==="measuring"?n?Vt(c,a.language):`${Vt(c,a.language)} / ${s("CycleTimer.Measuring.lb","measuring...")}`:l==="measured"?n?Vt(c,a.language):`${Vt(c,a.language)} / ${s("CycleTimer.Determined.lb","determined")}`:l==="countdown"&&u!==null?n?Vt(c,a.language):`${Vt(c,a.language)} / ${s("CycleTimer.Time.lb",{time:Vt(u,a.language)})}`:Vt(c,a.language)})]})},MC=()=>{const[e,t]=D.useState({showPauseAnimation:!1,showErrorAnimation:!1,showPulsatingText:!1,pulsatingFinished:!1,showLabels:!0,showMainText:!0,showIdlePulsating:!1,idleDotsCount:0}),r=D.useRef(null),n=D.useRef(null),o=D.useRef(null),s=D.useRef(null),a=D.useRef(0),i=D.useRef(null),l=D.useRef(null),c=D.useCallback(()=>{t(v=>({...v,showPauseAnimation:!0})),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(v=>({...v,showPauseAnimation:!1}))},800)},[]),u=D.useCallback(()=>{t(v=>({...v,showErrorAnimation:!0})),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{t(v=>({...v,showErrorAnimation:!1}))},600)},[]),d=D.useCallback(()=>{t(v=>({...v,showErrorAnimation:!1})),n.current&&clearTimeout(n.current)},[]),h=D.useCallback(v=>{a.current=0,t(O=>({...O,showPulsatingText:!0,pulsatingFinished:!1})),setTimeout(()=>{t(O=>({...O,pulsatingFinished:!0})),o.current=setInterval(()=>{t(O=>({...O,showPulsatingText:!O.showPulsatingText}))},2e3),v&&v()},800)},[]),p=D.useCallback(()=>{o.current&&(clearInterval(o.current),o.current=null),t(v=>({...v,showPulsatingText:!1,pulsatingFinished:!1})),a.current=0},[]),f=D.useCallback(()=>{t(v=>({...v,showIdlePulsating:!0})),i.current=setInterval(()=>{t(v=>({...v,showIdlePulsating:!v.showIdlePulsating}))},2e3),l.current=setInterval(()=>{t(v=>({...v,idleDotsCount:(v.idleDotsCount+1)%4}))},800)},[]),m=D.useCallback(()=>{i.current&&(clearInterval(i.current),i.current=null),l.current&&(clearInterval(l.current),l.current=null),t(v=>({...v,showIdlePulsating:!1,idleDotsCount:0}))},[]),b=D.useCallback(()=>{t(v=>({...v,showLabels:!1,showMainText:!1})),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{t(v=>({...v,showLabels:!0,showMainText:!0}))},200)},[]),S=D.useCallback(()=>{t(v=>({...v,showLabels:!0,showMainText:!0}))},[]),P=D.useCallback(()=>{r.current&&clearTimeout(r.current),n.current&&clearTimeout(n.current),s.current&&clearTimeout(s.current),o.current&&clearInterval(o.current),i.current&&clearInterval(i.current),l.current&&clearInterval(l.current)},[]);return{animationState:e,triggerPauseAnimation:c,triggerErrorAnimation:u,clearErrorAnimation:d,startPulsatingAnimation:h,stopPulsatingAnimation:p,startIdleAnimations:f,stopIdleAnimations:m,triggerFadeTransition:b,setInitialAnimationState:S,cleanup:P}};class Al{constructor(t=[],r={}){this.currentValues=[],this.targetValues=[],this.previousTargetValues=[],this.targetUpdateTime=0,this.animationId=null,this.updateCount=0,this.velocities=[],this.animate=()=>{this.update(.016666666666666666)?this.animationId=null:this.animationId=requestAnimationFrame(this.animate)},this.options={tension:120,friction:20,threshold:.001,onChange:()=>{},onComplete:()=>{},...r},this.currentValues=[...t],this.targetValues=[...t],this.previousTargetValues=[...t],this.velocities=new Array(t.length).fill(0),this.targetUpdateTime=performance.now(),this.updateCount=0}update(t=1/60){let r=!1,n=!0;this.updateCount++;const o=Math.min(t,1/15),s=this.updateCount===1?.7:1;for(let a=0;a<this.currentValues.length;a++){const i=this.currentValues[a],l=this.targetValues[a],c=this.velocities[a],u=l-i,d=u*this.options.tension*s,h=c*this.options.friction,p=d-h,f=c+p*o,m=i+f*o;Math.abs(u)<this.options.threshold&&Math.abs(f)<this.options.threshold*10?this.currentValues[a]!==l&&(this.currentValues[a]=l,this.velocities[a]=0,r=!0):(n=!1,this.currentValues[a]=m,this.velocities[a]=f,r=!0)}return r&&this.options.onChange(this.currentValues),n&&this.options.onComplete(this.currentValues),n}setTarget(t){const r=performance.now(),n=r-this.targetUpdateTime;this.previousTargetValues=[...this.targetValues],this.targetValues=[...t],this.targetUpdateTime=r,this.updateCount=0;const o=this.previousTargetValues.every((s,a)=>s===this.currentValues[a]);if(n<8&&n>0&&this.previousTargetValues.length>0&&!o){const s=Math.min(n/8,1);for(let a=0;a<this.targetValues.length;a++){const i=this.previousTargetValues[a]||0,l=t[a]||0;Math.abs(l-i)>.1&&(this.targetValues[a]=i+(l-i)*s)}}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 Pl(e=[],t={}){const r=D.useRef(null);return r.current||(r.current=new Al(e,t)),D.useEffect(()=>{var n;(n=r.current)==null||n.updateOptions(t)},[t]),D.useEffect(()=>()=>{var n;(n=r.current)==null||n.destroy()},[]),[r.current]}const VC=({autoStart:e,onCycleEnd:t,onMeasuringComplete:r,hasError:n,onPauseAnimation:o,onErrorAnimation:s,onClearErrorAnimation:a,onStartPulsating:i})=>{const[l,c]=D.useState({currentState:"idle",remainingTime:0,maxTime:null,isRunning:!1,isPausedState:!1,currentProgress:0,wasRunningBeforeError:!1}),u=D.useRef(null),d=D.useRef(null),h=D.useRef(0),[p]=Pl([0],{tension:80,friction:18,onChange:([I])=>{c(T=>({...T,currentProgress:I}))}}),f=D.useCallback(()=>{c(I=>({...I,currentState:"idle",maxTime:null,isRunning:!1,isPausedState:!1,currentProgress:0})),h.current=0,d.current=null,p.setImmediate([0])},[p]),m=D.useCallback((I=0)=>{const T=I/60%1*100;c(w=>({...w,currentState:"measuring",maxTime:null,remainingTime:I,isPausedState:!1,currentProgress:T})),h.current=0,p.setImmediate([T]),e?(d.current=Date.now()-I*1e3,c(w=>({...w,isRunning:!0}))):d.current=null},[e,p]),b=D.useCallback((I,T=0)=>{c(k=>({...k,isRunning:!1})),d.current=null,c(k=>({...k,currentState:"countdown",maxTime:I,isPausedState:!1})),h.current=0;const w=Math.max(0,I-T),R=T>0?T/I*100:0;c(k=>({...k,remainingTime:w,currentProgress:R})),p.setImmediate([R]),w===0?(c(k=>({...k,isRunning:!1})),d.current=null,t&&queueMicrotask(()=>t())):e?setTimeout(()=>{d.current=Date.now()-T*1e3,c(k=>({...k,isRunning:!0}))},0):d.current=null},[e,t,p]),S=D.useCallback(()=>{c(I=>({...I,isRunning:!1,currentState:"measured"})),d.current=null,i(()=>{r&&r()})},[i,r]),P=D.useCallback(()=>{if(d.current&&l.isRunning){const T=Date.now()-d.current;h.current+=T;const w=h.current/1e3,R=AC(l.currentState,w,l.maxTime);p.setTarget([R])}c(I=>({...I,isRunning:!1,isPausedState:!0})),o()},[l.isRunning,l.currentState,l.maxTime,p,o]),v=D.useCallback(()=>{l.isPausedState&&(l.remainingTime>0||l.currentState!=="countdown")&&(d.current=Date.now(),c(I=>({...I,isRunning:!0,isPausedState:!1})))},[l.isPausedState,l.remainingTime,l.currentState]),O=D.useCallback(()=>l.isPausedState,[l.isPausedState]);return D.useEffect(()=>{n?(l.isRunning&&!l.isPausedState&&(c(I=>({...I,wasRunningBeforeError:!0})),P()),s()):(l.wasRunningBeforeError&&l.isPausedState&&(c(I=>({...I,wasRunningBeforeError:!1})),v()),a())},[n,l.isRunning,l.isPausedState,l.wasRunningBeforeError,P,v,s,a]),D.useEffect(()=>{if(l.isRunning){const I=()=>{if(d.current){const w=(Date.now()-d.current+h.current)/1e3;if(l.currentState==="countdown"&&l.maxTime!==null){const R=Math.max(0,l.maxTime-w);c(y=>({...y,remainingTime:Math.ceil(R)}));const k=Math.min(100,w/l.maxTime*100);if(p.setTarget([k]),R<=0){c(y=>({...y,isRunning:!1,remainingTime:0})),d.current=null,p.setTarget([100]),t&&queueMicrotask(()=>t());return}}else if(l.currentState==="measuring"){c(k=>({...k,remainingTime:Math.floor(w)}));const R=w/60%1*100;p.setTarget([R])}l.isRunning&&(u.current=requestAnimationFrame(I))}};u.current=requestAnimationFrame(I)}else u.current&&(cancelAnimationFrame(u.current),u.current=null);return()=>{u.current&&cancelAnimationFrame(u.current)}},[l.isRunning,t,l.currentState,l.maxTime,p]),D.useEffect(()=>{let I=null;const T=()=>{p.update(1/60),I=requestAnimationFrame(T)};return I=requestAnimationFrame(T),()=>{I&&cancelAnimationFrame(I)}},[p]),{timerState:l,controls:{startNewCycle:b,startMeasuring:m,setIdle:f,completeMeasuring:S,pause:P,resume:v,isPaused:O}}},_C=Ue(ge.observer(({onCycleComplete:e,onCycleEnd:t,onMeasuringComplete:r,autoStart:n=!0,variant:o="default",compact:s=!1,className:a,hasError:i=!1})=>{const l=D.useRef(void 0),{animationState:c,triggerPauseAnimation:u,triggerErrorAnimation:d,clearErrorAnimation:h,startPulsatingAnimation:p,stopPulsatingAnimation:f,startIdleAnimations:m,stopIdleAnimations:b,triggerFadeTransition:S,setInitialAnimationState:P,cleanup:v}=MC(),{timerState:O,controls:I}=VC({autoStart:n,onCycleEnd:t,onMeasuringComplete:r,hasError:i,onPauseAnimation:u,onErrorAnimation:d,onClearErrorAnimation:h,onStartPulsating:p});return D.useEffect(()=>{const T=l.current;l.current!==void 0&&T!==O.currentState?(T==="measured"&&f(),T==="idle"&&b(),S()):P(),O.currentState==="idle"&&m(),l.current=O.currentState},[O.currentState,f,b,m,S,P]),D.useEffect(()=>{let T=!0;const w=setTimeout(()=>{T&&e(I)},0);return()=>{T=!1,clearTimeout(w)}},[e,I]),D.useEffect(()=>v,[v]),o==="small"?g.jsx(RC,{timerState:O,animationState:c,hasError:i,compact:s,className:a}):g.jsx(PC,{timerState:O,animationState:c,hasError:i,className:a})})),kC=e=>{const t=Math.floor(e/86400),r=Math.floor(e%86400/3600),n=Math.floor(e%3600/60),o=e%60,s=[];return t>0?(s.push(t.toString()),s.push(r.toString().padStart(2,"0")),s.push(n.toString().padStart(2,"0")),s.push(o.toString().padStart(2,"0"))):r>0?(s.push(r.toString()),s.push(n.toString().padStart(2,"0")),s.push(o.toString().padStart(2,"0"))):(s.push(n.toString()),s.push(o.toString().padStart(2,"0"))),s.join(":")},Ru=(e,t)=>{const r=Math.floor(e/86400),n=Math.floor(e%86400/3600),o=Math.floor(e%3600/60),s=e%60;if(typeof Intl<"u"&&"DurationFormat"in Intl)try{const i={};return r>0&&(i.days=r),n>0&&(i.hours=n),o>0&&(i.minutes=o),(s>0||Object.keys(i).length===0)&&(i.seconds=s),new Intl.DurationFormat(t,{style:"narrow"}).format(i)}catch{}const a=[];return r>0&&a.push(`${r}d`),n>0&&a.push(`${n}h`),o>0&&a.push(`${o}m`),(s>0||a.length===0)&&a.push(`${s}s`),a.join(" ")},jC=({timerState:e,animationState:t,hasError:r,className:n})=>{const{t:o}=Ce.useTranslation(),s=nh(),{elapsedTime:a,currentProgress:i}=e,{showErrorAnimation:l,showPauseAnimation:c,showMainText:u}=t;return g.jsxs(E.Box,{className:n,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx(Yf.Gauge,{width:264,height:264,value:i,valueMin:0,valueMax:100,innerRadius:"85%",outerRadius:"100%",margin:0,skipAnimation:!0,text:()=>"",sx:{opacity:c||l?.6:1,transition:"opacity 0.5s ease-out","& .MuiGauge-valueArc":{fill:r?s.palette.error.light:s.palette.success.main,transition:"fill 0.5s ease-out"},"& .MuiGauge-referenceArc":{fill:"#171927",stroke:"transparent",strokeWidth:0,transition:"fill 0.5s ease-out, stroke 0.5s ease-out, stroke-width 0.5s ease-out"},"& .MuiGauge-valueText":{display:"none"},"& .MuiGauge-text":{display:"none"}}}),g.jsx(E.Box,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:225,height:225,borderRadius:"50%",backgroundColor:"#292B3F",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1,transition:"background-color 0.5s ease-out"},children:g.jsxs(E.Box,{sx:{position:"relative",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:[g.jsx(E.Fade,{in:u&&r,timeout:200,children:g.jsx(E.Typography,{variant:"h6",sx:{position:"absolute",fontSize:"16px",fontWeight:500,color:s.palette.error.light},children:o("timer.error")})}),g.jsx(E.Fade,{in:u&&!r,timeout:300,children:g.jsx(E.Typography,{variant:"h1",sx:{position:"absolute",fontSize:"48px",fontWeight:500,color:s.palette.text.primary,lineHeight:1,letterSpacing:"-0.5px"},children:kC(a)})})]})})]})},DC=({timerState:e,animationState:t,hasError:r,compact:n,className:o})=>{const{t:s,i18n:a}=Ce.useTranslation(),i=nh(),{elapsedTime:l,currentProgress:c}=e,{showErrorAnimation:u,showPauseAnimation:d}=t;return n?g.jsx(E.Box,{className:o,sx:{display:"flex",alignItems:"center",m:0},children:g.jsx(E.Typography,{variant:"body2",sx:{color:r?i.palette.error.light:i.palette.text.primary,fontSize:"14px",transition:"color 0.5s ease-out"},children:r?s("timer.error"):Ru(l,a.language)})}):g.jsxs(E.Box,{className:o,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[g.jsx(E.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:d||u?.6:1,transition:"opacity 0.5s ease-out"},children:g.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)"},role:"img","aria-label":"Timer progress",children:[g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:r?i.palette.error.light:i.palette.success.main,strokeWidth:"2",opacity:.3,style:{transition:"stroke 0.8s ease-in-out, opacity 2s ease-in-out"}}),g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:r?i.palette.error.light:i.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-c/100)}`,style:{transition:"stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"}})]})}),g.jsx(E.Typography,{variant:"body2",sx:{color:r?i.palette.error.light:i.palette.text.primary,fontSize:"14px",lineHeight:"normal",letterSpacing:"normal",transition:"color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"},children:r?s("timer.error"):Ru(l,a.language)})]})},UC=()=>{const[e,t]=D.useState({showPauseAnimation:!1,showErrorAnimation:!1,showMainText:!0}),r=D.useRef(null),n=D.useRef(null),o=D.useRef(null),s=D.useCallback(()=>{t(d=>({...d,showPauseAnimation:!0})),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(d=>({...d,showPauseAnimation:!1}))},800)},[]),a=D.useCallback(()=>{t(d=>({...d,showErrorAnimation:!0})),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{t(d=>({...d,showErrorAnimation:!1}))},600)},[]),i=D.useCallback(()=>{t(d=>({...d,showErrorAnimation:!1})),n.current&&clearTimeout(n.current)},[]),l=D.useCallback(()=>{t(d=>({...d,showMainText:!1})),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{t(d=>({...d,showMainText:!0}))},200)},[]),c=D.useCallback(()=>{t(d=>({...d,showMainText:!0}))},[]),u=D.useCallback(()=>{r.current&&clearTimeout(r.current),n.current&&clearTimeout(n.current),o.current&&clearTimeout(o.current)},[]);return{animationState:e,triggerPauseAnimation:s,triggerErrorAnimation:a,clearErrorAnimation:i,triggerFadeTransition:l,setInitialAnimationState:c,cleanup:u}},LC=({autoStart:e,hasError:t,onPauseAnimation:r,onErrorAnimation:n,onClearErrorAnimation:o})=>{const[s,a]=D.useState({elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0,wasRunningBeforeError:!1}),i=D.useRef(null),l=D.useRef(null),c=D.useRef(0),u=D.useRef(0),[d]=Pl([0],{tension:80,friction:18,onChange:([S])=>{a(P=>({...P,currentProgress:S}))}}),h=D.useCallback((S=0)=>{const P=S/60%1*100;a(v=>({...v,elapsedTime:S,isPausedState:!1,currentProgress:P})),c.current=0,u.current=P,d.setImmediate([P]),e?(l.current=Date.now()-S*1e3,a(v=>({...v,isRunning:!0}))):l.current=null},[e,d]),p=D.useCallback(()=>{if(l.current&&s.isRunning){const P=(Date.now()-l.current)/1e3+c.current,v=P/60%1*100;d.setTarget([v]),a(O=>({...O,elapsedTime:Math.floor(P)}))}a(S=>({...S,isRunning:!1,isPausedState:!0})),r()},[s.isRunning,d,r]),f=D.useCallback(()=>{s.isPausedState&&(c.current=s.elapsedTime,l.current=Date.now(),a(S=>({...S,isRunning:!0,isPausedState:!1})))},[s.isPausedState,s.elapsedTime]),m=D.useCallback(()=>{a(S=>({...S,elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0})),c.current=0,l.current=null,u.current=0,d.setImmediate([0])},[d]),b=D.useCallback(()=>s.isPausedState,[s.isPausedState]);return D.useEffect(()=>{t?(s.isRunning&&(a(S=>({...S,wasRunningBeforeError:!0})),p()),n()):(s.wasRunningBeforeError&&!s.isRunning&&(a(S=>({...S,wasRunningBeforeError:!1})),f()),o())},[t,s.isRunning,s.wasRunningBeforeError,p,f,n,o]),D.useEffect(()=>{if(s.isRunning){const S=()=>{if(l.current){const v=(Date.now()-l.current)/1e3+c.current,O=v/60%1*100;a(T=>({...T,elapsedTime:Math.floor(v)})),Math.abs(O-u.current)>.1&&(d.setTarget([O]),u.current=O)}i.current=requestAnimationFrame(S)};i.current=requestAnimationFrame(S)}else i.current&&(cancelAnimationFrame(i.current),i.current=null);return()=>{i.current&&(cancelAnimationFrame(i.current),i.current=null)}},[s.isRunning,d]),D.useEffect(()=>{let S=null;const P=()=>{d.update(),S=requestAnimationFrame(P)};return S=requestAnimationFrame(P),()=>{S&&cancelAnimationFrame(S)}},[d]),{timerState:s,controls:{start:h,pause:p,resume:f,reset:m,isPaused:b}}},BC=Ue(ge.observer(({onTimerReady:e,autoStart:t=!0,variant:r="default",compact:n=!1,className:o,hasError:s=!1})=>{const{animationState:a,triggerPauseAnimation:i,triggerErrorAnimation:l,clearErrorAnimation:c,setInitialAnimationState:u,cleanup:d}=UC(),{timerState:h,controls:p}=LC({autoStart:t,hasError:s,onPauseAnimation:i,onErrorAnimation:l,onClearErrorAnimation:c});return D.useEffect(()=>{u()},[u]),D.useEffect(()=>{let f=!0;const m=setTimeout(()=>{f&&e(p)},0);return()=>{f=!1,clearTimeout(m)}},[e,p]),D.useEffect(()=>d,[d]),r==="small"?g.jsx(DC,{timerState:h,animationState:a,hasError:s,compact:n,className:o}):g.jsx(jC,{timerState:h,animationState:a,hasError:s,className:o})})),kr=Qg;process.env.NODE_ENV!=="production"&&(x.node,x.object.isRequired);function Rl(e){return Kg(e)}function FC(e){return pn("MuiSvgIcon",e)}Bi("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const $C=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${tt(t)}`,`fontSize${tt(r)}`]};return Cs(o,FC,n)},NC=ft("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${tt(r.color)}`],t[`fontSize${tt(r.fontSize)}`]]}})(kr(({theme:e})=>{var t,r,n,o,s,a,i,l,c,u,d,h,p,f;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(t=e.transitions)==null?void 0:t.create)==null?void 0:o.call(t,"fill",{duration:(n=(r=(e.vars??e).transitions)==null?void 0:r.duration)==null?void 0:n.shorter}),variants:[{props:m=>!m.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((a=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:a.call(s,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:l.call(i,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,m])=>m&&m.main).map(([m])=>{var b,S;return{props:{color:m},style:{color:(S=(b=(e.vars??e).palette)==null?void 0:b[m])==null?void 0:S.main}}}),{props:{color:"action"},style:{color:(h=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:h.active}},{props:{color:"disabled"},style:{color:(f=(p=(e.vars??e).palette)==null?void 0:p.action)==null?void 0:f.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),bs=_.forwardRef(function(t,r){const n=Rl({props:t,name:"MuiSvgIcon"}),{children:o,className:s,color:a="inherit",component:i="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:h="0 0 24 24",...p}=n,f=_.isValidElement(o)&&o.type==="svg",m={...n,color:a,component:i,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:f},b={};u||(b.viewBox=h);const S=$C(m);return g.jsxs(NC,{as:i,className:Et(S.root,s),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r,...b,...p,...f&&o.props,ownerState:m,children:[f?o.props.children:o,d?g.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(bs.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});bs.muiName="SvgIcon";function pr(e,t){function r(n,o){return g.jsx(bs,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:o,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=bs.muiName,_.memo(_.forwardRef(r))}function zC(e){const{controlled:t,default:r,name:n,state:o="value"}=e,{current:s}=_.useRef(t!==void 0),[a,i]=_.useState(r),l=s?t:a;if(process.env.NODE_ENV!=="production"){_.useEffect(()=>{s!==(t!==void 0)&&console.error([`MUI: A component is changing the ${s?"":"un"}controlled ${o} state of ${n} to be ${s?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
126
|
+
`))},[o,n,t]);const{current:u}=_.useRef(r);_.useEffect(()=>{!s&&!Object.is(u,r)&&console.error([`MUI: A component is changing the default ${o} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
|
|
127
|
+
`))},[JSON.stringify(r)])}const c=_.useCallback(u=>{s||i(u)},[]);return[l,c]}const GC=pr(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"),HC=pr(g.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),Mu=pr(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"),Op=Ue(ge.observer(({data:e,columns:t,getRowData:r,onRowClick:n,selectedItem:o,getItemId:s,title:a,showCount:i=!0,searchPlaceholder:l="Search programs",dataGridProps:c,CustomToolbar:u,selectFirstByDefault:d=!1,sx:h})=>{var R;const p=E.useTheme(),f=Ct.useGridApiRef(),m=D.useRef(null),[b,S]=D.useState(null),P=D.useMemo(()=>e.map(r),[e,r]);D.useEffect(()=>{f.current&&P.length>0&&f.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:t.map(k=>k.field)})},[P,t,f]),D.useEffect(()=>{if(!m.current||!f.current)return;const k=new ResizeObserver(()=>{setTimeout(()=>{f.current&&P.length>0&&f.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:t.map(y=>y.field)})},100)});return k.observe(m.current),()=>{k.disconnect()}},[f,P.length,t]);const v=D.useMemo(()=>{if(o!==void 0)return o;if(b!==null)return b;if(d&&e.length>0){const k=e[0];return S(k),k}return null},[d,e,o,b]),O=k=>{const y=e.find(A=>r(A).id===k.id);y&&(o===void 0&&S(y),n&&n(y,k))},I=D.useMemo(()=>!v||!s?null:s(v),[v,s]);function T(){return g.jsx(Ct.Toolbar,{children:g.jsxs(E.Box,{sx:{display:"flex",width:"100%",gap:1,p:.5,alignItems:"center"},children:[a&&g.jsxs(E.Typography,{variant:"h6",sx:{fontWeight:500,color:"white"},children:[a,i&&` (${e.length})`]}),g.jsxs(E.Box,{sx:{ml:"auto",display:"flex",gap:.5,alignItems:"center",pr:1},children:[g.jsx(Ct.FilterPanelTrigger,{render:g.jsx(Ct.ToolbarButton,{"aria-label":"Show filters",children:g.jsx(HC,{fontSize:"small"})})}),g.jsx(E.Divider,{orientation:"vertical",flexItem:!0,sx:{height:"24px",alignSelf:"center"}}),g.jsx(Ct.QuickFilter,{render:(k,y)=>g.jsxs(E.Box,{...k,sx:{display:"flex",overflow:"hidden"},children:[!y.expanded&&g.jsx(Ct.QuickFilterTrigger,{render:g.jsx(Ct.ToolbarButton,{"aria-label":"Search",children:g.jsx(Mu,{fontSize:"small"})})}),g.jsxs(E.Box,{sx:{display:"flex",overflow:"hidden",transition:"all 0.3s ease-in-out",width:y.expanded?"200px":"0px",position:"relative"},children:[g.jsxs(E.Box,{sx:{flex:1,position:"relative","& .MuiInputBase-root":{height:"32px",borderRadius:"16px",backgroundColor:"#171927",paddingLeft:"40px",paddingRight:y.expanded&&y.value!==""?"40px":"12px",color:"white",fontSize:"14px",border:"none !important",outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"},"&:hover":{"&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"&:focus-within":{outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"&.Mui-focused":{outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"& .MuiInputBase-input":{padding:"8px 0",border:"none !important",outline:"none !important",boxShadow:"none !important","&:focus":{outline:"none !important",boxShadow:"none !important",border:"none !important"},"&::placeholder":{color:"rgba(255, 255, 255, 0.3)",opacity:1}},"& fieldset":{border:"none !important",display:"none !important"},"& .MuiOutlinedInput-notchedOutline":{border:"none !important",display:"none !important"}}},children:[y.expanded&&g.jsx(Mu,{fontSize:"small",sx:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:"rgba(255, 255, 255, 0.6)",zIndex:1,pointerEvents:"none"}}),g.jsx(Ct.QuickFilterControl,{placeholder:l})]}),y.expanded&&y.value!==""&&g.jsx(Ct.QuickFilterClear,{render:g.jsx(E.Box,{sx:{position:"absolute",right:"8px",top:"50%",transform:"translateY(-50%)",zIndex:1},children:g.jsx(E.Box,{sx:{minWidth:"24px",width:"24px",height:"24px",padding:0,color:"rgba(255, 255, 255, 0.6)","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.1)"}},children:g.jsx(Ct.ToolbarButton,{"aria-label":"Clear",children:g.jsx(GC,{fontSize:"small"})})})})})]})]})})]})]})})}const w=u||T;return g.jsx(E.Box,{ref:m,sx:{height:"100%",display:"flex",flexDirection:"column","& *":{scrollbarWidth:"none",msOverflowStyle:"none","&::-webkit-scrollbar":{display:"none"}},"&:hover *":{scrollbarWidth:"thin",scrollbarColor:`${p.palette.divider} transparent`,"&::-webkit-scrollbar":{display:"block",width:"8px",height:"8px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:p.palette.divider,borderRadius:"4px"},"&::-webkit-scrollbar-thumb:hover":{background:p.palette.action.hover}},...h},children:g.jsx(Ct.DataGrid,{apiRef:f,rows:P,columns:t,onRowClick:O,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:!0,autosizeOptions:{...(c==null?void 0:c.autosizeOptions)||{},includeOutliers:!0,includeHeaders:!0,expand:!0,columns:((R=c==null?void 0:c.autosizeOptions)==null?void 0:R.columns)||t.map(k=>k.field)},sx:{border:"none",width:"100%","& .MuiPaper-root":{boxShadow:"none !important"},"& .MuiDataGrid-overlay":{},"& .MuiDataGrid-main":{border:"none","& .MuiPaper-root":{}},"& .MuiDataGrid-container--top [role=row]":{},"& .MuiDataGrid-topContainer":{borderBottom:"none !important"},"& .MuiDataGrid-columnHeaders":{border:"none",borderBottom:"none !important"},"& .MuiDataGrid-row":{cursor:n?"pointer":"default",border:"none",margin:"1px 0",position:"relative",backgroundColor:"transparent !important","&:hover":{backgroundColor:"transparent !important","&::before":{content:'""',position:"absolute",top:0,left:"16px",right:"16px",bottom:0,backgroundColor:"action.hover",borderRadius:"16px",zIndex:0}},"&.Mui-selected":{backgroundColor:"transparent !important","&:hover":{backgroundColor:"transparent !important"}},...I!==null&&{[`&[data-id="${I}"]`]:{backgroundColor:"transparent !important","&::before":{content:'""',position:"absolute",top:0,left:"16px",right:"16px",bottom:0,backgroundColor:"rgba(255, 255, 255, 0.08) !important",borderRadius:"16px",zIndex:0},"&:hover":{backgroundColor:"transparent !important"},"&:hover::before":{backgroundColor:"rgba(255, 255, 255, 0.12) !important"}}}},"& .MuiDataGrid-cell--textLeft":{paddingLeft:"40px"},"& .MuiDataGrid-cell":{border:"none",position:"relative",zIndex:1,"&:focus":{outline:"none"},"&:focus-within":{outline:"none"},"&:hover":{backgroundColor:"transparent !important"}},"& .MuiDataGrid-columnHeader":{border:"none",paddingLeft:"40px",paddingRight:"40px","& .MuiDataGrid-columnHeaderTitle":{color:"rgba(255, 255, 255, 0.6)"}},"& .MuiDataGrid-toolbarContainer":{padding:"8px",border:"none !important",borderBottom:"none !important","& .MuiBox-root":{},"& .MuiFormControl-root":{},"& .MuiInputBase-root":{},"& .MuiPaper-root":{boxShadow:"none !important"},"& *":{borderBottom:"none !important"}},"& .MuiDataGrid-toolbar":{borderBottom:"none !important"},"& .MuiDataGrid-toolbarFilterList":{border:"none"},"& .MuiDataGrid-withBorderColor":{borderColor:"transparent !important"},"& .MuiDataGrid-columnSeparator":{display:"none"},"& .MuiDataGrid-footerContainer":{display:"none"},"& .MuiDataGrid-filler":{border:"none !important",borderTop:"none !important",borderBottom:"none !important",borderLeft:"none !important",borderRight:"none !important","--rowBorderColor":"none !important"},"& .MuiBackdrop-root":{},"& .MuiModal-backdrop":{},...c==null?void 0:c.sx}})})}));Op.displayName="WandelbotsDataGrid";const en=c0({createStyledComponent:ft("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>Rl({props:e,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(en.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 qC=({title:e,titleId:t,...r},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?_.createElement("title",{id:t},e):null,_.createElement("g",{id:"JogMinus"},_.createElement("path",{id:"Minus",d:"M0 13V8H21V13H0Z",fill:"white"}))),WC=D.forwardRef(qC),JC=({title:e,titleId:t,...r},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?_.createElement("title",{id:t},e):null,_.createElement("g",{id:"JogPlus"},_.createElement("g",{id:"Plus"},_.createElement("path",{d:"M0 13V8H8V13H0Z",fill:"white"}),_.createElement("path",{d:"M8 0L13 2.18557e-07L13 21H8L8 0Z",fill:"white"}),_.createElement("path",{d:"M13 13V8H21V13H13Z",fill:"white"})))),YC=D.forwardRef(JC);function Zs(e){D.useEffect(e,[])}function Tp(e){Zs(()=>We.autorun(e))}function Ep(e,t,r){Zs(()=>We.reaction(e,t,r))}function ea(e){return Zs(()=>{let t;function r(){e(),t=requestAnimationFrame(r)}return t=requestAnimationFrame(r),()=>{cancelAnimationFrame(t)}})}const xi=Ue(ge.observer(({colors:e,label:t,getDisplayedValue:r,startJogging:n,stopJogging:o,disabled:s,activeJoggingDirection:a,...i})=>{var v,O,I,T,w,R,k;ea(()=>{const y=r(),A=h.current;A&&(A.textContent=y)});const l=E.useTheme(),[c,u]=D.useState(null);D.useEffect(()=>{s&&P()},[s]);const d=a||c,h=D.useRef(null);e||(e={color:"#fff",backgroundColor:"#000",borderColor:"#000",buttonBackgroundColor:{disabled:"#000",default:"#000",hovered:"#000",pressed:"#000"},labelColor:"#000"});const p=d?(v=e.buttonBackgroundColor)==null?void 0:v.pressed:e.borderColor,f={width:"55px",color:e.color,path:{fill:e.color},alignContent:"center",fontSize:"37px",svg:{pointerEvents:"none"}},m={...f,backgroundColor:(O=e.buttonBackgroundColor)==null?void 0:O.default,":hover":{backgroundColor:(I=e.buttonBackgroundColor)==null?void 0:I.hovered},":active":{backgroundColor:(T=e.buttonBackgroundColor)==null?void 0:T.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}}},b={...f,backgroundColor:(R=e.buttonBackgroundColor)==null?void 0:R.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor},":disabled":{backgroundColor:(k=e.buttonBackgroundColor)==null?void 0:k.pressed,"svg path":{fill:l.palette.action.disabled}}};function S(y,A){s||y.button===0&&(u(A),n(A))}function P(){u(null),o()}return g.jsxs(en,{height:"64px",direction:"row",justifyContent:"center",...i,children:[g.jsx(E.IconButton,{disabled:s,disableRipple:!0,onPointerDown:y=>S(y,"-"),onPointerUp:P,onPointerOut:P,size:"large",sx:{...d==="-"?b:m,borderRadius:"16px 0px 0px 16px",borderLeft:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:g.jsx(WC,{})}),g.jsxs(en,{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(en,{height:"22px",direction:"row",alignItems:"center",justifyItems:"center",spacing:1,sx:{userSelect:"none",color:e.color,".MuiTypography-root":{fontWeight:700,...s?{color:l.palette.action.disabled}:{}},...s?{"svg path":{fill:l.palette.action.disabled}}:{}},children:t}),g.jsx(E.Typography,{height:"22px",sx:{fontSize:"15px",color:s?l.palette.action.disabled:e.color,fontWeight:700},ref:h,children:r()})]}),g.jsx(E.IconButton,{disableRipple:!0,disabled:s,onPointerDown:y=>S(y,"+"),onPointerUp:P,onPointerOut:P,size:"large",sx:{...d==="+"?b:m,borderRadius:"0px 16px 16px 0px",borderRight:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:g.jsx(YC,{})})]})})),KC=pr(g.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),QC=pr(g.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");function Tr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ip=typeof global=="object"&&global&&global.Object===Object&&global,XC=typeof self=="object"&&self&&self.Object===Object&&self,Bt=Ip||XC||Function("return this")(),Na=function(){return Bt.Date.now()},ZC=/\s/;function ew(e){for(var t=e.length;t--&&ZC.test(e.charAt(t)););return t}var tw=/^\s+/;function rw(e){return e&&e.slice(0,ew(e)+1).replace(tw,"")}var ur=Bt.Symbol,Ap=Object.prototype,nw=Ap.hasOwnProperty,ow=Ap.toString,An=ur?ur.toStringTag:void 0;function sw(e){var t=nw.call(e,An),r=e[An];try{e[An]=void 0;var n=!0}catch{}var o=ow.call(e);return n&&(t?e[An]=r:delete e[An]),o}var aw=Object.prototype,iw=aw.toString;function lw(e){return iw.call(e)}var cw="[object Null]",uw="[object Undefined]",Vu=ur?ur.toStringTag:void 0;function jr(e){return e==null?e===void 0?uw:cw:Vu&&Vu in Object(e)?sw(e):lw(e)}function Er(e){return e!=null&&typeof e=="object"}var dw="[object Symbol]";function ta(e){return typeof e=="symbol"||Er(e)&&jr(e)==dw}var _u=NaN,hw=/^[-+]0x[0-9a-f]+$/i,pw=/^0b[01]+$/i,fw=/^0o[0-7]+$/i,mw=parseInt;function ku(e){if(typeof e=="number")return e;if(ta(e))return _u;if(Tr(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Tr(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=rw(e);var r=pw.test(e);return r||fw.test(e)?mw(e.slice(2),r?2:8):hw.test(e)?_u:+e}var gw="Expected a function",yw=Math.max,bw=Math.min;function xw(e,t,r){var n,o,s,a,i,l,c=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(gw);t=ku(t)||0,Tr(r)&&(u=!!r.leading,d="maxWait"in r,s=d?yw(ku(r.maxWait)||0,t):s,h="trailing"in r?!!r.trailing:h);function p(T){var w=n,R=o;return n=o=void 0,c=T,a=e.apply(R,w),a}function f(T){return c=T,i=setTimeout(S,t),u?p(T):a}function m(T){var w=T-l,R=T-c,k=t-w;return d?bw(k,s-R):k}function b(T){var w=T-l,R=T-c;return l===void 0||w>=t||w<0||d&&R>=s}function S(){var T=Na();if(b(T))return P(T);i=setTimeout(S,m(T))}function P(T){return i=void 0,h&&n?p(T):(n=o=void 0,a)}function v(){i!==void 0&&clearTimeout(i),c=0,n=l=o=i=void 0}function O(){return i===void 0?a:P(Na())}function I(){var T=Na(),w=b(T);if(n=arguments,o=this,l=T,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)),a}return I.cancel=v,I.flush=O,I}var Sw="Expected a function";function vw(e,t,r){var n=!0,o=!0;if(typeof e!="function")throw new TypeError(Sw);return Tr(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),xw(e,t,{leading:n,maxWait:t,trailing:o})}const Pp=Ue(ge.observer(({startJogging:e,stopJogging:t,lowerLimitDegs:r,upperLimitDegs:n,getValueDegs:o,disabled:s,...a})=>{var v,O,I,T,w,R,k,y,A,V,M,j,ne,Q,oe;const{t:i}=Ce.useTranslation(),[l,c]=D.useState(),u=E.useTheme(),d={background:(v=u.palette.backgroundPaperElevation)==null?void 0:v[4],color:(O=u.palette.backgroundPaperElevation)==null?void 0:O[11]},h=ge.useLocalObservable(()=>({activeJoggingDir:null,startJogging(X){this.activeJoggingDir=X,e(X)},stopJogging(){this.activeJoggingDir=null,t()}})),p=vw(()=>{c(o())},50);ea(p);function f(X){X.button===0&&h.startJogging("-")}function m(X){X.button===0&&h.startJogging("+")}function b(X){h.stopJogging()}function S(X){h.stopJogging()}function P(X,se=1){if(X===void 0||isNaN(X))return"";const F=i("General.degree.variable",{amount:X.toFixed(se)});return X>0&&se===0?`+${F}`:F}return g.jsxs(en,{height:"64px",width:"100%",maxWidth:"260px",direction:"row",...a,sx:{"& .MuiIconButton-root":{width:"52px",color:u.palette.text.primary,alignContent:"center",backgroundColor:(I=u.palette.backgroundPaperElevation)==null?void 0:I[11],"& svg":{width:"42px",height:"42px"},"&.Mui-disabled":{backgroundColor:(T=u.palette.backgroundPaperElevation)==null?void 0:T[11],color:u.palette.action.disabled,opacity:1},"&:hover":{backgroundColor:(w=u.palette.backgroundPaperElevation)==null?void 0:w[9]},"&:active":{...d}}},children:[g.jsx(E.IconButton,{onPointerDown:f,onPointerUp:b,onPointerOut:S,disabled:s,disableRipple:!0,sx:{borderRadius:"16px 0px 0px 16px",...h.activeJoggingDir==="-"?d:{}},children:g.jsx(KC,{sx:{pointerEvents:"none",color:(A=(y=(k=(R=u.componentsExt)==null?void 0:R.JoggingPanel)==null?void 0:k.JoggingJoint)==null?void 0:y.Joint)==null?void 0:A.arrowColor}})}),g.jsxs(en,{flexGrow:1,alignItems:"center",justifyContent:"center",sx:{borderStyle:"solid",borderLeftWidth:0,borderRightWidth:0,border:"none",backgroundColor:(V=u.palette.backgroundPaperElevation)==null?void 0:V[11],paddingLeft:"20px",paddingRight:"20px",zIndex:1},children:[g.jsx(E.Typography,{sx:{fontSize:"15px",fontWeight:700,position:"relative",top:"5px",color:s?u.palette.action.disabled:u.palette.text.primary},children:P(l)}),g.jsx(E.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:s?u.palette.action.disabled:u.palette.text.primary},"& .MuiSlider-markLabel":{top:"20px",fontSize:"12px",color:s?u.palette.action.disabled:u.palette.text.secondary},"& .MuiSlider-rail":{backgroundColor:(M=u.palette.backgroundPaperElevation)==null?void 0:M[5],opacity:1}},marks:r!==void 0&&n!==void 0&&[{value:r,label:P(r,0)},{value:n,label:P(n,0)}]})]}),g.jsx(E.IconButton,{onPointerDown:m,onPointerUp:b,onPointerOut:S,disabled:s,disableRipple:!0,sx:{borderRadius:"0px 16px 16px 0px",...h.activeJoggingDir==="+"?d:{}},children:g.jsx(QC,{sx:{pointerEvents:"none",color:(oe=(Q=(ne=(j=u.componentsExt)==null?void 0:j.JoggingPanel)==null?void 0:ne.JoggingJoint)==null?void 0:Q.Joint)==null?void 0:oe.arrowColor}})})]})})),Cw=pr(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"),ww=pr(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");/*! *****************************************************************************
|
|
128
128
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
129
129
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
130
130
|
this file except in compliance with the License. You may obtain a copy of the
|
|
@@ -137,17 +137,17 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
137
137
|
|
|
138
138
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
139
139
|
and limitations under the License.
|
|
140
|
-
***************************************************************************** */var Si=function(e,t){return Si=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)n.hasOwnProperty(o)&&(r[o]=n[o])},Si(e,t)};function
|
|
140
|
+
***************************************************************************** */var Si=function(e,t){return Si=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)n.hasOwnProperty(o)&&(r[o]=n[o])},Si(e,t)};function Rp(e,t){Si(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function Ow(e){var t=typeof Symbol=="function"&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function Tw(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,s=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(i){a={error:i}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s}function Ew(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Tw(arguments[t]));return e}var Mp=function(){function e(t,r){this.target=r,this.type=t}return e}(),Iw=function(e){Rp(t,e);function t(r,n){var o=e.call(this,"error",n)||this;return o.message=r.message,o.error=r,o}return t}(Mp),Aw=function(e){Rp(t,e);function t(r,n,o){r===void 0&&(r=1e3),n===void 0&&(n="");var s=e.call(this,"close",o)||this;return s.wasClean=!0,s.code=r,s.reason=n,s}return t}(Mp);/*!
|
|
141
141
|
* Reconnecting WebSocket
|
|
142
142
|
* by Pedro Ladaria <pedro.ladaria@gmail.com>
|
|
143
143
|
* https://github.com/pladaria/reconnecting-websocket
|
|
144
144
|
* License MIT
|
|
145
|
-
*/var Rw=function(){if(typeof WebSocket<"u")return WebSocket},Pw=function(e){return typeof e<"u"&&!!e&&e.CLOSING===2},mr={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},_w=function(){function e(t,r,n){var o=this;n===void 0&&(n={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(s){o._debug("open event");var a=o._options.minUptime,i=a===void 0?mr.minUptime:a;clearTimeout(o._connectTimeout),o._uptimeTimeout=setTimeout(function(){return o._acceptOpen()},i),o._ws.binaryType=o._binaryType,o._messageQueue.forEach(function(l){return o._ws.send(l)}),o._messageQueue=[],o.onopen&&o.onopen(s),o._listeners.open.forEach(function(l){return o._callEventListener(s,l)})},this._handleMessage=function(s){o._debug("message event"),o.onmessage&&o.onmessage(s),o._listeners.message.forEach(function(a){return o._callEventListener(s,a)})},this._handleError=function(s){o._debug("error event",s.message),o._disconnect(void 0,s.message==="TIMEOUT"?"timeout":void 0),o.onerror&&o.onerror(s),o._debug("exec error listeners"),o._listeners.error.forEach(function(a){return o._callEventListener(s,a)}),o._connect()},this._handleClose=function(s){o._debug("close event"),o._clearTimeouts(),o._shouldReconnect&&o._connect(),o.onclose&&o.onclose(s),o._listeners.close.forEach(function(a){return o._callEventListener(s,a)})},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?mr.maxEnqueuedMessages:r;this._messageQueue.length<n&&(this._debug("enqueue",t),this._messageQueue.push(t))}},e.prototype.addEventListener=function(t,r){this._listeners[t]&&this._listeners[t].push(r)},e.prototype.dispatchEvent=function(t){var r,n,o=this._listeners[t.type];if(o)try{for(var s=Ow(o),a=s.next();!a.done;a=s.next()){var i=a.value;this._callEventListener(t,i)}}catch(l){r={error:l}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}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,Ew(["RWS>"],t))},e.prototype._getNextDelay=function(){var t=this._options,r=t.reconnectionDelayGrowFactor,n=r===void 0?mr.reconnectionDelayGrowFactor:r,o=t.minReconnectionDelay,s=o===void 0?mr.minReconnectionDelay:o,a=t.maxReconnectionDelay,i=a===void 0?mr.maxReconnectionDelay:a,l=0;return this._retryCount>0&&(l=s*Math.pow(n,this._retryCount-1),l>i&&(l=i)),this._debug("next delay",l),l},e.prototype._wait=function(){var t=this;return new Promise(function(r){setTimeout(r,t._getNextDelay())})},e.prototype._getNextUrl=function(t){if(typeof t=="string")return Promise.resolve(t);if(typeof t=="function"){var r=t();if(typeof r=="string")return Promise.resolve(r);if(r.then)return r}throw Error("Invalid URL")},e.prototype._connect=function(){var t=this;if(!(this._connectLock||!this._shouldReconnect)){this._connectLock=!0;var r=this._options,n=r.maxRetries,o=n===void 0?mr.maxRetries:n,s=r.connectionTimeout,a=s===void 0?mr.connectionTimeout:s,i=r.WebSocket,l=i===void 0?Rw():i;if(this._retryCount>=o){this._debug("max retries reached",this._retryCount,">=",o);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!Pw(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()},a))})}},e.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new Iw(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 Aw(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}(),Mw=class extends _w{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()}async opened(){return new Promise((e,t)=>{this.readyState===WebSocket.OPEN?e():(this.addEventListener("open",()=>e()),this.addEventListener("error",t))})}async closed(){return new Promise((e,t)=>{this.readyState===WebSocket.CLOSED?e():(this.addEventListener("close",()=>e()),this.addEventListener("error",t))})}async firstMessage(){return this.receivedFirstMessage?this.receivedFirstMessage:new Promise((e,t)=>{const r=o=>{this.receivedFirstMessage=o,this.removeEventListener("message",r),this.removeEventListener("error",n),e(o)},n=o=>{this.removeEventListener("message",r),this.removeEventListener("error",n),t(o)};this.addEventListener("message",r),this.addEventListener("error",n)})}async nextMessage(){return new Promise((e,t)=>{const r=o=>{this.removeEventListener("message",r),this.removeEventListener("error",n),e(o)},n=o=>{this.removeEventListener("message",r),this.removeEventListener("error",n),t(o)};this.addEventListener("message",r),this.addEventListener("error",n)})}},Vw=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}};const za=new Vw,tn="wandelbots.io",Ga={dev:{domain:`https://auth.portal.dev.${tn}`,clientId:"fLbJD0RLp5r2Dpucm5j8BjwMR6Hunfha"},stg:{domain:`https://auth.portal.stg.${tn}`,clientId:"joVDeD9e786WzFNSGCqoVq7HNkWt5j6s"},prod:{domain:`https://auth.portal.${tn}`,clientId:"J7WJUi38xVQdJAEBNRT9Xw1b0fXDb4J2"}},kw=e=>{if(e.endsWith(`dev.${tn}`))return Ga.dev;if(e.endsWith(`stg.${tn}`))return Ga.stg;if(e.endsWith(tn))return Ga.prod;throw new Error("Unsupported instance URL. Cannot determine Auth0 configuration.")},jw=async e=>{if(typeof window>"u")throw new Error("Access token must be set to use NovaClient when not in a browser environment.");const t=kw(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:r}=await Promise.resolve().then(()=>require("./auth0-spa-js.production.esm-CEI5Uihg.cjs")),n=new r({domain:t.domain,clientId:t.clientId??"",useRefreshTokens:!1,authorizationParams:{audience:"nova-api",redirect_uri:window.location.origin}});if(window.location.search.includes("code=")&&window.location.search.includes("state=")){const{appState:o}=await n.handleRedirectCallback();window.history.replaceState({},document.title,(o==null?void 0:o.returnTo)||window.location.pathname)}else await n.loginWithRedirect();return await n.getTokenSilently()};function Mp(e,t){return function(){return e.apply(t,arguments)}}const{toString:Dw}=Object.prototype,{getPrototypeOf:_l}=Object,{iterator:ra,toStringTag:Vp}=Symbol,na=(e=>t=>{const r=Dw.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),At=e=>(e=e.toLowerCase(),t=>na(t)===e),oa=e=>t=>typeof t===e,{isArray:yn}=Array,hn=oa("undefined");function lo(e){return e!==null&&!hn(e)&&e.constructor!==null&&!hn(e.constructor)&<(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const kp=At("ArrayBuffer");function Uw(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&kp(e.buffer),t}const Lw=oa("string"),lt=oa("function"),jp=oa("number"),co=e=>e!==null&&typeof e=="object",Bw=e=>e===!0||e===!1,Wo=e=>{if(na(e)!=="object")return!1;const t=_l(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Vp in e)&&!(ra in e)},Nw=e=>{if(!co(e)||lo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Fw=At("Date"),$w=At("File"),zw=At("Blob"),Gw=At("FileList"),Hw=e=>co(e)&<(e.pipe),qw=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||lt(e.append)&&((t=na(e))==="formdata"||t==="object"&<(e.toString)&&e.toString()==="[object FormData]"))},Ww=At("URLSearchParams"),[Jw,Yw,Kw,Xw]=["ReadableStream","Request","Response","Headers"].map(At),Qw=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function uo(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),yn(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(lo(e))return;const s=r?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let i;for(n=0;n<a;n++)i=s[n],t.call(null,e[i],i,e)}}function Dp(e,t){if(lo(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const Sr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Up=e=>!hn(e)&&e!==Sr;function vi(){const{caseless:e,skipUndefined:t}=Up(this)&&this||{},r={},n=(o,s)=>{const a=e&&Dp(r,s)||s;Wo(r[a])&&Wo(o)?r[a]=vi(r[a],o):Wo(o)?r[a]=vi({},o):yn(o)?r[a]=o.slice():(!t||!hn(o))&&(r[a]=o)};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&uo(arguments[o],n);return r}const Zw=(e,t,r,{allOwnKeys:n}={})=>(uo(t,(o,s)=>{r&<(o)?e[s]=Mp(o,r):e[s]=o},{allOwnKeys:n}),e),eO=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),tO=(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)},rO=(e,t,r,n)=>{let o,s,a;const i={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],(!n||n(a,e,t))&&!i[a]&&(t[a]=e[a],i[a]=!0);e=r!==!1&&_l(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},nO=(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},oO=e=>{if(!e)return null;if(yn(e))return e;let t=e.length;if(!jp(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},sO=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&_l(Uint8Array)),aO=(e,t)=>{const n=(e&&e[ra]).call(e);let o;for(;(o=n.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},iO=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},lO=At("HTMLFormElement"),cO=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),ju=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),uO=At("RegExp"),Lp=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};uo(r,(o,s)=>{let a;(a=t(o,s,e))!==!1&&(n[s]=a||o)}),Object.defineProperties(e,n)},dO=e=>{Lp(e,(t,r)=>{if(lt(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(lt(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+"'")})}})},hO=(e,t)=>{const r={},n=o=>{o.forEach(s=>{r[s]=!0})};return yn(e)?n(e):n(String(e).split(t)),r},pO=()=>{},fO=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function mO(e){return!!(e&<(e.append)&&e[Vp]==="FormData"&&e[ra])}const gO=e=>{const t=new Array(10),r=(n,o)=>{if(co(n)){if(t.indexOf(n)>=0)return;if(lo(n))return n;if(!("toJSON"in n)){t[o]=n;const s=yn(n)?[]:{};return uo(n,(a,i)=>{const l=r(a,o+1);!hn(l)&&(s[i]=l)}),t[o]=void 0,s}}return n};return r(e,0)},yO=At("AsyncFunction"),bO=e=>e&&(co(e)||lt(e))&<(e.then)&<(e.catch),Bp=((e,t)=>e?setImmediate:t?((r,n)=>(Sr.addEventListener("message",({source:o,data:s})=>{o===Sr&&s===r&&n.length&&n.shift()()},!1),o=>{n.push(o),Sr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",lt(Sr.postMessage)),xO=typeof queueMicrotask<"u"?queueMicrotask.bind(Sr):typeof process<"u"&&process.nextTick||Bp,SO=e=>e!=null&<(e[ra]),L={isArray:yn,isArrayBuffer:kp,isBuffer:lo,isFormData:qw,isArrayBufferView:Uw,isString:Lw,isNumber:jp,isBoolean:Bw,isObject:co,isPlainObject:Wo,isEmptyObject:Nw,isReadableStream:Jw,isRequest:Yw,isResponse:Kw,isHeaders:Xw,isUndefined:hn,isDate:Fw,isFile:$w,isBlob:zw,isRegExp:uO,isFunction:lt,isStream:Hw,isURLSearchParams:Ww,isTypedArray:sO,isFileList:Gw,forEach:uo,merge:vi,extend:Zw,trim:Qw,stripBOM:eO,inherits:tO,toFlatObject:rO,kindOf:na,kindOfTest:At,endsWith:nO,toArray:oO,forEachEntry:aO,matchAll:iO,isHTMLForm:lO,hasOwnProperty:ju,hasOwnProp:ju,reduceDescriptors:Lp,freezeMethods:dO,toObjectSet:hO,toCamelCase:cO,noop:pO,toFiniteNumber:fO,findKey:Dp,global:Sr,isContextDefined:Up,isSpecCompliantForm:mO,toJSONObject:gO,isAsyncFn:yO,isThenable:bO,setImmediate:Bp,asap:xO,isIterable:SO};function de(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}L.inherits(de,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:L.toJSONObject(this.config),code:this.code,status:this.status}}});const Np=de.prototype,Fp={};["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=>{Fp[e]={value:e}});Object.defineProperties(de,Fp);Object.defineProperty(Np,"isAxiosError",{value:!0});de.from=(e,t,r,n,o,s)=>{const a=Object.create(Np);L.toFlatObject(e,a,function(u){return u!==Error.prototype},c=>c!=="isAxiosError");const i=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return de.call(a,i,l,r,n,o),e&&a.cause==null&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",s&&Object.assign(a,s),a};const vO=null;function Ci(e){return L.isPlainObject(e)||L.isArray(e)}function $p(e){return L.endsWith(e,"[]")?e.slice(0,-2):e}function Du(e,t,r){return e?e.concat(t).map(function(o,s){return o=$p(o),!r&&s?"["+o+"]":o}).join(r?".":""):t}function CO(e){return L.isArray(e)&&!e.some(Ci)}const wO=L.toFlatObject(L,{},null,function(t){return/^is[A-Z]/.test(t)});function sa(e,t,r){if(!L.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=L.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,b){return!L.isUndefined(b[m])});const n=r.metaTokens,o=r.visitor||u,s=r.dots,a=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&L.isSpecCompliantForm(t);if(!L.isFunction(o))throw new TypeError("visitor must be a function");function c(f){if(f===null)return"";if(L.isDate(f))return f.toISOString();if(L.isBoolean(f))return f.toString();if(!l&&L.isBlob(f))throw new de("Blob is not supported. Use a Buffer instead.");return L.isArrayBuffer(f)||L.isTypedArray(f)?l&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,m,b){let S=f;if(f&&!b&&typeof f=="object"){if(L.endsWith(m,"{}"))m=n?m:m.slice(0,-2),f=JSON.stringify(f);else if(L.isArray(f)&&CO(f)||(L.isFileList(f)||L.endsWith(m,"[]"))&&(S=L.toArray(f)))return m=$p(m),S.forEach(function(v,O){!(L.isUndefined(v)||v===null)&&t.append(a===!0?Du([m],O,s):a===null?m:m+"[]",c(v))}),!1}return Ci(f)?!0:(t.append(Du(b,m,s),c(f)),!1)}const d=[],h=Object.assign(wO,{defaultVisitor:u,convertValue:c,isVisitable:Ci});function p(f,m){if(!L.isUndefined(f)){if(d.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(f),L.forEach(f,function(S,R){(!(L.isUndefined(S)||S===null)&&o.call(t,S,L.isString(R)?R.trim():R,m,h))===!0&&p(S,m?m.concat(R):[R])}),d.pop()}}if(!L.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Uu(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Ml(e,t){this._pairs=[],e&&sa(e,this,t)}const zp=Ml.prototype;zp.append=function(t,r){this._pairs.push([t,r])};zp.toString=function(t){const r=t?function(n){return t.call(this,n,Uu)}:Uu;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function OO(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Gp(e,t,r){if(!t)return e;const n=r&&r.encode||OO;L.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let s;if(o?s=o(t,r):s=L.isURLSearchParams(t)?t.toString():new Ml(t,r).toString(n),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class Lu{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){L.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Hp={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},TO=typeof URLSearchParams<"u"?URLSearchParams:Ml,EO=typeof FormData<"u"?FormData:null,IO=typeof Blob<"u"?Blob:null,AO={isBrowser:!0,classes:{URLSearchParams:TO,FormData:EO,Blob:IO},protocols:["http","https","file","blob","url","data"]},Vl=typeof window<"u"&&typeof document<"u",wi=typeof navigator=="object"&&navigator||void 0,RO=Vl&&(!wi||["ReactNative","NativeScript","NS"].indexOf(wi.product)<0),PO=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_O=Vl&&window.location.href||"http://localhost",MO=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Vl,hasStandardBrowserEnv:RO,hasStandardBrowserWebWorkerEnv:PO,navigator:wi,origin:_O},Symbol.toStringTag,{value:"Module"})),Ke={...MO,...AO};function VO(e,t){return sa(e,new Ke.classes.URLSearchParams,{visitor:function(r,n,o,s){return Ke.isNode&&L.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function kO(e){return L.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function jO(e){const t={},r=Object.keys(e);let n;const o=r.length;let s;for(n=0;n<o;n++)s=r[n],t[s]=e[s];return t}function qp(e){function t(r,n,o,s){let a=r[s++];if(a==="__proto__")return!0;const i=Number.isFinite(+a),l=s>=r.length;return a=!a&&L.isArray(o)?o.length:a,l?(L.hasOwnProp(o,a)?o[a]=[o[a],n]:o[a]=n,!i):((!o[a]||!L.isObject(o[a]))&&(o[a]=[]),t(r,n,o[a],s)&&L.isArray(o[a])&&(o[a]=jO(o[a])),!i)}if(L.isFormData(e)&&L.isFunction(e.entries)){const r={};return L.forEachEntry(e,(n,o)=>{t(kO(n),o,r,0)}),r}return null}function DO(e,t,r){if(L.isString(e))try{return(t||JSON.parse)(e),L.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const ho={transitional:Hp,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,s=L.isObject(t);if(s&&L.isHTMLForm(t)&&(t=new FormData(t)),L.isFormData(t))return o?JSON.stringify(qp(t)):t;if(L.isArrayBuffer(t)||L.isBuffer(t)||L.isStream(t)||L.isFile(t)||L.isBlob(t)||L.isReadableStream(t))return t;if(L.isArrayBufferView(t))return t.buffer;if(L.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return VO(t,this.formSerializer).toString();if((i=L.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return sa(i?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||o?(r.setContentType("application/json",!1),DO(t)):t}],transformResponse:[function(t){const r=this.transitional||ho.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(L.isResponse(t)||L.isReadableStream(t))return t;if(t&&L.isString(t)&&(n&&!this.responseType||o)){const a=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(i){if(a)throw i.name==="SyntaxError"?de.from(i,de.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:Ke.classes.FormData,Blob:Ke.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};L.forEach(["delete","get","head","post","put","patch"],e=>{ho.headers[e]={}});const UO=L.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"]),LO=e=>{const t={};let r,n,o;return e&&e.split(`
|
|
146
|
-
`).forEach(function(a){o=a.indexOf(":"),r=a.substring(0,o).trim().toLowerCase(),n=a.substring(o+1).trim(),!(!r||t[r]&&UO[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Bu=Symbol("internals");function
|
|
147
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[Bu]=this[Bu]={accessors:{}}).accessors,o=this.prototype;function s(a){const i=Rn(a);n[i]||($O(o,a),n[i]=!0)}return L.isArray(t)?t.forEach(s):s(t),this}};ct.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);L.reduceDescriptors(ct.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});L.freezeMethods(ct);function qa(e,t){const r=this||ho,n=t||r,o=ct.from(n.headers);let s=n.data;return L.forEach(e,function(i){s=i.call(r,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Wp(e){return!!(e&&e.__CANCEL__)}function bn(e,t,r){de.call(this,e??"canceled",de.ERR_CANCELED,t,r),this.name="CanceledError"}L.inherits(bn,de,{__CANCEL__:!0});function Jp(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new de("Request failed with status code "+r.status,[de.ERR_BAD_REQUEST,de.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function zO(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function GO(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,s=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=n[s];a||(a=c),r[o]=l,n[o]=c;let d=s,h=0;for(;d!==o;)h+=r[d++],d=d%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-a<t)return;const p=u&&c-u;return p?Math.round(h*1e3/p):void 0}}function HO(e,t){let r=0,n=1e3/t,o,s;const a=(c,u=Date.now())=>{r=u,o=null,s&&(clearTimeout(s),s=null),e(...c)};return[(...c)=>{const u=Date.now(),d=u-r;d>=n?a(c,u):(o=c,s||(s=setTimeout(()=>{s=null,a(o)},n-d)))},()=>o&&a(o)]}const xs=(e,t,r=3)=>{let n=0;const o=GO(50,250);return HO(s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,l=a-n,c=o(l),u=a<=i;n=a;const d={loaded:a,total:i,progress:i?a/i:void 0,bytes:l,rate:c||void 0,estimated:c&&i&&u?(i-a)/c:void 0,event:s,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(d)},r)},Nu=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Fu=e=>(...t)=>L.asap(()=>e(...t)),qO=Ke.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Ke.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Ke.origin),Ke.navigator&&/(msie|trident)/i.test(Ke.navigator.userAgent)):()=>!0,WO=Ke.hasStandardBrowserEnv?{write(e,t,r,n,o,s,a){if(typeof document>"u")return;const i=[`${e}=${encodeURIComponent(t)}`];L.isNumber(r)&&i.push(`expires=${new Date(r).toUTCString()}`),L.isString(n)&&i.push(`path=${n}`),L.isString(o)&&i.push(`domain=${o}`),s===!0&&i.push("secure"),L.isString(a)&&i.push(`SameSite=${a}`),document.cookie=i.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function JO(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function YO(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Yp(e,t,r){let n=!JO(t);return e&&(n||r==!1)?YO(e,t):t}const $u=e=>e instanceof ct?{...e}:e;function Ir(e,t){t=t||{};const r={};function n(c,u,d,h){return L.isPlainObject(c)&&L.isPlainObject(u)?L.merge.call({caseless:h},c,u):L.isPlainObject(u)?L.merge({},u):L.isArray(u)?u.slice():u}function o(c,u,d,h){if(L.isUndefined(u)){if(!L.isUndefined(c))return n(void 0,c,d,h)}else return n(c,u,d,h)}function s(c,u){if(!L.isUndefined(u))return n(void 0,u)}function a(c,u){if(L.isUndefined(u)){if(!L.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function i(c,u,d){if(d in t)return n(c,u);if(d in e)return n(void 0,c)}const l={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:i,headers:(c,u,d)=>o($u(c),$u(u),d,!0)};return L.forEach(Object.keys({...e,...t}),function(u){const d=l[u]||o,h=d(e[u],t[u],u);L.isUndefined(h)&&d!==i||(r[u]=h)}),r}const Kp=e=>{const t=Ir({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:i}=t;if(t.headers=a=ct.from(a),t.url=Gp(Yp(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&a.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):""))),L.isFormData(r)){if(Ke.hasStandardBrowserEnv||Ke.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(L.isFunction(r.getHeaders)){const l=r.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([u,d])=>{c.includes(u.toLowerCase())&&a.set(u,d)})}}if(Ke.hasStandardBrowserEnv&&(n&&L.isFunction(n)&&(n=n(t)),n||n!==!1&&qO(t.url))){const l=o&&s&&WO.read(s);l&&a.set(o,l)}return t},KO=typeof XMLHttpRequest<"u",XO=KO&&function(e){return new Promise(function(r,n){const o=Kp(e);let s=o.data;const a=ct.from(o.headers).normalize();let{responseType:i,onUploadProgress:l,onDownloadProgress:c}=o,u,d,h,p,f;function m(){p&&p(),f&&f(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let b=new XMLHttpRequest;b.open(o.method.toUpperCase(),o.url,!0),b.timeout=o.timeout;function S(){if(!b)return;const v=ct.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),I={data:!i||i==="text"||i==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:v,config:e,request:b};Jp(function(w){r(w),m()},function(w){n(w),m()},I),b=null}"onloadend"in b?b.onloadend=S:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(S)},b.onabort=function(){b&&(n(new de("Request aborted",de.ECONNABORTED,e,b)),b=null)},b.onerror=function(O){const I=O&&O.message?O.message:"Network Error",T=new de(I,de.ERR_NETWORK,e,b);T.event=O||null,n(T),b=null},b.ontimeout=function(){let O=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const I=o.transitional||Hp;o.timeoutErrorMessage&&(O=o.timeoutErrorMessage),n(new de(O,I.clarifyTimeoutError?de.ETIMEDOUT:de.ECONNABORTED,e,b)),b=null},s===void 0&&a.setContentType(null),"setRequestHeader"in b&&L.forEach(a.toJSON(),function(O,I){b.setRequestHeader(I,O)}),L.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),i&&i!=="json"&&(b.responseType=o.responseType),c&&([h,f]=xs(c,!0),b.addEventListener("progress",h)),l&&b.upload&&([d,p]=xs(l),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(u=v=>{b&&(n(!v||v.type?new bn(null,e,b):v),b.abort(),b=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const R=zO(o.url);if(R&&Ke.protocols.indexOf(R)===-1){n(new de("Unsupported protocol "+R+":",de.ERR_BAD_REQUEST,e));return}b.send(s||null)})},QO=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o;const s=function(c){if(!o){o=!0,i();const u=c instanceof Error?c:this.reason;n.abort(u instanceof de?u:new bn(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,s(new de(`timeout ${t} of ms exceeded`,de.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s));const{signal:l}=n;return l.unsubscribe=()=>L.asap(i),l}},ZO=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,o;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},eT=async function*(e,t){for await(const r of tT(e))yield*ZO(r,t)},tT=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},zu=(e,t,r,n)=>{const o=eT(e,t);let s=0,a,i=l=>{a||(a=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await o.next();if(c){i(),l.close();return}let d=u.byteLength;if(r){let h=s+=d;r(h)}l.enqueue(new Uint8Array(u))}catch(c){throw i(c),c}},cancel(l){return i(l),o.return()}},{highWaterMark:2})},Gu=64*1024,{isFunction:ko}=L,rT=(({Request:e,Response:t})=>({Request:e,Response:t}))(L.global),{ReadableStream:Hu,TextEncoder:qu}=L.global,Wu=(e,...t)=>{try{return!!e(...t)}catch{return!1}},nT=e=>{e=L.merge.call({skipUndefined:!0},rT,e);const{fetch:t,Request:r,Response:n}=e,o=t?ko(t):typeof fetch=="function",s=ko(r),a=ko(n);if(!o)return!1;const i=o&&ko(Hu),l=o&&(typeof qu=="function"?(f=>m=>f.encode(m))(new qu):async f=>new Uint8Array(await new r(f).arrayBuffer())),c=s&&i&&Wu(()=>{let f=!1;const m=new r(Ke.origin,{body:new Hu,method:"POST",get duplex(){return f=!0,"half"}}).headers.has("Content-Type");return f&&!m}),u=a&&i&&Wu(()=>L.isReadableStream(new n("").body)),d={stream:u&&(f=>f.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!d[f]&&(d[f]=(m,b)=>{let S=m&&m[f];if(S)return S.call(m);throw new de(`Response type '${f}' is not supported`,de.ERR_NOT_SUPPORT,b)})});const h=async f=>{if(f==null)return 0;if(L.isBlob(f))return f.size;if(L.isSpecCompliantForm(f))return(await new r(Ke.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(L.isArrayBufferView(f)||L.isArrayBuffer(f))return f.byteLength;if(L.isURLSearchParams(f)&&(f=f+""),L.isString(f))return(await l(f)).byteLength},p=async(f,m)=>{const b=L.toFiniteNumber(f.getContentLength());return b??h(m)};return async f=>{let{url:m,method:b,data:S,signal:R,cancelToken:v,timeout:O,onDownloadProgress:I,onUploadProgress:T,responseType:w,headers:P,withCredentials:k="same-origin",fetchOptions:y}=Kp(f),A=t||fetch;w=w?(w+"").toLowerCase():"text";let M=QO([R,v&&v.toAbortSignal()],O),_=null;const j=M&&M.unsubscribe&&(()=>{M.unsubscribe()});let ne;try{if(T&&c&&b!=="get"&&b!=="head"&&(ne=await p(P,S))!==0){let ee=new r(m,{method:"POST",body:S,duplex:"half"}),ce;if(L.isFormData(S)&&(ce=ee.headers.get("content-type"))&&P.setContentType(ce),ee.body){const[be,_e]=Nu(ne,xs(Fu(T)));S=zu(ee.body,Gu,be,_e)}}L.isString(k)||(k=k?"include":"omit");const X=s&&"credentials"in r.prototype,oe={...y,signal:M,method:b.toUpperCase(),headers:P.normalize().toJSON(),body:S,duplex:"half",credentials:X?k:void 0};_=s&&new r(m,oe);let Q=await(s?A(_,y):A(m,oe));const se=u&&(w==="stream"||w==="response");if(u&&(I||se&&j)){const ee={};["status","statusText","headers"].forEach(xe=>{ee[xe]=Q[xe]});const ce=L.toFiniteNumber(Q.headers.get("content-length")),[be,_e]=I&&Nu(ce,xs(Fu(I),!0))||[];Q=new n(zu(Q.body,Gu,be,()=>{_e&&_e(),j&&j()}),ee)}w=w||"text";let N=await d[L.findKey(d,w)||"text"](Q,f);return!se&&j&&j(),await new Promise((ee,ce)=>{Jp(ee,ce,{data:N,headers:ct.from(Q.headers),status:Q.status,statusText:Q.statusText,config:f,request:_})})}catch(X){throw j&&j(),X&&X.name==="TypeError"&&/Load failed|fetch/i.test(X.message)?Object.assign(new de("Network Error",de.ERR_NETWORK,f,_),{cause:X.cause||X}):de.from(X,X&&X.code,f,_)}}},oT=new Map,Xp=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:o}=t,s=[n,o,r];let a=s.length,i=a,l,c,u=oT;for(;i--;)l=s[i],c=u.get(l),c===void 0&&u.set(l,c=i?new Map:nT(t)),u=c;return c};Xp();const kl={http:vO,xhr:XO,fetch:{get:Xp}};L.forEach(kl,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ju=e=>`- ${e}`,sT=e=>L.isFunction(e)||e===null||e===!1;function aT(e,t){e=L.isArray(e)?e:[e];const{length:r}=e;let n,o;const s={};for(let a=0;a<r;a++){n=e[a];let i;if(o=n,!sT(n)&&(o=kl[(i=String(n)).toLowerCase()],o===void 0))throw new de(`Unknown adapter '${i}'`);if(o&&(L.isFunction(o)||(o=o.get(t))))break;s[i||"#"+a]=o}if(!o){const a=Object.entries(s).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let i=r?a.length>1?`since :
|
|
145
|
+
*/var Pw=function(){if(typeof WebSocket<"u")return WebSocket},Rw=function(e){return typeof e<"u"&&!!e&&e.CLOSING===2},mr={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},Mw=function(){function e(t,r,n){var o=this;n===void 0&&(n={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(s){o._debug("open event");var a=o._options.minUptime,i=a===void 0?mr.minUptime:a;clearTimeout(o._connectTimeout),o._uptimeTimeout=setTimeout(function(){return o._acceptOpen()},i),o._ws.binaryType=o._binaryType,o._messageQueue.forEach(function(l){return o._ws.send(l)}),o._messageQueue=[],o.onopen&&o.onopen(s),o._listeners.open.forEach(function(l){return o._callEventListener(s,l)})},this._handleMessage=function(s){o._debug("message event"),o.onmessage&&o.onmessage(s),o._listeners.message.forEach(function(a){return o._callEventListener(s,a)})},this._handleError=function(s){o._debug("error event",s.message),o._disconnect(void 0,s.message==="TIMEOUT"?"timeout":void 0),o.onerror&&o.onerror(s),o._debug("exec error listeners"),o._listeners.error.forEach(function(a){return o._callEventListener(s,a)}),o._connect()},this._handleClose=function(s){o._debug("close event"),o._clearTimeouts(),o._shouldReconnect&&o._connect(),o.onclose&&o.onclose(s),o._listeners.close.forEach(function(a){return o._callEventListener(s,a)})},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?mr.maxEnqueuedMessages:r;this._messageQueue.length<n&&(this._debug("enqueue",t),this._messageQueue.push(t))}},e.prototype.addEventListener=function(t,r){this._listeners[t]&&this._listeners[t].push(r)},e.prototype.dispatchEvent=function(t){var r,n,o=this._listeners[t.type];if(o)try{for(var s=Ow(o),a=s.next();!a.done;a=s.next()){var i=a.value;this._callEventListener(t,i)}}catch(l){r={error:l}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}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,Ew(["RWS>"],t))},e.prototype._getNextDelay=function(){var t=this._options,r=t.reconnectionDelayGrowFactor,n=r===void 0?mr.reconnectionDelayGrowFactor:r,o=t.minReconnectionDelay,s=o===void 0?mr.minReconnectionDelay:o,a=t.maxReconnectionDelay,i=a===void 0?mr.maxReconnectionDelay:a,l=0;return this._retryCount>0&&(l=s*Math.pow(n,this._retryCount-1),l>i&&(l=i)),this._debug("next delay",l),l},e.prototype._wait=function(){var t=this;return new Promise(function(r){setTimeout(r,t._getNextDelay())})},e.prototype._getNextUrl=function(t){if(typeof t=="string")return Promise.resolve(t);if(typeof t=="function"){var r=t();if(typeof r=="string")return Promise.resolve(r);if(r.then)return r}throw Error("Invalid URL")},e.prototype._connect=function(){var t=this;if(!(this._connectLock||!this._shouldReconnect)){this._connectLock=!0;var r=this._options,n=r.maxRetries,o=n===void 0?mr.maxRetries:n,s=r.connectionTimeout,a=s===void 0?mr.connectionTimeout:s,i=r.WebSocket,l=i===void 0?Pw():i;if(this._retryCount>=o){this._debug("max retries reached",this._retryCount,">=",o);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!Rw(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()},a))})}},e.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new Iw(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 Aw(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}(),Vw=class extends Mw{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()}async opened(){return new Promise((e,t)=>{this.readyState===WebSocket.OPEN?e():(this.addEventListener("open",()=>e()),this.addEventListener("error",t))})}async closed(){return new Promise((e,t)=>{this.readyState===WebSocket.CLOSED?e():(this.addEventListener("close",()=>e()),this.addEventListener("error",t))})}async firstMessage(){return this.receivedFirstMessage?this.receivedFirstMessage:new Promise((e,t)=>{const r=o=>{this.receivedFirstMessage=o,this.removeEventListener("message",r),this.removeEventListener("error",n),e(o)},n=o=>{this.removeEventListener("message",r),this.removeEventListener("error",n),t(o)};this.addEventListener("message",r),this.addEventListener("error",n)})}async nextMessage(){return new Promise((e,t)=>{const r=o=>{this.removeEventListener("message",r),this.removeEventListener("error",n),e(o)},n=o=>{this.removeEventListener("message",r),this.removeEventListener("error",n),t(o)};this.addEventListener("message",r),this.addEventListener("error",n)})}},_w=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}};const za=new _w,tn="wandelbots.io",Ga={dev:{domain:`https://auth.portal.dev.${tn}`,clientId:"fLbJD0RLp5r2Dpucm5j8BjwMR6Hunfha"},stg:{domain:`https://auth.portal.stg.${tn}`,clientId:"joVDeD9e786WzFNSGCqoVq7HNkWt5j6s"},prod:{domain:`https://auth.portal.${tn}`,clientId:"J7WJUi38xVQdJAEBNRT9Xw1b0fXDb4J2"}},kw=e=>{if(e.endsWith(`dev.${tn}`))return Ga.dev;if(e.endsWith(`stg.${tn}`))return Ga.stg;if(e.endsWith(tn))return Ga.prod;throw new Error("Unsupported instance URL. Cannot determine Auth0 configuration.")},jw=async e=>{if(typeof window>"u")throw new Error("Access token must be set to use NovaClient when not in a browser environment.");const t=kw(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:r}=await Promise.resolve().then(()=>require("./auth0-spa-js.production.esm-CEI5Uihg.cjs")),n=new r({domain:t.domain,clientId:t.clientId??"",useRefreshTokens:!1,authorizationParams:{audience:"nova-api",redirect_uri:window.location.origin}});if(window.location.search.includes("code=")&&window.location.search.includes("state=")){const{appState:o}=await n.handleRedirectCallback();window.history.replaceState({},document.title,(o==null?void 0:o.returnTo)||window.location.pathname)}else await n.loginWithRedirect();return await n.getTokenSilently()};function Vp(e,t){return function(){return e.apply(t,arguments)}}const{toString:Dw}=Object.prototype,{getPrototypeOf:Ml}=Object,{iterator:ra,toStringTag:_p}=Symbol,na=(e=>t=>{const r=Dw.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),At=e=>(e=e.toLowerCase(),t=>na(t)===e),oa=e=>t=>typeof t===e,{isArray:yn}=Array,hn=oa("undefined");function lo(e){return e!==null&&!hn(e)&&e.constructor!==null&&!hn(e.constructor)&<(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const kp=At("ArrayBuffer");function Uw(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&kp(e.buffer),t}const Lw=oa("string"),lt=oa("function"),jp=oa("number"),co=e=>e!==null&&typeof e=="object",Bw=e=>e===!0||e===!1,Wo=e=>{if(na(e)!=="object")return!1;const t=Ml(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(_p in e)&&!(ra in e)},Fw=e=>{if(!co(e)||lo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},$w=At("Date"),Nw=At("File"),zw=At("Blob"),Gw=At("FileList"),Hw=e=>co(e)&<(e.pipe),qw=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||lt(e.append)&&((t=na(e))==="formdata"||t==="object"&<(e.toString)&&e.toString()==="[object FormData]"))},Ww=At("URLSearchParams"),[Jw,Yw,Kw,Qw]=["ReadableStream","Request","Response","Headers"].map(At),Xw=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function uo(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),yn(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(lo(e))return;const s=r?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let i;for(n=0;n<a;n++)i=s[n],t.call(null,e[i],i,e)}}function Dp(e,t){if(lo(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const Sr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Up=e=>!hn(e)&&e!==Sr;function vi(){const{caseless:e,skipUndefined:t}=Up(this)&&this||{},r={},n=(o,s)=>{const a=e&&Dp(r,s)||s;Wo(r[a])&&Wo(o)?r[a]=vi(r[a],o):Wo(o)?r[a]=vi({},o):yn(o)?r[a]=o.slice():(!t||!hn(o))&&(r[a]=o)};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&uo(arguments[o],n);return r}const Zw=(e,t,r,{allOwnKeys:n}={})=>(uo(t,(o,s)=>{r&<(o)?e[s]=Vp(o,r):e[s]=o},{allOwnKeys:n}),e),eO=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),tO=(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)},rO=(e,t,r,n)=>{let o,s,a;const i={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],(!n||n(a,e,t))&&!i[a]&&(t[a]=e[a],i[a]=!0);e=r!==!1&&Ml(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},nO=(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},oO=e=>{if(!e)return null;if(yn(e))return e;let t=e.length;if(!jp(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},sO=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ml(Uint8Array)),aO=(e,t)=>{const n=(e&&e[ra]).call(e);let o;for(;(o=n.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},iO=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},lO=At("HTMLFormElement"),cO=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),ju=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),uO=At("RegExp"),Lp=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};uo(r,(o,s)=>{let a;(a=t(o,s,e))!==!1&&(n[s]=a||o)}),Object.defineProperties(e,n)},dO=e=>{Lp(e,(t,r)=>{if(lt(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(lt(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+"'")})}})},hO=(e,t)=>{const r={},n=o=>{o.forEach(s=>{r[s]=!0})};return yn(e)?n(e):n(String(e).split(t)),r},pO=()=>{},fO=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function mO(e){return!!(e&<(e.append)&&e[_p]==="FormData"&&e[ra])}const gO=e=>{const t=new Array(10),r=(n,o)=>{if(co(n)){if(t.indexOf(n)>=0)return;if(lo(n))return n;if(!("toJSON"in n)){t[o]=n;const s=yn(n)?[]:{};return uo(n,(a,i)=>{const l=r(a,o+1);!hn(l)&&(s[i]=l)}),t[o]=void 0,s}}return n};return r(e,0)},yO=At("AsyncFunction"),bO=e=>e&&(co(e)||lt(e))&<(e.then)&<(e.catch),Bp=((e,t)=>e?setImmediate:t?((r,n)=>(Sr.addEventListener("message",({source:o,data:s})=>{o===Sr&&s===r&&n.length&&n.shift()()},!1),o=>{n.push(o),Sr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",lt(Sr.postMessage)),xO=typeof queueMicrotask<"u"?queueMicrotask.bind(Sr):typeof process<"u"&&process.nextTick||Bp,SO=e=>e!=null&<(e[ra]),L={isArray:yn,isArrayBuffer:kp,isBuffer:lo,isFormData:qw,isArrayBufferView:Uw,isString:Lw,isNumber:jp,isBoolean:Bw,isObject:co,isPlainObject:Wo,isEmptyObject:Fw,isReadableStream:Jw,isRequest:Yw,isResponse:Kw,isHeaders:Qw,isUndefined:hn,isDate:$w,isFile:Nw,isBlob:zw,isRegExp:uO,isFunction:lt,isStream:Hw,isURLSearchParams:Ww,isTypedArray:sO,isFileList:Gw,forEach:uo,merge:vi,extend:Zw,trim:Xw,stripBOM:eO,inherits:tO,toFlatObject:rO,kindOf:na,kindOfTest:At,endsWith:nO,toArray:oO,forEachEntry:aO,matchAll:iO,isHTMLForm:lO,hasOwnProperty:ju,hasOwnProp:ju,reduceDescriptors:Lp,freezeMethods:dO,toObjectSet:hO,toCamelCase:cO,noop:pO,toFiniteNumber:fO,findKey:Dp,global:Sr,isContextDefined:Up,isSpecCompliantForm:mO,toJSONObject:gO,isAsyncFn:yO,isThenable:bO,setImmediate:Bp,asap:xO,isIterable:SO};function de(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}L.inherits(de,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:L.toJSONObject(this.config),code:this.code,status:this.status}}});const Fp=de.prototype,$p={};["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=>{$p[e]={value:e}});Object.defineProperties(de,$p);Object.defineProperty(Fp,"isAxiosError",{value:!0});de.from=(e,t,r,n,o,s)=>{const a=Object.create(Fp);L.toFlatObject(e,a,function(u){return u!==Error.prototype},c=>c!=="isAxiosError");const i=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return de.call(a,i,l,r,n,o),e&&a.cause==null&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",s&&Object.assign(a,s),a};const vO=null;function Ci(e){return L.isPlainObject(e)||L.isArray(e)}function Np(e){return L.endsWith(e,"[]")?e.slice(0,-2):e}function Du(e,t,r){return e?e.concat(t).map(function(o,s){return o=Np(o),!r&&s?"["+o+"]":o}).join(r?".":""):t}function CO(e){return L.isArray(e)&&!e.some(Ci)}const wO=L.toFlatObject(L,{},null,function(t){return/^is[A-Z]/.test(t)});function sa(e,t,r){if(!L.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=L.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,b){return!L.isUndefined(b[m])});const n=r.metaTokens,o=r.visitor||u,s=r.dots,a=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&L.isSpecCompliantForm(t);if(!L.isFunction(o))throw new TypeError("visitor must be a function");function c(f){if(f===null)return"";if(L.isDate(f))return f.toISOString();if(L.isBoolean(f))return f.toString();if(!l&&L.isBlob(f))throw new de("Blob is not supported. Use a Buffer instead.");return L.isArrayBuffer(f)||L.isTypedArray(f)?l&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,m,b){let S=f;if(f&&!b&&typeof f=="object"){if(L.endsWith(m,"{}"))m=n?m:m.slice(0,-2),f=JSON.stringify(f);else if(L.isArray(f)&&CO(f)||(L.isFileList(f)||L.endsWith(m,"[]"))&&(S=L.toArray(f)))return m=Np(m),S.forEach(function(v,O){!(L.isUndefined(v)||v===null)&&t.append(a===!0?Du([m],O,s):a===null?m:m+"[]",c(v))}),!1}return Ci(f)?!0:(t.append(Du(b,m,s),c(f)),!1)}const d=[],h=Object.assign(wO,{defaultVisitor:u,convertValue:c,isVisitable:Ci});function p(f,m){if(!L.isUndefined(f)){if(d.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(f),L.forEach(f,function(S,P){(!(L.isUndefined(S)||S===null)&&o.call(t,S,L.isString(P)?P.trim():P,m,h))===!0&&p(S,m?m.concat(P):[P])}),d.pop()}}if(!L.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Uu(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Vl(e,t){this._pairs=[],e&&sa(e,this,t)}const zp=Vl.prototype;zp.append=function(t,r){this._pairs.push([t,r])};zp.toString=function(t){const r=t?function(n){return t.call(this,n,Uu)}:Uu;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function OO(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Gp(e,t,r){if(!t)return e;const n=r&&r.encode||OO;L.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let s;if(o?s=o(t,r):s=L.isURLSearchParams(t)?t.toString():new Vl(t,r).toString(n),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class Lu{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){L.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Hp={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},TO=typeof URLSearchParams<"u"?URLSearchParams:Vl,EO=typeof FormData<"u"?FormData:null,IO=typeof Blob<"u"?Blob:null,AO={isBrowser:!0,classes:{URLSearchParams:TO,FormData:EO,Blob:IO},protocols:["http","https","file","blob","url","data"]},_l=typeof window<"u"&&typeof document<"u",wi=typeof navigator=="object"&&navigator||void 0,PO=_l&&(!wi||["ReactNative","NativeScript","NS"].indexOf(wi.product)<0),RO=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",MO=_l&&window.location.href||"http://localhost",VO=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:_l,hasStandardBrowserEnv:PO,hasStandardBrowserWebWorkerEnv:RO,navigator:wi,origin:MO},Symbol.toStringTag,{value:"Module"})),Ke={...VO,...AO};function _O(e,t){return sa(e,new Ke.classes.URLSearchParams,{visitor:function(r,n,o,s){return Ke.isNode&&L.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function kO(e){return L.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function jO(e){const t={},r=Object.keys(e);let n;const o=r.length;let s;for(n=0;n<o;n++)s=r[n],t[s]=e[s];return t}function qp(e){function t(r,n,o,s){let a=r[s++];if(a==="__proto__")return!0;const i=Number.isFinite(+a),l=s>=r.length;return a=!a&&L.isArray(o)?o.length:a,l?(L.hasOwnProp(o,a)?o[a]=[o[a],n]:o[a]=n,!i):((!o[a]||!L.isObject(o[a]))&&(o[a]=[]),t(r,n,o[a],s)&&L.isArray(o[a])&&(o[a]=jO(o[a])),!i)}if(L.isFormData(e)&&L.isFunction(e.entries)){const r={};return L.forEachEntry(e,(n,o)=>{t(kO(n),o,r,0)}),r}return null}function DO(e,t,r){if(L.isString(e))try{return(t||JSON.parse)(e),L.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const ho={transitional:Hp,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,s=L.isObject(t);if(s&&L.isHTMLForm(t)&&(t=new FormData(t)),L.isFormData(t))return o?JSON.stringify(qp(t)):t;if(L.isArrayBuffer(t)||L.isBuffer(t)||L.isStream(t)||L.isFile(t)||L.isBlob(t)||L.isReadableStream(t))return t;if(L.isArrayBufferView(t))return t.buffer;if(L.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return _O(t,this.formSerializer).toString();if((i=L.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return sa(i?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||o?(r.setContentType("application/json",!1),DO(t)):t}],transformResponse:[function(t){const r=this.transitional||ho.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(L.isResponse(t)||L.isReadableStream(t))return t;if(t&&L.isString(t)&&(n&&!this.responseType||o)){const a=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(i){if(a)throw i.name==="SyntaxError"?de.from(i,de.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:Ke.classes.FormData,Blob:Ke.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};L.forEach(["delete","get","head","post","put","patch"],e=>{ho.headers[e]={}});const UO=L.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"]),LO=e=>{const t={};let r,n,o;return e&&e.split(`
|
|
146
|
+
`).forEach(function(a){o=a.indexOf(":"),r=a.substring(0,o).trim().toLowerCase(),n=a.substring(o+1).trim(),!(!r||t[r]&&UO[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Bu=Symbol("internals");function Pn(e){return e&&String(e).trim().toLowerCase()}function Jo(e){return e===!1||e==null?e:L.isArray(e)?e.map(Jo):String(e)}function BO(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 FO=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ha(e,t,r,n,o){if(L.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!L.isString(t)){if(L.isString(n))return t.indexOf(n)!==-1;if(L.isRegExp(n))return n.test(t)}}function $O(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function NO(e,t){const r=L.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,s,a){return this[n].call(this,t,o,s,a)},configurable:!0})})}let ct=class{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function s(i,l,c){const u=Pn(l);if(!u)throw new Error("header name must be a non-empty string");const d=L.findKey(o,u);(!d||o[d]===void 0||c===!0||c===void 0&&o[d]!==!1)&&(o[d||l]=Jo(i))}const a=(i,l)=>L.forEach(i,(c,u)=>s(c,u,l));if(L.isPlainObject(t)||t instanceof this.constructor)a(t,r);else if(L.isString(t)&&(t=t.trim())&&!FO(t))a(LO(t),r);else if(L.isObject(t)&&L.isIterable(t)){let i={},l,c;for(const u of t){if(!L.isArray(u))throw TypeError("Object iterator must return a key-value pair");i[c=u[0]]=(l=i[c])?L.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}a(i,r)}else t!=null&&s(r,t,n);return this}get(t,r){if(t=Pn(t),t){const n=L.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return BO(o);if(L.isFunction(r))return r.call(this,o,n);if(L.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Pn(t),t){const n=L.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Ha(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function s(a){if(a=Pn(a),a){const i=L.findKey(n,a);i&&(!r||Ha(n,n[i],i,r))&&(delete n[i],o=!0)}}return L.isArray(t)?t.forEach(s):s(t),o}clear(t){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const s=r[n];(!t||Ha(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const r=this,n={};return L.forEach(this,(o,s)=>{const a=L.findKey(n,s);if(a){r[a]=Jo(o),delete r[s];return}const i=t?$O(s):String(s).trim();i!==s&&delete r[s],r[i]=Jo(o),n[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return L.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&L.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
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[Bu]=this[Bu]={accessors:{}}).accessors,o=this.prototype;function s(a){const i=Pn(a);n[i]||(NO(o,a),n[i]=!0)}return L.isArray(t)?t.forEach(s):s(t),this}};ct.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);L.reduceDescriptors(ct.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});L.freezeMethods(ct);function qa(e,t){const r=this||ho,n=t||r,o=ct.from(n.headers);let s=n.data;return L.forEach(e,function(i){s=i.call(r,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Wp(e){return!!(e&&e.__CANCEL__)}function bn(e,t,r){de.call(this,e??"canceled",de.ERR_CANCELED,t,r),this.name="CanceledError"}L.inherits(bn,de,{__CANCEL__:!0});function Jp(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new de("Request failed with status code "+r.status,[de.ERR_BAD_REQUEST,de.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function zO(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function GO(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,s=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=n[s];a||(a=c),r[o]=l,n[o]=c;let d=s,h=0;for(;d!==o;)h+=r[d++],d=d%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-a<t)return;const p=u&&c-u;return p?Math.round(h*1e3/p):void 0}}function HO(e,t){let r=0,n=1e3/t,o,s;const a=(c,u=Date.now())=>{r=u,o=null,s&&(clearTimeout(s),s=null),e(...c)};return[(...c)=>{const u=Date.now(),d=u-r;d>=n?a(c,u):(o=c,s||(s=setTimeout(()=>{s=null,a(o)},n-d)))},()=>o&&a(o)]}const xs=(e,t,r=3)=>{let n=0;const o=GO(50,250);return HO(s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,l=a-n,c=o(l),u=a<=i;n=a;const d={loaded:a,total:i,progress:i?a/i:void 0,bytes:l,rate:c||void 0,estimated:c&&i&&u?(i-a)/c:void 0,event:s,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(d)},r)},Fu=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},$u=e=>(...t)=>L.asap(()=>e(...t)),qO=Ke.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Ke.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Ke.origin),Ke.navigator&&/(msie|trident)/i.test(Ke.navigator.userAgent)):()=>!0,WO=Ke.hasStandardBrowserEnv?{write(e,t,r,n,o,s,a){if(typeof document>"u")return;const i=[`${e}=${encodeURIComponent(t)}`];L.isNumber(r)&&i.push(`expires=${new Date(r).toUTCString()}`),L.isString(n)&&i.push(`path=${n}`),L.isString(o)&&i.push(`domain=${o}`),s===!0&&i.push("secure"),L.isString(a)&&i.push(`SameSite=${a}`),document.cookie=i.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function JO(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function YO(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Yp(e,t,r){let n=!JO(t);return e&&(n||r==!1)?YO(e,t):t}const Nu=e=>e instanceof ct?{...e}:e;function Ir(e,t){t=t||{};const r={};function n(c,u,d,h){return L.isPlainObject(c)&&L.isPlainObject(u)?L.merge.call({caseless:h},c,u):L.isPlainObject(u)?L.merge({},u):L.isArray(u)?u.slice():u}function o(c,u,d,h){if(L.isUndefined(u)){if(!L.isUndefined(c))return n(void 0,c,d,h)}else return n(c,u,d,h)}function s(c,u){if(!L.isUndefined(u))return n(void 0,u)}function a(c,u){if(L.isUndefined(u)){if(!L.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function i(c,u,d){if(d in t)return n(c,u);if(d in e)return n(void 0,c)}const l={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:i,headers:(c,u,d)=>o(Nu(c),Nu(u),d,!0)};return L.forEach(Object.keys({...e,...t}),function(u){const d=l[u]||o,h=d(e[u],t[u],u);L.isUndefined(h)&&d!==i||(r[u]=h)}),r}const Kp=e=>{const t=Ir({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:i}=t;if(t.headers=a=ct.from(a),t.url=Gp(Yp(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&a.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):""))),L.isFormData(r)){if(Ke.hasStandardBrowserEnv||Ke.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(L.isFunction(r.getHeaders)){const l=r.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([u,d])=>{c.includes(u.toLowerCase())&&a.set(u,d)})}}if(Ke.hasStandardBrowserEnv&&(n&&L.isFunction(n)&&(n=n(t)),n||n!==!1&&qO(t.url))){const l=o&&s&&WO.read(s);l&&a.set(o,l)}return t},KO=typeof XMLHttpRequest<"u",QO=KO&&function(e){return new Promise(function(r,n){const o=Kp(e);let s=o.data;const a=ct.from(o.headers).normalize();let{responseType:i,onUploadProgress:l,onDownloadProgress:c}=o,u,d,h,p,f;function m(){p&&p(),f&&f(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let b=new XMLHttpRequest;b.open(o.method.toUpperCase(),o.url,!0),b.timeout=o.timeout;function S(){if(!b)return;const v=ct.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),I={data:!i||i==="text"||i==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:v,config:e,request:b};Jp(function(w){r(w),m()},function(w){n(w),m()},I),b=null}"onloadend"in b?b.onloadend=S:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(S)},b.onabort=function(){b&&(n(new de("Request aborted",de.ECONNABORTED,e,b)),b=null)},b.onerror=function(O){const I=O&&O.message?O.message:"Network Error",T=new de(I,de.ERR_NETWORK,e,b);T.event=O||null,n(T),b=null},b.ontimeout=function(){let O=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const I=o.transitional||Hp;o.timeoutErrorMessage&&(O=o.timeoutErrorMessage),n(new de(O,I.clarifyTimeoutError?de.ETIMEDOUT:de.ECONNABORTED,e,b)),b=null},s===void 0&&a.setContentType(null),"setRequestHeader"in b&&L.forEach(a.toJSON(),function(O,I){b.setRequestHeader(I,O)}),L.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),i&&i!=="json"&&(b.responseType=o.responseType),c&&([h,f]=xs(c,!0),b.addEventListener("progress",h)),l&&b.upload&&([d,p]=xs(l),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(u=v=>{b&&(n(!v||v.type?new bn(null,e,b):v),b.abort(),b=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const P=zO(o.url);if(P&&Ke.protocols.indexOf(P)===-1){n(new de("Unsupported protocol "+P+":",de.ERR_BAD_REQUEST,e));return}b.send(s||null)})},XO=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o;const s=function(c){if(!o){o=!0,i();const u=c instanceof Error?c:this.reason;n.abort(u instanceof de?u:new bn(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,s(new de(`timeout ${t} of ms exceeded`,de.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s));const{signal:l}=n;return l.unsubscribe=()=>L.asap(i),l}},ZO=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,o;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},eT=async function*(e,t){for await(const r of tT(e))yield*ZO(r,t)},tT=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},zu=(e,t,r,n)=>{const o=eT(e,t);let s=0,a,i=l=>{a||(a=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await o.next();if(c){i(),l.close();return}let d=u.byteLength;if(r){let h=s+=d;r(h)}l.enqueue(new Uint8Array(u))}catch(c){throw i(c),c}},cancel(l){return i(l),o.return()}},{highWaterMark:2})},Gu=64*1024,{isFunction:ko}=L,rT=(({Request:e,Response:t})=>({Request:e,Response:t}))(L.global),{ReadableStream:Hu,TextEncoder:qu}=L.global,Wu=(e,...t)=>{try{return!!e(...t)}catch{return!1}},nT=e=>{e=L.merge.call({skipUndefined:!0},rT,e);const{fetch:t,Request:r,Response:n}=e,o=t?ko(t):typeof fetch=="function",s=ko(r),a=ko(n);if(!o)return!1;const i=o&&ko(Hu),l=o&&(typeof qu=="function"?(f=>m=>f.encode(m))(new qu):async f=>new Uint8Array(await new r(f).arrayBuffer())),c=s&&i&&Wu(()=>{let f=!1;const m=new r(Ke.origin,{body:new Hu,method:"POST",get duplex(){return f=!0,"half"}}).headers.has("Content-Type");return f&&!m}),u=a&&i&&Wu(()=>L.isReadableStream(new n("").body)),d={stream:u&&(f=>f.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!d[f]&&(d[f]=(m,b)=>{let S=m&&m[f];if(S)return S.call(m);throw new de(`Response type '${f}' is not supported`,de.ERR_NOT_SUPPORT,b)})});const h=async f=>{if(f==null)return 0;if(L.isBlob(f))return f.size;if(L.isSpecCompliantForm(f))return(await new r(Ke.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(L.isArrayBufferView(f)||L.isArrayBuffer(f))return f.byteLength;if(L.isURLSearchParams(f)&&(f=f+""),L.isString(f))return(await l(f)).byteLength},p=async(f,m)=>{const b=L.toFiniteNumber(f.getContentLength());return b??h(m)};return async f=>{let{url:m,method:b,data:S,signal:P,cancelToken:v,timeout:O,onDownloadProgress:I,onUploadProgress:T,responseType:w,headers:R,withCredentials:k="same-origin",fetchOptions:y}=Kp(f),A=t||fetch;w=w?(w+"").toLowerCase():"text";let V=XO([P,v&&v.toAbortSignal()],O),M=null;const j=V&&V.unsubscribe&&(()=>{V.unsubscribe()});let ne;try{if(T&&c&&b!=="get"&&b!=="head"&&(ne=await p(R,S))!==0){let ee=new r(m,{method:"POST",body:S,duplex:"half"}),ce;if(L.isFormData(S)&&(ce=ee.headers.get("content-type"))&&R.setContentType(ce),ee.body){const[be,Me]=Fu(ne,xs($u(T)));S=zu(ee.body,Gu,be,Me)}}L.isString(k)||(k=k?"include":"omit");const Q=s&&"credentials"in r.prototype,oe={...y,signal:V,method:b.toUpperCase(),headers:R.normalize().toJSON(),body:S,duplex:"half",credentials:Q?k:void 0};M=s&&new r(m,oe);let X=await(s?A(M,y):A(m,oe));const se=u&&(w==="stream"||w==="response");if(u&&(I||se&&j)){const ee={};["status","statusText","headers"].forEach(xe=>{ee[xe]=X[xe]});const ce=L.toFiniteNumber(X.headers.get("content-length")),[be,Me]=I&&Fu(ce,xs($u(I),!0))||[];X=new n(zu(X.body,Gu,be,()=>{Me&&Me(),j&&j()}),ee)}w=w||"text";let F=await d[L.findKey(d,w)||"text"](X,f);return!se&&j&&j(),await new Promise((ee,ce)=>{Jp(ee,ce,{data:F,headers:ct.from(X.headers),status:X.status,statusText:X.statusText,config:f,request:M})})}catch(Q){throw j&&j(),Q&&Q.name==="TypeError"&&/Load failed|fetch/i.test(Q.message)?Object.assign(new de("Network Error",de.ERR_NETWORK,f,M),{cause:Q.cause||Q}):de.from(Q,Q&&Q.code,f,M)}}},oT=new Map,Qp=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:o}=t,s=[n,o,r];let a=s.length,i=a,l,c,u=oT;for(;i--;)l=s[i],c=u.get(l),c===void 0&&u.set(l,c=i?new Map:nT(t)),u=c;return c};Qp();const kl={http:vO,xhr:QO,fetch:{get:Qp}};L.forEach(kl,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ju=e=>`- ${e}`,sT=e=>L.isFunction(e)||e===null||e===!1;function aT(e,t){e=L.isArray(e)?e:[e];const{length:r}=e;let n,o;const s={};for(let a=0;a<r;a++){n=e[a];let i;if(o=n,!sT(n)&&(o=kl[(i=String(n)).toLowerCase()],o===void 0))throw new de(`Unknown adapter '${i}'`);if(o&&(L.isFunction(o)||(o=o.get(t))))break;s[i||"#"+a]=o}if(!o){const a=Object.entries(s).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let i=r?a.length>1?`since :
|
|
148
148
|
`+a.map(Ju).join(`
|
|
149
|
-
`):" "+Ju(a[0]):"as no adapter specified";throw new de("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return o}const
|
|
150
|
-
`+s):n.stack=s}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Ir(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&Yo.assertOptions(n,{silentJSONParsing:_t.transitional(_t.boolean),forcedJSONParsing:_t.transitional(_t.boolean),clarifyTimeoutError:_t.transitional(_t.boolean)},!1),o!=null&&(L.isFunction(o)?r.paramsSerializer={serialize:o}:Yo.assertOptions(o,{encode:_t.function,serialize:_t.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Yo.assertOptions(r,{baseUrl:_t.spelling("baseURL"),withXsrfToken:_t.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=s&&L.merge(s.common,s[r.method]);s&&L.forEach(["delete","get","head","post","put","patch","common"],f=>{delete s[f]}),r.headers=ct.concat(a,s);const i=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(l=l&&m.synchronous,i.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,h;if(!l){const f=[Yu.bind(this),void 0];for(f.unshift(...i),f.push(...c),h=f.length,u=Promise.resolve(r);d<h;)u=u.then(f[d++],f[d++]);return u}h=i.length;let p=r;for(;d<h;){const f=i[d++],m=i[d++];try{p=f(p)}catch(b){m.call(this,b);break}}try{u=Yu.call(this,p)}catch(f){return Promise.reject(f)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=Ir(this.defaults,t);const r=Yp(t.baseURL,t.url,t.allowAbsoluteUrls);return Gp(r,t.params,t.paramsSerializer)}};L.forEach(["delete","get","head","options"],function(t){Cr.prototype[t]=function(r,n){return this.request(Ir(n||{},{method:t,url:r,data:(n||{}).data}))}});L.forEach(["post","put","patch"],function(t){function r(n){return function(s,a,i){return this.request(Ir(i||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}Cr.prototype[t]=r(),Cr.prototype[t+"Form"]=r(!0)});let lT=class ef{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(o=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](o);n._listeners=null}),this.promise.then=o=>{let s;const a=new Promise(i=>{n.subscribe(i),s=i}).then(o);return a.cancel=function(){n.unsubscribe(s)},a},t(function(s,a,i){n.reason||(n.reason=new bn(s,a,i),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new ef(function(o){t=o}),cancel:t}}};function cT(e){return function(r){return e.apply(null,r)}}function uT(e){return L.isObject(e)&&e.isAxiosError===!0}const Oi={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Oi).forEach(([e,t])=>{Oi[t]=e});function tf(e){const t=new Cr(e),r=Mp(Cr.prototype.request,t);return L.extend(r,Cr.prototype,t,{allOwnKeys:!0}),L.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return tf(Ir(e,o))},r}const U=tf(ho);U.Axios=Cr;U.CanceledError=bn;U.CancelToken=lT;U.isCancel=Wp;U.VERSION=Zp;U.toFormData=sa;U.AxiosError=de;U.Cancel=U.CanceledError;U.all=function(t){return Promise.all(t)};U.spread=cT;U.isAxiosError=uT;U.mergeConfig=Ir;U.AxiosHeaders=ct;U.formToJSON=e=>qp(L.isHTMLForm(e)?new FormData(e):e);U.getAdapter=Qp.getAdapter;U.HttpStatusCode=Oi;U.default=U;const{Axios:VP,AxiosError:Ti,CanceledError:kP,isCancel:jP,CancelToken:DP,VERSION:UP,all:LP,Cancel:BP,isAxiosError:dT,spread:NP,toFormData:FP,AxiosHeaders:$P,HttpStatusCode:zP,formToJSON:GP,getAdapter:HP,mergeConfig:qP}=U;function hT(e){var t=[];if(e.length===0)return"";if(typeof e[0]!="string")throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var r=e.shift();e[0]=r+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var n=0;n<e.length;n++){var o=e[n];if(typeof o!="string")throw new TypeError("Url must be a string. Received "+o);o!==""&&(n>0&&(o=o.replace(/^[\/]+/,"")),n<e.length-1?o=o.replace(/[\/]+$/,""):o=o.replace(/[\/]+$/,"/"),t.push(o))}var s=t.join("/");s=s.replace(/\/(\?|&|#[^!])/g,"$1");var a=s.split("?");return s=a.shift()+(a.length>0?"?":"")+a.join("&"),s}function Ja(){var e;return typeof arguments[0]=="object"?e=arguments[0]:e=[].slice.call(arguments),hT(e)}var gt={},Xu;function pT(){if(Xu)return gt;Xu=1,Object.defineProperty(gt,"__esModule",{value:!0}),gt.PathError=gt.TokenData=void 0,gt.parse=c,gt.compile=u,gt.match=p,gt.pathToRegexp=f,gt.stringify=O;const e="/",t=w=>w,r=/^[$_\p{ID_Start}]$/u,n=/^[$\u200c\u200d\p{ID_Continue}]$/u,o={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function s(w){return w.replace(/[{}()\[\]+?!:*\\]/g,"\\$&")}function a(w){return w.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class i{constructor(P,k){this.tokens=P,this.originalPath=k}}gt.TokenData=i;class l extends TypeError{constructor(P,k){let y=P;k&&(y+=`: ${k}`),y+="; visit https://git.new/pathToRegexpError for info",super(y),this.originalPath=k}}gt.PathError=l;function c(w,P={}){const{encodePath:k=t}=P,y=[...w],A=[];let M=0,_=0;function j(){let X="";if(r.test(y[M]))do X+=y[M++];while(n.test(y[M]));else if(y[M]==='"'){let oe=M;for(;M++<y.length;){if(y[M]==='"'){M++,oe=0;break}y[M]==="\\"&&M++,X+=y[M]}if(oe)throw new l(`Unterminated quote at index ${oe}`,w)}if(!X)throw new l(`Missing parameter name at index ${M}`,w);return X}for(;M<y.length;){const X=y[M],oe=o[X];oe?A.push({type:oe,index:M++,value:X}):X==="\\"?A.push({type:"escape",index:M++,value:y[M++]}):X===":"?A.push({type:"param",index:M++,value:j()}):X==="*"?A.push({type:"wildcard",index:M++,value:j()}):A.push({type:"char",index:M++,value:X})}A.push({type:"end",index:M,value:""});function ne(X){const oe=[];for(;;){const Q=A[_++];if(Q.type===X)break;if(Q.type==="char"||Q.type==="escape"){let se=Q.value,N=A[_];for(;N.type==="char"||N.type==="escape";)se+=N.value,N=A[++_];oe.push({type:"text",value:k(se)});continue}if(Q.type==="param"||Q.type==="wildcard"){oe.push({type:Q.type,name:Q.value});continue}if(Q.type==="{"){oe.push({type:"group",tokens:ne("}")});continue}throw new l(`Unexpected ${Q.type} at index ${Q.index}, expected ${X}`,w)}return oe}return new i(ne("end"),w)}function u(w,P={}){const{encode:k=encodeURIComponent,delimiter:y=e}=P,A=typeof w=="object"?w:c(w,P),M=d(A.tokens,y,k);return function(j={}){const[ne,...X]=M(j);if(X.length)throw new TypeError(`Missing parameters: ${X.join(", ")}`);return ne}}function d(w,P,k){const y=w.map(A=>h(A,P,k));return A=>{const M=[""];for(const _ of y){const[j,...ne]=_(A);M[0]+=j,M.push(...ne)}return M}}function h(w,P,k){if(w.type==="text")return()=>[w.value];if(w.type==="group"){const A=d(w.tokens,P,k);return M=>{const[_,...j]=A(M);return j.length?[""]:[_]}}const y=k||t;return w.type==="wildcard"&&k!==!1?A=>{const M=A[w.name];if(M==null)return["",w.name];if(!Array.isArray(M)||M.length===0)throw new TypeError(`Expected "${w.name}" to be a non-empty array`);return[M.map((_,j)=>{if(typeof _!="string")throw new TypeError(`Expected "${w.name}/${j}" to be a string`);return y(_)}).join(P)]}:A=>{const M=A[w.name];if(M==null)return["",w.name];if(typeof M!="string")throw new TypeError(`Expected "${w.name}" to be a string`);return[y(M)]}}function p(w,P={}){const{decode:k=decodeURIComponent,delimiter:y=e}=P,{regexp:A,keys:M}=f(w,P),_=M.map(j=>k===!1?t:j.type==="param"?k:ne=>ne.split(y).map(k));return function(ne){const X=A.exec(ne);if(!X)return!1;const oe=X[0],Q=Object.create(null);for(let se=1;se<X.length;se++){if(X[se]===void 0)continue;const N=M[se-1],ee=_[se-1];Q[N.name]=ee(X[se])}return{path:oe,params:Q}}}function f(w,P={}){const{delimiter:k=e,end:y=!0,sensitive:A=!1,trailing:M=!0}=P,_=[],j=A?"":"i",ne=[];for(const Q of m(w,[])){const se=typeof Q=="object"?Q:c(Q,P);for(const N of b(se.tokens,0,[]))ne.push(S(N,k,_,se.originalPath))}let X=`^(?:${ne.join("|")})`;return M&&(X+=`(?:${a(k)}$)?`),X+=y?"$":`(?=${a(k)}|$)`,{regexp:new RegExp(X,j),keys:_}}function m(w,P){if(Array.isArray(w))for(const k of w)m(k,P);else P.push(w);return P}function*b(w,P,k){if(P===w.length)return yield k;const y=w[P];if(y.type==="group")for(const A of b(y.tokens,0,k.slice()))yield*b(w,P+1,A);else k.push(y);yield*b(w,P+1,k)}function S(w,P,k,y){let A="",M="",_=!0;for(const j of w){if(j.type==="text"){A+=a(j.value),M+=j.value,_||(_=j.value.includes(P));continue}if(j.type==="param"||j.type==="wildcard"){if(!_&&!M)throw new l(`Missing text before "${j.name}" ${j.type}`,y);j.type==="param"?A+=`(${R(P,_?"":M)}+)`:A+="([\\s\\S]+)",k.push(j),M="",_=!1;continue}}return A}function R(w,P){return P.length<2?w.length<2?`[^${a(w+P)}]`:`(?:(?!${a(w)})[^${a(P)}])`:w.length<2?`(?:(?!${a(P)})[^${a(w)}])`:`(?:(?!${a(P)}|${a(w)})[\\s\\S])`}function v(w){let P="",k=0;function y(A){return I(A)&&T(w[k])?A:JSON.stringify(A)}for(;k<w.length;){const A=w[k++];if(A.type==="text"){P+=s(A.value);continue}if(A.type==="group"){P+=`{${v(A.tokens)}}`;continue}if(A.type==="param"){P+=`:${y(A.name)}`;continue}if(A.type==="wildcard"){P+=`*${y(A.name)}`;continue}throw new TypeError(`Unknown token type: ${A.type}`)}return P}function O(w){return v(w.tokens)}function I(w){const[P,...k]=w;return r.test(P)&&k.every(y=>n.test(y))}function T(w){return w&&w.type==="text"?!n.test(w.value[0]):!0}return gt}var fT=pT();function Xn(e){"@babel/helpers - typeof";return Xn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xn(e)}function mT(e,t){if(Xn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Xn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gT(e){var t=mT(e,"string");return Xn(t)=="symbol"?t:t+""}function yT(e,t,r){return(t=gT(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const F="/api/v2".replace(/\/+$/,""),Qu={csv:","};var Fe=class{constructor(e,t=F,r=U){this.basePath=t,this.axios=r,yT(this,"configuration",void 0),e&&(this.configuration=e,this.basePath=e.basePath??t)}},bT=class extends Error{constructor(e,t){super(t),this.field=e,this.name="RequiredError"}};const $={},z="https://example.com",C=function(e,t,r){if(r==null)throw new bT(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},G=function(e,t){t&&(t.username||t.password)&&(e.auth={username:t.username,password:t.password})},H=async function(e,t){t&&t.accessToken&&(e.Authorization="Bearer "+(typeof t.accessToken=="function"?await t.accessToken():await t.accessToken))};function Ei(e,t,r=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(n=>Ei(e,n,r)):Object.keys(t).forEach(n=>Ei(e,t[n],`${r}${r!==""?".":""}${n}`)):e.has(r)?e.append(r,t):e.set(r,t))}const q=function(e,...t){const r=new URLSearchParams(e.search);Ei(r,t),e.search=r.toString()},me=function(e,t,r){const n=typeof e!="string";return(n&&r&&r.isJsonMime?r.isJsonMime(t.headers["Content-Type"]):n)?JSON.stringify(e!==void 0?e:{}):e||""},W=function(e){return e.pathname+e.search+e.hash},J=function(e,t,r,n){return(o=t,s=r)=>{const a={...e.options,url:(o.defaults.baseURL?"":(n==null?void 0:n.basePath)??s)+e.url};return o.request(a)}},xT=function(e){return{addApp:async(t,r,n,o={})=>{C("addApp","cell",t),C("addApp","app",r);const s="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(r,l,e),{url:W(a),options:l}},clearApps:async(t,r,n={})=>{C("clearApps","cell",t);const o="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),r!==void 0&&(c.completion_timeout=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteApp:async(t,r,n,o={})=>{C("deleteApp","cell",t),C("deleteApp","app",r);const s="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},getApp:async(t,r,n={})=>{C("getApp","cell",t),C("getApp","app",r);const o="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listApps:async(t,r={})=>{C("listApps","cell",t);const n="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},updateApp:async(t,r,n,o,s={})=>{C("updateApp","cell",t),C("updateApp","app",r),C("updateApp","app2",n);const a="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};G(c,e),await H(u,e),o!==void 0&&(d.completion_timeout=o),u["Content-Type"]="application/json",q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=me(n,c,e),{url:W(i),options:c}}}},Wr=function(e){const t=xT(e);return{async addApp(r,n,o,s){var c,u;const a=await t.addApp(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ApplicationApi.addApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)},async clearApps(r,n,o){var l,c;const s=await t.clearApps(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ApplicationApi.clearApps"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async deleteApp(r,n,o,s){var c,u;const a=await t.deleteApp(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ApplicationApi.deleteApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)},async getApp(r,n,o){var l,c;const s=await t.getApp(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ApplicationApi.getApp"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async listApps(r,n){var i,l;const o=await t.listApps(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=$["ApplicationApi.listApps"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,F,e)(c,a||u)},async updateApp(r,n,o,s,a){var u,d;const i=await t.updateApp(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["ApplicationApi.updateApp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,U,F,e)(h,c||p)}}};var Zu=class extends Fe{addApp(e,t,r,n){return Wr(this.configuration).addApp(e,t,r,n).then(o=>o(this.axios,this.basePath))}clearApps(e,t,r){return Wr(this.configuration).clearApps(e,t,r).then(n=>n(this.axios,this.basePath))}deleteApp(e,t,r,n){return Wr(this.configuration).deleteApp(e,t,r,n).then(o=>o(this.axios,this.basePath))}getApp(e,t,r){return Wr(this.configuration).getApp(e,t,r).then(n=>n(this.axios,this.basePath))}listApps(e,t){return Wr(this.configuration).listApps(e,t).then(r=>r(this.axios,this.basePath))}updateApp(e,t,r,n,o){return Wr(this.configuration).updateApp(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}};const ST=function(e){return{addBusIOService:async(t,r,n,o={})=>{C("addBusIOService","cell",t),C("addBusIOService","busIOType",r);const s="/cells/{cell}/bus-ios".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(r,l,e),{url:W(a),options:l}},addModbusIO:async(t,r,n,o={})=>{C("addModbusIO","cell",t),C("addModbusIO","io",r),C("addModbusIO","modbusIOData",n);const s="/cells/{cell}/bus-ios/modbus/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{io}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(n,l,e),{url:W(a),options:l}},addProfinetIO:async(t,r,n,o={})=>{C("addProfinetIO","cell",t),C("addProfinetIO","io",r),C("addProfinetIO","profinetIOData",n);const s="/cells/{cell}/bus-ios/profinet/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{io}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(n,l,e),{url:W(a),options:l}},clearBusIOService:async(t,r,n={})=>{C("clearBusIOService","cell",t);const o="/cells/{cell}/bus-ios".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),r!==void 0&&(c.completion_timeout=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteModbusIO:async(t,r,n={})=>{C("deleteModbusIO","cell",t),C("deleteModbusIO","io",r);const o="/cells/{cell}/bus-ios/modbus/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{io}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteProfinetIO:async(t,r,n={})=>{C("deleteProfinetIO","cell",t),C("deleteProfinetIO","io",r);const o="/cells/{cell}/bus-ios/profinet/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{io}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getBusIOService:async(t,r={})=>{C("getBusIOService","cell",t);const n="/cells/{cell}/bus-ios".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},getBusIOState:async(t,r={})=>{C("getBusIOState","cell",t);const n="/cells/{cell}/bus-ios/state".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},getBusIOValues:async(t,r,n={})=>{C("getBusIOValues","cell",t);const o="/cells/{cell}/bus-ios/ios/values".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),r&&(c.ios=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getProfinetDescription:async(t,r={})=>{C("getProfinetDescription","cell",t);const n="/cells/{cell}/bus-ios/profinet/description".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},getProfinetIOsFromFile:async(t,r,n,o={})=>{C("getProfinetIOsFromFile","cell",t);const s="/cells/{cell}/bus-ios/profinet/iofile".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),r!==void 0&&(u.input_offset=r),n!==void 0&&(u.output_offset=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},listBusIODescriptions:async(t,r={})=>{C("listBusIODescriptions","cell",t);const n="/cells/{cell}/bus-ios/ios/description".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listModbusIOs:async(t,r={})=>{C("listModbusIOs","cell",t);const n="/cells/{cell}/bus-ios/modbus/ios".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listProfinetIOs:async(t,r={})=>{C("listProfinetIOs","cell",t);const n="/cells/{cell}/bus-ios/profinet/ios".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},setBusIOValues:async(t,r,n={})=>{C("setBusIOValues","cell",t),C("setBusIOValues","iOValue",r);const o="/cells/{cell}/bus-ios/ios/values".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"PUT",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=me(r,i,e),{url:W(s),options:i}},setProfinetIOsFromFile:async(t,r,n={})=>{C("setProfinetIOsFromFile","cell",t),C("setProfinetIOsFromFile","profinetInputOutputConfig",r);const o="/cells/{cell}/bus-ios/profinet/iofile".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"PUT",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=me(r,i,e),{url:W(s),options:i}}}},Ye=function(e){const t=ST(e);return{async addBusIOService(r,n,o,s){var c,u;const a=await t.addBusIOService(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["BUSInputsOutputsApi.addBusIOService"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)},async addModbusIO(r,n,o,s){var c,u;const a=await t.addModbusIO(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["BUSInputsOutputsApi.addModbusIO"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)},async addProfinetIO(r,n,o,s){var c,u;const a=await t.addProfinetIO(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["BUSInputsOutputsApi.addProfinetIO"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)},async clearBusIOService(r,n,o){var l,c;const s=await t.clearBusIOService(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["BUSInputsOutputsApi.clearBusIOService"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async deleteModbusIO(r,n,o){var l,c;const s=await t.deleteModbusIO(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["BUSInputsOutputsApi.deleteModbusIO"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async deleteProfinetIO(r,n,o){var l,c;const s=await t.deleteProfinetIO(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["BUSInputsOutputsApi.deleteProfinetIO"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async getBusIOService(r,n){var i,l;const o=await t.getBusIOService(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=$["BUSInputsOutputsApi.getBusIOService"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,F,e)(c,a||u)},async getBusIOState(r,n){var i,l;const o=await t.getBusIOState(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=$["BUSInputsOutputsApi.getBusIOState"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,F,e)(c,a||u)},async getBusIOValues(r,n,o){var l,c;const s=await t.getBusIOValues(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["BUSInputsOutputsApi.getBusIOValues"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async getProfinetDescription(r,n){var i,l;const o=await t.getProfinetDescription(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=$["BUSInputsOutputsApi.getProfinetDescription"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,F,e)(c,a||u)},async getProfinetIOsFromFile(r,n,o,s){var c,u;const a=await t.getProfinetIOsFromFile(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["BUSInputsOutputsApi.getProfinetIOsFromFile"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)},async listBusIODescriptions(r,n){var i,l;const o=await t.listBusIODescriptions(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=$["BUSInputsOutputsApi.listBusIODescriptions"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,F,e)(c,a||u)},async listModbusIOs(r,n){var i,l;const o=await t.listModbusIOs(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=$["BUSInputsOutputsApi.listModbusIOs"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,F,e)(c,a||u)},async listProfinetIOs(r,n){var i,l;const o=await t.listProfinetIOs(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=$["BUSInputsOutputsApi.listProfinetIOs"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,F,e)(c,a||u)},async setBusIOValues(r,n,o){var l,c;const s=await t.setBusIOValues(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["BUSInputsOutputsApi.setBusIOValues"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async setProfinetIOsFromFile(r,n,o){var l,c;const s=await t.setProfinetIOsFromFile(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["BUSInputsOutputsApi.setProfinetIOsFromFile"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)}}};var vT=class extends Fe{addBusIOService(e,t,r,n){return Ye(this.configuration).addBusIOService(e,t,r,n).then(o=>o(this.axios,this.basePath))}addModbusIO(e,t,r,n){return Ye(this.configuration).addModbusIO(e,t,r,n).then(o=>o(this.axios,this.basePath))}addProfinetIO(e,t,r,n){return Ye(this.configuration).addProfinetIO(e,t,r,n).then(o=>o(this.axios,this.basePath))}clearBusIOService(e,t,r){return Ye(this.configuration).clearBusIOService(e,t,r).then(n=>n(this.axios,this.basePath))}deleteModbusIO(e,t,r){return Ye(this.configuration).deleteModbusIO(e,t,r).then(n=>n(this.axios,this.basePath))}deleteProfinetIO(e,t,r){return Ye(this.configuration).deleteProfinetIO(e,t,r).then(n=>n(this.axios,this.basePath))}getBusIOService(e,t){return Ye(this.configuration).getBusIOService(e,t).then(r=>r(this.axios,this.basePath))}getBusIOState(e,t){return Ye(this.configuration).getBusIOState(e,t).then(r=>r(this.axios,this.basePath))}getBusIOValues(e,t,r){return Ye(this.configuration).getBusIOValues(e,t,r).then(n=>n(this.axios,this.basePath))}getProfinetDescription(e,t){return Ye(this.configuration).getProfinetDescription(e,t).then(r=>r(this.axios,this.basePath))}getProfinetIOsFromFile(e,t,r,n){return Ye(this.configuration).getProfinetIOsFromFile(e,t,r,n).then(o=>o(this.axios,this.basePath))}listBusIODescriptions(e,t){return Ye(this.configuration).listBusIODescriptions(e,t).then(r=>r(this.axios,this.basePath))}listModbusIOs(e,t){return Ye(this.configuration).listModbusIOs(e,t).then(r=>r(this.axios,this.basePath))}listProfinetIOs(e,t){return Ye(this.configuration).listProfinetIOs(e,t).then(r=>r(this.axios,this.basePath))}setBusIOValues(e,t,r){return Ye(this.configuration).setBusIOValues(e,t,r).then(n=>n(this.axios,this.basePath))}setProfinetIOsFromFile(e,t,r){return Ye(this.configuration).setProfinetIOsFromFile(e,t,r).then(n=>n(this.axios,this.basePath))}};const CT=function(e){return{deleteCell:async(t,r,n={})=>{C("deleteCell","cell",t);const o="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),r!==void 0&&(c.completion_timeout=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deployCell:async(t,r,n={})=>{C("deployCell","cell",t);const o=new URL("/cells",z);let s;e&&(s=e.baseOptions);const a={method:"POST",...s,...n},i={},l={};G(a,e),await H(i,e),r!==void 0&&(l.completion_timeout=r),i["Content-Type"]="application/json",q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...n.headers},a.data=me(t,a,e),{url:W(o),options:a}},getCell:async(t,r={})=>{C("getCell","cell",t);const n="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},getCellStatus:async(t,r={})=>{C("getCellStatus","cell",t);const n="/cells/{cell}/status".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listCells:async(t={})=>{const r=new URL("/cells",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}},setCellStatus:async(t,r,n={})=>{C("setCellStatus","cell",t),C("setCellStatus","operatingState",r);const o="/cells/{cell}/status".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"PUT",...a,...n},l={},c={};G(i,e),await H(l,e),r!==void 0&&(c.operating_state=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},updateCell:async(t,r,n,o={})=>{C("updateCell","cell",t),C("updateCell","cell2",r);const s="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(r,l,e),{url:W(a),options:l}}}},gr=function(e){const t=CT(e);return{async deleteCell(r,n,o){var l,c;const s=await t.deleteCell(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["CellApi.deleteCell"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async deployCell(r,n,o){var l,c;const s=await t.deployCell(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["CellApi.deployCell"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async getCell(r,n){var i,l;const o=await t.getCell(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=$["CellApi.getCell"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,F,e)(c,a||u)},async getCellStatus(r,n){var i,l;const o=await t.getCellStatus(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=$["CellApi.getCellStatus"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,F,e)(c,a||u)},async listCells(r){var a,i;const n=await t.listCells(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=$["CellApi.listCells"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,U,F,e)(l,s||c)},async setCellStatus(r,n,o){var l,c;const s=await t.setCellStatus(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["CellApi.setCellStatus"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async updateCell(r,n,o,s){var c,u;const a=await t.updateCell(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["CellApi.updateCell"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)}}};var wT=class extends Fe{deleteCell(e,t,r){return gr(this.configuration).deleteCell(e,t,r).then(n=>n(this.axios,this.basePath))}deployCell(e,t,r){return gr(this.configuration).deployCell(e,t,r).then(n=>n(this.axios,this.basePath))}getCell(e,t){return gr(this.configuration).getCell(e,t).then(r=>r(this.axios,this.basePath))}getCellStatus(e,t){return gr(this.configuration).getCellStatus(e,t).then(r=>r(this.axios,this.basePath))}listCells(e){return gr(this.configuration).listCells(e).then(t=>t(this.axios,this.basePath))}setCellStatus(e,t,r){return gr(this.configuration).setCellStatus(e,t,r).then(n=>n(this.axios,this.basePath))}updateCell(e,t,r,n){return gr(this.configuration).updateCell(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const OT=function(e){return{addRobotController:async(t,r,n,o={})=>{C("addRobotController","cell",t),C("addRobotController","robotController",r);const s="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(r,l,e),{url:W(a),options:l}},clearRobotControllers:async(t,r,n={})=>{C("clearRobotControllers","cell",t);const o="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),r!==void 0&&(c.completion_timeout=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteRobotController:async(t,r,n,o={})=>{C("deleteRobotController","cell",t),C("deleteRobotController","controller",r);const s="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},getControllerDescription:async(t,r,n={})=>{C("getControllerDescription","cell",t),C("getControllerDescription","controller",r);const o="/cells/{cell}/controllers/{controller}/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getCoordinateSystem:async(t,r,n,o,s={})=>{C("getCoordinateSystem","cell",t),C("getCoordinateSystem","controller",r),C("getCoordinateSystem","coordinateSystem",n);const a="/cells/{cell}/controllers/{controller}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{coordinate-system}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...s},u={},d={};G(c,e),await H(u,e),o!==void 0&&(d.orientation_type=o),q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:W(i),options:c}},getCurrentRobotControllerState:async(t,r,n={})=>{C("getCurrentRobotControllerState","cell",t),C("getCurrentRobotControllerState","controller",r);const o="/cells/{cell}/controllers/{controller}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getRobotController:async(t,r,n={})=>{C("getRobotController","cell",t),C("getRobotController","controller",r);const o="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getVirtualControllerConfiguration:async(t,r,n={})=>{C("getVirtualControllerConfiguration","cell",t),C("getVirtualControllerConfiguration","controller",r);const o="/cells/{cell}/controllers/{controller}/virtual-robot-configuration".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listCoordinateSystems:async(t,r,n,o={})=>{C("listCoordinateSystems","cell",t),C("listCoordinateSystems","controller",r);const s="/cells/{cell}/controllers/{controller}/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.orientation_type=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},listRobotControllers:async(t,r={})=>{C("listRobotControllers","cell",t);const n="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},setDefaultMode:async(t,r,n,o={})=>{C("setDefaultMode","cell",t),C("setDefaultMode","controller",r),C("setDefaultMode","mode",n);const s="/cells/{cell}/controllers/{controller}/mode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.mode=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},streamFreeDrive:async(t,r,n,o={})=>{C("streamFreeDrive","cell",t),C("streamFreeDrive","controller",r);const s="/cells/{cell}/controllers/{controller}/free-drive-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.response_rate=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},streamRobotControllerState:async(t,r,n,o,s={})=>{C("streamRobotControllerState","cell",t),C("streamRobotControllerState","controller",r);const a="/cells/{cell}/controllers/{controller}/state-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...s},u={},d={};G(c,e),await H(u,e),n!==void 0&&(d.response_rate=n),o!==void 0&&(d.add_controller_timeout=o),q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:W(i),options:c}},updateRobotController:async(t,r,n,o,s={})=>{C("updateRobotController","cell",t),C("updateRobotController","controller",r),C("updateRobotController","robotController",n);const a="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};G(c,e),await H(u,e),o!==void 0&&(d.completion_timeout=o),u["Content-Type"]="application/json",q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=me(n,c,e),{url:W(i),options:c}}}},ot=function(e){const t=OT(e);return{async addRobotController(r,n,o,s){var c,u;const a=await t.addRobotController(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ControllerApi.addRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)},async clearRobotControllers(r,n,o){var l,c;const s=await t.clearRobotControllers(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ControllerApi.clearRobotControllers"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async deleteRobotController(r,n,o,s){var c,u;const a=await t.deleteRobotController(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ControllerApi.deleteRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)},async getControllerDescription(r,n,o){var l,c;const s=await t.getControllerDescription(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ControllerApi.getControllerDescription"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async getCoordinateSystem(r,n,o,s,a){var u,d;const i=await t.getCoordinateSystem(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["ControllerApi.getCoordinateSystem"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,U,F,e)(h,c||p)},async getCurrentRobotControllerState(r,n,o){var l,c;const s=await t.getCurrentRobotControllerState(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ControllerApi.getCurrentRobotControllerState"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async getRobotController(r,n,o){var l,c;const s=await t.getRobotController(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ControllerApi.getRobotController"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async getVirtualControllerConfiguration(r,n,o){var l,c;const s=await t.getVirtualControllerConfiguration(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["ControllerApi.getVirtualControllerConfiguration"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async listCoordinateSystems(r,n,o,s){var c,u;const a=await t.listCoordinateSystems(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ControllerApi.listCoordinateSystems"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)},async listRobotControllers(r,n){var i,l;const o=await t.listRobotControllers(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=$["ControllerApi.listRobotControllers"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,F,e)(c,a||u)},async setDefaultMode(r,n,o,s){var c,u;const a=await t.setDefaultMode(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ControllerApi.setDefaultMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)},async streamFreeDrive(r,n,o,s){var c,u;const a=await t.streamFreeDrive(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ControllerApi.streamFreeDrive"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)},async streamRobotControllerState(r,n,o,s,a){var u,d;const i=await t.streamRobotControllerState(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["ControllerApi.streamRobotControllerState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,U,F,e)(h,c||p)},async updateRobotController(r,n,o,s,a){var u,d;const i=await t.updateRobotController(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["ControllerApi.updateRobotController"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,U,F,e)(h,c||p)}}};var TT=class extends Fe{addRobotController(e,t,r,n){return ot(this.configuration).addRobotController(e,t,r,n).then(o=>o(this.axios,this.basePath))}clearRobotControllers(e,t,r){return ot(this.configuration).clearRobotControllers(e,t,r).then(n=>n(this.axios,this.basePath))}deleteRobotController(e,t,r,n){return ot(this.configuration).deleteRobotController(e,t,r,n).then(o=>o(this.axios,this.basePath))}getControllerDescription(e,t,r){return ot(this.configuration).getControllerDescription(e,t,r).then(n=>n(this.axios,this.basePath))}getCoordinateSystem(e,t,r,n,o){return ot(this.configuration).getCoordinateSystem(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}getCurrentRobotControllerState(e,t,r){return ot(this.configuration).getCurrentRobotControllerState(e,t,r).then(n=>n(this.axios,this.basePath))}getRobotController(e,t,r){return ot(this.configuration).getRobotController(e,t,r).then(n=>n(this.axios,this.basePath))}getVirtualControllerConfiguration(e,t,r){return ot(this.configuration).getVirtualControllerConfiguration(e,t,r).then(n=>n(this.axios,this.basePath))}listCoordinateSystems(e,t,r,n){return ot(this.configuration).listCoordinateSystems(e,t,r,n).then(o=>o(this.axios,this.basePath))}listRobotControllers(e,t){return ot(this.configuration).listRobotControllers(e,t).then(r=>r(this.axios,this.basePath))}setDefaultMode(e,t,r,n){return ot(this.configuration).setDefaultMode(e,t,r,n).then(o=>o(this.axios,this.basePath))}streamFreeDrive(e,t,r,n){return ot(this.configuration).streamFreeDrive(e,t,r,n).then(o=>o(this.axios,this.basePath))}streamRobotControllerState(e,t,r,n,o){return ot(this.configuration).streamRobotControllerState(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}updateRobotController(e,t,r,n,o){return ot(this.configuration).updateRobotController(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}};const ET=function(e){return{listIODescriptions:async(t,r,n,o,s,a,i={})=>{C("listIODescriptions","cell",t),C("listIODescriptions","controller",r);const l="/cells/{cell}/controllers/{controller}/ios/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),c=new URL(l,z);let u;e&&(u=e.baseOptions);const d={method:"GET",...u,...i},h={},p={};G(d,e),await H(h,e),n&&(p.ios=n),o!==void 0&&(p.direction=o),s!==void 0&&(p.value_type=s),a!==void 0&&(p.group=a),q(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:W(c),options:d}},listIOValues:async(t,r,n,o={})=>{C("listIOValues","cell",t),C("listIOValues","controller",r);const s="/cells/{cell}/controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),n&&(u.ios=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},setOutputValues:async(t,r,n,o={})=>{C("setOutputValues","cell",t),C("setOutputValues","controller",r),C("setOutputValues","iOValue",n);const s="/cells/{cell}/controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(n,l,e),{url:W(a),options:l}},streamIOValues:async(t,r,n,o={})=>{C("streamIOValues","cell",t),C("streamIOValues","controller",r);const s="/cells/{cell}/controllers/{controller}/ios/stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),n&&(u.ios=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},waitForIOEvent:async(t,r,n,o={})=>{C("waitForIOEvent","cell",t),C("waitForIOEvent","controller",r),C("waitForIOEvent","waitForIOEventRequest",n);const s="/cells/{cell}/controllers/{controller}/ios/wait-for".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(n,l,e),{url:W(a),options:l}}}},Pn=function(e){const t=ET(e);return{async listIODescriptions(r,n,o,s,a,i,l){var h,p;const c=await t.listIODescriptions(r,n,o,s,a,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=$["ControllerInputsOutputsApi.listIODescriptions"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>J(c,U,F,e)(f,d||m)},async listIOValues(r,n,o,s){var c,u;const a=await t.listIOValues(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ControllerInputsOutputsApi.listIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)},async setOutputValues(r,n,o,s){var c,u;const a=await t.setOutputValues(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ControllerInputsOutputsApi.setOutputValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)},async streamIOValues(r,n,o,s){var c,u;const a=await t.streamIOValues(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ControllerInputsOutputsApi.streamIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)},async waitForIOEvent(r,n,o,s){var c,u;const a=await t.waitForIOEvent(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["ControllerInputsOutputsApi.waitForIOEvent"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)}}};var IT=class extends Fe{listIODescriptions(e,t,r,n,o,s,a){return Pn(this.configuration).listIODescriptions(e,t,r,n,o,s,a).then(i=>i(this.axios,this.basePath))}listIOValues(e,t,r,n){return Pn(this.configuration).listIOValues(e,t,r,n).then(o=>o(this.axios,this.basePath))}setOutputValues(e,t,r,n){return Pn(this.configuration).setOutputValues(e,t,r,n).then(o=>o(this.axios,this.basePath))}streamIOValues(e,t,r,n){return Pn(this.configuration).streamIOValues(e,t,r,n).then(o=>o(this.axios,this.basePath))}waitForIOEvent(e,t,r,n){return Pn(this.configuration).waitForIOEvent(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const AT=function(e){return{executeJogging:async(t,r,n,o={})=>{C("executeJogging","cell",t),C("executeJogging","controller",r),C("executeJogging","executeJoggingRequest",n);const s="/cells/{cell}/controllers/{controller}/execution/jogging".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(n,l,e),{url:W(a),options:l}}}},RT=function(e){const t=AT(e);return{async executeJogging(r,n,o,s){var c,u;const a=await t.executeJogging(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["JoggingApi.executeJogging"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)}}};var PT=class extends Fe{executeJogging(e,t,r,n){return RT(this.configuration).executeJogging(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const _T=function(e){return{forwardKinematics:async(t,r,n={})=>{C("forwardKinematics","cell",t),C("forwardKinematics","forwardKinematicsRequest",r);const o="/cells/{cell}/kinematic/forward".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=me(r,i,e),{url:W(s),options:i}},inverseKinematics:async(t,r,n={})=>{C("inverseKinematics","cell",t),C("inverseKinematics","inverseKinematicsRequest",r);const o="/cells/{cell}/kinematic/inverse".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=me(r,i,e),{url:W(s),options:i}}}},ed=function(e){const t=_T(e);return{async forwardKinematics(r,n,o){var l,c;const s=await t.forwardKinematics(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["KinematicsApi.forwardKinematics"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async inverseKinematics(r,n,o){var l,c;const s=await t.inverseKinematics(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["KinematicsApi.inverseKinematics"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)}}};var MT=class extends Fe{forwardKinematics(e,t,r){return ed(this.configuration).forwardKinematics(e,t,r).then(n=>n(this.axios,this.basePath))}inverseKinematics(e,t,r){return ed(this.configuration).inverseKinematics(e,t,r).then(n=>n(this.axios,this.basePath))}};const VT=function(e){return{getCurrentMotionGroupState:async(t,r,n,o,s={})=>{C("getCurrentMotionGroupState","cell",t),C("getCurrentMotionGroupState","controller",r),C("getCurrentMotionGroupState","motionGroup",n);const a="/cells/{cell}/controllers/{controller}/motion-groups/{motion-group}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...s},u={},d={};G(c,e),await H(u,e),o!==void 0&&(d.response_coordinate_system=o),q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:W(i),options:c}},getMotionGroupDescription:async(t,r,n,o={})=>{C("getMotionGroupDescription","cell",t),C("getMotionGroupDescription","controller",r),C("getMotionGroupDescription","motionGroup",n);const s="/cells/{cell}/controllers/{controller}/motion-groups/{motion-group}/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},streamMotionGroupState:async(t,r,n,o,s,a={})=>{C("streamMotionGroupState","cell",t),C("streamMotionGroupState","controller",r),C("streamMotionGroupState","motionGroup",n);const i="/cells/{cell}/controllers/{controller}/motion-groups/{motion-group}/state-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),l=new URL(i,z);let c;e&&(c=e.baseOptions);const u={method:"GET",...c,...a},d={},h={};G(u,e),await H(d,e),o!==void 0&&(h.response_rate=o),s!==void 0&&(h.response_coordinate_system=s),q(l,h);let p=c&&c.headers?c.headers:{};return u.headers={...d,...p,...a.headers},{url:W(l),options:u}}}},Ya=function(e){const t=VT(e);return{async getCurrentMotionGroupState(r,n,o,s,a){var u,d;const i=await t.getCurrentMotionGroupState(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["MotionGroupApi.getCurrentMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,U,F,e)(h,c||p)},async getMotionGroupDescription(r,n,o,s){var c,u;const a=await t.getMotionGroupDescription(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["MotionGroupApi.getMotionGroupDescription"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)},async streamMotionGroupState(r,n,o,s,a,i){var d,h;const l=await t.streamMotionGroupState(r,n,o,s,a,i),c=(e==null?void 0:e.serverIndex)??0,u=(h=(d=$["MotionGroupApi.streamMotionGroupState"])==null?void 0:d[c])==null?void 0:h.url;return(p,f)=>J(l,U,F,e)(p,u||f)}}};var kT=class extends Fe{getCurrentMotionGroupState(e,t,r,n,o){return Ya(this.configuration).getCurrentMotionGroupState(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}getMotionGroupDescription(e,t,r,n){return Ya(this.configuration).getMotionGroupDescription(e,t,r,n).then(o=>o(this.axios,this.basePath))}streamMotionGroupState(e,t,r,n,o,s){return Ya(this.configuration).streamMotionGroupState(e,t,r,n,o,s).then(a=>a(this.axios,this.basePath))}};const jT=function(e){return{getMotionGroupCollisionModel:async(t,r={})=>{C("getMotionGroupCollisionModel","motionGroupModel",t);const n="/motion-group-models/{motion-group-model}/collision".replace("{motion-group-model}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},getMotionGroupModels:async(t={})=>{const r=new URL("/motion-group-models",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}}}},td=function(e){const t=jT(e);return{async getMotionGroupCollisionModel(r,n){var i,l;const o=await t.getMotionGroupCollisionModel(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=$["MotionGroupModelsApi.getMotionGroupCollisionModel"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,F,e)(c,a||u)},async getMotionGroupModels(r){var a,i;const n=await t.getMotionGroupModels(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=$["MotionGroupModelsApi.getMotionGroupModels"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,U,F,e)(l,s||c)}}};var DT=class extends Fe{getMotionGroupCollisionModel(e,t){return td(this.configuration).getMotionGroupCollisionModel(e,t).then(r=>r(this.axios,this.basePath))}getMotionGroupModels(e){return td(this.configuration).getMotionGroupModels(e).then(t=>t(this.axios,this.basePath))}};const UT=function(e){return{deleteStoredCollider:async(t,r,n={})=>{C("deleteStoredCollider","cell",t),C("deleteStoredCollider","collider",r);const o="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteStoredCollisionLinkChain:async(t,r,n={})=>{C("deleteStoredCollisionLinkChain","cell",t),C("deleteStoredCollisionLinkChain","linkChain",r);const o="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteStoredCollisionTool:async(t,r,n={})=>{C("deleteStoredCollisionTool","cell",t),C("deleteStoredCollisionTool","tool",r);const o="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getStoredCollider:async(t,r,n={})=>{C("getStoredCollider","cell",t),C("getStoredCollider","collider",r);const o="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getStoredCollisionLinkChain:async(t,r,n={})=>{C("getStoredCollisionLinkChain","cell",t),C("getStoredCollisionLinkChain","linkChain",r);const o="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getStoredCollisionTool:async(t,r,n={})=>{C("getStoredCollisionTool","cell",t),C("getStoredCollisionTool","tool",r);const o="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listCollisionLinkChains:async(t,r={})=>{C("listCollisionLinkChains","cell",t);const n="/cells/{cell}/store/collision/link-chains".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listCollisionLinkChainsKeys:async(t,r={})=>{C("listCollisionLinkChainsKeys","cell",t);const n="/cells/{cell}/store/collision/link-chains-keys".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listStoredColliders:async(t,r={})=>{C("listStoredColliders","cell",t);const n="/cells/{cell}/store/collision/colliders".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listStoredCollidersKeys:async(t,r={})=>{C("listStoredCollidersKeys","cell",t);const n="/cells/{cell}/store/collision/colliders-keys".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listStoredCollisionTools:async(t,r={})=>{C("listStoredCollisionTools","cell",t);const n="/cells/{cell}/store/collision/tools".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listStoredCollisionToolsKeys:async(t,r={})=>{C("listStoredCollisionToolsKeys","cell",t);const n="/cells/{cell}/store/collision/tools-keys".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},storeCollider:async(t,r,n,o={})=>{C("storeCollider","cell",t),C("storeCollider","collider",r),C("storeCollider","collider2",n);const s="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(n,l,e),{url:W(a),options:l}},storeCollisionLinkChain:async(t,r,n,o={})=>{C("storeCollisionLinkChain","cell",t),C("storeCollisionLinkChain","linkChain",r),C("storeCollisionLinkChain","collider",n);const s="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(n,l,e),{url:W(a),options:l}},storeCollisionTool:async(t,r,n,o={})=>{C("storeCollisionTool","cell",t),C("storeCollisionTool","tool",r),C("storeCollisionTool","requestBody",n);const s="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(n,l,e),{url:W(a),options:l}}}},Qe=function(e){const t=UT(e);return{async deleteStoredCollider(r,n,o){var l,c;const s=await t.deleteStoredCollider(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreCollisionComponentsApi.deleteStoredCollider"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async deleteStoredCollisionLinkChain(r,n,o){var l,c;const s=await t.deleteStoredCollisionLinkChain(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreCollisionComponentsApi.deleteStoredCollisionLinkChain"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async deleteStoredCollisionTool(r,n,o){var l,c;const s=await t.deleteStoredCollisionTool(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreCollisionComponentsApi.deleteStoredCollisionTool"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async getStoredCollider(r,n,o){var l,c;const s=await t.getStoredCollider(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreCollisionComponentsApi.getStoredCollider"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async getStoredCollisionLinkChain(r,n,o){var l,c;const s=await t.getStoredCollisionLinkChain(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreCollisionComponentsApi.getStoredCollisionLinkChain"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async getStoredCollisionTool(r,n,o){var l,c;const s=await t.getStoredCollisionTool(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreCollisionComponentsApi.getStoredCollisionTool"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async listCollisionLinkChains(r,n){var i,l;const o=await t.listCollisionLinkChains(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=$["StoreCollisionComponentsApi.listCollisionLinkChains"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,F,e)(c,a||u)},async listCollisionLinkChainsKeys(r,n){var i,l;const o=await t.listCollisionLinkChainsKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=$["StoreCollisionComponentsApi.listCollisionLinkChainsKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,F,e)(c,a||u)},async listStoredColliders(r,n){var i,l;const o=await t.listStoredColliders(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=$["StoreCollisionComponentsApi.listStoredColliders"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,F,e)(c,a||u)},async listStoredCollidersKeys(r,n){var i,l;const o=await t.listStoredCollidersKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=$["StoreCollisionComponentsApi.listStoredCollidersKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,F,e)(c,a||u)},async listStoredCollisionTools(r,n){var i,l;const o=await t.listStoredCollisionTools(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=$["StoreCollisionComponentsApi.listStoredCollisionTools"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,F,e)(c,a||u)},async listStoredCollisionToolsKeys(r,n){var i,l;const o=await t.listStoredCollisionToolsKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=$["StoreCollisionComponentsApi.listStoredCollisionToolsKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,F,e)(c,a||u)},async storeCollider(r,n,o,s){var c,u;const a=await t.storeCollider(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["StoreCollisionComponentsApi.storeCollider"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)},async storeCollisionLinkChain(r,n,o,s){var c,u;const a=await t.storeCollisionLinkChain(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["StoreCollisionComponentsApi.storeCollisionLinkChain"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)},async storeCollisionTool(r,n,o,s){var c,u;const a=await t.storeCollisionTool(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["StoreCollisionComponentsApi.storeCollisionTool"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)}}};var LT=class extends Fe{deleteStoredCollider(e,t,r){return Qe(this.configuration).deleteStoredCollider(e,t,r).then(n=>n(this.axios,this.basePath))}deleteStoredCollisionLinkChain(e,t,r){return Qe(this.configuration).deleteStoredCollisionLinkChain(e,t,r).then(n=>n(this.axios,this.basePath))}deleteStoredCollisionTool(e,t,r){return Qe(this.configuration).deleteStoredCollisionTool(e,t,r).then(n=>n(this.axios,this.basePath))}getStoredCollider(e,t,r){return Qe(this.configuration).getStoredCollider(e,t,r).then(n=>n(this.axios,this.basePath))}getStoredCollisionLinkChain(e,t,r){return Qe(this.configuration).getStoredCollisionLinkChain(e,t,r).then(n=>n(this.axios,this.basePath))}getStoredCollisionTool(e,t,r){return Qe(this.configuration).getStoredCollisionTool(e,t,r).then(n=>n(this.axios,this.basePath))}listCollisionLinkChains(e,t){return Qe(this.configuration).listCollisionLinkChains(e,t).then(r=>r(this.axios,this.basePath))}listCollisionLinkChainsKeys(e,t){return Qe(this.configuration).listCollisionLinkChainsKeys(e,t).then(r=>r(this.axios,this.basePath))}listStoredColliders(e,t){return Qe(this.configuration).listStoredColliders(e,t).then(r=>r(this.axios,this.basePath))}listStoredCollidersKeys(e,t){return Qe(this.configuration).listStoredCollidersKeys(e,t).then(r=>r(this.axios,this.basePath))}listStoredCollisionTools(e,t){return Qe(this.configuration).listStoredCollisionTools(e,t).then(r=>r(this.axios,this.basePath))}listStoredCollisionToolsKeys(e,t){return Qe(this.configuration).listStoredCollisionToolsKeys(e,t).then(r=>r(this.axios,this.basePath))}storeCollider(e,t,r,n){return Qe(this.configuration).storeCollider(e,t,r,n).then(o=>o(this.axios,this.basePath))}storeCollisionLinkChain(e,t,r,n){return Qe(this.configuration).storeCollisionLinkChain(e,t,r,n).then(o=>o(this.axios,this.basePath))}storeCollisionTool(e,t,r,n){return Qe(this.configuration).storeCollisionTool(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const BT=function(e){return{deleteStoredCollisionSetup:async(t,r,n={})=>{C("deleteStoredCollisionSetup","cell",t),C("deleteStoredCollisionSetup","setup",r);const o="/cells/{cell}/store/collision/setups/{setup}".replace("{cell}",encodeURIComponent(String(t))).replace("{setup}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getStoredCollisionSetup:async(t,r,n={})=>{C("getStoredCollisionSetup","cell",t),C("getStoredCollisionSetup","setup",r);const o="/cells/{cell}/store/collision/setups/{setup}".replace("{cell}",encodeURIComponent(String(t))).replace("{setup}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listStoredCollisionSetups:async(t,r={})=>{C("listStoredCollisionSetups","cell",t);const n="/cells/{cell}/store/collision/setups".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listStoredCollisionSetupsKeys:async(t,r={})=>{C("listStoredCollisionSetupsKeys","cell",t);const n="/cells/{cell}/store/collision/setups-keys".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},storeCollisionSetup:async(t,r,n,o={})=>{C("storeCollisionSetup","cell",t),C("storeCollisionSetup","setup",r),C("storeCollisionSetup","collisionSetup",n);const s="/cells/{cell}/store/collision/setups/{setup}".replace("{cell}",encodeURIComponent(String(t))).replace("{setup}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(n,l,e),{url:W(a),options:l}}}},_n=function(e){const t=BT(e);return{async deleteStoredCollisionSetup(r,n,o){var l,c;const s=await t.deleteStoredCollisionSetup(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreCollisionSetupsApi.deleteStoredCollisionSetup"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async getStoredCollisionSetup(r,n,o){var l,c;const s=await t.getStoredCollisionSetup(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreCollisionSetupsApi.getStoredCollisionSetup"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async listStoredCollisionSetups(r,n){var i,l;const o=await t.listStoredCollisionSetups(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=$["StoreCollisionSetupsApi.listStoredCollisionSetups"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,F,e)(c,a||u)},async listStoredCollisionSetupsKeys(r,n){var i,l;const o=await t.listStoredCollisionSetupsKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=$["StoreCollisionSetupsApi.listStoredCollisionSetupsKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,F,e)(c,a||u)},async storeCollisionSetup(r,n,o,s){var c,u;const a=await t.storeCollisionSetup(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["StoreCollisionSetupsApi.storeCollisionSetup"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)}}};var NT=class extends Fe{deleteStoredCollisionSetup(e,t,r){return _n(this.configuration).deleteStoredCollisionSetup(e,t,r).then(n=>n(this.axios,this.basePath))}getStoredCollisionSetup(e,t,r){return _n(this.configuration).getStoredCollisionSetup(e,t,r).then(n=>n(this.axios,this.basePath))}listStoredCollisionSetups(e,t){return _n(this.configuration).listStoredCollisionSetups(e,t).then(r=>r(this.axios,this.basePath))}listStoredCollisionSetupsKeys(e,t){return _n(this.configuration).listStoredCollisionSetupsKeys(e,t).then(r=>r(this.axios,this.basePath))}storeCollisionSetup(e,t,r,n){return _n(this.configuration).storeCollisionSetup(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const FT=function(e){return{clearAllObjects:async(t,r={})=>{C("clearAllObjects","cell",t);const n="/cells/{cell}/store/objects".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"DELETE",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},deleteObject:async(t,r,n={})=>{C("deleteObject","cell",t),C("deleteObject","key",r);const o="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getObject:async(t,r,n={})=>{C("getObject","cell",t),C("getObject","key",r);const o="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getObjectMetadata:async(t,r,n={})=>{C("getObjectMetadata","cell",t),C("getObjectMetadata","key",r);const o="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"HEAD",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listAllObjectKeys:async(t,r={})=>{C("listAllObjectKeys","cell",t);const n="/cells/{cell}/store/objects".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},storeObject:async(t,r,n,o,s={})=>{C("storeObject","cell",t),C("storeObject","key",r);const a="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={},h=new(e&&e.formDataCtor||FormData);G(c,e),await H(u,e),o!==void 0&&h.append("any_value",new Blob([JSON.stringify(o)],{type:"application/json"})),u["Content-Type"]="multipart/form-data",n!=null&&(u["X-Metadata"]=typeof n=="string"?n:JSON.stringify(n)),q(i,d);let p=l&&l.headers?l.headers:{};return c.headers={...u,...p,...s.headers},c.data=h,{url:W(i),options:c}}}},Jr=function(e){const t=FT(e);return{async clearAllObjects(r,n){var i,l;const o=await t.clearAllObjects(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=$["StoreObjectApi.clearAllObjects"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,F,e)(c,a||u)},async deleteObject(r,n,o){var l,c;const s=await t.deleteObject(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreObjectApi.deleteObject"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async getObject(r,n,o){var l,c;const s=await t.getObject(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreObjectApi.getObject"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async getObjectMetadata(r,n,o){var l,c;const s=await t.getObjectMetadata(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["StoreObjectApi.getObjectMetadata"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async listAllObjectKeys(r,n){var i,l;const o=await t.listAllObjectKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=$["StoreObjectApi.listAllObjectKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,F,e)(c,a||u)},async storeObject(r,n,o,s,a){var u,d;const i=await t.storeObject(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["StoreObjectApi.storeObject"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,U,F,e)(h,c||p)}}};var $T=class extends Fe{clearAllObjects(e,t){return Jr(this.configuration).clearAllObjects(e,t).then(r=>r(this.axios,this.basePath))}deleteObject(e,t,r){return Jr(this.configuration).deleteObject(e,t,r).then(n=>n(this.axios,this.basePath))}getObject(e,t,r){return Jr(this.configuration).getObject(e,t,r).then(n=>n(this.axios,this.basePath))}getObjectMetadata(e,t,r){return Jr(this.configuration).getObjectMetadata(e,t,r).then(n=>n(this.axios,this.basePath))}listAllObjectKeys(e,t){return Jr(this.configuration).listAllObjectKeys(e,t).then(r=>r(this.axios,this.basePath))}storeObject(e,t,r,n,o){return Jr(this.configuration).storeObject(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}};const zT=function(e){return{backupConfiguration:async(t,r,n={})=>{const o=new URL("/system/configuration",z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...n},i={},l={};G(a,e),await H(i,e),t&&(l.resources=t.join(Qu.csv)),r!==void 0&&(l.metadata=r),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...n.headers},{url:W(o),options:a}},checkNovaVersionUpdate:async(t,r={})=>{C("checkNovaVersionUpdate","channel",t);const n=new URL("/system/update",z);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},a={},i={};G(s,e),await H(a,e),t!==void 0&&(i.channel=t),q(n,i);let l=o&&o.headers?o.headers:{};return s.headers={...a,...l,...r.headers},{url:W(n),options:s}},getConfigurationBackupStatus:async(t,r={})=>{C("getConfigurationBackupStatus","operationId",t);const n=new URL("/system/configuration/status",z);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},a={},i={};G(s,e),await H(a,e),t!==void 0&&(i.operation_id=t),q(n,i);let l=o&&o.headers?o.headers:{};return s.headers={...a,...l,...r.headers},{url:W(n),options:s}},getDiagnosePackage:async(t={})=>{const r=new URL("/system/diagnosis-package/zip",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}},getSystemStatus:async(t={})=>{const r=new URL("/system/status",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}},getSystemVersion:async(t={})=>{const r=new URL("/system/version",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}},listConfigurationResources:async(t={})=>{const r=new URL("/system/configuration/resources",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}},restoreConfiguration:async(t,r,n={})=>{C("restoreConfiguration","resources",t),C("restoreConfiguration","body",r);const o=new URL("/system/configuration",z);let s;e&&(s=e.baseOptions);const a={method:"POST",...s,...n},i={},l={};G(a,e),await H(i,e),t&&(l.resources=t.join(Qu.csv)),i["Content-Type"]="application/gzip",q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...n.headers},a.data=me(r,a,e),{url:W(o),options:a}},updateNovaVersion:async(t,r={})=>{C("updateNovaVersion","updateNovaVersionRequest",t);const n=new URL("/system/update",z);let o;e&&(o=e.baseOptions);const s={method:"PUT",...o,...r},a={},i={};G(s,e),await H(a,e),a["Content-Type"]="application/json",q(n,i);let l=o&&o.headers?o.headers:{};return s.headers={...a,...l,...r.headers},s.data=me(t,s,e),{url:W(n),options:s}}}},$t=function(e){const t=zT(e);return{async backupConfiguration(r,n,o){var l,c;const s=await t.backupConfiguration(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["SystemApi.backupConfiguration"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async checkNovaVersionUpdate(r,n){var i,l;const o=await t.checkNovaVersionUpdate(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=$["SystemApi.checkNovaVersionUpdate"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,F,e)(c,a||u)},async getConfigurationBackupStatus(r,n){var i,l;const o=await t.getConfigurationBackupStatus(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=$["SystemApi.getConfigurationBackupStatus"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,F,e)(c,a||u)},async getDiagnosePackage(r){var a,i;const n=await t.getDiagnosePackage(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=$["SystemApi.getDiagnosePackage"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,U,F,e)(l,s||c)},async getSystemStatus(r){var a,i;const n=await t.getSystemStatus(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=$["SystemApi.getSystemStatus"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,U,F,e)(l,s||c)},async getSystemVersion(r){var a,i;const n=await t.getSystemVersion(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=$["SystemApi.getSystemVersion"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,U,F,e)(l,s||c)},async listConfigurationResources(r){var a,i;const n=await t.listConfigurationResources(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=$["SystemApi.listConfigurationResources"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,U,F,e)(l,s||c)},async restoreConfiguration(r,n,o){var l,c;const s=await t.restoreConfiguration(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["SystemApi.restoreConfiguration"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async updateNovaVersion(r,n){var i,l;const o=await t.updateNovaVersion(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=$["SystemApi.updateNovaVersion"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,F,e)(c,a||u)}}};var GT=class extends Fe{backupConfiguration(e,t,r){return $t(this.configuration).backupConfiguration(e,t,r).then(n=>n(this.axios,this.basePath))}checkNovaVersionUpdate(e,t){return $t(this.configuration).checkNovaVersionUpdate(e,t).then(r=>r(this.axios,this.basePath))}getConfigurationBackupStatus(e,t){return $t(this.configuration).getConfigurationBackupStatus(e,t).then(r=>r(this.axios,this.basePath))}getDiagnosePackage(e){return $t(this.configuration).getDiagnosePackage(e).then(t=>t(this.axios,this.basePath))}getSystemStatus(e){return $t(this.configuration).getSystemStatus(e).then(t=>t(this.axios,this.basePath))}getSystemVersion(e){return $t(this.configuration).getSystemVersion(e).then(t=>t(this.axios,this.basePath))}listConfigurationResources(e){return $t(this.configuration).listConfigurationResources(e).then(t=>t(this.axios,this.basePath))}restoreConfiguration(e,t,r){return $t(this.configuration).restoreConfiguration(e,t,r).then(n=>n(this.axios,this.basePath))}updateNovaVersion(e,t){return $t(this.configuration).updateNovaVersion(e,t).then(r=>r(this.axios,this.basePath))}};const HT=function(e){return{addTrajectory:async(t,r,n,o={})=>{C("addTrajectory","cell",t),C("addTrajectory","controller",r),C("addTrajectory","addTrajectoryRequest",n);const s="/cells/{cell}/controllers/{controller}/trajectories".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(n,l,e),{url:W(a),options:l}},clearTrajectories:async(t,r,n={})=>{C("clearTrajectories","cell",t),C("clearTrajectories","controller",r);const o="/cells/{cell}/controllers/{controller}/trajectories".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteTrajectory:async(t,r,n,o={})=>{C("deleteTrajectory","cell",t),C("deleteTrajectory","controller",r),C("deleteTrajectory","trajectory",n);const s="/cells/{cell}/controllers/{controller}/trajectories/{trajectory}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{trajectory}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},getTrajectory:async(t,r,n,o={})=>{C("getTrajectory","cell",t),C("getTrajectory","controller",r),C("getTrajectory","trajectory",n);const s="/cells/{cell}/controllers/{controller}/trajectories/{trajectory}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{trajectory}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},listTrajectories:async(t,r,n={})=>{C("listTrajectories","cell",t),C("listTrajectories","controller",r);const o="/cells/{cell}/controllers/{controller}/trajectories".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}}}},Mn=function(e){const t=HT(e);return{async addTrajectory(r,n,o,s){var c,u;const a=await t.addTrajectory(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["TrajectoryCachingApi.addTrajectory"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)},async clearTrajectories(r,n,o){var l,c;const s=await t.clearTrajectories(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["TrajectoryCachingApi.clearTrajectories"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async deleteTrajectory(r,n,o,s){var c,u;const a=await t.deleteTrajectory(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["TrajectoryCachingApi.deleteTrajectory"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)},async getTrajectory(r,n,o,s){var c,u;const a=await t.getTrajectory(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["TrajectoryCachingApi.getTrajectory"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)},async listTrajectories(r,n,o){var l,c;const s=await t.listTrajectories(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["TrajectoryCachingApi.listTrajectories"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)}}};var qT=class extends Fe{addTrajectory(e,t,r,n){return Mn(this.configuration).addTrajectory(e,t,r,n).then(o=>o(this.axios,this.basePath))}clearTrajectories(e,t,r){return Mn(this.configuration).clearTrajectories(e,t,r).then(n=>n(this.axios,this.basePath))}deleteTrajectory(e,t,r,n){return Mn(this.configuration).deleteTrajectory(e,t,r,n).then(o=>o(this.axios,this.basePath))}getTrajectory(e,t,r,n){return Mn(this.configuration).getTrajectory(e,t,r,n).then(o=>o(this.axios,this.basePath))}listTrajectories(e,t,r){return Mn(this.configuration).listTrajectories(e,t,r).then(n=>n(this.axios,this.basePath))}};const WT=function(e){return{executeTrajectory:async(t,r,n,o={})=>{C("executeTrajectory","cell",t),C("executeTrajectory","controller",r),C("executeTrajectory","executeTrajectoryRequest",n);const s="/cells/{cell}/controllers/{controller}/execution/trajectory".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(n,l,e),{url:W(a),options:l}}}},JT=function(e){const t=WT(e);return{async executeTrajectory(r,n,o,s){var c,u;const a=await t.executeTrajectory(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["TrajectoryExecutionApi.executeTrajectory"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)}}};var YT=class extends Fe{executeTrajectory(e,t,r,n){return JT(this.configuration).executeTrajectory(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const KT=function(e){return{planCollisionFree:async(t,r,n={})=>{C("planCollisionFree","cell",t),C("planCollisionFree","planCollisionFreeRequest",r);const o="/cells/{cell}/trajectory-planning/plan-collision-free".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=me(r,i,e),{url:W(s),options:i}},planTrajectory:async(t,r,n={})=>{C("planTrajectory","cell",t),C("planTrajectory","planTrajectoryRequest",r);const o="/cells/{cell}/trajectory-planning/plan-trajectory".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=me(r,i,e),{url:W(s),options:i}}}},rd=function(e){const t=KT(e);return{async planCollisionFree(r,n,o){var l,c;const s=await t.planCollisionFree(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["TrajectoryPlanningApi.planCollisionFree"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async planTrajectory(r,n,o){var l,c;const s=await t.planTrajectory(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["TrajectoryPlanningApi.planTrajectory"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)}}};var XT=class extends Fe{planCollisionFree(e,t,r){return rd(this.configuration).planCollisionFree(e,t,r).then(n=>n(this.axios,this.basePath))}planTrajectory(e,t,r){return rd(this.configuration).planTrajectory(e,t,r).then(n=>n(this.axios,this.basePath))}};const QT=function(e){return{addVirtualControllerCoordinateSystem:async(t,r,n,o,s={})=>{C("addVirtualControllerCoordinateSystem","cell",t),C("addVirtualControllerCoordinateSystem","controller",r),C("addVirtualControllerCoordinateSystem","coordinateSystem",n),C("addVirtualControllerCoordinateSystem","coordinateSystemData",o);const a="/cells/{cell}/virtual-controllers/{controller}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{coordinate-system}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};G(c,e),await H(u,e),u["Content-Type"]="application/json",q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=me(o,c,e),{url:W(i),options:c}},addVirtualControllerTcp:async(t,r,n,o,s,a={})=>{C("addVirtualControllerTcp","cell",t),C("addVirtualControllerTcp","controller",r),C("addVirtualControllerTcp","motionGroup",n),C("addVirtualControllerTcp","tcp",o),C("addVirtualControllerTcp","robotTcpData",s);const i="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/tcps/{tcp}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))).replace("{tcp}",encodeURIComponent(String(o))),l=new URL(i,z);let c;e&&(c=e.baseOptions);const u={method:"PUT",...c,...a},d={},h={};G(u,e),await H(d,e),d["Content-Type"]="application/json",q(l,h);let p=c&&c.headers?c.headers:{};return u.headers={...d,...p,...a.headers},u.data=me(s,u,e),{url:W(l),options:u}},deleteVirtualControllerCoordinateSystem:async(t,r,n,o,s={})=>{C("deleteVirtualControllerCoordinateSystem","cell",t),C("deleteVirtualControllerCoordinateSystem","controller",r),C("deleteVirtualControllerCoordinateSystem","coordinateSystem",n);const a="/cells/{cell}/virtual-controllers/{controller}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{coordinate-system}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...s},u={},d={};G(c,e),await H(u,e),o!==void 0&&(d.delete_dependent=o),q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:W(i),options:c}},deleteVirtualControllerTcp:async(t,r,n,o,s={})=>{C("deleteVirtualControllerTcp","cell",t),C("deleteVirtualControllerTcp","controller",r),C("deleteVirtualControllerTcp","motionGroup",n),C("deleteVirtualControllerTcp","tcp",o);const a="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/tcps/{tcp}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))).replace("{tcp}",encodeURIComponent(String(o))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...s},u={},d={};G(c,e),await H(u,e),q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:W(i),options:c}},getEmergencyStop:async(t,r,n={})=>{C("getEmergencyStop","cell",t),C("getEmergencyStop","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/emergency-stop".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getMotionGroupState:async(t,r,n,o={})=>{C("getMotionGroupState","cell",t),C("getMotionGroupState","controller",r),C("getMotionGroupState","motionGroup",n);const s="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},getMotionGroups:async(t,r,n={})=>{C("getMotionGroups","cell",t),C("getMotionGroups","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/motion-groups".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getOperationMode:async(t,r,n={})=>{C("getOperationMode","cell",t),C("getOperationMode","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/operationmode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getVirtualControllerMounting:async(t,r,n,o={})=>{C("getVirtualControllerMounting","cell",t),C("getVirtualControllerMounting","controller",r),C("getVirtualControllerMounting","motionGroup",n);const s="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},listVirtualControllerCoordinateSystems:async(t,r,n={})=>{C("listVirtualControllerCoordinateSystems","cell",t),C("listVirtualControllerCoordinateSystems","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listVirtualControllerTcps:async(t,r,n,o={})=>{C("listVirtualControllerTcps","cell",t),C("listVirtualControllerTcps","controller",r),C("listVirtualControllerTcps","motionGroup",n);const s="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/tcps".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},setEmergencyStop:async(t,r,n,o={})=>{C("setEmergencyStop","cell",t),C("setEmergencyStop","controller",r);const s="/cells/{cell}/virtual-controllers/{controller}/emergency-stop".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.active=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},setMotionGroupState:async(t,r,n,o,s={})=>{C("setMotionGroupState","cell",t),C("setMotionGroupState","controller",r),C("setMotionGroupState","motionGroup",n),C("setMotionGroupState","motionGroupJoints",o);const a="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};G(c,e),await H(u,e),u["Content-Type"]="application/json",q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=me(o,c,e),{url:W(i),options:c}},setOperationMode:async(t,r,n,o={})=>{C("setOperationMode","cell",t),C("setOperationMode","controller",r),C("setOperationMode","mode",n);const s="/cells/{cell}/virtual-controllers/{controller}/operationmode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.mode=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},setVirtualControllerMounting:async(t,r,n,o,s={})=>{C("setVirtualControllerMounting","cell",t),C("setVirtualControllerMounting","controller",r),C("setVirtualControllerMounting","motionGroup",n),C("setVirtualControllerMounting","coordinateSystem",o);const a="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};G(c,e),await H(u,e),u["Content-Type"]="application/json",q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=me(o,c,e),{url:W(i),options:c}}}},Ze=function(e){const t=QT(e);return{async addVirtualControllerCoordinateSystem(r,n,o,s,a){var u,d;const i=await t.addVirtualControllerCoordinateSystem(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["VirtualControllerApi.addVirtualControllerCoordinateSystem"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,U,F,e)(h,c||p)},async addVirtualControllerTcp(r,n,o,s,a,i){var d,h;const l=await t.addVirtualControllerTcp(r,n,o,s,a,i),c=(e==null?void 0:e.serverIndex)??0,u=(h=(d=$["VirtualControllerApi.addVirtualControllerTcp"])==null?void 0:d[c])==null?void 0:h.url;return(p,f)=>J(l,U,F,e)(p,u||f)},async deleteVirtualControllerCoordinateSystem(r,n,o,s,a){var u,d;const i=await t.deleteVirtualControllerCoordinateSystem(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["VirtualControllerApi.deleteVirtualControllerCoordinateSystem"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,U,F,e)(h,c||p)},async deleteVirtualControllerTcp(r,n,o,s,a){var u,d;const i=await t.deleteVirtualControllerTcp(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["VirtualControllerApi.deleteVirtualControllerTcp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,U,F,e)(h,c||p)},async getEmergencyStop(r,n,o){var l,c;const s=await t.getEmergencyStop(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["VirtualControllerApi.getEmergencyStop"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async getMotionGroupState(r,n,o,s){var c,u;const a=await t.getMotionGroupState(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["VirtualControllerApi.getMotionGroupState"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)},async getMotionGroups(r,n,o){var l,c;const s=await t.getMotionGroups(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["VirtualControllerApi.getMotionGroups"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async getOperationMode(r,n,o){var l,c;const s=await t.getOperationMode(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["VirtualControllerApi.getOperationMode"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async getVirtualControllerMounting(r,n,o,s){var c,u;const a=await t.getVirtualControllerMounting(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["VirtualControllerApi.getVirtualControllerMounting"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)},async listVirtualControllerCoordinateSystems(r,n,o){var l,c;const s=await t.listVirtualControllerCoordinateSystems(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["VirtualControllerApi.listVirtualControllerCoordinateSystems"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async listVirtualControllerTcps(r,n,o,s){var c,u;const a=await t.listVirtualControllerTcps(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["VirtualControllerApi.listVirtualControllerTcps"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)},async setEmergencyStop(r,n,o,s){var c,u;const a=await t.setEmergencyStop(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["VirtualControllerApi.setEmergencyStop"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)},async setMotionGroupState(r,n,o,s,a){var u,d;const i=await t.setMotionGroupState(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["VirtualControllerApi.setMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,U,F,e)(h,c||p)},async setOperationMode(r,n,o,s){var c,u;const a=await t.setOperationMode(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["VirtualControllerApi.setOperationMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)},async setVirtualControllerMounting(r,n,o,s,a){var u,d;const i=await t.setVirtualControllerMounting(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=$["VirtualControllerApi.setVirtualControllerMounting"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,U,F,e)(h,c||p)}}};var ZT=class extends Fe{addVirtualControllerCoordinateSystem(e,t,r,n,o){return Ze(this.configuration).addVirtualControllerCoordinateSystem(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}addVirtualControllerTcp(e,t,r,n,o,s){return Ze(this.configuration).addVirtualControllerTcp(e,t,r,n,o,s).then(a=>a(this.axios,this.basePath))}deleteVirtualControllerCoordinateSystem(e,t,r,n,o){return Ze(this.configuration).deleteVirtualControllerCoordinateSystem(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}deleteVirtualControllerTcp(e,t,r,n,o){return Ze(this.configuration).deleteVirtualControllerTcp(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}getEmergencyStop(e,t,r){return Ze(this.configuration).getEmergencyStop(e,t,r).then(n=>n(this.axios,this.basePath))}getMotionGroupState(e,t,r,n){return Ze(this.configuration).getMotionGroupState(e,t,r,n).then(o=>o(this.axios,this.basePath))}getMotionGroups(e,t,r){return Ze(this.configuration).getMotionGroups(e,t,r).then(n=>n(this.axios,this.basePath))}getOperationMode(e,t,r){return Ze(this.configuration).getOperationMode(e,t,r).then(n=>n(this.axios,this.basePath))}getVirtualControllerMounting(e,t,r,n){return Ze(this.configuration).getVirtualControllerMounting(e,t,r,n).then(o=>o(this.axios,this.basePath))}listVirtualControllerCoordinateSystems(e,t,r){return Ze(this.configuration).listVirtualControllerCoordinateSystems(e,t,r).then(n=>n(this.axios,this.basePath))}listVirtualControllerTcps(e,t,r,n){return Ze(this.configuration).listVirtualControllerTcps(e,t,r,n).then(o=>o(this.axios,this.basePath))}setEmergencyStop(e,t,r,n){return Ze(this.configuration).setEmergencyStop(e,t,r,n).then(o=>o(this.axios,this.basePath))}setMotionGroupState(e,t,r,n,o){return Ze(this.configuration).setMotionGroupState(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}setOperationMode(e,t,r,n){return Ze(this.configuration).setOperationMode(e,t,r,n).then(o=>o(this.axios,this.basePath))}setVirtualControllerMounting(e,t,r,n,o){return Ze(this.configuration).setVirtualControllerMounting(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}};const e2=function(e){return{externalJointsStream:async(t,r,n,o={})=>{C("externalJointsStream","cell",t),C("externalJointsStream","controller",r),C("externalJointsStream","externalJointStreamRequest",n);const s="/cells/{cell}/virtual-controllers/{controller}/external-joints-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(n,l,e),{url:W(a),options:l}},getCycleTime:async(t,r,n={})=>{C("getCycleTime","cell",t),C("getCycleTime","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/cycle-time".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getVirtualControllerBehavior:async(t,r,n={})=>{C("getVirtualControllerBehavior","cell",t),C("getVirtualControllerBehavior","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/behavior".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},setVirtualControllerBehavior:async(t,r,n,o={})=>{C("setVirtualControllerBehavior","cell",t),C("setVirtualControllerBehavior","controller",r);const s="/cells/{cell}/virtual-controllers/{controller}/behavior".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.behavior=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}}}},jo=function(e){const t=e2(e);return{async externalJointsStream(r,n,o,s){var c,u;const a=await t.externalJointsStream(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["VirtualControllerBehaviorApi.externalJointsStream"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)},async getCycleTime(r,n,o){var l,c;const s=await t.getCycleTime(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["VirtualControllerBehaviorApi.getCycleTime"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async getVirtualControllerBehavior(r,n,o){var l,c;const s=await t.getVirtualControllerBehavior(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=$["VirtualControllerBehaviorApi.getVirtualControllerBehavior"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,F,e)(u,i||d)},async setVirtualControllerBehavior(r,n,o,s){var c,u;const a=await t.setVirtualControllerBehavior(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["VirtualControllerBehaviorApi.setVirtualControllerBehavior"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)}}};var t2=class extends Fe{externalJointsStream(e,t,r,n){return jo(this.configuration).externalJointsStream(e,t,r,n).then(o=>o(this.axios,this.basePath))}getCycleTime(e,t,r){return jo(this.configuration).getCycleTime(e,t,r).then(n=>n(this.axios,this.basePath))}getVirtualControllerBehavior(e,t,r){return jo(this.configuration).getVirtualControllerBehavior(e,t,r).then(n=>n(this.axios,this.basePath))}setVirtualControllerBehavior(e,t,r,n){return jo(this.configuration).setVirtualControllerBehavior(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const r2=function(e){return{listIOs:async(t,r,n,o={})=>{C("listIOs","cell",t),C("listIOs","controller",r),C("listIOs","ios",n);const s="/cells/{cell}/virtual-controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),n&&(u.ios=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},listVirtualControllerIODescriptions:async(t,r,n,o,s,a,i={})=>{C("listVirtualControllerIODescriptions","cell",t),C("listVirtualControllerIODescriptions","controller",r);const l="/cells/{cell}/virtual-controllers/{controller}/ios/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),c=new URL(l,z);let u;e&&(u=e.baseOptions);const d={method:"GET",...u,...i},h={},p={};G(d,e),await H(h,e),n&&(p.ios=n),o!==void 0&&(p.direction=o),s!==void 0&&(p.value_type=s),a!==void 0&&(p.group=a),q(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:W(c),options:d}},setIOValues:async(t,r,n,o={})=>{C("setIOValues","cell",t),C("setIOValues","controller",r),C("setIOValues","iOValue",n);const s="/cells/{cell}/virtual-controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(n,l,e),{url:W(a),options:l}}}},Ka=function(e){const t=r2(e);return{async listIOs(r,n,o,s){var c,u;const a=await t.listIOs(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["VirtualControllerInputsOutputsApi.listIOs"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)},async listVirtualControllerIODescriptions(r,n,o,s,a,i,l){var h,p;const c=await t.listVirtualControllerIODescriptions(r,n,o,s,a,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=$["VirtualControllerInputsOutputsApi.listVirtualControllerIODescriptions"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>J(c,U,F,e)(f,d||m)},async setIOValues(r,n,o,s){var c,u;const a=await t.setIOValues(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=$["VirtualControllerInputsOutputsApi.setIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,F,e)(d,l||h)}}};var n2=class extends Fe{listIOs(e,t,r,n){return Ka(this.configuration).listIOs(e,t,r,n).then(o=>o(this.axios,this.basePath))}listVirtualControllerIODescriptions(e,t,r,n,o,s,a){return Ka(this.configuration).listVirtualControllerIODescriptions(e,t,r,n,o,s,a).then(i=>i(this.axios,this.basePath))}setIOValues(e,t,r,n){return Ka(this.configuration).setIOValues(e,t,r,n).then(o=>o(this.axios,this.basePath))}},o2=class{constructor(e,t){this.cellId=e,this.opts=t,this.system=this.withUnwrappedResponsesOnly(GT),this.cell=this.withUnwrappedResponsesOnly(wT),this.motionGroup=this.withCellId(kT),this.motionGroupModels=this.withCellId(DT),this.controller=this.withCellId(TT),this.controllerIOs=this.withCellId(IT),this.trajectoryPlanning=this.withCellId(XT),this.trajectoryExecution=this.withCellId(YT),this.trajectoryCaching=this.withCellId(qT),this.application=this.withCellId(Zu),this.applicationGlobal=this.withUnwrappedResponsesOnly(Zu),this.jogging=this.withCellId(PT),this.kinematics=this.withCellId(MT),this.busInputsOutputs=this.withCellId(vT),this.virtualController=this.withCellId(ZT),this.virtualControllerBehavior=this.withCellId(t2),this.virtualControllerIOs=this.withCellId(n2),this.storeObject=this.withCellId($T),this.storeCollisionComponents=this.withCellId(LT),this.storeCollisionSetups=this.withCellId(NT)}withCellId(e){const t=new e({...this.opts,isJsonMime:r=>r==="application/json"},this.opts.basePath??"",this.opts.axiosInstance??U.create());for(const r of Reflect.ownKeys(Reflect.getPrototypeOf(t)))if(r!=="constructor"&&typeof t[r]=="function"){const n=t[r];t[r]=(...o)=>n.apply(t,[this.cellId,...o]).then(s=>s.data)}return t}withUnwrappedResponsesOnly(e){const t=new e({...this.opts,isJsonMime:r=>r==="application/json"},this.opts.basePath??"",this.opts.axiosInstance??U.create());for(const r of Reflect.ownKeys(Reflect.getPrototypeOf(t)))if(r!=="constructor"&&typeof t[r]=="function"){const n=t[r];t[r]=(...o)=>n.apply(t,o).then(s=>s.data)}return t}},s2=class{constructor(){this.connections=[]}async handleAPIRequest(e){var o,s,a;const t=[{method:"GET",path:"/cells/:cellId/controllers/:controllerId/state",handle(){return{mode:"MODE_CONTROL",last_error:[],timestamp:"2025-10-16T09:19:26.634534092Z",sequence_number:1054764,controller:"mock-ur5e",operation_mode:"OPERATION_MODE_AUTO",safety_state:"SAFETY_STATE_NORMAL",velocity_override:100,motion_groups:[{timestamp:"2025-10-16T09:19:26.634534092Z",sequence_number:1054764,motion_group:"0@mock-ur5e",controller:"mock-ur5e",joint_position:[1.487959623336792,-1.8501918315887451,1.8003005981445312,6.034560203552246,1.4921919107437134,1.593459963798523],joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},joint_torque:[],joint_current:[0,0,0,0,0,0],flange_pose:{position:[107.6452433732927,-409.0402987746852,524.2402132330305],orientation:[.9874434028353319,-.986571714997442,1.3336589451098142]},tcp:"Flange",tcp_pose:{position:[107.6452433732927,-409.0402987746852,524.2402132330305],orientation:[.9874434028353319,-.986571714997442,1.3336589451098142]},payload:"",coordinate_system:"",standstill:!0}]}}},{method:"GET",path:"/cells/:cellId/controllers/:controllerId/coordinate-systems",handle(){return[{coordinate_system:"",name:"world",reference_coordinate_system:"",position:[0,0,0],orientation:[0,0,0],orientation_type:"ROTATION_VECTOR"},{coordinate_system:"CS-0",name:"Default-CS",reference_coordinate_system:"",position:[0,0,0],orientation:[0,0,0],orientation_type:"ROTATION_VECTOR"}]}},{method:"GET",path:"/cells/:cellId/controllers/:controllerId/motion-groups/:motionGroupId/description",handle(){return{motion_group_model:"UniversalRobots_UR5e",mounting:{position:[0,0,0],orientation:[0,0,0]},tcps:{Flange:{name:"Default-Flange",pose:{position:[0,0,0],orientation:[0,0,0]}},"complex-tcp-position":{name:"Complex TCP Position",pose:{position:[-200,300,150],orientation:[-.12139440409113832,-.06356210998212003,-.2023240068185639]}},"offset-150mm-xy":{name:"-150mm XY Offset",pose:{position:[-150,-150,0],orientation:[0,0,0]}},"rotated-90deg-z":{name:"90° Z Axis Rotation",pose:{position:[0,0,0],orientation:[0,0,1.5708]}}},payloads:{"FPay-0":{name:"FPay-0",payload:0,center_of_mass:[0,0,0],moment_of_inertia:[0,0,0]}},cycle_time:8,dh_parameters:[{alpha:1.5707963267948966,d:162.25},{a:-425},{a:-392.2},{alpha:1.5707963267948966,d:133.3},{alpha:-1.5707963267948966,d:99.7},{d:99.6}],operation_limits:{auto_limits:{joints:[{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28}],tcp:{velocity:5e3},elbow:{velocity:5e3},flange:{velocity:5e3}},manual_limits:{joints:[{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28}],tcp:{velocity:5e3}},manual_t1_limits:{joints:[{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28}],tcp:{velocity:5e3}},manual_t2_limits:{joints:[{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28}],tcp:{velocity:5e3}}},serial_number:"WBVirtualRobot"}}},{method:"GET",path:"/cells/:cellId/controllers",handle(){return{controllers:[{controller:"mock-ur5e",model_name:"UniversalRobots::Controller",host:"mock-ur5e",allow_software_install_on_controller:!0,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",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:[{vertex:[-800,-1330,-1820]},{vertex:[1650,-1330,-1820]},{vertex:[1650,1330,-1820]},{vertex:[-800,1330,-1820]}]},init_pose:{position:[0,0,0],orientation:[0,0,0,1]},id:"box"},{convex_hull:{vertices:[{vertex:[-800,-1330,-1820]},{vertex:[1650,-1330,-1820]},{vertex:[1650,-1330,1500]},{vertex:[-800,-1330,1500]}]},init_pose:{position:[0,0,0],orientation:[0,0,0,1]},id:"box"},{convex_hull:{vertices:[{vertex:[-800,-1330,-1820]},{vertex:[-800,1330,-1820]},{vertex:[-800,1330,1500]},{vertex:[-800,-1330,1500]}]},init_pose:{position:[0,0,0],orientation:[0,0,0,1]},id:"box"},{convex_hull:{vertices:[{vertex:[1650,1330,1500]},{vertex:[-800,1330,1500]},{vertex:[-800,-1330,1500]},{vertex:[1650,-1330,1500]}]},init_pose:{position:[0,0,0],orientation:[0,0,0,1]},id:"box"},{convex_hull:{vertices:[{vertex:[1650,1330,1500]},{vertex:[-800,1330,1500]},{vertex:[-800,1330,-1820]},{vertex:[1650,1330,-1820]}]},init_pose:{position:[0,0,0],orientation:[0,0,0,1]},id:"box"},{convex_hull:{vertices:[{vertex:[1650,1330,1500]},{vertex:[1650,-1330,1500]},{vertex:[1650,-1330,-1820]},{vertex:[1650,1330,-1820]}]},init_pose:{position:[0,0,0],orientation:[0,0,0,1]},id:"box"}]},init_pose:{position:[0,0,0],orientation:[0,0,0,1]},id:"Cell workzone"},motion_group_uid:1},{id:2,priority:0,geometry:{convex_hull:{vertices:[{vertex:[1650,1330,-1850]},{vertex:[865,1330,-1850]},{vertex:[865,-720,-1850]},{vertex:[1650,-720,-1850]},{vertex:[1650,1330,-920]},{vertex:[865,1330,-920]},{vertex:[865,-720,-920]},{vertex:[1650,-720,-920]}]},init_pose:{position:[0,0,0],orientation:[0,0,0,1]},id:"Transport"},motion_group_uid:1},{id:3,priority:0,geometry:{convex_hull:{vertices:[{vertex:[1650,1330,-600]},{vertex:[865,1330,-600]},{vertex:[865,430,-600]},{vertex:[1650,430,-600]},{vertex:[1650,1330,-1250]},{vertex:[865,1330,-1250]},{vertex:[865,430,-1250]},{vertex:[1650,430,-1250]}]},init_pose:{position:[0,0,0],orientation:[0,0,0,1]},id:"Tunel"},motion_group_uid:1},{id:4,priority:0,geometry:{convex_hull:{vertices:[{vertex:[1650,-760,-440]},{vertex:[900,-760,-440]},{vertex:[900,-1330,-440]},{vertex:[1650,-1330,-440]},{vertex:[1650,-760,-1800]},{vertex:[900,-760,-1800]},{vertex:[900,-1330,-1800]},{vertex:[1650,-1330,-1800]}]},init_pose:{position:[0,0,0],orientation:[0,0,0,1]},id:"Fanuc controller"},motion_group_uid:1},{id:6,priority:0,geometry:{convex_hull:{vertices:[{vertex:[-200,-200,-1900]},{vertex:[200,-200,-1900]},{vertex:[200,200,-1900]},{vertex:[-200,200,-1900]},{vertex:[-200,-200,-350]},{vertex:[200,-200,-350]},{vertex:[200,200,-350]},{vertex:[-200,200,-350]}]},init_pose:{position:[0,0,0],orientation:[0,0,0,1]},id:"Robot base"},motion_group_uid:1}],robot_model_geometries:[{link_index:1,geometry:{sphere:{radius:270},init_pose:{position:[-70,-70,-50],orientation:[0,0,0,1]},id:"link1_sphere"}},{link_index:2,geometry:{capsule:{radius:160,cylinder_height:800},init_pose:{position:[-450,40,170],orientation:[0,-Math.SQRT1_2,0,Math.SQRT1_2]},id:"link2_capsule"}},{link_index:3,geometry:{sphere:{radius:270},init_pose:{position:[-110,10,-100],orientation:[0,0,0,1]},id:"link3_sphere"}},{link_index:4,geometry:{capsule:{radius:110,cylinder_height:600},init_pose:{position:[0,300,40],orientation:[-Math.SQRT1_2,0,0,Math.SQRT1_2]},id:"link4_capsule"}},{link_index:5,geometry:{sphere:{radius:75},init_pose:{position:[0,0,-50],orientation:[0,0,0,1]},id:"link5_sphere"}}],tool_geometries:[]}}},{method:"GET",path:"/cells/:cellId/motion-groups/:motionGroupId/tcps",handle(){return{tcps:[{id:"Flange",readable_name:"Default-Flange",position:[0,0,0],rotation:{angles:[0,0,0,0],type:"ROTATION_VECTOR"}},{id:"complex-tcp-position",readable_name:"Complex TCP Position",position:[-200,300,150],rotation:{angles:[-.12139440409113832,-.06356210998212003,-.2023240068185639,0],type:"ROTATION_VECTOR"}}]}}}],r=((o=e.method)==null?void 0:o.toUpperCase())||"GET",n=`/cells${(a=(s=e.url)==null?void 0:s.split("/cells")[1])==null?void 0:a.split("?")[0]}`;for(const i of t){const l=fT.match(i.path)(n||"");if(r===i.method&&l){const c=i.handle();return{status:200,statusText:"Success",data:JSON.stringify(c),headers:{},config:e,request:{responseURL:e.url}}}}throw new Ti(`No mock handler matched this request: ${r} ${n}`,"404",e)}handleWebsocketConnection(e){this.connections.push(e),setTimeout(()=>{e.dispatchEvent(new Event("open")),console.log("Websocket connection opened from",e.url),e.url.includes("/state-stream")&&e.dispatchEvent(new MessageEvent("message",{data:JSON.stringify(a2)})),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:[1.3492152690887451,-1.5659207105636597,1.6653711795806885,-1.0991662740707397,-1.829018235206604,1.264623761177063],joint_velocity:{joints:[0,0,0,0,0,0]},flange_pose:{position:[6.437331889439328,-628.4123774830913,577.0569957147832],orientation:{x:-1.683333649797158,y:-1.9783363827298732,z:-.4928031860165713},coordinate_system:""},tcp_pose:{position:[6.437331889439328,-628.4123774830913,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:[-2.763015284002938,-630.2151479701106,577.524509114342],orientation:{x:-1.704794877102097,y:-1.9722372952861567,z:-.4852079204210754},coordinate_system:""},tcp_pose:{position:[-2.763015284002938,-630.2151479701106,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)}};const a2={result:{motion_group:"0@universalrobots-ur5e",controller:"universalrobots-ur5e",timestamp:new Date().toISOString(),sequence_number:1,joint_position:[1.1699999570846558,-1.5700000524520874,1.3600000143051147,1.0299999713897705,1.2899999618530273,1.2799999713897705],joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},standstill:!1,flange_pose:{position:[1.3300010259703043,-409.2680714682808,531.0203477065281],orientation:[1.7564919306270736,-1.7542521568325058,.7326972590614671]},tcp_pose:{position:[1.3300010259703043,-409.2680714682808,531.0203477065281],orientation:[1.7564919306270736,-1.7542521568325058,.7326972590614671]}}};function i2(e){return e.startsWith("http")||(e=`http://${e}`),new URL(e).toString()}var l2=class{constructor(e){this.authPromise=null,this.accessToken=null;const t=e.cellId??"cell";this.config={cellId:t,...e},this.accessToken=e.accessToken||za.getString("wbjs.access_token")||null,this.config.instanceUrl==="https://mock.example.com"?this.mock=new s2:this.config.instanceUrl=i2(this.config.instanceUrl);const r=U.create({baseURL:Ja(this.config.instanceUrl,"/api/v2"),headers:typeof window<"u"&&window.location.origin.includes("localhost")?{}:{"X-Wandelbots-Client":"Wandelbots-Nova-JS-SDK"}});r.interceptors.request.use(async n=>(n.headers.Authorization||(this.accessToken?n.headers.Authorization=`Bearer ${this.accessToken}`:this.config.username&&this.config.password&&(n.headers.Authorization=`Basic ${btoa(`${e.username}:${e.password}`)}`)),n)),typeof window<"u"&&r.interceptors.response.use(n=>n,async n=>{var o,s;if(dT(n))if(((o=n.response)==null?void 0:o.status)===401)try{if(await this.renewAuthentication(),n.config)return this.accessToken?n.config.headers.Authorization=`Bearer ${this.accessToken}`:delete n.config.headers.Authorization,r.request(n.config)}catch(a){return Promise.reject(a)}else((s=n.response)==null?void 0:s.status)===503&&(await fetch(window.location.href)).status===503&&window.location.reload();return Promise.reject(n)}),this.api=new o2(t,{...e,basePath:Ja(this.config.instanceUrl,"/api/v2"),isJsonMime:n=>n==="application/json",baseOptions:{...this.mock?{adapter:n=>this.mock.handleAPIRequest(n)}:{},...e.baseOptions},axiosInstance:r})}async renewAuthentication(){if(!this.authPromise){this.authPromise=jw(this.config.instanceUrl);try{this.accessToken=await this.authPromise,this.accessToken?za.setString("wbjs.access_token",this.accessToken):za.delete("wbjs.access_token")}finally{this.authPromise=null}}}makeWebsocketURL(e){const t=new URL(Ja(this.config.instanceUrl,`/api/v2/cells/${this.config.cellId}`,e));return t.protocol=t.protocol.replace("http","ws"),t.protocol=t.protocol.replace("https","wss"),this.accessToken?t.searchParams.append("token",this.accessToken):this.config.username&&this.config.password&&(t.username=this.config.username,t.password=this.config.password),t.toString()}openReconnectingWebsocket(e){return new Mw(this.makeWebsocketURL(e),{mock:this.mock})}};function c2(e){var s,a,i,l,c,u;const t=[((s=e.position)==null?void 0:s[0])??0,((a=e.position)==null?void 0:a[1])??0,((i=e.position)==null?void 0:i[2])??0],r=[((l=e.orientation)==null?void 0:l[0])??0,((c=e.orientation)==null?void 0:c[1])??0,((u=e.orientation)==null?void 0:u[2])??0],n=t.map(d=>d.toFixed(1)),o=r.map(d=>d.toFixed(4));return`(${n.concat(o).join(", ")})`}function zt(e,t,r){return Math.max(t,Math.min(r,e))}class u2{constructor(t=0,r=0,n=0,o=1){this.isQuaternion=!0,this._x=t,this._y=r,this._z=n,this._w=o}static slerpFlat(t,r,n,o,s,a,i){let l=n[o+0],c=n[o+1],u=n[o+2],d=n[o+3];const h=s[a+0],p=s[a+1],f=s[a+2],m=s[a+3];if(i===0){t[r+0]=l,t[r+1]=c,t[r+2]=u,t[r+3]=d;return}if(i===1){t[r+0]=h,t[r+1]=p,t[r+2]=f,t[r+3]=m;return}if(d!==m||l!==h||c!==p||u!==f){let b=1-i;const S=l*h+c*p+u*f+d*m,R=S>=0?1:-1,v=1-S*S;if(v>Number.EPSILON){const I=Math.sqrt(v),T=Math.atan2(I,S*R);b=Math.sin(b*T)/I,i=Math.sin(i*T)/I}const O=i*R;if(l=l*b+h*O,c=c*b+p*O,u=u*b+f*O,d=d*b+m*O,b===1-i){const I=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=I,c*=I,u*=I,d*=I}}t[r]=l,t[r+1]=c,t[r+2]=u,t[r+3]=d}static multiplyQuaternionsFlat(t,r,n,o,s,a){const i=n[o],l=n[o+1],c=n[o+2],u=n[o+3],d=s[a],h=s[a+1],p=s[a+2],f=s[a+3];return t[r]=i*f+u*d+l*p-c*h,t[r+1]=l*f+u*h+c*d-i*p,t[r+2]=c*f+u*p+i*h-l*d,t[r+3]=u*f-i*d-l*h-c*p,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,r,n,o){return this._x=t,this._y=r,this._z=n,this._w=o,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,r=!0){const n=t._x,o=t._y,s=t._z,a=t._order,i=Math.cos,l=Math.sin,c=i(n/2),u=i(o/2),d=i(s/2),h=l(n/2),p=l(o/2),f=l(s/2);switch(a){case"XYZ":this._x=h*u*d+c*p*f,this._y=c*p*d-h*u*f,this._z=c*u*f+h*p*d,this._w=c*u*d-h*p*f;break;case"YXZ":this._x=h*u*d+c*p*f,this._y=c*p*d-h*u*f,this._z=c*u*f-h*p*d,this._w=c*u*d+h*p*f;break;case"ZXY":this._x=h*u*d-c*p*f,this._y=c*p*d+h*u*f,this._z=c*u*f+h*p*d,this._w=c*u*d-h*p*f;break;case"ZYX":this._x=h*u*d-c*p*f,this._y=c*p*d+h*u*f,this._z=c*u*f-h*p*d,this._w=c*u*d+h*p*f;break;case"YZX":this._x=h*u*d+c*p*f,this._y=c*p*d+h*u*f,this._z=c*u*f-h*p*d,this._w=c*u*d-h*p*f;break;case"XZY":this._x=h*u*d-c*p*f,this._y=c*p*d-h*u*f,this._z=c*u*f+h*p*d,this._w=c*u*d+h*p*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return r===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,r){const n=r/2,o=Math.sin(n);return this._x=t.x*o,this._y=t.y*o,this._z=t.z*o,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){const r=t.elements,n=r[0],o=r[4],s=r[8],a=r[1],i=r[5],l=r[9],c=r[2],u=r[6],d=r[10],h=n+i+d;if(h>0){const p=.5/Math.sqrt(h+1);this._w=.25/p,this._x=(u-l)*p,this._y=(s-c)*p,this._z=(a-o)*p}else if(n>i&&n>d){const p=2*Math.sqrt(1+n-i-d);this._w=(u-l)/p,this._x=.25*p,this._y=(o+a)/p,this._z=(s+c)/p}else if(i>d){const p=2*Math.sqrt(1+i-n-d);this._w=(s-c)/p,this._x=(o+a)/p,this._y=.25*p,this._z=(l+u)/p}else{const p=2*Math.sqrt(1+d-n-i);this._w=(a-o)/p,this._x=(s+c)/p,this._y=(l+u)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(t,r){let n=t.dot(r)+1;return n<Number.EPSILON?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*r.z-t.z*r.y,this._y=t.z*r.x-t.x*r.z,this._z=t.x*r.y-t.y*r.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(zt(this.dot(t),-1,1)))}rotateTowards(t,r){const n=this.angleTo(t);if(n===0)return this;const o=Math.min(1,r/n);return this.slerp(t,o),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,r){const n=t._x,o=t._y,s=t._z,a=t._w,i=r._x,l=r._y,c=r._z,u=r._w;return this._x=n*u+a*i+o*c-s*l,this._y=o*u+a*l+s*i-n*c,this._z=s*u+a*c+n*l-o*i,this._w=a*u-n*i-o*l-s*c,this._onChangeCallback(),this}slerp(t,r){if(r===0)return this;if(r===1)return this.copy(t);const n=this._x,o=this._y,s=this._z,a=this._w;let i=a*t._w+n*t._x+o*t._y+s*t._z;if(i<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,i=-i):this.copy(t),i>=1)return this._w=a,this._x=n,this._y=o,this._z=s,this;const l=1-i*i;if(l<=Number.EPSILON){const p=1-r;return this._w=p*a+r*this._w,this._x=p*n+r*this._x,this._y=p*o+r*this._y,this._z=p*s+r*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,i),d=Math.sin((1-r)*u)/c,h=Math.sin(r*u)/c;return this._w=a*d+this._w*h,this._x=n*d+this._x*h,this._y=o*d+this._y*h,this._z=s*d+this._z*h,this._onChangeCallback(),this}slerpQuaternions(t,r,n){return this.copy(t).slerp(r,n)}random(){const t=2*Math.PI*Math.random(),r=2*Math.PI*Math.random(),n=Math.random(),o=Math.sqrt(1-n),s=Math.sqrt(n);return this.set(o*Math.sin(t),o*Math.cos(t),s*Math.sin(r),s*Math.cos(r))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,r=0){return this._x=t[r],this._y=t[r+1],this._z=t[r+2],this._w=t[r+3],this._onChangeCallback(),this}toArray(t=[],r=0){return t[r]=this._x,t[r+1]=this._y,t[r+2]=this._z,t[r+3]=this._w,t}fromBufferAttribute(t,r){return this._x=t.getX(r),this._y=t.getY(r),this._z=t.getZ(r),this._w=t.getW(r),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class rn{constructor(t=0,r=0,n=0){rn.prototype.isVector3=!0,this.x=t,this.y=r,this.z=n}set(t,r,n){return n===void 0&&(n=this.z),this.x=t,this.y=r,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,r){switch(t){case 0:this.x=r;break;case 1:this.y=r;break;case 2:this.z=r;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,r){return this.x=t.x+r.x,this.y=t.y+r.y,this.z=t.z+r.z,this}addScaledVector(t,r){return this.x+=t.x*r,this.y+=t.y*r,this.z+=t.z*r,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,r){return this.x=t.x-r.x,this.y=t.y-r.y,this.z=t.z-r.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,r){return this.x=t.x*r.x,this.y=t.y*r.y,this.z=t.z*r.z,this}applyEuler(t){return this.applyQuaternion(nd.setFromEuler(t))}applyAxisAngle(t,r){return this.applyQuaternion(nd.setFromAxisAngle(t,r))}applyMatrix3(t){const r=this.x,n=this.y,o=this.z,s=t.elements;return this.x=s[0]*r+s[3]*n+s[6]*o,this.y=s[1]*r+s[4]*n+s[7]*o,this.z=s[2]*r+s[5]*n+s[8]*o,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const r=this.x,n=this.y,o=this.z,s=t.elements,a=1/(s[3]*r+s[7]*n+s[11]*o+s[15]);return this.x=(s[0]*r+s[4]*n+s[8]*o+s[12])*a,this.y=(s[1]*r+s[5]*n+s[9]*o+s[13])*a,this.z=(s[2]*r+s[6]*n+s[10]*o+s[14])*a,this}applyQuaternion(t){const r=this.x,n=this.y,o=this.z,s=t.x,a=t.y,i=t.z,l=t.w,c=2*(a*o-i*n),u=2*(i*r-s*o),d=2*(s*n-a*r);return this.x=r+l*c+a*d-i*u,this.y=n+l*u+i*c-s*d,this.z=o+l*d+s*u-a*c,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const r=this.x,n=this.y,o=this.z,s=t.elements;return this.x=s[0]*r+s[4]*n+s[8]*o,this.y=s[1]*r+s[5]*n+s[9]*o,this.z=s[2]*r+s[6]*n+s[10]*o,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,r){return this.x=zt(this.x,t.x,r.x),this.y=zt(this.y,t.y,r.y),this.z=zt(this.z,t.z,r.z),this}clampScalar(t,r){return this.x=zt(this.x,t,r),this.y=zt(this.y,t,r),this.z=zt(this.z,t,r),this}clampLength(t,r){const n=this.length();return this.divideScalar(n||1).multiplyScalar(zt(n,t,r))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,r){return this.x+=(t.x-this.x)*r,this.y+=(t.y-this.y)*r,this.z+=(t.z-this.z)*r,this}lerpVectors(t,r,n){return this.x=t.x+(r.x-t.x)*n,this.y=t.y+(r.y-t.y)*n,this.z=t.z+(r.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,r){const n=t.x,o=t.y,s=t.z,a=r.x,i=r.y,l=r.z;return this.x=o*l-s*i,this.y=s*a-n*l,this.z=n*i-o*a,this}projectOnVector(t){const r=t.lengthSq();if(r===0)return this.set(0,0,0);const n=t.dot(this)/r;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return Xa.copy(this).projectOnVector(t),this.sub(Xa)}reflect(t){return this.sub(Xa.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const r=Math.sqrt(this.lengthSq()*t.lengthSq());if(r===0)return Math.PI/2;const n=this.dot(t)/r;return Math.acos(zt(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const r=this.x-t.x,n=this.y-t.y,o=this.z-t.z;return r*r+n*n+o*o}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,r,n){const o=Math.sin(r)*t;return this.x=o*Math.sin(n),this.y=Math.cos(r)*t,this.z=o*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,r,n){return this.x=t*Math.sin(r),this.y=n,this.z=t*Math.cos(r),this}setFromMatrixPosition(t){const r=t.elements;return this.x=r[12],this.y=r[13],this.z=r[14],this}setFromMatrixScale(t){const r=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),o=this.setFromMatrixColumn(t,2).length();return this.x=r,this.y=n,this.z=o,this}setFromMatrixColumn(t,r){return this.fromArray(t.elements,r*4)}setFromMatrix3Column(t,r){return this.fromArray(t.elements,r*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,r=0){return this.x=t[r],this.y=t[r+1],this.z=t[r+2],this}toArray(t=[],r=0){return t[r]=this.x,t[r+1]=this.y,t[r+2]=this.z,t}fromBufferAttribute(t,r){return this.x=t.getX(r),this.y=t.getY(r),this.z=t.getZ(r),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,r=Math.random()*2-1,n=Math.sqrt(1-r*r);return this.x=n*Math.cos(t),this.y=r,this.z=n*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Xa=new rn,nd=new u2;function d2(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 h2(e,t,r){if(e===void 0&&t||e&&t===void 0||(e==null?void 0:e.orientation)===void 0||(t==null?void 0:t.orientation)===void 0||(e==null?void 0:e.position)===void 0||(t==null?void 0:t.position)===void 0)return!1;if(e===void 0||t===void 0)return!0;let n=0;return n+=Math.abs(e.orientation[0]-t.orientation[0]),n+=Math.abs(e.orientation[1]-t.orientation[1]),n+=Math.abs(e.orientation[2]-t.orientation[2]),n+=Math.abs(e.position[0]-t.position[0]),n+=Math.abs(e.position[1]-t.position[1]),n+=Math.abs(e.position[2]-t.position[2]),n<=r}function p2(e,t,r){return e.coordinate_system===t.coordinate_system&&e.tcp===t.tcp&&h2(e.tcp_pose,t.tcp_pose,r)}const od=1e-4;function f2(e,t){const r=new wt.Vector3(t[0],t[1],t[2]),n=new wt.Vector3(e[0],e[1],e[2]),o=r.length(),s=r.normalize();let a=n.length(),i=n.normalize();i.dot(s)<0&&(a=-a,i=i.multiplyScalar(-1));let l=a-o;return l-=2*Math.PI*Math.floor((l+Math.PI)/(2*Math.PI)),a=o+l,[...i.multiplyScalar(a)]}class jl{constructor(t,r,n,o,s,a){this.nova=t,this.controller=r,this.motionGroup=n,this.description=o,this.initialMotionState=s,this.motionStateSocket=a,this.rapidlyChangingMotionState=s,a.addEventListener("message",i=>{var c;const l=(c=et.tryParseJson(i.data))==null?void 0:c.result;if(!l)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${i.data}`);d2(this.rapidlyChangingMotionState.joint_position,l.joint_position,od)||We.runInAction(()=>{this.rapidlyChangingMotionState=l}),p2(this.rapidlyChangingMotionState,l,od)||We.runInAction(()=>{var u,d,h;this.rapidlyChangingMotionState.tcp_pose==null?this.rapidlyChangingMotionState.tcp_pose=l.tcp_pose:(u=l.tcp_pose)!=null&&u.orientation&&((d=l.tcp_pose)!=null&&d.position)&&((h=this.rapidlyChangingMotionState.tcp_pose)!=null&&h.orientation)?this.rapidlyChangingMotionState.tcp_pose={position:l.tcp_pose.position,orientation:f2(l.tcp_pose.orientation,this.rapidlyChangingMotionState.tcp_pose.orientation)}:console.warn("Received incomplete tcp_pose, ignoring",l.tcp_pose)}),this.rapidlyChangingMotionState.standstill!==l.standstill&&We.runInAction(()=>{this.rapidlyChangingMotionState.standstill=l.standstill})}),We.makeAutoObservable(this)}static async open(t,r){var d;const[n,o]=r.split("@"),s=await t.api.controller.getCurrentRobotControllerState(o),a=s==null?void 0:s.motion_groups.find(h=>h.motion_group===r);if(!s||!a)throw new Error(`Controller ${o} or motion group ${r} not found`);const i=t.openReconnectingWebsocket(`/controllers/${o}/motion-groups/${r}/state-stream`),l=await i.firstMessage(),c=(d=et.tryParseJson(l.data))==null?void 0:d.result;if(!c)throw new Error(`Unable to parse initial motion state message ${l.data}`);console.log(`Connected motion state websocket to motion group ${a.motion_group}. Initial state:
|
|
151
|
-
`,c);const u=await t.api.motionGroup.getMotionGroupDescription(o,a.motion_group);return new jl(t,s,a,u,c,i)}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get wandelscriptIdentifier(){const t=this.motionGroupId.split("@")[0];return`${this.controllerId.replace(/-/g,"_")}_${t}`}get joints(){return this.initialMotionState.joint_position.map((t,r)=>({index:r}))}dispose(){this.motionStateSocket.close()}}class Dl{constructor(t,r={}){this.motionStream=t,this.options=r,this.ENDPOINT_JOGGING="/execution/jogging",this.ENDPOINT_TRAJECTORY="/execution/trajectory",this.DEFAULT_MODE="off",this.DEFAULT_TCP="Flange",this.DEFAULT_INIT_TIMEOUT=5e3,this.DEFAULT_ORIENTATION="coordsys",this.mode="off",this.joggingSocket=null,this.trajectorySocket=null,this.timeout=this.DEFAULT_INIT_TIMEOUT,this.tcp=(r==null?void 0:r.tcp)||t.motionGroup.tcp||this.DEFAULT_TCP,this.orientation=(r==null?void 0:r.orientation)||this.DEFAULT_ORIENTATION,this.timeout=(r==null?void 0:r.timeout)||this.DEFAULT_INIT_TIMEOUT,this.mode=(r==null?void 0:r.mode)||this.DEFAULT_MODE,this.onError=r==null?void 0:r.onError}static async open(t,r,n={}){const o=await jl.open(t,r),s=new Dl(o,n);return await s.setJoggingMode(s.mode),s}async setOptions(t){t.tcp&&(this.tcp=t.tcp),t.orientation&&(this.orientation=t.orientation),t.timeout&&(this.timeout=t.timeout),t.mode&&(this.mode=t.mode),t.onError&&(this.onError=t.onError),this.setJoggingMode(this.mode,!1)}get motionGroupId(){return this.motionStream.motionGroupId}get nova(){return this.motionStream.nova}get numJoints(){return this.motionStream.joints.length}async stop(){if(this.joggingSocket){const t=new Array(this.numJoints).fill(0);this.joggingSocket.sendJson({message_type:"JointVelocityRequest",velocity:t})}this.trajectorySocket&&this.trajectorySocket.sendJson({message_type:"PauseMovementRequest"})}async dispose(){const t=[this.joggingSocket,this.trajectorySocket].filter(r=>r!==null);return t.forEach(r=>{r.dispose()}),this.joggingSocket=null,this.trajectorySocket=null,Promise.all(t.map(r=>r.closed()))}async setJoggingMode(t,r=!0){if(!(this.mode===t&&r)&&(this.dispose(),this.mode=t,this.mode==="jogging"))return this.initializeJoggingWebsocket()}async initializeJoggingWebsocket(){return new Promise((t,r)=>{const n=setTimeout(()=>{r(new Error(`Jogging initialization timeout after ${this.timeout} seconds`))},this.timeout);this.joggingSocket=this.nova.openReconnectingWebsocket(this.ENDPOINT_JOGGING),this.joggingSocket.addEventListener("message",o=>{var a,i;const s=et.tryParseJson(o.data);if(((a=s==null?void 0:s.result)==null?void 0:a.kind)==="INITIALIZE_RECEIVED"){clearTimeout(n),t();return}(s&&"error"in s||((i=s==null?void 0:s.result)==null?void 0:i.kind)==="MOTION_ERROR")&&(clearTimeout(n),this.onError?this.onError(o.data):r(new Error(o.data)))}),this.joggingSocket.sendJson({message_type:"InitializeJoggingRequest",motion_group:this.motionGroupId,tcp:this.tcp})})}async rotateJoints({joint:t,direction:r,velocityRadsPerSec:n}){if(!this.joggingSocket||this.mode!=="jogging")throw new Error("Joint jogging websocket not connected; create one by setting jogging mode to 'jogging'");const o=new Array(this.numJoints).fill(0);o[t]=r==="-"?-n:n,this.joggingSocket.sendJson({message_type:"JointVelocityRequest",velocity:o})}async translateTCP({axis:t,direction:r,velocityMmPerSec:n}){if(!this.joggingSocket||this.mode!=="jogging")throw new Error("Continuous jogging websocket not connected; create one by setting jogging mode to 'jogging'");const o=[0,0,0],s=[0,0,0];s[et.XYZ_TO_VECTOR[t]]=r==="-"?-n:n,this.joggingSocket.sendJson({message_type:"TcpVelocityRequest",translation:s,rotation:o,use_tool_coordinate_system:this.orientation==="tool"})}async rotateTCP({axis:t,direction:r,velocityRadsPerSec:n}){if(!this.joggingSocket||this.mode!=="jogging")throw new Error("Continuous jogging websocket not connected; create one by setting jogging mode to 'jogging'");const o=[0,0,0],s=[0,0,0];o[et.XYZ_TO_VECTOR[t]]=r==="-"?-n:n,this.joggingSocket.sendJson({message_type:"TcpVelocityRequest",translation:s,rotation:o})}async runIncrementalCartesianMotion({currentTcpPose:t,currentJoints:r,coordSystemId:n,velocityInRelevantUnits:o,axis:s,direction:a,motion:i}){const l=[];if(this.mode!=="trajectory")throw new Error("Set jogging mode to 'trajectory' to run incremental cartesian motions");if(i.type==="translate"){if(!t.position)throw new Error("Current pose has no position, cannot perform translation");const S=[...t.position];S[et.XYZ_TO_VECTOR[s]]+=i.distanceMm*(a==="-"?-1:1),l.push({limits_override:{tcp_velocity_limit:o},path:{path_definition_name:"PathLine",target_pose:{position:S,orientation:t.orientation}}})}else if(i.type==="rotate"){if(!t.orientation)throw new Error("Current pose has no orientation, cannot perform rotation");const S=new rn(t.orientation[0],t.orientation[1],t.orientation[2]),R=S.length(),v=S.clone().normalize(),O=i.distanceRads*(a==="-"?-1:1),I=new rn(0,0,0);I[s]=1;const T=Math.cos(.5*O)*Math.cos(.5*R),w=Math.sin(.5*O)*Math.sin(.5*R),P=Math.sin(.5*O)*Math.cos(.5*R),k=Math.cos(.5*O)*Math.sin(.5*R),y=I.dot(v),A=I.clone().cross(v),M=2*Math.acos(T-w*y),_=M/Math.sin(.5*M),j=new rn().addScaledVector(A,w).addScaledVector(I,P).addScaledVector(v,k).multiplyScalar(_);l.push({limits_override:{tcp_orientation_velocity_limit:o},path:{path_definition_name:"PathLine",target_pose:{position:t.position,orientation:[...j]}}})}const c=this.motionStream.description;if(c.cycle_time===void 0){console.warn("Current motion group has no cycle time, cannot plan jogging motion");return}const u={motion_group_model:c.motion_group_model,cycle_time:c.cycle_time,mounting:c.mounting,global:c.operation_limits.auto_limits},d=await this.nova.api.trajectoryPlanning.planTrajectory({motion_group_setup:u,start_joint_position:r,motion_commands:l}),h=d.response;if(!h)throw new Error(`Failed to plan jogging increment motion ${JSON.stringify(d)}`);this.trajectorySocket&&(console.warn("Trajectory jogging websocket already open; will close"),this.trajectorySocket.dispose()),this.trajectorySocket=this.nova.openReconnectingWebsocket(this.ENDPOINT_TRAJECTORY);const p=S=>{var R;if(!S||S.add_trajectory_error||S.message)if(this.onError)this.onError(S);else throw new Error(((R=S==null?void 0:S.add_trajectory_error)==null?void 0:R.message)||(S==null?void 0:S.message)||"Failed to execute trajectory, unknown error");if(!this.trajectorySocket)throw new Error("Failed to execute trajectory, websocket not available anymore");this.trajectorySocket.sendJson({message_type:"StartMovementRequest",direction:"DIRECTION_FORWARD"})},f=async()=>{var S;await We.when(()=>!this.motionStream.rapidlyChangingMotionState.standstill),await We.when(()=>this.motionStream.rapidlyChangingMotionState.standstill),(S=this.trajectorySocket)==null||S.dispose(),this.trajectorySocket=null},m=async()=>{var S;await We.when(()=>this.motionStream.rapidlyChangingMotionState.standstill),(S=this.trajectorySocket)==null||S.dispose(),this.trajectorySocket=null},b=async S=>{if(S!=null&&S.message)if(this.onError){this.onError(S);return}else throw new Error(S.message||"Failed to execute trajectory, unknown error");this.motionStream.rapidlyChangingMotionState.standstill?await f():await m()};this.trajectorySocket.addEventListener("message",S=>{var v;const R=et.tryParseJson(S.data);if(!((v=R==null?void 0:R.result)!=null&&v.kind))throw new Error(`Failed to execute trajectory: Received invalid message ${S.data}`);if(R.result.kind==="INITIALIZE_RECEIVED")p(R.result);else if(R.result.kind==="START_RECEIVED")b(R);else if(R.result.kind!=="PAUSE_RECEIVED")if(R.result.kind==="MOTION_ERROR"&&R.result.message)if(this.onError){this.onError(R);return}else throw new Error(R.result.message);else throw new Error(`Failed to execute trajectory, cannot handle message type "${R.result.kind}"`)}),this.trajectorySocket.sendJson({message_type:"InitializeMovementRequest",trajectory:{message_type:"TrajectoryData",motion_group:this.motionGroupId,data:h,tcp:this.tcp}})}}function m2(e){try{return JSON.stringify(e)}catch{return}}function g2(e,t){throw new Error(t+` ${JSON.stringify(e)}`)}function y2(e){var t,r,n,o;return e instanceof Ti&&e.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":e instanceof Ti&&e.response?`${(t=e.response)==null?void 0:t.status} ${(r=e.response)==null?void 0:r.statusText} from ${(n=e.response)==null?void 0:n.config.url}: ${JSON.stringify((o=e.response)==null?void 0:o.data)}`:e instanceof Error?e.message:`Unexpected error: ${m2(e)||e}`}const Ul=e=>{const t=e.softTimeout||3e3,[r,n]=D.useState(!1),o=E.useTheme();return D.useEffect(()=>{const s=setTimeout(()=>{n(!0)},t);return()=>clearTimeout(s)}),g.jsx(E.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{color:o.palette.text.primary},children:e.error?g.jsx(rf,{loadingMessage:e.message,error:e.error}):g.jsxs(g.Fragment,{children:[g.jsx(E.CircularProgress,{sx:{marginBottom:"24px"}}),!!e.message&&g.jsx("div",{children:e.message}),g.jsx(E.Stack,{sx:{visibility:r?"visible":"hidden",marginTop:"1rem",color:o.palette.text.secondary},children:"This is taking longer than expected..."})]})})},rf=e=>{const t=y2(e.error),r=e.error instanceof Error?e.error.stack:null,n=E.useTheme();return g.jsxs(E.Stack,{sx:{maxHeight:"100%",maxWidth:"min(100%, 800px)",padding:2,overflow:"auto",color:n.palette.error.main,"& pre":{whiteSpace:"pre-wrap",wordBreak:"break-word",paddingBottom:"3rem"}},children:[(e.loadingMessage?`Error while ${ji.lowerFirst(E.capitalize(e.loadingMessage))} - `:"")+t,g.jsx("br",{}),r&&g.jsx("pre",{children:r})]})},b2=({title:e,titleId:t,...r},n)=>V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.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"})),x2=D.forwardRef(b2),S2=({title:e,titleId:t,...r},n)=>V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.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"})),v2=D.forwardRef(S2),C2=({title:e,titleId:t,...r},n)=>V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:19,fill:"none",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.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"})),w2=D.forwardRef(C2),O2=({title:e,titleId:t,...r},n)=>V.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?V.createElement("title",{id:t},e):null,V.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"})),T2=D.forwardRef(O2);function E2(){this.__data__=[],this.size=0}function nf(e,t){return e===t||e!==e&&t!==t}function ia(e,t){for(var r=e.length;r--;)if(nf(e[r][0],t))return r;return-1}var I2=Array.prototype,A2=I2.splice;function R2(e){var t=this.__data__,r=ia(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():A2.call(t,r,1),--this.size,!0}function P2(e){var t=this.__data__,r=ia(t,e);return r<0?void 0:t[r][1]}function _2(e){return ia(this.__data__,e)>-1}function M2(e,t){var r=this.__data__,n=ia(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function er(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}er.prototype.clear=E2;er.prototype.delete=R2;er.prototype.get=P2;er.prototype.has=_2;er.prototype.set=M2;function V2(){this.__data__=new er,this.size=0}function k2(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function j2(e){return this.__data__.get(e)}function D2(e){return this.__data__.has(e)}var U2="[object AsyncFunction]",L2="[object Function]",B2="[object GeneratorFunction]",N2="[object Proxy]";function of(e){if(!Tr(e))return!1;var t=jr(e);return t==L2||t==B2||t==U2||t==N2}var Qa=Bt["__core-js_shared__"],sd=function(){var e=/[^.]+$/.exec(Qa&&Qa.keys&&Qa.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function F2(e){return!!sd&&sd in e}var $2=Function.prototype,z2=$2.toString;function Dr(e){if(e!=null){try{return z2.call(e)}catch{}try{return e+""}catch{}}return""}var G2=/[\\^$.*+?()[\]{}|]/g,H2=/^\[object .+?Constructor\]$/,q2=Function.prototype,W2=Object.prototype,J2=q2.toString,Y2=W2.hasOwnProperty,K2=RegExp("^"+J2.call(Y2).replace(G2,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function X2(e){if(!Tr(e)||F2(e))return!1;var t=of(e)?K2:H2;return t.test(Dr(e))}function Q2(e,t){return e==null?void 0:e[t]}function Ur(e,t){var r=Q2(e,t);return X2(r)?r:void 0}var Qn=Ur(Bt,"Map"),Zn=Ur(Object,"create");function Z2(){this.__data__=Zn?Zn(null):{},this.size=0}function eE(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var tE="__lodash_hash_undefined__",rE=Object.prototype,nE=rE.hasOwnProperty;function oE(e){var t=this.__data__;if(Zn){var r=t[e];return r===tE?void 0:r}return nE.call(t,e)?t[e]:void 0}var sE=Object.prototype,aE=sE.hasOwnProperty;function iE(e){var t=this.__data__;return Zn?t[e]!==void 0:aE.call(t,e)}var lE="__lodash_hash_undefined__";function cE(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Zn&&t===void 0?lE:t,this}function Ar(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ar.prototype.clear=Z2;Ar.prototype.delete=eE;Ar.prototype.get=oE;Ar.prototype.has=iE;Ar.prototype.set=cE;function uE(){this.size=0,this.__data__={hash:new Ar,map:new(Qn||er),string:new Ar}}function dE(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function la(e,t){var r=e.__data__;return dE(t)?r[typeof t=="string"?"string":"hash"]:r.map}function hE(e){var t=la(this,e).delete(e);return this.size-=t?1:0,t}function pE(e){return la(this,e).get(e)}function fE(e){return la(this,e).has(e)}function mE(e,t){var r=la(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function tr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}tr.prototype.clear=uE;tr.prototype.delete=hE;tr.prototype.get=pE;tr.prototype.has=fE;tr.prototype.set=mE;var gE=200;function yE(e,t){var r=this.__data__;if(r instanceof er){var n=r.__data__;if(!Qn||n.length<gE-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new tr(n)}return r.set(e,t),this.size=r.size,this}function Jt(e){var t=this.__data__=new er(e);this.size=t.size}Jt.prototype.clear=V2;Jt.prototype.delete=k2;Jt.prototype.get=j2;Jt.prototype.has=D2;Jt.prototype.set=yE;var bE="__lodash_hash_undefined__";function xE(e){return this.__data__.set(e,bE),this}function SE(e){return this.__data__.has(e)}function Ss(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new tr;++t<r;)this.add(e[t])}Ss.prototype.add=Ss.prototype.push=xE;Ss.prototype.has=SE;function vE(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 CE(e,t){return e.has(t)}var wE=1,OE=2;function sf(e,t,r,n,o,s){var a=r&wE,i=e.length,l=t.length;if(i!=l&&!(a&&l>i))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=r&OE?new Ss:void 0;for(s.set(e,t),s.set(t,e);++d<i;){var f=e[d],m=t[d];if(n)var b=a?n(m,f,d,t,e,s):n(f,m,d,e,t,s);if(b!==void 0){if(b)continue;h=!1;break}if(p){if(!vE(t,function(S,R){if(!CE(p,R)&&(f===S||o(f,S,r,n,s)))return p.push(R)})){h=!1;break}}else if(!(f===m||o(f,m,r,n,s))){h=!1;break}}return s.delete(e),s.delete(t),h}var ad=Bt.Uint8Array;function TE(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function EE(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var IE=1,AE=2,RE="[object Boolean]",PE="[object Date]",_E="[object Error]",ME="[object Map]",VE="[object Number]",kE="[object RegExp]",jE="[object Set]",DE="[object String]",UE="[object Symbol]",LE="[object ArrayBuffer]",BE="[object DataView]",id=ur?ur.prototype:void 0,Za=id?id.valueOf:void 0;function NE(e,t,r,n,o,s,a){switch(r){case BE:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case LE:return!(e.byteLength!=t.byteLength||!s(new ad(e),new ad(t)));case RE:case PE:case VE:return nf(+e,+t);case _E:return e.name==t.name&&e.message==t.message;case kE:case DE:return e==t+"";case ME:var i=TE;case jE:var l=n&IE;if(i||(i=EE),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;n|=AE,a.set(e,t);var u=sf(i(e),i(t),n,o,s,a);return a.delete(e),u;case UE:if(Za)return Za.call(e)==Za.call(t)}return!1}function FE(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var Lt=Array.isArray;function $E(e,t,r){var n=t(e);return Lt(e)?n:FE(n,r(e))}function zE(e,t){for(var r=-1,n=e==null?0:e.length,o=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[o++]=a)}return s}function GE(){return[]}var HE=Object.prototype,qE=HE.propertyIsEnumerable,ld=Object.getOwnPropertySymbols,WE=ld?function(e){return e==null?[]:(e=Object(e),zE(ld(e),function(t){return qE.call(e,t)}))}:GE;function JE(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var YE="[object Arguments]";function cd(e){return Er(e)&&jr(e)==YE}var af=Object.prototype,KE=af.hasOwnProperty,XE=af.propertyIsEnumerable,lf=cd(function(){return arguments}())?cd:function(e){return Er(e)&&KE.call(e,"callee")&&!XE.call(e,"callee")};function QE(){return!1}var cf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ud=cf&&typeof module=="object"&&module&&!module.nodeType&&module,ZE=ud&&ud.exports===cf,dd=ZE?Bt.Buffer:void 0,eI=dd?dd.isBuffer:void 0,Ii=eI||QE,tI=9007199254740991,rI=/^(?:0|[1-9]\d*)$/;function uf(e,t){var r=typeof e;return t=t??tI,!!t&&(r=="number"||r!="symbol"&&rI.test(e))&&e>-1&&e%1==0&&e<t}var nI=9007199254740991;function Ll(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=nI}var oI="[object Arguments]",sI="[object Array]",aI="[object Boolean]",iI="[object Date]",lI="[object Error]",cI="[object Function]",uI="[object Map]",dI="[object Number]",hI="[object Object]",pI="[object RegExp]",fI="[object Set]",mI="[object String]",gI="[object WeakMap]",yI="[object ArrayBuffer]",bI="[object DataView]",xI="[object Float32Array]",SI="[object Float64Array]",vI="[object Int8Array]",CI="[object Int16Array]",wI="[object Int32Array]",OI="[object Uint8Array]",TI="[object Uint8ClampedArray]",EI="[object Uint16Array]",II="[object Uint32Array]",Re={};Re[xI]=Re[SI]=Re[vI]=Re[CI]=Re[wI]=Re[OI]=Re[TI]=Re[EI]=Re[II]=!0;Re[oI]=Re[sI]=Re[yI]=Re[aI]=Re[bI]=Re[iI]=Re[lI]=Re[cI]=Re[uI]=Re[dI]=Re[hI]=Re[pI]=Re[fI]=Re[mI]=Re[gI]=!1;function AI(e){return Er(e)&&Ll(e.length)&&!!Re[jr(e)]}function RI(e){return function(t){return e(t)}}var df=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Nn=df&&typeof module=="object"&&module&&!module.nodeType&&module,PI=Nn&&Nn.exports===df,ei=PI&&Ip.process,hd=function(){try{var e=Nn&&Nn.require&&Nn.require("util").types;return e||ei&&ei.binding&&ei.binding("util")}catch{}}(),pd=hd&&hd.isTypedArray,hf=pd?RI(pd):AI,_I=Object.prototype,MI=_I.hasOwnProperty;function VI(e,t){var r=Lt(e),n=!r&&lf(e),o=!r&&!n&&Ii(e),s=!r&&!n&&!o&&hf(e),a=r||n||o||s,i=a?JE(e.length,String):[],l=i.length;for(var c in e)MI.call(e,c)&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||uf(c,l)))&&i.push(c);return i}var kI=Object.prototype;function jI(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||kI;return e===r}function DI(e,t){return function(r){return e(t(r))}}var UI=DI(Object.keys,Object),LI=Object.prototype,BI=LI.hasOwnProperty;function NI(e){if(!jI(e))return UI(e);var t=[];for(var r in Object(e))BI.call(e,r)&&r!="constructor"&&t.push(r);return t}function pf(e){return e!=null&&Ll(e.length)&&!of(e)}function Bl(e){return pf(e)?VI(e):NI(e)}function fd(e){return $E(e,Bl,WE)}var FI=1,$I=Object.prototype,zI=$I.hasOwnProperty;function GI(e,t,r,n,o,s){var a=r&FI,i=fd(e),l=i.length,c=fd(t),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var h=i[d];if(!(a?h in t:zI.call(t,h)))return!1}var p=s.get(e),f=s.get(t);if(p&&f)return p==t&&f==e;var m=!0;s.set(e,t),s.set(t,e);for(var b=a;++d<l;){h=i[d];var S=e[h],R=t[h];if(n)var v=a?n(R,S,h,t,e,s):n(S,R,h,e,t,s);if(!(v===void 0?S===R||o(S,R,r,n,s):v)){m=!1;break}b||(b=h=="constructor")}if(m&&!b){var O=e.constructor,I=t.constructor;O!=I&&"constructor"in e&&"constructor"in t&&!(typeof O=="function"&&O instanceof O&&typeof I=="function"&&I instanceof I)&&(m=!1)}return s.delete(e),s.delete(t),m}var Ai=Ur(Bt,"DataView"),Ri=Ur(Bt,"Promise"),Pi=Ur(Bt,"Set"),_i=Ur(Bt,"WeakMap"),md="[object Map]",HI="[object Object]",gd="[object Promise]",yd="[object Set]",bd="[object WeakMap]",xd="[object DataView]",qI=Dr(Ai),WI=Dr(Qn),JI=Dr(Ri),YI=Dr(Pi),KI=Dr(_i),sr=jr;(Ai&&sr(new Ai(new ArrayBuffer(1)))!=xd||Qn&&sr(new Qn)!=md||Ri&&sr(Ri.resolve())!=gd||Pi&&sr(new Pi)!=yd||_i&&sr(new _i)!=bd)&&(sr=function(e){var t=jr(e),r=t==HI?e.constructor:void 0,n=r?Dr(r):"";if(n)switch(n){case qI:return xd;case WI:return md;case JI:return gd;case YI:return yd;case KI:return bd}return t});var XI=1,Sd="[object Arguments]",vd="[object Array]",Do="[object Object]",QI=Object.prototype,Cd=QI.hasOwnProperty;function ZI(e,t,r,n,o,s){var a=Lt(e),i=Lt(t),l=a?vd:sr(e),c=i?vd:sr(t);l=l==Sd?Do:l,c=c==Sd?Do:c;var u=l==Do,d=c==Do,h=l==c;if(h&&Ii(e)){if(!Ii(t))return!1;a=!0,u=!1}if(h&&!u)return s||(s=new Jt),a||hf(e)?sf(e,t,r,n,o,s):NE(e,t,l,r,n,o,s);if(!(r&XI)){var p=u&&Cd.call(e,"__wrapped__"),f=d&&Cd.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,b=f?t.value():t;return s||(s=new Jt),o(m,b,r,n,s)}}return h?(s||(s=new Jt),GI(e,t,r,n,o,s)):!1}function ca(e,t,r,n,o){return e===t?!0:e==null||t==null||!Er(e)&&!Er(t)?e!==e&&t!==t:ZI(e,t,r,n,ca,o)}function eA(e,t){return ca(e,t)}const ff=({store:e})=>{const{t}=Ce.useTranslation(),[r,n]=D.useState(e.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached),o=D.useRef(r);ea(()=>{const a=e.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached;eA(o.current,a)||(o.current=a,n(a))});const s=[];for(const[a,i]of r.entries())i&&s.push(a);return g.jsx(E.Typography,{color:"error",sx:{margin:"0.5rem 1rem",textAlign:"center",minHeight:"1.5rem",visibility:s.length?"visible":"hidden"},children:t("Jogging.JointLimitsReached.lb",{jointNumbers:s.map(a=>a+1).join(", ")})})},tA=E.styled(E.FormControl)(({theme:e})=>({"&.MuiFormControl-root":{".MuiSelect-select":{paddingTop:"20px",paddingLeft:"12px"},label:{pointerEvents:"none",fontSize:"16px"},".MuiInputLabel-root":{"&.Mui-focused":{color:e.palette.text.primary}}}}));function Uo({labelValue:e,...t}){return g.jsxs(tA,{fullWidth:!0,variant:"filled",children:[g.jsx(E.InputLabel,{id:t.labelId,children:e}),g.jsx(E.Select,{...t})]})}var wd=function(){try{var e=Ur(Object,"defineProperty");return e({},"",{}),e}catch{}}();function rA(e,t,r){t=="__proto__"&&wd?wd(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function nA(e,t,r,n){for(var o=-1,s=e==null?0:e.length;++o<s;){var a=e[o];t(n,a,r(a),e)}return n}function oA(e){return function(t,r,n){for(var o=-1,s=Object(t),a=n(t),i=a.length;i--;){var l=a[++o];if(r(s[l],l,s)===!1)break}return t}}var sA=oA();function aA(e,t){return e&&sA(e,t,Bl)}function iA(e,t){return function(r,n){if(r==null)return r;if(!pf(r))return e(r,n);for(var o=r.length,s=-1,a=Object(r);++s<o&&n(a[s],s,a)!==!1;);return r}}var lA=iA(aA);function cA(e,t,r,n){return lA(e,function(o,s,a){t(n,o,r(o),a)}),n}var uA=1,dA=2;function hA(e,t,r,n){var o=r.length,s=o;if(e==null)return!s;for(e=Object(e);o--;){var a=r[o];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<s;){a=r[o];var i=a[0],l=e[i],c=a[1];if(a[2]){if(l===void 0&&!(i in e))return!1}else{var u=new Jt,d;if(!(d===void 0?ca(c,l,uA|dA,n,u):d))return!1}}return!0}function mf(e){return e===e&&!Tr(e)}function pA(e){for(var t=Bl(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,mf(o)]}return t}function gf(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function fA(e){var t=pA(e);return t.length==1&&t[0][2]?gf(t[0][0],t[0][1]):function(r){return r===e||hA(r,e,t)}}var mA=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,gA=/^\w*$/;function Nl(e,t){if(Lt(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ta(e)?!0:gA.test(e)||!mA.test(e)||t!=null&&e in Object(t)}var yA="Expected a function";function Fl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(yA);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],s=r.cache;if(s.has(o))return s.get(o);var a=e.apply(this,n);return r.cache=s.set(o,a)||s,a};return r.cache=new(Fl.Cache||tr),r}Fl.Cache=tr;var bA=500;function xA(e){var t=Fl(e,function(n){return r.size===bA&&r.clear(),n}),r=t.cache;return t}var SA=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vA=/\\(\\)?/g,CA=xA(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(SA,function(r,n,o,s){t.push(o?s.replace(vA,"$1"):n||r)}),t});function wA(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var Od=ur?ur.prototype:void 0,Td=Od?Od.toString:void 0;function yf(e){if(typeof e=="string")return e;if(Lt(e))return wA(e,yf)+"";if(ta(e))return Td?Td.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function bf(e){return e==null?"":yf(e)}function xf(e,t){return Lt(e)?e:Nl(e,t)?[e]:CA(bf(e))}function ua(e){if(typeof e=="string"||ta(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Sf(e,t){t=xf(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[ua(t[r++])];return r&&r==n?e:void 0}function OA(e,t,r){var n=e==null?void 0:Sf(e,t);return n===void 0?r:n}function TA(e,t){return e!=null&&t in Object(e)}function EA(e,t,r){t=xf(t,e);for(var n=-1,o=t.length,s=!1;++n<o;){var a=ua(t[n]);if(!(s=e!=null&&r(e,a)))break;e=e[a]}return s||++n!=o?s:(o=e==null?0:e.length,!!o&&Ll(o)&&uf(a,o)&&(Lt(e)||lf(e)))}function IA(e,t){return e!=null&&EA(e,t,TA)}var AA=1,RA=2;function PA(e,t){return Nl(e)&&mf(t)?gf(ua(e),t):function(r){var n=OA(r,e);return n===void 0&&n===t?IA(r,e):ca(t,n,AA|RA)}}function _A(e){return e}function MA(e){return function(t){return t==null?void 0:t[e]}}function VA(e){return function(t){return Sf(t,e)}}function kA(e){return Nl(e)?MA(ua(e)):VA(e)}function jA(e){return typeof e=="function"?e:e==null?_A:typeof e=="object"?Lt(e)?PA(e[0],e[1]):fA(e):kA(e)}function DA(e,t){return function(r,n){var o=Lt(r)?nA:cA,s={};return o(r,e,jA(n),s)}}var Lo=DA(function(e,t,r){rA(e,r,t)}),UA=0;function LA(e){var t=++UA;return bf(e)+t}const Mi=[{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}],BA=[{id:"continuous"},...Mi],NA=["coordsys","tool"];class da{constructor(t,r,n,o){var s,a;this.jogger=t,this.coordSystems=r,this.motionGroupDescription=n,this.tcps=o,this.selectedTabId="cartesian",this.activationState="inactive",this.activationError=null,this.activationCounter=0,this.locks=new Set,this.selectedCoordSystemId="world",this.selectedTcpId="",this.selectedOrientation="coordsys",this.selectedIncrementId="continuous",this.selectedCartesianMotionType="translate",this.incrementJogInProgress=null,this.translationVelocityMmPerSec=10,this.rotationVelocityDegPerSec=1,this.minTranslationVelocityMmPerSec=5,this.maxTranslationVelocityMmPerSec=250,this.minRotationVelocityDegPerSec=1,this.maxRotationVelocityDegPerSec=60,this.showCoordSystemSelect=!1,this.showTcpSelect=!0,this.showOrientationSelect=!0,this.showIncrementSelect=!0,this.showTabIcons=!1,this.showVelocitySliderLabel=!0,this.showVelocityLegend=!1,this.showJointsLegend=!1,this.disposers=[];for(const i of r)if(i.coordinate_system===""){i.coordinate_system="world";break}this.selectedCoordSystemId=((s=r[0])==null?void 0:s.coordinate_system)||"world",this.selectedTcpId=((a=o[0])==null?void 0:a.id)||"",We.makeAutoObservable(this,{},{autoBind:!0}),this.loadFromLocalStorage(),this.disposers.push(We.autorun(()=>this.saveToLocalStorage())),window.joggingStore=this}static async loadFor(t){const{nova:r}=t,[n,o]=await Promise.all([r.api.controller.listCoordinateSystems(t.motionStream.controllerId,"ROTATION_VECTOR"),r.api.motionGroup.getMotionGroupDescription(t.motionStream.controllerId,t.motionGroupId)]),s=Object.entries(o.tcps||{}).map(([a,i])=>({id:a,readable_name:i.name,position:i.pose.position,orientation:i.pose.orientation}));return new da(t,n||[],o,s)}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}get coordSystemCountByName(){return ji.countBy(this.coordSystems,t=>t.name)}async deactivate(){if(this.jogger.mode==="jogging")return this.jogger.stop()}async activate(){return this.currentTab.id==="cartesian"?((this.jogger.tcp!==this.selectedTcpId||this.jogger.orientation!==this.selectedOrientation)&&this.jogger.setOptions({tcp:this.selectedTcpId,orientation:this.selectedOrientation}),this.activeDiscreteIncrement?this.jogger.setJoggingMode("trajectory"):this.jogger.setJoggingMode("jogging")):this.jogger.setJoggingMode("jogging"),this.jogger}loadFromLocalStorage(){const t=et.tryParseJson(localStorage.getItem("joggingToolStore"));t&&(this.tabsById[t.selectedTabId]&&(this.selectedTabId=t.selectedTabId),this.coordSystemsById[t.selectedCoordSystemId]&&(this.selectedCoordSystemId=t.selectedCoordSystemId),this.tcpsById[t.selectedTcpId]&&(this.selectedTcpId=t.selectedTcpId),this.incrementOptionsById[t.selectedIncrementId]&&(this.selectedIncrementId=t.selectedIncrementId),["translate","rotate"].includes(t.selectedCartesianMotionType)&&(this.selectedCartesianMotionType=t.selectedCartesianMotionType),["coordsys","tool"].includes(t.selectedOrientation)&&(this.selectedOrientation=t.selectedOrientation))}saveToLocalStorage(){localStorage.setItem("joggingToolStore",JSON.stringify(this.localStorageSave))}get isLocked(){return this.locks.size>0}get localStorageSave(){return{selectedTabId:this.selectedTabId,selectedCoordSystemId:this.selectedCoordSystemId,selectedTcpId:this.selectedTcpId,selectedOrientation:this.selectedOrientation,selectedIncrementId:this.selectedIncrementId,selectedCartesianMotionType:this.selectedCartesianMotionType}}get tabs(){return[{id:"cartesian",label:"cartesian"},{id:"joint",label:"joint"}]}get incrementOptions(){return BA}get discreteIncrementOptions(){return Mi}get incrementOptionsById(){return Lo(this.incrementOptions,t=>t.id)}get tabsById(){return Lo(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 Lo(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 Lo(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:Mi.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=LA();this.lock(r);try{return await t()}finally{this.unlock(r)}}}const FA=ge.observer(({store:e})=>{var o;const{t}=Ce.useTranslation(),r=[];function n(s){switch(s){case"coordsys":return t("Jogging.Orientation.coordsys");case"tool":return t("Jogging.Orientation.tool");default:return s}}return e.showCoordSystemSelect&&r.push(g.jsx(Uo,{labelId:"jogging-coord-select",labelValue:t("Jogging.CoordinateSystem.hlb"),value:e.selectedCoordSystemId,size:"small",variant:"filled",displayEmpty:!0,onChange:s=>e.setSelectedCoordSystemId(s.target.value),disabled:e.isLocked,children:e.coordSystems.map(s=>g.jsx(E.MenuItem,{value:s.coordinate_system,children:s.name&&e.coordSystemCountByName[s.name]>1?`${s.name} / ${s.coordinate_system}`:s.name||s.coordinate_system},s.coordinate_system))},"coord")),e.showTcpSelect&&r.push(g.jsx(Uo,{labelId:"jogging-tcp-select",labelValue:"TCP",value:e.selectedTcpId,size:"small",variant:"filled",onChange:s=>e.setSelectedTcpId(s.target.value),disabled:e.isLocked,children:e.tcps.map(s=>g.jsx(E.MenuItem,{value:s.id,children:s.id},s.id))},"tcp")),e.showOrientationSelect&&r.push(g.jsx(Uo,{labelValue:t("Jogging.Cartesian.Orientation.lb"),id:"orientation-select",labelId:"orientation-select",value:e.selectedOrientation,onChange:s=>e.setSelectedOrientation(s.target.value),disabled:e.isLocked,children:NA.map(s=>g.jsx(E.MenuItem,{value:s,children:n(s)},s))},"orientation")),e.showIncrementSelect&&r.push(g.jsxs(Uo,{labelValue:t("Jogging.Increment.hlb"),labelId:"jogging-increment-select",size:"small",variant:"filled",value:((o=e.activeDiscreteIncrement)==null?void 0:o.id)||"continuous",onChange:s=>e.setSelectedIncrementId(s.target.value),disabled:e.isLocked,children:[g.jsx(E.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(s=>g.jsx(E.MenuItem,{value:s.id,children:e.currentMotionType==="translate"?`${s.mm}mm`:`${s.degrees}°`},s.id))]},"increment")),g.jsx(E.Box,{component:"div",sx:{display:"grid",gap:"16px",gridTemplateColumns:"1fr 1fr",gridAutoRows:"min-content","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:r.map((s,a)=>g.jsx(E.Box,{sx:{gridColumn:r.length%2===1&&a===r.length-1?"span 2":"auto"},children:s},a))})}),$A=E.styled(E.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 Ed(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function zA(e){return typeof e=="string"}function GA(e,t,r){return e===void 0||zA(e)?t:{...t,ownerState:{...t.ownerState,...r}}}function Ko(e,t=[]){if(e===void 0)return{};const r={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]=="function"&&!t.includes(n)).forEach(n=>{r[n]=e[n]}),r}function Id(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 HA(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:o,className:s}=e;if(!t){const p=Et(r==null?void 0:r.className,s,o==null?void 0:o.className,n==null?void 0:n.className),f={...r==null?void 0:r.style,...o==null?void 0:o.style,...n==null?void 0:n.style},m={...r,...o,...n};return p.length>0&&(m.className=p),Object.keys(f).length>0&&(m.style=f),{props:m,internalRef:void 0}}const a=Ko({...o,...n}),i=Id(n),l=Id(o),c=t(a),u=Et(c==null?void 0:c.className,r==null?void 0:r.className,s,o==null?void 0:o.className,n==null?void 0:n.className),d={...c==null?void 0:c.style,...r==null?void 0:r.style,...o==null?void 0:o.style,...n==null?void 0:n.style},h={...c,...r,...l,...i};return u.length>0&&(h.className=u),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:c.ref}}function qA(e,t,r){return typeof e=="function"?e(t,r):e}function or(e){var d;const{elementType:t,externalSlotProps:r,ownerState:n,skipResolvingSlotProps:o=!1,...s}=e,a=o?{}:qA(r,n),{props:i,internalRef:l}=HA({...s,externalSlotProps:a}),c=js(l,a==null?void 0:a.ref,(d=e.additionalProps)==null?void 0:d.ref);return GA(t,{...i,ref:c},n)}function Ad(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
|
|
152
|
-
`))}return!1}const WA={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function JA(e,t,r=(n,o)=>n===o){return e.length===t.length&&e.every((n,o)=>r(n,t[o]))}const YA=2;function Yr(e,t,r,n,o){return r===1?Math.min(e+t,o):Math.max(e-t,n)}function vf(e,t){return e-t}function Rd(e,t){const{index:r}=e.reduce((n,o,s)=>{const a=Math.abs(t-o);return n===null||a<n.distance||a===n.distance?{distance:a,index:s}:n},null)??{};return r}function Bo(e,t){if(t.current!==void 0&&e.changedTouches){const r=e;for(let n=0;n<r.changedTouches.length;n+=1){const o=r.changedTouches[n];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function vs(e,t,r){return(e-t)*100/(r-t)}function KA(e,t,r){return(r-t)*e+t}function XA(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 QA(e,t,r){const n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(XA(t)))}function Pd({values:e,newValue:t,index:r}){const n=e.slice();return n[r]=t,n.sort(vf)}function No({sliderRef:e,activeIndex:t,setActive:r}){var o,s,a;const n=Ln(e.current);(!((o=e.current)!=null&&o.contains(n.activeElement))||Number((s=n==null?void 0:n.activeElement)==null?void 0:s.getAttribute("data-index"))!==t)&&((a=e.current)==null||a.querySelector(`[type="range"][data-index="${t}"]`).focus()),r&&r(t)}function Fo(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?JA(e,t):!1}const ZA={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}%`})}},eR=e=>e;let $o;function _d(){return $o===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?$o=CSS.supports("touch-action","none"):$o=!0),$o}function tR(e){const{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:o=!1,isRtl:s=!1,marks:a=!1,max:i=100,min:l=0,name:c,onChange:u,onChangeCommitted:d,orientation:h="horizontal",rootRef:p,scale:f=eR,step:m=1,shiftStep:b=10,tabIndex:S,value:R}=e,v=V.useRef(void 0),[O,I]=V.useState(-1),[T,w]=V.useState(-1),[P,k]=V.useState(!1),y=V.useRef(0),A=V.useRef(null),[M,_]=zC({controlled:R,default:r??l,name:"Slider"}),j=u&&((Z,re,ie)=>{const fe=Z.nativeEvent||Z,Ee=new fe.constructor(fe.type,fe);Object.defineProperty(Ee,"target",{writable:!0,value:{value:re,name:c}}),A.current=re,u(Ee,re,ie)}),ne=Array.isArray(M);let X=ne?M.slice().sort(vf):[M];X=X.map(Z=>Z==null?l:Kr(Z,l,i));const oe=a===!0&&m!==null?[...Array(Math.floor((i-l)/m)+1)].map((Z,re)=>({value:l+m*re})):a||[],Q=oe.map(Z=>Z.value),[se,N]=V.useState(-1),ee=V.useRef(null),ce=js(p,ee),be=Z=>re=>{var fe;const ie=Number(re.currentTarget.getAttribute("data-index"));Ad(re.target)&&N(ie),w(ie),(fe=Z==null?void 0:Z.onFocus)==null||fe.call(Z,re)},_e=Z=>re=>{var ie;Ad(re.target)||N(-1),w(-1),(ie=Z==null?void 0:Z.onBlur)==null||ie.call(Z,re)},xe=(Z,re)=>{const ie=Number(Z.currentTarget.getAttribute("data-index")),fe=X[ie],Ee=Q.indexOf(fe);let le=re;if(oe&&m==null){const ze=Q[Q.length-1];le>=ze?le=ze:le<=Q[0]?le=Q[0]:le=le<fe?Q[Ee-1]:Q[Ee+1]}if(le=Kr(le,l,i),ne){o&&(le=Kr(le,X[ie-1]||-1/0,X[ie+1]||1/0));const ze=le;le=Pd({values:X,newValue:le,index:ie});let Xe=ie;o||(Xe=le.indexOf(ze)),No({sliderRef:ee,activeIndex:Xe})}_(le),N(ie),j&&!Fo(le,M)&&j(Z,le,ie),d&&d(Z,A.current??le)},ut=Z=>re=>{var ie;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(re.key)){re.preventDefault();const fe=Number(re.currentTarget.getAttribute("data-index")),Ee=X[fe];let le=null;if(m!=null){const ze=re.shiftKey?b:m;switch(re.key){case"ArrowUp":le=Yr(Ee,ze,1,l,i);break;case"ArrowRight":le=Yr(Ee,ze,s?-1:1,l,i);break;case"ArrowDown":le=Yr(Ee,ze,-1,l,i);break;case"ArrowLeft":le=Yr(Ee,ze,s?1:-1,l,i);break;case"PageUp":le=Yr(Ee,b,1,l,i);break;case"PageDown":le=Yr(Ee,b,-1,l,i);break;case"Home":le=l;break;case"End":le=i;break}}else if(oe){const ze=Q[Q.length-1],Xe=Q.indexOf(Ee),Le=[s?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],mt=[s?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];Le.includes(re.key)?Xe===0?le=Q[0]:le=Q[Xe-1]:mt.includes(re.key)&&(Xe===Q.length-1?le=ze:le=Q[Xe+1])}le!=null&&xe(re,le)}(ie=Z==null?void 0:Z.onKeyDown)==null||ie.call(Z,re)};Ut(()=>{var Z;n&&ee.current.contains(document.activeElement)&&((Z=document.activeElement)==null||Z.blur())},[n]),n&&O!==-1&&I(-1),n&&se!==-1&&N(-1);const nt=Z=>re=>{var ie;(ie=Z.onChange)==null||ie.call(Z,re),xe(re,re.target.valueAsNumber)},Se=V.useRef(void 0);let te=h;s&&h==="horizontal"&&(te+="-reverse");const ae=({finger:Z,move:re=!1})=>{const{current:ie}=ee,{width:fe,height:Ee,bottom:le,left:ze}=ie.getBoundingClientRect();let Xe;te.startsWith("vertical")?Xe=(le-Z.y)/Ee:Xe=(Z.x-ze)/fe,te.includes("-reverse")&&(Xe=1-Xe);let Le;if(Le=KA(Xe,l,i),m)Le=QA(Le,m,l);else{const xn=Rd(Q,Le);Le=Q[xn]}Le=Kr(Le,l,i);let mt=0;if(ne){re?mt=Se.current:mt=Rd(X,Le),o&&(Le=Kr(Le,X[mt-1]||-1/0,X[mt+1]||1/0));const xn=Le;Le=Pd({values:X,newValue:Le,index:mt}),o&&re||(mt=Le.indexOf(xn),Se.current=mt)}return{newValue:Le,activeIndex:mt}},ue=Wt(Z=>{const re=Bo(Z,v);if(!re)return;if(y.current+=1,Z.type==="mousemove"&&Z.buttons===0){Y(Z);return}const{newValue:ie,activeIndex:fe}=ae({finger:re,move:!0});No({sliderRef:ee,activeIndex:fe,setActive:I}),_(ie),!P&&y.current>YA&&k(!0),j&&!Fo(ie,M)&&j(Z,ie,fe)}),Y=Wt(Z=>{const re=Bo(Z,v);if(k(!1),!re)return;const{newValue:ie}=ae({finger:re,move:!0});I(-1),Z.type==="touchend"&&w(-1),d&&d(Z,A.current??ie),v.current=void 0,pe()}),ve=Wt(Z=>{if(n)return;_d()||Z.preventDefault();const re=Z.changedTouches[0];re!=null&&(v.current=re.identifier);const ie=Bo(Z,v);if(ie!==!1){const{newValue:Ee,activeIndex:le}=ae({finger:ie});No({sliderRef:ee,activeIndex:le,setActive:I}),_(Ee),j&&!Fo(Ee,M)&&j(Z,Ee,le)}y.current=0;const fe=Ln(ee.current);fe.addEventListener("touchmove",ue,{passive:!0}),fe.addEventListener("touchend",Y,{passive:!0})}),pe=V.useCallback(()=>{const Z=Ln(ee.current);Z.removeEventListener("mousemove",ue),Z.removeEventListener("mouseup",Y),Z.removeEventListener("touchmove",ue),Z.removeEventListener("touchend",Y)},[Y,ue]);V.useEffect(()=>{const{current:Z}=ee;return Z.addEventListener("touchstart",ve,{passive:_d()}),()=>{Z.removeEventListener("touchstart",ve),pe()}},[pe,ve]),V.useEffect(()=>{n&&pe()},[n,pe]);const He=Z=>re=>{var Ee;if((Ee=Z.onMouseDown)==null||Ee.call(Z,re),n||re.defaultPrevented||re.button!==0)return;re.preventDefault();const ie=Bo(re,v);if(ie!==!1){const{newValue:le,activeIndex:ze}=ae({finger:ie});No({sliderRef:ee,activeIndex:ze,setActive:I}),_(le),j&&!Fo(le,M)&&j(re,le,ze)}y.current=0;const fe=Ln(ee.current);fe.addEventListener("mousemove",ue,{passive:!0}),fe.addEventListener("mouseup",Y)},$e=vs(ne?X[0]:l,l,i),Me=vs(X[X.length-1],l,i)-$e,rr=(Z={})=>{const re=Ko(Z),ie={onMouseDown:He(re||{})},fe={...re,...ie};return{...Z,ref:ce,...fe}},fo=Z=>re=>{var fe;(fe=Z.onMouseOver)==null||fe.call(Z,re);const ie=Number(re.currentTarget.getAttribute("data-index"));w(ie)},mo=Z=>re=>{var ie;(ie=Z.onMouseLeave)==null||ie.call(Z,re),w(-1)},go=(Z={})=>{const re=Ko(Z),ie={onMouseOver:fo(re||{}),onMouseLeave:mo(re||{})};return{...Z,...re,...ie}},yo=Z=>({pointerEvents:O!==-1&&O!==Z?"none":void 0});let Lr;return h==="vertical"&&(Lr=s?"vertical-rl":"vertical-lr"),{active:O,axis:te,axisProps:ZA,dragging:P,focusedThumbIndex:se,getHiddenInputProps:(Z={})=>{const re=Ko(Z),ie={onChange:nt(re||{}),onFocus:be(re||{}),onBlur:_e(re||{}),onKeyDown:ut(re||{})},fe={...re,...ie};return{tabIndex:S,"aria-labelledby":t,"aria-orientation":h,"aria-valuemax":f(i),"aria-valuemin":f(l),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":e.step??void 0,disabled:n,...Z,...fe,style:{...WA,direction:s?"rtl":"ltr",width:"100%",height:"100%",writingMode:Lr}}},getRootProps:rr,getThumbProps:go,marks:oe,open:T,range:ne,rootRef:ce,trackLeap:Me,trackOffset:$e,values:X,getThumbStyle:yo}}function Xo(e){return typeof e=="string"}const rR=e=>!e||!Xo(e);function nR(e){return typeof e.main=="string"}function oR(e,t=[]){if(!nR(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function $l(e=[]){return([,t])=>t&&oR(t,e)}function sR(e){return pn("MuiSlider",e)}const St=Bi("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"]),aR=e=>{const{open:t}=e;return{offset:Et(t&&St.valueLabelOpen),circle:St.valueLabelCircle,label:St.valueLabelLabel}};function Cf(e){const{children:t,className:r,value:n}=e,o=aR(e);return t?V.cloneElement(t,{className:t.props.className},g.jsxs(V.Fragment,{children:[t.props.children,g.jsx("span",{className:Et(o.offset,r),"aria-hidden":!0,children:g.jsx("span",{className:o.circle,children:g.jsx("span",{className:o.label,children:n})})})]})):null}process.env.NODE_ENV!=="production"&&(Cf.propTypes={children:x.element.isRequired,className:x.string,value:x.node});function Md(e){return e}const iR=ft("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${tt(r.color)}`],r.size!=="medium"&&t[`size${tt(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})(kr(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${St.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${St.dragging}`]:{[`& .${St.thumb}, & .${St.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter($l()).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}}]}))),lR=ft("span",{name:"MuiSlider",slot:"Rail"})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),cR=ft("span",{name:"MuiSlider",slot:"Track"})(kr(({theme:e})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(e.palette).filter($l()).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:$n(e.palette[t].main,.62),borderColor:$n(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:Fn(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:Fn(e.palette[t].main,.5)})}}}))]}))),uR=ft("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${tt(r.color)}`],r.size!=="medium"&&t[`thumbSize${tt(r.size)}`]]}})(kr(({theme:e})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${St.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.entries(e.palette).filter($l()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${St.focusVisible}`]:{...e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${oi(e.palette[t].main,.16)}`},"@media (hover: none)":{boxShadow:"none"}},[`&.${St.active}`]:{...e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${oi(e.palette[t].main,.16)}`}}}}))]}))),wf=ft(Cf,{name:"MuiSlider",slot:"ValueLabel"})(kr(({theme:e})=>({zIndex:1,whiteSpace:"nowrap",...e.typography.body2,fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${St.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${St.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})));process.env.NODE_ENV!=="production"&&(wf.propTypes={children:x.element.isRequired,index:x.number.isRequired,open:x.bool.isRequired,value:x.node});const dR=ft("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>zi(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})(kr(({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]}))),hR=ft("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>zi(e)&&e!=="markLabelActive"})(kr(({theme:e})=>({...e.typography.body2,color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]}))),pR=e=>{const{disabled:t,dragging:r,marked:n,orientation:o,track:s,classes:a,color:i,size:l}=e,c={root:["root",t&&"disabled",r&&"dragging",n&&"marked",o==="vertical"&&"vertical",s==="inverted"&&"trackInverted",s===!1&&"trackFalse",i&&`color${tt(i)}`,l&&`size${tt(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${tt(l)}`,i&&`thumbColor${tt(i)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Cs(c,sR,a)},fR=({children:e})=>e,Of=V.forwardRef(function(t,r){const n=Pl({props:t,name:"MuiSlider"}),o=Wg(),{"aria-label":s,"aria-valuetext":a,"aria-labelledby":i,component:l="span",components:c={},componentsProps:u={},color:d="primary",classes:h,className:p,disableSwap:f=!1,disabled:m=!1,getAriaLabel:b,getAriaValueText:S,marks:R=!1,max:v=100,min:O=0,name:I,onChange:T,onChangeCommitted:w,orientation:P="horizontal",shiftStep:k=10,size:y="medium",step:A=1,scale:M=Md,slotProps:_,slots:j,tabIndex:ne,track:X="normal",value:oe,valueLabelDisplay:Q="off",valueLabelFormat:se=Md,...N}=n,ee={...n,isRtl:o,max:v,min:O,classes:h,disabled:m,disableSwap:f,orientation:P,marks:R,color:d,size:y,step:A,shiftStep:k,scale:M,track:X,valueLabelDisplay:Q,valueLabelFormat:se},{axisProps:ce,getRootProps:be,getHiddenInputProps:_e,getThumbProps:xe,open:ut,active:nt,axis:Se,focusedThumbIndex:te,range:ae,dragging:ue,marks:Y,values:ve,trackOffset:pe,trackLeap:He,getThumbStyle:$e}=tR({...ee,rootRef:r});ee.marked=Y.length>0&&Y.some(De=>De.label),ee.dragging=ue,ee.focusedThumbIndex=te;const Me=pR(ee),rr=(j==null?void 0:j.root)??c.Root??iR,fo=(j==null?void 0:j.rail)??c.Rail??lR,mo=(j==null?void 0:j.track)??c.Track??cR,go=(j==null?void 0:j.thumb)??c.Thumb??uR,yo=(j==null?void 0:j.valueLabel)??c.ValueLabel??wf,Lr=(j==null?void 0:j.mark)??c.Mark??dR,bo=(j==null?void 0:j.markLabel)??c.MarkLabel??hR,Z=(j==null?void 0:j.input)??c.Input??"input",re=(_==null?void 0:_.root)??u.root,ie=(_==null?void 0:_.rail)??u.rail,fe=(_==null?void 0:_.track)??u.track,Ee=(_==null?void 0:_.thumb)??u.thumb,le=(_==null?void 0:_.valueLabel)??u.valueLabel,ze=(_==null?void 0:_.mark)??u.mark,Xe=(_==null?void 0:_.markLabel)??u.markLabel,Le=(_==null?void 0:_.input)??u.input,mt=or({elementType:rr,getSlotProps:be,externalSlotProps:re,externalForwardedProps:N,additionalProps:{...rR(rr)&&{as:l}},ownerState:{...ee,...re==null?void 0:re.ownerState},className:[Me.root,p]}),xn=or({elementType:fo,externalSlotProps:ie,ownerState:ee,className:Me.rail}),Lf=or({elementType:mo,externalSlotProps:fe,additionalProps:{style:{...ce[Se].offset(pe),...ce[Se].leap(He)}},ownerState:{...ee,...fe==null?void 0:fe.ownerState},className:Me.track}),ha=or({elementType:go,getSlotProps:xe,externalSlotProps:Ee,ownerState:{...ee,...Ee==null?void 0:Ee.ownerState},className:Me.thumb}),Bf=or({elementType:yo,externalSlotProps:le,ownerState:{...ee,...le==null?void 0:le.ownerState},className:Me.valueLabel}),pa=or({elementType:Lr,externalSlotProps:ze,ownerState:ee,className:Me.mark}),fa=or({elementType:bo,externalSlotProps:Xe,ownerState:ee,className:Me.markLabel}),Nf=or({elementType:Z,getSlotProps:_e,externalSlotProps:Le,ownerState:ee});return g.jsxs(rr,{...mt,children:[g.jsx(fo,{...xn}),g.jsx(mo,{...Lf}),Y.filter(De=>De.value>=O&&De.value<=v).map((De,qe)=>{const ma=vs(De.value,O,v),xo=ce[Se].offset(ma);let Nt;return X===!1?Nt=ve.includes(De.value):Nt=X==="normal"&&(ae?De.value>=ve[0]&&De.value<=ve[ve.length-1]:De.value<=ve[0])||X==="inverted"&&(ae?De.value<=ve[0]||De.value>=ve[ve.length-1]:De.value>=ve[0]),g.jsxs(V.Fragment,{children:[g.jsx(Lr,{"data-index":qe,...pa,...!Xo(Lr)&&{markActive:Nt},style:{...xo,...pa.style},className:Et(pa.className,Nt&&Me.markActive)}),De.label!=null?g.jsx(bo,{"aria-hidden":!0,"data-index":qe,...fa,...!Xo(bo)&&{markLabelActive:Nt},style:{...xo,...fa.style},className:Et(Me.markLabel,fa.className,Nt&&Me.markLabelActive),children:De.label}):null]},qe)}),ve.map((De,qe)=>{const ma=vs(De,O,v),xo=ce[Se].offset(ma),Nt=Q==="off"?fR:yo;return g.jsx(Nt,{...!Xo(Nt)&&{valueLabelFormat:se,valueLabelDisplay:Q,value:typeof se=="function"?se(M(De),qe):se,index:qe,open:ut===qe||nt===qe||Q==="on",disabled:m},...Bf,children:g.jsx(go,{"data-index":qe,...ha,className:Et(Me.thumb,ha.className,nt===qe&&Me.active,te===qe&&Me.focusVisible),style:{...xo,...$e(qe),...ha.style},children:g.jsx(Z,{"data-index":qe,"aria-label":b?b(qe):s,"aria-valuenow":M(De),"aria-labelledby":i,"aria-valuetext":S?S(M(De),qe):a,value:ve[qe],...Nf})})},qe)})]})});process.env.NODE_ENV!=="production"&&(Of.propTypes={"aria-label":Ed(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":Ed(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 mR="[object Number]";function gR(e){return typeof e=="number"||Er(e)&&jr(e)==mR}const Tf=ge.observer(e=>{var s,a,i;const t=E.useTheme(),{store:r}=e,{t:n}=Ce.useTranslation();function o(l,c){c===e.velocity||!gR(c)||e.onVelocityChange(c)}return g.jsxs(E.Stack,{direction:"row",gap:2,alignItems:"center",children:[r.showVelocityLegend&&g.jsx(E.Typography,{sx:{color:(i=(a=(s=t.componentsExt)==null?void 0:s.JoggingPanel)==null?void 0:a.VelocitySlider)==null?void 0:i.sliderLegendColor,fontSize:"14px"},children:n("Jogging.Velocity.bt")}),g.jsx(Of,{value:e.velocity,color:"secondary",onChange:o,min:e.min,max:e.max,"aria-labelledby":"input-slider",disabled:e.disabled,sx:{"& .MuiSlider-valueLabelOpen":{zIndex:100,backgroundColor:"transparent",top:"0px"}}}),r.showVelocitySliderLabel&&(e.renderValue?e.renderValue(e.velocity):g.jsx(zl,{value:e.velocity.toString()}))]})});function zl({value:e,sx:t}){var n;const r=E.useTheme();return g.jsx(E.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(E.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:r.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const Ef=ge.observer(({store:e})=>{const{t}=Ce.useTranslation(),r=ge.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(Tf,{store:e,velocity:e.velocityInDisplayUnits,min:e.minVelocityInDisplayUnits,max:e.maxVelocityInDisplayUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,renderValue:n=>g.jsx(zl,{value:r.valueLabelFormat(n),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),yR=ge.observer(({store:e,children:t})=>{const{t:r}=Ce.useTranslation(),n=E.useTheme();function o(h,p){(p==="translate"||p==="rotate")&&e.setSelectedCartesianMotionType(p)}Ep(()=>[e.selectedCoordSystemId,e.selectedTcpId],()=>{e.jogger.motionStream.motionStateSocket.changeUrl(e.jogger.nova.makeWebsocketURL(`/controllers/${e.jogger.motionStream.controllerId}/motion-groups/${e.jogger.motionGroupId}/state-stream?tcp=${e.selectedTcpId}`))},{fireImmediately:!0});async function s(h,p){const f=await e.activate(),m=f.motionStream.rapidlyChangingMotionState.tcp_pose,b=f.motionStream.rapidlyChangingMotionState.joint_position;m&&await e.withMotionLock(async()=>{try{e.setCurrentIncrementJog({axis:h.axis,direction:h.direction}),await e.jogger.runIncrementalCartesianMotion({currentTcpPose:m,currentJoints:b,coordSystemId:e.activeCoordSystemId,velocityInRelevantUnits:e.selectedCartesianMotionType==="translate"?e.translationVelocityMmPerSec:e.rotationVelocityRadsPerSec,axis:h.axis,direction:h.direction,motion:e.selectedCartesianMotionType==="translate"?{type:"translate",distanceMm:p.mm}:{type:"rotate",distanceRads:et.degreesToRadians(p.degrees)}})}finally{e.setCurrentIncrementJog(null),await e.deactivate()}})}async function a(h){if(!e.isLocked){if(await e.activate(),e.activeDiscreteIncrement)return s(h,e.activeDiscreteIncrement);h.motionType==="translate"?await e.jogger.translateTCP({axis:h.axis,direction:h.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.rotateTCP({axis:h.axis,direction:h.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}}async function i(){e.isLocked||e.activeDiscreteIncrement||await e.deactivate()}function l(h,p,f){var b,S,R;const m=(R=(S=(b=f.componentsExt)==null?void 0:b.JoggingPanel)==null?void 0:S.JoggingCartesian)==null?void 0:R.Axis;if(m)return p==="translate"?m[h]:m.CustomRotation??m[h]}const c=[{id:"x",icon:g.jsx(x2,{}),colors:l("X",e.selectedCartesianMotionType,n)},{id:"y",icon:g.jsx(v2,{}),colors:l("Y",e.selectedCartesianMotionType,n)},{id:"z",icon:g.jsx(w2,{}),colors:l("Z",e.selectedCartesianMotionType,n)}];function u(h){return r("General.mm.variable",{amount:h.toFixed(1)})}function d(h){return r("General.degree.variable",{amount:et.radiansToDegrees(h).toFixed(1)})}return g.jsxs(E.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsxs(E.Stack,{gap:2,children:[g.jsx(FA,{store:e}),g.jsx(Ef,{store:e}),g.jsx(E.Divider,{})]}),g.jsx(E.Stack,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:g.jsxs(E.Stack,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[g.jsxs($A,{value:e.selectedCartesianMotionType,onChange:o,exclusive:!0,"aria-label":r("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[g.jsx(E.ToggleButton,{value:"translate",children:r("Jogging.Cartesian.Translation.bt")}),g.jsx(E.ToggleButton,{value:"rotate",children:r("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&c.map(h=>{var p,f;return g.jsx(xi,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((p=e.incrementJogInProgress)==null?void 0:p.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:g.jsxs(g.Fragment,{children:[h.icon,g.jsx(E.Typography,{sx:{fontSize:"24px",color:((f=h.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var m,b;return u(((b=(m=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:m.position)==null?void 0:b[et.XYZ_TO_VECTOR[h.id]])||0)},startJogging:m=>a({axis:h.id,motionType:"translate",direction:m}),stopJogging:i},h.id)}),e.selectedCartesianMotionType==="rotate"&&c.map(h=>{var p,f;return g.jsx(xi,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((p=e.incrementJogInProgress)==null?void 0:p.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:g.jsxs(g.Fragment,{children:[g.jsx(T2,{}),g.jsx(E.Typography,{sx:{fontSize:"24px",color:((f=h.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var m,b;return d(((b=(m=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:m.orientation)==null?void 0:b[et.XYZ_TO_VECTOR[h.id]])||0)},startJogging:m=>a({axis:h.id,motionType:"rotate",direction:m}),stopJogging:i},h.id)})]})}),g.jsx(ff,{store:e}),t&&g.jsx(E.Divider,{}),t]})}),bR=ge.observer(({store:e,children:t})=>{const r=E.useTheme();async function n(s){await e.activate(),await e.jogger.rotateJoints({joint:s.joint,direction:s.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function o(){await e.jogger.stop(),await e.deactivate()}return g.jsxs(E.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsx(Ef,{store:e}),g.jsx(E.Divider,{}),g.jsx(E.Stack,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},id:"JointControls",children:g.jsx(E.Stack,{alignItems:"center",gap:"24px",children:e.jogger.motionStream.joints.map(s=>{var c,u,d;const a=(d=(u=(c=e.motionGroupDescription.operation_limits.auto_limits)==null?void 0:c.joints)==null?void 0:u[s.index])==null?void 0:d.position,i=(a==null?void 0:a.lower_limit)!==void 0?et.radiansToDegrees(a.lower_limit):void 0,l=(a==null?void 0:a.upper_limit)!==void 0?et.radiansToDegrees(a.upper_limit):void 0;return g.jsxs(E.Stack,{direction:"row",alignItems:"center",justifyContent:"center",spacing:1.5,width:"100%",children:[e.showJointsLegend&&g.jsx(E.Typography,{color:e.isLocked?r.palette.text.disabled:r.palette.text.secondary,children:`G${s.index+1}`}),g.jsx(Rp,{disabled:e.isLocked,lowerLimitDegs:i,upperLimitDegs:l,getValueDegs:()=>{const h=e.jogger.motionStream.rapidlyChangingMotionState.joint_position[s.index];return h!==void 0?et.radiansToDegrees(h):void 0},startJogging:h=>n({joint:s.index,direction:h}),stopJogging:o})]},`joint-${s.index}`)})})}),g.jsx(ff,{store:e}),t&&g.jsx(E.Divider,{}),t]})}),xR=Ue(ge.observer(e=>{const t=ji.isString(e.nova)?new l2({instanceUrl:e.nova}):e.nova,r=ge.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function n(){We.runInAction(()=>{r.loadingError=null,r.joggingStore=null});try{let o=e.store;if(!o){const s=await Dl.open(t,e.motionGroupId);o=await da.loadFor(s)}We.runInAction(()=>{r.joggingStore=o}),e.onSetup&&e.onSetup(o)}catch(o){r.loadingError=o}}return D.useEffect(()=>(n(),e.store?()=>null:()=>{var o;(o=r.joggingStore)==null||o.dispose()}),[e.store,e.nova,e.motionGroupId]),D.useEffect(()=>{const o=r.joggingStore;o&&(e.locked?o.lock("external"):o.unlock("external"))},[r.joggingStore,e.locked]),g.jsx(E.Stack,{sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:r.joggingStore?g.jsx(SR,{store:r.joggingStore,children:e.children}):g.jsx(Ul,{message:"Loading jogging",error:r.loadingError})})})),SR=ge.observer(({store:e,children:t})=>{const{t:r}=Ce.useTranslation();function n(){if(e.currentTab.id==="cartesian")return g.jsx(g.Fragment,{children:g.jsx(yR,{store:e,children:t})});if(e.currentTab.id==="joint")return g.jsx(g.Fragment,{children:g.jsx(bR,{store:e,children:t})})}return g.jsxs(E.Stack,{flexGrow:1,sx:{overflow:"hidden"},children:[g.jsx(E.Tabs,{value:e.tabIndex,onChange:e.onTabChange,variant:"fullWidth",children:e.tabs.map(o=>{const s=o.label==="cartesian"?r("Jogging.Cartesian.bt"):r("Jogging.Joints.bt"),a=o.label==="cartesian"?g.jsx(Cw,{fontSize:"small",sx:{mr:1}}):g.jsx(ww,{fontSize:"small",sx:{mr:1}});return g.jsx(E.Tab,{label:e.showTabIcons?g.jsxs(E.Stack,{direction:"row",alignItems:"center",children:[a,s]}):s,id:`jogging-tab-${o.id}`,"aria-controls":`jogging-tab-${o.id}`},o.id)})}),g.jsx(E.Stack,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:n()})]})}),If=e=>{var i;const{value:t,ref:r}=e,n=E.useTheme(),[o,s]=D.useState(!1);async function a(){if(!r||!("current"in r))return console.warn("No copy target found"),!1;try{return await navigator.clipboard.writeText(t),console.log("Copied!"),s(!0),!0}catch(l){console.error(l);const c=window.getSelection();if(c&&r&&"current"in r&&r.current){const u=document.createRange();u.selectNodeContents(r.current),c.removeAllRanges(),c.addRange(u)}}return!1}return D.useEffect(()=>{if(!o)return;const l=setTimeout(()=>s(!1),3e3);return()=>{l&&clearTimeout(l)}},[o]),g.jsx(E.Tooltip,{open:o,title:"Copied!",children:g.jsx(E.Stack,{justifyContent:"center",sx:{height:"100%",boxSizing:"border-box",padding:"6px 12px",background:(i=n.palette.backgroundPaperElevation)==null?void 0:i[8],borderRadius:"10px",minWidth:"0",cursor:"pointer"},onClick:()=>a(),children:g.jsx(E.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})})})},vR=Ue(ge.observer(({tcpPose:e,showCopyButton:t=!1})=>{const[r,n]=D.useState(null),o=c2(e),s=async()=>{try{await navigator.clipboard.writeText(o),n("Copied!"),setTimeout(()=>n(null),2e3)}catch{n("Copy failed"),setTimeout(()=>n(null),2e3)}};return g.jsxs(E.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},"data-testid":"pose-cartesian-values",children:[g.jsx(If,{value:o}),t&&g.jsx(E.Button,{variant:"contained",color:"secondary",size:"small",onClick:s,sx:{flexShrink:0},children:r||"Copy"})]})})),CR=Ue(ge.observer(({joints:e,showCopyButton:t=!1})=>{const[r,n]=D.useState(null),o=`[${e.map(a=>parseFloat(a.toFixed(4))).join(", ")}]`,s=async()=>{try{await navigator.clipboard.writeText(o),n("Copied!"),setTimeout(()=>n(null),2e3)}catch{n("Copy failed"),setTimeout(()=>n(null),2e3)}};return g.jsxs(E.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},"data-testid":"pose-joint-values",children:[g.jsx(If,{value:o}),t&&g.jsx(E.Button,{variant:"contained",color:"secondary",size:"small",onClick:s,sx:{flexShrink:0},children:r||"Copy"})]})}));class Af{constructor(){this.messages=[],this.addMessage=(t,r="info")=>{const n={id:Math.random().toString(36).substring(2,11),timestamp:new Date,message:t,level:r};this.messages.push(n)},this.clearMessages=()=>{this.messages=[]},this.addInfo=t=>{this.addMessage(t,"info")},this.addWarning=t=>{this.addMessage(t,"warning")},this.addError=t=>{this.addMessage(t,"error")},this.addDebug=t=>{this.addMessage(t,"debug")},We.makeObservable(this,{messages:We.observable,addMessage:We.action,clearMessages:We.action})}}const po=(e,t,r)=>({id:r||`${Date.now()}-${Math.random().toString(36).substring(2,11)}`,timestamp:new Date,message:e,level:t}),wR=(e,t)=>po(e,"debug",t),OR=(e,t)=>po(e,"info",t),TR=(e,t)=>po(e,"warning",t),ER=(e,t)=>po(e,"error",t),Rf=Ue(ge.observer(e=>{var u;const{messages:t=[],onClear:r,height:n=400,sx:o}=e,s=E.useTheme(),a=D.useRef(null);D.useEffect(()=>{if(t.length===0)return;const d=a.current;if(!d)return;const h=setTimeout(()=>{d.scrollTop=d.scrollHeight},10);return()=>clearTimeout(h)},[t.length]);const i=d=>d.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),l=d=>{switch(d){case"error":return s.palette.error.main;case"warning":return s.palette.warning.main;case"info":return s.palette.info.main;case"debug":return s.palette.text.disabled;default:return s.palette.text.secondary}},c=({message:d})=>{const[h,p]=D.useState(!1),[f,m]=D.useState(!1),[b,S]=D.useState(!1),R=d.message.length>150,v=async()=>{try{await navigator.clipboard.writeText(d.message),m(!0),setTimeout(()=>m(!1),2e3)}catch(I){console.error("Failed to copy message:",I)}},O=R&&!h?d.message.substring(0,150)+"...":d.message;return g.jsx(E.Box,{onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),sx:{display:"flex",gap:1,fontFamily:"monospace",flexDirection:"column","&:hover":{backgroundColor:s.palette.action.hover},borderRadius:"4px",padding:"2px 4px",margin:"-2px -4px"},children:g.jsxs(E.Box,{sx:{display:"flex",gap:1},children:[g.jsxs(E.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:s.palette.text.disabled,whiteSpace:"nowrap",flexShrink:0},children:["[",i(d.timestamp),"]"]}),g.jsx(E.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:O}),g.jsxs(E.Box,{sx:{display:"flex",alignItems:"flex-start",gap:.5,opacity:b?1:0,transition:"opacity 0.2s ease-in-out",visibility:b?"visible":"hidden"},children:[g.jsx(E.IconButton,{size:"small",onClick:v,sx:{padding:"2px",color:s.palette.text.secondary,"&:hover":{backgroundColor:s.palette.action.hover}},title:f?"Copied!":"Copy message",children:g.jsx(Gt.ContentCopy,{sx:{fontSize:12}})}),R&&g.jsx(E.IconButton,{size:"small",onClick:()=>p(!h),sx:{padding:"2px",color:s.palette.text.secondary,"&:hover":{backgroundColor:s.palette.action.hover}},title:h?"Collapse":"Expand",children:h?g.jsx(Gt.ExpandLess,{sx:{fontSize:12}}):g.jsx(Gt.ExpandMore,{sx:{fontSize:12}})})]})]})},d.id)};return g.jsxs(E.Paper,{sx:{backgroundColor:((u=s.palette.backgroundPaperElevation)==null?void 0:u[2])||"#171927",backgroundImage:"none",height:n,display:"flex",flexDirection:"column",overflow:"hidden",...o},children:[g.jsxs(E.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px"},children:[g.jsxs(E.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(Gt.DescriptionOutlined,{sx:{fontSize:16,color:s.palette.action.active,opacity:.56}}),g.jsx(E.Typography,{sx:{fontWeight:500,fontSize:"14px",lineHeight:"143%",letterSpacing:"0.17px",color:s.palette.text.primary},children:"Log"})]}),g.jsx(E.Button,{onClick:r,variant:"text",sx:{fontWeight:500,fontSize:"13px",lineHeight:"22px",letterSpacing:"0.46px",color:s.palette.primary.main,textTransform:"none",minWidth:"auto",padding:"4px 8px","&:hover":{backgroundColor:s.palette.primary.main+"14"}},children:"Clear"})]}),g.jsx(E.Box,{ref:a,sx:{flex:1,overflow:"auto",padding:"8px 16px",display:"flex",flexDirection:"column",gap:"2px",scrollbarWidth:"thin",scrollbarColor:`${s.palette.divider} transparent`,"&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:s.palette.divider,borderRadius:"3px","&:hover":{backgroundColor:s.palette.divider}}},children:t.length===0?g.jsx(E.Typography,{sx:{color:s.palette.text.disabled,fontSize:"12px",fontStyle:"italic",textAlign:"center",marginTop:2},children:"No log messages"}):t.map(d=>g.jsx(c,{message:d},d.id))})]})})),IR=Ue(ge.observer(e=>{const{store:t,onStoreReady:r,...n}=e,o=D.useRef(r);D.useEffect(()=>{o.current=r},[r]);const s=D.useMemo(()=>{var l;const i=t||new Af;return(l=o.current)==null||l.call(o,i),i},[t]),a=()=>{s.clearMessages()};return g.jsx(Rf,{...n,messages:s.messages,onClear:a})}));function AR(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function RR({baseUrl:e=AR(),...t}){return g.jsxs(E.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(E.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),g.jsxs(E.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[g.jsx(E.Typography,{color:"#fff",children:"Found no devices to connect to."}),g.jsx(E.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),g.jsx(E.DialogActions,{children:g.jsxs(E.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[g.jsx(E.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),g.jsx(E.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}var dt=(e=>(e.IDLE="idle",e.PREPARING="preparing",e.STARTING="starting",e.RUNNING="running",e.PAUSING="pausing",e.PAUSED="paused",e.STOPPING="stopping",e.COMPLETED="completed",e.FAILED="failed",e.STOPPED="stopped",e.ERROR="error",e))(dt||{});const PR=Ue(ge.observer(({state:e,onRun:t,onPause:r,onStop:n,onReset:o,requiresManualReset:s=!1,variant:a="with_pause",className:i})=>{const l=E.useTheme(),{t:c}=Ce.useTranslation(),u=()=>{const p={run:{enabled:e==="idle"||e==="stopped"||e==="paused"||e==="completed"||e==="failed"||e==="error",label:c(e==="paused"?"ProgramControl.Resume.bt":e==="error"||e==="failed"?"ProgramControl.Retry.bt":"ProgramControl.Start.bt"),color:l.palette.success.main,onClick:t},pause:{enabled:e==="running",label:c("ProgramControl.Pause.bt"),color:"#FFFFFF33",onClick:r||(()=>{})},stop:{enabled:e==="preparing"||e==="starting"||e==="running"||e==="pausing"||e==="paused",label:c("ProgramControl.Stop.bt"),color:l.palette.error.main,onClick:n}};return a==="without_pause"?[p.run,p.stop]:[p.run,p.pause,p.stop]},d=p=>{const f={sx:{fontSize:"55px"}};if(a==="without_pause")return p===0?g.jsx(Gt.PlayArrow,{...f}):g.jsx(Gt.Stop,{...f});switch(p){case 0:return g.jsx(Gt.PlayArrow,{...f});case 1:return g.jsx(Gt.Pause,{...f});case 2:return g.jsx(Gt.Stop,{...f});default:return null}},h=u();return g.jsx(E.Box,{className:i,sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:g.jsx(E.Box,{sx:{display:"flex",gap:"40px",flexWrap:"wrap",justifyContent:"center",alignItems:"center"},children:h.map((p,f)=>g.jsxs(E.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[g.jsx(E.Button,{variant:"contained",disabled:!p.enabled||e==="preparing"||e==="starting"||e==="pausing"||e==="stopping"&&!s,onClick:p.onClick,sx:{width:"88px",height:"88px",borderRadius:"88px",backgroundColor:p.color,opacity:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!s)?1:.3,"&:hover":{backgroundColor:p.color,opacity:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!s)?.8:.3},"&:disabled":{backgroundColor:p.color,opacity:.3},minWidth:"88px",flexShrink:0},children:d(f)}),g.jsx(E.Typography,{variant:"body1",sx:{color:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!s)?p.color:l.palette.text.disabled,textAlign:"center",opacity:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!s)?1:.3},children:p.label})]},p.label))})})})),Vi=Ue(ge.observer(({programState:e,safetyState:t,operationMode:r,className:n})=>{const o=E.useTheme(),{t:s}=Ce.useTranslation(),a=()=>{if(t==="SAFETY_STATE_DEVICE_EMERGENCY_STOP"||t==="SAFETY_STATE_ROBOT_EMERGENCY_STOP"||t==="SAFETY_STATE_STOP_0"||t==="SAFETY_STATE_STOP_1"||t==="SAFETY_STATE_STOP_2"||t==="SAFETY_STATE_PROTECTIVE_STOP"||t==="SAFETY_STATE_STOP"||t==="SAFETY_STATE_REDUCED"||t==="SAFETY_STATE_MASTERING"||t==="SAFETY_STATE_CONFIRM_SAFETY"||t==="SAFETY_STATE_OPERATOR_SAFETY"||t==="SAFETY_STATE_RECOVERY"||t==="SAFETY_STATE_VIOLATION")return{label:s("ProgramStateIndicator.EStop.lb"),color:o.palette.error.main};if(t==="SAFETY_STATE_UNKNOWN"||t==="SAFETY_STATE_FAULT")return{label:s("ProgramStateIndicator.Error.lb"),color:o.palette.error.main};if(t==="SAFETY_STATE_NORMAL")switch(e){case dt.PREPARING:return{label:s("ProgramStateIndicator.Preparing.lb"),color:o.palette.warning.main};case dt.STARTING:return{label:s("ProgramStateIndicator.Starting.lb"),color:o.palette.warning.main};case dt.RUNNING:return{label:s("ProgramStateIndicator.Running.lb"),color:o.palette.success.main};case dt.PAUSING:return{label:s("ProgramStateIndicator.Pausing.lb"),color:o.palette.warning.main};case dt.PAUSED:return{label:s("ProgramStateIndicator.Paused.lb"),color:o.palette.grey[600]};case dt.STOPPING:return{label:s("ProgramStateIndicator.Stopping.lb"),color:o.palette.warning.main};case dt.COMPLETED:return{label:s("ProgramStateIndicator.Completed.lb"),color:o.palette.success.main};case dt.FAILED:return{label:s("ProgramStateIndicator.Failed.lb"),color:o.palette.error.main};case dt.STOPPED:return{label:s("ProgramStateIndicator.Stopped.lb"),color:o.palette.warning.main};case dt.ERROR:return{label:s("ProgramStateIndicator.Error.lb"),color:o.palette.error.main};case dt.IDLE:default:return{label:s("ProgramStateIndicator.Ready.lb"),color:o.palette.success.main}}return{label:s("ProgramStateIndicator.Idle.lb"),color:o.palette.grey[600]}},{label:i,color:l}=a(),u=`${i} / ${(()=>{switch(r){case"OPERATION_MODE_AUTO":return s("ProgramStateIndicator.Auto.lb");case"OPERATION_MODE_MANUAL":return s("ProgramStateIndicator.Manual.lb");case"OPERATION_MODE_MANUAL_T1":return s("ProgramStateIndicator.ManualT1.lb");case"OPERATION_MODE_MANUAL_T2":return s("ProgramStateIndicator.ManualT2.lb");default:return s("ProgramStateIndicator.Auto.lb")}})()}`;return g.jsx(E.Chip,{className:n,label:g.jsx(E.Typography,{variant:"body2",sx:{fontSize:"0.75rem",lineHeight:1.2},children:u}),variant:"filled",sx:{backgroundColor:l,color:o.palette.getContrastText(l),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),Vd="0.0.0-semantically-released";function Gl(e){let t=Vd;return Vd.startsWith("0.")&&(t=""),`https://cdn.jsdelivr.net/gh/wandelbotsgmbh/wandelbots-js-react-components${t?`@${t}`:""}/public/models/${e}.glb`}function _R(e){function t(r){return r.children.length===0?[r]:[r,...r.children.flatMap(n=>t(n))]}return t(e).filter(r=>_f(r))}function Pf(e){return e.name.endsWith("_FLG")}function _f(e){return/_J[0-9]+$/.test(e.name)}function MR(e,t){let r;function n(o){if(Pf(o)){if(r)throw Error(`Found multiple flange groups in robot model ${t}; first ${r.name} then ${o.name}. Only one _FLG group is allowed.`);r=o}_f(o),o.children.map(n)}if(n(e.scene),!r)throw Error(`No flange group found in robot model ${t}. Flange must be identified with a name ending in _FLG.`);return{gltf:e}}function Mf({rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:r,children:n}){const o=D.useRef([]),s=D.useRef([]),a=D.useRef(null),{invalidate:i}=Qo.useThree();D.useEffect(()=>{const d=e.state.joint_position.joints.filter(h=>h!==void 0);return a.current=new Al(d,{tension:120,friction:20,threshold:.001}),()=>{var h;(h=a.current)==null||h.destroy()}},[]),Qo.useFrame((d,h)=>{if(a.current){const p=a.current.update(h);u(),p||i()}});function l(d){d&&(s.current=_R(d),u(),i())}function c(d){var h;o.current=d,(h=a.current)==null||h.setTarget(d)}function u(){var h;const d=((h=a.current)==null?void 0:h.getCurrentValues())||[];if(r)r(s.current,d);else for(const[p,f]of s.current.entries()){const m=t[p],b=m.theta||0,S=m.reverse_rotation_direction?-1:1;f.rotation.y=S*(d[p]||0)+b}}return Tp(()=>{const d=e.state.joint_position.joints.filter(h=>h!==void 0);requestAnimationFrame(()=>c(d))}),g.jsx("group",{ref:l,children:n})}const VR="line",kR="mesh";function jR({rapidlyChangingMotionState:e,dhParameters:t,...r}){const n=new wt.Matrix4,o=D.useRef([]),s=D.useRef([]);D.useEffect(()=>{o.current=new Array(t.length).fill(null),s.current=new Array(t.length).fill(null)},[t.length]);function a(c,u){const d=new wt.Vector3,h=new wt.Quaternion,p=new wt.Vector3;n.decompose(d,h,p);const f=d.clone(),m=new wt.Matrix4().makeRotationY(c.theta+u*(c.reverse_rotation_direction?-1:1)).multiply(new wt.Matrix4().makeTranslation(0,c.d/1e3,0)).multiply(new wt.Matrix4().makeTranslation(c.a/1e3,0,0)).multiply(new wt.Matrix4().makeRotationX(c.alpha));return n.multiply(m),n.decompose(d,h,p),{a:f,b:d}}function i(c,u,d,h){if(!t)return;const p=t[c];if(!p)return;const{a:f,b:m}=a(p,h);u.geometry.setPositions([f.toArray(),m.toArray()].flat()),d.position.set(m.x,m.y,m.z)}function l(c,u){n.identity();for(let d=0;d<Math.min(c.length,u.length);d++){const h=o.current[d],p=s.current[d];h&&p&&i(d,h,p,u[d])}}return g.jsx(g.Fragment,{children:g.jsx(Mf,{rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:l,children:g.jsxs("group",{...r,name:"Scene",children:[g.jsxs("mesh",{children:[g.jsx("sphereGeometry",{args:[.01,32,32]}),g.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]}),t.map((c,u)=>{const{a:d,b:h}=a(c,e.state.joint_position.joints[u]??0),p=`dhrobot_J0${u}`;return g.jsxs("group",{name:p,children:[g.jsx(ht.Line,{ref:f=>{o.current[u]=f},name:VR,points:[d,h],color:"white",lineWidth:5}),g.jsxs("mesh",{ref:f=>{s.current[u]=f},name:kR,position:h,children:[g.jsx("sphereGeometry",{args:[.01,32,32]}),g.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]},"mesh_"+u)]},p)})]})})})}const DR=console.warn;function UR(){return D.useEffect(()=>{console.warn=e=>{e!=="Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"&&DR(e)}},[]),g.jsx(g.Fragment,{})}function LR(e){return e.type==="Mesh"}function BR({modelURL:e,flangeRef:t,postModelRender:r,...n}){const{gltf:o}=MR(ht.useGLTF(e),e.split("/").pop()||e),s=D.useCallback(i=>{i&&r&&r()},[e]);function a(i){return LR(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:Pf(i)?t:void 0,children:i.children.map(a)},i.uuid)}return g.jsx("group",{...n,dispose:null,ref:s,children:a(o.scene)})}const NR=(e,t)=>{e.userData.isGhost||(e.traverse(r=>{if(r instanceof Te.Mesh){r.material instanceof Te.Material&&(r.material.colorWrite=!1);const n=r.clone(),o=r.clone();n.material=new Te.MeshStandardMaterial({depthTest:!0,depthWrite:!0,colorWrite:!1,polygonOffset:!0,polygonOffsetFactor:-1,side:Te.DoubleSide}),n.userData.isGhost=!0,o.material=new Te.MeshStandardMaterial({color:t,opacity:.3,depthTest:!0,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-2,side:Te.DoubleSide}),o.userData.isGhost=!0,r.parent&&(r.parent.add(n),r.parent.add(o))}}),e.userData.isGhost=!0)},FR=e=>{if(!e.userData.isGhost)return;const t=[];e.traverse(r=>{var n;r instanceof Te.Mesh&&((n=r.userData)!=null&&n.isGhost?t.push(r):r.material instanceof Te.Material&&(r.material.colorWrite=!0))}),t.forEach(r=>{r.parent&&r.parent.remove(r)}),e.userData.isGhost=!1},Vf=Ue(({rapidlyChangingMotionState:e,modelFromController:t,dhParameters:r,getModel:n=Gl,flangeRef:o,postModelRender:s,transparentColor:a,...i})=>{const[l,c]=D.useState(null),u=D.useCallback(h=>{c(h)},[]);D.useEffect(()=>{l&&(a?NR(l,a):FR(l))},[l,a]);const d=g.jsx(jR,{rapidlyChangingMotionState:e,dhParameters:r,...i});return g.jsxs(Qf.ErrorBoundary,{fallback:d,onError:h=>{console.error(h)},children:[g.jsx(D.Suspense,{fallback:d,children:g.jsx("group",{ref:u,children:g.jsx(Mf,{rapidlyChangingMotionState:e,dhParameters:r,children:g.jsx(BR,{modelURL:n(t),postModelRender:s,flangeRef:o,...i})})})}),g.jsx(UR,{})]})});function kf({connectedMotionGroup:e,getModel:t=Gl,flangeRef:r,transparentColor:n,postModelRender:o,...s}){return e.dhParameters?g.jsx(Vf,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:e.modelFromController||"",dhParameters:e.dhParameters,getModel:t,flangeRef:r,transparentColor:n,postModelRender:o,...s}):null}const $R=Ue(ge.observer(({robotName:e,programState:t,safetyState:r,operationMode:n,driveToHomeEnabled:o=!1,onDriveToHomePress:s,onDriveToHomeRelease:a,connectedMotionGroup:i,robotComponent:l=kf,customContentComponent:c,className:u})=>{var _;const d=E.useTheme(),{t:h}=Ce.useTranslation(),[p,f]=D.useState(!1),m=D.useRef(null),b=D.useRef(null),[S,R]=D.useState(!1),[v,O]=D.useState({width:400,height:600}),[I,T]=D.useState(0);D.useEffect(()=>{const j=()=>{if(b.current){const{offsetWidth:X,offsetHeight:oe}=b.current;R(X>oe),O({width:X,height:oe})}};j();const ne=new ResizeObserver(j);return b.current&&ne.observe(b.current),()=>{ne.disconnect()}},[]);const w=D.useCallback(()=>{T(j=>j+1)},[]),P=D.useCallback(()=>{!o||!s||(f(!0),s())},[o,s]),k=D.useCallback(()=>{!o||!a||(f(!1),a())},[o,a]),y=D.useCallback(()=>{p&&a&&(f(!1),a())},[p,a]),A=S?v.width<350:v.height<200,M=S?v.height<310:v.height<450;return g.jsx(E.Card,{ref:b,className:u,sx:{width:"100%",height:"100%",display:"flex",flexDirection:S?"row":"column",position:"relative",overflow:"hidden",minWidth:{xs:180,sm:220,md:250},minHeight:S?{xs:200,sm:240,md:260}:{xs:150,sm:180,md:220},border:`1px solid ${d.palette.divider}`,borderRadius:"18px",boxShadow:"none",backgroundColor:((_=d.palette.backgroundPaperElevation)==null?void 0:_[8])||"#2A2A3F",backgroundImage:"none"},children:S?g.jsxs(g.Fragment,{children:[g.jsx(E.Box,{sx:{flex:"0 0 50%",position:"relative",height:"100%",minHeight:"100%",maxHeight:"100%",borderRadius:1,m:{xs:1.5,sm:2,md:3},mr:{xs:.75,sm:1,md:1.5},overflow:"hidden",display:A?"none":"block"},children:!A&&g.jsxs(Qo.Canvas,{orthographic:!0,camera:{position:[3,2,3],zoom:1},shadows:!0,frameloop:"demand",style:{borderRadius:d.shape.borderRadius,width:"100%",height:"100%",background:"transparent",position:"absolute",top:0,left:0},dpr:[1,2],gl:{alpha:!0,antialias:!0},children:[g.jsx(ri,{}),g.jsx(ht.Bounds,{fit:!0,observe:!0,margin:1,maxDuration:1,children:g.jsx(l,{connectedMotionGroup:i,postModelRender:w})})]})}),g.jsxs(E.Box,{sx:{flex:"1",display:"flex",flexDirection:"column",justifyContent:"flex-start",width:A?"100%":"50%"},children:[g.jsxs(E.Box,{sx:{p:{xs:1.5,sm:2,md:3},pb:{xs:1,sm:1.5,md:2},textAlign:"left"},children:[g.jsx(E.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(Vi,{programState:t,safetyState:r,operationMode:n})]}),g.jsxs(E.Box,{sx:{p:{xs:1.5,sm:2,md:3},pt:0,flex:"1",display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[!M&&c&&g.jsxs(E.Box,{children:[g.jsx(c,{}),g.jsx(E.Divider,{sx:{mt:1,mb:0,borderColor:d.palette.divider,opacity:.5}})]}),g.jsx(E.Box,{sx:{mt:!M&&c?"auto":0},children:g.jsx(E.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(E.Button,{ref:m,variant:"contained",color:"secondary",size:"small",disabled:!o,onMouseDown:P,onMouseUp:k,onMouseLeave:y,onTouchStart:P,onTouchEnd:k,sx:{textTransform:"none",px:1.5,py:.5},children:h("RobotCard.DriveToHome.bt")})})})]})]})]}):g.jsx(g.Fragment,{children:g.jsxs(E.Box,{sx:{p:3,height:"100%",display:"flex",flexDirection:"column"},children:[g.jsxs(E.Box,{children:[g.jsx(E.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(Vi,{programState:t,safetyState:r,operationMode:n})]}),g.jsx(E.Box,{sx:{flex:A?0:1,position:"relative",minHeight:A?0:{xs:120,sm:150,md:200},height:A?0:"auto",borderRadius:1,overflow:"hidden",display:A?"none":"block"},children:!A&&g.jsxs(Qo.Canvas,{orthographic:!0,camera:{position:[3,2,3],zoom:1},shadows:!0,frameloop:"demand",style:{borderRadius:d.shape.borderRadius,width:"100%",height:"100%",background:"transparent",position:"absolute"},dpr:[1,2],gl:{alpha:!0,antialias:!0},children:[g.jsx(ri,{}),g.jsx(ht.Bounds,{fit:!0,clip:!0,observe:!0,margin:1,maxDuration:1,children:g.jsx(l,{connectedMotionGroup:i,postModelRender:w})})]})}),g.jsxs(E.Box,{children:[!M&&c&&g.jsxs(g.Fragment,{children:[g.jsx(c,{}),g.jsx(E.Divider,{sx:{mt:1,mb:0,borderColor:d.palette.divider,opacity:.5}})]}),g.jsx(E.Box,{sx:{display:"flex",justifyContent:"flex-start",mt:!M&&c?{xs:1,sm:2,md:5}:{xs:.5,sm:1,md:2},mb:{xs:.5,sm:.75,md:1}},children:g.jsx(E.Button,{ref:m,variant:"contained",color:"secondary",size:"small",disabled:!o,onMouseDown:P,onMouseUp:k,onMouseLeave:y,onTouchStart:P,onTouchEnd:k,sx:{textTransform:"none",px:1.5,py:.5},children:h("RobotCard.DriveToHome.bt")})})]})]})})})})),zR=pr(g.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),GR=({title:e,titleId:t,...r},n)=>V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,fill:"none",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.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"})),HR=D.forwardRef(GR);var Hl=(e=>(e.PRECONDITION_NOT_FULFILLED="PRECONDITION_NOT_FULFILLED",e.ROBOT_DISCONNECTED="ROBOT_DISCONNECTED",e.CELL_OPEN="CELL_OPEN",e.E_STOP="E_STOP",e.MANUAL_MODE="MANUAL_MODE",e.READY="READY",e))(Hl||{});const jf=Ue(ge.observer(({setupState:e,className:t})=>{const r=E.useTheme(),{t:n}=Ce.useTranslation(),o=()=>{var c,u,d,h,p,f,m;switch(e){case"READY":return{label:n("RobotSetupReadinessIndicator.Ready.lb"),indicatorColor:((c=r.palette.tertiary)==null?void 0:c.main)||r.palette.primary.main,backgroundColor:((u=r.palette.backgroundPaperElevation)==null?void 0:u[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"ROBOT_DISCONNECTED":return{label:n("RobotSetupReadinessIndicator.RobotDisconnected.lb"),indicatorColor:r.palette.error.main,backgroundColor:((d=r.palette.backgroundPaperElevation)==null?void 0:d[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"CELL_OPEN":return{label:n("RobotSetupReadinessIndicator.CellOpen.lb"),indicatorColor:r.palette.error.main,backgroundColor:((h=r.palette.backgroundPaperElevation)==null?void 0:h[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"E_STOP":return{label:n("RobotSetupReadinessIndicator.EStop.lb"),indicatorColor:r.palette.error.main,backgroundColor:((p=r.palette.backgroundPaperElevation)==null?void 0:p[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"MANUAL_MODE":return{label:n("RobotSetupReadinessIndicator.ManualMode.lb"),indicatorColor:r.palette.error.main,backgroundColor:((f=r.palette.backgroundPaperElevation)==null?void 0:f[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"PRECONDITION_NOT_FULFILLED":default:return{label:n("RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb"),indicatorColor:r.palette.error.main,backgroundColor:((m=r.palette.backgroundPaperElevation)==null?void 0:m[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText}}},{label:s,indicatorColor:a,backgroundColor:i,textColor:l}=o();return g.jsx(E.Chip,{className:t,label:g.jsxs(E.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(E.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:a,flexShrink:0}}),g.jsx(E.Typography,{variant:"body2",sx:{color:l,fontSize:"0.75rem",lineHeight:1.2},children:s})]}),variant:"filled",sx:{backgroundColor:i,color:r.palette.getContrastText(i),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),qR=Ue(ge.observer(({robotName:e,robotType:t,setupState:r,PreconditionComponent:n=jf,className:o})=>{var l;const s=E.useTheme(),a=t||"Robot",i=r===Hl.READY;return g.jsxs(E.Box,{className:o,sx:{border:`1px solid ${s.palette.divider}`,background:((l=s.palette.backgroundPaperElevation)==null?void 0:l[8])||"#292B3F",borderRadius:"8px",padding:"20px",display:"flex",alignItems:"center",justifyContent:"space-between",opacity:1},children:[g.jsxs(E.Box,{sx:{display:"flex",alignItems:"center",gap:2,flex:1},children:[i?g.jsx(E.Box,{sx:{fontSize:24,display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,"& svg":{fill:`${s.palette.primary.main} !important`},"& svg path":{fill:`${s.palette.primary.main} !important`}},children:g.jsx(HR,{})}):g.jsx(zR,{sx:{color:s.palette.error.main,fontSize:24}}),g.jsx(E.Typography,{variant:"body1",sx:{fontWeight:500,color:s.palette.text.primary},children:e}),g.jsx(E.Divider,{orientation:"vertical",flexItem:!0,sx:{backgroundColor:s.palette.text.secondary,opacity:.3,width:"1px"}}),g.jsx(E.Typography,{variant:"body2",sx:{color:s.palette.text.secondary},children:a})]}),n&&g.jsx(n,{setupState:r})]})})),WR=Array(6).fill(2*Math.PI),kt={Abb:"abb",Fanuc:"fanuc",Kuka:"kuka",Universalrobots:"universalrobots",Yaskawa:"yaskawa"},ki={[kt.Abb]:[0,0,0,0,Math.PI/2,0,0],[kt.Fanuc]:[0,0,0,0,-Math.PI/2,0,0],[kt.Yaskawa]:[0,0,0,0,-Math.PI/2,0,0],[kt.Kuka]:[0,-Math.PI/2,Math.PI/2,0,Math.PI/2,0,0],[kt.Universalrobots]:[0,-Math.PI/2,-Math.PI/2,-Math.PI/2,Math.PI/2,-Math.PI/2,0]};function Df(e){const[t]=e.split("_");switch(t){case"ABB":return kt.Abb;case"FANUC":return kt.Fanuc;case"YASKAWA":return kt.Yaskawa;case"KUKA":return kt.Kuka;case"UniversalRobots":return kt.Universalrobots;default:return null}}function JR(e,t){const r=Df(e);return r&&r in ki?ki[r]:t||null}const YR=({title:e,titleId:t,...r},n)=>V.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.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"})),KR=D.forwardRef(YR),XR=({title:e,titleId:t,...r},n)=>V.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.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"})),QR=D.forwardRef(XR),jt=ge.observer(({id:e,icon:t,color:r,title:n,name:o,label:s,explanation:a,literalValue:i,anchorOrigin:l,transformOrigin:c})=>{const u=ge.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(E.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(E.SvgIcon,{component:t,sx:{color:r}}),s&&g.jsx("div",{style:{color:r},children:s})]}),g.jsx(E.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(E.Stack,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[g.jsxs("div",{children:[n&&g.jsx(E.Typography,{component:"span",fontSize:"14px",children:`${n}: `}),g.jsx(E.Typography,{component:"span",color:r,fontWeight:"bold",fontSize:"14px",children:o})]}),g.jsx(E.Typography,{fontSize:"14px",children:a}),i&&g.jsx(E.Typography,{fontSize:"12px",children:i})]})})]})}),ZR=ge.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:r,transformOrigin:n,compact:o})=>{const s=E.useTheme(),{t:a}=Ce.useTranslation();return e?g.jsx(jt,{id:"motion-group-virtual",icon:QR,color:s.palette.tertiary.main,name:a("SafetyBar.ControllerType.Virtual.lb"),label:o?null:a("SafetyBar.ControllerType.Virtual.lb"),explanation:g.jsxs(Ce.Trans,{i18nKey:"SafetyBar.MotionGroup.Virtual.Explanation.lb",values:{motionGroupId:t},children:["Motion group ",g.jsx("code",{children:t})," refers to a virtual robot with no physical counterpart. It can be freely manipulated without special safety precautions."]}),anchorOrigin:r,transformOrigin:n}):g.jsx(jt,{id:"motion-group-physical",icon:KR,color:s.palette.primary.main,name:a("SafetyBar.ControllerType.Physical.lb"),label:o?null:a("SafetyBar.ControllerType.Physical.lb"),explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:g.jsx("code",{}),strong:g.jsx("strong",{})}}),anchorOrigin:r,transformOrigin:n})}),eP=({title:e,titleId:t,...r},n)=>V.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.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"})),tP=D.forwardRef(eP),rP=({title:e,titleId:t,...r},n)=>V.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.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})),nP=D.forwardRef(rP),oP=({title:e,titleId:t,...r},n)=>V.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.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"})),sP=D.forwardRef(oP),aP=ge.observer(({operationMode:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:o}=Ce.useTranslation(),s=E.useTheme();switch(e){case"OPERATION_MODE_AUTO":return g.jsx(jt,{id:"operation-mode-auto",icon:tP,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Automatic.ti"),label:n?null:o("SafetyBar.OperationMode.Automatic.ti"),color:s.palette.text.secondary,explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.OperationMode.Auto.Explanation.lb",children:"The robot controller is in automatic operation mode. Automated movement without manual confirmation is possible in this mode."}),anchorOrigin:t,transformOrigin:r});case"OPERATION_MODE_MANUAL":case"OPERATION_MODE_MANUAL_T1":case"OPERATION_MODE_MANUAL_T2":return g.jsx(jt,{id:"operation-mode-manual",icon:sP,color:s.palette.warning.main,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Manual.lb"),label:n?null:o("SafetyBar.OperationMode.Manual.lb"),explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.OperationMode.Manual.Explanation.lb",children:"The robot controller is in manual operation mode. On a physical robot, this generally indicates that an enabling switch must be held for the robot to move successfully."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:return g.jsx(jt,{id:"operation-mode-error",icon:nP,color:s.palette.warning.main,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Error.lb"),label:n?null:o("SafetyBar.OperationMode.Error.lb"),explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.OperationMode.Error.Explanation.lb",children:"The robot controller has entered an unexpected operation mode. Motion group movement may not be possible."}),literalValue:e,anchorOrigin:t,transformOrigin:r})}}),iP=({title:e,titleId:t,...r},n)=>V.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.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"})),lP=D.forwardRef(iP),cP=({title:e,titleId:t,...r},n)=>V.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),V.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"}),V.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"})),uP=D.forwardRef(cP),dP=({title:e,titleId:t,...r},n)=>V.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.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})),hP=D.forwardRef(dP),pP=({title:e,titleId:t,...r},n)=>V.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.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"})),fP=D.forwardRef(pP),mP=({title:e,titleId:t,...r},n)=>V.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?V.createElement("title",{id:t},e):null,V.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"})),gP=D.forwardRef(mP),yP=ge.observer(({safetyState:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:o}=Ce.useTranslation(),s=E.useTheme();switch(e){case"SAFETY_STATE_NORMAL":return g.jsx(jt,{id:"safety-state-normal",title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Normal.lb"),label:n?null:o("SafetyBar.SafetyState.Normal.lb"),icon:fP,color:s.palette.text.secondary,explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.SafetyState.Normal.Explanation.lb",children:"The robot controller is in a normal safety state. Movement is not prevented by this state."}),anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_DEVICE_EMERGENCY_STOP":case"SAFETY_STATE_ROBOT_EMERGENCY_STOP":return g.jsx(jt,{id:"safety-state-estop",title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Estop.lb"),label:n?null:o("SafetyBar.SafetyState.Estop.lb"),icon:uP,color:s.palette.error.main,explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.StopState.Estop.Explanation.lb",children:"An emergency stop of the robot controller has been triggered. Movement of the robot is no longer possible until the estop is released."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_STOP_0":case"SAFETY_STATE_STOP_1":case"SAFETY_STATE_STOP_2":case"SAFETY_STATE_PROTECTIVE_STOP":case"SAFETY_STATE_STOP":return g.jsx(jt,{id:"safety-state-stop",icon:gP,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Stop.lb"),label:n?null:o("SafetyBar.SafetyState.Stop.lb"),color:s.palette.warning.main,explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.SafetyState.Stop.Explanation.lb",children:"The robot controller has entered a stop state. Movement is no longer possible until the stop state is resolved."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_REDUCED":case"SAFETY_STATE_MASTERING":case"SAFETY_STATE_CONFIRM_SAFETY":case"SAFETY_STATE_OPERATOR_SAFETY":case"SAFETY_STATE_RECOVERY":case"SAFETY_STATE_VIOLATION":return g.jsx(jt,{id:"safety-state-manual-action-required",icon:hP,color:s.palette.warning.main,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.ManualActionRequired.lb"),label:n?null:o("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.SafetyState.ManualActionRequired.Explanation.lb",children:"The robot controller has entered a safety state requiring manual action to resolve."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_UNKNOWN":case"SAFETY_STATE_FAULT":return g.jsx(jt,{id:"safety-state-error",icon:lP,color:s.palette.error.main,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Error.lb"),label:n?null:o("SafetyBar.SafetyState.Error.lb"),explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:g2(e,`Unknown safety state ${e}`)}}),bP=Ue(ge.observer(({isVirtual:e,motionGroupId:t,operationMode:r,safetyState:n,anchorOrigin:o,transformOrigin:s,compact:a=!0})=>{const i=a?1:2;return g.jsxs(E.Stack,{direction:"row",gap:i,alignItems:"center",sx:{height:"24px"},children:[g.jsx(yP,{safetyState:n,anchorOrigin:o,transformOrigin:s,compact:a}),g.jsx(E.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(aP,{operationMode:r,anchorOrigin:o,transformOrigin:s,compact:a}),g.jsx(E.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(ZR,{isVirtual:e,motionGroupId:t,anchorOrigin:o,transformOrigin:s,compact:a})]})})),xP=E.styled(E.Fab,{shouldForwardProp:e=>e!=="selected"})(({theme:e})=>{var t,r,n;return{borderRadius:"20px","&:hover":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[7]},variants:[{props:({selected:o})=>!o,style:{background:(r=e.palette.backgroundPaperElevation)==null?void 0:r[0],color:e.palette.action.disabled,"> img":{opacity:.4}}},{props:({selected:o})=>o,style:{background:(n=e.palette.backgroundPaperElevation)==null?void 0:n[11],border:`1px solid ${e.palette.divider}`,color:e.palette.primary.contrastText}}]}}),SP=e=>{const{ref:t,...r}=e;return g.jsx(xP,{ref:t,selected:e.selected,...r,color:"secondary",variant:"circular"})};function vP(e){const{children:t,value:r,index:n,...o}=e;return g.jsx("div",{role:"tabpanel",hidden:r!==n,id:`tabpanel-${n}`,"aria-labelledby":`tab-${n}`,...o,children:r===n&&g.jsx(E.Box,{children:t})})}function CP({children:e,...t}){const{fullWidth:r,indicator:n,onChange:o,orientation:s,scrollButtons:a,selectionFollowsFocus:i,textColor:l,value:c,variant:u,...d}=t;return g.jsx(E.Box,{...d,children:e})}const wP=Ue(ge.observer(e=>{const{items:t,activeTab:r,defaultActiveTab:n=0,onTabChange:o,sx:s,ref:a}=e,i=r!==void 0,[l,c]=D.useState(n),u=i?r:l;D.useEffect(()=>{i||t.length!==0&&(l<0||l>t.length-1)&&c(0)},[t.length,i,l]);const d=(h,p)=>{i||c(p),o==null||o(p)};return g.jsxs(E.Box,{ref:a,sx:{height:"100%",display:"flex",flexDirection:"column",...s},children:[g.jsx(E.Box,{sx:{px:0,py:0,overflow:"visible",position:"relative",paddingTop:h=>h.spacing(2),paddingRight:h=>h.spacing(2.5)},children:g.jsx(E.Tabs,{value:u,onChange:d,sx:{minHeight:"32px",backgroundColor:"transparent",overflow:"visible","& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:2,overflow:"visible",paddingTop:0,paddingBottom:0},"& .MuiTabs-scroller":{overflow:"visible !important"},"& .MuiTab-root":{overflow:"visible"}},children:t.map((h,p)=>{var O,I,T;const f=()=>{if(!h.badge)return;const w=h.badge.content,P=h.badge.max;return typeof w=="number"&&P&&w>P?`${P}+`:w},m=()=>{if(!h.badge)return!1;const w=h.badge.content,P=h.badge.showZero;return!(w===0&&!P)},b=f(),S=m(),R=()=>{i||c(p),o==null||o(p)},v=g.jsx(E.Tab,{label:h.label,icon:h.icon,iconPosition:"start",disableRipple:!0,onClick:R,sx:{minHeight:"32px",height:"32px",padding:"0px 10px",borderRadius:"12px",backgroundColor:w=>{var P;return((P=w.palette.backgroundPaperElevation)==null?void 0:P[11])||"#32344B"},color:"text.primary",opacity:u===p?1:.38,fontSize:"13px",transition:"all 0.2s ease-in-out",position:"relative",overflow:"visible","&:hover":{opacity:u===p?1:.6},"&.Mui-selected":{opacity:1,backgroundColor:w=>{var P;return((P=w.palette.backgroundPaperElevation)==null?void 0:P[11])||"#32344B"},color:"text.primary"},"&:focus":{outline:"none"},"&:active":{transform:"none"}}},h.id);return S?g.jsx(CP,{component:"span",sx:{display:"inline-flex"},children:g.jsx(E.Badge,{badgeContent:b,color:((O=h.badge)==null?void 0:O.color)||"error",max:(I=h.badge)==null?void 0:I.max,showZero:(T=h.badge)==null?void 0:T.showZero,anchorOrigin:{vertical:"top",horizontal:"right"},overlap:"rectangular",sx:{"& .MuiBadge-badge":{opacity:"1 !important"}},children:v})},h.id):v})})}),g.jsx(E.Box,{sx:{mt:h=>h.spacing(2),borderBottom:1,borderColor:"divider"}}),g.jsx(E.Box,{sx:{flex:1,overflow:"auto"},children:t.map((h,p)=>g.jsx(vP,{value:u,index:p,children:h.content},h.id))})]})})),OP={$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"},TP=D.lazy(()=>import("@monaco-editor/react"));let ti=null;async function EP(){if(!ti){const[{createHighlighter:e},{shikiToMonaco:t}]=await Promise.all([import("shiki"),import("@shikijs/monaco")]);ti={shiki:await e({langs:[OP],themes:["dark-plus","light-plus"]}),shikiToMonaco:t}}return ti}const IP=Ue(e=>{const t=E.useTheme(),[r,n]=D.useState("dark-plus"),o=t.palette.mode==="dark"?"dark-plus":"light-plus";async function s(a){var c,u;a.languages.register({id:"wandelscript"}),a.languages.setLanguageConfiguration("wandelscript",{comments:{lineComment:"#"},brackets:[["(",")"],["[","]"]],autoClosingPairs:[{open:"[",close:"]"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"}]});const{shiki:i,shikiToMonaco:l}=await EP();l(i,a),a.editor.defineTheme(o,((u=(c=t.componentsExt)==null?void 0:c.WandelscriptEditor)==null?void 0:u.monacoTheme)??{base:t.palette.mode==="dark"?"vs-dark":"vs",inherit:!0,rules:[],colors:{}}),e.monacoSetup&&e.monacoSetup(a),n(o)}return g.jsx(D.Suspense,{fallback:g.jsx(Ul,{}),children:g.jsx(TP,{value:e.code,onMount:(a,i)=>{s(i)},onChange:e.onChange,defaultLanguage:"wandelscript",theme:r,options:{minimap:{enabled:!1},wordWrap:"on",automaticLayout:!0,...e.monacoOptions}})})});function Uf(){var t,r,n,o,s,a,i;const e=E.createTheme({palette:{mode:"dark",text:{primary:"rgba(255, 255, 255, 1)",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.38)"},primary:{main:"rgba(142, 86, 252, 1)",dark:"rgba(136, 58, 255, 1)",light:"rgba(157, 131, 246, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},secondary:{main:"rgba(255, 255, 255, 1)",dark:"rgba(255, 255, 255, 0.06)",contrastText:"rgba(255, 255, 255, 0.87)"},tertiary:{main:"rgba(100, 255, 218, 1)",dark:"rgba(38, 166, 154, 1)",light:"rgba(167, 255, 235, 1)",contrastText:"rgba(0, 0, 0, 1)"},error:{main:"rgba(239, 83, 80, 1)",dark:"rgba(229, 57, 53, 1)",light:"rgba(239, 154, 154, 1)",contrastText:"rgba(255, 255, 255, 1)"},warning:{main:"rgba(255, 171, 64, 1)",dark:"rgba(255, 145, 0, 1)",light:"rgba(255, 209, 128, 1)",contrastText:"rgba(0, 0, 0, 0.87)"},success:{main:"rgba(38, 166, 154, 1)",dark:"rgba(0, 121, 107, 1)",light:"rgba(128, 203, 196, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},background:{default:"rgba(2, 6, 23, 1)",paper:"rgba(17, 19, 31, 1)"},action:{active:"rgba(255, 255, 255, 0.56)",hover:"rgba(255, 255, 255, 0.08)",selected:"rgba(255, 255, 255, 0.16)",disabledBackground:"rgba(255, 255, 255, 0.12)",focus:"rgba(255, 255, 255, 0.12)",disabled:"rgba(255, 255, 255, 0.38)"},common:{white:"rgba(255, 255, 255, 1)",black:"rgba(0, 0, 0, 1)"},divider:"rgba(255, 255, 255, 0.12)",backgroundPaperElevation:{0:"rgba(17,19,31,1.0)",1:"rgba(20,22,35,1.0)",2:"rgba(23,25,39,1.0)",3:"rgba(26,28,43,1.0)",4:"rgba(29,31,47,1.0)",5:"rgba(32,34,51,1.0)",6:"rgba(35,37,55,1.0)",7:"rgba(38,40,59,1.0)",8:"rgba(41,43,63,1.0)",9:"rgba(44,46,67,1.0)",10:"rgba(47,49,71,1.0)",11:"rgba(50,52,75,1.0)",12:"rgba(53,55,79,1.0)",13:"rgba(56,58,83,1.0)",14:"rgba(59,61,87,1.0)",15:"rgba(62,64,91,1.0)",16:"rgba(57,63,87,1.0)"}},paletteExt:{primary:{hover:"rgba(142, 86, 252, 0.08)",selected:"rgba(142, 86, 252, 0.16)",focus:"rgba(142, 86, 252, 0.12)",focusVisible:"rgba(142, 86, 252, 0.3)",outlineBorder:"rgba(142, 86, 252, 0.5)"},secondary:{tonal:"rgba(255,255,255,0.1)"}}});return{...e,components:{MuiCssBaseline:{styleOverrides:{"html, body, *":{scrollbarWidth:"none",msOverflowStyle:"none"},"html:hover, body:hover, *:hover":{scrollbarWidth:"thin",scrollbarColor:`${e.palette.divider} transparent`},".MuiDataGrid-panelContent":{borderRadius:"16px !important","& .MuiPaper-root":{borderRadius:"16px !important"}},".MuiDataGrid-filterForm":{borderRadius:"16px !important","& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}},"& .MuiTextField-root":{"& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}}}},".MuiDataGrid-filterFormValueInput":{"& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}}}}},MuiDataGrid:{styleOverrides:{root:{},panelContent:{borderRadius:"16px !important"},filterForm:{"& .MuiInputBase-root":{borderRadius:"10px !important","& fieldset":{borderRadius:"10px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"10px !important"}}},filterFormValueInput:{"& .MuiInputBase-root":{borderRadius:"10px !important","& fieldset":{borderRadius:"10px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"10px !important"}}}}},MuiButton:{styleOverrides:{root:{textTransform:"none",borderRadius:"10px"}},variants:[{props:{color:"secondary",variant:"contained"},style:{border:`1px solid ${e.palette.divider}`,background:(n=(r=(t=e.paletteExt)==null?void 0:t.secondary)==null?void 0:r.tonal)==null?void 0:n.toString()}},{props:{color:"secondary",variant:"outlined"},style:{border:`1px solid ${e.palette.divider}`}}]},MuiTab:{styleOverrides:{root:{textTransform:"none",color:e.palette.text.secondary,"&.Mui-selected":{color:e.palette.text.primary}}}},MuiTabs:{styleOverrides:{root:{background:(o=e.palette.backgroundPaperElevation)==null?void 0:o[1]}}},MuiToggleButtonGroup:{styleOverrides:{root:{".MuiToggleButtonGroup-firstButton":{borderRadius:"10px 0 0 10px"},".MuiToggleButtonGroup-lastButton":{borderRadius:"0 10px 10px 0"}}}},MuiToggleButton:{styleOverrides:{root:{textTransform:"none",padding:"6px 16px"}}},MuiSelect:{variants:[{props:{variant:"filled"},style:{borderRadius:"10px","::before, ::after":{visibility:"collapse"},".MuiInputBase-input":{padding:"6px 16px",borderRadius:"10px"}}}]},MuiDrawer:{styleOverrides:{paper:{border:"none",boxShadow:"4px 0 8px -4px rgba(0, 0, 0, 0.3)"}}},MuiFab:{styleOverrides:{root:{background:(a=(s=e.paletteExt)==null?void 0:s.secondary)==null?void 0:a.tonal}},variants:[{props:{color:"primary"},style:{background:e.palette.primary.main}}]}},componentsExt:{JoggingPanel:{JoggingCartesian:{Axis:{X:{backgroundColor:"rgba(215, 66, 56, 1)",borderColor:"rgba(215, 66, 56, 1)",buttonBackgroundColor:{default:"rgba(241, 77, 66, 1)",pressed:"rgba(138, 41, 35, 1)",hovered:"rgba(241, 77, 66, 1)",disabled:"rgba(241, 77, 66, 1)"},color:"rgba(255, 198, 198, 1)",labelColor:e.palette.text.primary},Y:{backgroundColor:"rgba(20, 151, 108, 1)",borderColor:"rgba(20, 151, 108, 1)",buttonBackgroundColor:{default:"rgba(28, 188, 135, 1)",pressed:"rgba(11, 89, 63, 1)",disabled:"rgba(28, 188, 135, 1)",hovered:"rgba(28, 188, 135, 1)"},color:"rgba(215, 255, 242, 1)",labelColor:e.palette.text.primary},Z:{backgroundColor:"rgba(1, 87, 155, 1)",borderColor:"rgba(1, 87, 155, 1)",buttonBackgroundColor:{default:"rgba(2, 136, 209, 1)",pressed:"rgba(2, 64, 114, 1)",disabled:"rgba(2, 136, 209, 1)",hovered:"rgba(2, 136, 209, 1)"},color:"rgba(210, 239, 255, 1)",labelColor:e.palette.text.primary}}},JoggingJoint:{Joint:{arrowColor:e.palette.text.primary}},VelocitySlider:{sliderLegendColor:e.palette.text.primary}},WandelscriptEditor:{monacoTheme:{base:"vs-dark",inherit:!0,rules:[{token:"keyword",foreground:"#b349a9ff"}],colors:{"editor.background":E.rgbToHex(((i=e.palette.backgroundPaperElevation)==null?void 0:i[5])??""),"editor.foreground":"#d4d4d4","editorLineNumber.foreground":"#797979","editorLineNumber.activeForeground":"#e9e9e9","editor.lineHighlightBorder":"#e9e9e911"}}}}}}function AP(){const e=Uf();return e.palette.mode="light",e}function RP(e){var n,o,s,a;let t=!0;((n=e.palette)==null?void 0:n.mode)==="light"?t=!1:((o=e.palette)==null?void 0:o.mode)!=="dark"&&(t=!(typeof window<"u"&&((a=(s=window.matchMedia)==null?void 0:s.call(window,"(prefers-color-scheme: light)"))==null?void 0:a.matches)));const r=t?Uf():AP();return rh(r,e)}exports.AppHeader=mm;exports.CollisionSceneRenderer=am;exports.CycleTimer=VC;exports.JoggingCartesianAxisControl=xi;exports.JoggingJointRotationControl=Rp;exports.JoggingPanel=xR;exports.JoggingStore=da;exports.LoadingCover=Ul;exports.LoadingErrorMessage=rf;exports.LogPanel=IR;exports.LogStore=Af;exports.LogViewer=Rf;exports.MANUFACTURER_HOME_CONFIGS=ki;exports.NoMotionGroupModal=RR;exports.PoseCartesianValues=vR;exports.PoseJointValues=CR;exports.PresetEnvironment=ri;exports.ProgramControl=PR;exports.ProgramState=dt;exports.ProgramStateIndicator=Vi;exports.Robot=kf;exports.RobotCard=$R;exports.RobotListItem=qR;exports.RobotSetupReadinessIndicator=jf;exports.RobotSetupReadinessState=Hl;exports.SafetyBar=bP;exports.SafetyZonesRenderer=cm;exports.SelectableFab=SP;exports.SupportedRobot=Vf;exports.TabBar=wP;exports.Timer=BC;exports.TrajectoryRenderer=um;exports.ValueInterpolator=Al;exports.VelocitySlider=Tf;exports.VelocitySliderLabel=zl;exports.WandelbotsDataGrid=Op;exports.WandelscriptEditor=IP;exports.createDebugMessage=wR;exports.createErrorMessage=ER;exports.createInfoMessage=OR;exports.createLogMessage=po;exports.createNovaMuiTheme=RP;exports.createWarningMessage=TR;exports.defaultAxisConfig=WR;exports.defaultGetModel=Gl;exports.extractManufacturer=Df;exports.getDefaultHomeConfig=JR;exports.i18n=Di;exports.useAnimationFrame=ea;exports.useAutorun=Tp;exports.useInterpolation=Rl;exports.useMounted=Zs;exports.useReaction=Ep;
|
|
149
|
+
`):" "+Ju(a[0]):"as no adapter specified";throw new de("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return o}const Xp={getAdapter:aT,adapters:kl};function Wa(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new bn(null,e)}function Yu(e){return Wa(e),e.headers=ct.from(e.headers),e.data=qa.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Xp.getAdapter(e.adapter||ho.adapter,e)(e).then(function(n){return Wa(e),n.data=qa.call(e,e.transformResponse,n),n.headers=ct.from(n.headers),n},function(n){return Wp(n)||(Wa(e),n&&n.response&&(n.response.data=qa.call(e,e.transformResponse,n.response),n.response.headers=ct.from(n.response.headers))),Promise.reject(n)})}const Zp="1.13.2",aa={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{aa[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Ku={};aa.transitional=function(t,r,n){function o(s,a){return"[Axios v"+Zp+"] Transitional option '"+s+"'"+a+(n?". "+n:"")}return(s,a,i)=>{if(t===!1)throw new de(o(a," has been removed"+(r?" in "+r:"")),de.ERR_DEPRECATED);return r&&!Ku[a]&&(Ku[a]=!0,console.warn(o(a," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,a,i):!0}};aa.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function iT(e,t,r){if(typeof e!="object")throw new de("options must be an object",de.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const s=n[o],a=t[s];if(a){const i=e[s],l=i===void 0||a(i,s,e);if(l!==!0)throw new de("option "+s+" must be "+l,de.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new de("Unknown option "+s,de.ERR_BAD_OPTION)}}const Yo={assertOptions:iT,validators:aa},Mt=Yo.validators;let Cr=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Lu,response:new Lu}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
150
|
+
`+s):n.stack=s}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Ir(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&Yo.assertOptions(n,{silentJSONParsing:Mt.transitional(Mt.boolean),forcedJSONParsing:Mt.transitional(Mt.boolean),clarifyTimeoutError:Mt.transitional(Mt.boolean)},!1),o!=null&&(L.isFunction(o)?r.paramsSerializer={serialize:o}:Yo.assertOptions(o,{encode:Mt.function,serialize:Mt.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Yo.assertOptions(r,{baseUrl:Mt.spelling("baseURL"),withXsrfToken:Mt.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=s&&L.merge(s.common,s[r.method]);s&&L.forEach(["delete","get","head","post","put","patch","common"],f=>{delete s[f]}),r.headers=ct.concat(a,s);const i=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(l=l&&m.synchronous,i.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,h;if(!l){const f=[Yu.bind(this),void 0];for(f.unshift(...i),f.push(...c),h=f.length,u=Promise.resolve(r);d<h;)u=u.then(f[d++],f[d++]);return u}h=i.length;let p=r;for(;d<h;){const f=i[d++],m=i[d++];try{p=f(p)}catch(b){m.call(this,b);break}}try{u=Yu.call(this,p)}catch(f){return Promise.reject(f)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=Ir(this.defaults,t);const r=Yp(t.baseURL,t.url,t.allowAbsoluteUrls);return Gp(r,t.params,t.paramsSerializer)}};L.forEach(["delete","get","head","options"],function(t){Cr.prototype[t]=function(r,n){return this.request(Ir(n||{},{method:t,url:r,data:(n||{}).data}))}});L.forEach(["post","put","patch"],function(t){function r(n){return function(s,a,i){return this.request(Ir(i||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}Cr.prototype[t]=r(),Cr.prototype[t+"Form"]=r(!0)});let lT=class ef{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(o=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](o);n._listeners=null}),this.promise.then=o=>{let s;const a=new Promise(i=>{n.subscribe(i),s=i}).then(o);return a.cancel=function(){n.unsubscribe(s)},a},t(function(s,a,i){n.reason||(n.reason=new bn(s,a,i),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new ef(function(o){t=o}),cancel:t}}};function cT(e){return function(r){return e.apply(null,r)}}function uT(e){return L.isObject(e)&&e.isAxiosError===!0}const Oi={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Oi).forEach(([e,t])=>{Oi[t]=e});function tf(e){const t=new Cr(e),r=Vp(Cr.prototype.request,t);return L.extend(r,Cr.prototype,t,{allOwnKeys:!0}),L.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return tf(Ir(e,o))},r}const U=tf(ho);U.Axios=Cr;U.CanceledError=bn;U.CancelToken=lT;U.isCancel=Wp;U.VERSION=Zp;U.toFormData=sa;U.AxiosError=de;U.Cancel=U.CanceledError;U.all=function(t){return Promise.all(t)};U.spread=cT;U.isAxiosError=uT;U.mergeConfig=Ir;U.AxiosHeaders=ct;U.formToJSON=e=>qp(L.isHTMLForm(e)?new FormData(e):e);U.getAdapter=Xp.getAdapter;U.HttpStatusCode=Oi;U.default=U;const{Axios:_R,AxiosError:Ti,CanceledError:kR,isCancel:jR,CancelToken:DR,VERSION:UR,all:LR,Cancel:BR,isAxiosError:dT,spread:FR,toFormData:$R,AxiosHeaders:NR,HttpStatusCode:zR,formToJSON:GR,getAdapter:HR,mergeConfig:qR}=U;function hT(e){var t=[];if(e.length===0)return"";if(typeof e[0]!="string")throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var r=e.shift();e[0]=r+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var n=0;n<e.length;n++){var o=e[n];if(typeof o!="string")throw new TypeError("Url must be a string. Received "+o);o!==""&&(n>0&&(o=o.replace(/^[\/]+/,"")),n<e.length-1?o=o.replace(/[\/]+$/,""):o=o.replace(/[\/]+$/,"/"),t.push(o))}var s=t.join("/");s=s.replace(/\/(\?|&|#[^!])/g,"$1");var a=s.split("?");return s=a.shift()+(a.length>0?"?":"")+a.join("&"),s}function Ja(){var e;return typeof arguments[0]=="object"?e=arguments[0]:e=[].slice.call(arguments),hT(e)}var gt={},Qu;function pT(){if(Qu)return gt;Qu=1,Object.defineProperty(gt,"__esModule",{value:!0}),gt.PathError=gt.TokenData=void 0,gt.parse=c,gt.compile=u,gt.match=p,gt.pathToRegexp=f,gt.stringify=O;const e="/",t=w=>w,r=/^[$_\p{ID_Start}]$/u,n=/^[$\u200c\u200d\p{ID_Continue}]$/u,o={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function s(w){return w.replace(/[{}()\[\]+?!:*\\]/g,"\\$&")}function a(w){return w.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class i{constructor(R,k){this.tokens=R,this.originalPath=k}}gt.TokenData=i;class l extends TypeError{constructor(R,k){let y=R;k&&(y+=`: ${k}`),y+="; visit https://git.new/pathToRegexpError for info",super(y),this.originalPath=k}}gt.PathError=l;function c(w,R={}){const{encodePath:k=t}=R,y=[...w],A=[];let V=0,M=0;function j(){let Q="";if(r.test(y[V]))do Q+=y[V++];while(n.test(y[V]));else if(y[V]==='"'){let oe=V;for(;V++<y.length;){if(y[V]==='"'){V++,oe=0;break}y[V]==="\\"&&V++,Q+=y[V]}if(oe)throw new l(`Unterminated quote at index ${oe}`,w)}if(!Q)throw new l(`Missing parameter name at index ${V}`,w);return Q}for(;V<y.length;){const Q=y[V],oe=o[Q];oe?A.push({type:oe,index:V++,value:Q}):Q==="\\"?A.push({type:"escape",index:V++,value:y[V++]}):Q===":"?A.push({type:"param",index:V++,value:j()}):Q==="*"?A.push({type:"wildcard",index:V++,value:j()}):A.push({type:"char",index:V++,value:Q})}A.push({type:"end",index:V,value:""});function ne(Q){const oe=[];for(;;){const X=A[M++];if(X.type===Q)break;if(X.type==="char"||X.type==="escape"){let se=X.value,F=A[M];for(;F.type==="char"||F.type==="escape";)se+=F.value,F=A[++M];oe.push({type:"text",value:k(se)});continue}if(X.type==="param"||X.type==="wildcard"){oe.push({type:X.type,name:X.value});continue}if(X.type==="{"){oe.push({type:"group",tokens:ne("}")});continue}throw new l(`Unexpected ${X.type} at index ${X.index}, expected ${Q}`,w)}return oe}return new i(ne("end"),w)}function u(w,R={}){const{encode:k=encodeURIComponent,delimiter:y=e}=R,A=typeof w=="object"?w:c(w,R),V=d(A.tokens,y,k);return function(j={}){const[ne,...Q]=V(j);if(Q.length)throw new TypeError(`Missing parameters: ${Q.join(", ")}`);return ne}}function d(w,R,k){const y=w.map(A=>h(A,R,k));return A=>{const V=[""];for(const M of y){const[j,...ne]=M(A);V[0]+=j,V.push(...ne)}return V}}function h(w,R,k){if(w.type==="text")return()=>[w.value];if(w.type==="group"){const A=d(w.tokens,R,k);return V=>{const[M,...j]=A(V);return j.length?[""]:[M]}}const y=k||t;return w.type==="wildcard"&&k!==!1?A=>{const V=A[w.name];if(V==null)return["",w.name];if(!Array.isArray(V)||V.length===0)throw new TypeError(`Expected "${w.name}" to be a non-empty array`);return[V.map((M,j)=>{if(typeof M!="string")throw new TypeError(`Expected "${w.name}/${j}" to be a string`);return y(M)}).join(R)]}:A=>{const V=A[w.name];if(V==null)return["",w.name];if(typeof V!="string")throw new TypeError(`Expected "${w.name}" to be a string`);return[y(V)]}}function p(w,R={}){const{decode:k=decodeURIComponent,delimiter:y=e}=R,{regexp:A,keys:V}=f(w,R),M=V.map(j=>k===!1?t:j.type==="param"?k:ne=>ne.split(y).map(k));return function(ne){const Q=A.exec(ne);if(!Q)return!1;const oe=Q[0],X=Object.create(null);for(let se=1;se<Q.length;se++){if(Q[se]===void 0)continue;const F=V[se-1],ee=M[se-1];X[F.name]=ee(Q[se])}return{path:oe,params:X}}}function f(w,R={}){const{delimiter:k=e,end:y=!0,sensitive:A=!1,trailing:V=!0}=R,M=[],j=A?"":"i",ne=[];for(const X of m(w,[])){const se=typeof X=="object"?X:c(X,R);for(const F of b(se.tokens,0,[]))ne.push(S(F,k,M,se.originalPath))}let Q=`^(?:${ne.join("|")})`;return V&&(Q+=`(?:${a(k)}$)?`),Q+=y?"$":`(?=${a(k)}|$)`,{regexp:new RegExp(Q,j),keys:M}}function m(w,R){if(Array.isArray(w))for(const k of w)m(k,R);else R.push(w);return R}function*b(w,R,k){if(R===w.length)return yield k;const y=w[R];if(y.type==="group")for(const A of b(y.tokens,0,k.slice()))yield*b(w,R+1,A);else k.push(y);yield*b(w,R+1,k)}function S(w,R,k,y){let A="",V="",M=!0;for(const j of w){if(j.type==="text"){A+=a(j.value),V+=j.value,M||(M=j.value.includes(R));continue}if(j.type==="param"||j.type==="wildcard"){if(!M&&!V)throw new l(`Missing text before "${j.name}" ${j.type}`,y);j.type==="param"?A+=`(${P(R,M?"":V)}+)`:A+="([\\s\\S]+)",k.push(j),V="",M=!1;continue}}return A}function P(w,R){return R.length<2?w.length<2?`[^${a(w+R)}]`:`(?:(?!${a(w)})[^${a(R)}])`:w.length<2?`(?:(?!${a(R)})[^${a(w)}])`:`(?:(?!${a(R)}|${a(w)})[\\s\\S])`}function v(w){let R="",k=0;function y(A){return I(A)&&T(w[k])?A:JSON.stringify(A)}for(;k<w.length;){const A=w[k++];if(A.type==="text"){R+=s(A.value);continue}if(A.type==="group"){R+=`{${v(A.tokens)}}`;continue}if(A.type==="param"){R+=`:${y(A.name)}`;continue}if(A.type==="wildcard"){R+=`*${y(A.name)}`;continue}throw new TypeError(`Unknown token type: ${A.type}`)}return R}function O(w){return v(w.tokens)}function I(w){const[R,...k]=w;return r.test(R)&&k.every(y=>n.test(y))}function T(w){return w&&w.type==="text"?!n.test(w.value[0]):!0}return gt}var fT=pT();function Qn(e){"@babel/helpers - typeof";return Qn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qn(e)}function mT(e,t){if(Qn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gT(e){var t=mT(e,"string");return Qn(t)=="symbol"?t:t+""}function yT(e,t,r){return(t=gT(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const $="/api/v2".replace(/\/+$/,""),Xu={csv:","};var $e=class{constructor(e,t=$,r=U){this.basePath=t,this.axios=r,yT(this,"configuration",void 0),e&&(this.configuration=e,this.basePath=e.basePath??t)}},bT=class extends Error{constructor(e,t){super(t),this.field=e,this.name="RequiredError"}};const N={},z="https://example.com",C=function(e,t,r){if(r==null)throw new bT(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},G=function(e,t){t&&(t.username||t.password)&&(e.auth={username:t.username,password:t.password})},H=async function(e,t){t&&t.accessToken&&(e.Authorization="Bearer "+(typeof t.accessToken=="function"?await t.accessToken():await t.accessToken))};function Ei(e,t,r=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(n=>Ei(e,n,r)):Object.keys(t).forEach(n=>Ei(e,t[n],`${r}${r!==""?".":""}${n}`)):e.has(r)?e.append(r,t):e.set(r,t))}const q=function(e,...t){const r=new URLSearchParams(e.search);Ei(r,t),e.search=r.toString()},me=function(e,t,r){const n=typeof e!="string";return(n&&r&&r.isJsonMime?r.isJsonMime(t.headers["Content-Type"]):n)?JSON.stringify(e!==void 0?e:{}):e||""},W=function(e){return e.pathname+e.search+e.hash},J=function(e,t,r,n){return(o=t,s=r)=>{const a={...e.options,url:(o.defaults.baseURL?"":(n==null?void 0:n.basePath)??s)+e.url};return o.request(a)}},xT=function(e){return{addApp:async(t,r,n,o={})=>{C("addApp","cell",t),C("addApp","app",r);const s="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(r,l,e),{url:W(a),options:l}},clearApps:async(t,r,n={})=>{C("clearApps","cell",t);const o="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),r!==void 0&&(c.completion_timeout=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteApp:async(t,r,n,o={})=>{C("deleteApp","cell",t),C("deleteApp","app",r);const s="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},getApp:async(t,r,n={})=>{C("getApp","cell",t),C("getApp","app",r);const o="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listApps:async(t,r={})=>{C("listApps","cell",t);const n="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},updateApp:async(t,r,n,o,s={})=>{C("updateApp","cell",t),C("updateApp","app",r),C("updateApp","app2",n);const a="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};G(c,e),await H(u,e),o!==void 0&&(d.completion_timeout=o),u["Content-Type"]="application/json",q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=me(n,c,e),{url:W(i),options:c}}}},Wr=function(e){const t=xT(e);return{async addApp(r,n,o,s){var c,u;const a=await t.addApp(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ApplicationApi.addApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)},async clearApps(r,n,o){var l,c;const s=await t.clearApps(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ApplicationApi.clearApps"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async deleteApp(r,n,o,s){var c,u;const a=await t.deleteApp(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ApplicationApi.deleteApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)},async getApp(r,n,o){var l,c;const s=await t.getApp(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ApplicationApi.getApp"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async listApps(r,n){var i,l;const o=await t.listApps(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["ApplicationApi.listApps"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,$,e)(c,a||u)},async updateApp(r,n,o,s,a){var u,d;const i=await t.updateApp(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["ApplicationApi.updateApp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,U,$,e)(h,c||p)}}};var Zu=class extends $e{addApp(e,t,r,n){return Wr(this.configuration).addApp(e,t,r,n).then(o=>o(this.axios,this.basePath))}clearApps(e,t,r){return Wr(this.configuration).clearApps(e,t,r).then(n=>n(this.axios,this.basePath))}deleteApp(e,t,r,n){return Wr(this.configuration).deleteApp(e,t,r,n).then(o=>o(this.axios,this.basePath))}getApp(e,t,r){return Wr(this.configuration).getApp(e,t,r).then(n=>n(this.axios,this.basePath))}listApps(e,t){return Wr(this.configuration).listApps(e,t).then(r=>r(this.axios,this.basePath))}updateApp(e,t,r,n,o){return Wr(this.configuration).updateApp(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}};const ST=function(e){return{addBusIOService:async(t,r,n,o={})=>{C("addBusIOService","cell",t),C("addBusIOService","busIOType",r);const s="/cells/{cell}/bus-ios".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(r,l,e),{url:W(a),options:l}},addModbusIO:async(t,r,n,o={})=>{C("addModbusIO","cell",t),C("addModbusIO","io",r),C("addModbusIO","modbusIOData",n);const s="/cells/{cell}/bus-ios/modbus/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{io}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(n,l,e),{url:W(a),options:l}},addProfinetIO:async(t,r,n,o={})=>{C("addProfinetIO","cell",t),C("addProfinetIO","io",r),C("addProfinetIO","profinetIOData",n);const s="/cells/{cell}/bus-ios/profinet/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{io}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(n,l,e),{url:W(a),options:l}},clearBusIOService:async(t,r,n={})=>{C("clearBusIOService","cell",t);const o="/cells/{cell}/bus-ios".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),r!==void 0&&(c.completion_timeout=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteModbusIO:async(t,r,n={})=>{C("deleteModbusIO","cell",t),C("deleteModbusIO","io",r);const o="/cells/{cell}/bus-ios/modbus/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{io}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteProfinetIO:async(t,r,n={})=>{C("deleteProfinetIO","cell",t),C("deleteProfinetIO","io",r);const o="/cells/{cell}/bus-ios/profinet/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{io}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getBusIOService:async(t,r={})=>{C("getBusIOService","cell",t);const n="/cells/{cell}/bus-ios".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},getBusIOState:async(t,r={})=>{C("getBusIOState","cell",t);const n="/cells/{cell}/bus-ios/state".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},getBusIOValues:async(t,r,n={})=>{C("getBusIOValues","cell",t);const o="/cells/{cell}/bus-ios/ios/values".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),r&&(c.ios=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getProfinetDescription:async(t,r={})=>{C("getProfinetDescription","cell",t);const n="/cells/{cell}/bus-ios/profinet/description".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},getProfinetIOsFromFile:async(t,r,n,o={})=>{C("getProfinetIOsFromFile","cell",t);const s="/cells/{cell}/bus-ios/profinet/iofile".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),r!==void 0&&(u.input_offset=r),n!==void 0&&(u.output_offset=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},listBusIODescriptions:async(t,r={})=>{C("listBusIODescriptions","cell",t);const n="/cells/{cell}/bus-ios/ios/description".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listModbusIOs:async(t,r={})=>{C("listModbusIOs","cell",t);const n="/cells/{cell}/bus-ios/modbus/ios".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listProfinetIOs:async(t,r={})=>{C("listProfinetIOs","cell",t);const n="/cells/{cell}/bus-ios/profinet/ios".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},setBusIOValues:async(t,r,n={})=>{C("setBusIOValues","cell",t),C("setBusIOValues","iOValue",r);const o="/cells/{cell}/bus-ios/ios/values".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"PUT",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=me(r,i,e),{url:W(s),options:i}},setProfinetIOsFromFile:async(t,r,n={})=>{C("setProfinetIOsFromFile","cell",t),C("setProfinetIOsFromFile","profinetInputOutputConfig",r);const o="/cells/{cell}/bus-ios/profinet/iofile".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"PUT",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=me(r,i,e),{url:W(s),options:i}}}},Ye=function(e){const t=ST(e);return{async addBusIOService(r,n,o,s){var c,u;const a=await t.addBusIOService(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["BUSInputsOutputsApi.addBusIOService"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)},async addModbusIO(r,n,o,s){var c,u;const a=await t.addModbusIO(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["BUSInputsOutputsApi.addModbusIO"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)},async addProfinetIO(r,n,o,s){var c,u;const a=await t.addProfinetIO(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["BUSInputsOutputsApi.addProfinetIO"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)},async clearBusIOService(r,n,o){var l,c;const s=await t.clearBusIOService(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["BUSInputsOutputsApi.clearBusIOService"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async deleteModbusIO(r,n,o){var l,c;const s=await t.deleteModbusIO(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["BUSInputsOutputsApi.deleteModbusIO"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async deleteProfinetIO(r,n,o){var l,c;const s=await t.deleteProfinetIO(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["BUSInputsOutputsApi.deleteProfinetIO"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async getBusIOService(r,n){var i,l;const o=await t.getBusIOService(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["BUSInputsOutputsApi.getBusIOService"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,$,e)(c,a||u)},async getBusIOState(r,n){var i,l;const o=await t.getBusIOState(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["BUSInputsOutputsApi.getBusIOState"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,$,e)(c,a||u)},async getBusIOValues(r,n,o){var l,c;const s=await t.getBusIOValues(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["BUSInputsOutputsApi.getBusIOValues"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async getProfinetDescription(r,n){var i,l;const o=await t.getProfinetDescription(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["BUSInputsOutputsApi.getProfinetDescription"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,$,e)(c,a||u)},async getProfinetIOsFromFile(r,n,o,s){var c,u;const a=await t.getProfinetIOsFromFile(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["BUSInputsOutputsApi.getProfinetIOsFromFile"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)},async listBusIODescriptions(r,n){var i,l;const o=await t.listBusIODescriptions(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["BUSInputsOutputsApi.listBusIODescriptions"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,$,e)(c,a||u)},async listModbusIOs(r,n){var i,l;const o=await t.listModbusIOs(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["BUSInputsOutputsApi.listModbusIOs"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,$,e)(c,a||u)},async listProfinetIOs(r,n){var i,l;const o=await t.listProfinetIOs(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["BUSInputsOutputsApi.listProfinetIOs"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,$,e)(c,a||u)},async setBusIOValues(r,n,o){var l,c;const s=await t.setBusIOValues(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["BUSInputsOutputsApi.setBusIOValues"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async setProfinetIOsFromFile(r,n,o){var l,c;const s=await t.setProfinetIOsFromFile(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["BUSInputsOutputsApi.setProfinetIOsFromFile"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)}}};var vT=class extends $e{addBusIOService(e,t,r,n){return Ye(this.configuration).addBusIOService(e,t,r,n).then(o=>o(this.axios,this.basePath))}addModbusIO(e,t,r,n){return Ye(this.configuration).addModbusIO(e,t,r,n).then(o=>o(this.axios,this.basePath))}addProfinetIO(e,t,r,n){return Ye(this.configuration).addProfinetIO(e,t,r,n).then(o=>o(this.axios,this.basePath))}clearBusIOService(e,t,r){return Ye(this.configuration).clearBusIOService(e,t,r).then(n=>n(this.axios,this.basePath))}deleteModbusIO(e,t,r){return Ye(this.configuration).deleteModbusIO(e,t,r).then(n=>n(this.axios,this.basePath))}deleteProfinetIO(e,t,r){return Ye(this.configuration).deleteProfinetIO(e,t,r).then(n=>n(this.axios,this.basePath))}getBusIOService(e,t){return Ye(this.configuration).getBusIOService(e,t).then(r=>r(this.axios,this.basePath))}getBusIOState(e,t){return Ye(this.configuration).getBusIOState(e,t).then(r=>r(this.axios,this.basePath))}getBusIOValues(e,t,r){return Ye(this.configuration).getBusIOValues(e,t,r).then(n=>n(this.axios,this.basePath))}getProfinetDescription(e,t){return Ye(this.configuration).getProfinetDescription(e,t).then(r=>r(this.axios,this.basePath))}getProfinetIOsFromFile(e,t,r,n){return Ye(this.configuration).getProfinetIOsFromFile(e,t,r,n).then(o=>o(this.axios,this.basePath))}listBusIODescriptions(e,t){return Ye(this.configuration).listBusIODescriptions(e,t).then(r=>r(this.axios,this.basePath))}listModbusIOs(e,t){return Ye(this.configuration).listModbusIOs(e,t).then(r=>r(this.axios,this.basePath))}listProfinetIOs(e,t){return Ye(this.configuration).listProfinetIOs(e,t).then(r=>r(this.axios,this.basePath))}setBusIOValues(e,t,r){return Ye(this.configuration).setBusIOValues(e,t,r).then(n=>n(this.axios,this.basePath))}setProfinetIOsFromFile(e,t,r){return Ye(this.configuration).setProfinetIOsFromFile(e,t,r).then(n=>n(this.axios,this.basePath))}};const CT=function(e){return{deleteCell:async(t,r,n={})=>{C("deleteCell","cell",t);const o="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),r!==void 0&&(c.completion_timeout=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deployCell:async(t,r,n={})=>{C("deployCell","cell",t);const o=new URL("/cells",z);let s;e&&(s=e.baseOptions);const a={method:"POST",...s,...n},i={},l={};G(a,e),await H(i,e),r!==void 0&&(l.completion_timeout=r),i["Content-Type"]="application/json",q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...n.headers},a.data=me(t,a,e),{url:W(o),options:a}},getCell:async(t,r={})=>{C("getCell","cell",t);const n="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},getCellStatus:async(t,r={})=>{C("getCellStatus","cell",t);const n="/cells/{cell}/status".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listCells:async(t={})=>{const r=new URL("/cells",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}},setCellStatus:async(t,r,n={})=>{C("setCellStatus","cell",t),C("setCellStatus","operatingState",r);const o="/cells/{cell}/status".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"PUT",...a,...n},l={},c={};G(i,e),await H(l,e),r!==void 0&&(c.operating_state=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},updateCell:async(t,r,n,o={})=>{C("updateCell","cell",t),C("updateCell","cell2",r);const s="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(r,l,e),{url:W(a),options:l}}}},gr=function(e){const t=CT(e);return{async deleteCell(r,n,o){var l,c;const s=await t.deleteCell(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["CellApi.deleteCell"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async deployCell(r,n,o){var l,c;const s=await t.deployCell(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["CellApi.deployCell"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async getCell(r,n){var i,l;const o=await t.getCell(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["CellApi.getCell"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,$,e)(c,a||u)},async getCellStatus(r,n){var i,l;const o=await t.getCellStatus(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["CellApi.getCellStatus"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,$,e)(c,a||u)},async listCells(r){var a,i;const n=await t.listCells(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=N["CellApi.listCells"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,U,$,e)(l,s||c)},async setCellStatus(r,n,o){var l,c;const s=await t.setCellStatus(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["CellApi.setCellStatus"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async updateCell(r,n,o,s){var c,u;const a=await t.updateCell(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["CellApi.updateCell"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)}}};var wT=class extends $e{deleteCell(e,t,r){return gr(this.configuration).deleteCell(e,t,r).then(n=>n(this.axios,this.basePath))}deployCell(e,t,r){return gr(this.configuration).deployCell(e,t,r).then(n=>n(this.axios,this.basePath))}getCell(e,t){return gr(this.configuration).getCell(e,t).then(r=>r(this.axios,this.basePath))}getCellStatus(e,t){return gr(this.configuration).getCellStatus(e,t).then(r=>r(this.axios,this.basePath))}listCells(e){return gr(this.configuration).listCells(e).then(t=>t(this.axios,this.basePath))}setCellStatus(e,t,r){return gr(this.configuration).setCellStatus(e,t,r).then(n=>n(this.axios,this.basePath))}updateCell(e,t,r,n){return gr(this.configuration).updateCell(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const OT=function(e){return{addRobotController:async(t,r,n,o={})=>{C("addRobotController","cell",t),C("addRobotController","robotController",r);const s="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(r,l,e),{url:W(a),options:l}},clearRobotControllers:async(t,r,n={})=>{C("clearRobotControllers","cell",t);const o="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),r!==void 0&&(c.completion_timeout=r),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteRobotController:async(t,r,n,o={})=>{C("deleteRobotController","cell",t),C("deleteRobotController","controller",r);const s="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.completion_timeout=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},getControllerDescription:async(t,r,n={})=>{C("getControllerDescription","cell",t),C("getControllerDescription","controller",r);const o="/cells/{cell}/controllers/{controller}/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getCoordinateSystem:async(t,r,n,o,s={})=>{C("getCoordinateSystem","cell",t),C("getCoordinateSystem","controller",r),C("getCoordinateSystem","coordinateSystem",n);const a="/cells/{cell}/controllers/{controller}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{coordinate-system}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...s},u={},d={};G(c,e),await H(u,e),o!==void 0&&(d.orientation_type=o),q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:W(i),options:c}},getCurrentRobotControllerState:async(t,r,n={})=>{C("getCurrentRobotControllerState","cell",t),C("getCurrentRobotControllerState","controller",r);const o="/cells/{cell}/controllers/{controller}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getRobotController:async(t,r,n={})=>{C("getRobotController","cell",t),C("getRobotController","controller",r);const o="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getVirtualControllerConfiguration:async(t,r,n={})=>{C("getVirtualControllerConfiguration","cell",t),C("getVirtualControllerConfiguration","controller",r);const o="/cells/{cell}/controllers/{controller}/virtual-robot-configuration".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listCoordinateSystems:async(t,r,n,o={})=>{C("listCoordinateSystems","cell",t),C("listCoordinateSystems","controller",r);const s="/cells/{cell}/controllers/{controller}/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.orientation_type=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},listRobotControllers:async(t,r={})=>{C("listRobotControllers","cell",t);const n="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},setDefaultMode:async(t,r,n,o={})=>{C("setDefaultMode","cell",t),C("setDefaultMode","controller",r),C("setDefaultMode","mode",n);const s="/cells/{cell}/controllers/{controller}/mode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.mode=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},streamFreeDrive:async(t,r,n,o={})=>{C("streamFreeDrive","cell",t),C("streamFreeDrive","controller",r);const s="/cells/{cell}/controllers/{controller}/free-drive-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.response_rate=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},streamRobotControllerState:async(t,r,n,o,s={})=>{C("streamRobotControllerState","cell",t),C("streamRobotControllerState","controller",r);const a="/cells/{cell}/controllers/{controller}/state-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...s},u={},d={};G(c,e),await H(u,e),n!==void 0&&(d.response_rate=n),o!==void 0&&(d.add_controller_timeout=o),q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:W(i),options:c}},updateRobotController:async(t,r,n,o,s={})=>{C("updateRobotController","cell",t),C("updateRobotController","controller",r),C("updateRobotController","robotController",n);const a="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};G(c,e),await H(u,e),o!==void 0&&(d.completion_timeout=o),u["Content-Type"]="application/json",q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=me(n,c,e),{url:W(i),options:c}}}},ot=function(e){const t=OT(e);return{async addRobotController(r,n,o,s){var c,u;const a=await t.addRobotController(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerApi.addRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)},async clearRobotControllers(r,n,o){var l,c;const s=await t.clearRobotControllers(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ControllerApi.clearRobotControllers"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async deleteRobotController(r,n,o,s){var c,u;const a=await t.deleteRobotController(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerApi.deleteRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)},async getControllerDescription(r,n,o){var l,c;const s=await t.getControllerDescription(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ControllerApi.getControllerDescription"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async getCoordinateSystem(r,n,o,s,a){var u,d;const i=await t.getCoordinateSystem(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["ControllerApi.getCoordinateSystem"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,U,$,e)(h,c||p)},async getCurrentRobotControllerState(r,n,o){var l,c;const s=await t.getCurrentRobotControllerState(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ControllerApi.getCurrentRobotControllerState"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async getRobotController(r,n,o){var l,c;const s=await t.getRobotController(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ControllerApi.getRobotController"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async getVirtualControllerConfiguration(r,n,o){var l,c;const s=await t.getVirtualControllerConfiguration(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["ControllerApi.getVirtualControllerConfiguration"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async listCoordinateSystems(r,n,o,s){var c,u;const a=await t.listCoordinateSystems(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerApi.listCoordinateSystems"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)},async listRobotControllers(r,n){var i,l;const o=await t.listRobotControllers(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["ControllerApi.listRobotControllers"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,$,e)(c,a||u)},async setDefaultMode(r,n,o,s){var c,u;const a=await t.setDefaultMode(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerApi.setDefaultMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)},async streamFreeDrive(r,n,o,s){var c,u;const a=await t.streamFreeDrive(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerApi.streamFreeDrive"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)},async streamRobotControllerState(r,n,o,s,a){var u,d;const i=await t.streamRobotControllerState(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["ControllerApi.streamRobotControllerState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,U,$,e)(h,c||p)},async updateRobotController(r,n,o,s,a){var u,d;const i=await t.updateRobotController(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["ControllerApi.updateRobotController"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,U,$,e)(h,c||p)}}};var TT=class extends $e{addRobotController(e,t,r,n){return ot(this.configuration).addRobotController(e,t,r,n).then(o=>o(this.axios,this.basePath))}clearRobotControllers(e,t,r){return ot(this.configuration).clearRobotControllers(e,t,r).then(n=>n(this.axios,this.basePath))}deleteRobotController(e,t,r,n){return ot(this.configuration).deleteRobotController(e,t,r,n).then(o=>o(this.axios,this.basePath))}getControllerDescription(e,t,r){return ot(this.configuration).getControllerDescription(e,t,r).then(n=>n(this.axios,this.basePath))}getCoordinateSystem(e,t,r,n,o){return ot(this.configuration).getCoordinateSystem(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}getCurrentRobotControllerState(e,t,r){return ot(this.configuration).getCurrentRobotControllerState(e,t,r).then(n=>n(this.axios,this.basePath))}getRobotController(e,t,r){return ot(this.configuration).getRobotController(e,t,r).then(n=>n(this.axios,this.basePath))}getVirtualControllerConfiguration(e,t,r){return ot(this.configuration).getVirtualControllerConfiguration(e,t,r).then(n=>n(this.axios,this.basePath))}listCoordinateSystems(e,t,r,n){return ot(this.configuration).listCoordinateSystems(e,t,r,n).then(o=>o(this.axios,this.basePath))}listRobotControllers(e,t){return ot(this.configuration).listRobotControllers(e,t).then(r=>r(this.axios,this.basePath))}setDefaultMode(e,t,r,n){return ot(this.configuration).setDefaultMode(e,t,r,n).then(o=>o(this.axios,this.basePath))}streamFreeDrive(e,t,r,n){return ot(this.configuration).streamFreeDrive(e,t,r,n).then(o=>o(this.axios,this.basePath))}streamRobotControllerState(e,t,r,n,o){return ot(this.configuration).streamRobotControllerState(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}updateRobotController(e,t,r,n,o){return ot(this.configuration).updateRobotController(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}};const ET=function(e){return{listIODescriptions:async(t,r,n,o,s,a,i={})=>{C("listIODescriptions","cell",t),C("listIODescriptions","controller",r);const l="/cells/{cell}/controllers/{controller}/ios/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),c=new URL(l,z);let u;e&&(u=e.baseOptions);const d={method:"GET",...u,...i},h={},p={};G(d,e),await H(h,e),n&&(p.ios=n),o!==void 0&&(p.direction=o),s!==void 0&&(p.value_type=s),a!==void 0&&(p.group=a),q(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:W(c),options:d}},listIOValues:async(t,r,n,o={})=>{C("listIOValues","cell",t),C("listIOValues","controller",r);const s="/cells/{cell}/controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),n&&(u.ios=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},setOutputValues:async(t,r,n,o={})=>{C("setOutputValues","cell",t),C("setOutputValues","controller",r),C("setOutputValues","iOValue",n);const s="/cells/{cell}/controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(n,l,e),{url:W(a),options:l}},streamIOValues:async(t,r,n,o={})=>{C("streamIOValues","cell",t),C("streamIOValues","controller",r);const s="/cells/{cell}/controllers/{controller}/ios/stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),n&&(u.ios=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},waitForIOEvent:async(t,r,n,o={})=>{C("waitForIOEvent","cell",t),C("waitForIOEvent","controller",r),C("waitForIOEvent","waitForIOEventRequest",n);const s="/cells/{cell}/controllers/{controller}/ios/wait-for".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(n,l,e),{url:W(a),options:l}}}},Rn=function(e){const t=ET(e);return{async listIODescriptions(r,n,o,s,a,i,l){var h,p;const c=await t.listIODescriptions(r,n,o,s,a,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=N["ControllerInputsOutputsApi.listIODescriptions"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>J(c,U,$,e)(f,d||m)},async listIOValues(r,n,o,s){var c,u;const a=await t.listIOValues(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerInputsOutputsApi.listIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)},async setOutputValues(r,n,o,s){var c,u;const a=await t.setOutputValues(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerInputsOutputsApi.setOutputValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)},async streamIOValues(r,n,o,s){var c,u;const a=await t.streamIOValues(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerInputsOutputsApi.streamIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)},async waitForIOEvent(r,n,o,s){var c,u;const a=await t.waitForIOEvent(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["ControllerInputsOutputsApi.waitForIOEvent"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)}}};var IT=class extends $e{listIODescriptions(e,t,r,n,o,s,a){return Rn(this.configuration).listIODescriptions(e,t,r,n,o,s,a).then(i=>i(this.axios,this.basePath))}listIOValues(e,t,r,n){return Rn(this.configuration).listIOValues(e,t,r,n).then(o=>o(this.axios,this.basePath))}setOutputValues(e,t,r,n){return Rn(this.configuration).setOutputValues(e,t,r,n).then(o=>o(this.axios,this.basePath))}streamIOValues(e,t,r,n){return Rn(this.configuration).streamIOValues(e,t,r,n).then(o=>o(this.axios,this.basePath))}waitForIOEvent(e,t,r,n){return Rn(this.configuration).waitForIOEvent(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const AT=function(e){return{executeJogging:async(t,r,n,o={})=>{C("executeJogging","cell",t),C("executeJogging","controller",r),C("executeJogging","executeJoggingRequest",n);const s="/cells/{cell}/controllers/{controller}/execution/jogging".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(n,l,e),{url:W(a),options:l}}}},PT=function(e){const t=AT(e);return{async executeJogging(r,n,o,s){var c,u;const a=await t.executeJogging(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["JoggingApi.executeJogging"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)}}};var RT=class extends $e{executeJogging(e,t,r,n){return PT(this.configuration).executeJogging(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const MT=function(e){return{forwardKinematics:async(t,r,n={})=>{C("forwardKinematics","cell",t),C("forwardKinematics","forwardKinematicsRequest",r);const o="/cells/{cell}/kinematic/forward".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=me(r,i,e),{url:W(s),options:i}},inverseKinematics:async(t,r,n={})=>{C("inverseKinematics","cell",t),C("inverseKinematics","inverseKinematicsRequest",r);const o="/cells/{cell}/kinematic/inverse".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=me(r,i,e),{url:W(s),options:i}}}},ed=function(e){const t=MT(e);return{async forwardKinematics(r,n,o){var l,c;const s=await t.forwardKinematics(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["KinematicsApi.forwardKinematics"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async inverseKinematics(r,n,o){var l,c;const s=await t.inverseKinematics(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["KinematicsApi.inverseKinematics"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)}}};var VT=class extends $e{forwardKinematics(e,t,r){return ed(this.configuration).forwardKinematics(e,t,r).then(n=>n(this.axios,this.basePath))}inverseKinematics(e,t,r){return ed(this.configuration).inverseKinematics(e,t,r).then(n=>n(this.axios,this.basePath))}};const _T=function(e){return{getCurrentMotionGroupState:async(t,r,n,o,s={})=>{C("getCurrentMotionGroupState","cell",t),C("getCurrentMotionGroupState","controller",r),C("getCurrentMotionGroupState","motionGroup",n);const a="/cells/{cell}/controllers/{controller}/motion-groups/{motion-group}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...s},u={},d={};G(c,e),await H(u,e),o!==void 0&&(d.response_coordinate_system=o),q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:W(i),options:c}},getMotionGroupDescription:async(t,r,n,o={})=>{C("getMotionGroupDescription","cell",t),C("getMotionGroupDescription","controller",r),C("getMotionGroupDescription","motionGroup",n);const s="/cells/{cell}/controllers/{controller}/motion-groups/{motion-group}/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},streamMotionGroupState:async(t,r,n,o,s,a={})=>{C("streamMotionGroupState","cell",t),C("streamMotionGroupState","controller",r),C("streamMotionGroupState","motionGroup",n);const i="/cells/{cell}/controllers/{controller}/motion-groups/{motion-group}/state-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),l=new URL(i,z);let c;e&&(c=e.baseOptions);const u={method:"GET",...c,...a},d={},h={};G(u,e),await H(d,e),o!==void 0&&(h.response_rate=o),s!==void 0&&(h.response_coordinate_system=s),q(l,h);let p=c&&c.headers?c.headers:{};return u.headers={...d,...p,...a.headers},{url:W(l),options:u}}}},Ya=function(e){const t=_T(e);return{async getCurrentMotionGroupState(r,n,o,s,a){var u,d;const i=await t.getCurrentMotionGroupState(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["MotionGroupApi.getCurrentMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,U,$,e)(h,c||p)},async getMotionGroupDescription(r,n,o,s){var c,u;const a=await t.getMotionGroupDescription(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["MotionGroupApi.getMotionGroupDescription"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)},async streamMotionGroupState(r,n,o,s,a,i){var d,h;const l=await t.streamMotionGroupState(r,n,o,s,a,i),c=(e==null?void 0:e.serverIndex)??0,u=(h=(d=N["MotionGroupApi.streamMotionGroupState"])==null?void 0:d[c])==null?void 0:h.url;return(p,f)=>J(l,U,$,e)(p,u||f)}}};var kT=class extends $e{getCurrentMotionGroupState(e,t,r,n,o){return Ya(this.configuration).getCurrentMotionGroupState(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}getMotionGroupDescription(e,t,r,n){return Ya(this.configuration).getMotionGroupDescription(e,t,r,n).then(o=>o(this.axios,this.basePath))}streamMotionGroupState(e,t,r,n,o,s){return Ya(this.configuration).streamMotionGroupState(e,t,r,n,o,s).then(a=>a(this.axios,this.basePath))}};const jT=function(e){return{getMotionGroupCollisionModel:async(t,r={})=>{C("getMotionGroupCollisionModel","motionGroupModel",t);const n="/motion-group-models/{motion-group-model}/collision".replace("{motion-group-model}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},getMotionGroupModels:async(t={})=>{const r=new URL("/motion-group-models",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}}}},td=function(e){const t=jT(e);return{async getMotionGroupCollisionModel(r,n){var i,l;const o=await t.getMotionGroupCollisionModel(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["MotionGroupModelsApi.getMotionGroupCollisionModel"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,$,e)(c,a||u)},async getMotionGroupModels(r){var a,i;const n=await t.getMotionGroupModels(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=N["MotionGroupModelsApi.getMotionGroupModels"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,U,$,e)(l,s||c)}}};var DT=class extends $e{getMotionGroupCollisionModel(e,t){return td(this.configuration).getMotionGroupCollisionModel(e,t).then(r=>r(this.axios,this.basePath))}getMotionGroupModels(e){return td(this.configuration).getMotionGroupModels(e).then(t=>t(this.axios,this.basePath))}};const UT=function(e){return{deleteStoredCollider:async(t,r,n={})=>{C("deleteStoredCollider","cell",t),C("deleteStoredCollider","collider",r);const o="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteStoredCollisionLinkChain:async(t,r,n={})=>{C("deleteStoredCollisionLinkChain","cell",t),C("deleteStoredCollisionLinkChain","linkChain",r);const o="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteStoredCollisionTool:async(t,r,n={})=>{C("deleteStoredCollisionTool","cell",t),C("deleteStoredCollisionTool","tool",r);const o="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getStoredCollider:async(t,r,n={})=>{C("getStoredCollider","cell",t),C("getStoredCollider","collider",r);const o="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getStoredCollisionLinkChain:async(t,r,n={})=>{C("getStoredCollisionLinkChain","cell",t),C("getStoredCollisionLinkChain","linkChain",r);const o="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getStoredCollisionTool:async(t,r,n={})=>{C("getStoredCollisionTool","cell",t),C("getStoredCollisionTool","tool",r);const o="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listCollisionLinkChains:async(t,r={})=>{C("listCollisionLinkChains","cell",t);const n="/cells/{cell}/store/collision/link-chains".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listCollisionLinkChainsKeys:async(t,r={})=>{C("listCollisionLinkChainsKeys","cell",t);const n="/cells/{cell}/store/collision/link-chains-keys".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listStoredColliders:async(t,r={})=>{C("listStoredColliders","cell",t);const n="/cells/{cell}/store/collision/colliders".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listStoredCollidersKeys:async(t,r={})=>{C("listStoredCollidersKeys","cell",t);const n="/cells/{cell}/store/collision/colliders-keys".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listStoredCollisionTools:async(t,r={})=>{C("listStoredCollisionTools","cell",t);const n="/cells/{cell}/store/collision/tools".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listStoredCollisionToolsKeys:async(t,r={})=>{C("listStoredCollisionToolsKeys","cell",t);const n="/cells/{cell}/store/collision/tools-keys".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},storeCollider:async(t,r,n,o={})=>{C("storeCollider","cell",t),C("storeCollider","collider",r),C("storeCollider","collider2",n);const s="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(n,l,e),{url:W(a),options:l}},storeCollisionLinkChain:async(t,r,n,o={})=>{C("storeCollisionLinkChain","cell",t),C("storeCollisionLinkChain","linkChain",r),C("storeCollisionLinkChain","collider",n);const s="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(n,l,e),{url:W(a),options:l}},storeCollisionTool:async(t,r,n,o={})=>{C("storeCollisionTool","cell",t),C("storeCollisionTool","tool",r),C("storeCollisionTool","requestBody",n);const s="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(n,l,e),{url:W(a),options:l}}}},Xe=function(e){const t=UT(e);return{async deleteStoredCollider(r,n,o){var l,c;const s=await t.deleteStoredCollider(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionComponentsApi.deleteStoredCollider"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async deleteStoredCollisionLinkChain(r,n,o){var l,c;const s=await t.deleteStoredCollisionLinkChain(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionComponentsApi.deleteStoredCollisionLinkChain"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async deleteStoredCollisionTool(r,n,o){var l,c;const s=await t.deleteStoredCollisionTool(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionComponentsApi.deleteStoredCollisionTool"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async getStoredCollider(r,n,o){var l,c;const s=await t.getStoredCollider(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionComponentsApi.getStoredCollider"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async getStoredCollisionLinkChain(r,n,o){var l,c;const s=await t.getStoredCollisionLinkChain(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionComponentsApi.getStoredCollisionLinkChain"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async getStoredCollisionTool(r,n,o){var l,c;const s=await t.getStoredCollisionTool(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionComponentsApi.getStoredCollisionTool"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async listCollisionLinkChains(r,n){var i,l;const o=await t.listCollisionLinkChains(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionComponentsApi.listCollisionLinkChains"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,$,e)(c,a||u)},async listCollisionLinkChainsKeys(r,n){var i,l;const o=await t.listCollisionLinkChainsKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionComponentsApi.listCollisionLinkChainsKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,$,e)(c,a||u)},async listStoredColliders(r,n){var i,l;const o=await t.listStoredColliders(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionComponentsApi.listStoredColliders"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,$,e)(c,a||u)},async listStoredCollidersKeys(r,n){var i,l;const o=await t.listStoredCollidersKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionComponentsApi.listStoredCollidersKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,$,e)(c,a||u)},async listStoredCollisionTools(r,n){var i,l;const o=await t.listStoredCollisionTools(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionComponentsApi.listStoredCollisionTools"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,$,e)(c,a||u)},async listStoredCollisionToolsKeys(r,n){var i,l;const o=await t.listStoredCollisionToolsKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionComponentsApi.listStoredCollisionToolsKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,$,e)(c,a||u)},async storeCollider(r,n,o,s){var c,u;const a=await t.storeCollider(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["StoreCollisionComponentsApi.storeCollider"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)},async storeCollisionLinkChain(r,n,o,s){var c,u;const a=await t.storeCollisionLinkChain(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["StoreCollisionComponentsApi.storeCollisionLinkChain"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)},async storeCollisionTool(r,n,o,s){var c,u;const a=await t.storeCollisionTool(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["StoreCollisionComponentsApi.storeCollisionTool"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)}}};var LT=class extends $e{deleteStoredCollider(e,t,r){return Xe(this.configuration).deleteStoredCollider(e,t,r).then(n=>n(this.axios,this.basePath))}deleteStoredCollisionLinkChain(e,t,r){return Xe(this.configuration).deleteStoredCollisionLinkChain(e,t,r).then(n=>n(this.axios,this.basePath))}deleteStoredCollisionTool(e,t,r){return Xe(this.configuration).deleteStoredCollisionTool(e,t,r).then(n=>n(this.axios,this.basePath))}getStoredCollider(e,t,r){return Xe(this.configuration).getStoredCollider(e,t,r).then(n=>n(this.axios,this.basePath))}getStoredCollisionLinkChain(e,t,r){return Xe(this.configuration).getStoredCollisionLinkChain(e,t,r).then(n=>n(this.axios,this.basePath))}getStoredCollisionTool(e,t,r){return Xe(this.configuration).getStoredCollisionTool(e,t,r).then(n=>n(this.axios,this.basePath))}listCollisionLinkChains(e,t){return Xe(this.configuration).listCollisionLinkChains(e,t).then(r=>r(this.axios,this.basePath))}listCollisionLinkChainsKeys(e,t){return Xe(this.configuration).listCollisionLinkChainsKeys(e,t).then(r=>r(this.axios,this.basePath))}listStoredColliders(e,t){return Xe(this.configuration).listStoredColliders(e,t).then(r=>r(this.axios,this.basePath))}listStoredCollidersKeys(e,t){return Xe(this.configuration).listStoredCollidersKeys(e,t).then(r=>r(this.axios,this.basePath))}listStoredCollisionTools(e,t){return Xe(this.configuration).listStoredCollisionTools(e,t).then(r=>r(this.axios,this.basePath))}listStoredCollisionToolsKeys(e,t){return Xe(this.configuration).listStoredCollisionToolsKeys(e,t).then(r=>r(this.axios,this.basePath))}storeCollider(e,t,r,n){return Xe(this.configuration).storeCollider(e,t,r,n).then(o=>o(this.axios,this.basePath))}storeCollisionLinkChain(e,t,r,n){return Xe(this.configuration).storeCollisionLinkChain(e,t,r,n).then(o=>o(this.axios,this.basePath))}storeCollisionTool(e,t,r,n){return Xe(this.configuration).storeCollisionTool(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const BT=function(e){return{deleteStoredCollisionSetup:async(t,r,n={})=>{C("deleteStoredCollisionSetup","cell",t),C("deleteStoredCollisionSetup","setup",r);const o="/cells/{cell}/store/collision/setups/{setup}".replace("{cell}",encodeURIComponent(String(t))).replace("{setup}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getStoredCollisionSetup:async(t,r,n={})=>{C("getStoredCollisionSetup","cell",t),C("getStoredCollisionSetup","setup",r);const o="/cells/{cell}/store/collision/setups/{setup}".replace("{cell}",encodeURIComponent(String(t))).replace("{setup}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listStoredCollisionSetups:async(t,r={})=>{C("listStoredCollisionSetups","cell",t);const n="/cells/{cell}/store/collision/setups".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},listStoredCollisionSetupsKeys:async(t,r={})=>{C("listStoredCollisionSetupsKeys","cell",t);const n="/cells/{cell}/store/collision/setups-keys".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},storeCollisionSetup:async(t,r,n,o={})=>{C("storeCollisionSetup","cell",t),C("storeCollisionSetup","setup",r),C("storeCollisionSetup","collisionSetup",n);const s="/cells/{cell}/store/collision/setups/{setup}".replace("{cell}",encodeURIComponent(String(t))).replace("{setup}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(n,l,e),{url:W(a),options:l}}}},Mn=function(e){const t=BT(e);return{async deleteStoredCollisionSetup(r,n,o){var l,c;const s=await t.deleteStoredCollisionSetup(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionSetupsApi.deleteStoredCollisionSetup"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async getStoredCollisionSetup(r,n,o){var l,c;const s=await t.getStoredCollisionSetup(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreCollisionSetupsApi.getStoredCollisionSetup"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async listStoredCollisionSetups(r,n){var i,l;const o=await t.listStoredCollisionSetups(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionSetupsApi.listStoredCollisionSetups"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,$,e)(c,a||u)},async listStoredCollisionSetupsKeys(r,n){var i,l;const o=await t.listStoredCollisionSetupsKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreCollisionSetupsApi.listStoredCollisionSetupsKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,$,e)(c,a||u)},async storeCollisionSetup(r,n,o,s){var c,u;const a=await t.storeCollisionSetup(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["StoreCollisionSetupsApi.storeCollisionSetup"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)}}};var FT=class extends $e{deleteStoredCollisionSetup(e,t,r){return Mn(this.configuration).deleteStoredCollisionSetup(e,t,r).then(n=>n(this.axios,this.basePath))}getStoredCollisionSetup(e,t,r){return Mn(this.configuration).getStoredCollisionSetup(e,t,r).then(n=>n(this.axios,this.basePath))}listStoredCollisionSetups(e,t){return Mn(this.configuration).listStoredCollisionSetups(e,t).then(r=>r(this.axios,this.basePath))}listStoredCollisionSetupsKeys(e,t){return Mn(this.configuration).listStoredCollisionSetupsKeys(e,t).then(r=>r(this.axios,this.basePath))}storeCollisionSetup(e,t,r,n){return Mn(this.configuration).storeCollisionSetup(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const $T=function(e){return{clearAllObjects:async(t,r={})=>{C("clearAllObjects","cell",t);const n="/cells/{cell}/store/objects".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"DELETE",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},deleteObject:async(t,r,n={})=>{C("deleteObject","cell",t),C("deleteObject","key",r);const o="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getObject:async(t,r,n={})=>{C("getObject","cell",t),C("getObject","key",r);const o="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getObjectMetadata:async(t,r,n={})=>{C("getObjectMetadata","cell",t),C("getObjectMetadata","key",r);const o="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"HEAD",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listAllObjectKeys:async(t,r={})=>{C("listAllObjectKeys","cell",t);const n="/cells/{cell}/store/objects".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};G(a,e),await H(i,e),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:W(o),options:a}},storeObject:async(t,r,n,o,s={})=>{C("storeObject","cell",t),C("storeObject","key",r);const a="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={},h=new(e&&e.formDataCtor||FormData);G(c,e),await H(u,e),o!==void 0&&h.append("any_value",new Blob([JSON.stringify(o)],{type:"application/json"})),u["Content-Type"]="multipart/form-data",n!=null&&(u["X-Metadata"]=typeof n=="string"?n:JSON.stringify(n)),q(i,d);let p=l&&l.headers?l.headers:{};return c.headers={...u,...p,...s.headers},c.data=h,{url:W(i),options:c}}}},Jr=function(e){const t=$T(e);return{async clearAllObjects(r,n){var i,l;const o=await t.clearAllObjects(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreObjectApi.clearAllObjects"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,$,e)(c,a||u)},async deleteObject(r,n,o){var l,c;const s=await t.deleteObject(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreObjectApi.deleteObject"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async getObject(r,n,o){var l,c;const s=await t.getObject(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreObjectApi.getObject"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async getObjectMetadata(r,n,o){var l,c;const s=await t.getObjectMetadata(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["StoreObjectApi.getObjectMetadata"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async listAllObjectKeys(r,n){var i,l;const o=await t.listAllObjectKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["StoreObjectApi.listAllObjectKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,$,e)(c,a||u)},async storeObject(r,n,o,s,a){var u,d;const i=await t.storeObject(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["StoreObjectApi.storeObject"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,U,$,e)(h,c||p)}}};var NT=class extends $e{clearAllObjects(e,t){return Jr(this.configuration).clearAllObjects(e,t).then(r=>r(this.axios,this.basePath))}deleteObject(e,t,r){return Jr(this.configuration).deleteObject(e,t,r).then(n=>n(this.axios,this.basePath))}getObject(e,t,r){return Jr(this.configuration).getObject(e,t,r).then(n=>n(this.axios,this.basePath))}getObjectMetadata(e,t,r){return Jr(this.configuration).getObjectMetadata(e,t,r).then(n=>n(this.axios,this.basePath))}listAllObjectKeys(e,t){return Jr(this.configuration).listAllObjectKeys(e,t).then(r=>r(this.axios,this.basePath))}storeObject(e,t,r,n,o){return Jr(this.configuration).storeObject(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}};const zT=function(e){return{backupConfiguration:async(t,r,n={})=>{const o=new URL("/system/configuration",z);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...n},i={},l={};G(a,e),await H(i,e),t&&(l.resources=t.join(Xu.csv)),r!==void 0&&(l.metadata=r),q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...n.headers},{url:W(o),options:a}},checkNovaVersionUpdate:async(t,r={})=>{C("checkNovaVersionUpdate","channel",t);const n=new URL("/system/update",z);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},a={},i={};G(s,e),await H(a,e),t!==void 0&&(i.channel=t),q(n,i);let l=o&&o.headers?o.headers:{};return s.headers={...a,...l,...r.headers},{url:W(n),options:s}},getConfigurationBackupStatus:async(t,r={})=>{C("getConfigurationBackupStatus","operationId",t);const n=new URL("/system/configuration/status",z);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},a={},i={};G(s,e),await H(a,e),t!==void 0&&(i.operation_id=t),q(n,i);let l=o&&o.headers?o.headers:{};return s.headers={...a,...l,...r.headers},{url:W(n),options:s}},getDiagnosePackage:async(t={})=>{const r=new URL("/system/diagnosis-package/zip",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}},getSystemStatus:async(t={})=>{const r=new URL("/system/status",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}},getSystemVersion:async(t={})=>{const r=new URL("/system/version",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}},listConfigurationResources:async(t={})=>{const r=new URL("/system/configuration/resources",z);let n;e&&(n=e.baseOptions);const o={method:"GET",...n,...t},s={},a={};G(o,e),await H(s,e),q(r,a);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...t.headers},{url:W(r),options:o}},restoreConfiguration:async(t,r,n={})=>{C("restoreConfiguration","resources",t),C("restoreConfiguration","body",r);const o=new URL("/system/configuration",z);let s;e&&(s=e.baseOptions);const a={method:"POST",...s,...n},i={},l={};G(a,e),await H(i,e),t&&(l.resources=t.join(Xu.csv)),i["Content-Type"]="application/gzip",q(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...n.headers},a.data=me(r,a,e),{url:W(o),options:a}},updateNovaVersion:async(t,r={})=>{C("updateNovaVersion","updateNovaVersionRequest",t);const n=new URL("/system/update",z);let o;e&&(o=e.baseOptions);const s={method:"PUT",...o,...r},a={},i={};G(s,e),await H(a,e),a["Content-Type"]="application/json",q(n,i);let l=o&&o.headers?o.headers:{};return s.headers={...a,...l,...r.headers},s.data=me(t,s,e),{url:W(n),options:s}}}},Nt=function(e){const t=zT(e);return{async backupConfiguration(r,n,o){var l,c;const s=await t.backupConfiguration(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["SystemApi.backupConfiguration"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async checkNovaVersionUpdate(r,n){var i,l;const o=await t.checkNovaVersionUpdate(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["SystemApi.checkNovaVersionUpdate"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,$,e)(c,a||u)},async getConfigurationBackupStatus(r,n){var i,l;const o=await t.getConfigurationBackupStatus(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["SystemApi.getConfigurationBackupStatus"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,$,e)(c,a||u)},async getDiagnosePackage(r){var a,i;const n=await t.getDiagnosePackage(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=N["SystemApi.getDiagnosePackage"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,U,$,e)(l,s||c)},async getSystemStatus(r){var a,i;const n=await t.getSystemStatus(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=N["SystemApi.getSystemStatus"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,U,$,e)(l,s||c)},async getSystemVersion(r){var a,i;const n=await t.getSystemVersion(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=N["SystemApi.getSystemVersion"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,U,$,e)(l,s||c)},async listConfigurationResources(r){var a,i;const n=await t.listConfigurationResources(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=N["SystemApi.listConfigurationResources"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>J(n,U,$,e)(l,s||c)},async restoreConfiguration(r,n,o){var l,c;const s=await t.restoreConfiguration(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["SystemApi.restoreConfiguration"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async updateNovaVersion(r,n){var i,l;const o=await t.updateNovaVersion(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=N["SystemApi.updateNovaVersion"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>J(o,U,$,e)(c,a||u)}}};var GT=class extends $e{backupConfiguration(e,t,r){return Nt(this.configuration).backupConfiguration(e,t,r).then(n=>n(this.axios,this.basePath))}checkNovaVersionUpdate(e,t){return Nt(this.configuration).checkNovaVersionUpdate(e,t).then(r=>r(this.axios,this.basePath))}getConfigurationBackupStatus(e,t){return Nt(this.configuration).getConfigurationBackupStatus(e,t).then(r=>r(this.axios,this.basePath))}getDiagnosePackage(e){return Nt(this.configuration).getDiagnosePackage(e).then(t=>t(this.axios,this.basePath))}getSystemStatus(e){return Nt(this.configuration).getSystemStatus(e).then(t=>t(this.axios,this.basePath))}getSystemVersion(e){return Nt(this.configuration).getSystemVersion(e).then(t=>t(this.axios,this.basePath))}listConfigurationResources(e){return Nt(this.configuration).listConfigurationResources(e).then(t=>t(this.axios,this.basePath))}restoreConfiguration(e,t,r){return Nt(this.configuration).restoreConfiguration(e,t,r).then(n=>n(this.axios,this.basePath))}updateNovaVersion(e,t){return Nt(this.configuration).updateNovaVersion(e,t).then(r=>r(this.axios,this.basePath))}};const HT=function(e){return{addTrajectory:async(t,r,n,o={})=>{C("addTrajectory","cell",t),C("addTrajectory","controller",r),C("addTrajectory","addTrajectoryRequest",n);const s="/cells/{cell}/controllers/{controller}/trajectories".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(n,l,e),{url:W(a),options:l}},clearTrajectories:async(t,r,n={})=>{C("clearTrajectories","cell",t),C("clearTrajectories","controller",r);const o="/cells/{cell}/controllers/{controller}/trajectories".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},deleteTrajectory:async(t,r,n,o={})=>{C("deleteTrajectory","cell",t),C("deleteTrajectory","controller",r),C("deleteTrajectory","trajectory",n);const s="/cells/{cell}/controllers/{controller}/trajectories/{trajectory}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{trajectory}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},getTrajectory:async(t,r,n,o={})=>{C("getTrajectory","cell",t),C("getTrajectory","controller",r),C("getTrajectory","trajectory",n);const s="/cells/{cell}/controllers/{controller}/trajectories/{trajectory}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{trajectory}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},listTrajectories:async(t,r,n={})=>{C("listTrajectories","cell",t),C("listTrajectories","controller",r);const o="/cells/{cell}/controllers/{controller}/trajectories".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}}}},Vn=function(e){const t=HT(e);return{async addTrajectory(r,n,o,s){var c,u;const a=await t.addTrajectory(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["TrajectoryCachingApi.addTrajectory"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)},async clearTrajectories(r,n,o){var l,c;const s=await t.clearTrajectories(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["TrajectoryCachingApi.clearTrajectories"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async deleteTrajectory(r,n,o,s){var c,u;const a=await t.deleteTrajectory(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["TrajectoryCachingApi.deleteTrajectory"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)},async getTrajectory(r,n,o,s){var c,u;const a=await t.getTrajectory(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["TrajectoryCachingApi.getTrajectory"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)},async listTrajectories(r,n,o){var l,c;const s=await t.listTrajectories(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["TrajectoryCachingApi.listTrajectories"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)}}};var qT=class extends $e{addTrajectory(e,t,r,n){return Vn(this.configuration).addTrajectory(e,t,r,n).then(o=>o(this.axios,this.basePath))}clearTrajectories(e,t,r){return Vn(this.configuration).clearTrajectories(e,t,r).then(n=>n(this.axios,this.basePath))}deleteTrajectory(e,t,r,n){return Vn(this.configuration).deleteTrajectory(e,t,r,n).then(o=>o(this.axios,this.basePath))}getTrajectory(e,t,r,n){return Vn(this.configuration).getTrajectory(e,t,r,n).then(o=>o(this.axios,this.basePath))}listTrajectories(e,t,r){return Vn(this.configuration).listTrajectories(e,t,r).then(n=>n(this.axios,this.basePath))}};const WT=function(e){return{executeTrajectory:async(t,r,n,o={})=>{C("executeTrajectory","cell",t),C("executeTrajectory","controller",r),C("executeTrajectory","executeTrajectoryRequest",n);const s="/cells/{cell}/controllers/{controller}/execution/trajectory".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(n,l,e),{url:W(a),options:l}}}},JT=function(e){const t=WT(e);return{async executeTrajectory(r,n,o,s){var c,u;const a=await t.executeTrajectory(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["TrajectoryExecutionApi.executeTrajectory"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)}}};var YT=class extends $e{executeTrajectory(e,t,r,n){return JT(this.configuration).executeTrajectory(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const KT=function(e){return{planCollisionFree:async(t,r,n={})=>{C("planCollisionFree","cell",t),C("planCollisionFree","planCollisionFreeRequest",r);const o="/cells/{cell}/trajectory-planning/plan-collision-free".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=me(r,i,e),{url:W(s),options:i}},planTrajectory:async(t,r,n={})=>{C("planTrajectory","cell",t),C("planTrajectory","planTrajectoryRequest",r);const o="/cells/{cell}/trajectory-planning/plan-trajectory".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};G(i,e),await H(l,e),l["Content-Type"]="application/json",q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=me(r,i,e),{url:W(s),options:i}}}},rd=function(e){const t=KT(e);return{async planCollisionFree(r,n,o){var l,c;const s=await t.planCollisionFree(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["TrajectoryPlanningApi.planCollisionFree"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async planTrajectory(r,n,o){var l,c;const s=await t.planTrajectory(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["TrajectoryPlanningApi.planTrajectory"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)}}};var QT=class extends $e{planCollisionFree(e,t,r){return rd(this.configuration).planCollisionFree(e,t,r).then(n=>n(this.axios,this.basePath))}planTrajectory(e,t,r){return rd(this.configuration).planTrajectory(e,t,r).then(n=>n(this.axios,this.basePath))}};const XT=function(e){return{addVirtualControllerCoordinateSystem:async(t,r,n,o,s={})=>{C("addVirtualControllerCoordinateSystem","cell",t),C("addVirtualControllerCoordinateSystem","controller",r),C("addVirtualControllerCoordinateSystem","coordinateSystem",n),C("addVirtualControllerCoordinateSystem","coordinateSystemData",o);const a="/cells/{cell}/virtual-controllers/{controller}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{coordinate-system}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};G(c,e),await H(u,e),u["Content-Type"]="application/json",q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=me(o,c,e),{url:W(i),options:c}},addVirtualControllerTcp:async(t,r,n,o,s,a={})=>{C("addVirtualControllerTcp","cell",t),C("addVirtualControllerTcp","controller",r),C("addVirtualControllerTcp","motionGroup",n),C("addVirtualControllerTcp","tcp",o),C("addVirtualControllerTcp","robotTcpData",s);const i="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/tcps/{tcp}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))).replace("{tcp}",encodeURIComponent(String(o))),l=new URL(i,z);let c;e&&(c=e.baseOptions);const u={method:"PUT",...c,...a},d={},h={};G(u,e),await H(d,e),d["Content-Type"]="application/json",q(l,h);let p=c&&c.headers?c.headers:{};return u.headers={...d,...p,...a.headers},u.data=me(s,u,e),{url:W(l),options:u}},deleteVirtualControllerCoordinateSystem:async(t,r,n,o,s={})=>{C("deleteVirtualControllerCoordinateSystem","cell",t),C("deleteVirtualControllerCoordinateSystem","controller",r),C("deleteVirtualControllerCoordinateSystem","coordinateSystem",n);const a="/cells/{cell}/virtual-controllers/{controller}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{coordinate-system}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...s},u={},d={};G(c,e),await H(u,e),o!==void 0&&(d.delete_dependent=o),q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:W(i),options:c}},deleteVirtualControllerTcp:async(t,r,n,o,s={})=>{C("deleteVirtualControllerTcp","cell",t),C("deleteVirtualControllerTcp","controller",r),C("deleteVirtualControllerTcp","motionGroup",n),C("deleteVirtualControllerTcp","tcp",o);const a="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/tcps/{tcp}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))).replace("{tcp}",encodeURIComponent(String(o))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...s},u={},d={};G(c,e),await H(u,e),q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:W(i),options:c}},getEmergencyStop:async(t,r,n={})=>{C("getEmergencyStop","cell",t),C("getEmergencyStop","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/emergency-stop".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getMotionGroupState:async(t,r,n,o={})=>{C("getMotionGroupState","cell",t),C("getMotionGroupState","controller",r),C("getMotionGroupState","motionGroup",n);const s="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},getMotionGroups:async(t,r,n={})=>{C("getMotionGroups","cell",t),C("getMotionGroups","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/motion-groups".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getOperationMode:async(t,r,n={})=>{C("getOperationMode","cell",t),C("getOperationMode","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/operationmode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getVirtualControllerMounting:async(t,r,n,o={})=>{C("getVirtualControllerMounting","cell",t),C("getVirtualControllerMounting","controller",r),C("getVirtualControllerMounting","motionGroup",n);const s="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},listVirtualControllerCoordinateSystems:async(t,r,n={})=>{C("listVirtualControllerCoordinateSystems","cell",t),C("listVirtualControllerCoordinateSystems","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},listVirtualControllerTcps:async(t,r,n,o={})=>{C("listVirtualControllerTcps","cell",t),C("listVirtualControllerTcps","controller",r),C("listVirtualControllerTcps","motionGroup",n);const s="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/tcps".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},setEmergencyStop:async(t,r,n,o={})=>{C("setEmergencyStop","cell",t),C("setEmergencyStop","controller",r);const s="/cells/{cell}/virtual-controllers/{controller}/emergency-stop".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.active=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},setMotionGroupState:async(t,r,n,o,s={})=>{C("setMotionGroupState","cell",t),C("setMotionGroupState","controller",r),C("setMotionGroupState","motionGroup",n),C("setMotionGroupState","motionGroupJoints",o);const a="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};G(c,e),await H(u,e),u["Content-Type"]="application/json",q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=me(o,c,e),{url:W(i),options:c}},setOperationMode:async(t,r,n,o={})=>{C("setOperationMode","cell",t),C("setOperationMode","controller",r),C("setOperationMode","mode",n);const s="/cells/{cell}/virtual-controllers/{controller}/operationmode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.mode=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},setVirtualControllerMounting:async(t,r,n,o,s={})=>{C("setVirtualControllerMounting","cell",t),C("setVirtualControllerMounting","controller",r),C("setVirtualControllerMounting","motionGroup",n),C("setVirtualControllerMounting","coordinateSystem",o);const a="/cells/{cell}/virtual-controllers/{controller}/motion-groups/{motion-group}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{motion-group}",encodeURIComponent(String(n))),i=new URL(a,z);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};G(c,e),await H(u,e),u["Content-Type"]="application/json",q(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=me(o,c,e),{url:W(i),options:c}}}},Ze=function(e){const t=XT(e);return{async addVirtualControllerCoordinateSystem(r,n,o,s,a){var u,d;const i=await t.addVirtualControllerCoordinateSystem(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["VirtualControllerApi.addVirtualControllerCoordinateSystem"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,U,$,e)(h,c||p)},async addVirtualControllerTcp(r,n,o,s,a,i){var d,h;const l=await t.addVirtualControllerTcp(r,n,o,s,a,i),c=(e==null?void 0:e.serverIndex)??0,u=(h=(d=N["VirtualControllerApi.addVirtualControllerTcp"])==null?void 0:d[c])==null?void 0:h.url;return(p,f)=>J(l,U,$,e)(p,u||f)},async deleteVirtualControllerCoordinateSystem(r,n,o,s,a){var u,d;const i=await t.deleteVirtualControllerCoordinateSystem(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["VirtualControllerApi.deleteVirtualControllerCoordinateSystem"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,U,$,e)(h,c||p)},async deleteVirtualControllerTcp(r,n,o,s,a){var u,d;const i=await t.deleteVirtualControllerTcp(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["VirtualControllerApi.deleteVirtualControllerTcp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,U,$,e)(h,c||p)},async getEmergencyStop(r,n,o){var l,c;const s=await t.getEmergencyStop(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["VirtualControllerApi.getEmergencyStop"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async getMotionGroupState(r,n,o,s){var c,u;const a=await t.getMotionGroupState(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerApi.getMotionGroupState"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)},async getMotionGroups(r,n,o){var l,c;const s=await t.getMotionGroups(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["VirtualControllerApi.getMotionGroups"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async getOperationMode(r,n,o){var l,c;const s=await t.getOperationMode(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["VirtualControllerApi.getOperationMode"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async getVirtualControllerMounting(r,n,o,s){var c,u;const a=await t.getVirtualControllerMounting(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerApi.getVirtualControllerMounting"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)},async listVirtualControllerCoordinateSystems(r,n,o){var l,c;const s=await t.listVirtualControllerCoordinateSystems(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["VirtualControllerApi.listVirtualControllerCoordinateSystems"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async listVirtualControllerTcps(r,n,o,s){var c,u;const a=await t.listVirtualControllerTcps(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerApi.listVirtualControllerTcps"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)},async setEmergencyStop(r,n,o,s){var c,u;const a=await t.setEmergencyStop(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerApi.setEmergencyStop"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)},async setMotionGroupState(r,n,o,s,a){var u,d;const i=await t.setMotionGroupState(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["VirtualControllerApi.setMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,U,$,e)(h,c||p)},async setOperationMode(r,n,o,s){var c,u;const a=await t.setOperationMode(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerApi.setOperationMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)},async setVirtualControllerMounting(r,n,o,s,a){var u,d;const i=await t.setVirtualControllerMounting(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=N["VirtualControllerApi.setVirtualControllerMounting"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>J(i,U,$,e)(h,c||p)}}};var ZT=class extends $e{addVirtualControllerCoordinateSystem(e,t,r,n,o){return Ze(this.configuration).addVirtualControllerCoordinateSystem(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}addVirtualControllerTcp(e,t,r,n,o,s){return Ze(this.configuration).addVirtualControllerTcp(e,t,r,n,o,s).then(a=>a(this.axios,this.basePath))}deleteVirtualControllerCoordinateSystem(e,t,r,n,o){return Ze(this.configuration).deleteVirtualControllerCoordinateSystem(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}deleteVirtualControllerTcp(e,t,r,n,o){return Ze(this.configuration).deleteVirtualControllerTcp(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}getEmergencyStop(e,t,r){return Ze(this.configuration).getEmergencyStop(e,t,r).then(n=>n(this.axios,this.basePath))}getMotionGroupState(e,t,r,n){return Ze(this.configuration).getMotionGroupState(e,t,r,n).then(o=>o(this.axios,this.basePath))}getMotionGroups(e,t,r){return Ze(this.configuration).getMotionGroups(e,t,r).then(n=>n(this.axios,this.basePath))}getOperationMode(e,t,r){return Ze(this.configuration).getOperationMode(e,t,r).then(n=>n(this.axios,this.basePath))}getVirtualControllerMounting(e,t,r,n){return Ze(this.configuration).getVirtualControllerMounting(e,t,r,n).then(o=>o(this.axios,this.basePath))}listVirtualControllerCoordinateSystems(e,t,r){return Ze(this.configuration).listVirtualControllerCoordinateSystems(e,t,r).then(n=>n(this.axios,this.basePath))}listVirtualControllerTcps(e,t,r,n){return Ze(this.configuration).listVirtualControllerTcps(e,t,r,n).then(o=>o(this.axios,this.basePath))}setEmergencyStop(e,t,r,n){return Ze(this.configuration).setEmergencyStop(e,t,r,n).then(o=>o(this.axios,this.basePath))}setMotionGroupState(e,t,r,n,o){return Ze(this.configuration).setMotionGroupState(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}setOperationMode(e,t,r,n){return Ze(this.configuration).setOperationMode(e,t,r,n).then(o=>o(this.axios,this.basePath))}setVirtualControllerMounting(e,t,r,n,o){return Ze(this.configuration).setVirtualControllerMounting(e,t,r,n,o).then(s=>s(this.axios,this.basePath))}};const e2=function(e){return{externalJointsStream:async(t,r,n,o={})=>{C("externalJointsStream","cell",t),C("externalJointsStream","controller",r),C("externalJointsStream","externalJointStreamRequest",n);const s="/cells/{cell}/virtual-controllers/{controller}/external-joints-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(n,l,e),{url:W(a),options:l}},getCycleTime:async(t,r,n={})=>{C("getCycleTime","cell",t),C("getCycleTime","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/cycle-time".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},getVirtualControllerBehavior:async(t,r,n={})=>{C("getVirtualControllerBehavior","cell",t),C("getVirtualControllerBehavior","controller",r);const o="/cells/{cell}/virtual-controllers/{controller}/behavior".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,z);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};G(i,e),await H(l,e),q(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:W(s),options:i}},setVirtualControllerBehavior:async(t,r,n,o={})=>{C("setVirtualControllerBehavior","cell",t),C("setVirtualControllerBehavior","controller",r);const s="/cells/{cell}/virtual-controllers/{controller}/behavior".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),n!==void 0&&(u.behavior=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}}}},jo=function(e){const t=e2(e);return{async externalJointsStream(r,n,o,s){var c,u;const a=await t.externalJointsStream(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerBehaviorApi.externalJointsStream"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)},async getCycleTime(r,n,o){var l,c;const s=await t.getCycleTime(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["VirtualControllerBehaviorApi.getCycleTime"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async getVirtualControllerBehavior(r,n,o){var l,c;const s=await t.getVirtualControllerBehavior(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=N["VirtualControllerBehaviorApi.getVirtualControllerBehavior"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>J(s,U,$,e)(u,i||d)},async setVirtualControllerBehavior(r,n,o,s){var c,u;const a=await t.setVirtualControllerBehavior(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerBehaviorApi.setVirtualControllerBehavior"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)}}};var t2=class extends $e{externalJointsStream(e,t,r,n){return jo(this.configuration).externalJointsStream(e,t,r,n).then(o=>o(this.axios,this.basePath))}getCycleTime(e,t,r){return jo(this.configuration).getCycleTime(e,t,r).then(n=>n(this.axios,this.basePath))}getVirtualControllerBehavior(e,t,r){return jo(this.configuration).getVirtualControllerBehavior(e,t,r).then(n=>n(this.axios,this.basePath))}setVirtualControllerBehavior(e,t,r,n){return jo(this.configuration).setVirtualControllerBehavior(e,t,r,n).then(o=>o(this.axios,this.basePath))}};const r2=function(e){return{listIOs:async(t,r,n,o={})=>{C("listIOs","cell",t),C("listIOs","controller",r),C("listIOs","ios",n);const s="/cells/{cell}/virtual-controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};G(l,e),await H(c,e),n&&(u.ios=n),q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:W(a),options:l}},listVirtualControllerIODescriptions:async(t,r,n,o,s,a,i={})=>{C("listVirtualControllerIODescriptions","cell",t),C("listVirtualControllerIODescriptions","controller",r);const l="/cells/{cell}/virtual-controllers/{controller}/ios/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),c=new URL(l,z);let u;e&&(u=e.baseOptions);const d={method:"GET",...u,...i},h={},p={};G(d,e),await H(h,e),n&&(p.ios=n),o!==void 0&&(p.direction=o),s!==void 0&&(p.value_type=s),a!==void 0&&(p.group=a),q(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:W(c),options:d}},setIOValues:async(t,r,n,o={})=>{C("setIOValues","cell",t),C("setIOValues","controller",r),C("setIOValues","iOValue",n);const s="/cells/{cell}/virtual-controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,z);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};G(l,e),await H(c,e),c["Content-Type"]="application/json",q(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=me(n,l,e),{url:W(a),options:l}}}},Ka=function(e){const t=r2(e);return{async listIOs(r,n,o,s){var c,u;const a=await t.listIOs(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerInputsOutputsApi.listIOs"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)},async listVirtualControllerIODescriptions(r,n,o,s,a,i,l){var h,p;const c=await t.listVirtualControllerIODescriptions(r,n,o,s,a,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=N["VirtualControllerInputsOutputsApi.listVirtualControllerIODescriptions"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>J(c,U,$,e)(f,d||m)},async setIOValues(r,n,o,s){var c,u;const a=await t.setIOValues(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=N["VirtualControllerInputsOutputsApi.setIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>J(a,U,$,e)(d,l||h)}}};var n2=class extends $e{listIOs(e,t,r,n){return Ka(this.configuration).listIOs(e,t,r,n).then(o=>o(this.axios,this.basePath))}listVirtualControllerIODescriptions(e,t,r,n,o,s,a){return Ka(this.configuration).listVirtualControllerIODescriptions(e,t,r,n,o,s,a).then(i=>i(this.axios,this.basePath))}setIOValues(e,t,r,n){return Ka(this.configuration).setIOValues(e,t,r,n).then(o=>o(this.axios,this.basePath))}},o2=class{constructor(e,t){this.cellId=e,this.opts=t,this.system=this.withUnwrappedResponsesOnly(GT),this.cell=this.withUnwrappedResponsesOnly(wT),this.motionGroup=this.withCellId(kT),this.motionGroupModels=this.withCellId(DT),this.controller=this.withCellId(TT),this.controllerIOs=this.withCellId(IT),this.trajectoryPlanning=this.withCellId(QT),this.trajectoryExecution=this.withCellId(YT),this.trajectoryCaching=this.withCellId(qT),this.application=this.withCellId(Zu),this.applicationGlobal=this.withUnwrappedResponsesOnly(Zu),this.jogging=this.withCellId(RT),this.kinematics=this.withCellId(VT),this.busInputsOutputs=this.withCellId(vT),this.virtualController=this.withCellId(ZT),this.virtualControllerBehavior=this.withCellId(t2),this.virtualControllerIOs=this.withCellId(n2),this.storeObject=this.withCellId(NT),this.storeCollisionComponents=this.withCellId(LT),this.storeCollisionSetups=this.withCellId(FT)}withCellId(e){const t=new e({...this.opts,isJsonMime:r=>r==="application/json"},this.opts.basePath??"",this.opts.axiosInstance??U.create());for(const r of Reflect.ownKeys(Reflect.getPrototypeOf(t)))if(r!=="constructor"&&typeof t[r]=="function"){const n=t[r];t[r]=(...o)=>n.apply(t,[this.cellId,...o]).then(s=>s.data)}return t}withUnwrappedResponsesOnly(e){const t=new e({...this.opts,isJsonMime:r=>r==="application/json"},this.opts.basePath??"",this.opts.axiosInstance??U.create());for(const r of Reflect.ownKeys(Reflect.getPrototypeOf(t)))if(r!=="constructor"&&typeof t[r]=="function"){const n=t[r];t[r]=(...o)=>n.apply(t,o).then(s=>s.data)}return t}},s2=class{constructor(){this.connections=[]}async handleAPIRequest(e){var o,s,a;const t=[{method:"GET",path:"/cells/:cellId/controllers",handle(){return["mock-ur5e"]}},{method:"GET",path:"/cells/:cellId/controllers/:controllerId",handle(){return{configuration:{initial_joint_position:"[0,-1.571,-1.571,-1.571,1.571,-1.571,0]",kind:"VirtualController",manufacturer:"universalrobots",type:"universalrobots-ur5e"},name:"mock-ur5"}}},{method:"GET",path:"/cells/:cellId/controllers/:controllerId/state",handle(){return{mode:"MODE_CONTROL",last_error:[],timestamp:"2025-10-16T09:19:26.634534092Z",sequence_number:1054764,controller:"mock-ur5e",operation_mode:"OPERATION_MODE_AUTO",safety_state:"SAFETY_STATE_NORMAL",velocity_override:100,motion_groups:[{timestamp:"2025-10-16T09:19:26.634534092Z",sequence_number:1054764,motion_group:"0@mock-ur5e",controller:"mock-ur5e",joint_position:[1.487959623336792,-1.8501918315887451,1.8003005981445312,6.034560203552246,1.4921919107437134,1.593459963798523],joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},joint_torque:[],joint_current:[0,0,0,0,0,0],flange_pose:{position:[107.6452433732927,-409.0402987746852,524.2402132330305],orientation:[.9874434028353319,-.986571714997442,1.3336589451098142]},tcp:"Flange",tcp_pose:{position:[107.6452433732927,-409.0402987746852,524.2402132330305],orientation:[.9874434028353319,-.986571714997442,1.3336589451098142]},payload:"",coordinate_system:"",standstill:!0}]}}},{method:"GET",path:"/cells/:cellId/controllers/:controllerId/motion-groups/:motionGroupId/description",handle(){return{motion_group_model:"UniversalRobots_UR5e",mounting:{position:[0,0,0],orientation:[0,0,0]},tcps:{Flange:{name:"Default-Flange",pose:{position:[0,0,0],orientation:[0,0,0]}}},payloads:{"FPay-0":{name:"FPay-0",payload:0,center_of_mass:[0,0,0],moment_of_inertia:[0,0,0]}},cycle_time:8,dh_parameters:[{alpha:1.5707963267948966,d:162.25},{a:-425},{a:-392.2},{alpha:1.5707963267948966,d:133.3},{alpha:-1.5707963267948966,d:99.7},{d:99.6}],operation_limits:{auto_limits:{joints:[{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28}],tcp:{velocity:5e3},elbow:{velocity:5e3},flange:{velocity:5e3}},manual_limits:{joints:[{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28}],tcp:{velocity:5e3}},manual_t1_limits:{joints:[{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28}],tcp:{velocity:5e3}},manual_t2_limits:{joints:[{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:150},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28},{position:{lower_limit:-6.283185307179586,upper_limit:6.283185307179586},velocity:3.34159255027771,acceleration:40,torque:28}],tcp:{velocity:5e3}}},serial_number:"WBVirtualRobot"}}},{method:"GET",path:"/cells/:cellId/controllers/:controllerId/coordinate-systems",handle(){return[{coordinate_system:"",name:"world",reference_coordinate_system:"",position:[0,0,0],orientation:[0,0,0],orientation_type:"ROTATION_VECTOR"},{coordinate_system:"CS-0",name:"Default-CS",reference_coordinate_system:"",position:[0,0,0],orientation:[0,0,0],orientation_type:"ROTATION_VECTOR"}]}}],r=((o=e.method)==null?void 0:o.toUpperCase())||"GET",n=`/cells${(a=(s=e.url)==null?void 0:s.split("/cells")[1])==null?void 0:a.split("?")[0]}`;for(const i of t){const l=fT.match(i.path)(n||"");if(r===i.method&&l){const c=i.handle();return{status:200,statusText:"Success",data:JSON.stringify(c),headers:{},config:e,request:{responseURL:e.url}}}}throw new Ti(`No mock handler matched this request: ${r} ${n}`,"404",e)}handleWebsocketConnection(e){this.connections.push(e),setTimeout(()=>{e.dispatchEvent(new Event("open")),console.log("Websocket connection opened from",e.url),e.url.includes("/state-stream")&&e.dispatchEvent(new MessageEvent("message",{data:JSON.stringify(a2)})),e.url.includes("/execution/jogging")&&e.dispatchEvent(new MessageEvent("message",{data:JSON.stringify({result:{message:"string",kind:"INITIALIZE_RECEIVED"}})}))},10)}handleWebsocketMessage(e,t){console.log(`Received message on ${e.url}`,t)}};const a2={result:{motion_group:"0@universalrobots-ur5e",controller:"universalrobots-ur5e",timestamp:new Date().toISOString(),sequence_number:1,joint_position:[1.1699999570846558,-1.5700000524520874,1.3600000143051147,1.0299999713897705,1.2899999618530273,1.2799999713897705],joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},standstill:!1,flange_pose:{position:[1.3300010259703043,-409.2680714682808,531.0203477065281],orientation:[1.7564919306270736,-1.7542521568325058,.7326972590614671]},tcp_pose:{position:[1.3300010259703043,-409.2680714682808,531.0203477065281],orientation:[1.7564919306270736,-1.7542521568325058,.7326972590614671]}}};function i2(e){return e.startsWith("http")||(e=`http://${e}`),new URL(e).toString()}var l2=class{constructor(e){this.authPromise=null,this.accessToken=null;const t=e.cellId??"cell";this.config={cellId:t,...e},this.accessToken=e.accessToken||za.getString("wbjs.access_token")||null,this.config.instanceUrl==="https://mock.example.com"?this.mock=new s2:this.config.instanceUrl=i2(this.config.instanceUrl);const r=U.create({baseURL:Ja(this.config.instanceUrl,"/api/v2"),headers:typeof window<"u"&&window.location.origin.includes("localhost")?{}:{"X-Wandelbots-Client":"Wandelbots-Nova-JS-SDK"}});r.interceptors.request.use(async n=>(n.headers.Authorization||(this.accessToken?n.headers.Authorization=`Bearer ${this.accessToken}`:this.config.username&&this.config.password&&(n.headers.Authorization=`Basic ${btoa(`${e.username}:${e.password}`)}`)),n)),typeof window<"u"&&r.interceptors.response.use(n=>n,async n=>{var o,s;if(dT(n))if(((o=n.response)==null?void 0:o.status)===401)try{if(await this.renewAuthentication(),n.config)return this.accessToken?n.config.headers.Authorization=`Bearer ${this.accessToken}`:delete n.config.headers.Authorization,r.request(n.config)}catch(a){return Promise.reject(a)}else((s=n.response)==null?void 0:s.status)===503&&(await fetch(window.location.href)).status===503&&window.location.reload();return Promise.reject(n)}),this.api=new o2(t,{...e,basePath:Ja(this.config.instanceUrl,"/api/v2"),isJsonMime:n=>n==="application/json",baseOptions:{...this.mock?{adapter:n=>this.mock.handleAPIRequest(n)}:{},...e.baseOptions},axiosInstance:r})}async renewAuthentication(){if(!this.authPromise){this.authPromise=jw(this.config.instanceUrl);try{this.accessToken=await this.authPromise,this.accessToken?za.setString("wbjs.access_token",this.accessToken):za.delete("wbjs.access_token")}finally{this.authPromise=null}}}makeWebsocketURL(e){const t=new URL(Ja(this.config.instanceUrl,`/api/v2/cells/${this.config.cellId}`,e));return t.protocol=t.protocol.replace("http","ws"),t.protocol=t.protocol.replace("https","wss"),this.accessToken?t.searchParams.append("token",this.accessToken):this.config.username&&this.config.password&&(t.username=this.config.username,t.password=this.config.password),t.toString()}openReconnectingWebsocket(e){return new Vw(this.makeWebsocketURL(e),{mock:this.mock})}};function c2(e){var s,a,i,l,c,u;const t=[((s=e.position)==null?void 0:s[0])??0,((a=e.position)==null?void 0:a[1])??0,((i=e.position)==null?void 0:i[2])??0],r=[((l=e.orientation)==null?void 0:l[0])??0,((c=e.orientation)==null?void 0:c[1])??0,((u=e.orientation)==null?void 0:u[2])??0],n=t.map(d=>d.toFixed(1)),o=r.map(d=>d.toFixed(4));return`(${n.concat(o).join(", ")})`}function zt(e,t,r){return Math.max(t,Math.min(r,e))}class u2{constructor(t=0,r=0,n=0,o=1){this.isQuaternion=!0,this._x=t,this._y=r,this._z=n,this._w=o}static slerpFlat(t,r,n,o,s,a,i){let l=n[o+0],c=n[o+1],u=n[o+2],d=n[o+3];const h=s[a+0],p=s[a+1],f=s[a+2],m=s[a+3];if(i===0){t[r+0]=l,t[r+1]=c,t[r+2]=u,t[r+3]=d;return}if(i===1){t[r+0]=h,t[r+1]=p,t[r+2]=f,t[r+3]=m;return}if(d!==m||l!==h||c!==p||u!==f){let b=1-i;const S=l*h+c*p+u*f+d*m,P=S>=0?1:-1,v=1-S*S;if(v>Number.EPSILON){const I=Math.sqrt(v),T=Math.atan2(I,S*P);b=Math.sin(b*T)/I,i=Math.sin(i*T)/I}const O=i*P;if(l=l*b+h*O,c=c*b+p*O,u=u*b+f*O,d=d*b+m*O,b===1-i){const I=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=I,c*=I,u*=I,d*=I}}t[r]=l,t[r+1]=c,t[r+2]=u,t[r+3]=d}static multiplyQuaternionsFlat(t,r,n,o,s,a){const i=n[o],l=n[o+1],c=n[o+2],u=n[o+3],d=s[a],h=s[a+1],p=s[a+2],f=s[a+3];return t[r]=i*f+u*d+l*p-c*h,t[r+1]=l*f+u*h+c*d-i*p,t[r+2]=c*f+u*p+i*h-l*d,t[r+3]=u*f-i*d-l*h-c*p,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,r,n,o){return this._x=t,this._y=r,this._z=n,this._w=o,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,r=!0){const n=t._x,o=t._y,s=t._z,a=t._order,i=Math.cos,l=Math.sin,c=i(n/2),u=i(o/2),d=i(s/2),h=l(n/2),p=l(o/2),f=l(s/2);switch(a){case"XYZ":this._x=h*u*d+c*p*f,this._y=c*p*d-h*u*f,this._z=c*u*f+h*p*d,this._w=c*u*d-h*p*f;break;case"YXZ":this._x=h*u*d+c*p*f,this._y=c*p*d-h*u*f,this._z=c*u*f-h*p*d,this._w=c*u*d+h*p*f;break;case"ZXY":this._x=h*u*d-c*p*f,this._y=c*p*d+h*u*f,this._z=c*u*f+h*p*d,this._w=c*u*d-h*p*f;break;case"ZYX":this._x=h*u*d-c*p*f,this._y=c*p*d+h*u*f,this._z=c*u*f-h*p*d,this._w=c*u*d+h*p*f;break;case"YZX":this._x=h*u*d+c*p*f,this._y=c*p*d+h*u*f,this._z=c*u*f-h*p*d,this._w=c*u*d-h*p*f;break;case"XZY":this._x=h*u*d-c*p*f,this._y=c*p*d-h*u*f,this._z=c*u*f+h*p*d,this._w=c*u*d+h*p*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return r===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,r){const n=r/2,o=Math.sin(n);return this._x=t.x*o,this._y=t.y*o,this._z=t.z*o,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){const r=t.elements,n=r[0],o=r[4],s=r[8],a=r[1],i=r[5],l=r[9],c=r[2],u=r[6],d=r[10],h=n+i+d;if(h>0){const p=.5/Math.sqrt(h+1);this._w=.25/p,this._x=(u-l)*p,this._y=(s-c)*p,this._z=(a-o)*p}else if(n>i&&n>d){const p=2*Math.sqrt(1+n-i-d);this._w=(u-l)/p,this._x=.25*p,this._y=(o+a)/p,this._z=(s+c)/p}else if(i>d){const p=2*Math.sqrt(1+i-n-d);this._w=(s-c)/p,this._x=(o+a)/p,this._y=.25*p,this._z=(l+u)/p}else{const p=2*Math.sqrt(1+d-n-i);this._w=(a-o)/p,this._x=(s+c)/p,this._y=(l+u)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(t,r){let n=t.dot(r)+1;return n<Number.EPSILON?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*r.z-t.z*r.y,this._y=t.z*r.x-t.x*r.z,this._z=t.x*r.y-t.y*r.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(zt(this.dot(t),-1,1)))}rotateTowards(t,r){const n=this.angleTo(t);if(n===0)return this;const o=Math.min(1,r/n);return this.slerp(t,o),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,r){const n=t._x,o=t._y,s=t._z,a=t._w,i=r._x,l=r._y,c=r._z,u=r._w;return this._x=n*u+a*i+o*c-s*l,this._y=o*u+a*l+s*i-n*c,this._z=s*u+a*c+n*l-o*i,this._w=a*u-n*i-o*l-s*c,this._onChangeCallback(),this}slerp(t,r){if(r===0)return this;if(r===1)return this.copy(t);const n=this._x,o=this._y,s=this._z,a=this._w;let i=a*t._w+n*t._x+o*t._y+s*t._z;if(i<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,i=-i):this.copy(t),i>=1)return this._w=a,this._x=n,this._y=o,this._z=s,this;const l=1-i*i;if(l<=Number.EPSILON){const p=1-r;return this._w=p*a+r*this._w,this._x=p*n+r*this._x,this._y=p*o+r*this._y,this._z=p*s+r*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,i),d=Math.sin((1-r)*u)/c,h=Math.sin(r*u)/c;return this._w=a*d+this._w*h,this._x=n*d+this._x*h,this._y=o*d+this._y*h,this._z=s*d+this._z*h,this._onChangeCallback(),this}slerpQuaternions(t,r,n){return this.copy(t).slerp(r,n)}random(){const t=2*Math.PI*Math.random(),r=2*Math.PI*Math.random(),n=Math.random(),o=Math.sqrt(1-n),s=Math.sqrt(n);return this.set(o*Math.sin(t),o*Math.cos(t),s*Math.sin(r),s*Math.cos(r))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,r=0){return this._x=t[r],this._y=t[r+1],this._z=t[r+2],this._w=t[r+3],this._onChangeCallback(),this}toArray(t=[],r=0){return t[r]=this._x,t[r+1]=this._y,t[r+2]=this._z,t[r+3]=this._w,t}fromBufferAttribute(t,r){return this._x=t.getX(r),this._y=t.getY(r),this._z=t.getZ(r),this._w=t.getW(r),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class rn{constructor(t=0,r=0,n=0){rn.prototype.isVector3=!0,this.x=t,this.y=r,this.z=n}set(t,r,n){return n===void 0&&(n=this.z),this.x=t,this.y=r,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,r){switch(t){case 0:this.x=r;break;case 1:this.y=r;break;case 2:this.z=r;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,r){return this.x=t.x+r.x,this.y=t.y+r.y,this.z=t.z+r.z,this}addScaledVector(t,r){return this.x+=t.x*r,this.y+=t.y*r,this.z+=t.z*r,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,r){return this.x=t.x-r.x,this.y=t.y-r.y,this.z=t.z-r.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,r){return this.x=t.x*r.x,this.y=t.y*r.y,this.z=t.z*r.z,this}applyEuler(t){return this.applyQuaternion(nd.setFromEuler(t))}applyAxisAngle(t,r){return this.applyQuaternion(nd.setFromAxisAngle(t,r))}applyMatrix3(t){const r=this.x,n=this.y,o=this.z,s=t.elements;return this.x=s[0]*r+s[3]*n+s[6]*o,this.y=s[1]*r+s[4]*n+s[7]*o,this.z=s[2]*r+s[5]*n+s[8]*o,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const r=this.x,n=this.y,o=this.z,s=t.elements,a=1/(s[3]*r+s[7]*n+s[11]*o+s[15]);return this.x=(s[0]*r+s[4]*n+s[8]*o+s[12])*a,this.y=(s[1]*r+s[5]*n+s[9]*o+s[13])*a,this.z=(s[2]*r+s[6]*n+s[10]*o+s[14])*a,this}applyQuaternion(t){const r=this.x,n=this.y,o=this.z,s=t.x,a=t.y,i=t.z,l=t.w,c=2*(a*o-i*n),u=2*(i*r-s*o),d=2*(s*n-a*r);return this.x=r+l*c+a*d-i*u,this.y=n+l*u+i*c-s*d,this.z=o+l*d+s*u-a*c,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const r=this.x,n=this.y,o=this.z,s=t.elements;return this.x=s[0]*r+s[4]*n+s[8]*o,this.y=s[1]*r+s[5]*n+s[9]*o,this.z=s[2]*r+s[6]*n+s[10]*o,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,r){return this.x=zt(this.x,t.x,r.x),this.y=zt(this.y,t.y,r.y),this.z=zt(this.z,t.z,r.z),this}clampScalar(t,r){return this.x=zt(this.x,t,r),this.y=zt(this.y,t,r),this.z=zt(this.z,t,r),this}clampLength(t,r){const n=this.length();return this.divideScalar(n||1).multiplyScalar(zt(n,t,r))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,r){return this.x+=(t.x-this.x)*r,this.y+=(t.y-this.y)*r,this.z+=(t.z-this.z)*r,this}lerpVectors(t,r,n){return this.x=t.x+(r.x-t.x)*n,this.y=t.y+(r.y-t.y)*n,this.z=t.z+(r.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,r){const n=t.x,o=t.y,s=t.z,a=r.x,i=r.y,l=r.z;return this.x=o*l-s*i,this.y=s*a-n*l,this.z=n*i-o*a,this}projectOnVector(t){const r=t.lengthSq();if(r===0)return this.set(0,0,0);const n=t.dot(this)/r;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return Qa.copy(this).projectOnVector(t),this.sub(Qa)}reflect(t){return this.sub(Qa.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const r=Math.sqrt(this.lengthSq()*t.lengthSq());if(r===0)return Math.PI/2;const n=this.dot(t)/r;return Math.acos(zt(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const r=this.x-t.x,n=this.y-t.y,o=this.z-t.z;return r*r+n*n+o*o}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,r,n){const o=Math.sin(r)*t;return this.x=o*Math.sin(n),this.y=Math.cos(r)*t,this.z=o*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,r,n){return this.x=t*Math.sin(r),this.y=n,this.z=t*Math.cos(r),this}setFromMatrixPosition(t){const r=t.elements;return this.x=r[12],this.y=r[13],this.z=r[14],this}setFromMatrixScale(t){const r=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),o=this.setFromMatrixColumn(t,2).length();return this.x=r,this.y=n,this.z=o,this}setFromMatrixColumn(t,r){return this.fromArray(t.elements,r*4)}setFromMatrix3Column(t,r){return this.fromArray(t.elements,r*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,r=0){return this.x=t[r],this.y=t[r+1],this.z=t[r+2],this}toArray(t=[],r=0){return t[r]=this.x,t[r+1]=this.y,t[r+2]=this.z,t}fromBufferAttribute(t,r){return this.x=t.getX(r),this.y=t.getY(r),this.z=t.getZ(r),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,r=Math.random()*2-1,n=Math.sqrt(1-r*r);return this.x=n*Math.cos(t),this.y=r,this.z=n*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Qa=new rn,nd=new u2;function d2(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 h2(e,t,r){if(e===void 0&&t||e&&t===void 0||(e==null?void 0:e.orientation)===void 0||(t==null?void 0:t.orientation)===void 0||(e==null?void 0:e.position)===void 0||(t==null?void 0:t.position)===void 0)return!1;if(e===void 0||t===void 0)return!0;let n=0;return n+=Math.abs(e.orientation[0]-t.orientation[0]),n+=Math.abs(e.orientation[1]-t.orientation[1]),n+=Math.abs(e.orientation[2]-t.orientation[2]),n+=Math.abs(e.position[0]-t.position[0]),n+=Math.abs(e.position[1]-t.position[1]),n+=Math.abs(e.position[2]-t.position[2]),n<=r}function p2(e,t,r){return e.coordinate_system===t.coordinate_system&&e.tcp===t.tcp&&h2(e.tcp_pose,t.tcp_pose,r)}const od=1e-4;function f2(e,t){const r=new wt.Vector3(t[0],t[1],t[2]),n=new wt.Vector3(e[0],e[1],e[2]),o=r.length(),s=r.normalize();let a=n.length(),i=n.normalize();i.dot(s)<0&&(a=-a,i=i.multiplyScalar(-1));let l=a-o;return l-=2*Math.PI*Math.floor((l+Math.PI)/(2*Math.PI)),a=o+l,[...i.multiplyScalar(a)]}class jl{constructor(t,r,n,o,s,a){this.nova=t,this.controller=r,this.motionGroup=n,this.description=o,this.initialMotionState=s,this.motionStateSocket=a,this.rapidlyChangingMotionState=s,a.addEventListener("message",i=>{var c;const l=(c=et.tryParseJson(i.data))==null?void 0:c.result;if(!l)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${i.data}`);d2(this.rapidlyChangingMotionState.joint_position,l.joint_position,od)||We.runInAction(()=>{this.rapidlyChangingMotionState=l}),p2(this.rapidlyChangingMotionState,l,od)||We.runInAction(()=>{var u,d,h;this.rapidlyChangingMotionState.tcp_pose==null?this.rapidlyChangingMotionState.tcp_pose=l.tcp_pose:(u=l.tcp_pose)!=null&&u.orientation&&((d=l.tcp_pose)!=null&&d.position)&&((h=this.rapidlyChangingMotionState.tcp_pose)!=null&&h.orientation)?this.rapidlyChangingMotionState.tcp_pose={position:l.tcp_pose.position,orientation:f2(l.tcp_pose.orientation,this.rapidlyChangingMotionState.tcp_pose.orientation)}:console.warn("Received incomplete tcp_pose, ignoring",l.tcp_pose)}),this.rapidlyChangingMotionState.standstill!==l.standstill&&We.runInAction(()=>{this.rapidlyChangingMotionState.standstill=l.standstill})}),We.makeAutoObservable(this)}static async open(t,r){var d;const[n,o]=r.split("@"),s=await t.api.controller.getCurrentRobotControllerState(o),a=s==null?void 0:s.motion_groups.find(h=>h.motion_group===r);if(!s||!a)throw new Error(`Controller ${o} or motion group ${r} not found`);const i=t.openReconnectingWebsocket(`/controllers/${o}/motion-groups/${r}/state-stream`),l=await i.firstMessage(),c=(d=et.tryParseJson(l.data))==null?void 0:d.result;if(!c)throw new Error(`Unable to parse initial motion state message ${l.data}`);console.log(`Connected motion state websocket to motion group ${a.motion_group}. Initial state:
|
|
151
|
+
`,c);const u=await t.api.motionGroup.getMotionGroupDescription(o,a.motion_group);return new jl(t,s,a,u,c,i)}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get wandelscriptIdentifier(){const t=this.motionGroupId.split("@")[0];return`${this.controllerId.replace(/-/g,"_")}_${t}`}get joints(){return this.initialMotionState.joint_position.map((t,r)=>({index:r}))}dispose(){this.motionStateSocket.close()}}class Dl{constructor(t,r={}){this.motionStream=t,this.options=r,this.ENDPOINT_JOGGING="/execution/jogging",this.ENDPOINT_TRAJECTORY="/execution/trajectory",this.DEFAULT_MODE="off",this.DEFAULT_TCP="Flange",this.DEFAULT_INIT_TIMEOUT=5e3,this.DEFAULT_ORIENTATION="coordsys",this.mode="off",this.joggingSocket=null,this.trajectorySocket=null,this.timeout=this.DEFAULT_INIT_TIMEOUT,this.tcp=(r==null?void 0:r.tcp)||t.motionGroup.tcp||this.DEFAULT_TCP,this.orientation=(r==null?void 0:r.orientation)||this.DEFAULT_ORIENTATION,this.timeout=(r==null?void 0:r.timeout)||this.DEFAULT_INIT_TIMEOUT,this.mode=(r==null?void 0:r.mode)||this.DEFAULT_MODE,this.onError=r==null?void 0:r.onError}static async open(t,r,n={}){const o=await jl.open(t,r),s=new Dl(o,n);return await s.setJoggingMode(s.mode),s}async setOptions(t){t.tcp&&(this.tcp=t.tcp),t.orientation&&(this.orientation=t.orientation),t.timeout&&(this.timeout=t.timeout),t.mode&&(this.mode=t.mode),t.onError&&(this.onError=t.onError),this.setJoggingMode(this.mode,!1)}get motionGroupId(){return this.motionStream.motionGroupId}get nova(){return this.motionStream.nova}get numJoints(){return this.motionStream.joints.length}async stop(){if(this.joggingSocket){const t=new Array(this.numJoints).fill(0);this.joggingSocket.sendJson({message_type:"JointVelocityRequest",velocity:t})}this.trajectorySocket&&this.trajectorySocket.sendJson({message_type:"PauseMovementRequest"})}async dispose(){const t=[this.joggingSocket,this.trajectorySocket].filter(r=>r!==null);return t.forEach(r=>{r.dispose()}),this.joggingSocket=null,this.trajectorySocket=null,Promise.all(t.map(r=>r.closed()))}async setJoggingMode(t,r=!0){if(!(this.mode===t&&r)&&(this.dispose(),this.mode=t,this.mode==="jogging"))return this.initializeJoggingWebsocket()}async initializeJoggingWebsocket(){return new Promise((t,r)=>{const n=setTimeout(()=>{r(new Error(`Jogging initialization timeout after ${this.timeout} seconds`))},this.timeout);this.joggingSocket=this.nova.openReconnectingWebsocket(this.ENDPOINT_JOGGING),this.joggingSocket.addEventListener("message",o=>{var a,i;const s=et.tryParseJson(o.data);if(((a=s==null?void 0:s.result)==null?void 0:a.kind)==="INITIALIZE_RECEIVED"){clearTimeout(n),t();return}(s&&"error"in s||((i=s==null?void 0:s.result)==null?void 0:i.kind)==="MOTION_ERROR")&&(clearTimeout(n),this.onError?this.onError(o.data):r(new Error(o.data)))}),this.joggingSocket.sendJson({message_type:"InitializeJoggingRequest",motion_group:this.motionGroupId,tcp:this.tcp})})}async rotateJoints({joint:t,direction:r,velocityRadsPerSec:n}){if(!this.joggingSocket||this.mode!=="jogging")throw new Error("Joint jogging websocket not connected; create one by setting jogging mode to 'jogging'");const o=new Array(this.numJoints).fill(0);o[t]=r==="-"?-n:n,this.joggingSocket.sendJson({message_type:"JointVelocityRequest",velocity:o})}async translateTCP({axis:t,direction:r,velocityMmPerSec:n}){if(!this.joggingSocket||this.mode!=="jogging")throw new Error("Continuous jogging websocket not connected; create one by setting jogging mode to 'jogging'");const o=[0,0,0],s=[0,0,0];s[et.XYZ_TO_VECTOR[t]]=r==="-"?-n:n,this.joggingSocket.sendJson({message_type:"TcpVelocityRequest",translation:s,rotation:o,use_tool_coordinate_system:this.orientation==="tool"})}async rotateTCP({axis:t,direction:r,velocityRadsPerSec:n}){if(!this.joggingSocket||this.mode!=="jogging")throw new Error("Continuous jogging websocket not connected; create one by setting jogging mode to 'jogging'");const o=[0,0,0],s=[0,0,0];o[et.XYZ_TO_VECTOR[t]]=r==="-"?-n:n,this.joggingSocket.sendJson({message_type:"TcpVelocityRequest",translation:s,rotation:o})}async runIncrementalCartesianMotion({currentTcpPose:t,currentJoints:r,coordSystemId:n,velocityInRelevantUnits:o,axis:s,direction:a,motion:i}){const l=[];if(this.mode!=="trajectory")throw new Error("Set jogging mode to 'trajectory' to run incremental cartesian motions");if(i.type==="translate"){if(!t.position)throw new Error("Current pose has no position, cannot perform translation");const S=[...t.position];S[et.XYZ_TO_VECTOR[s]]+=i.distanceMm*(a==="-"?-1:1),l.push({limits_override:{tcp_velocity_limit:o},path:{path_definition_name:"PathLine",target_pose:{position:S,orientation:t.orientation}}})}else if(i.type==="rotate"){if(!t.orientation)throw new Error("Current pose has no orientation, cannot perform rotation");const S=new rn(t.orientation[0],t.orientation[1],t.orientation[2]),P=S.length(),v=S.clone().normalize(),O=i.distanceRads*(a==="-"?-1:1),I=new rn(0,0,0);I[s]=1;const T=Math.cos(.5*O)*Math.cos(.5*P),w=Math.sin(.5*O)*Math.sin(.5*P),R=Math.sin(.5*O)*Math.cos(.5*P),k=Math.cos(.5*O)*Math.sin(.5*P),y=I.dot(v),A=I.clone().cross(v),V=2*Math.acos(T-w*y),M=V/Math.sin(.5*V),j=new rn().addScaledVector(A,w).addScaledVector(I,R).addScaledVector(v,k).multiplyScalar(M);l.push({limits_override:{tcp_orientation_velocity_limit:o},path:{path_definition_name:"PathLine",target_pose:{position:t.position,orientation:[...j]}}})}const c=this.motionStream.description;if(c.cycle_time===void 0){console.warn("Current motion group has no cycle time, cannot plan jogging motion");return}const u={motion_group_model:c.motion_group_model,cycle_time:c.cycle_time,mounting:c.mounting,global:c.operation_limits.auto_limits},d=await this.nova.api.trajectoryPlanning.planTrajectory({motion_group_setup:u,start_joint_position:r,motion_commands:l}),h=d.response;if(!h)throw new Error(`Failed to plan jogging increment motion ${JSON.stringify(d)}`);this.trajectorySocket&&(console.warn("Trajectory jogging websocket already open; will close"),this.trajectorySocket.dispose()),this.trajectorySocket=this.nova.openReconnectingWebsocket(this.ENDPOINT_TRAJECTORY);const p=S=>{var P;if(!S||S.add_trajectory_error||S.message)if(this.onError)this.onError(S);else throw new Error(((P=S==null?void 0:S.add_trajectory_error)==null?void 0:P.message)||(S==null?void 0:S.message)||"Failed to execute trajectory, unknown error");if(!this.trajectorySocket)throw new Error("Failed to execute trajectory, websocket not available anymore");this.trajectorySocket.sendJson({message_type:"StartMovementRequest",direction:"DIRECTION_FORWARD"})},f=async()=>{var S;await We.when(()=>!this.motionStream.rapidlyChangingMotionState.standstill),await We.when(()=>this.motionStream.rapidlyChangingMotionState.standstill),(S=this.trajectorySocket)==null||S.dispose(),this.trajectorySocket=null},m=async()=>{var S;await We.when(()=>this.motionStream.rapidlyChangingMotionState.standstill),(S=this.trajectorySocket)==null||S.dispose(),this.trajectorySocket=null},b=async S=>{if(S!=null&&S.message)if(this.onError){this.onError(S);return}else throw new Error(S.message||"Failed to execute trajectory, unknown error");this.motionStream.rapidlyChangingMotionState.standstill?await f():await m()};this.trajectorySocket.addEventListener("message",S=>{var v;const P=et.tryParseJson(S.data);if(!((v=P==null?void 0:P.result)!=null&&v.kind))throw new Error(`Failed to execute trajectory: Received invalid message ${S.data}`);if(P.result.kind==="INITIALIZE_RECEIVED")p(P.result);else if(P.result.kind==="START_RECEIVED")b(P);else if(P.result.kind!=="PAUSE_RECEIVED")if(P.result.kind==="MOTION_ERROR"&&P.result.message)if(this.onError){this.onError(P);return}else throw new Error(P.result.message);else throw new Error(`Failed to execute trajectory, cannot handle message type "${P.result.kind}"`)}),this.trajectorySocket.sendJson({message_type:"InitializeMovementRequest",trajectory:{message_type:"TrajectoryData",motion_group:this.motionGroupId,data:h,tcp:this.tcp}})}}function m2(e){try{return JSON.stringify(e)}catch{return}}function g2(e,t){throw new Error(t+` ${JSON.stringify(e)}`)}function y2(e){var t,r,n,o;return e instanceof Ti&&e.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":e instanceof Ti&&e.response?`${(t=e.response)==null?void 0:t.status} ${(r=e.response)==null?void 0:r.statusText} from ${(n=e.response)==null?void 0:n.config.url}: ${JSON.stringify((o=e.response)==null?void 0:o.data)}`:e instanceof Error?e.message:`Unexpected error: ${m2(e)||e}`}const Ul=e=>{const t=e.softTimeout||3e3,[r,n]=D.useState(!1),o=E.useTheme();return D.useEffect(()=>{const s=setTimeout(()=>{n(!0)},t);return()=>clearTimeout(s)}),g.jsx(E.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{color:o.palette.text.primary},children:e.error?g.jsx(rf,{loadingMessage:e.message,error:e.error}):g.jsxs(g.Fragment,{children:[g.jsx(E.CircularProgress,{sx:{marginBottom:"24px"}}),!!e.message&&g.jsx("div",{children:e.message}),g.jsx(E.Stack,{sx:{visibility:r?"visible":"hidden",marginTop:"1rem",color:o.palette.text.secondary},children:"This is taking longer than expected..."})]})})},rf=e=>{const t=y2(e.error),r=e.error instanceof Error?e.error.stack:null,n=E.useTheme();return g.jsxs(E.Stack,{sx:{maxHeight:"100%",maxWidth:"min(100%, 800px)",padding:2,overflow:"auto",color:n.palette.error.main,"& pre":{whiteSpace:"pre-wrap",wordBreak:"break-word",paddingBottom:"3rem"}},children:[(e.loadingMessage?`Error while ${ji.lowerFirst(E.capitalize(e.loadingMessage))} - `:"")+t,g.jsx("br",{}),r&&g.jsx("pre",{children:r})]})},b2=({title:e,titleId:t,...r},n)=>_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0",clipRule:"evenodd"})),x2=D.forwardRef(b2),S2=({title:e,titleId:t,...r},n)=>_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0",clipRule:"evenodd"})),v2=D.forwardRef(S2),C2=({title:e,titleId:t,...r},n)=>_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:19,fill:"none",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M9.522 14.811A.899.899 0 1 0 8.25 13.54L6.19 15.601V3.16L8.25 5.221A.9.9 0 0 0 9.522 3.95L5.926.354a.9.9 0 0 0-1.272 0L1.058 3.95a.9.9 0 1 0 1.271 1.271L4.391 3.16v12.442L2.329 13.54a.899.899 0 1 0-1.271 1.271l3.596 3.597a.9.9 0 0 0 1.272 0z",clipRule:"evenodd"})),w2=D.forwardRef(C2),O2=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"M8 16C5.76667 16 3.875 15.225 2.325 13.675C0.775 12.125 0 10.2333 0 8C0 5.76667 0.775 3.875 2.325 2.325C3.875 0.775 5.76667 0 8 0C9.15 0 10.25 0.2375 11.3 0.7125C12.35 1.1875 13.25 1.86667 14 2.75V0H16V7H9V5H13.2C12.6667 4.06667 11.9375 3.33333 11.0125 2.8C10.0875 2.26667 9.08333 2 8 2C6.33333 2 4.91667 2.58333 3.75 3.75C2.58333 4.91667 2 6.33333 2 8C2 9.66667 2.58333 11.0833 3.75 12.25C4.91667 13.4167 6.33333 14 8 14C9.28333 14 10.4417 13.6333 11.475 12.9C11.0583 14.1 12.5083 12.1667 11.475 12.9L12.9 14.325C11.4667 15.4417 9.83333 16 8 16Z",fill:"white"})),T2=D.forwardRef(O2);function E2(){this.__data__=[],this.size=0}function nf(e,t){return e===t||e!==e&&t!==t}function ia(e,t){for(var r=e.length;r--;)if(nf(e[r][0],t))return r;return-1}var I2=Array.prototype,A2=I2.splice;function P2(e){var t=this.__data__,r=ia(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():A2.call(t,r,1),--this.size,!0}function R2(e){var t=this.__data__,r=ia(t,e);return r<0?void 0:t[r][1]}function M2(e){return ia(this.__data__,e)>-1}function V2(e,t){var r=this.__data__,n=ia(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function er(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}er.prototype.clear=E2;er.prototype.delete=P2;er.prototype.get=R2;er.prototype.has=M2;er.prototype.set=V2;function _2(){this.__data__=new er,this.size=0}function k2(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function j2(e){return this.__data__.get(e)}function D2(e){return this.__data__.has(e)}var U2="[object AsyncFunction]",L2="[object Function]",B2="[object GeneratorFunction]",F2="[object Proxy]";function of(e){if(!Tr(e))return!1;var t=jr(e);return t==L2||t==B2||t==U2||t==F2}var Xa=Bt["__core-js_shared__"],sd=function(){var e=/[^.]+$/.exec(Xa&&Xa.keys&&Xa.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function $2(e){return!!sd&&sd in e}var N2=Function.prototype,z2=N2.toString;function Dr(e){if(e!=null){try{return z2.call(e)}catch{}try{return e+""}catch{}}return""}var G2=/[\\^$.*+?()[\]{}|]/g,H2=/^\[object .+?Constructor\]$/,q2=Function.prototype,W2=Object.prototype,J2=q2.toString,Y2=W2.hasOwnProperty,K2=RegExp("^"+J2.call(Y2).replace(G2,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Q2(e){if(!Tr(e)||$2(e))return!1;var t=of(e)?K2:H2;return t.test(Dr(e))}function X2(e,t){return e==null?void 0:e[t]}function Ur(e,t){var r=X2(e,t);return Q2(r)?r:void 0}var Xn=Ur(Bt,"Map"),Zn=Ur(Object,"create");function Z2(){this.__data__=Zn?Zn(null):{},this.size=0}function eE(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var tE="__lodash_hash_undefined__",rE=Object.prototype,nE=rE.hasOwnProperty;function oE(e){var t=this.__data__;if(Zn){var r=t[e];return r===tE?void 0:r}return nE.call(t,e)?t[e]:void 0}var sE=Object.prototype,aE=sE.hasOwnProperty;function iE(e){var t=this.__data__;return Zn?t[e]!==void 0:aE.call(t,e)}var lE="__lodash_hash_undefined__";function cE(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Zn&&t===void 0?lE:t,this}function Ar(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ar.prototype.clear=Z2;Ar.prototype.delete=eE;Ar.prototype.get=oE;Ar.prototype.has=iE;Ar.prototype.set=cE;function uE(){this.size=0,this.__data__={hash:new Ar,map:new(Xn||er),string:new Ar}}function dE(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function la(e,t){var r=e.__data__;return dE(t)?r[typeof t=="string"?"string":"hash"]:r.map}function hE(e){var t=la(this,e).delete(e);return this.size-=t?1:0,t}function pE(e){return la(this,e).get(e)}function fE(e){return la(this,e).has(e)}function mE(e,t){var r=la(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function tr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}tr.prototype.clear=uE;tr.prototype.delete=hE;tr.prototype.get=pE;tr.prototype.has=fE;tr.prototype.set=mE;var gE=200;function yE(e,t){var r=this.__data__;if(r instanceof er){var n=r.__data__;if(!Xn||n.length<gE-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new tr(n)}return r.set(e,t),this.size=r.size,this}function Jt(e){var t=this.__data__=new er(e);this.size=t.size}Jt.prototype.clear=_2;Jt.prototype.delete=k2;Jt.prototype.get=j2;Jt.prototype.has=D2;Jt.prototype.set=yE;var bE="__lodash_hash_undefined__";function xE(e){return this.__data__.set(e,bE),this}function SE(e){return this.__data__.has(e)}function Ss(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new tr;++t<r;)this.add(e[t])}Ss.prototype.add=Ss.prototype.push=xE;Ss.prototype.has=SE;function vE(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 CE(e,t){return e.has(t)}var wE=1,OE=2;function sf(e,t,r,n,o,s){var a=r&wE,i=e.length,l=t.length;if(i!=l&&!(a&&l>i))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=r&OE?new Ss:void 0;for(s.set(e,t),s.set(t,e);++d<i;){var f=e[d],m=t[d];if(n)var b=a?n(m,f,d,t,e,s):n(f,m,d,e,t,s);if(b!==void 0){if(b)continue;h=!1;break}if(p){if(!vE(t,function(S,P){if(!CE(p,P)&&(f===S||o(f,S,r,n,s)))return p.push(P)})){h=!1;break}}else if(!(f===m||o(f,m,r,n,s))){h=!1;break}}return s.delete(e),s.delete(t),h}var ad=Bt.Uint8Array;function TE(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function EE(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var IE=1,AE=2,PE="[object Boolean]",RE="[object Date]",ME="[object Error]",VE="[object Map]",_E="[object Number]",kE="[object RegExp]",jE="[object Set]",DE="[object String]",UE="[object Symbol]",LE="[object ArrayBuffer]",BE="[object DataView]",id=ur?ur.prototype:void 0,Za=id?id.valueOf:void 0;function FE(e,t,r,n,o,s,a){switch(r){case BE:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case LE:return!(e.byteLength!=t.byteLength||!s(new ad(e),new ad(t)));case PE:case RE:case _E:return nf(+e,+t);case ME:return e.name==t.name&&e.message==t.message;case kE:case DE:return e==t+"";case VE:var i=TE;case jE:var l=n&IE;if(i||(i=EE),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;n|=AE,a.set(e,t);var u=sf(i(e),i(t),n,o,s,a);return a.delete(e),u;case UE:if(Za)return Za.call(e)==Za.call(t)}return!1}function $E(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var Lt=Array.isArray;function NE(e,t,r){var n=t(e);return Lt(e)?n:$E(n,r(e))}function zE(e,t){for(var r=-1,n=e==null?0:e.length,o=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[o++]=a)}return s}function GE(){return[]}var HE=Object.prototype,qE=HE.propertyIsEnumerable,ld=Object.getOwnPropertySymbols,WE=ld?function(e){return e==null?[]:(e=Object(e),zE(ld(e),function(t){return qE.call(e,t)}))}:GE;function JE(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var YE="[object Arguments]";function cd(e){return Er(e)&&jr(e)==YE}var af=Object.prototype,KE=af.hasOwnProperty,QE=af.propertyIsEnumerable,lf=cd(function(){return arguments}())?cd:function(e){return Er(e)&&KE.call(e,"callee")&&!QE.call(e,"callee")};function XE(){return!1}var cf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ud=cf&&typeof module=="object"&&module&&!module.nodeType&&module,ZE=ud&&ud.exports===cf,dd=ZE?Bt.Buffer:void 0,eI=dd?dd.isBuffer:void 0,Ii=eI||XE,tI=9007199254740991,rI=/^(?:0|[1-9]\d*)$/;function uf(e,t){var r=typeof e;return t=t??tI,!!t&&(r=="number"||r!="symbol"&&rI.test(e))&&e>-1&&e%1==0&&e<t}var nI=9007199254740991;function Ll(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=nI}var oI="[object Arguments]",sI="[object Array]",aI="[object Boolean]",iI="[object Date]",lI="[object Error]",cI="[object Function]",uI="[object Map]",dI="[object Number]",hI="[object Object]",pI="[object RegExp]",fI="[object Set]",mI="[object String]",gI="[object WeakMap]",yI="[object ArrayBuffer]",bI="[object DataView]",xI="[object Float32Array]",SI="[object Float64Array]",vI="[object Int8Array]",CI="[object Int16Array]",wI="[object Int32Array]",OI="[object Uint8Array]",TI="[object Uint8ClampedArray]",EI="[object Uint16Array]",II="[object Uint32Array]",Pe={};Pe[xI]=Pe[SI]=Pe[vI]=Pe[CI]=Pe[wI]=Pe[OI]=Pe[TI]=Pe[EI]=Pe[II]=!0;Pe[oI]=Pe[sI]=Pe[yI]=Pe[aI]=Pe[bI]=Pe[iI]=Pe[lI]=Pe[cI]=Pe[uI]=Pe[dI]=Pe[hI]=Pe[pI]=Pe[fI]=Pe[mI]=Pe[gI]=!1;function AI(e){return Er(e)&&Ll(e.length)&&!!Pe[jr(e)]}function PI(e){return function(t){return e(t)}}var df=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Fn=df&&typeof module=="object"&&module&&!module.nodeType&&module,RI=Fn&&Fn.exports===df,ei=RI&&Ip.process,hd=function(){try{var e=Fn&&Fn.require&&Fn.require("util").types;return e||ei&&ei.binding&&ei.binding("util")}catch{}}(),pd=hd&&hd.isTypedArray,hf=pd?PI(pd):AI,MI=Object.prototype,VI=MI.hasOwnProperty;function _I(e,t){var r=Lt(e),n=!r&&lf(e),o=!r&&!n&&Ii(e),s=!r&&!n&&!o&&hf(e),a=r||n||o||s,i=a?JE(e.length,String):[],l=i.length;for(var c in e)VI.call(e,c)&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||uf(c,l)))&&i.push(c);return i}var kI=Object.prototype;function jI(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||kI;return e===r}function DI(e,t){return function(r){return e(t(r))}}var UI=DI(Object.keys,Object),LI=Object.prototype,BI=LI.hasOwnProperty;function FI(e){if(!jI(e))return UI(e);var t=[];for(var r in Object(e))BI.call(e,r)&&r!="constructor"&&t.push(r);return t}function pf(e){return e!=null&&Ll(e.length)&&!of(e)}function Bl(e){return pf(e)?_I(e):FI(e)}function fd(e){return NE(e,Bl,WE)}var $I=1,NI=Object.prototype,zI=NI.hasOwnProperty;function GI(e,t,r,n,o,s){var a=r&$I,i=fd(e),l=i.length,c=fd(t),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var h=i[d];if(!(a?h in t:zI.call(t,h)))return!1}var p=s.get(e),f=s.get(t);if(p&&f)return p==t&&f==e;var m=!0;s.set(e,t),s.set(t,e);for(var b=a;++d<l;){h=i[d];var S=e[h],P=t[h];if(n)var v=a?n(P,S,h,t,e,s):n(S,P,h,e,t,s);if(!(v===void 0?S===P||o(S,P,r,n,s):v)){m=!1;break}b||(b=h=="constructor")}if(m&&!b){var O=e.constructor,I=t.constructor;O!=I&&"constructor"in e&&"constructor"in t&&!(typeof O=="function"&&O instanceof O&&typeof I=="function"&&I instanceof I)&&(m=!1)}return s.delete(e),s.delete(t),m}var Ai=Ur(Bt,"DataView"),Pi=Ur(Bt,"Promise"),Ri=Ur(Bt,"Set"),Mi=Ur(Bt,"WeakMap"),md="[object Map]",HI="[object Object]",gd="[object Promise]",yd="[object Set]",bd="[object WeakMap]",xd="[object DataView]",qI=Dr(Ai),WI=Dr(Xn),JI=Dr(Pi),YI=Dr(Ri),KI=Dr(Mi),sr=jr;(Ai&&sr(new Ai(new ArrayBuffer(1)))!=xd||Xn&&sr(new Xn)!=md||Pi&&sr(Pi.resolve())!=gd||Ri&&sr(new Ri)!=yd||Mi&&sr(new Mi)!=bd)&&(sr=function(e){var t=jr(e),r=t==HI?e.constructor:void 0,n=r?Dr(r):"";if(n)switch(n){case qI:return xd;case WI:return md;case JI:return gd;case YI:return yd;case KI:return bd}return t});var QI=1,Sd="[object Arguments]",vd="[object Array]",Do="[object Object]",XI=Object.prototype,Cd=XI.hasOwnProperty;function ZI(e,t,r,n,o,s){var a=Lt(e),i=Lt(t),l=a?vd:sr(e),c=i?vd:sr(t);l=l==Sd?Do:l,c=c==Sd?Do:c;var u=l==Do,d=c==Do,h=l==c;if(h&&Ii(e)){if(!Ii(t))return!1;a=!0,u=!1}if(h&&!u)return s||(s=new Jt),a||hf(e)?sf(e,t,r,n,o,s):FE(e,t,l,r,n,o,s);if(!(r&QI)){var p=u&&Cd.call(e,"__wrapped__"),f=d&&Cd.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,b=f?t.value():t;return s||(s=new Jt),o(m,b,r,n,s)}}return h?(s||(s=new Jt),GI(e,t,r,n,o,s)):!1}function ca(e,t,r,n,o){return e===t?!0:e==null||t==null||!Er(e)&&!Er(t)?e!==e&&t!==t:ZI(e,t,r,n,ca,o)}function eA(e,t){return ca(e,t)}const ff=({store:e})=>{const{t}=Ce.useTranslation(),[r,n]=D.useState(e.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached),o=D.useRef(r);ea(()=>{const a=e.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached;eA(o.current,a)||(o.current=a,n(a))});const s=[];for(const[a,i]of r.entries())i&&s.push(a);return g.jsx(E.Typography,{color:"error",sx:{margin:"0.5rem 1rem",textAlign:"center",minHeight:"1.5rem",visibility:s.length?"visible":"hidden"},children:t("Jogging.JointLimitsReached.lb",{jointNumbers:s.map(a=>a+1).join(", ")})})},tA=E.styled(E.FormControl)(({theme:e})=>({"&.MuiFormControl-root":{".MuiSelect-select":{paddingTop:"20px",paddingLeft:"12px"},label:{pointerEvents:"none",fontSize:"16px"},".MuiInputLabel-root":{"&.Mui-focused":{color:e.palette.text.primary}}}}));function Uo({labelValue:e,...t}){return g.jsxs(tA,{fullWidth:!0,variant:"filled",children:[g.jsx(E.InputLabel,{id:t.labelId,children:e}),g.jsx(E.Select,{...t})]})}var wd=function(){try{var e=Ur(Object,"defineProperty");return e({},"",{}),e}catch{}}();function rA(e,t,r){t=="__proto__"&&wd?wd(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function nA(e,t,r,n){for(var o=-1,s=e==null?0:e.length;++o<s;){var a=e[o];t(n,a,r(a),e)}return n}function oA(e){return function(t,r,n){for(var o=-1,s=Object(t),a=n(t),i=a.length;i--;){var l=a[++o];if(r(s[l],l,s)===!1)break}return t}}var sA=oA();function aA(e,t){return e&&sA(e,t,Bl)}function iA(e,t){return function(r,n){if(r==null)return r;if(!pf(r))return e(r,n);for(var o=r.length,s=-1,a=Object(r);++s<o&&n(a[s],s,a)!==!1;);return r}}var lA=iA(aA);function cA(e,t,r,n){return lA(e,function(o,s,a){t(n,o,r(o),a)}),n}var uA=1,dA=2;function hA(e,t,r,n){var o=r.length,s=o;if(e==null)return!s;for(e=Object(e);o--;){var a=r[o];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<s;){a=r[o];var i=a[0],l=e[i],c=a[1];if(a[2]){if(l===void 0&&!(i in e))return!1}else{var u=new Jt,d;if(!(d===void 0?ca(c,l,uA|dA,n,u):d))return!1}}return!0}function mf(e){return e===e&&!Tr(e)}function pA(e){for(var t=Bl(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,mf(o)]}return t}function gf(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function fA(e){var t=pA(e);return t.length==1&&t[0][2]?gf(t[0][0],t[0][1]):function(r){return r===e||hA(r,e,t)}}var mA=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,gA=/^\w*$/;function Fl(e,t){if(Lt(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ta(e)?!0:gA.test(e)||!mA.test(e)||t!=null&&e in Object(t)}var yA="Expected a function";function $l(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(yA);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],s=r.cache;if(s.has(o))return s.get(o);var a=e.apply(this,n);return r.cache=s.set(o,a)||s,a};return r.cache=new($l.Cache||tr),r}$l.Cache=tr;var bA=500;function xA(e){var t=$l(e,function(n){return r.size===bA&&r.clear(),n}),r=t.cache;return t}var SA=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vA=/\\(\\)?/g,CA=xA(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(SA,function(r,n,o,s){t.push(o?s.replace(vA,"$1"):n||r)}),t});function wA(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var Od=ur?ur.prototype:void 0,Td=Od?Od.toString:void 0;function yf(e){if(typeof e=="string")return e;if(Lt(e))return wA(e,yf)+"";if(ta(e))return Td?Td.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function bf(e){return e==null?"":yf(e)}function xf(e,t){return Lt(e)?e:Fl(e,t)?[e]:CA(bf(e))}function ua(e){if(typeof e=="string"||ta(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Sf(e,t){t=xf(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[ua(t[r++])];return r&&r==n?e:void 0}function OA(e,t,r){var n=e==null?void 0:Sf(e,t);return n===void 0?r:n}function TA(e,t){return e!=null&&t in Object(e)}function EA(e,t,r){t=xf(t,e);for(var n=-1,o=t.length,s=!1;++n<o;){var a=ua(t[n]);if(!(s=e!=null&&r(e,a)))break;e=e[a]}return s||++n!=o?s:(o=e==null?0:e.length,!!o&&Ll(o)&&uf(a,o)&&(Lt(e)||lf(e)))}function IA(e,t){return e!=null&&EA(e,t,TA)}var AA=1,PA=2;function RA(e,t){return Fl(e)&&mf(t)?gf(ua(e),t):function(r){var n=OA(r,e);return n===void 0&&n===t?IA(r,e):ca(t,n,AA|PA)}}function MA(e){return e}function VA(e){return function(t){return t==null?void 0:t[e]}}function _A(e){return function(t){return Sf(t,e)}}function kA(e){return Fl(e)?VA(ua(e)):_A(e)}function jA(e){return typeof e=="function"?e:e==null?MA:typeof e=="object"?Lt(e)?RA(e[0],e[1]):fA(e):kA(e)}function DA(e,t){return function(r,n){var o=Lt(r)?nA:cA,s={};return o(r,e,jA(n),s)}}var Lo=DA(function(e,t,r){rA(e,r,t)}),UA=0;function LA(e){var t=++UA;return bf(e)+t}const Vi=[{id:"0.1",mm:.1,degrees:.05},{id:"1",mm:1,degrees:.5},{id:"5",mm:5,degrees:2.5},{id:"10",mm:10,degrees:5}],BA=[{id:"continuous"},...Vi],FA=["coordsys","tool"];class da{constructor(t,r,n,o){var s,a;this.jogger=t,this.coordSystems=r,this.motionGroupDescription=n,this.tcps=o,this.selectedTabId="cartesian",this.activationState="inactive",this.activationError=null,this.activationCounter=0,this.locks=new Set,this.selectedCoordSystemId="world",this.selectedTcpId="",this.selectedOrientation="coordsys",this.selectedIncrementId="continuous",this.selectedCartesianMotionType="translate",this.incrementJogInProgress=null,this.translationVelocityMmPerSec=10,this.rotationVelocityDegPerSec=1,this.minTranslationVelocityMmPerSec=5,this.maxTranslationVelocityMmPerSec=250,this.minRotationVelocityDegPerSec=1,this.maxRotationVelocityDegPerSec=60,this.showCoordSystemSelect=!1,this.showTcpSelect=!0,this.showOrientationSelect=!0,this.showIncrementSelect=!0,this.showTabIcons=!1,this.showVelocitySliderLabel=!0,this.showVelocityLegend=!1,this.showJointsLegend=!1,this.disposers=[];for(const i of r)if(i.coordinate_system===""){i.coordinate_system="world";break}this.selectedCoordSystemId=((s=r[0])==null?void 0:s.coordinate_system)||"world",this.selectedTcpId=((a=o[0])==null?void 0:a.id)||"",We.makeAutoObservable(this,{},{autoBind:!0}),this.loadFromLocalStorage(),this.disposers.push(We.autorun(()=>this.saveToLocalStorage())),window.joggingStore=this}static async loadFor(t){const{nova:r}=t,[n,o]=await Promise.all([r.api.controller.listCoordinateSystems(t.motionStream.controllerId,"ROTATION_VECTOR"),r.api.motionGroup.getMotionGroupDescription(t.motionStream.controllerId,t.motionGroupId)]),s=Object.entries(o.tcps||{}).map(([a,i])=>({id:a,readable_name:i.name,position:i.pose.position,orientation:i.pose.orientation}));return new da(t,n||[],o,s)}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}get coordSystemCountByName(){return ji.countBy(this.coordSystems,t=>t.name)}async deactivate(){if(this.jogger.mode==="jogging")return this.jogger.stop()}async activate(){return this.currentTab.id==="cartesian"?((this.jogger.tcp!==this.selectedTcpId||this.jogger.orientation!==this.selectedOrientation)&&this.jogger.setOptions({tcp:this.selectedTcpId,orientation:this.selectedOrientation}),this.activeDiscreteIncrement?this.jogger.setJoggingMode("trajectory"):this.jogger.setJoggingMode("jogging")):this.jogger.setJoggingMode("jogging"),this.jogger}loadFromLocalStorage(){const t=et.tryParseJson(localStorage.getItem("joggingToolStore"));t&&(this.tabsById[t.selectedTabId]&&(this.selectedTabId=t.selectedTabId),this.coordSystemsById[t.selectedCoordSystemId]&&(this.selectedCoordSystemId=t.selectedCoordSystemId),this.tcpsById[t.selectedTcpId]&&(this.selectedTcpId=t.selectedTcpId),this.incrementOptionsById[t.selectedIncrementId]&&(this.selectedIncrementId=t.selectedIncrementId),["translate","rotate"].includes(t.selectedCartesianMotionType)&&(this.selectedCartesianMotionType=t.selectedCartesianMotionType),["coordsys","tool"].includes(t.selectedOrientation)&&(this.selectedOrientation=t.selectedOrientation))}saveToLocalStorage(){localStorage.setItem("joggingToolStore",JSON.stringify(this.localStorageSave))}get isLocked(){return this.locks.size>0}get localStorageSave(){return{selectedTabId:this.selectedTabId,selectedCoordSystemId:this.selectedCoordSystemId,selectedTcpId:this.selectedTcpId,selectedOrientation:this.selectedOrientation,selectedIncrementId:this.selectedIncrementId,selectedCartesianMotionType:this.selectedCartesianMotionType}}get tabs(){return[{id:"cartesian",label:"cartesian"},{id:"joint",label:"joint"}]}get incrementOptions(){return BA}get discreteIncrementOptions(){return Vi}get incrementOptionsById(){return Lo(this.incrementOptions,t=>t.id)}get tabsById(){return Lo(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 Lo(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 Lo(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:Vi.find(t=>t.id===this.selectedIncrementId)}get rotationVelocityRadsPerSec(){return this.rotationVelocityDegPerSec*Math.PI/180}get velocityInDisplayUnits(){return this.currentMotionType==="translate"?this.translationVelocityMmPerSec:this.rotationVelocityDegPerSec}get minVelocityInDisplayUnits(){return this.currentMotionType==="translate"?this.minTranslationVelocityMmPerSec:this.minRotationVelocityDegPerSec}get maxVelocityInDisplayUnits(){return this.currentMotionType==="translate"?this.maxTranslationVelocityMmPerSec:this.maxRotationVelocityDegPerSec}get currentMotionType(){return this.selectedTabId==="cartesian"&&this.selectedCartesianMotionType==="translate"?"translate":"rotate"}onTabChange(t,r){const n=this.tabs[r]||this.tabs[0];this.selectedTabId=n.id}setSelectedCoordSystemId(t){this.selectedCoordSystemId=t}setSelectedTcpId(t){this.selectedTcpId=t}setSelectedOrientation(t){this.selectedOrientation=t}setSelectedIncrementId(t){this.selectedIncrementId=t}setCurrentIncrementJog(t){this.incrementJogInProgress=t}setVelocityFromSlider(t){this.currentMotionType==="translate"?this.translationVelocityMmPerSec=t:this.rotationVelocityDegPerSec=t}setSelectedCartesianMotionType(t){this.selectedCartesianMotionType=t}lock(t){this.locks.add(t)}unlock(t){this.locks.delete(t)}async withMotionLock(t){const r=LA();this.lock(r);try{return await t()}finally{this.unlock(r)}}}const $A=ge.observer(({store:e})=>{var o;const{t}=Ce.useTranslation(),r=[];function n(s){switch(s){case"coordsys":return t("Jogging.Orientation.coordsys");case"tool":return t("Jogging.Orientation.tool");default:return s}}return e.showCoordSystemSelect&&r.push(g.jsx(Uo,{labelId:"jogging-coord-select",labelValue:t("Jogging.CoordinateSystem.hlb"),value:e.selectedCoordSystemId,size:"small",variant:"filled",displayEmpty:!0,onChange:s=>e.setSelectedCoordSystemId(s.target.value),disabled:e.isLocked,children:e.coordSystems.map(s=>g.jsx(E.MenuItem,{value:s.coordinate_system,children:s.name&&e.coordSystemCountByName[s.name]>1?`${s.name} / ${s.coordinate_system}`:s.name||s.coordinate_system},s.coordinate_system))},"coord")),e.showTcpSelect&&r.push(g.jsx(Uo,{labelId:"jogging-tcp-select",labelValue:"TCP",value:e.selectedTcpId,size:"small",variant:"filled",onChange:s=>e.setSelectedTcpId(s.target.value),disabled:e.isLocked,children:e.tcps.map(s=>g.jsx(E.MenuItem,{value:s.id,children:s.id},s.id))},"tcp")),e.showOrientationSelect&&r.push(g.jsx(Uo,{labelValue:t("Jogging.Cartesian.Orientation.lb"),id:"orientation-select",labelId:"orientation-select",value:e.selectedOrientation,onChange:s=>e.setSelectedOrientation(s.target.value),disabled:e.isLocked,children:FA.map(s=>g.jsx(E.MenuItem,{value:s,children:n(s)},s))},"orientation")),e.showIncrementSelect&&r.push(g.jsxs(Uo,{labelValue:t("Jogging.Increment.hlb"),labelId:"jogging-increment-select",size:"small",variant:"filled",value:((o=e.activeDiscreteIncrement)==null?void 0:o.id)||"continuous",onChange:s=>e.setSelectedIncrementId(s.target.value),disabled:e.isLocked,children:[g.jsx(E.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(s=>g.jsx(E.MenuItem,{value:s.id,children:e.currentMotionType==="translate"?`${s.mm}mm`:`${s.degrees}°`},s.id))]},"increment")),g.jsx(E.Box,{component:"div",sx:{display:"grid",gap:"16px",gridTemplateColumns:"1fr 1fr",gridAutoRows:"min-content","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:r.map((s,a)=>g.jsx(E.Box,{sx:{gridColumn:r.length%2===1&&a===r.length-1?"span 2":"auto"},children:s},a))})}),NA=E.styled(E.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 Ed(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function zA(e){return typeof e=="string"}function GA(e,t,r){return e===void 0||zA(e)?t:{...t,ownerState:{...t.ownerState,...r}}}function Ko(e,t=[]){if(e===void 0)return{};const r={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]=="function"&&!t.includes(n)).forEach(n=>{r[n]=e[n]}),r}function Id(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 HA(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:o,className:s}=e;if(!t){const p=Et(r==null?void 0:r.className,s,o==null?void 0:o.className,n==null?void 0:n.className),f={...r==null?void 0:r.style,...o==null?void 0:o.style,...n==null?void 0:n.style},m={...r,...o,...n};return p.length>0&&(m.className=p),Object.keys(f).length>0&&(m.style=f),{props:m,internalRef:void 0}}const a=Ko({...o,...n}),i=Id(n),l=Id(o),c=t(a),u=Et(c==null?void 0:c.className,r==null?void 0:r.className,s,o==null?void 0:o.className,n==null?void 0:n.className),d={...c==null?void 0:c.style,...r==null?void 0:r.style,...o==null?void 0:o.style,...n==null?void 0:n.style},h={...c,...r,...l,...i};return u.length>0&&(h.className=u),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:c.ref}}function qA(e,t,r){return typeof e=="function"?e(t,r):e}function or(e){var d;const{elementType:t,externalSlotProps:r,ownerState:n,skipResolvingSlotProps:o=!1,...s}=e,a=o?{}:qA(r,n),{props:i,internalRef:l}=HA({...s,externalSlotProps:a}),c=js(l,a==null?void 0:a.ref,(d=e.additionalProps)==null?void 0:d.ref);return GA(t,{...i,ref:c},n)}function Ad(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
|
|
152
|
+
`))}return!1}const WA={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function JA(e,t,r=(n,o)=>n===o){return e.length===t.length&&e.every((n,o)=>r(n,t[o]))}const YA=2;function Yr(e,t,r,n,o){return r===1?Math.min(e+t,o):Math.max(e-t,n)}function vf(e,t){return e-t}function Pd(e,t){const{index:r}=e.reduce((n,o,s)=>{const a=Math.abs(t-o);return n===null||a<n.distance||a===n.distance?{distance:a,index:s}:n},null)??{};return r}function Bo(e,t){if(t.current!==void 0&&e.changedTouches){const r=e;for(let n=0;n<r.changedTouches.length;n+=1){const o=r.changedTouches[n];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function vs(e,t,r){return(e-t)*100/(r-t)}function KA(e,t,r){return(r-t)*e+t}function QA(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 XA(e,t,r){const n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(QA(t)))}function Rd({values:e,newValue:t,index:r}){const n=e.slice();return n[r]=t,n.sort(vf)}function Fo({sliderRef:e,activeIndex:t,setActive:r}){var o,s,a;const n=Ln(e.current);(!((o=e.current)!=null&&o.contains(n.activeElement))||Number((s=n==null?void 0:n.activeElement)==null?void 0:s.getAttribute("data-index"))!==t)&&((a=e.current)==null||a.querySelector(`[type="range"][data-index="${t}"]`).focus()),r&&r(t)}function $o(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?JA(e,t):!1}const ZA={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}%`})}},eP=e=>e;let No;function Md(){return No===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?No=CSS.supports("touch-action","none"):No=!0),No}function tP(e){const{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:o=!1,isRtl:s=!1,marks:a=!1,max:i=100,min:l=0,name:c,onChange:u,onChangeCommitted:d,orientation:h="horizontal",rootRef:p,scale:f=eP,step:m=1,shiftStep:b=10,tabIndex:S,value:P}=e,v=_.useRef(void 0),[O,I]=_.useState(-1),[T,w]=_.useState(-1),[R,k]=_.useState(!1),y=_.useRef(0),A=_.useRef(null),[V,M]=zC({controlled:P,default:r??l,name:"Slider"}),j=u&&((Z,re,ie)=>{const fe=Z.nativeEvent||Z,Ee=new fe.constructor(fe.type,fe);Object.defineProperty(Ee,"target",{writable:!0,value:{value:re,name:c}}),A.current=re,u(Ee,re,ie)}),ne=Array.isArray(V);let Q=ne?V.slice().sort(vf):[V];Q=Q.map(Z=>Z==null?l:Kr(Z,l,i));const oe=a===!0&&m!==null?[...Array(Math.floor((i-l)/m)+1)].map((Z,re)=>({value:l+m*re})):a||[],X=oe.map(Z=>Z.value),[se,F]=_.useState(-1),ee=_.useRef(null),ce=js(p,ee),be=Z=>re=>{var fe;const ie=Number(re.currentTarget.getAttribute("data-index"));Ad(re.target)&&F(ie),w(ie),(fe=Z==null?void 0:Z.onFocus)==null||fe.call(Z,re)},Me=Z=>re=>{var ie;Ad(re.target)||F(-1),w(-1),(ie=Z==null?void 0:Z.onBlur)==null||ie.call(Z,re)},xe=(Z,re)=>{const ie=Number(Z.currentTarget.getAttribute("data-index")),fe=Q[ie],Ee=X.indexOf(fe);let le=re;if(oe&&m==null){const ze=X[X.length-1];le>=ze?le=ze:le<=X[0]?le=X[0]:le=le<fe?X[Ee-1]:X[Ee+1]}if(le=Kr(le,l,i),ne){o&&(le=Kr(le,Q[ie-1]||-1/0,Q[ie+1]||1/0));const ze=le;le=Rd({values:Q,newValue:le,index:ie});let Qe=ie;o||(Qe=le.indexOf(ze)),Fo({sliderRef:ee,activeIndex:Qe})}M(le),F(ie),j&&!$o(le,V)&&j(Z,le,ie),d&&d(Z,A.current??le)},ut=Z=>re=>{var ie;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(re.key)){re.preventDefault();const fe=Number(re.currentTarget.getAttribute("data-index")),Ee=Q[fe];let le=null;if(m!=null){const ze=re.shiftKey?b:m;switch(re.key){case"ArrowUp":le=Yr(Ee,ze,1,l,i);break;case"ArrowRight":le=Yr(Ee,ze,s?-1:1,l,i);break;case"ArrowDown":le=Yr(Ee,ze,-1,l,i);break;case"ArrowLeft":le=Yr(Ee,ze,s?1:-1,l,i);break;case"PageUp":le=Yr(Ee,b,1,l,i);break;case"PageDown":le=Yr(Ee,b,-1,l,i);break;case"Home":le=l;break;case"End":le=i;break}}else if(oe){const ze=X[X.length-1],Qe=X.indexOf(Ee),Le=[s?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],mt=[s?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];Le.includes(re.key)?Qe===0?le=X[0]:le=X[Qe-1]:mt.includes(re.key)&&(Qe===X.length-1?le=ze:le=X[Qe+1])}le!=null&&xe(re,le)}(ie=Z==null?void 0:Z.onKeyDown)==null||ie.call(Z,re)};Ut(()=>{var Z;n&&ee.current.contains(document.activeElement)&&((Z=document.activeElement)==null||Z.blur())},[n]),n&&O!==-1&&I(-1),n&&se!==-1&&F(-1);const nt=Z=>re=>{var ie;(ie=Z.onChange)==null||ie.call(Z,re),xe(re,re.target.valueAsNumber)},Se=_.useRef(void 0);let te=h;s&&h==="horizontal"&&(te+="-reverse");const ae=({finger:Z,move:re=!1})=>{const{current:ie}=ee,{width:fe,height:Ee,bottom:le,left:ze}=ie.getBoundingClientRect();let Qe;te.startsWith("vertical")?Qe=(le-Z.y)/Ee:Qe=(Z.x-ze)/fe,te.includes("-reverse")&&(Qe=1-Qe);let Le;if(Le=KA(Qe,l,i),m)Le=XA(Le,m,l);else{const xn=Pd(X,Le);Le=X[xn]}Le=Kr(Le,l,i);let mt=0;if(ne){re?mt=Se.current:mt=Pd(Q,Le),o&&(Le=Kr(Le,Q[mt-1]||-1/0,Q[mt+1]||1/0));const xn=Le;Le=Rd({values:Q,newValue:Le,index:mt}),o&&re||(mt=Le.indexOf(xn),Se.current=mt)}return{newValue:Le,activeIndex:mt}},ue=Wt(Z=>{const re=Bo(Z,v);if(!re)return;if(y.current+=1,Z.type==="mousemove"&&Z.buttons===0){Y(Z);return}const{newValue:ie,activeIndex:fe}=ae({finger:re,move:!0});Fo({sliderRef:ee,activeIndex:fe,setActive:I}),M(ie),!R&&y.current>YA&&k(!0),j&&!$o(ie,V)&&j(Z,ie,fe)}),Y=Wt(Z=>{const re=Bo(Z,v);if(k(!1),!re)return;const{newValue:ie}=ae({finger:re,move:!0});I(-1),Z.type==="touchend"&&w(-1),d&&d(Z,A.current??ie),v.current=void 0,pe()}),ve=Wt(Z=>{if(n)return;Md()||Z.preventDefault();const re=Z.changedTouches[0];re!=null&&(v.current=re.identifier);const ie=Bo(Z,v);if(ie!==!1){const{newValue:Ee,activeIndex:le}=ae({finger:ie});Fo({sliderRef:ee,activeIndex:le,setActive:I}),M(Ee),j&&!$o(Ee,V)&&j(Z,Ee,le)}y.current=0;const fe=Ln(ee.current);fe.addEventListener("touchmove",ue,{passive:!0}),fe.addEventListener("touchend",Y,{passive:!0})}),pe=_.useCallback(()=>{const Z=Ln(ee.current);Z.removeEventListener("mousemove",ue),Z.removeEventListener("mouseup",Y),Z.removeEventListener("touchmove",ue),Z.removeEventListener("touchend",Y)},[Y,ue]);_.useEffect(()=>{const{current:Z}=ee;return Z.addEventListener("touchstart",ve,{passive:Md()}),()=>{Z.removeEventListener("touchstart",ve),pe()}},[pe,ve]),_.useEffect(()=>{n&&pe()},[n,pe]);const He=Z=>re=>{var Ee;if((Ee=Z.onMouseDown)==null||Ee.call(Z,re),n||re.defaultPrevented||re.button!==0)return;re.preventDefault();const ie=Bo(re,v);if(ie!==!1){const{newValue:le,activeIndex:ze}=ae({finger:ie});Fo({sliderRef:ee,activeIndex:ze,setActive:I}),M(le),j&&!$o(le,V)&&j(re,le,ze)}y.current=0;const fe=Ln(ee.current);fe.addEventListener("mousemove",ue,{passive:!0}),fe.addEventListener("mouseup",Y)},Ne=vs(ne?Q[0]:l,l,i),Ve=vs(Q[Q.length-1],l,i)-Ne,rr=(Z={})=>{const re=Ko(Z),ie={onMouseDown:He(re||{})},fe={...re,...ie};return{...Z,ref:ce,...fe}},fo=Z=>re=>{var fe;(fe=Z.onMouseOver)==null||fe.call(Z,re);const ie=Number(re.currentTarget.getAttribute("data-index"));w(ie)},mo=Z=>re=>{var ie;(ie=Z.onMouseLeave)==null||ie.call(Z,re),w(-1)},go=(Z={})=>{const re=Ko(Z),ie={onMouseOver:fo(re||{}),onMouseLeave:mo(re||{})};return{...Z,...re,...ie}},yo=Z=>({pointerEvents:O!==-1&&O!==Z?"none":void 0});let Lr;return h==="vertical"&&(Lr=s?"vertical-rl":"vertical-lr"),{active:O,axis:te,axisProps:ZA,dragging:R,focusedThumbIndex:se,getHiddenInputProps:(Z={})=>{const re=Ko(Z),ie={onChange:nt(re||{}),onFocus:be(re||{}),onBlur:Me(re||{}),onKeyDown:ut(re||{})},fe={...re,...ie};return{tabIndex:S,"aria-labelledby":t,"aria-orientation":h,"aria-valuemax":f(i),"aria-valuemin":f(l),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":e.step??void 0,disabled:n,...Z,...fe,style:{...WA,direction:s?"rtl":"ltr",width:"100%",height:"100%",writingMode:Lr}}},getRootProps:rr,getThumbProps:go,marks:oe,open:T,range:ne,rootRef:ce,trackLeap:Ve,trackOffset:Ne,values:Q,getThumbStyle:yo}}function Qo(e){return typeof e=="string"}const rP=e=>!e||!Qo(e);function nP(e){return typeof e.main=="string"}function oP(e,t=[]){if(!nP(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function Nl(e=[]){return([,t])=>t&&oP(t,e)}function sP(e){return pn("MuiSlider",e)}const St=Bi("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"]),aP=e=>{const{open:t}=e;return{offset:Et(t&&St.valueLabelOpen),circle:St.valueLabelCircle,label:St.valueLabelLabel}};function Cf(e){const{children:t,className:r,value:n}=e,o=aP(e);return t?_.cloneElement(t,{className:t.props.className},g.jsxs(_.Fragment,{children:[t.props.children,g.jsx("span",{className:Et(o.offset,r),"aria-hidden":!0,children:g.jsx("span",{className:o.circle,children:g.jsx("span",{className:o.label,children:n})})})]})):null}process.env.NODE_ENV!=="production"&&(Cf.propTypes={children:x.element.isRequired,className:x.string,value:x.node});function Vd(e){return e}const iP=ft("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${tt(r.color)}`],r.size!=="medium"&&t[`size${tt(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})(kr(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${St.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${St.dragging}`]:{[`& .${St.thumb}, & .${St.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(Nl()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),lP=ft("span",{name:"MuiSlider",slot:"Rail"})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),cP=ft("span",{name:"MuiSlider",slot:"Track"})(kr(({theme:e})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(e.palette).filter(Nl()).map(([t])=>({props:{color:t,track:"inverted"},style:{...e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:{backgroundColor:Nn(e.palette[t].main,.62),borderColor:Nn(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:$n(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:$n(e.palette[t].main,.5)})}}}))]}))),uP=ft("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${tt(r.color)}`],r.size!=="medium"&&t[`thumbSize${tt(r.size)}`]]}})(kr(({theme:e})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${St.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.entries(e.palette).filter(Nl()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${St.focusVisible}`]:{...e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${oi(e.palette[t].main,.16)}`},"@media (hover: none)":{boxShadow:"none"}},[`&.${St.active}`]:{...e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${oi(e.palette[t].main,.16)}`}}}}))]}))),wf=ft(Cf,{name:"MuiSlider",slot:"ValueLabel"})(kr(({theme:e})=>({zIndex:1,whiteSpace:"nowrap",...e.typography.body2,fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${St.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${St.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})));process.env.NODE_ENV!=="production"&&(wf.propTypes={children:x.element.isRequired,index:x.number.isRequired,open:x.bool.isRequired,value:x.node});const dP=ft("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>zi(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})(kr(({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]}))),hP=ft("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>zi(e)&&e!=="markLabelActive"})(kr(({theme:e})=>({...e.typography.body2,color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]}))),pP=e=>{const{disabled:t,dragging:r,marked:n,orientation:o,track:s,classes:a,color:i,size:l}=e,c={root:["root",t&&"disabled",r&&"dragging",n&&"marked",o==="vertical"&&"vertical",s==="inverted"&&"trackInverted",s===!1&&"trackFalse",i&&`color${tt(i)}`,l&&`size${tt(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${tt(l)}`,i&&`thumbColor${tt(i)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Cs(c,sP,a)},fP=({children:e})=>e,Of=_.forwardRef(function(t,r){const n=Rl({props:t,name:"MuiSlider"}),o=Wg(),{"aria-label":s,"aria-valuetext":a,"aria-labelledby":i,component:l="span",components:c={},componentsProps:u={},color:d="primary",classes:h,className:p,disableSwap:f=!1,disabled:m=!1,getAriaLabel:b,getAriaValueText:S,marks:P=!1,max:v=100,min:O=0,name:I,onChange:T,onChangeCommitted:w,orientation:R="horizontal",shiftStep:k=10,size:y="medium",step:A=1,scale:V=Vd,slotProps:M,slots:j,tabIndex:ne,track:Q="normal",value:oe,valueLabelDisplay:X="off",valueLabelFormat:se=Vd,...F}=n,ee={...n,isRtl:o,max:v,min:O,classes:h,disabled:m,disableSwap:f,orientation:R,marks:P,color:d,size:y,step:A,shiftStep:k,scale:V,track:Q,valueLabelDisplay:X,valueLabelFormat:se},{axisProps:ce,getRootProps:be,getHiddenInputProps:Me,getThumbProps:xe,open:ut,active:nt,axis:Se,focusedThumbIndex:te,range:ae,dragging:ue,marks:Y,values:ve,trackOffset:pe,trackLeap:He,getThumbStyle:Ne}=tP({...ee,rootRef:r});ee.marked=Y.length>0&&Y.some(De=>De.label),ee.dragging=ue,ee.focusedThumbIndex=te;const Ve=pP(ee),rr=(j==null?void 0:j.root)??c.Root??iP,fo=(j==null?void 0:j.rail)??c.Rail??lP,mo=(j==null?void 0:j.track)??c.Track??cP,go=(j==null?void 0:j.thumb)??c.Thumb??uP,yo=(j==null?void 0:j.valueLabel)??c.ValueLabel??wf,Lr=(j==null?void 0:j.mark)??c.Mark??dP,bo=(j==null?void 0:j.markLabel)??c.MarkLabel??hP,Z=(j==null?void 0:j.input)??c.Input??"input",re=(M==null?void 0:M.root)??u.root,ie=(M==null?void 0:M.rail)??u.rail,fe=(M==null?void 0:M.track)??u.track,Ee=(M==null?void 0:M.thumb)??u.thumb,le=(M==null?void 0:M.valueLabel)??u.valueLabel,ze=(M==null?void 0:M.mark)??u.mark,Qe=(M==null?void 0:M.markLabel)??u.markLabel,Le=(M==null?void 0:M.input)??u.input,mt=or({elementType:rr,getSlotProps:be,externalSlotProps:re,externalForwardedProps:F,additionalProps:{...rP(rr)&&{as:l}},ownerState:{...ee,...re==null?void 0:re.ownerState},className:[Ve.root,p]}),xn=or({elementType:fo,externalSlotProps:ie,ownerState:ee,className:Ve.rail}),Lf=or({elementType:mo,externalSlotProps:fe,additionalProps:{style:{...ce[Se].offset(pe),...ce[Se].leap(He)}},ownerState:{...ee,...fe==null?void 0:fe.ownerState},className:Ve.track}),ha=or({elementType:go,getSlotProps:xe,externalSlotProps:Ee,ownerState:{...ee,...Ee==null?void 0:Ee.ownerState},className:Ve.thumb}),Bf=or({elementType:yo,externalSlotProps:le,ownerState:{...ee,...le==null?void 0:le.ownerState},className:Ve.valueLabel}),pa=or({elementType:Lr,externalSlotProps:ze,ownerState:ee,className:Ve.mark}),fa=or({elementType:bo,externalSlotProps:Qe,ownerState:ee,className:Ve.markLabel}),Ff=or({elementType:Z,getSlotProps:Me,externalSlotProps:Le,ownerState:ee});return g.jsxs(rr,{...mt,children:[g.jsx(fo,{...xn}),g.jsx(mo,{...Lf}),Y.filter(De=>De.value>=O&&De.value<=v).map((De,qe)=>{const ma=vs(De.value,O,v),xo=ce[Se].offset(ma);let Ft;return Q===!1?Ft=ve.includes(De.value):Ft=Q==="normal"&&(ae?De.value>=ve[0]&&De.value<=ve[ve.length-1]:De.value<=ve[0])||Q==="inverted"&&(ae?De.value<=ve[0]||De.value>=ve[ve.length-1]:De.value>=ve[0]),g.jsxs(_.Fragment,{children:[g.jsx(Lr,{"data-index":qe,...pa,...!Qo(Lr)&&{markActive:Ft},style:{...xo,...pa.style},className:Et(pa.className,Ft&&Ve.markActive)}),De.label!=null?g.jsx(bo,{"aria-hidden":!0,"data-index":qe,...fa,...!Qo(bo)&&{markLabelActive:Ft},style:{...xo,...fa.style},className:Et(Ve.markLabel,fa.className,Ft&&Ve.markLabelActive),children:De.label}):null]},qe)}),ve.map((De,qe)=>{const ma=vs(De,O,v),xo=ce[Se].offset(ma),Ft=X==="off"?fP:yo;return g.jsx(Ft,{...!Qo(Ft)&&{valueLabelFormat:se,valueLabelDisplay:X,value:typeof se=="function"?se(V(De),qe):se,index:qe,open:ut===qe||nt===qe||X==="on",disabled:m},...Bf,children:g.jsx(go,{"data-index":qe,...ha,className:Et(Ve.thumb,ha.className,nt===qe&&Ve.active,te===qe&&Ve.focusVisible),style:{...xo,...Ne(qe),...ha.style},children:g.jsx(Z,{"data-index":qe,"aria-label":b?b(qe):s,"aria-valuenow":V(De),"aria-labelledby":i,"aria-valuetext":S?S(V(De),qe):a,value:ve[qe],...Ff})})},qe)})]})});process.env.NODE_ENV!=="production"&&(Of.propTypes={"aria-label":Ed(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":Ed(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 mP="[object Number]";function gP(e){return typeof e=="number"||Er(e)&&jr(e)==mP}const Tf=ge.observer(e=>{var s,a,i;const t=E.useTheme(),{store:r}=e,{t:n}=Ce.useTranslation();function o(l,c){c===e.velocity||!gP(c)||e.onVelocityChange(c)}return g.jsxs(E.Stack,{direction:"row",gap:2,alignItems:"center",children:[r.showVelocityLegend&&g.jsx(E.Typography,{sx:{color:(i=(a=(s=t.componentsExt)==null?void 0:s.JoggingPanel)==null?void 0:a.VelocitySlider)==null?void 0:i.sliderLegendColor,fontSize:"14px"},children:n("Jogging.Velocity.bt")}),g.jsx(Of,{value:e.velocity,color:"secondary",onChange:o,min:e.min,max:e.max,"aria-labelledby":"input-slider",disabled:e.disabled,sx:{"& .MuiSlider-valueLabelOpen":{zIndex:100,backgroundColor:"transparent",top:"0px"}}}),r.showVelocitySliderLabel&&(e.renderValue?e.renderValue(e.velocity):g.jsx(zl,{value:e.velocity.toString()}))]})});function zl({value:e,sx:t}){var n;const r=E.useTheme();return g.jsx(E.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(E.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:r.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const Ef=ge.observer(({store:e})=>{const{t}=Ce.useTranslation(),r=ge.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(Tf,{store:e,velocity:e.velocityInDisplayUnits,min:e.minVelocityInDisplayUnits,max:e.maxVelocityInDisplayUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,renderValue:n=>g.jsx(zl,{value:r.valueLabelFormat(n),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),yP=ge.observer(({store:e,children:t})=>{const{t:r}=Ce.useTranslation(),n=E.useTheme();function o(h,p){(p==="translate"||p==="rotate")&&e.setSelectedCartesianMotionType(p)}Ep(()=>[e.selectedCoordSystemId,e.selectedTcpId],()=>{e.jogger.motionStream.motionStateSocket.changeUrl(e.jogger.nova.makeWebsocketURL(`/controllers/${e.jogger.motionStream.controllerId}/motion-groups/${e.jogger.motionGroupId}/state-stream?tcp=${e.selectedTcpId}`))},{fireImmediately:!0});async function s(h,p){const f=await e.activate(),m=f.motionStream.rapidlyChangingMotionState.tcp_pose,b=f.motionStream.rapidlyChangingMotionState.joint_position;m&&await e.withMotionLock(async()=>{try{e.setCurrentIncrementJog({axis:h.axis,direction:h.direction}),await e.jogger.runIncrementalCartesianMotion({currentTcpPose:m,currentJoints:b,coordSystemId:e.activeCoordSystemId,velocityInRelevantUnits:e.selectedCartesianMotionType==="translate"?e.translationVelocityMmPerSec:e.rotationVelocityRadsPerSec,axis:h.axis,direction:h.direction,motion:e.selectedCartesianMotionType==="translate"?{type:"translate",distanceMm:p.mm}:{type:"rotate",distanceRads:et.degreesToRadians(p.degrees)}})}finally{e.setCurrentIncrementJog(null),await e.deactivate()}})}async function a(h){if(!e.isLocked){if(await e.activate(),e.activeDiscreteIncrement)return s(h,e.activeDiscreteIncrement);h.motionType==="translate"?await e.jogger.translateTCP({axis:h.axis,direction:h.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.rotateTCP({axis:h.axis,direction:h.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}}async function i(){e.isLocked||e.activeDiscreteIncrement||await e.deactivate()}function l(h,p,f){var b,S,P;const m=(P=(S=(b=f.componentsExt)==null?void 0:b.JoggingPanel)==null?void 0:S.JoggingCartesian)==null?void 0:P.Axis;if(m)return p==="translate"?m[h]:m.CustomRotation??m[h]}const c=[{id:"x",icon:g.jsx(x2,{}),colors:l("X",e.selectedCartesianMotionType,n)},{id:"y",icon:g.jsx(v2,{}),colors:l("Y",e.selectedCartesianMotionType,n)},{id:"z",icon:g.jsx(w2,{}),colors:l("Z",e.selectedCartesianMotionType,n)}];function u(h){return r("General.mm.variable",{amount:h.toFixed(1)})}function d(h){return r("General.degree.variable",{amount:et.radiansToDegrees(h).toFixed(1)})}return g.jsxs(E.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsxs(E.Stack,{gap:2,children:[g.jsx($A,{store:e}),g.jsx(Ef,{store:e}),g.jsx(E.Divider,{})]}),g.jsx(E.Stack,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:g.jsxs(E.Stack,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[g.jsxs(NA,{value:e.selectedCartesianMotionType,onChange:o,exclusive:!0,"aria-label":r("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[g.jsx(E.ToggleButton,{value:"translate",children:r("Jogging.Cartesian.Translation.bt")}),g.jsx(E.ToggleButton,{value:"rotate",children:r("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&c.map(h=>{var p,f;return g.jsx(xi,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((p=e.incrementJogInProgress)==null?void 0:p.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:g.jsxs(g.Fragment,{children:[h.icon,g.jsx(E.Typography,{sx:{fontSize:"24px",color:((f=h.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var m,b;return u(((b=(m=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:m.position)==null?void 0:b[et.XYZ_TO_VECTOR[h.id]])||0)},startJogging:m=>a({axis:h.id,motionType:"translate",direction:m}),stopJogging:i},h.id)}),e.selectedCartesianMotionType==="rotate"&&c.map(h=>{var p,f;return g.jsx(xi,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((p=e.incrementJogInProgress)==null?void 0:p.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:g.jsxs(g.Fragment,{children:[g.jsx(T2,{}),g.jsx(E.Typography,{sx:{fontSize:"24px",color:((f=h.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var m,b;return d(((b=(m=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:m.orientation)==null?void 0:b[et.XYZ_TO_VECTOR[h.id]])||0)},startJogging:m=>a({axis:h.id,motionType:"rotate",direction:m}),stopJogging:i},h.id)})]})}),g.jsx(ff,{store:e}),t&&g.jsx(E.Divider,{}),t]})}),bP=ge.observer(({store:e,children:t})=>{const r=E.useTheme();async function n(s){await e.activate(),await e.jogger.rotateJoints({joint:s.joint,direction:s.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function o(){await e.jogger.stop(),await e.deactivate()}return g.jsxs(E.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsx(Ef,{store:e}),g.jsx(E.Divider,{}),g.jsx(E.Stack,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},id:"JointControls",children:g.jsx(E.Stack,{alignItems:"center",gap:"24px",children:e.jogger.motionStream.joints.map(s=>{var c,u,d;const a=(d=(u=(c=e.motionGroupDescription.operation_limits.auto_limits)==null?void 0:c.joints)==null?void 0:u[s.index])==null?void 0:d.position,i=(a==null?void 0:a.lower_limit)!==void 0?et.radiansToDegrees(a.lower_limit):void 0,l=(a==null?void 0:a.upper_limit)!==void 0?et.radiansToDegrees(a.upper_limit):void 0;return g.jsxs(E.Stack,{direction:"row",alignItems:"center",justifyContent:"center",spacing:1.5,width:"100%",children:[e.showJointsLegend&&g.jsx(E.Typography,{color:e.isLocked?r.palette.text.disabled:r.palette.text.secondary,children:`G${s.index+1}`}),g.jsx(Pp,{disabled:e.isLocked,lowerLimitDegs:i,upperLimitDegs:l,getValueDegs:()=>{const h=e.jogger.motionStream.rapidlyChangingMotionState.joint_position[s.index];return h!==void 0?et.radiansToDegrees(h):void 0},startJogging:h=>n({joint:s.index,direction:h}),stopJogging:o})]},`joint-${s.index}`)})})}),g.jsx(ff,{store:e}),t&&g.jsx(E.Divider,{}),t]})}),xP=Ue(ge.observer(e=>{const t=ji.isString(e.nova)?new l2({instanceUrl:e.nova}):e.nova,r=ge.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function n(){We.runInAction(()=>{r.loadingError=null,r.joggingStore=null});try{let o=e.store;if(!o){const s=await Dl.open(t,e.motionGroupId);o=await da.loadFor(s)}We.runInAction(()=>{r.joggingStore=o}),e.onSetup&&e.onSetup(o)}catch(o){r.loadingError=o}}return D.useEffect(()=>(n(),e.store?()=>null:()=>{var o;(o=r.joggingStore)==null||o.dispose()}),[e.store,e.nova,e.motionGroupId]),D.useEffect(()=>{const o=r.joggingStore;o&&(e.locked?o.lock("external"):o.unlock("external"))},[r.joggingStore,e.locked]),g.jsx(E.Stack,{sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:r.joggingStore?g.jsx(SP,{store:r.joggingStore,children:e.children}):g.jsx(Ul,{message:"Loading jogging",error:r.loadingError})})})),SP=ge.observer(({store:e,children:t})=>{const{t:r}=Ce.useTranslation();function n(){if(e.currentTab.id==="cartesian")return g.jsx(g.Fragment,{children:g.jsx(yP,{store:e,children:t})});if(e.currentTab.id==="joint")return g.jsx(g.Fragment,{children:g.jsx(bP,{store:e,children:t})})}return g.jsxs(E.Stack,{flexGrow:1,sx:{overflow:"hidden"},children:[g.jsx(E.Tabs,{value:e.tabIndex,onChange:e.onTabChange,variant:"fullWidth",children:e.tabs.map(o=>{const s=o.label==="cartesian"?r("Jogging.Cartesian.bt"):r("Jogging.Joints.bt"),a=o.label==="cartesian"?g.jsx(Cw,{fontSize:"small",sx:{mr:1}}):g.jsx(ww,{fontSize:"small",sx:{mr:1}});return g.jsx(E.Tab,{label:e.showTabIcons?g.jsxs(E.Stack,{direction:"row",alignItems:"center",children:[a,s]}):s,id:`jogging-tab-${o.id}`,"aria-controls":`jogging-tab-${o.id}`},o.id)})}),g.jsx(E.Stack,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:n()})]})}),If=e=>{var i;const{value:t,ref:r}=e,n=E.useTheme(),[o,s]=D.useState(!1);async function a(){if(!r||!("current"in r))return console.warn("No copy target found"),!1;try{return await navigator.clipboard.writeText(t),console.log("Copied!"),s(!0),!0}catch(l){console.error(l);const c=window.getSelection();if(c&&r&&"current"in r&&r.current){const u=document.createRange();u.selectNodeContents(r.current),c.removeAllRanges(),c.addRange(u)}}return!1}return D.useEffect(()=>{if(!o)return;const l=setTimeout(()=>s(!1),3e3);return()=>{l&&clearTimeout(l)}},[o]),g.jsx(E.Tooltip,{open:o,title:"Copied!",children:g.jsx(E.Stack,{justifyContent:"center",sx:{height:"100%",boxSizing:"border-box",padding:"6px 12px",background:(i=n.palette.backgroundPaperElevation)==null?void 0:i[8],borderRadius:"10px",minWidth:"0",cursor:"pointer"},onClick:()=>a(),children:g.jsx(E.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})})})},vP=Ue(ge.observer(({tcpPose:e,showCopyButton:t=!1})=>{const[r,n]=D.useState(null),o=c2(e),s=async()=>{try{await navigator.clipboard.writeText(o),n("Copied!"),setTimeout(()=>n(null),2e3)}catch{n("Copy failed"),setTimeout(()=>n(null),2e3)}};return g.jsxs(E.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},"data-testid":"pose-cartesian-values",children:[g.jsx(If,{value:o}),t&&g.jsx(E.Button,{variant:"contained",color:"secondary",size:"small",onClick:s,sx:{flexShrink:0},children:r||"Copy"})]})})),CP=Ue(ge.observer(({joints:e,showCopyButton:t=!1})=>{const[r,n]=D.useState(null),o=`[${e.map(a=>parseFloat(a.toFixed(4))).join(", ")}]`,s=async()=>{try{await navigator.clipboard.writeText(o),n("Copied!"),setTimeout(()=>n(null),2e3)}catch{n("Copy failed"),setTimeout(()=>n(null),2e3)}};return g.jsxs(E.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},"data-testid":"pose-joint-values",children:[g.jsx(If,{value:o}),t&&g.jsx(E.Button,{variant:"contained",color:"secondary",size:"small",onClick:s,sx:{flexShrink:0},children:r||"Copy"})]})}));class Af{constructor(){this.messages=[],this.addMessage=(t,r="info")=>{const n={id:Math.random().toString(36).substring(2,11),timestamp:new Date,message:t,level:r};this.messages.push(n)},this.clearMessages=()=>{this.messages=[]},this.addInfo=t=>{this.addMessage(t,"info")},this.addWarning=t=>{this.addMessage(t,"warning")},this.addError=t=>{this.addMessage(t,"error")},this.addDebug=t=>{this.addMessage(t,"debug")},We.makeObservable(this,{messages:We.observable,addMessage:We.action,clearMessages:We.action})}}const po=(e,t,r)=>({id:r||`${Date.now()}-${Math.random().toString(36).substring(2,11)}`,timestamp:new Date,message:e,level:t}),wP=(e,t)=>po(e,"debug",t),OP=(e,t)=>po(e,"info",t),TP=(e,t)=>po(e,"warning",t),EP=(e,t)=>po(e,"error",t),Pf=Ue(ge.observer(e=>{var u;const{messages:t=[],onClear:r,height:n=400,sx:o}=e,s=E.useTheme(),a=D.useRef(null);D.useEffect(()=>{if(t.length===0)return;const d=a.current;if(!d)return;const h=setTimeout(()=>{d.scrollTop=d.scrollHeight},10);return()=>clearTimeout(h)},[t.length]);const i=d=>d.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),l=d=>{switch(d){case"error":return s.palette.error.main;case"warning":return s.palette.warning.main;case"info":return s.palette.info.main;case"debug":return s.palette.text.disabled;default:return s.palette.text.secondary}},c=({message:d})=>{const[h,p]=D.useState(!1),[f,m]=D.useState(!1),[b,S]=D.useState(!1),P=d.message.length>150,v=async()=>{try{await navigator.clipboard.writeText(d.message),m(!0),setTimeout(()=>m(!1),2e3)}catch(I){console.error("Failed to copy message:",I)}},O=P&&!h?d.message.substring(0,150)+"...":d.message;return g.jsx(E.Box,{onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),sx:{display:"flex",gap:1,fontFamily:"monospace",flexDirection:"column","&:hover":{backgroundColor:s.palette.action.hover},borderRadius:"4px",padding:"2px 4px",margin:"-2px -4px"},children:g.jsxs(E.Box,{sx:{display:"flex",gap:1},children:[g.jsxs(E.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:s.palette.text.disabled,whiteSpace:"nowrap",flexShrink:0},children:["[",i(d.timestamp),"]"]}),g.jsx(E.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:O}),g.jsxs(E.Box,{sx:{display:"flex",alignItems:"flex-start",gap:.5,opacity:b?1:0,transition:"opacity 0.2s ease-in-out",visibility:b?"visible":"hidden"},children:[g.jsx(E.IconButton,{size:"small",onClick:v,sx:{padding:"2px",color:s.palette.text.secondary,"&:hover":{backgroundColor:s.palette.action.hover}},title:f?"Copied!":"Copy message",children:g.jsx(Gt.ContentCopy,{sx:{fontSize:12}})}),P&&g.jsx(E.IconButton,{size:"small",onClick:()=>p(!h),sx:{padding:"2px",color:s.palette.text.secondary,"&:hover":{backgroundColor:s.palette.action.hover}},title:h?"Collapse":"Expand",children:h?g.jsx(Gt.ExpandLess,{sx:{fontSize:12}}):g.jsx(Gt.ExpandMore,{sx:{fontSize:12}})})]})]})},d.id)};return g.jsxs(E.Paper,{sx:{backgroundColor:((u=s.palette.backgroundPaperElevation)==null?void 0:u[2])||"#171927",backgroundImage:"none",height:n,display:"flex",flexDirection:"column",overflow:"hidden",...o},children:[g.jsxs(E.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px"},children:[g.jsxs(E.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(Gt.DescriptionOutlined,{sx:{fontSize:16,color:s.palette.action.active,opacity:.56}}),g.jsx(E.Typography,{sx:{fontWeight:500,fontSize:"14px",lineHeight:"143%",letterSpacing:"0.17px",color:s.palette.text.primary},children:"Log"})]}),g.jsx(E.Button,{onClick:r,variant:"text",sx:{fontWeight:500,fontSize:"13px",lineHeight:"22px",letterSpacing:"0.46px",color:s.palette.primary.main,textTransform:"none",minWidth:"auto",padding:"4px 8px","&:hover":{backgroundColor:s.palette.primary.main+"14"}},children:"Clear"})]}),g.jsx(E.Box,{ref:a,sx:{flex:1,overflow:"auto",padding:"8px 16px",display:"flex",flexDirection:"column",gap:"2px",scrollbarWidth:"thin",scrollbarColor:`${s.palette.divider} transparent`,"&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:s.palette.divider,borderRadius:"3px","&:hover":{backgroundColor:s.palette.divider}}},children:t.length===0?g.jsx(E.Typography,{sx:{color:s.palette.text.disabled,fontSize:"12px",fontStyle:"italic",textAlign:"center",marginTop:2},children:"No log messages"}):t.map(d=>g.jsx(c,{message:d},d.id))})]})})),IP=Ue(ge.observer(e=>{const{store:t,onStoreReady:r,...n}=e,o=D.useRef(r);D.useEffect(()=>{o.current=r},[r]);const s=D.useMemo(()=>{var l;const i=t||new Af;return(l=o.current)==null||l.call(o,i),i},[t]),a=()=>{s.clearMessages()};return g.jsx(Pf,{...n,messages:s.messages,onClear:a})}));function AP(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function PP({baseUrl:e=AP(),...t}){return g.jsxs(E.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(E.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),g.jsxs(E.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[g.jsx(E.Typography,{color:"#fff",children:"Found no devices to connect to."}),g.jsx(E.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),g.jsx(E.DialogActions,{children:g.jsxs(E.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[g.jsx(E.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),g.jsx(E.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}var dt=(e=>(e.IDLE="idle",e.PREPARING="preparing",e.STARTING="starting",e.RUNNING="running",e.PAUSING="pausing",e.PAUSED="paused",e.STOPPING="stopping",e.COMPLETED="completed",e.FAILED="failed",e.STOPPED="stopped",e.ERROR="error",e))(dt||{});const RP=Ue(ge.observer(({state:e,onRun:t,onPause:r,onStop:n,onReset:o,requiresManualReset:s=!1,variant:a="with_pause",className:i})=>{const l=E.useTheme(),{t:c}=Ce.useTranslation(),u=()=>{const p={run:{enabled:e==="idle"||e==="stopped"||e==="paused"||e==="completed"||e==="failed"||e==="error",label:c(e==="paused"?"ProgramControl.Resume.bt":e==="error"||e==="failed"?"ProgramControl.Retry.bt":"ProgramControl.Start.bt"),color:l.palette.success.main,onClick:t},pause:{enabled:e==="running",label:c("ProgramControl.Pause.bt"),color:"#FFFFFF33",onClick:r||(()=>{})},stop:{enabled:e==="preparing"||e==="starting"||e==="running"||e==="pausing"||e==="paused",label:c("ProgramControl.Stop.bt"),color:l.palette.error.main,onClick:n}};return a==="without_pause"?[p.run,p.stop]:[p.run,p.pause,p.stop]},d=p=>{const f={sx:{fontSize:"55px"}};if(a==="without_pause")return p===0?g.jsx(Gt.PlayArrow,{...f}):g.jsx(Gt.Stop,{...f});switch(p){case 0:return g.jsx(Gt.PlayArrow,{...f});case 1:return g.jsx(Gt.Pause,{...f});case 2:return g.jsx(Gt.Stop,{...f});default:return null}},h=u();return g.jsx(E.Box,{className:i,sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:g.jsx(E.Box,{sx:{display:"flex",gap:"40px",flexWrap:"wrap",justifyContent:"center",alignItems:"center"},children:h.map((p,f)=>g.jsxs(E.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[g.jsx(E.Button,{variant:"contained",disabled:!p.enabled||e==="preparing"||e==="starting"||e==="pausing"||e==="stopping"&&!s,onClick:p.onClick,sx:{width:"88px",height:"88px",borderRadius:"88px",backgroundColor:p.color,opacity:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!s)?1:.3,"&:hover":{backgroundColor:p.color,opacity:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!s)?.8:.3},"&:disabled":{backgroundColor:p.color,opacity:.3},minWidth:"88px",flexShrink:0},children:d(f)}),g.jsx(E.Typography,{variant:"body1",sx:{color:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!s)?p.color:l.palette.text.disabled,textAlign:"center",opacity:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!s)?1:.3},children:p.label})]},p.label))})})})),_i=Ue(ge.observer(({programState:e,safetyState:t,operationMode:r,className:n})=>{const o=E.useTheme(),{t:s}=Ce.useTranslation(),a=()=>{if(t==="SAFETY_STATE_DEVICE_EMERGENCY_STOP"||t==="SAFETY_STATE_ROBOT_EMERGENCY_STOP"||t==="SAFETY_STATE_STOP_0"||t==="SAFETY_STATE_STOP_1"||t==="SAFETY_STATE_STOP_2"||t==="SAFETY_STATE_PROTECTIVE_STOP"||t==="SAFETY_STATE_STOP"||t==="SAFETY_STATE_REDUCED"||t==="SAFETY_STATE_MASTERING"||t==="SAFETY_STATE_CONFIRM_SAFETY"||t==="SAFETY_STATE_OPERATOR_SAFETY"||t==="SAFETY_STATE_RECOVERY"||t==="SAFETY_STATE_VIOLATION")return{label:s("ProgramStateIndicator.EStop.lb"),color:o.palette.error.main};if(t==="SAFETY_STATE_UNKNOWN"||t==="SAFETY_STATE_FAULT")return{label:s("ProgramStateIndicator.Error.lb"),color:o.palette.error.main};if(t==="SAFETY_STATE_NORMAL")switch(e){case dt.PREPARING:return{label:s("ProgramStateIndicator.Preparing.lb"),color:o.palette.warning.main};case dt.STARTING:return{label:s("ProgramStateIndicator.Starting.lb"),color:o.palette.warning.main};case dt.RUNNING:return{label:s("ProgramStateIndicator.Running.lb"),color:o.palette.success.main};case dt.PAUSING:return{label:s("ProgramStateIndicator.Pausing.lb"),color:o.palette.warning.main};case dt.PAUSED:return{label:s("ProgramStateIndicator.Paused.lb"),color:o.palette.grey[600]};case dt.STOPPING:return{label:s("ProgramStateIndicator.Stopping.lb"),color:o.palette.warning.main};case dt.COMPLETED:return{label:s("ProgramStateIndicator.Completed.lb"),color:o.palette.success.main};case dt.FAILED:return{label:s("ProgramStateIndicator.Failed.lb"),color:o.palette.error.main};case dt.STOPPED:return{label:s("ProgramStateIndicator.Stopped.lb"),color:o.palette.warning.main};case dt.ERROR:return{label:s("ProgramStateIndicator.Error.lb"),color:o.palette.error.main};case dt.IDLE:default:return{label:s("ProgramStateIndicator.Ready.lb"),color:o.palette.success.main}}return{label:s("ProgramStateIndicator.Idle.lb"),color:o.palette.grey[600]}},{label:i,color:l}=a(),u=`${i} / ${(()=>{switch(r){case"OPERATION_MODE_AUTO":return s("ProgramStateIndicator.Auto.lb");case"OPERATION_MODE_MANUAL":return s("ProgramStateIndicator.Manual.lb");case"OPERATION_MODE_MANUAL_T1":return s("ProgramStateIndicator.ManualT1.lb");case"OPERATION_MODE_MANUAL_T2":return s("ProgramStateIndicator.ManualT2.lb");default:return s("ProgramStateIndicator.Auto.lb")}})()}`;return g.jsx(E.Chip,{className:n,label:g.jsx(E.Typography,{variant:"body2",sx:{fontSize:"0.75rem",lineHeight:1.2},children:u}),variant:"filled",sx:{backgroundColor:l,color:o.palette.getContrastText(l),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),_d="0.0.0-semantically-released";function Gl(e){let t=_d;return _d.startsWith("0.")&&(t=""),`https://cdn.jsdelivr.net/gh/wandelbotsgmbh/wandelbots-js-react-components${t?`@${t}`:""}/public/models/${e}.glb`}function MP(e){function t(r){return r.children.length===0?[r]:[r,...r.children.flatMap(n=>t(n))]}return t(e).filter(r=>Mf(r))}function Rf(e){return e.name.endsWith("_FLG")}function Mf(e){return/_J[0-9]+$/.test(e.name)}function VP(e,t){let r;function n(o){if(Rf(o)){if(r)throw Error(`Found multiple flange groups in robot model ${t}; first ${r.name} then ${o.name}. Only one _FLG group is allowed.`);r=o}Mf(o),o.children.map(n)}if(n(e.scene),!r)throw Error(`No flange group found in robot model ${t}. Flange must be identified with a name ending in _FLG.`);return{gltf:e}}function Vf({rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:r,children:n}){const o=D.useRef([]),s=D.useRef([]),a=D.useRef(null),{invalidate:i}=Xo.useThree();D.useEffect(()=>{const d=e.state.joint_position.joints.filter(h=>h!==void 0);return a.current=new Al(d,{tension:120,friction:20,threshold:.001}),()=>{var h;(h=a.current)==null||h.destroy()}},[]),Xo.useFrame((d,h)=>{if(a.current){const p=a.current.update(h);u(),p||i()}});function l(d){d&&(s.current=MP(d),u(),i())}function c(d){var h;o.current=d,(h=a.current)==null||h.setTarget(d)}function u(){var h;const d=((h=a.current)==null?void 0:h.getCurrentValues())||[];if(r)r(s.current,d);else for(const[p,f]of s.current.entries()){const m=t[p],b=m.theta||0,S=m.reverse_rotation_direction?-1:1;f.rotation.y=S*(d[p]||0)+b}}return Tp(()=>{const d=e.state.joint_position.joints.filter(h=>h!==void 0);requestAnimationFrame(()=>c(d))}),g.jsx("group",{ref:l,children:n})}const _P="line",kP="mesh";function jP({rapidlyChangingMotionState:e,dhParameters:t,...r}){const n=new wt.Matrix4,o=D.useRef([]),s=D.useRef([]);D.useEffect(()=>{o.current=new Array(t.length).fill(null),s.current=new Array(t.length).fill(null)},[t.length]);function a(c,u){const d=new wt.Vector3,h=new wt.Quaternion,p=new wt.Vector3;n.decompose(d,h,p);const f=d.clone(),m=new wt.Matrix4().makeRotationY(c.theta+u*(c.reverse_rotation_direction?-1:1)).multiply(new wt.Matrix4().makeTranslation(0,c.d/1e3,0)).multiply(new wt.Matrix4().makeTranslation(c.a/1e3,0,0)).multiply(new wt.Matrix4().makeRotationX(c.alpha));return n.multiply(m),n.decompose(d,h,p),{a:f,b:d}}function i(c,u,d,h){if(!t)return;const p=t[c];if(!p)return;const{a:f,b:m}=a(p,h);u.geometry.setPositions([f.toArray(),m.toArray()].flat()),d.position.set(m.x,m.y,m.z)}function l(c,u){n.identity();for(let d=0;d<Math.min(c.length,u.length);d++){const h=o.current[d],p=s.current[d];h&&p&&i(d,h,p,u[d])}}return g.jsx(g.Fragment,{children:g.jsx(Vf,{rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:l,children:g.jsxs("group",{...r,name:"Scene",children:[g.jsxs("mesh",{children:[g.jsx("sphereGeometry",{args:[.01,32,32]}),g.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]}),t.map((c,u)=>{const{a:d,b:h}=a(c,e.state.joint_position.joints[u]??0),p=`dhrobot_J0${u}`;return g.jsxs("group",{name:p,children:[g.jsx(ht.Line,{ref:f=>{o.current[u]=f},name:_P,points:[d,h],color:"white",lineWidth:5}),g.jsxs("mesh",{ref:f=>{s.current[u]=f},name:kP,position:h,children:[g.jsx("sphereGeometry",{args:[.01,32,32]}),g.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]},"mesh_"+u)]},p)})]})})})}const DP=console.warn;function UP(){return D.useEffect(()=>{console.warn=e=>{e!=="Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"&&DP(e)}},[]),g.jsx(g.Fragment,{})}function LP(e){return e.type==="Mesh"}function BP({modelURL:e,flangeRef:t,postModelRender:r,...n}){const{gltf:o}=VP(ht.useGLTF(e),e.split("/").pop()||e),s=D.useCallback(i=>{i&&r&&r()},[e]);function a(i){return LP(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:Rf(i)?t:void 0,children:i.children.map(a)},i.uuid)}return g.jsx("group",{...n,dispose:null,ref:s,children:a(o.scene)})}const FP=(e,t)=>{e.userData.isGhost||(e.traverse(r=>{if(r instanceof Te.Mesh){r.material instanceof Te.Material&&(r.material.colorWrite=!1);const n=r.clone(),o=r.clone();n.material=new Te.MeshStandardMaterial({depthTest:!0,depthWrite:!0,colorWrite:!1,polygonOffset:!0,polygonOffsetFactor:-1,side:Te.DoubleSide}),n.userData.isGhost=!0,o.material=new Te.MeshStandardMaterial({color:t,opacity:.3,depthTest:!0,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-2,side:Te.DoubleSide}),o.userData.isGhost=!0,r.parent&&(r.parent.add(n),r.parent.add(o))}}),e.userData.isGhost=!0)},$P=e=>{if(!e.userData.isGhost)return;const t=[];e.traverse(r=>{var n;r instanceof Te.Mesh&&((n=r.userData)!=null&&n.isGhost?t.push(r):r.material instanceof Te.Material&&(r.material.colorWrite=!0))}),t.forEach(r=>{r.parent&&r.parent.remove(r)}),e.userData.isGhost=!1},_f=Ue(({rapidlyChangingMotionState:e,modelFromController:t,dhParameters:r,getModel:n=Gl,flangeRef:o,postModelRender:s,transparentColor:a,...i})=>{const[l,c]=D.useState(null),u=D.useCallback(h=>{c(h)},[]);D.useEffect(()=>{l&&(a?FP(l,a):$P(l))},[l,a]);const d=g.jsx(jP,{rapidlyChangingMotionState:e,dhParameters:r,...i});return g.jsxs(Xf.ErrorBoundary,{fallback:d,onError:h=>{console.error(h)},children:[g.jsx(D.Suspense,{fallback:d,children:g.jsx("group",{ref:u,children:g.jsx(Vf,{rapidlyChangingMotionState:e,dhParameters:r,children:g.jsx(BP,{modelURL:n(t),postModelRender:s,flangeRef:o,...i})})})}),g.jsx(UP,{})]})});function kf({connectedMotionGroup:e,getModel:t=Gl,flangeRef:r,transparentColor:n,postModelRender:o,...s}){return e.dhParameters?g.jsx(_f,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:e.modelFromController||"",dhParameters:e.dhParameters,getModel:t,flangeRef:r,transparentColor:n,postModelRender:o,...s}):null}const NP=Ue(ge.observer(({robotName:e,programState:t,safetyState:r,operationMode:n,driveToHomeEnabled:o=!1,onDriveToHomePress:s,onDriveToHomeRelease:a,connectedMotionGroup:i,robotComponent:l=kf,customContentComponent:c,className:u})=>{var M;const d=E.useTheme(),{t:h}=Ce.useTranslation(),[p,f]=D.useState(!1),m=D.useRef(null),b=D.useRef(null),[S,P]=D.useState(!1),[v,O]=D.useState({width:400,height:600}),[I,T]=D.useState(0);D.useEffect(()=>{const j=()=>{if(b.current){const{offsetWidth:Q,offsetHeight:oe}=b.current;P(Q>oe),O({width:Q,height:oe})}};j();const ne=new ResizeObserver(j);return b.current&&ne.observe(b.current),()=>{ne.disconnect()}},[]);const w=D.useCallback(()=>{T(j=>j+1)},[]),R=D.useCallback(()=>{!o||!s||(f(!0),s())},[o,s]),k=D.useCallback(()=>{!o||!a||(f(!1),a())},[o,a]),y=D.useCallback(()=>{p&&a&&(f(!1),a())},[p,a]),A=S?v.width<350:v.height<200,V=S?v.height<310:v.height<450;return g.jsx(E.Card,{ref:b,className:u,sx:{width:"100%",height:"100%",display:"flex",flexDirection:S?"row":"column",position:"relative",overflow:"hidden",minWidth:{xs:180,sm:220,md:250},minHeight:S?{xs:200,sm:240,md:260}:{xs:150,sm:180,md:220},border:`1px solid ${d.palette.divider}`,borderRadius:"18px",boxShadow:"none",backgroundColor:((M=d.palette.backgroundPaperElevation)==null?void 0:M[8])||"#2A2A3F",backgroundImage:"none"},children:S?g.jsxs(g.Fragment,{children:[g.jsx(E.Box,{sx:{flex:"0 0 50%",position:"relative",height:"100%",minHeight:"100%",maxHeight:"100%",borderRadius:1,m:{xs:1.5,sm:2,md:3},mr:{xs:.75,sm:1,md:1.5},overflow:"hidden",display:A?"none":"block"},children:!A&&g.jsxs(Xo.Canvas,{orthographic:!0,camera:{position:[3,2,3],zoom:1},shadows:!0,frameloop:"demand",style:{borderRadius:d.shape.borderRadius,width:"100%",height:"100%",background:"transparent",position:"absolute",top:0,left:0},dpr:[1,2],gl:{alpha:!0,antialias:!0},children:[g.jsx(ri,{}),g.jsx(ht.Bounds,{fit:!0,observe:!0,margin:1,maxDuration:1,children:g.jsx(l,{connectedMotionGroup:i,postModelRender:w})})]})}),g.jsxs(E.Box,{sx:{flex:"1",display:"flex",flexDirection:"column",justifyContent:"flex-start",width:A?"100%":"50%"},children:[g.jsxs(E.Box,{sx:{p:{xs:1.5,sm:2,md:3},pb:{xs:1,sm:1.5,md:2},textAlign:"left"},children:[g.jsx(E.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(_i,{programState:t,safetyState:r,operationMode:n})]}),g.jsxs(E.Box,{sx:{p:{xs:1.5,sm:2,md:3},pt:0,flex:"1",display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[!V&&c&&g.jsxs(E.Box,{children:[g.jsx(c,{}),g.jsx(E.Divider,{sx:{mt:1,mb:0,borderColor:d.palette.divider,opacity:.5}})]}),g.jsx(E.Box,{sx:{mt:!V&&c?"auto":0},children:g.jsx(E.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(E.Button,{ref:m,variant:"contained",color:"secondary",size:"small",disabled:!o,onMouseDown:R,onMouseUp:k,onMouseLeave:y,onTouchStart:R,onTouchEnd:k,sx:{textTransform:"none",px:1.5,py:.5},children:h("RobotCard.DriveToHome.bt")})})})]})]})]}):g.jsx(g.Fragment,{children:g.jsxs(E.Box,{sx:{p:3,height:"100%",display:"flex",flexDirection:"column"},children:[g.jsxs(E.Box,{children:[g.jsx(E.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(_i,{programState:t,safetyState:r,operationMode:n})]}),g.jsx(E.Box,{sx:{flex:A?0:1,position:"relative",minHeight:A?0:{xs:120,sm:150,md:200},height:A?0:"auto",borderRadius:1,overflow:"hidden",display:A?"none":"block"},children:!A&&g.jsxs(Xo.Canvas,{orthographic:!0,camera:{position:[3,2,3],zoom:1},shadows:!0,frameloop:"demand",style:{borderRadius:d.shape.borderRadius,width:"100%",height:"100%",background:"transparent",position:"absolute"},dpr:[1,2],gl:{alpha:!0,antialias:!0},children:[g.jsx(ri,{}),g.jsx(ht.Bounds,{fit:!0,clip:!0,observe:!0,margin:1,maxDuration:1,children:g.jsx(l,{connectedMotionGroup:i,postModelRender:w})})]})}),g.jsxs(E.Box,{children:[!V&&c&&g.jsxs(g.Fragment,{children:[g.jsx(c,{}),g.jsx(E.Divider,{sx:{mt:1,mb:0,borderColor:d.palette.divider,opacity:.5}})]}),g.jsx(E.Box,{sx:{display:"flex",justifyContent:"flex-start",mt:!V&&c?{xs:1,sm:2,md:5}:{xs:.5,sm:1,md:2},mb:{xs:.5,sm:.75,md:1}},children:g.jsx(E.Button,{ref:m,variant:"contained",color:"secondary",size:"small",disabled:!o,onMouseDown:R,onMouseUp:k,onMouseLeave:y,onTouchStart:R,onTouchEnd:k,sx:{textTransform:"none",px:1.5,py:.5},children:h("RobotCard.DriveToHome.bt")})})]})]})})})})),zP=pr(g.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),GP=({title:e,titleId:t,...r},n)=>_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,fill:"none",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{fill:"#38C6F4",fillRule:"evenodd",d:"M6.359 14.25v2.934h7.63v-3.521L10.196 9.87 9 8.674l.859-.859.337-.337.858-.858.565.565.631.63.565.565 1.196-1.195.543-.544 1.196-1.195-1.196-1.196-2.304-2.304L11.054.75 9.86 1.946 3.446 8.359 2.25 9.554l1.196 1.196 2.913 2.913zm1.69 0v1.244h4.249v-1.13L7.804 9.87 6.608 8.674l1.196-1.196L9.86 5.424l.007-.008-.543-.543-4.681 4.681 2.912 2.913.496.496v.113h2.124l1.174 1.174zm3.005-10.022-.294.294-.543-.543.837-.837 2.304 2.304-.543.543-.565-.565z",clipRule:"evenodd"})),HP=D.forwardRef(GP);var Hl=(e=>(e.PRECONDITION_NOT_FULFILLED="PRECONDITION_NOT_FULFILLED",e.ROBOT_DISCONNECTED="ROBOT_DISCONNECTED",e.CELL_OPEN="CELL_OPEN",e.E_STOP="E_STOP",e.MANUAL_MODE="MANUAL_MODE",e.READY="READY",e))(Hl||{});const jf=Ue(ge.observer(({setupState:e,className:t})=>{const r=E.useTheme(),{t:n}=Ce.useTranslation(),o=()=>{var c,u,d,h,p,f,m;switch(e){case"READY":return{label:n("RobotSetupReadinessIndicator.Ready.lb"),indicatorColor:((c=r.palette.tertiary)==null?void 0:c.main)||r.palette.primary.main,backgroundColor:((u=r.palette.backgroundPaperElevation)==null?void 0:u[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"ROBOT_DISCONNECTED":return{label:n("RobotSetupReadinessIndicator.RobotDisconnected.lb"),indicatorColor:r.palette.error.main,backgroundColor:((d=r.palette.backgroundPaperElevation)==null?void 0:d[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"CELL_OPEN":return{label:n("RobotSetupReadinessIndicator.CellOpen.lb"),indicatorColor:r.palette.error.main,backgroundColor:((h=r.palette.backgroundPaperElevation)==null?void 0:h[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"E_STOP":return{label:n("RobotSetupReadinessIndicator.EStop.lb"),indicatorColor:r.palette.error.main,backgroundColor:((p=r.palette.backgroundPaperElevation)==null?void 0:p[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"MANUAL_MODE":return{label:n("RobotSetupReadinessIndicator.ManualMode.lb"),indicatorColor:r.palette.error.main,backgroundColor:((f=r.palette.backgroundPaperElevation)==null?void 0:f[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"PRECONDITION_NOT_FULFILLED":default:return{label:n("RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb"),indicatorColor:r.palette.error.main,backgroundColor:((m=r.palette.backgroundPaperElevation)==null?void 0:m[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText}}},{label:s,indicatorColor:a,backgroundColor:i,textColor:l}=o();return g.jsx(E.Chip,{className:t,label:g.jsxs(E.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(E.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:a,flexShrink:0}}),g.jsx(E.Typography,{variant:"body2",sx:{color:l,fontSize:"0.75rem",lineHeight:1.2},children:s})]}),variant:"filled",sx:{backgroundColor:i,color:r.palette.getContrastText(i),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),qP=Ue(ge.observer(({robotName:e,robotType:t,setupState:r,PreconditionComponent:n=jf,className:o})=>{var l;const s=E.useTheme(),a=t||"Robot",i=r===Hl.READY;return g.jsxs(E.Box,{className:o,sx:{border:`1px solid ${s.palette.divider}`,background:((l=s.palette.backgroundPaperElevation)==null?void 0:l[8])||"#292B3F",borderRadius:"8px",padding:"20px",display:"flex",alignItems:"center",justifyContent:"space-between",opacity:1},children:[g.jsxs(E.Box,{sx:{display:"flex",alignItems:"center",gap:2,flex:1},children:[i?g.jsx(E.Box,{sx:{fontSize:24,display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,"& svg":{fill:`${s.palette.primary.main} !important`},"& svg path":{fill:`${s.palette.primary.main} !important`}},children:g.jsx(HP,{})}):g.jsx(zP,{sx:{color:s.palette.error.main,fontSize:24}}),g.jsx(E.Typography,{variant:"body1",sx:{fontWeight:500,color:s.palette.text.primary},children:e}),g.jsx(E.Divider,{orientation:"vertical",flexItem:!0,sx:{backgroundColor:s.palette.text.secondary,opacity:.3,width:"1px"}}),g.jsx(E.Typography,{variant:"body2",sx:{color:s.palette.text.secondary},children:a})]}),n&&g.jsx(n,{setupState:r})]})})),WP=Array(6).fill(2*Math.PI),kt={Abb:"abb",Fanuc:"fanuc",Kuka:"kuka",Universalrobots:"universalrobots",Yaskawa:"yaskawa"},ki={[kt.Abb]:[0,0,0,0,Math.PI/2,0,0],[kt.Fanuc]:[0,0,0,0,-Math.PI/2,0,0],[kt.Yaskawa]:[0,0,0,0,-Math.PI/2,0,0],[kt.Kuka]:[0,-Math.PI/2,Math.PI/2,0,Math.PI/2,0,0],[kt.Universalrobots]:[0,-Math.PI/2,-Math.PI/2,-Math.PI/2,Math.PI/2,-Math.PI/2,0]};function Df(e){const[t]=e.split("_");switch(t){case"ABB":return kt.Abb;case"FANUC":return kt.Fanuc;case"YASKAWA":return kt.Yaskawa;case"KUKA":return kt.Kuka;case"UniversalRobots":return kt.Universalrobots;default:return null}}function JP(e,t){const r=Df(e);return r&&r in ki?ki[r]:t||null}const YP=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"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"})),KP=D.forwardRef(YP),QP=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"m13.37 9.12 1.69 1.69 2.99-2.99-3.73-3.73-.95-.95-7.66 7.66-.95.95 3.99 3.99v3.44h7.55v-3.55l-4.72-4.72 1.79-1.79Zm-.91-2.99.91-.91 2.6 2.6-.91.91-2.6-2.6Zm-2.25 10.24h3.74l-1.34-1.34-.04-.04h-2.5l-3.25-3.25 4.59-4.59.92.92L9.5 10.9l5.33 5.33v1.48H10.2v-1.35l.01.01ZM2 2v4.99h1.41V3.4h3.58V2H2ZM22.21 2h-4.98v1.41h3.59v3.58h1.4V2h-.01ZM20.81 20.65h-3.58v1.4h4.98v-4.99h-1.4v3.59ZM3.4 17.06H2v4.98h4.99v-1.4H3.4v-3.58Z"})),XP=D.forwardRef(QP),jt=ge.observer(({id:e,icon:t,color:r,title:n,name:o,label:s,explanation:a,literalValue:i,anchorOrigin:l,transformOrigin:c})=>{const u=ge.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(E.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(E.SvgIcon,{component:t,sx:{color:r}}),s&&g.jsx("div",{style:{color:r},children:s})]}),g.jsx(E.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(E.Stack,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[g.jsxs("div",{children:[n&&g.jsx(E.Typography,{component:"span",fontSize:"14px",children:`${n}: `}),g.jsx(E.Typography,{component:"span",color:r,fontWeight:"bold",fontSize:"14px",children:o})]}),g.jsx(E.Typography,{fontSize:"14px",children:a}),i&&g.jsx(E.Typography,{fontSize:"12px",children:i})]})})]})}),ZP=ge.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:r,transformOrigin:n,compact:o})=>{const s=E.useTheme(),{t:a}=Ce.useTranslation();return e?g.jsx(jt,{id:"motion-group-virtual",icon:XP,color:s.palette.tertiary.main,name:a("SafetyBar.ControllerType.Virtual.lb"),label:o?null:a("SafetyBar.ControllerType.Virtual.lb"),explanation:g.jsxs(Ce.Trans,{i18nKey:"SafetyBar.MotionGroup.Virtual.Explanation.lb",values:{motionGroupId:t},children:["Motion group ",g.jsx("code",{children:t})," refers to a virtual robot with no physical counterpart. It can be freely manipulated without special safety precautions."]}),anchorOrigin:r,transformOrigin:n}):g.jsx(jt,{id:"motion-group-physical",icon:KP,color:s.palette.primary.main,name:a("SafetyBar.ControllerType.Physical.lb"),label:o?null:a("SafetyBar.ControllerType.Physical.lb"),explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:g.jsx("code",{}),strong:g.jsx("strong",{})}}),anchorOrigin:r,transformOrigin:n})}),eR=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.306 2.768c0-.424.344-.768.768-.768h.406C19.53 2 22 4.551 22 7.699c0 3.237-2.51 5.587-5.31 5.703-.84 1.595-2.478 2.677-4.36 2.677a4.845 4.845 0 0 1-3.146-1.163c-.6 1.783 0 3.922 1.79 4.99 1.929 1.149 4.395.467 5.508-1.524l.212-.378a.75.75 0 1 1 1.308.732l-.231.414c-1.524 2.725-4.9 3.66-7.54 2.085-2.716-1.618-3.432-5.037-2.129-7.599a5.22 5.22 0 0 1-.73-2.677c0-2.192 1.335-4.063 3.212-4.793-1.195-1.427-3.29-1.96-5.08-.892-1.928 1.15-2.589 3.696-1.475 5.687l.231.413a.75.75 0 0 1-1.308.732l-.212-.377c-1.524-2.726-.62-6.211 2.02-7.785 2.716-1.619 5.943-.55 7.44 1.897l.13-.001c2.739 0 4.96 2.292 4.96 5.12 0 .284-.023.563-.066.834 1.795-.354 3.288-1.96 3.288-4.095 0-2.3-1.805-4.163-4.032-4.163h-.406a.768.768 0 0 1-.768-.768Zm.496 8.191c0 .286-.033.564-.094.831a3.62 3.62 0 0 1-.672 1.415 3.425 3.425 0 0 1-2.706 1.338 3.402 3.402 0 0 1-2.384-.98 3.598 3.598 0 0 1-.852-1.306 3.677 3.677 0 0 1-.235-1.298c0-1.623 1.046-2.994 2.48-3.435a3.37 3.37 0 0 1 1.522-.107c1.665.264 2.94 1.75 2.94 3.542Z"})),tR=D.forwardRef(eR),rR=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z",fill:"#fff",fillOpacity:.56})),nR=D.forwardRef(rR),oR=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"M12.953 5.09a1.497 1.497 0 0 0-1.653-.518l-1.35.43a1.504 1.504 0 0 0-1.726-.376L2.858 6.97c-.736.321-1.06 1.155-.726 1.862.334.707 1.202 1.02 1.937.698l4.27-1.865 1.466 1.973v.402c0 .873-.627 1.63-1.512 1.827l-2.56.567c-1.329.295-2.27 1.431-2.27 2.74v.107c0 .26.22.469.489.469h11.117c1.329 0 2.618.435 3.656 1.233l1.665 1.28A1 1 0 0 0 22 17.47V11.062c0-.312-.108-.616-.308-.863l-3.415-4.218a1.5 1.5 0 0 0-1.618-.471l-.378.12-.866-.475a1.516 1.516 0 0 0-1.188-.114l-1.06.338-.214-.289Z"})),sR=D.forwardRef(oR),aR=ge.observer(({operationMode:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:o}=Ce.useTranslation(),s=E.useTheme();switch(e){case"OPERATION_MODE_AUTO":return g.jsx(jt,{id:"operation-mode-auto",icon:tR,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Automatic.ti"),label:n?null:o("SafetyBar.OperationMode.Automatic.ti"),color:s.palette.text.secondary,explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.OperationMode.Auto.Explanation.lb",children:"The robot controller is in automatic operation mode. Automated movement without manual confirmation is possible in this mode."}),anchorOrigin:t,transformOrigin:r});case"OPERATION_MODE_MANUAL":case"OPERATION_MODE_MANUAL_T1":case"OPERATION_MODE_MANUAL_T2":return g.jsx(jt,{id:"operation-mode-manual",icon:sR,color:s.palette.warning.main,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Manual.lb"),label:n?null:o("SafetyBar.OperationMode.Manual.lb"),explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.OperationMode.Manual.Explanation.lb",children:"The robot controller is in manual operation mode. On a physical robot, this generally indicates that an enabling switch must be held for the robot to move successfully."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:return g.jsx(jt,{id:"operation-mode-error",icon:nR,color:s.palette.warning.main,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Error.lb"),label:n?null:o("SafetyBar.OperationMode.Error.lb"),explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.OperationMode.Error.Explanation.lb",children:"The robot controller has entered an unexpected operation mode. Motion group movement may not be possible."}),literalValue:e,anchorOrigin:t,transformOrigin:r})}}),iR=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z"})),lR=D.forwardRef(iR),cR=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),_.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.364 12a6.364 6.364 0 1 1-12.728 0 6.364 6.364 0 0 1 12.728 0ZM7.909 9.273 12 16.546l4.09-7.273H7.91Z"}),_.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.364 0a8.636 8.636 0 1 1-17.273 0 8.636 8.636 0 0 1 17.273 0Z"})),uR=D.forwardRef(cR),dR=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"M9.057 15.115c-1.681 0-3.111-.59-4.29-1.768C3.59 12.17 3 10.74 3 9.057c0-.29.021-.582.064-.876a4.1 4.1 0 0 1 .214-.844.78.78 0 0 1 .273-.36c.115-.077.244-.133.389-.168a.857.857 0 0 1 .437.008c.146.04.28.12.4.24l2.806 2.787 2.26-2.261-2.775-2.786a.903.903 0 0 1-.241-.405.875.875 0 0 1-.008-.442 1.13 1.13 0 0 1 .174-.389.82.82 0 0 1 .355-.273c.268-.107.548-.182.838-.224.29-.043.581-.064.871-.064 1.682 0 3.112.59 4.29 1.768 1.179 1.178 1.768 2.608 1.768 4.29 0 .444-.042.858-.126 1.241-.084.384-.21.755-.377 1.113l5.726 5.692A2.2 2.2 0 0 1 21 18.721a2.2 2.2 0 0 1-.662 1.617A2.2 2.2 0 0 1 18.72 21a2.173 2.173 0 0 1-1.617-.679l-5.692-5.709c-.372.161-.75.285-1.133.372-.383.087-.79.13-1.222.13Z",fill:"#fff",fillOpacity:.56})),hR=D.forwardRef(dR),pR=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"m10.6 13.8-2.15-2.15a.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275.948.948 0 0 0-.275.7c0 .283.092.517.275.7L9.9 15.9c.2.2.433.3.7.3.267 0 .5-.1.7-.3l5.65-5.65a.948.948 0 0 0 .275-.7.948.948 0 0 0-.275-.7.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275L10.6 13.8ZM12 22a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),fR=D.forwardRef(pR),mR=({title:e,titleId:t,...r},n)=>_.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"M9 16h6c.283 0 .52-.096.713-.287A.968.968 0 0 0 16 15V9a.967.967 0 0 0-.287-.713A.968.968 0 0 0 15 8H9a.968.968 0 0 0-.713.287A.968.968 0 0 0 8 9v6c0 .283.096.52.287.713.192.191.43.287.713.287Zm3 6a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),gR=D.forwardRef(mR),yR=ge.observer(({safetyState:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:o}=Ce.useTranslation(),s=E.useTheme();switch(e){case"SAFETY_STATE_NORMAL":return g.jsx(jt,{id:"safety-state-normal",title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Normal.lb"),label:n?null:o("SafetyBar.SafetyState.Normal.lb"),icon:fR,color:s.palette.text.secondary,explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.SafetyState.Normal.Explanation.lb",children:"The robot controller is in a normal safety state. Movement is not prevented by this state."}),anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_DEVICE_EMERGENCY_STOP":case"SAFETY_STATE_ROBOT_EMERGENCY_STOP":return g.jsx(jt,{id:"safety-state-estop",title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Estop.lb"),label:n?null:o("SafetyBar.SafetyState.Estop.lb"),icon:uR,color:s.palette.error.main,explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.StopState.Estop.Explanation.lb",children:"An emergency stop of the robot controller has been triggered. Movement of the robot is no longer possible until the estop is released."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_STOP_0":case"SAFETY_STATE_STOP_1":case"SAFETY_STATE_STOP_2":case"SAFETY_STATE_PROTECTIVE_STOP":case"SAFETY_STATE_STOP":return g.jsx(jt,{id:"safety-state-stop",icon:gR,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Stop.lb"),label:n?null:o("SafetyBar.SafetyState.Stop.lb"),color:s.palette.warning.main,explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.SafetyState.Stop.Explanation.lb",children:"The robot controller has entered a stop state. Movement is no longer possible until the stop state is resolved."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_REDUCED":case"SAFETY_STATE_MASTERING":case"SAFETY_STATE_CONFIRM_SAFETY":case"SAFETY_STATE_OPERATOR_SAFETY":case"SAFETY_STATE_RECOVERY":case"SAFETY_STATE_VIOLATION":return g.jsx(jt,{id:"safety-state-manual-action-required",icon:hR,color:s.palette.warning.main,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.ManualActionRequired.lb"),label:n?null:o("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.SafetyState.ManualActionRequired.Explanation.lb",children:"The robot controller has entered a safety state requiring manual action to resolve."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_UNKNOWN":case"SAFETY_STATE_FAULT":return g.jsx(jt,{id:"safety-state-error",icon:lR,color:s.palette.error.main,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Error.lb"),label:n?null:o("SafetyBar.SafetyState.Error.lb"),explanation:g.jsx(Ce.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:g2(e,`Unknown safety state ${e}`)}}),bR=Ue(ge.observer(({isVirtual:e,motionGroupId:t,operationMode:r,safetyState:n,anchorOrigin:o,transformOrigin:s,compact:a=!0})=>{const i=a?1:2;return g.jsxs(E.Stack,{direction:"row",gap:i,alignItems:"center",sx:{height:"24px"},children:[g.jsx(yR,{safetyState:n,anchorOrigin:o,transformOrigin:s,compact:a}),g.jsx(E.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(aR,{operationMode:r,anchorOrigin:o,transformOrigin:s,compact:a}),g.jsx(E.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(ZP,{isVirtual:e,motionGroupId:t,anchorOrigin:o,transformOrigin:s,compact:a})]})})),xR=E.styled(E.Fab,{shouldForwardProp:e=>e!=="selected"})(({theme:e})=>{var t,r,n;return{borderRadius:"20px","&:hover":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[7]},variants:[{props:({selected:o})=>!o,style:{background:(r=e.palette.backgroundPaperElevation)==null?void 0:r[0],color:e.palette.action.disabled,"> img":{opacity:.4}}},{props:({selected:o})=>o,style:{background:(n=e.palette.backgroundPaperElevation)==null?void 0:n[11],border:`1px solid ${e.palette.divider}`,color:e.palette.primary.contrastText}}]}}),SR=e=>{const{ref:t,...r}=e;return g.jsx(xR,{ref:t,selected:e.selected,...r,color:"secondary",variant:"circular"})};function vR(e){const{children:t,value:r,index:n,...o}=e;return g.jsx("div",{role:"tabpanel",hidden:r!==n,id:`tabpanel-${n}`,"aria-labelledby":`tab-${n}`,...o,children:r===n&&g.jsx(E.Box,{children:t})})}function CR({children:e,...t}){const{fullWidth:r,indicator:n,onChange:o,orientation:s,scrollButtons:a,selectionFollowsFocus:i,textColor:l,value:c,variant:u,...d}=t;return g.jsx(E.Box,{...d,children:e})}const wR=Ue(ge.observer(e=>{const{items:t,activeTab:r,defaultActiveTab:n=0,onTabChange:o,sx:s,ref:a}=e,i=r!==void 0,[l,c]=D.useState(n),u=i?r:l;D.useEffect(()=>{i||t.length!==0&&(l<0||l>t.length-1)&&c(0)},[t.length,i,l]);const d=(h,p)=>{i||c(p),o==null||o(p)};return g.jsxs(E.Box,{ref:a,sx:{height:"100%",display:"flex",flexDirection:"column",...s},children:[g.jsx(E.Box,{sx:{px:0,py:0,overflow:"visible",position:"relative",paddingTop:h=>h.spacing(2),paddingRight:h=>h.spacing(2.5)},children:g.jsx(E.Tabs,{value:u,onChange:d,sx:{minHeight:"32px",backgroundColor:"transparent",overflow:"visible","& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:2,overflow:"visible",paddingTop:0,paddingBottom:0},"& .MuiTabs-scroller":{overflow:"visible !important"},"& .MuiTab-root":{overflow:"visible"}},children:t.map((h,p)=>{var O,I,T;const f=()=>{if(!h.badge)return;const w=h.badge.content,R=h.badge.max;return typeof w=="number"&&R&&w>R?`${R}+`:w},m=()=>{if(!h.badge)return!1;const w=h.badge.content,R=h.badge.showZero;return!(w===0&&!R)},b=f(),S=m(),P=()=>{i||c(p),o==null||o(p)},v=g.jsx(E.Tab,{label:h.label,icon:h.icon,iconPosition:"start",disableRipple:!0,onClick:P,sx:{minHeight:"32px",height:"32px",padding:"0px 10px",borderRadius:"12px",backgroundColor:w=>{var R;return((R=w.palette.backgroundPaperElevation)==null?void 0:R[11])||"#32344B"},color:"text.primary",opacity:u===p?1:.38,fontSize:"13px",transition:"all 0.2s ease-in-out",position:"relative",overflow:"visible","&:hover":{opacity:u===p?1:.6},"&.Mui-selected":{opacity:1,backgroundColor:w=>{var R;return((R=w.palette.backgroundPaperElevation)==null?void 0:R[11])||"#32344B"},color:"text.primary"},"&:focus":{outline:"none"},"&:active":{transform:"none"}}},h.id);return S?g.jsx(CR,{component:"span",sx:{display:"inline-flex"},children:g.jsx(E.Badge,{badgeContent:b,color:((O=h.badge)==null?void 0:O.color)||"error",max:(I=h.badge)==null?void 0:I.max,showZero:(T=h.badge)==null?void 0:T.showZero,anchorOrigin:{vertical:"top",horizontal:"right"},overlap:"rectangular",sx:{"& .MuiBadge-badge":{opacity:"1 !important"}},children:v})},h.id):v})})}),g.jsx(E.Box,{sx:{mt:h=>h.spacing(2),borderBottom:1,borderColor:"divider"}}),g.jsx(E.Box,{sx:{flex:1,overflow:"auto"},children:t.map((h,p)=>g.jsx(vR,{value:u,index:p,children:h.content},h.id))})]})})),OR={$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"},TR=D.lazy(()=>import("@monaco-editor/react"));let ti=null;async function ER(){if(!ti){const[{createHighlighter:e},{shikiToMonaco:t}]=await Promise.all([import("shiki"),import("@shikijs/monaco")]);ti={shiki:await e({langs:[OR],themes:["dark-plus","light-plus"]}),shikiToMonaco:t}}return ti}const IR=Ue(e=>{const t=E.useTheme(),[r,n]=D.useState("dark-plus"),o=t.palette.mode==="dark"?"dark-plus":"light-plus";async function s(a){var c,u;a.languages.register({id:"wandelscript"}),a.languages.setLanguageConfiguration("wandelscript",{comments:{lineComment:"#"},brackets:[["(",")"],["[","]"]],autoClosingPairs:[{open:"[",close:"]"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"}]});const{shiki:i,shikiToMonaco:l}=await ER();l(i,a),a.editor.defineTheme(o,((u=(c=t.componentsExt)==null?void 0:c.WandelscriptEditor)==null?void 0:u.monacoTheme)??{base:t.palette.mode==="dark"?"vs-dark":"vs",inherit:!0,rules:[],colors:{}}),e.monacoSetup&&e.monacoSetup(a),n(o)}return g.jsx(D.Suspense,{fallback:g.jsx(Ul,{}),children:g.jsx(TR,{value:e.code,onMount:(a,i)=>{s(i)},onChange:e.onChange,defaultLanguage:"wandelscript",theme:r,options:{minimap:{enabled:!1},wordWrap:"on",automaticLayout:!0,...e.monacoOptions}})})});function Uf(){var t,r,n,o,s,a,i;const e=E.createTheme({palette:{mode:"dark",text:{primary:"rgba(255, 255, 255, 1)",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.38)"},primary:{main:"rgba(142, 86, 252, 1)",dark:"rgba(136, 58, 255, 1)",light:"rgba(157, 131, 246, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},secondary:{main:"rgba(255, 255, 255, 1)",dark:"rgba(255, 255, 255, 0.06)",contrastText:"rgba(255, 255, 255, 0.87)"},tertiary:{main:"rgba(100, 255, 218, 1)",dark:"rgba(38, 166, 154, 1)",light:"rgba(167, 255, 235, 1)",contrastText:"rgba(0, 0, 0, 1)"},error:{main:"rgba(239, 83, 80, 1)",dark:"rgba(229, 57, 53, 1)",light:"rgba(239, 154, 154, 1)",contrastText:"rgba(255, 255, 255, 1)"},warning:{main:"rgba(255, 171, 64, 1)",dark:"rgba(255, 145, 0, 1)",light:"rgba(255, 209, 128, 1)",contrastText:"rgba(0, 0, 0, 0.87)"},success:{main:"rgba(38, 166, 154, 1)",dark:"rgba(0, 121, 107, 1)",light:"rgba(128, 203, 196, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},background:{default:"rgba(2, 6, 23, 1)",paper:"rgba(17, 19, 31, 1)"},action:{active:"rgba(255, 255, 255, 0.56)",hover:"rgba(255, 255, 255, 0.08)",selected:"rgba(255, 255, 255, 0.16)",disabledBackground:"rgba(255, 255, 255, 0.12)",focus:"rgba(255, 255, 255, 0.12)",disabled:"rgba(255, 255, 255, 0.38)"},common:{white:"rgba(255, 255, 255, 1)",black:"rgba(0, 0, 0, 1)"},divider:"rgba(255, 255, 255, 0.12)",backgroundPaperElevation:{0:"rgba(17,19,31,1.0)",1:"rgba(20,22,35,1.0)",2:"rgba(23,25,39,1.0)",3:"rgba(26,28,43,1.0)",4:"rgba(29,31,47,1.0)",5:"rgba(32,34,51,1.0)",6:"rgba(35,37,55,1.0)",7:"rgba(38,40,59,1.0)",8:"rgba(41,43,63,1.0)",9:"rgba(44,46,67,1.0)",10:"rgba(47,49,71,1.0)",11:"rgba(50,52,75,1.0)",12:"rgba(53,55,79,1.0)",13:"rgba(56,58,83,1.0)",14:"rgba(59,61,87,1.0)",15:"rgba(62,64,91,1.0)",16:"rgba(57,63,87,1.0)"}},paletteExt:{primary:{hover:"rgba(142, 86, 252, 0.08)",selected:"rgba(142, 86, 252, 0.16)",focus:"rgba(142, 86, 252, 0.12)",focusVisible:"rgba(142, 86, 252, 0.3)",outlineBorder:"rgba(142, 86, 252, 0.5)"},secondary:{tonal:"rgba(255,255,255,0.1)"}}});return{...e,components:{MuiCssBaseline:{styleOverrides:{"html, body, *":{scrollbarWidth:"none",msOverflowStyle:"none"},"html:hover, body:hover, *:hover":{scrollbarWidth:"thin",scrollbarColor:`${e.palette.divider} transparent`},".MuiDataGrid-panelContent":{borderRadius:"16px !important","& .MuiPaper-root":{borderRadius:"16px !important"}},".MuiDataGrid-filterForm":{borderRadius:"16px !important","& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}},"& .MuiTextField-root":{"& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}}}},".MuiDataGrid-filterFormValueInput":{"& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}}}}},MuiDataGrid:{styleOverrides:{root:{},panelContent:{borderRadius:"16px !important"},filterForm:{"& .MuiInputBase-root":{borderRadius:"10px !important","& fieldset":{borderRadius:"10px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"10px !important"}}},filterFormValueInput:{"& .MuiInputBase-root":{borderRadius:"10px !important","& fieldset":{borderRadius:"10px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"10px !important"}}}}},MuiButton:{styleOverrides:{root:{textTransform:"none",borderRadius:"10px"}},variants:[{props:{color:"secondary",variant:"contained"},style:{border:`1px solid ${e.palette.divider}`,background:(n=(r=(t=e.paletteExt)==null?void 0:t.secondary)==null?void 0:r.tonal)==null?void 0:n.toString()}},{props:{color:"secondary",variant:"outlined"},style:{border:`1px solid ${e.palette.divider}`}}]},MuiTab:{styleOverrides:{root:{textTransform:"none",color:e.palette.text.secondary,"&.Mui-selected":{color:e.palette.text.primary}}}},MuiTabs:{styleOverrides:{root:{background:(o=e.palette.backgroundPaperElevation)==null?void 0:o[1]}}},MuiToggleButtonGroup:{styleOverrides:{root:{".MuiToggleButtonGroup-firstButton":{borderRadius:"10px 0 0 10px"},".MuiToggleButtonGroup-lastButton":{borderRadius:"0 10px 10px 0"}}}},MuiToggleButton:{styleOverrides:{root:{textTransform:"none",padding:"6px 16px"}}},MuiSelect:{variants:[{props:{variant:"filled"},style:{borderRadius:"10px","::before, ::after":{visibility:"collapse"},".MuiInputBase-input":{padding:"6px 16px",borderRadius:"10px"}}}]},MuiDrawer:{styleOverrides:{paper:{border:"none",boxShadow:"4px 0 8px -4px rgba(0, 0, 0, 0.3)"}}},MuiFab:{styleOverrides:{root:{background:(a=(s=e.paletteExt)==null?void 0:s.secondary)==null?void 0:a.tonal}},variants:[{props:{color:"primary"},style:{background:e.palette.primary.main}}]}},componentsExt:{JoggingPanel:{JoggingCartesian:{Axis:{X:{backgroundColor:"rgba(215, 66, 56, 1)",borderColor:"rgba(215, 66, 56, 1)",buttonBackgroundColor:{default:"rgba(241, 77, 66, 1)",pressed:"rgba(138, 41, 35, 1)",hovered:"rgba(241, 77, 66, 1)",disabled:"rgba(241, 77, 66, 1)"},color:"rgba(255, 198, 198, 1)",labelColor:e.palette.text.primary},Y:{backgroundColor:"rgba(20, 151, 108, 1)",borderColor:"rgba(20, 151, 108, 1)",buttonBackgroundColor:{default:"rgba(28, 188, 135, 1)",pressed:"rgba(11, 89, 63, 1)",disabled:"rgba(28, 188, 135, 1)",hovered:"rgba(28, 188, 135, 1)"},color:"rgba(215, 255, 242, 1)",labelColor:e.palette.text.primary},Z:{backgroundColor:"rgba(1, 87, 155, 1)",borderColor:"rgba(1, 87, 155, 1)",buttonBackgroundColor:{default:"rgba(2, 136, 209, 1)",pressed:"rgba(2, 64, 114, 1)",disabled:"rgba(2, 136, 209, 1)",hovered:"rgba(2, 136, 209, 1)"},color:"rgba(210, 239, 255, 1)",labelColor:e.palette.text.primary}}},JoggingJoint:{Joint:{arrowColor:e.palette.text.primary}},VelocitySlider:{sliderLegendColor:e.palette.text.primary}},WandelscriptEditor:{monacoTheme:{base:"vs-dark",inherit:!0,rules:[{token:"keyword",foreground:"#b349a9ff"}],colors:{"editor.background":E.rgbToHex(((i=e.palette.backgroundPaperElevation)==null?void 0:i[5])??""),"editor.foreground":"#d4d4d4","editorLineNumber.foreground":"#797979","editorLineNumber.activeForeground":"#e9e9e9","editor.lineHighlightBorder":"#e9e9e911"}}}}}}function AR(){const e=Uf();return e.palette.mode="light",e}function PR(e){var n,o,s,a;let t=!0;((n=e.palette)==null?void 0:n.mode)==="light"?t=!1:((o=e.palette)==null?void 0:o.mode)!=="dark"&&(t=!(typeof window<"u"&&((a=(s=window.matchMedia)==null?void 0:s.call(window,"(prefers-color-scheme: light)"))==null?void 0:a.matches)));const r=t?Uf():AR();return rh(r,e)}exports.AppHeader=mm;exports.CollisionSceneRenderer=am;exports.CycleTimer=_C;exports.JoggingCartesianAxisControl=xi;exports.JoggingJointRotationControl=Pp;exports.JoggingPanel=xP;exports.JoggingStore=da;exports.LoadingCover=Ul;exports.LoadingErrorMessage=rf;exports.LogPanel=IP;exports.LogStore=Af;exports.LogViewer=Pf;exports.MANUFACTURER_HOME_CONFIGS=ki;exports.NoMotionGroupModal=PP;exports.PoseCartesianValues=vP;exports.PoseJointValues=CP;exports.PresetEnvironment=ri;exports.ProgramControl=RP;exports.ProgramState=dt;exports.ProgramStateIndicator=_i;exports.Robot=kf;exports.RobotCard=NP;exports.RobotListItem=qP;exports.RobotSetupReadinessIndicator=jf;exports.RobotSetupReadinessState=Hl;exports.SafetyBar=bR;exports.SafetyZonesRenderer=cm;exports.SelectableFab=SR;exports.SupportedRobot=_f;exports.TabBar=wR;exports.Timer=BC;exports.TrajectoryRenderer=um;exports.ValueInterpolator=Al;exports.VelocitySlider=Tf;exports.VelocitySliderLabel=zl;exports.WandelbotsDataGrid=Op;exports.WandelscriptEditor=IR;exports.createDebugMessage=wP;exports.createErrorMessage=EP;exports.createInfoMessage=OP;exports.createLogMessage=po;exports.createNovaMuiTheme=PR;exports.createWarningMessage=TP;exports.defaultAxisConfig=WP;exports.defaultGetModel=Gl;exports.extractManufacturer=Df;exports.getDefaultHomeConfig=JP;exports.i18n=Di;exports.useAnimationFrame=ea;exports.useAutorun=Tp;exports.useInterpolation=Pl;exports.useMounted=Zs;exports.useReaction=Ep;
|
|
153
153
|
//# sourceMappingURL=index.cjs.map
|