@wandelbots/wandelbots-js-react-components 3.2.0-pr.feat-upgrade-deps.415.b75d733 → 3.2.0-pr.feat-improve-exports.414.f74e11f

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +40 -2
  2. package/dist/3d.cjs.js +1 -1
  3. package/dist/3d.es.js +1 -1
  4. package/dist/{LoadingCover-r2yhJZF9.cjs → LoadingCover-CbvPNfkO.cjs} +2 -2
  5. package/dist/{LoadingCover-r2yhJZF9.cjs.map → LoadingCover-CbvPNfkO.cjs.map} +1 -1
  6. package/dist/{LoadingCover-Dr9hDTku.js → LoadingCover-DkXwZXg8.js} +2 -2
  7. package/dist/{LoadingCover-Dr9hDTku.js.map → LoadingCover-DkXwZXg8.js.map} +1 -1
  8. package/dist/{WandelscriptEditor-Dj7TBCkF.cjs → WandelscriptEditor-DepOICD0.cjs} +2 -2
  9. package/dist/{WandelscriptEditor-Dj7TBCkF.cjs.map → WandelscriptEditor-DepOICD0.cjs.map} +1 -1
  10. package/dist/{WandelscriptEditor-DnJvITTA.js → WandelscriptEditor-DomKLwOz.js} +3 -3
  11. package/dist/{WandelscriptEditor-DnJvITTA.js.map → WandelscriptEditor-DomKLwOz.js.map} +1 -1
  12. package/dist/{auth0-spa-js.production.esm-9WdmjTxR.js → auth0-spa-js.production.esm-Bb4L9JDU.js} +446 -452
  13. package/dist/auth0-spa-js.production.esm-Bb4L9JDU.js.map +1 -0
  14. package/dist/auth0-spa-js.production.esm-CEI5Uihg.cjs +5 -0
  15. package/dist/auth0-spa-js.production.esm-CEI5Uihg.cjs.map +1 -0
  16. package/dist/core.cjs.js +1 -1
  17. package/dist/core.es.js +4 -4
  18. package/dist/{index-CqMZL0FV.cjs → index-BHtHALJk.cjs} +2 -2
  19. package/dist/index-BHtHALJk.cjs.map +1 -0
  20. package/dist/{index-CAib4NKw.js → index-BSgNMmxG.js} +534 -532
  21. package/dist/index-BSgNMmxG.js.map +1 -0
  22. package/dist/index-DS_xdVel.cjs +29 -0
  23. package/dist/index-DS_xdVel.cjs.map +1 -0
  24. package/dist/{index-CxasuX80.js → index-obAnXT9_.js} +123 -2
  25. package/dist/index-obAnXT9_.js.map +1 -0
  26. package/dist/index.cjs.js +1 -1
  27. package/dist/index.es.js +6 -6
  28. package/dist/{manufacturerHomePositions-CgaG5vaK.js → manufacturerHomePositions-4m2Kt5Pk.js} +3 -3
  29. package/dist/{manufacturerHomePositions-CgaG5vaK.js.map → manufacturerHomePositions-4m2Kt5Pk.js.map} +1 -1
  30. package/dist/{manufacturerHomePositions-Ca80ycLi.cjs → manufacturerHomePositions-AGIQC0U_.cjs} +2 -2
  31. package/dist/{manufacturerHomePositions-Ca80ycLi.cjs.map → manufacturerHomePositions-AGIQC0U_.cjs.map} +1 -1
  32. package/dist/{theming-BWOmVwDm.js → theming-CO0a0eRg.js} +6908 -8569
  33. package/dist/theming-CO0a0eRg.js.map +1 -0
  34. package/dist/theming-ZJr8jTwS.cjs +128 -0
  35. package/dist/theming-ZJr8jTwS.cjs.map +1 -0
  36. package/dist/wandelscript.cjs.js +1 -1
  37. package/dist/wandelscript.es.js +1 -1
  38. package/package.json +1 -1
  39. package/dist/auth0-spa-js.production.esm-9WdmjTxR.js.map +0 -1
  40. package/dist/auth0-spa-js.production.esm-BcLLh1tx.cjs +0 -5
  41. package/dist/auth0-spa-js.production.esm-BcLLh1tx.cjs.map +0 -1
  42. package/dist/index-CAib4NKw.js.map +0 -1
  43. package/dist/index-CqMZL0FV.cjs.map +0 -1
  44. package/dist/index-CxasuX80.js.map +0 -1
  45. package/dist/index-DxwppshT.cjs +0 -29
  46. package/dist/index-DxwppshT.cjs.map +0 -1
  47. package/dist/theming-BWOmVwDm.js.map +0 -1
  48. package/dist/theming-hsf8KjGm.cjs +0 -133
  49. package/dist/theming-hsf8KjGm.cjs.map +0 -1
@@ -0,0 +1,128 @@
1
+ "use strict";const g=require("./index-DS_xdVel.cjs"),R=require("@mui/material"),ie=require("mobx-react-lite"),$=require("react"),he=require("react-i18next"),x=require("prop-types"),ue=require("./index-BHtHALJk.cjs"),qe=require("@mui/x-data-grid"),Oc=require("lodash-es"),de=require("mobx"),Ee=require("@wandelbots/nova-js"),Pc=require("./LoadingCover-CbvPNfkO.cjs"),wr=require("@mui/icons-material"),ch=require("@emotion/styled"),uh=require("@emotion/react"),dh=require("@mui/x-charts"),Vo=require("three");function Dc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const k=Dc($),pa=Dc(Vo);function hh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}/*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABLITY OR NON-INFRINGEMENT.
11
+
12
+ See the Apache Version 2.0 License for specific language governing permissions
13
+ and limitations under the License.
14
+ ***************************************************************************** */var Go=function(e,t){return Go=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},Go(e,t)};function $c(e,t){Go(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function fh(e){var t=typeof Symbol=="function"&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function ph(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}function mh(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(ph(arguments[t]));return e}var Nc=function(){function e(t,n){this.target=n,this.type=t}return e}(),gh=function(e){$c(t,e);function t(n,r){var i=e.call(this,"error",r)||this;return i.message=n.message,i.error=n,i}return t}(Nc),yh=function(e){$c(t,e);function t(n,r,i){n===void 0&&(n=1e3),r===void 0&&(r="");var o=e.call(this,"close",i)||this;return o.wasClean=!0,o.code=n,o.reason=r,o}return t}(Nc);/*!
15
+ * Reconnecting WebSocket
16
+ * by Pedro Ladaria <pedro.ladaria@gmail.com>
17
+ * https://github.com/pladaria/reconnecting-websocket
18
+ * License MIT
19
+ */var xh=function(){if(typeof WebSocket<"u")return WebSocket},bh=function(e){return typeof e<"u"&&!!e&&e.CLOSING===2},Lt={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},vh=function(){function e(t,n,r){var i=this;r===void 0&&(r={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(o){i._debug("open event");var s=i._options.minUptime,a=s===void 0?Lt.minUptime:s;clearTimeout(i._connectTimeout),i._uptimeTimeout=setTimeout(function(){return i._acceptOpen()},a),i._ws.binaryType=i._binaryType,i._messageQueue.forEach(function(c){return i._ws.send(c)}),i._messageQueue=[],i.onopen&&i.onopen(o),i._listeners.open.forEach(function(c){return i._callEventListener(o,c)})},this._handleMessage=function(o){i._debug("message event"),i.onmessage&&i.onmessage(o),i._listeners.message.forEach(function(s){return i._callEventListener(o,s)})},this._handleError=function(o){i._debug("error event",o.message),i._disconnect(void 0,o.message==="TIMEOUT"?"timeout":void 0),i.onerror&&i.onerror(o),i._debug("exec error listeners"),i._listeners.error.forEach(function(s){return i._callEventListener(o,s)}),i._connect()},this._handleClose=function(o){i._debug("close event"),i._clearTimeouts(),i._shouldReconnect&&i._connect(),i.onclose&&i.onclose(o),i._listeners.close.forEach(function(s){return i._callEventListener(o,s)})},this._url=t,this._protocols=n,this._options=r,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(n,r){return typeof r=="string"?n+=r.length:r instanceof Blob?n+=r.size:n+=r.byteLength,n},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,n){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,n)},e.prototype.reconnect=function(t,n){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(t,n),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 n=this._options.maxEnqueuedMessages,r=n===void 0?Lt.maxEnqueuedMessages:n;this._messageQueue.length<r&&(this._debug("enqueue",t),this._messageQueue.push(t))}},e.prototype.addEventListener=function(t,n){this._listeners[t]&&this._listeners[t].push(n)},e.prototype.dispatchEvent=function(t){var n,r,i=this._listeners[t.type];if(i)try{for(var o=fh(i),s=o.next();!s.done;s=o.next()){var a=s.value;this._callEventListener(t,a)}}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!0},e.prototype.removeEventListener=function(t,n){this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(function(r){return r!==n}))},e.prototype._debug=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this._options.debug&&console.log.apply(console,mh(["RWS>"],t))},e.prototype._getNextDelay=function(){var t=this._options,n=t.reconnectionDelayGrowFactor,r=n===void 0?Lt.reconnectionDelayGrowFactor:n,i=t.minReconnectionDelay,o=i===void 0?Lt.minReconnectionDelay:i,s=t.maxReconnectionDelay,a=s===void 0?Lt.maxReconnectionDelay:s,c=0;return this._retryCount>0&&(c=o*Math.pow(r,this._retryCount-1),c>a&&(c=a)),this._debug("next delay",c),c},e.prototype._wait=function(){var t=this;return new Promise(function(n){setTimeout(n,t._getNextDelay())})},e.prototype._getNextUrl=function(t){if(typeof t=="string")return Promise.resolve(t);if(typeof t=="function"){var n=t();if(typeof n=="string")return Promise.resolve(n);if(n.then)return n}throw Error("Invalid URL")},e.prototype._connect=function(){var t=this;if(!(this._connectLock||!this._shouldReconnect)){this._connectLock=!0;var n=this._options,r=n.maxRetries,i=r===void 0?Lt.maxRetries:r,o=n.connectionTimeout,s=o===void 0?Lt.connectionTimeout:o,a=n.WebSocket,c=a===void 0?xh():a;if(this._retryCount>=i){this._debug("max retries reached",this._retryCount,">=",i);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!bh(c))throw Error("No valid WebSocket class provided");this._wait().then(function(){return t._getNextUrl(t._url)}).then(function(l){t._closeCalled||(t._debug("connect",{url:l,protocols:t._protocols}),t._ws=t._protocols?new c(l,t._protocols):new c(l),t._ws.binaryType=t._binaryType,t._connectLock=!1,t._addListeners(),t._connectTimeout=setTimeout(function(){return t._handleTimeout()},s))})}},e.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new gh(Error("TIMEOUT"),this))},e.prototype._disconnect=function(t,n){if(t===void 0&&(t=1e3),this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(t,n),this._handleClose(new yh(t,n,this))}catch{}}},e.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},e.prototype._callEventListener=function(t,n){"handleEvent"in n?n.handleEvent(t):n(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}(),Sh=class extends vh{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",r=>{this.receivedFirstMessage||(this.receivedFirstMessage=r)}),this.addEventListener("close",()=>{console.log(`Websocket to ${this.url} closed`)});const n=this.reconnect;this.reconnect=()=>{this.opts.mock?this.opts.mock.handleWebsocketConnection(this):n.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 n=i=>{this.receivedFirstMessage=i,this.removeEventListener("message",n),this.removeEventListener("error",r),e(i)},r=i=>{this.removeEventListener("message",n),this.removeEventListener("error",r),t(i)};this.addEventListener("message",n),this.addEventListener("error",r)})}async nextMessage(){return new Promise((e,t)=>{const n=i=>{this.removeEventListener("message",n),this.removeEventListener("error",r),e(i)},r=i=>{this.removeEventListener("message",n),this.removeEventListener("error",r),t(i)};this.addEventListener("message",n),this.addEventListener("error",r)})}},Eh=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 lo=new Eh,yn="wandelbots.io",co={dev:{domain:`https://auth.portal.dev.${yn}`,clientId:"fLbJD0RLp5r2Dpucm5j8BjwMR6Hunfha"},stg:{domain:`https://auth.portal.stg.${yn}`,clientId:"joVDeD9e786WzFNSGCqoVq7HNkWt5j6s"},prod:{domain:`https://auth.portal.${yn}`,clientId:"J7WJUi38xVQdJAEBNRT9Xw1b0fXDb4J2"}},wh=e=>{if(e.endsWith(`dev.${yn}`))return co.dev;if(e.endsWith(`stg.${yn}`))return co.stg;if(e.endsWith(yn))return co.prod;throw new Error("Unsupported instance URL. Cannot determine Auth0 configuration.")},Th=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=wh(e);if(new URL(e).origin===window.location.origin)throw window.location.reload(),new Error("Failed to reload page to get auth details, please refresh manually");const{Auth0Client:n}=await Promise.resolve().then(()=>require("./auth0-spa-js.production.esm-CEI5Uihg.cjs")),r=new n({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:i}=await r.handleRedirectCallback();window.history.replaceState({},document.title,(i==null?void 0:i.returnTo)||window.location.pathname)}else await r.loginWithRedirect();return await r.getTokenSilently()};function Ch(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 n=e.shift();e[0]=n+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r<e.length;r++){var i=e[r];if(typeof i!="string")throw new TypeError("Url must be a string. Received "+i);i!==""&&(r>0&&(i=i.replace(/^[\/]+/,"")),r<e.length-1?i=i.replace(/[\/]+$/,""):i=i.replace(/[\/]+$/,"/"),t.push(i))}var o=t.join("/");o=o.replace(/\/(\?|&|#[^!])/g,"$1");var s=o.split("?");return o=s.shift()+(s.length>0?"?":"")+s.join("&"),o}function uo(){var e;return typeof arguments[0]=="object"?e=arguments[0]:e=[].slice.call(arguments),Ch(e)}var Ve={},ma;function _h(){if(ma)return Ve;ma=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.PathError=Ve.TokenData=void 0,Ve.parse=l,Ve.compile=u,Ve.match=f,Ve.pathToRegexp=m,Ve.stringify=T;const e="/",t=E=>E,n=/^[$_\p{ID_Start}]$/u,r=/^[$\u200c\u200d\p{ID_Continue}]$/u,i={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function o(E){return E.replace(/[{}()\[\]+?!:*\\]/g,"\\$&")}function s(E){return E.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class a{constructor(j,O){this.tokens=j,this.originalPath=O}}Ve.TokenData=a;class c extends TypeError{constructor(j,O){let y=j;O&&(y+=`: ${O}`),y+="; visit https://git.new/pathToRegexpError for info",super(y),this.originalPath=O}}Ve.PathError=c;function l(E,j={}){const{encodePath:O=t}=j,y=[...E],_=[];let A=0,I=0;function P(){let B="";if(n.test(y[A]))do B+=y[A++];while(r.test(y[A]));else if(y[A]==='"'){let W=A;for(;A++<y.length;){if(y[A]==='"'){A++,W=0;break}y[A]==="\\"&&A++,B+=y[A]}if(W)throw new c(`Unterminated quote at index ${W}`,E)}if(!B)throw new c(`Missing parameter name at index ${A}`,E);return B}for(;A<y.length;){const B=y[A],W=i[B];W?_.push({type:W,index:A++,value:B}):B==="\\"?_.push({type:"escape",index:A++,value:y[A++]}):B===":"?_.push({type:"param",index:A++,value:P()}):B==="*"?_.push({type:"wildcard",index:A++,value:P()}):_.push({type:"char",index:A++,value:B})}_.push({type:"end",index:A,value:""});function U(B){const W=[];for(;;){const F=_[I++];if(F.type===B)break;if(F.type==="char"||F.type==="escape"){let H=F.value,ne=_[I];for(;ne.type==="char"||ne.type==="escape";)H+=ne.value,ne=_[++I];W.push({type:"text",value:O(H)});continue}if(F.type==="param"||F.type==="wildcard"){W.push({type:F.type,name:F.value});continue}if(F.type==="{"){W.push({type:"group",tokens:U("}")});continue}throw new c(`Unexpected ${F.type} at index ${F.index}, expected ${B}`,E)}return W}return new a(U("end"),E)}function u(E,j={}){const{encode:O=encodeURIComponent,delimiter:y=e}=j,_=typeof E=="object"?E:l(E,j),A=d(_.tokens,y,O);return function(P={}){const[U,...B]=A(P);if(B.length)throw new TypeError(`Missing parameters: ${B.join(", ")}`);return U}}function d(E,j,O){const y=E.map(_=>h(_,j,O));return _=>{const A=[""];for(const I of y){const[P,...U]=I(_);A[0]+=P,A.push(...U)}return A}}function h(E,j,O){if(E.type==="text")return()=>[E.value];if(E.type==="group"){const _=d(E.tokens,j,O);return A=>{const[I,...P]=_(A);return P.length?[""]:[I]}}const y=O||t;return E.type==="wildcard"&&O!==!1?_=>{const A=_[E.name];if(A==null)return["",E.name];if(!Array.isArray(A)||A.length===0)throw new TypeError(`Expected "${E.name}" to be a non-empty array`);return[A.map((I,P)=>{if(typeof I!="string")throw new TypeError(`Expected "${E.name}/${P}" to be a string`);return y(I)}).join(j)]}:_=>{const A=_[E.name];if(A==null)return["",E.name];if(typeof A!="string")throw new TypeError(`Expected "${E.name}" to be a string`);return[y(A)]}}function f(E,j={}){const{decode:O=decodeURIComponent,delimiter:y=e}=j,{regexp:_,keys:A}=m(E,j),I=A.map(P=>O===!1?t:P.type==="param"?O:U=>U.split(y).map(O));return function(U){const B=_.exec(U);if(!B)return!1;const W=B[0],F=Object.create(null);for(let H=1;H<B.length;H++){if(B[H]===void 0)continue;const ne=A[H-1],Z=I[H-1];F[ne.name]=Z(B[H])}return{path:W,params:F}}}function m(E,j={}){const{delimiter:O=e,end:y=!0,sensitive:_=!1,trailing:A=!0}=j,I=[],P=_?"":"i",U=[];for(const F of p(E,[])){const H=typeof F=="object"?F:l(F,j);for(const ne of b(H.tokens,0,[]))U.push(v(ne,O,I,H.originalPath))}let B=`^(?:${U.join("|")})`;return A&&(B+=`(?:${s(O)}$)?`),B+=y?"$":`(?=${s(O)}|$)`,{regexp:new RegExp(B,P),keys:I}}function p(E,j){if(Array.isArray(E))for(const O of E)p(O,j);else j.push(E);return j}function*b(E,j,O){if(j===E.length)return yield O;const y=E[j];if(y.type==="group")for(const _ of b(y.tokens,0,O.slice()))yield*b(E,j+1,_);else O.push(y);yield*b(E,j+1,O)}function v(E,j,O,y){let _="",A="",I=!0;for(const P of E){if(P.type==="text"){_+=s(P.value),A+=P.value,I||(I=P.value.includes(j));continue}if(P.type==="param"||P.type==="wildcard"){if(!I&&!A)throw new c(`Missing text before "${P.name}" ${P.type}`,y);P.type==="param"?_+=`(${M(j,I?"":A)}+)`:_+="([\\s\\S]+)",O.push(P),A="",I=!1;continue}}return _}function M(E,j){return j.length<2?E.length<2?`[^${s(E+j)}]`:`(?:(?!${s(E)})[^${s(j)}])`:E.length<2?`(?:(?!${s(j)})[^${s(E)}])`:`(?:(?!${s(j)}|${s(E)})[\\s\\S])`}function S(E){let j="",O=0;function y(_){return C(_)&&w(E[O])?_:JSON.stringify(_)}for(;O<E.length;){const _=E[O++];if(_.type==="text"){j+=o(_.value);continue}if(_.type==="group"){j+=`{${S(_.tokens)}}`;continue}if(_.type==="param"){j+=`:${y(_.name)}`;continue}if(_.type==="wildcard"){j+=`*${y(_.name)}`;continue}throw new TypeError(`Unknown token type: ${_.type}`)}return j}function T(E){return S(E.tokens)}function C(E){const[j,...O]=E;return n.test(j)&&O.every(y=>r.test(y))}function w(E){return E&&E.type==="text"?!r.test(E.value[0]):!0}return Ve}var Rh=_h(),Mh=class{constructor(e,t){this.cellId=e,this.opts=t,this.system=this.withUnwrappedResponsesOnly(ue.SystemApi),this.cell=this.withUnwrappedResponsesOnly(ue.CellApi),this.motionGroup=this.withCellId(ue.MotionGroupApi),this.motionGroupModels=this.withCellId(ue.MotionGroupModelsApi),this.controller=this.withCellId(ue.ControllerApi),this.controllerIOs=this.withCellId(ue.ControllerInputsOutputsApi),this.trajectoryPlanning=this.withCellId(ue.TrajectoryPlanningApi),this.trajectoryExecution=this.withCellId(ue.TrajectoryExecutionApi),this.trajectoryCaching=this.withCellId(ue.TrajectoryCachingApi),this.application=this.withCellId(ue.ApplicationApi),this.applicationGlobal=this.withUnwrappedResponsesOnly(ue.ApplicationApi),this.jogging=this.withCellId(ue.JoggingApi),this.kinematics=this.withCellId(ue.KinematicsApi),this.busInputsOutputs=this.withCellId(ue.BUSInputsOutputsApi),this.virtualController=this.withCellId(ue.VirtualControllerApi),this.virtualControllerBehavior=this.withCellId(ue.VirtualControllerBehaviorApi),this.virtualControllerIOs=this.withCellId(ue.VirtualControllerInputsOutputsApi),this.storeObject=this.withCellId(ue.StoreObjectApi),this.storeCollisionComponents=this.withCellId(ue.StoreCollisionComponentsApi),this.storeCollisionSetups=this.withCellId(ue.StoreCollisionSetupsApi)}withCellId(e){const t=new e({...this.opts,isJsonMime:n=>n==="application/json"},this.opts.basePath??"",this.opts.axiosInstance??g.axios.create());for(const n of Reflect.ownKeys(Reflect.getPrototypeOf(t)))if(n!=="constructor"&&typeof t[n]=="function"){const r=t[n];t[n]=(...i)=>r.apply(t,[this.cellId,...i]).then(o=>o.data)}return t}withUnwrappedResponsesOnly(e){const t=new e({...this.opts,isJsonMime:n=>n==="application/json"},this.opts.basePath??"",this.opts.axiosInstance??g.axios.create());for(const n of Reflect.ownKeys(Reflect.getPrototypeOf(t)))if(n!=="constructor"&&typeof t[n]=="function"){const r=t[n];t[n]=(...i)=>r.apply(t,i).then(o=>o.data)}return t}},jh=class{constructor(){this.connections=[]}async handleAPIRequest(e){var i,o,s;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"}]}}],n=((i=e.method)==null?void 0:i.toUpperCase())||"GET",r=`/cells${(s=(o=e.url)==null?void 0:o.split("/cells")[1])==null?void 0:s.split("?")[0]}`;for(const a of t){const c=Rh.match(a.path)(r||"");if(n===a.method&&c){const l=a.handle();return{status:200,statusText:"Success",data:JSON.stringify(l),headers:{},config:e,request:{responseURL:e.url}}}}throw new g.AxiosError(`No mock handler matched this request: ${n} ${r}`,"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(Ih)})),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 Ih={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 kh(e){return e.startsWith("http")||(e=`http://${e}`),new URL(e).toString()}var Ah=class{constructor(e){this.authPromise=null,this.accessToken=null;const t=e.cellId??"cell";this.config={cellId:t,...e},this.accessToken=e.accessToken||lo.getString("wbjs.access_token")||null,this.config.instanceUrl==="https://mock.example.com"?this.mock=new jh:this.config.instanceUrl=kh(this.config.instanceUrl);const n=g.axios.create({baseURL:uo(this.config.instanceUrl,"/api/v2"),headers:typeof window<"u"&&window.location.origin.includes("localhost")?{}:{"X-Wandelbots-Client":"Wandelbots-Nova-JS-SDK"}});n.interceptors.request.use(async r=>(r.headers.Authorization||(this.accessToken?r.headers.Authorization=`Bearer ${this.accessToken}`:this.config.username&&this.config.password&&(r.headers.Authorization=`Basic ${btoa(`${e.username}:${e.password}`)}`)),r)),typeof window<"u"&&n.interceptors.response.use(r=>r,async r=>{var i,o;if(g.isAxiosError(r))if(((i=r.response)==null?void 0:i.status)===401)try{if(await this.renewAuthentication(),r.config)return this.accessToken?r.config.headers.Authorization=`Bearer ${this.accessToken}`:delete r.config.headers.Authorization,n.request(r.config)}catch(s){return Promise.reject(s)}else((o=r.response)==null?void 0:o.status)===503&&(await fetch(window.location.href)).status===503&&window.location.reload();return Promise.reject(r)}),this.api=new Mh(t,{...e,basePath:uo(this.config.instanceUrl,"/api/v2"),isJsonMime:r=>r==="application/json",baseOptions:{...this.mock?{adapter:r=>this.mock.handleAPIRequest(r)}:{},...e.baseOptions},axiosInstance:n})}async renewAuthentication(){if(!this.authPromise){this.authPromise=Th(this.config.instanceUrl);try{this.accessToken=await this.authPromise,this.accessToken?lo.setString("wbjs.access_token",this.accessToken):lo.delete("wbjs.access_token")}finally{this.authPromise=null}}}makeWebsocketURL(e){const t=new URL(uo(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 Sh(this.makeWebsocketURL(e),{mock:this.mock})}};function Oh(e){var o,s,a,c,l,u;const t=[((o=e.position)==null?void 0:o[0])??0,((s=e.position)==null?void 0:s[1])??0,((a=e.position)==null?void 0:a[2])??0],n=[((c=e.orientation)==null?void 0:c[0])??0,((l=e.orientation)==null?void 0:l[1])??0,((u=e.orientation)==null?void 0:u[2])??0],r=t.map(d=>d.toFixed(1)),i=n.map(d=>d.toFixed(4));return`(${r.concat(i).join(", ")})`}const Ph=e=>g.jsxRuntimeExports.jsx(R.SvgIcon,{...e,viewBox:"0 0 10 8",children:g.jsxRuntimeExports.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"})}),Dh=g.externalizeComponent(ie.observer(e=>{const{appIcon:t,appName:n,apps:r=[],onAppSelect:i,disabled:o=!1,sx:s}=e,[a,c]=$.useState(null),l=!!a,u=f=>{c(f.currentTarget)},d=()=>{c(null)},h=f=>{d(),f.onClick?f.onClick():f.href&&(window.location.href=f.href),i==null||i(f)};return g.jsxRuntimeExports.jsxs(g.jsxRuntimeExports.Fragment,{children:[g.jsxRuntimeExports.jsx(R.AppBar,{position:"static",sx:{boxShadow:"none",backgroundImage:"none","& .MuiAppBar-root":{backgroundImage:"none",backgroundColor:"transparent"},...s},children:g.jsxRuntimeExports.jsxs(R.Toolbar,{sx:{minHeight:"62px !important"},children:[g.jsxRuntimeExports.jsx(R.Box,{sx:{mr:1,display:"flex",alignItems:"center"},children:t}),g.jsxRuntimeExports.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",flexGrow:1},children:[g.jsxRuntimeExports.jsx(R.Typography,{component:"h1",sx:{fontWeight:"bold",fontSize:"1rem"},children:n}),r.length>0&&g.jsxRuntimeExports.jsx(R.IconButton,{color:"inherit","aria-label":"switch app","aria-controls":"app-menu","aria-haspopup":"true",onClick:u,disabled:o,sx:{ml:1,width:28,height:28,borderRadius:"6px",padding:0,backgroundColor:f=>R.alpha(f.palette.common.white,.1),opacity:1,"&:hover":{backgroundColor:f=>R.alpha(f.palette.common.white,.16)},"& .MuiSvgIcon-root":{fontSize:"8px",width:"8px",height:"6px"}},children:g.jsxRuntimeExports.jsx(Ph,{})})]})]})}),g.jsxRuntimeExports.jsx(R.Backdrop,{open:l,onClick:d,sx:{backdropFilter:"blur(4px)",backgroundColor:"rgba(0, 0, 0, 0.3)",zIndex:f=>f.zIndex.modal-1}}),g.jsxRuntimeExports.jsx(R.Menu,{id:"app-menu",anchorEl:a,open:l,onClose:d,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sx:{zIndex:f=>f.zIndex.modal,"& .MuiPaper-root":{minWidth:200,mt:1}},children:r.map(f=>g.jsxRuntimeExports.jsxs(R.MenuItem,{onClick:()=>h(f),children:[g.jsxRuntimeExports.jsx(R.Box,{sx:{display:"flex",alignItems:"center"},children:f.icon}),g.jsxRuntimeExports.jsx(R.Typography,{variant:"body1",sx:{ml:2},children:f.name})]},f.id))})]})}));function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L.apply(null,arguments)}function kt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function bi(e,t,n=void 0){const r={};for(const i in e){const o=e[i];let s="",a=!0;for(let c=0;c<o.length;c+=1){const l=o[c];l&&(s+=(a===!0?"":" ")+t(l),a=!1,n&&n[l]&&(s+=" "+n[l]))}r[i]=s}return r}function Lc(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Lc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Xe(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Lc(e))&&(r&&(r+=" "),r+=t);return r}function At(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}const fs="$$material";function $h(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&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 Nh={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 Lh(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var zh=/[A-Z]|^ms/g,Fh=/_EMO_([^_]+?)_([^]*?)_EMO_/g,zc=function(t){return t.charCodeAt(1)===45},ga=function(t){return t!=null&&typeof t!="boolean"},ho=Lh(function(e){return zc(e)?e:e.replace(zh,"-$&").toLowerCase()}),ya=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Fh,function(r,i,o){return It={name:i,styles:o,next:It},i})}return Nh[t]!==1&&!zc(t)&&typeof n=="number"&&n!==0?n+"px":n};function Kr(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return It={name:i.name,styles:i.styles,next:It},i.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)It={name:s.name,styles:s.styles,next:It},s=s.next;var a=o.styles+";";return a}return Bh(e,t,n)}}var c=n;return c}function Bh(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Kr(e,t,n[i])+";";else for(var o in n){var s=n[o];if(typeof s!="object"){var a=s;ga(a)&&(r+=ho(o)+":"+ya(o,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&t==null)for(var c=0;c<s.length;c++)ga(s[c])&&(r+=ho(o)+":"+ya(o,s[c])+";");else{var l=Kr(e,t,s);switch(o){case"animation":case"animationName":{r+=ho(o)+":"+l+";";break}default:r+=o+"{"+l+"}"}}}return r}var xa=/label:\s*([^\s;{]+)\s*(;|$)/g,It;function Vh(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";It=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=Kr(n,t,o);else{var s=o;i+=s[0]}for(var a=1;a<e.length;a++)if(i+=Kr(n,t,e[a]),r){var c=o;i+=c[a]}xa.lastIndex=0;for(var l="",u;(u=xa.exec(i))!==null;)l+="-"+u[1];var d=$h(i)+l;return{name:d,styles:i,next:It}}/**
20
+ * @mui/styled-engine v7.1.1
21
+ *
22
+ * @license MIT
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */function Gh(e,t){const n=ch(e,t);return process.env.NODE_ENV!=="production"?(...r)=>{const i=typeof e=="string"?`"${e}"`:"component";return r.length===0?console.error([`MUI: Seems like you called \`styled(${i})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
26
+ `)):r.some(o=>o===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),n(...r)}:n}function Uh(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const ba=[];function va(e){return ba[0]=e,Vh(ba)}var Tr={exports:{}},oe={};/**
27
+ * @license React
28
+ * react-is.production.js
29
+ *
30
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */var Sa;function Wh(){if(Sa)return oe;Sa=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),s=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),f=Symbol.for("react.client.reference");function m(p){if(typeof p=="object"&&p!==null){var b=p.$$typeof;switch(b){case e:switch(p=p.type,p){case n:case i:case r:case c:case l:case h:return p;default:switch(p=p&&p.$$typeof,p){case s:case a:case d:case u:return p;case o:return p;default:return b}}case t:return b}}}return oe.ContextConsumer=o,oe.ContextProvider=s,oe.Element=e,oe.ForwardRef=a,oe.Fragment=n,oe.Lazy=d,oe.Memo=u,oe.Portal=t,oe.Profiler=i,oe.StrictMode=r,oe.Suspense=c,oe.SuspenseList=l,oe.isContextConsumer=function(p){return m(p)===o},oe.isContextProvider=function(p){return m(p)===s},oe.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},oe.isForwardRef=function(p){return m(p)===a},oe.isFragment=function(p){return m(p)===n},oe.isLazy=function(p){return m(p)===d},oe.isMemo=function(p){return m(p)===u},oe.isPortal=function(p){return m(p)===t},oe.isProfiler=function(p){return m(p)===i},oe.isStrictMode=function(p){return m(p)===r},oe.isSuspense=function(p){return m(p)===c},oe.isSuspenseList=function(p){return m(p)===l},oe.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===n||p===i||p===r||p===c||p===l||typeof p=="object"&&p!==null&&(p.$$typeof===d||p.$$typeof===u||p.$$typeof===s||p.$$typeof===o||p.$$typeof===a||p.$$typeof===f||p.getModuleId!==void 0)},oe.typeOf=m,oe}var se={};/**
35
+ * @license React
36
+ * react-is.development.js
37
+ *
38
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
39
+ *
40
+ * This source code is licensed under the MIT license found in the
41
+ * LICENSE file in the root directory of this source tree.
42
+ */var Ea;function Hh(){return Ea||(Ea=1,process.env.NODE_ENV!=="production"&&function(){function e(p){if(typeof p=="object"&&p!==null){var b=p.$$typeof;switch(b){case t:switch(p=p.type,p){case r:case o:case i:case l:case u:case f:return p;default:switch(p=p&&p.$$typeof,p){case a:case c:case h:case d:return p;case s:return p;default:return b}}case n:return b}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");se.ContextConsumer=s,se.ContextProvider=a,se.Element=t,se.ForwardRef=c,se.Fragment=r,se.Lazy=h,se.Memo=d,se.Portal=n,se.Profiler=o,se.StrictMode=i,se.Suspense=l,se.SuspenseList=u,se.isContextConsumer=function(p){return e(p)===s},se.isContextProvider=function(p){return e(p)===a},se.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===t},se.isForwardRef=function(p){return e(p)===c},se.isFragment=function(p){return e(p)===r},se.isLazy=function(p){return e(p)===h},se.isMemo=function(p){return e(p)===d},se.isPortal=function(p){return e(p)===n},se.isProfiler=function(p){return e(p)===o},se.isStrictMode=function(p){return e(p)===i},se.isSuspense=function(p){return e(p)===l},se.isSuspenseList=function(p){return e(p)===u},se.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===r||p===o||p===i||p===l||p===u||typeof p=="object"&&p!==null&&(p.$$typeof===h||p.$$typeof===d||p.$$typeof===a||p.$$typeof===s||p.$$typeof===c||p.$$typeof===m||p.getModuleId!==void 0)},se.typeOf=e}()),se}var wa;function Yh(){return wa||(wa=1,process.env.NODE_ENV==="production"?Tr.exports=Wh():Tr.exports=Hh()),Tr.exports}var Xr=Yh();function rt(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 Fc(e){if(k.isValidElement(e)||Xr.isValidElementType(e)||!rt(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Fc(e[n])}),t}function Oe(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return rt(e)&&rt(t)&&Object.keys(t).forEach(i=>{k.isValidElement(t[i])||Xr.isValidElementType(t[i])?r[i]=t[i]:rt(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&rt(e[i])?r[i]=Oe(e[i],t[i],n):n.clone?r[i]=rt(t[i])?Fc(t[i]):t[i]:r[i]=t[i]}),r}const qh=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function Jh(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...i}=e,o=qh(t),s=Object.keys(o);function a(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n})`}function c(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-r/100}${n})`}function l(h,f){const m=s.indexOf(f);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n}) and (max-width:${(m!==-1&&typeof t[s[m]]=="number"?t[s[m]]:f)-r/100}${n})`}function u(h){return s.indexOf(h)+1<s.length?l(h,s[s.indexOf(h)+1]):a(h)}function d(h){const f=s.indexOf(h);return f===0?a(s[1]):f===s.length-1?c(s[f]):l(h,s[s.indexOf(h)+1]).replace("@media","@media not all and")}return{keys:s,values:o,up:a,down:c,between:l,only:u,not:d,unit:n,...i}}function Kh(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,i)=>{var s,a;const o=/min-width:\s*([0-9.]+)/;return+(((s=r.match(o))==null?void 0:s[1])||0)-+(((a=i.match(o))==null?void 0:a[1])||0)});return n.length?n.reduce((r,i)=>{const o=t[i];return delete r[i],r[i]=o,r},{...t}):t}function Xh(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function Zh(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){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>\`.
43
+ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:At(18,`(${t})`));return null}const[,r,i]=n,o=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(o)}function Qh(e){const t=(o,s)=>o.replace("@media",s?`@container ${s}`:"@container");function n(o,s){o.up=(...a)=>t(e.breakpoints.up(...a),s),o.down=(...a)=>t(e.breakpoints.down(...a),s),o.between=(...a)=>t(e.breakpoints.between(...a),s),o.only=(...a)=>t(e.breakpoints.only(...a),s),o.not=(...a)=>{const c=t(e.breakpoints.not(...a),s);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const r={},i=o=>(n(r,o),r);return n(i),{...e,containerQueries:i}}const ef={borderRadius:4},Dt=process.env.NODE_ENV!=="production"?x.oneOfType([x.number,x.string,x.object,x.array]):{};function Hn(e,t){return t?Oe(e,t,{clone:!1}):e}const vi={xs:0,sm:600,md:900,lg:1200,xl:1536},Ta={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${vi[e]}px)`},tf={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:vi[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Ze(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||Ta;return t.reduce((s,a,c)=>(s[o.up(o.keys[c])]=n(t[c]),s),{})}if(typeof t=="object"){const o=r.breakpoints||Ta;return Object.keys(t).reduce((s,a)=>{if(Xh(o.keys,a)){const c=Zh(r.containerQueries?r:tf,a);c&&(s[c]=n(t[a],a))}else if(Object.keys(o.values||vi).includes(a)){const c=o.up(a);s[c]=n(t[a],a)}else{const c=a;s[c]=t[c]}return s},{})}return n(t)}function Bc(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function Vc(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function nf(e,...t){const n=Bc(e),r=[n,...t].reduce((i,o)=>Oe(i,o),{});return Vc(Object.keys(n),r)}function rf(e,t){if(typeof e!="object")return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((i,o)=>{o<e.length&&(n[i]=!0)}):r.forEach(i=>{e[i]!=null&&(n[i]=!0)}),n}function fo({values:e,breakpoints:t,base:n}){const r=n||rf(e,t),i=Object.keys(r);if(i.length===0)return e;let o;return i.reduce((s,a,c)=>(Array.isArray(e)?(s[a]=e[c]!=null?e[c]:e[o],o=c):typeof e=="object"?(s[a]=e[a]!=null?e[a]:e[o],o=a):s[a]=e,s),{})}function Ae(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":At(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Si(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function Zr(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Si(e,n)||r,t&&(i=t(i,r,e)),i}function xe(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=s=>{if(s[t]==null)return null;const a=s[t],c=s.theme,l=Si(c,r)||{};return Ze(s,a,d=>{let h=Zr(l,i,d);return d===h&&typeof d=="string"&&(h=Zr(l,i,`${t}${d==="default"?"":Ae(d)}`,d)),n===!1?h:{[n]:h}})};return o.propTypes=process.env.NODE_ENV!=="production"?{[t]:Dt}:{},o.filterProps=[t],o}function of(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const sf={m:"margin",p:"padding"},af={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Ca={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},lf=of(e=>{if(e.length>2)if(Ca[e])e=Ca[e];else return[e];const[t,n]=e.split(""),r=sf[t],i=af[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),Ei=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],wi=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],cf=[...Ei,...wi];function lr(e,t,n,r){const i=Si(e,t,!0)??n;return typeof i=="number"||typeof i=="string"?o=>typeof o=="string"?o:(process.env.NODE_ENV!=="production"&&typeof o!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${o}.`),typeof i=="string"?i.startsWith("var(")&&o===0?0:i.startsWith("var(")&&o===1?i:`calc(${o} * ${i})`:i*o):Array.isArray(i)?o=>{if(typeof o=="string")return o;const s=Math.abs(o);process.env.NODE_ENV!=="production"&&(Number.isInteger(s)?s>i.length-1&&console.error([`MUI: The value provided (${s}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${s} > ${i.length-1}, you need to add the missing values.`].join(`
44
+ `)):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(`
45
+ `)));const a=i[s];return o>=0?a:typeof a=="number"?-a:typeof a=="string"&&a.startsWith("var(")?`calc(-1 * ${a})`:`-${a}`}:typeof i=="function"?i:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join(`
46
+ `)),()=>{})}function Ti(e){return lr(e,"spacing",8,"spacing")}function Ut(e,t){return typeof t=="string"||t==null?t:e(t)}function uf(e,t){return n=>e.reduce((r,i)=>(r[i]=Ut(t,n),r),{})}function df(e,t,n,r){if(!t.includes(n))return null;const i=lf(n),o=uf(i,r),s=e[n];return Ze(e,s,o)}function Gc(e,t){const n=Ti(e.theme);return Object.keys(e).map(r=>df(e,t,r,n)).reduce(Hn,{})}function ge(e){return Gc(e,Ei)}ge.propTypes=process.env.NODE_ENV!=="production"?Ei.reduce((e,t)=>(e[t]=Dt,e),{}):{};ge.filterProps=Ei;function ye(e){return Gc(e,wi)}ye.propTypes=process.env.NODE_ENV!=="production"?wi.reduce((e,t)=>(e[t]=Dt,e),{}):{};ye.filterProps=wi;process.env.NODE_ENV!=="production"&&cf.reduce((e,t)=>(e[t]=Dt,e),{});function Uc(e=8,t=Ti({spacing:e})){if(e.mui)return e;const n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(o=>{const s=t(o);return typeof s=="number"?`${s}px`:s}).join(" "));return n.mui=!0,n}function Ci(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>t[o]?Hn(i,t[o](r)):i,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((r,i)=>Object.assign(r,i.propTypes),{}):{},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Ge(e){return typeof e!="number"?e:`${e}px solid`}function Ye(e,t){return xe({prop:e,themeKey:"borders",transform:t})}const hf=Ye("border",Ge),ff=Ye("borderTop",Ge),pf=Ye("borderRight",Ge),mf=Ye("borderBottom",Ge),gf=Ye("borderLeft",Ge),yf=Ye("borderColor"),xf=Ye("borderTopColor"),bf=Ye("borderRightColor"),vf=Ye("borderBottomColor"),Sf=Ye("borderLeftColor"),Ef=Ye("outline",Ge),wf=Ye("outlineColor"),_i=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=lr(e.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:Ut(t,r)});return Ze(e,e.borderRadius,n)}return null};_i.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Dt}:{};_i.filterProps=["borderRadius"];Ci(hf,ff,pf,mf,gf,yf,xf,bf,vf,Sf,_i,Ef,wf);const Ri=e=>{if(e.gap!==void 0&&e.gap!==null){const t=lr(e.theme,"spacing",8,"gap"),n=r=>({gap:Ut(t,r)});return Ze(e,e.gap,n)}return null};Ri.propTypes=process.env.NODE_ENV!=="production"?{gap:Dt}:{};Ri.filterProps=["gap"];const Mi=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=lr(e.theme,"spacing",8,"columnGap"),n=r=>({columnGap:Ut(t,r)});return Ze(e,e.columnGap,n)}return null};Mi.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Dt}:{};Mi.filterProps=["columnGap"];const ji=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=lr(e.theme,"spacing",8,"rowGap"),n=r=>({rowGap:Ut(t,r)});return Ze(e,e.rowGap,n)}return null};ji.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Dt}:{};ji.filterProps=["rowGap"];const Tf=xe({prop:"gridColumn"}),Cf=xe({prop:"gridRow"}),_f=xe({prop:"gridAutoFlow"}),Rf=xe({prop:"gridAutoColumns"}),Mf=xe({prop:"gridAutoRows"}),jf=xe({prop:"gridTemplateColumns"}),If=xe({prop:"gridTemplateRows"}),kf=xe({prop:"gridTemplateAreas"}),Af=xe({prop:"gridArea"});Ci(Ri,Mi,ji,Tf,Cf,_f,Rf,Mf,jf,If,kf,Af);function xn(e,t){return t==="grey"?t:e}const Of=xe({prop:"color",themeKey:"palette",transform:xn}),Pf=xe({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:xn}),Df=xe({prop:"backgroundColor",themeKey:"palette",transform:xn});Ci(Of,Pf,Df);function ze(e){return e<=1&&e!==0?`${e*100}%`:e}const $f=xe({prop:"width",transform:ze}),ps=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var i,o,s,a,c;const r=((s=(o=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:o.values)==null?void 0:s[n])||vi[n];return r?((c=(a=e.theme)==null?void 0:a.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:ze(n)}};return Ze(e,e.maxWidth,t)}return null};ps.filterProps=["maxWidth"];const Nf=xe({prop:"minWidth",transform:ze}),Lf=xe({prop:"height",transform:ze}),zf=xe({prop:"maxHeight",transform:ze}),Ff=xe({prop:"minHeight",transform:ze});xe({prop:"size",cssProperty:"width",transform:ze});xe({prop:"size",cssProperty:"height",transform:ze});const Bf=xe({prop:"boxSizing"});Ci($f,ps,Nf,Lf,zf,Ff,Bf);const cr={border:{themeKey:"borders",transform:Ge},borderTop:{themeKey:"borders",transform:Ge},borderRight:{themeKey:"borders",transform:Ge},borderBottom:{themeKey:"borders",transform:Ge},borderLeft:{themeKey:"borders",transform:Ge},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ge},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:_i},color:{themeKey:"palette",transform:xn},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:xn},backgroundColor:{themeKey:"palette",transform:xn},p:{style:ye},pt:{style:ye},pr:{style:ye},pb:{style:ye},pl:{style:ye},px:{style:ye},py:{style:ye},padding:{style:ye},paddingTop:{style:ye},paddingRight:{style:ye},paddingBottom:{style:ye},paddingLeft:{style:ye},paddingX:{style:ye},paddingY:{style:ye},paddingInline:{style:ye},paddingInlineStart:{style:ye},paddingInlineEnd:{style:ye},paddingBlock:{style:ye},paddingBlockStart:{style:ye},paddingBlockEnd:{style:ye},m:{style:ge},mt:{style:ge},mr:{style:ge},mb:{style:ge},ml:{style:ge},mx:{style:ge},my:{style:ge},margin:{style:ge},marginTop:{style:ge},marginRight:{style:ge},marginBottom:{style:ge},marginLeft:{style:ge},marginX:{style:ge},marginY:{style:ge},marginInline:{style:ge},marginInlineStart:{style:ge},marginInlineEnd:{style:ge},marginBlock:{style:ge},marginBlockStart:{style:ge},marginBlockEnd:{style:ge},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:Ri},rowGap:{style:ji},columnGap:{style:Mi},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:ze},maxWidth:{style:ps},minWidth:{transform:ze},height:{transform:ze},maxHeight:{transform:ze},minHeight:{transform:ze},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 Vf(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function Gf(e,t){return typeof e=="function"?e(t):e}function Uf(){function e(n,r,i,o){const s={[n]:r,theme:i},a=o[n];if(!a)return{[n]:r};const{cssProperty:c=n,themeKey:l,transform:u,style:d}=a;if(r==null)return null;if(l==="typography"&&r==="inherit")return{[n]:r};const h=Si(i,l)||{};return d?d(s):Ze(s,r,m=>{let p=Zr(h,u,m);return m===p&&typeof m=="string"&&(p=Zr(h,u,`${n}${m==="default"?"":Ae(m)}`,m)),c===!1?p:{[c]:p}})}function t(n){const{sx:r,theme:i={}}=n||{};if(!r)return null;const o=i.unstable_sxConfig??cr;function s(a){let c=a;if(typeof a=="function")c=a(i);else if(typeof a!="object")return a;if(!c)return null;const l=Bc(i.breakpoints),u=Object.keys(l);let d=l;return Object.keys(c).forEach(h=>{const f=Gf(c[h],i);if(f!=null)if(typeof f=="object")if(o[h])d=Hn(d,e(h,f,i,o));else{const m=Ze({theme:i},f,p=>({[h]:p}));Vf(m,f)?d[h]=t({sx:f,theme:i}):d=Hn(d,m)}else d=Hn(d,e(h,f,i,o))}),Kh(i,Vc(u,d))}return Array.isArray(r)?r.map(s):s(r)}return t}const En=Uf();En.filterProps=["sx"];function Wf(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let i=n.getColorSchemeSelector(e);return i==="&"?t:((i.includes("data-")||i.includes("."))&&(i=`*:where(${i.replace(/\s*&$/,"")}) &`),{[i]:t})}return n.palette.mode===e?t:{}}function Ii(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={},...s}=e,a=Jh(n),c=Uc(i);let l=Oe({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:c,shape:{...ef,...o}},s);return l=Qh(l),l.applyStyles=Wf,l=t.reduce((u,d)=>Oe(u,d),l),l.unstable_sxConfig={...cr,...s==null?void 0:s.unstable_sxConfig},l.unstable_sx=function(d){return En({sx:d,theme:this})},l}function Hf(e){return Object.keys(e).length===0}function Yf(e=null){const t=k.useContext(uh.ThemeContext);return!t||Hf(t)?e:t}const qf=Ii();function Wc(e=qf){return Yf(e)}const Jf=e=>{var r;const t={systemProps:{},otherProps:{}},n=((r=e==null?void 0:e.theme)==null?void 0:r.unstable_sxConfig)??cr;return Object.keys(e).forEach(i=>{n[i]?t.systemProps[i]=e[i]:t.otherProps[i]=e[i]}),t};function Kf(e){const{sx:t,...n}=e,{systemProps:r,otherProps:i}=Jf(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...s)=>{const a=t(...s);return rt(a)?{...r,...a}:r}:o={...r,...t},{...i,sx:o}}const _a=e=>e,Xf=()=>{let e=_a;return{configure(t){e=t},generate(t){return e(t)},reset(){e=_a}}},Zf=Xf(),Qf={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 In(e,t,n="Mui"){const r=Qf[t];return r?`${n}-${r}`:`${Zf.generate(e)}-${t}`}function ms(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=In(e,i,n)}),r}function Hc(e,t=""){return e.displayName||e.name||t}function Ra(e,t,n){const r=Hc(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function ep(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Hc(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Xr.ForwardRef:return Ra(e,e.render,"ForwardRef");case Xr.Memo:return Ra(e,e.type,"memo");default:return}}}function Yc(e){const{variants:t,...n}=e,r={variants:t,style:va(n),isProcessed:!0};return r.style===n||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=va(i.style))}),r}const tp=Ii();function po(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function np(e){return e?(t,n)=>n[e]:null}function rp(e,t,n){e.theme=sp(e.theme)?n:e.theme[t]||e.theme}function Ur(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(r=>Ur(e,r));if(Array.isArray(n==null?void 0:n.variants)){let r;if(n.isProcessed)r=n.style;else{const{variants:i,...o}=n;r=o}return qc(e,n.variants,[r])}return n!=null&&n.isProcessed?n.style:n}function qc(e,t,n=[]){var i;let r;e:for(let o=0;o<t.length;o+=1){const s=t[o];if(typeof s.props=="function"){if(r??(r={...e,...e.ownerState,ownerState:e.ownerState}),!s.props(r))continue}else for(const a in s.props)if(e[a]!==s.props[a]&&((i=e.ownerState)==null?void 0:i[a])!==s.props[a])continue e;typeof s.style=="function"?(r??(r={...e,...e.ownerState,ownerState:e.ownerState}),n.push(s.style(r))):n.push(s.style)}return n}function Jc(e={}){const{themeId:t,defaultTheme:n=tp,rootShouldForwardProp:r=po,slotShouldForwardProp:i=po}=e;function o(a){rp(a,t,n)}return(a,c={})=>{Uh(a,C=>C.filter(w=>w!==En));const{name:l,slot:u,skipVariantsResolver:d,skipSx:h,overridesResolver:f=np(Kc(u)),...m}=c,p=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,b=h||!1;let v=po;u==="Root"||u==="root"?v=r:u?v=i:ap(a)&&(v=void 0);const M=Gh(a,{shouldForwardProp:v,label:op(l,u),...m}),S=C=>{if(C.__emotion_real===C)return C;if(typeof C=="function")return function(E){return Ur(E,C)};if(rt(C)){const w=Yc(C);return w.variants?function(j){return Ur(j,w)}:w.style}return C},T=(...C)=>{const w=[],E=C.map(S),j=[];if(w.push(o),l&&f&&j.push(function(A){var B,W;const P=(W=(B=A.theme.components)==null?void 0:B[l])==null?void 0:W.styleOverrides;if(!P)return null;const U={};for(const F in P)U[F]=Ur(A,P[F]);return f(A,U)}),l&&!p&&j.push(function(A){var U,B;const I=A.theme,P=(B=(U=I==null?void 0:I.components)==null?void 0:U[l])==null?void 0:B.variants;return P?qc(A,P):null}),b||j.push(En),Array.isArray(E[0])){const _=E.shift(),A=new Array(w.length).fill(""),I=new Array(j.length).fill("");let P;P=[...A,..._,...I],P.raw=[...A,..._.raw,...I],w.unshift(P)}const O=[...w,...E,...j],y=M(...O);return a.muiName&&(y.muiName=a.muiName),process.env.NODE_ENV!=="production"&&(y.displayName=ip(l,u,a)),y};return M.withConfig&&(T.withConfig=M.withConfig),T}}function ip(e,t,n){return e?`${e}${Ae(t||"")}`:`Styled(${ep(n)})`}function op(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${Kc(t||"Root")}`),n}function sp(e){for(const t in e)return!1;return!0}function ap(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Kc(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const lp=Jc();function Qr(e,t,n=!1){const r={...t};for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)){const o=i;if(o==="components"||o==="slots")r[o]={...e[o],...r[o]};else if(o==="componentsProps"||o==="slotProps"){const s=e[o],a=t[o];if(!a)r[o]=s||{};else if(!s)r[o]=a;else{r[o]={...a};for(const c in s)if(Object.prototype.hasOwnProperty.call(s,c)){const l=c;r[o][l]=Qr(s[l],a[l],n)}}}else o==="className"&&n&&t.className?r.className=Xe(e==null?void 0:e.className,t==null?void 0:t.className):o==="style"&&n&&t.style?r.style={...e==null?void 0:e.style,...t==null?void 0:t.style}:r[o]===void 0&&(r[o]=e[o])}return r}function cp(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Qr(t.components[n].defaultProps,r)}function Xc({props:e,name:t,defaultTheme:n,themeId:r}){let i=Wc(n);return r&&(i=i[r]||i),cp({theme:i,name:t,props:e})}const st=typeof window<"u"?k.useLayoutEffect:k.useEffect;function mn(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function gs(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),mn(e,t,n)}function up(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),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.`),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Ot(e){if(e.type)return e;if(e.charAt(0)==="#")return Ot(up(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
47
+ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:At(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(i))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${i}\` color space.
48
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:At(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const dp=e=>{const t=Ot(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},Vn=(e,t)=>{try{return dp(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function ki(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((i,o)=>o<3?parseInt(i,10):i):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function Zc(e){e=Ot(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),s=(l,u=(l+n/30)%12)=>i-o*Math.max(Math.min(u-3,9-u,1),-1);let a="rgb";const c=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(a+="a",c.push(t[3])),ki({type:a,values:c})}function Uo(e){e=Ot(e);let t=e.type==="hsl"||e.type==="hsla"?Ot(Zc(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Ma(e,t){const n=Uo(e),r=Uo(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Wo(e,t){return e=Ot(e),t=gs(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,ki(e)}function Cr(e,t,n){try{return Wo(e,t)}catch{return e}}function Kn(e,t){if(e=Ot(e),t=gs(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return ki(e)}function le(e,t,n){try{return Kn(e,t)}catch{return e}}function Xn(e,t){if(e=Ot(e),t=gs(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return ki(e)}function ce(e,t,n){try{return Xn(e,t)}catch{return e}}function hp(e,t=.15){return Uo(e)>.5?Kn(e,t):Xn(e,t)}function _r(e,t,n){try{return hp(e,t)}catch{return e}}const fp=k.createContext();process.env.NODE_ENV!=="production"&&(x.node,x.bool);const pp=()=>k.useContext(fp)??!1,mp=k.createContext(void 0);process.env.NODE_ENV!=="production"&&(x.node,x.object);function gp(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?Qr(i.defaultProps,r):!i.styleOverrides&&!i.variants?Qr(i,r):r}function yp({props:e,name:t}){const n=k.useContext(mp);return gp({props:e,name:t,theme:{components:n}})}const ja={theme:void 0};function xp(e){let t,n;return function(i){let o=t;return(o===void 0||i.theme!==n)&&(ja.theme=i.theme,o=Yc(e(ja)),t=o,n=i.theme),o}}function bp(e=""){function t(...r){if(!r.length)return"";const i=r[0];return typeof i=="string"&&!i.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}-`:""}${i}${t(...r.slice(1))})`:`, ${i}`}return(r,...i)=>`var(--${e?`${e}-`:""}${r}${t(...i)})`}const Ia=(e,t,n,r=[])=>{let i=e;t.forEach((o,s)=>{s===t.length-1?Array.isArray(i)?i[Number(o)]=n:i&&typeof i=="object"&&(i[o]=n):i&&typeof i=="object"&&(i[o]||(i[o]=r.includes(o)?[]:{}),i=i[o])})},vp=(e,t,n)=>{function r(i,o=[],s=[]){Object.entries(i).forEach(([a,c])=>{(!n||n&&!n([...o,a]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?r(c,[...o,a],Array.isArray(c)?[...s,a]:s):t([...o,a],c,s))})}r(e)},Sp=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function mo(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={},s={};return vp(e,(a,c,l)=>{if((typeof c=="string"||typeof c=="number")&&(!r||!r(a,c))){const u=`--${n?`${n}-`:""}${a.join("-")}`,d=Sp(a,c);Object.assign(i,{[u]:d}),Ia(o,a,`var(${u})`,l),Ia(s,a,`var(${u}, ${d})`,l)}},a=>a[0]==="vars"),{css:i,vars:o,varsWithDefaults:s}}function Ep(e,t={}){const{getSelector:n=b,disableCssColorScheme:r,colorSchemeSelector:i}=t,{colorSchemes:o={},components:s,defaultColorScheme:a="light",...c}=e,{vars:l,css:u,varsWithDefaults:d}=mo(c,t);let h=d;const f={},{[a]:m,...p}=o;if(Object.entries(p||{}).forEach(([S,T])=>{const{vars:C,css:w,varsWithDefaults:E}=mo(T,t);h=Oe(h,E),f[S]={css:w,vars:C}}),m){const{css:S,vars:T,varsWithDefaults:C}=mo(m,t);h=Oe(h,C),f[a]={css:S,vars:T}}function b(S,T){var w,E;let C=i;if(i==="class"&&(C=".%s"),i==="data"&&(C="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(C=`[${i}="%s"]`),S){if(C==="media")return e.defaultColorScheme===S?":root":{[`@media (prefers-color-scheme: ${((E=(w=o[S])==null?void 0:w.palette)==null?void 0:E.mode)||S})`]:{":root":T}};if(C)return e.defaultColorScheme===S?`:root, ${C.replace("%s",String(S))}`:C.replace("%s",String(S))}return":root"}return{vars:h,generateThemeVars:()=>{let S={...l};return Object.entries(f).forEach(([,{vars:T}])=>{S=Oe(S,T)}),S},generateStyleSheets:()=>{var j,O;const S=[],T=e.defaultColorScheme||"light";function C(y,_){Object.keys(_).length&&S.push(typeof y=="string"?{[y]:{..._}}:y)}C(n(void 0,{...u}),u);const{[T]:w,...E}=f;if(w){const{css:y}=w,_=(O=(j=o[T])==null?void 0:j.palette)==null?void 0:O.mode,A=!r&&_?{colorScheme:_,...y}:{...y};C(n(T,{...A}),A)}return Object.entries(E).forEach(([y,{css:_}])=>{var P,U;const A=(U=(P=o[y])==null?void 0:P.palette)==null?void 0:U.mode,I=!r&&A?{colorScheme:A,..._}:{..._};C(n(y,{...I}),I)}),S}}}function wp(e){return function(n){return e==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const Tp=Ii(),Cp=lp("div",{name:"MuiStack",slot:"Root"});function _p(e){return Xc({props:e,name:"MuiStack",defaultTheme:Tp})}function Rp(e,t){const n=k.Children.toArray(e).filter(Boolean);return n.reduce((r,i,o)=>(r.push(i),o<n.length-1&&r.push(k.cloneElement(t,{key:`separator-${o}`})),r),[])}const Mp=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],jp=({ownerState:e,theme:t})=>{let n={display:"flex",flexDirection:"column",...Ze({theme:t},fo({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r}))};if(e.spacing){const r=Ti(t),i=Object.keys(t.breakpoints.values).reduce((c,l)=>((typeof e.spacing=="object"&&e.spacing[l]!=null||typeof e.direction=="object"&&e.direction[l]!=null)&&(c[l]=!0),c),{}),o=fo({values:e.direction,base:i}),s=fo({values:e.spacing,base:i});typeof o=="object"&&Object.keys(o).forEach((c,l,u)=>{if(!o[c]){const h=l>0?o[u[l-1]]:"column";o[c]=h}}),n=Oe(n,Ze({theme:t},s,(c,l)=>e.useFlexGap?{gap:Ut(r,c)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Mp(l?o[l]:e.direction)}`]:Ut(r,c)}}))}return n=nf(t.breakpoints,n),n};function Ip(e={}){const{createStyledComponent:t=Cp,useThemeProps:n=_p,componentName:r="MuiStack"}=e,i=()=>bi({root:["root"]},c=>In(r,c),{}),o=t(jp),s=k.forwardRef(function(c,l){const u=n(c),d=Kf(u),{component:h="div",direction:f="column",spacing:m=0,divider:p,children:b,className:v,useFlexGap:M=!1,...S}=d,T={direction:f,spacing:m,useFlexGap:M},C=i();return g.jsxRuntimeExports.jsx(o,{as:h,ownerState:T,ref:l,className:Xe(C.root,v),...S,children:p?Rp(b,p):b})});return process.env.NODE_ENV!=="production"&&(s.propTypes={children:x.node,direction:x.oneOfType([x.oneOf(["column-reverse","column","row-reverse","row"]),x.arrayOf(x.oneOf(["column-reverse","column","row-reverse","row"])),x.object]),divider:x.node,spacing:x.oneOfType([x.arrayOf(x.oneOfType([x.number,x.string])),x.number,x.object,x.string]),sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object])}),s}const Zn={black:"#000",white:"#fff"},kp={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"},sn={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},an={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Dn={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},ln={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},cn={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},un={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Qc(){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 Ap=Qc();function eu(){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 ka=eu();function Aa(e,t,n,r){const i=r.light||r,o=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Xn(e.main,i):t==="dark"&&(e.dark=Kn(e.main,o)))}function Op(e="light"){return e==="dark"?{main:ln[200],light:ln[50],dark:ln[400]}:{main:ln[700],light:ln[400],dark:ln[800]}}function Pp(e="light"){return e==="dark"?{main:sn[200],light:sn[50],dark:sn[400]}:{main:sn[500],light:sn[300],dark:sn[700]}}function Dp(e="light"){return e==="dark"?{main:an[500],light:an[300],dark:an[700]}:{main:an[700],light:an[400],dark:an[800]}}function $p(e="light"){return e==="dark"?{main:cn[400],light:cn[300],dark:cn[700]}:{main:cn[700],light:cn[500],dark:cn[900]}}function Np(e="light"){return e==="dark"?{main:un[400],light:un[300],dark:un[700]}:{main:un[800],light:un[500],dark:un[900]}}function Lp(e="light"){return e==="dark"?{main:Dn[400],light:Dn[300],dark:Dn[700]}:{main:"#ed6c02",light:Dn[500],dark:Dn[900]}}function ys(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...i}=e,o=e.primary||Op(t),s=e.secondary||Pp(t),a=e.error||Dp(t),c=e.info||$p(t),l=e.success||Np(t),u=e.warning||Lp(t);function d(p){const b=Ma(p,ka.text.primary)>=n?ka.text.primary:Ap.text.primary;if(process.env.NODE_ENV!=="production"){const v=Ma(p,b);v<3&&console.error([`MUI: The contrast ratio of ${v}:1 for ${b} on ${p}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
49
+ `))}return b}const h=({color:p,name:b,mainShade:v=500,lightShade:M=300,darkShade:S=700})=>{if(p={...p},!p.main&&p[v]&&(p.main=p[v]),!p.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
50
+ The color object needs to have a \`main\` property or a \`${v}\` property.`:At(11,b?` (${b})`:"",v));if(typeof p.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
51
+ \`color.main\` should be a string, but \`${JSON.stringify(p.main)}\` was provided instead.
52
+
53
+ Did you intend to use one of the following approaches?
54
+
55
+ import { green } from "@mui/material/colors";
56
+
57
+ const theme1 = createTheme({ palette: {
58
+ primary: green,
59
+ } });
60
+
61
+ const theme2 = createTheme({ palette: {
62
+ primary: { main: green[500] },
63
+ } });`:At(12,b?` (${b})`:"",JSON.stringify(p.main)));return Aa(p,"light",M,r),Aa(p,"dark",S,r),p.contrastText||(p.contrastText=d(p.main)),p};let f;return t==="light"?f=Qc():t==="dark"&&(f=eu()),process.env.NODE_ENV!=="production"&&(f||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),Oe({common:{...Zn},mode:t,primary:h({color:o,name:"primary"}),secondary:h({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:a,name:"error"}),warning:h({color:u,name:"warning"}),info:h({color:c,name:"info"}),success:h({color:l,name:"success"}),grey:kp,contrastThreshold:n,getContrastText:d,augmentColor:h,tonalOffset:r,...f},i)}function zp(e){const t={};return Object.entries(e).forEach(r=>{const[i,o]=r;typeof o=="object"&&(t[i]=`${o.fontStyle?`${o.fontStyle} `:""}${o.fontVariant?`${o.fontVariant} `:""}${o.fontWeight?`${o.fontWeight} `:""}${o.fontStretch?`${o.fontStretch} `:""}${o.fontSize||""}${o.lineHeight?`/${o.lineHeight} `:""}${o.fontFamily||""}`)}),t}function Fp(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function Bp(e){return Math.round(e*1e5)/1e5}const Oa={textTransform:"uppercase"},Pa='"Roboto", "Helvetica", "Arial", sans-serif';function Vp(e,t){const{fontFamily:n=Pa,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:o=400,fontWeightMedium:s=500,fontWeightBold:a=700,htmlFontSize:c=16,allVariants:l,pxToRem:u,...d}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof r!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof c!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const h=r/14,f=u||(b=>`${b/c*h}rem`),m=(b,v,M,S,T)=>({fontFamily:n,fontWeight:b,fontSize:f(v),lineHeight:M,...n===Pa?{letterSpacing:`${Bp(S/v)}em`}:{},...T,...l}),p={h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(o,48,1.167,0),h4:m(o,34,1.235,.25),h5:m(o,24,1.334,0),h6:m(s,20,1.6,.15),subtitle1:m(o,16,1.75,.15),subtitle2:m(s,14,1.57,.1),body1:m(o,16,1.5,.15),body2:m(o,14,1.43,.15),button:m(s,14,1.75,.4,Oa),caption:m(o,12,1.66,.4),overline:m(o,12,2.66,1,Oa),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Oe({htmlFontSize:c,pxToRem:f,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:o,fontWeightMedium:s,fontWeightBold:a,...p},d,{clone:!1})}const Gp=.2,Up=.14,Wp=.12;function pe(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Gp})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Up})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Wp})`].join(",")}const Hp=["none",pe(0,2,1,-1,0,1,1,0,0,1,3,0),pe(0,3,1,-2,0,2,2,0,0,1,5,0),pe(0,3,3,-2,0,3,4,0,0,1,8,0),pe(0,2,4,-1,0,4,5,0,0,1,10,0),pe(0,3,5,-1,0,5,8,0,0,1,14,0),pe(0,3,5,-1,0,6,10,0,0,1,18,0),pe(0,4,5,-2,0,7,10,1,0,2,16,1),pe(0,5,5,-3,0,8,10,1,0,3,14,2),pe(0,5,6,-3,0,9,12,1,0,3,16,2),pe(0,6,6,-3,0,10,14,1,0,4,18,3),pe(0,6,7,-4,0,11,15,1,0,4,20,3),pe(0,7,8,-4,0,12,17,2,0,5,22,4),pe(0,7,8,-4,0,13,19,2,0,5,24,4),pe(0,7,9,-4,0,14,21,2,0,5,26,4),pe(0,8,9,-5,0,15,22,2,0,6,28,5),pe(0,8,10,-5,0,16,24,2,0,6,30,5),pe(0,8,11,-5,0,17,26,2,0,6,32,5),pe(0,9,11,-5,0,18,28,2,0,7,34,6),pe(0,9,12,-6,0,19,29,2,0,7,36,6),pe(0,10,13,-6,0,20,31,3,0,8,38,7),pe(0,10,13,-6,0,21,33,3,0,8,40,7),pe(0,10,14,-6,0,22,35,3,0,8,42,7),pe(0,11,14,-7,0,23,36,3,0,9,44,8),pe(0,11,15,-7,0,24,38,3,0,9,46,8)],Yp={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)"},qp={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Da(e){return`${Math.round(e)}ms`}function Jp(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function Kp(e){const t={...Yp,...e.easing},n={...qp,...e.duration};return{getAutoHeightDuration:Jp,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:a=t.easeInOut,delay:c=0,...l}=o;if(process.env.NODE_ENV!=="production"){const u=h=>typeof h=="string",d=h=>!Number.isNaN(parseFloat(h));!u(i)&&!Array.isArray(i)&&console.error('MUI: Argument "props" must be a string or Array.'),!d(s)&&!u(s)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`),u(a)||console.error('MUI: Argument "easing" must be a string.'),!d(c)&&!u(c)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof o!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
64
+ `)),Object.keys(l).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(l).join(",")}].`)}return(Array.isArray(i)?i:[i]).map(u=>`${u} ${typeof s=="string"?s:Da(s)} ${a} ${typeof c=="string"?c:Da(c)}`).join(",")},...e,easing:t,duration:n}}const Xp={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Zp(e){return rt(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function tu(e={}){const t={...e};function n(r){const i=Object.entries(r);for(let o=0;o<i.length;o++){const[s,a]=i[o];!Zp(a)||s.startsWith("unstable_")?delete r[s]:rt(a)&&(r[s]={...a},n(r[s]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
65
+
66
+ const theme = ${JSON.stringify(t,null,2)};
67
+
68
+ theme.breakpoints = createBreakpoints(theme.breakpoints || {});
69
+ theme.transitions = createTransitions(theme.transitions || {});
70
+
71
+ export default theme;`}function Ho(e={},...t){const{breakpoints:n,mixins:r={},spacing:i,palette:o={},transitions:s={},typography:a={},shape:c,...l}=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.":At(20));const u=ys(o),d=Ii(e);let h=Oe(d,{mixins:Fp(d.breakpoints,r),palette:u,shadows:Hp.slice(),typography:Vp(u,a),transitions:Kp(s),zIndex:{...Xp}});if(h=Oe(h,l),h=t.reduce((f,m)=>Oe(f,m),h),process.env.NODE_ENV!=="production"){const f=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],m=(p,b)=>{let v;for(v in p){const M=p[v];if(f.includes(v)&&Object.keys(M).length>0){if(process.env.NODE_ENV!=="production"){const S=In("",v);console.error([`MUI: The \`${b}\` component increases the CSS specificity of the \`${v}\` internal state.`,"You can not override it like this: ",JSON.stringify(p,null,2),"",`Instead, you need to use the '&.${S}' syntax:`,JSON.stringify({root:{[`&.${S}`]:M}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
72
+ `))}p[v]={}}}};Object.keys(h.components).forEach(p=>{const b=h.components[p].styleOverrides;b&&p.startsWith("Mui")&&m(b,p)})}return h.unstable_sxConfig={...cr,...l==null?void 0:l.unstable_sxConfig},h.unstable_sx=function(m){return En({sx:m,theme:this})},h.toRuntimeSource=tu,h}function Qp(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 em=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Qp(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function nu(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function ru(e){return e==="dark"?em:[]}function tm(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...i}=e,o=ys(t);return{palette:o,opacity:{...nu(o.mode),...n},overlays:r||ru(o.mode),...i}}function nm(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 rm=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],im=e=>(t,n)=>{const r=e.rootSelector||":root",i=e.colorSchemeSelector;let o=i;if(i==="class"&&(o=".%s"),i==="data"&&(o="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(o=`[${i}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const s={};return rm(e.cssVarPrefix).forEach(a=>{s[a]=n[a],delete n[a]}),o==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:s}}:o?{[o.replace("%s",t)]:s,[`${r}, ${o.replace("%s",t)}`]:n}:{[r]:{...n,...s}}}if(o&&o!=="media")return`${r}, ${o.replace("%s",String(t))}`}else if(t){if(o==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(o)return o.replace("%s",String(t))}return r};function om(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function D(e,t,n){!e[t]&&n&&(e[t]=n)}function Gn(e){return typeof e!="string"||!e.startsWith("hsl")?e:Zc(e)}function ft(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Vn(Gn(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().
73
+ 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 sm(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const et=e=>{try{return e()}catch{}},am=(e="mui")=>bp(e);function go(e,t,n,r){if(!t)return;t=t===!0?{}:t;const i=r==="dark"?"dark":"light";if(!n){e[r]=tm({...t,palette:{mode:i,...t==null?void 0:t.palette}});return}const{palette:o,...s}=Ho({...n,palette:{mode:i,...t==null?void 0:t.palette}});return e[r]={...t,palette:o,opacity:{...nu(i),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||ru(i)},s}function lm(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:s=nm,colorSchemeSelector:a=n.light&&n.dark?"media":void 0,rootSelector:c=":root",...l}=e,u=Object.keys(n)[0],d=r||(n.light&&u!=="light"?"light":u),h=am(o),{[d]:f,light:m,dark:p,...b}=n,v={...b};let M=f;if((d==="dark"&&!("dark"in n)||d==="light"&&!("light"in n))&&(M=!0),!M)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${d}\` option is either missing or invalid.`:At(21,d));const S=go(v,M,l,d);m&&!v.light&&go(v,m,void 0,"light"),p&&!v.dark&&go(v,p,void 0,"dark");let T={defaultColorScheme:d,...S,cssVarPrefix:o,colorSchemeSelector:a,rootSelector:c,getCssVar:h,colorSchemes:v,font:{...zp(S.typography),...S.font},spacing:sm(l.spacing)};Object.keys(T.colorSchemes).forEach(O=>{const y=T.colorSchemes[O].palette,_=A=>{const I=A.split("-"),P=I[1],U=I[2];return h(A,y[P][U])};if(y.mode==="light"&&(D(y.common,"background","#fff"),D(y.common,"onBackground","#000")),y.mode==="dark"&&(D(y.common,"background","#000"),D(y.common,"onBackground","#fff")),om(y,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),y.mode==="light"){D(y.Alert,"errorColor",le(y.error.light,.6)),D(y.Alert,"infoColor",le(y.info.light,.6)),D(y.Alert,"successColor",le(y.success.light,.6)),D(y.Alert,"warningColor",le(y.warning.light,.6)),D(y.Alert,"errorFilledBg",_("palette-error-main")),D(y.Alert,"infoFilledBg",_("palette-info-main")),D(y.Alert,"successFilledBg",_("palette-success-main")),D(y.Alert,"warningFilledBg",_("palette-warning-main")),D(y.Alert,"errorFilledColor",et(()=>y.getContrastText(y.error.main))),D(y.Alert,"infoFilledColor",et(()=>y.getContrastText(y.info.main))),D(y.Alert,"successFilledColor",et(()=>y.getContrastText(y.success.main))),D(y.Alert,"warningFilledColor",et(()=>y.getContrastText(y.warning.main))),D(y.Alert,"errorStandardBg",ce(y.error.light,.9)),D(y.Alert,"infoStandardBg",ce(y.info.light,.9)),D(y.Alert,"successStandardBg",ce(y.success.light,.9)),D(y.Alert,"warningStandardBg",ce(y.warning.light,.9)),D(y.Alert,"errorIconColor",_("palette-error-main")),D(y.Alert,"infoIconColor",_("palette-info-main")),D(y.Alert,"successIconColor",_("palette-success-main")),D(y.Alert,"warningIconColor",_("palette-warning-main")),D(y.AppBar,"defaultBg",_("palette-grey-100")),D(y.Avatar,"defaultBg",_("palette-grey-400")),D(y.Button,"inheritContainedBg",_("palette-grey-300")),D(y.Button,"inheritContainedHoverBg",_("palette-grey-A100")),D(y.Chip,"defaultBorder",_("palette-grey-400")),D(y.Chip,"defaultAvatarColor",_("palette-grey-700")),D(y.Chip,"defaultIconColor",_("palette-grey-700")),D(y.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),D(y.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),D(y.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),D(y.LinearProgress,"primaryBg",ce(y.primary.main,.62)),D(y.LinearProgress,"secondaryBg",ce(y.secondary.main,.62)),D(y.LinearProgress,"errorBg",ce(y.error.main,.62)),D(y.LinearProgress,"infoBg",ce(y.info.main,.62)),D(y.LinearProgress,"successBg",ce(y.success.main,.62)),D(y.LinearProgress,"warningBg",ce(y.warning.main,.62)),D(y.Skeleton,"bg",`rgba(${_("palette-text-primaryChannel")} / 0.11)`),D(y.Slider,"primaryTrack",ce(y.primary.main,.62)),D(y.Slider,"secondaryTrack",ce(y.secondary.main,.62)),D(y.Slider,"errorTrack",ce(y.error.main,.62)),D(y.Slider,"infoTrack",ce(y.info.main,.62)),D(y.Slider,"successTrack",ce(y.success.main,.62)),D(y.Slider,"warningTrack",ce(y.warning.main,.62));const A=_r(y.background.default,.8);D(y.SnackbarContent,"bg",A),D(y.SnackbarContent,"color",et(()=>y.getContrastText(A))),D(y.SpeedDialAction,"fabHoverBg",_r(y.background.paper,.15)),D(y.StepConnector,"border",_("palette-grey-400")),D(y.StepContent,"border",_("palette-grey-400")),D(y.Switch,"defaultColor",_("palette-common-white")),D(y.Switch,"defaultDisabledColor",_("palette-grey-100")),D(y.Switch,"primaryDisabledColor",ce(y.primary.main,.62)),D(y.Switch,"secondaryDisabledColor",ce(y.secondary.main,.62)),D(y.Switch,"errorDisabledColor",ce(y.error.main,.62)),D(y.Switch,"infoDisabledColor",ce(y.info.main,.62)),D(y.Switch,"successDisabledColor",ce(y.success.main,.62)),D(y.Switch,"warningDisabledColor",ce(y.warning.main,.62)),D(y.TableCell,"border",ce(Cr(y.divider,1),.88)),D(y.Tooltip,"bg",Cr(y.grey[700],.92))}if(y.mode==="dark"){D(y.Alert,"errorColor",ce(y.error.light,.6)),D(y.Alert,"infoColor",ce(y.info.light,.6)),D(y.Alert,"successColor",ce(y.success.light,.6)),D(y.Alert,"warningColor",ce(y.warning.light,.6)),D(y.Alert,"errorFilledBg",_("palette-error-dark")),D(y.Alert,"infoFilledBg",_("palette-info-dark")),D(y.Alert,"successFilledBg",_("palette-success-dark")),D(y.Alert,"warningFilledBg",_("palette-warning-dark")),D(y.Alert,"errorFilledColor",et(()=>y.getContrastText(y.error.dark))),D(y.Alert,"infoFilledColor",et(()=>y.getContrastText(y.info.dark))),D(y.Alert,"successFilledColor",et(()=>y.getContrastText(y.success.dark))),D(y.Alert,"warningFilledColor",et(()=>y.getContrastText(y.warning.dark))),D(y.Alert,"errorStandardBg",le(y.error.light,.9)),D(y.Alert,"infoStandardBg",le(y.info.light,.9)),D(y.Alert,"successStandardBg",le(y.success.light,.9)),D(y.Alert,"warningStandardBg",le(y.warning.light,.9)),D(y.Alert,"errorIconColor",_("palette-error-main")),D(y.Alert,"infoIconColor",_("palette-info-main")),D(y.Alert,"successIconColor",_("palette-success-main")),D(y.Alert,"warningIconColor",_("palette-warning-main")),D(y.AppBar,"defaultBg",_("palette-grey-900")),D(y.AppBar,"darkBg",_("palette-background-paper")),D(y.AppBar,"darkColor",_("palette-text-primary")),D(y.Avatar,"defaultBg",_("palette-grey-600")),D(y.Button,"inheritContainedBg",_("palette-grey-800")),D(y.Button,"inheritContainedHoverBg",_("palette-grey-700")),D(y.Chip,"defaultBorder",_("palette-grey-700")),D(y.Chip,"defaultAvatarColor",_("palette-grey-300")),D(y.Chip,"defaultIconColor",_("palette-grey-300")),D(y.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),D(y.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),D(y.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),D(y.LinearProgress,"primaryBg",le(y.primary.main,.5)),D(y.LinearProgress,"secondaryBg",le(y.secondary.main,.5)),D(y.LinearProgress,"errorBg",le(y.error.main,.5)),D(y.LinearProgress,"infoBg",le(y.info.main,.5)),D(y.LinearProgress,"successBg",le(y.success.main,.5)),D(y.LinearProgress,"warningBg",le(y.warning.main,.5)),D(y.Skeleton,"bg",`rgba(${_("palette-text-primaryChannel")} / 0.13)`),D(y.Slider,"primaryTrack",le(y.primary.main,.5)),D(y.Slider,"secondaryTrack",le(y.secondary.main,.5)),D(y.Slider,"errorTrack",le(y.error.main,.5)),D(y.Slider,"infoTrack",le(y.info.main,.5)),D(y.Slider,"successTrack",le(y.success.main,.5)),D(y.Slider,"warningTrack",le(y.warning.main,.5));const A=_r(y.background.default,.98);D(y.SnackbarContent,"bg",A),D(y.SnackbarContent,"color",et(()=>y.getContrastText(A))),D(y.SpeedDialAction,"fabHoverBg",_r(y.background.paper,.15)),D(y.StepConnector,"border",_("palette-grey-600")),D(y.StepContent,"border",_("palette-grey-600")),D(y.Switch,"defaultColor",_("palette-grey-300")),D(y.Switch,"defaultDisabledColor",_("palette-grey-600")),D(y.Switch,"primaryDisabledColor",le(y.primary.main,.55)),D(y.Switch,"secondaryDisabledColor",le(y.secondary.main,.55)),D(y.Switch,"errorDisabledColor",le(y.error.main,.55)),D(y.Switch,"infoDisabledColor",le(y.info.main,.55)),D(y.Switch,"successDisabledColor",le(y.success.main,.55)),D(y.Switch,"warningDisabledColor",le(y.warning.main,.55)),D(y.TableCell,"border",le(Cr(y.divider,1),.68)),D(y.Tooltip,"bg",Cr(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(A=>{const I=y[A];A!=="tonalOffset"&&I&&typeof I=="object"&&(I.main&&D(y[A],"mainChannel",Vn(Gn(I.main))),I.light&&D(y[A],"lightChannel",Vn(Gn(I.light))),I.dark&&D(y[A],"darkChannel",Vn(Gn(I.dark))),I.contrastText&&D(y[A],"contrastTextChannel",Vn(Gn(I.contrastText))),A==="text"&&(ft(y[A],"primary"),ft(y[A],"secondary")),A==="action"&&(I.active&&ft(y[A],"active"),I.selected&&ft(y[A],"selected")))})}),T=t.reduce((O,y)=>Oe(O,y),T);const C={prefix:o,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:im(T)},{vars:w,generateThemeVars:E,generateStyleSheets:j}=Ep(T,C);return T.vars=w,Object.entries(T.colorSchemes[T.defaultColorScheme]).forEach(([O,y])=>{T[O]=y}),T.generateThemeVars=E,T.generateStyleSheets=j,T.generateSpacing=function(){return Uc(l.spacing,Ti(this))},T.getColorSchemeSelector=wp(a),T.spacing=T.generateSpacing(),T.shouldSkipGeneratingVar=s,T.unstable_sxConfig={...cr,...l==null?void 0:l.unstable_sxConfig},T.unstable_sx=function(y){return En({sx:y,theme:this})},T.toRuntimeSource=tu,T}function $a(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:ys({...n===!0?{}:n.palette,mode:t})})}function iu(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:o=n==null?void 0:n.mode,...s}=e,a=o||"light",c=i==null?void 0:i[a],l={...i,...n?{[a]:{...typeof c!="boolean"&&c,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return Ho(e,...t);let u=n;"palette"in e||l[a]&&(l[a]!==!0?u=l[a].palette:a==="dark"&&(u={mode:"dark"}));const d=Ho({...e,palette:u},...t);return d.defaultColorScheme=a,d.colorSchemes=l,d.palette.mode==="light"&&(d.colorSchemes.light={...l.light!==!0&&l.light,palette:d.palette},$a(d,"dark",l.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...l.dark!==!0&&l.dark,palette:d.palette},$a(d,"light",l.light)),d}return!n&&!("light"in l)&&a==="light"&&(l.light=!0),lm({...s,colorSchemes:l,defaultColorScheme:a,...typeof r!="boolean"&&r},...t)}const xs=iu();function ou(){const e=Wc(xs);return process.env.NODE_ENV!=="production"&&k.useDebugValue(e),e[fs]||e}function cm({props:e,name:t}){return Xc({props:e,name:t,defaultTheme:xs,themeId:fs})}function bs(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const um=e=>bs(e)&&e!=="classes",Fe=Jc({themeId:fs,defaultTheme:xs,rootShouldForwardProp:um});function Ai(...e){const t=k.useRef(void 0),n=k.useCallback(r=>{const i=e.map(o=>{if(o==null)return null;if(typeof o=="function"){const s=o,a=s(r);return typeof a=="function"?a:()=>{s(null)}}return o.current=r,()=>{o.current=null}});return()=>{i.forEach(o=>o==null?void 0:o())}},e);return k.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}let Na=0;function dm(e){const[t,n]=k.useState(e),r=t;return k.useEffect(()=>{t==null&&(Na+=1,n(`mui-${Na}`))},[t]),r}const hm={...k},La=hm.useId;function fm(e){return La!==void 0?La():dm(e)}class pm{constructor(t){this.value=void 0,this.listeners=void 0,this.subscribe=n=>(this.listeners.add(n),()=>{this.listeners.delete(n)}),this.getSnapshot=()=>this.value,this.update=n=>{const r=n(this.value);r!==this.value&&(this.value=r,this.listeners.forEach(i=>i(r)))},this.value=t,this.listeners=new Set}}const Oi=({params:e,store:t})=>{k.useEffect(()=>{t.update(r=>L({},r,{animation:L({},r.animation,{skip:e.skipAnimation})}))},[t,e.skipAnimation]);const n=k.useCallback(()=>{let r=!1;return t.update(i=>L({},i,{animation:L({},i.animation,{skipAnimationRequests:i.animation.skipAnimationRequests+1})})),()=>{r||(r=!0,t.update(i=>L({},i,{animation:L({},i.animation,{skipAnimationRequests:i.animation.skipAnimationRequests-1})})))}},[t]);return st(()=>{if(typeof window>"u"||!(window!=null&&window.matchMedia))return;let i;const o=a=>{a.matches?i=n():i==null||i()},s=window.matchMedia("(prefers-reduced-motion)");return o(s),s.addEventListener("change",o),()=>{s.removeEventListener("change",o)}},[n,t]),{instance:{disableAnimation:n}}};Oi.params={skipAnimation:!0};Oi.getDefaultizedParams=({params:e})=>L({},e,{skipAnimation:e.skipAnimation??!1});Oi.getInitialState=({skipAnimation:e})=>{const t=typeof window>"u"||!(window!=null&&window.matchMedia),n=process.env.NODE_ENV==="test"?t:!1;return{animation:{skip:e,skipAnimationRequests:n?1:0}}};var mm=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const i={};e(i)===i&&(r=!0)}catch{}if(r){let i;try{throw new Error}catch(o){({stack:i}=o)}console.warn(`The result function returned its own inputs without modification. e.g
74
+ \`createSelector([state => state.todos], todos => todos)\`
75
+ This could lead to inefficient memoization and unnecessary re-renders.
76
+ Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:i})}}},gm=(e,t,n)=>{const{memoize:r,memoizeOptions:i}=t,{inputSelectorResults:o,inputSelectorResultsCopy:s}=e,a=r(()=>({}),...i);if(!(a.apply(null,o)===a.apply(null,s))){let l;try{throw new Error}catch(u){({stack:l}=u)}console.warn(`An input selector returned a different result when passed same arguments.
77
+ This means your output selector will likely run more frequently than intended.
78
+ Avoid returning a new reference inside your input selector, e.g.
79
+ \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:o,secondInputs:s,stack:l})}},ym={inputStabilityCheck:"once",identityFunctionCheck:"once"},ei=Symbol("NOT_FOUND");function xm(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function bm(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function vm(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var za=e=>Array.isArray(e)?e:[e];function Sm(e){const t=Array.isArray(e[0])?e[0]:e;return vm(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Fa(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var Em=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...ym,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:mm},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:gm}}};function wm(e){let t;return{get(n){return t&&e(t.key,n)?t.value:ei},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function Tm(e,t){let n=[];function r(a){const c=n.findIndex(l=>t(a,l.key));if(c>-1){const l=n[c];return c>0&&(n.splice(c,1),n.unshift(l)),l.value}return ei}function i(a,c){r(a)===ei&&(n.unshift({key:a,value:c}),n.length>e&&n.pop())}function o(){return n}function s(){n=[]}return{get:r,put:i,getEntries:o,clear:s}}var Cm=(e,t)=>e===t;function _m(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:i}=n;for(let o=0;o<i;o++)if(!e(n[o],r[o]))return!1;return!0}}function Rm(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=Cm,maxSize:i=1,resultEqualityCheck:o}=n,s=_m(r);let a=0;const c=i<=1?wm(s):Tm(i,s);function l(){let u=c.get(arguments);if(u===ei){if(u=e.apply(null,arguments),a++,o){const h=c.getEntries().find(f=>o(f.value,u));h&&(u=h.value,a!==0&&a--)}c.put(arguments,u)}return u}return l.clearCache=()=>{c.clear(),l.resetResultsCount()},l.resultsCount=()=>a,l.resetResultsCount=()=>{a=0},l}var Mm=class{constructor(e){this.value=e}deref(){return this.value}},jm=typeof WeakRef<"u"?WeakRef:Mm,Im=0,Ba=1;function Rr(){return{s:Im,v:void 0,o:null,p:null}}function su(e,t={}){let n=Rr();const{resultEqualityCheck:r}=t;let i,o=0;function s(){var d;let a=n;const{length:c}=arguments;for(let h=0,f=c;h<f;h++){const m=arguments[h];if(typeof m=="function"||typeof m=="object"&&m!==null){let p=a.o;p===null&&(a.o=p=new WeakMap);const b=p.get(m);b===void 0?(a=Rr(),p.set(m,a)):a=b}else{let p=a.p;p===null&&(a.p=p=new Map);const b=p.get(m);b===void 0?(a=Rr(),p.set(m,a)):a=b}}const l=a;let u;if(a.s===Ba)u=a.v;else if(u=e.apply(null,arguments),o++,r){const h=((d=i==null?void 0:i.deref)==null?void 0:d.call(i))??i;h!=null&&r(h,u)&&(u=h,o!==0&&o--),i=typeof u=="object"&&u!==null||typeof u=="function"?new jm(u):u}return l.s=Ba,l.v=u,u}return s.clearCache=()=>{n=Rr(),s.resetResultsCount()},s.resultsCount=()=>o,s.resetResultsCount=()=>{o=0},s}function au(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,s=0,a,c={},l=i.pop();typeof l=="object"&&(c=l,l=i.pop()),xm(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const u={...n,...c},{memoize:d,memoizeOptions:h=[],argsMemoize:f=su,argsMemoizeOptions:m=[],devModeChecks:p={}}=u,b=za(h),v=za(m),M=Sm(i),S=d(function(){return o++,l.apply(null,arguments)},...b);let T=!0;const C=f(function(){s++;const E=Fa(M,arguments);if(a=S.apply(null,E),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:j,inputStabilityCheck:O}=Em(T,p);if(j.shouldRun&&j.run(l,E,a),O.shouldRun){const y=Fa(M,arguments);O.run({inputSelectorResults:E,inputSelectorResultsCopy:y},{memoize:d,memoizeOptions:b},arguments)}T&&(T=!1)}return a},...v);return Object.assign(C,{resultFunc:l,memoizedResultFunc:S,dependencies:M,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:d,argsMemoize:f})};return Object.assign(r,{withTypes:()=>r}),r}var km=au(su),Am=Object.assign((e,t=km)=>{bm(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((s,a,c)=>(s[n[c]]=a,s),{}))},{withTypes:()=>Am});const Om=au({memoize:Rm,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),Va=new WeakMap,X=(...e)=>(n,...r)=>{const i=n.cacheKey;let o=Va.get(i);o||(o=new Map,Va.set(i,o));const s=o.get(e);if(s)return s(n,...r);const a=Om(...e);return o.set(e,a),a(n,...r)},Pm=e=>e.animation,Dm=X([Pm],e=>e.skip||e.skipAnimationRequests>0);function Yn(e){return e&&e.ownerDocument||document}function $m(e){return Yn(e).defaultView||window}var Mr={exports:{}},yo={},jr={exports:{}},xo={};/**
80
+ * @license React
81
+ * use-sync-external-store-shim.production.js
82
+ *
83
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
84
+ *
85
+ * This source code is licensed under the MIT license found in the
86
+ * LICENSE file in the root directory of this source tree.
87
+ */var Ga;function Nm(){if(Ga)return xo;Ga=1;var e=$;function t(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,s=e.useDebugValue;function a(d,h){var f=h(),m=r({inst:{value:f,getSnapshot:h}}),p=m[0].inst,b=m[1];return o(function(){p.value=f,p.getSnapshot=h,c(p)&&b({inst:p})},[d,f,h]),i(function(){return c(p)&&b({inst:p}),d(function(){c(p)&&b({inst:p})})},[d]),s(f),f}function c(d){var h=d.getSnapshot;d=d.value;try{var f=h();return!n(d,f)}catch{return!0}}function l(d,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:a;return xo.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,xo}var bo={};/**
88
+ * @license React
89
+ * use-sync-external-store-shim.development.js
90
+ *
91
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
92
+ *
93
+ * This source code is licensed under the MIT license found in the
94
+ * LICENSE file in the root directory of this source tree.
95
+ */var Ua;function Lm(){return Ua||(Ua=1,process.env.NODE_ENV!=="production"&&function(){function e(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}function t(f,m){u||i.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 p=m();if(!d){var b=m();o(p,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}b=s({inst:{value:p,getSnapshot:m}});var v=b[0].inst,M=b[1];return c(function(){v.value=p,v.getSnapshot=m,n(v)&&M({inst:v})},[f,p,m]),a(function(){return n(v)&&M({inst:v}),f(function(){n(v)&&M({inst:v})})},[f]),l(p),p}function n(f){var m=f.getSnapshot;f=f.value;try{var p=m();return!o(f,p)}catch{return!0}}function r(f,m){return m()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=$,o=typeof Object.is=="function"?Object.is:e,s=i.useState,a=i.useEffect,c=i.useLayoutEffect,l=i.useDebugValue,u=!1,d=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;bo.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),bo}var Wa;function lu(){return Wa||(Wa=1,process.env.NODE_ENV==="production"?jr.exports=Nm():jr.exports=Lm()),jr.exports}/**
96
+ * @license React
97
+ * use-sync-external-store-shim/with-selector.production.js
98
+ *
99
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
100
+ *
101
+ * This source code is licensed under the MIT license found in the
102
+ * LICENSE file in the root directory of this source tree.
103
+ */var Ha;function zm(){if(Ha)return yo;Ha=1;var e=$,t=lu();function n(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,s=e.useEffect,a=e.useMemo,c=e.useDebugValue;return yo.useSyncExternalStoreWithSelector=function(l,u,d,h,f){var m=o(null);if(m.current===null){var p={hasValue:!1,value:null};m.current=p}else p=m.current;m=a(function(){function v(w){if(!M){if(M=!0,S=w,w=h(w),f!==void 0&&p.hasValue){var E=p.value;if(f(E,w))return T=E}return T=w}if(E=T,r(S,w))return E;var j=h(w);return f!==void 0&&f(E,j)?(S=w,E):(S=w,T=j)}var M=!1,S,T,C=d===void 0?null:d;return[function(){return v(u())},C===null?void 0:function(){return v(C())}]},[u,d,h,f]);var b=i(l,m[0],m[1]);return s(function(){p.hasValue=!0,p.value=b},[b]),c(b),b},yo}var vo={};/**
104
+ * @license React
105
+ * use-sync-external-store-shim/with-selector.development.js
106
+ *
107
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
108
+ *
109
+ * This source code is licensed under the MIT license found in the
110
+ * LICENSE file in the root directory of this source tree.
111
+ */var Ya;function Fm(){return Ya||(Ya=1,process.env.NODE_ENV!=="production"&&function(){function e(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=$,n=lu(),r=typeof Object.is=="function"?Object.is:e,i=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,a=t.useMemo,c=t.useDebugValue;vo.useSyncExternalStoreWithSelector=function(l,u,d,h,f){var m=o(null);if(m.current===null){var p={hasValue:!1,value:null};m.current=p}else p=m.current;m=a(function(){function v(w){if(!M){if(M=!0,S=w,w=h(w),f!==void 0&&p.hasValue){var E=p.value;if(f(E,w))return T=E}return T=w}if(E=T,r(S,w))return E;var j=h(w);return f!==void 0&&f(E,j)?(S=w,E):(S=w,T=j)}var M=!1,S,T,C=d===void 0?null:d;return[function(){return v(u())},C===null?void 0:function(){return v(C())}]},[u,d,h,f]);var b=i(l,m[0],m[1]);return s(function(){p.hasValue=!0,p.value=b},[b]),c(b),b},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),vo}var qa;function Bm(){return qa||(qa=1,process.env.NODE_ENV==="production"?Mr.exports=zm():Mr.exports=Fm()),Mr.exports}var Vm=Bm();const Gm=Object.is,$e=(e,t,n=[],r=Gm)=>{const i=o=>t(o,...n);return Vm.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,i,r)},Um="DEFAULT_X_AXIS_KEY",Wm="DEFAULT_Y_AXIS_KEY",Hm={top:20,bottom:20,left:20,right:20},Ym=45,qm=25,cu=20,kn=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.x},An=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.y},Jm=X([An],e=>(e??[]).reduce((t,n)=>{var r;return n.position==="left"?t+(n.width||0)+((r=n.zoom)!=null&&r.slider.enabled?n.zoom.slider.size:0):t},0)),Km=X([An],e=>(e??[]).reduce((t,n)=>{var r;return n.position==="right"?t+(n.width||0)+((r=n.zoom)!=null&&r.slider.enabled?n.zoom.slider.size:0):t},0)),Xm=X([kn],e=>(e??[]).reduce((t,n)=>{var r;return n.position==="top"?t+(n.height||0)+((r=n.zoom)!=null&&r.slider.enabled?n.zoom.slider.size:0):t},0)),Zm=X([kn],e=>(e??[]).reduce((t,n)=>{var r;return n.position==="bottom"?t+(n.height||0)+((r=n.zoom)!=null&&r.slider.enabled?n.zoom.slider.size:0):t},0)),Qm=e=>e.dimensions,uu=e=>e.dimensions.width,du=e=>e.dimensions.height,eg=e=>e.dimensions.margin.top,tg=e=>e.dimensions.margin.right,ng=e=>e.dimensions.margin.bottom,rg=e=>e.dimensions.margin.left,ur=X([uu,du,eg,tg,ng,rg,Xm,Km,Zm,Jm],(e,t,n,r,i,o,s,a,c,l)=>({width:e-o-r-l-a,left:o+l,right:r+a,height:t-n-i-s-c,top:n+s,bottom:i+c})),ig=X([Qm],e=>({width:e.propsWidth,height:e.propsHeight})),og=X([uu,du],(e,t)=>({width:e,height:t}));function hu(e,t){return typeof e=="number"?{top:e,bottom:e,left:e,right:e}:t?L({},t,e):e}const sg=10,Pi=({params:e,store:t,svgRef:n})=>{const r=e.width!==void 0&&e.height!==void 0,i=k.useRef({displayError:!1,initialCompute:!0,computeRun:0}),[o,s]=k.useState(0),[a,c]=k.useState(0),l=k.useCallback(()=>{const m=n==null?void 0:n.current;if(!m)return{};const b=$m(m).getComputedStyle(m),v=Math.floor(parseFloat(b.height))||0,M=Math.floor(parseFloat(b.width))||0;return t.update(S=>S.dimensions.width===M&&S.dimensions.height===v?S:L({},S,{dimensions:{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:e.width??M,height:e.height??v,propsWidth:e.width,propsHeight:e.height}})),{height:v,width:M}},[t,n,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]);k.useEffect(()=>{t.update(m=>{const p=e.width??m.dimensions.width,b=e.height??m.dimensions.height;return L({},m,{dimensions:{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:p,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]),k.useEffect(()=>{i.current.displayError=!0},[]),st(()=>{if(r||!i.current.initialCompute||i.current.computeRun>sg)return;const m=l();m.width!==o||m.height!==a?(i.current.computeRun+=1,m.width!==void 0&&s(m.width),m.height!==void 0&&c(m.height)):i.current.initialCompute&&(i.current.initialCompute=!1)},[a,o,l,r]),st(()=>{if(r)return()=>{};l();const m=n.current;if(typeof ResizeObserver>"u")return()=>{};let p;const b=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{l()})});return m&&b.observe(m),()=>{p&&cancelAnimationFrame(p),m&&b.unobserve(m)}},[l,r,n]),process.env.NODE_ENV!=="production"&&(i.current.displayError&&e.width===void 0&&o===0&&(console.error("MUI X Charts: ChartContainer does not have `width` prop, and its container has no `width` defined."),i.current.displayError=!1),i.current.displayError&&e.height===void 0&&a===0&&(console.error("MUI X Charts: ChartContainer does not have `height` prop, and its container has no `height` defined."),i.current.displayError=!1));const u=$e(t,ur),d=k.useCallback(m=>m>=u.left-1&&m<=u.left+u.width,[u.left,u.width]),h=k.useCallback(m=>m>=u.top-1&&m<=u.top+u.height,[u.height,u.top]);return{instance:{isPointInside:k.useCallback((m,p,b)=>b&&"closest"in b&&b.closest("[data-drawing-container]")?!0:d(m)&&h(p),[d,h]),isXInside:d,isYInside:h}}};Pi.params={width:!0,height:!0,margin:!0};Pi.getDefaultizedParams=({params:e})=>L({},e,{margin:hu(e.margin,Hm)});Pi.getInitialState=({width:e,height:t,margin:n})=>({dimensions:{margin:n,width:e??0,height:t??0,propsWidth:e,propsHeight:t}});const vs=({params:e,store:t})=>(st(()=>{t.update(n=>L({},n,{experimentalFeatures:e.experimentalFeatures}))},[t,e.experimentalFeatures]),{});vs.params={experimentalFeatures:!0};vs.getInitialState=({experimentalFeatures:e})=>({experimentalFeatures:e});const ag=e=>e.experimentalFeatures,fu=X([ag],e=>!!(e!=null&&e.preferStrictDomainInLineCharts));let Ja=0;const lg=()=>(Ja+=1,`mui-chart-${Ja}`),Ss=({params:e,store:t})=>(k.useEffect(()=>{t.update(n=>e.id===void 0||e.id===n.id.providedChartId&&n.id.chartId!==void 0?n:L({},n,{id:L({},n.id,{chartId:e.id??lg()})}))},[t,e.id]),{});Ss.params={id:!0};Ss.getInitialState=({id:e})=>({id:{chartId:e,providedChartId:e}});const cg=e=>e.id,ug=X([cg],e=>e.chartId),dg=["#4254FB","#FFB422","#FA4F58","#0DBEFF","#22BF75","#FA83B4","#FF7511"],hg=["#495AFB","#FFC758","#F35865","#30C8FF","#44CE8D","#F286B3","#FF8C39"],pu=e=>e==="dark"?hg:dg,mu=({series:e,colors:t,seriesConfig:n,dataset:r})=>{const i={};e.forEach((s,a)=>{var u;const c=n[s.type].getSeriesWithDefaultValues(s,a,t),l=c.id;if(i[s.type]===void 0&&(i[s.type]={series:{},seriesOrder:[]}),((u=i[s.type])==null?void 0:u.series[l])!==void 0)throw new Error(`MUI X Charts: series' id "${l}" is not unique.`);i[s.type].series[l]=c,i[s.type].seriesOrder.push(l)});const o={};return Object.keys(n).forEach(s=>{var c,l;const a=i[s];a!==void 0&&(o[s]=((l=(c=n[s])==null?void 0:c.seriesProcessor)==null?void 0:l.call(c,a,r))??i[s])}),o},Di=({params:e,store:t,seriesConfig:n})=>{const{series:r,dataset:i,theme:o,colors:s}=e,a=k.useRef(!0);return k.useEffect(()=>{if(a.current){a.current=!1;return}t.update(c=>L({},c,{series:L({},c.series,{processedSeries:mu({series:r,colors:typeof s=="function"?s(o):s,seriesConfig:n,dataset:i})})}))},[s,i,r,o,n,t]),{}};Di.params={dataset:!0,series:!0,colors:!0,theme:!0};const fg=[];Di.getDefaultizedParams=({params:e})=>{var t;return L({},e,{series:(t=e.series)!=null&&t.length?e.series:fg,colors:e.colors??pu,theme:e.theme??"light"})};Di.getInitialState=({series:e=[],colors:t,theme:n,dataset:r},i,o)=>({series:{seriesConfig:o,processedSeries:mu({series:e,colors:typeof t=="function"?t(n):t,seriesConfig:o,dataset:r})}});const gu=e=>e.series,dr=X([gu],e=>e.processedSeries),$i=X([gu],e=>e.seriesConfig),pg={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 yu{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 pg)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,n,r,i){this.element=t,this.pointerManager=n,this.gesturesRegistry=r,this.keyboardManager=i;const o=`${this.name}ChangeOptions`;this.element.addEventListener(o,this.handleOptionsChange.bind(this));const s=`${this.name}ChangeState`;this.element.addEventListener(s,this.handleStateChange.bind(this))}handleOptionsChange(t){t&&t.detail&&this.updateOptions(t.detail)}updateOptions(t){this.preventDefault=t.preventDefault??this.preventDefault,this.stopPropagation=t.stopPropagation??this.stopPropagation,this.preventIf=t.preventIf??this.preventIf,this.requiredKeys=t.requiredKeys??this.requiredKeys,this.pointerMode=t.pointerMode??this.pointerMode}handleStateChange(t){t&&t.detail&&this.updateState(t.detail)}updateState(t){Object.assign(this.state,t)}getTargetElement(t){return this.isActive||this.element===t.target||this.element.contains(t.target)?this.element:null}set isActive(t){t?this.gesturesRegistry.registerActiveGesture(this.element,this):this.gesturesRegistry.unregisterActiveGesture(this.element,this)}get isActive(){return this.gesturesRegistry.isGestureActive(this.element,this)??!1}shouldPreventGesture(t){if(!this.keyboardManager.areKeysPressed(this.requiredKeys))return!0;if(this.preventIf.length===0)return!1;const n=this.gesturesRegistry.getActiveGestures(t);return this.preventIf.some(r=>n[r])}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 n=`${this.name}ChangeState`;this.element.removeEventListener(n,this.handleStateChange.bind(this))}}class mg{constructor(){this.activeGestures=new Map}registerActiveGesture(t,n){this.activeGestures.has(t)||this.activeGestures.set(t,new Set);const r=this.activeGestures.get(t),i={gesture:n,element:t};r.add(i)}unregisterActiveGesture(t,n){const r=this.activeGestures.get(t);r&&(r.forEach(i=>{i.gesture===n&&r.delete(i)}),r.size===0&&this.activeGestures.delete(t))}getActiveGestures(t){const n=this.activeGestures.get(t);return n?Array.from(n).reduce((r,i)=>(r[i.gesture.name]=!0,r),{}):{}}isGestureActive(t,n){const r=this.activeGestures.get(t);return r?Array.from(r).some(i=>i.gesture===n):!1}destroy(){this.activeGestures.clear()}unregisterElement(t){this.activeGestures.delete(t)}}class gg{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(n=>n==="ControlOrMeta"?this.pressedKeys.has("Control")||this.pressedKeys.has("Meta"):this.pressedKeys.has(n))}destroy(){typeof window<"u"&&(window.removeEventListener("keydown",this.handleKeyDown),window.removeEventListener("keyup",this.handleKeyUp),window.removeEventListener("blur",this.clearKeys)),this.clearKeys()}}class yg{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=n=>{if(this.preventEventInterruption&&"pointerType"in n&&n.pointerType==="touch"){n.preventDefault();return}const r=new PointerEvent("forceCancel",{bubbles:!1,cancelable:!1}),i=this.pointers.values().next().value;if(this.pointers.size>0&&i){Object.defineProperties(r,{clientX:{value:i.clientX},clientY:{value:i.clientY},pointerId:{value:i.pointerId},pointerType:{value:i.pointerType}});for(const[o,s]of this.pointers.entries()){const a=L({},s,{type:"forceCancel"});this.pointers.set(o,a)}}this.notifyHandlers(r),this.pointers.clear()},this.handlePointerEvent=n=>{const{type:r,pointerId:i}=n;if(r==="pointerdown"){if(this.pointers.set(i,this.createPointerData(n)),n.target instanceof Element)try{n.target.setPointerCapture(i)}catch{}}else if(r==="pointermove")this.pointers.set(i,this.createPointerData(n));else if(r==="pointerup"||r==="pointercancel"||r==="forceCancel"){if(n.target instanceof Element)try{n.target.releasePointerCapture(i)}catch{}this.pointers.set(i,this.createPointerData(n)),this.notifyHandlers(n),this.pointers.delete(i);return}this.notifyHandlers(n)},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(n=>n(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 xg{constructor(t){this.gestureTemplates=new Map,this.elementGestureMap=new Map,this.activeGesturesRegistry=new mg,this.pointerManager=void 0,this.keyboardManager=new gg,this.pointerManager=new yg({root:t.root,touchAction:t.touchAction,passive:t.passive}),t.gestures&&t.gestures.length>0&&t.gestures.forEach(n=>{this.addGestureTemplate(n)})}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,n,r){const i=this.elementGestureMap.get(n);if(!i||!i.has(t)){console.error(`Gesture "${t}" not found on the provided element.`);return}const o=new CustomEvent(`${t}ChangeOptions`,{detail:r,bubbles:!1,cancelable:!1});n.dispatchEvent(o)}setGestureState(t,n,r){const i=this.elementGestureMap.get(n);if(!i||!i.has(t)){console.error(`Gesture "${t}" not found on the provided element.`);return}const o=new CustomEvent(`${t}ChangeState`,{detail:r,bubbles:!1,cancelable:!1});n.dispatchEvent(o)}registerElement(t,n,r){if(Array.isArray(t))return t.forEach(o=>{const s=r==null?void 0:r[o];this.registerSingleGesture(o,n,s)}),n;const i=r==null?void 0:r[t];return this.registerSingleGesture(t,n,i),n}registerSingleGesture(t,n,r){const i=this.gestureTemplates.get(t);if(!i)return console.error(`Gesture template "${t}" not found.`),!1;this.elementGestureMap.has(n)||this.elementGestureMap.set(n,new Map);const o=this.elementGestureMap.get(n);o.has(t)&&(console.warn(`Element already has gesture "${t}" registered. It will be replaced.`),this.unregisterElement(t,n));const s=i.clone(r);return s.init(n,this.pointerManager,this.activeGesturesRegistry,this.keyboardManager),o.set(t,s),!0}unregisterElement(t,n){const r=this.elementGestureMap.get(n);return!r||!r.has(t)?!1:(r.get(t).destroy(),r.delete(t),this.activeGesturesRegistry.unregisterElement(n),r.size===0&&this.elementGestureMap.delete(n),!0)}unregisterAllGestures(t){const n=this.elementGestureMap.get(t);if(n){for(const[,r]of n)r.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 hr extends yu{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,n,r,i){super.init(t,n,r,i),this.unregisterHandler=this.pointerManager.registerGestureHandler((o,s)=>this.handlePointerEvent(o,s))}updateOptions(t){super.updateOptions(t),this.minPointers=t.minPointers??this.minPointers,this.maxPointers=t.maxPointers??this.maxPointers}getRelevantPointers(t,n){return t.filter(r=>this.isPointerTypeAllowed(r.pointerType)&&(n===r.target||r.target===this.originalTarget||n===this.originalTarget||n.contains(r.target)))}destroy(){this.unregisterHandler&&(this.unregisterHandler(),this.unregisterHandler=null),super.destroy()}}function bg(e,t){const n=t.x-e.x,r=t.y-e.y;return Math.sqrt(n*n+r*r)}function So(e){if(e.length<2)return 0;let t=0,n=0;for(let r=0;r<e.length;r+=1)for(let i=r+1;i<e.length;i+=1)t+=bg({x:e[r].clientX,y:e[r].clientY},{x:e[i].clientX,y:e[i].clientY}),n+=1;return n>0?t/n:0}function bt(e){if(e.length===0)return{x:0,y:0};const t=e.reduce((n,r)=>(n.x+=r.clientX,n.y+=r.clientY,n),{x:0,y:0});return{x:t.x/e.length,y:t.y/e.length}}function On(e,t){return`${e}${t==="ongoing"?"":t.charAt(0).toUpperCase()+t.slice(1)}`}const Ir=1e-5,Rt=1e-5,Ka=.15;function vg(e,t){const n=t.x-e.x,r=t.y-e.y,i={vertical:null,horizontal:null,mainAxis:null},o=Sg(t,e),s=Math.abs(n)>Math.abs(r)?"horizontal":"vertical",a=o||s==="horizontal"?Ir:Ka,c=o?Ir:s==="horizontal"?Ka:Ir;return Math.abs(n)>a&&(i.horizontal=n>0?"right":"left"),Math.abs(r)>c&&(i.vertical=r>0?"down":"up"),i.mainAxis=o?"diagonal":s,i}function Sg(e,t){const n=t.x-e.x,r=t.y-e.y,i=Math.atan2(r,n)*180/Math.PI;return i>=-45+Rt&&i<=-22.5+Rt||i>=22.5+Rt&&i<=45+Rt||i>=135+Rt&&i<=157.5+Rt||i>=-157.5+Rt&&i<=-135+Rt}function Eg(e,t){if(!e.vertical&&!e.horizontal)return!1;if(t.length===0)return!0;const n=e.vertical===null||t.includes(e.vertical),r=e.horizontal===null||t.includes(e.horizontal);return n&&r}const wg=0,Tg=e=>e>wg?1:e<-0?-1:0;class Es extends hr{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 Es(L({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,n,r,i){super.init(t,n,r,i),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 n=this.pointerManager.getPointers()||new Map,r=Array.from(n.values());if(r.length>=this.minPointers&&r.length<=this.maxPointers){this.isActive=!0;const i={x:t.clientX,y:t.clientY};this.state.lastPosition=i,this.emitMoveEvent(this.element,"start",r,t),this.emitMoveEvent(this.element,"ongoing",r,t)}}handleElementLeave(t){if(t.pointerType!=="mouse"&&t.pointerType!=="pen"||!this.isActive)return;const n=this.pointerManager.getPointers()||new Map,r=Array.from(n.values());this.emitMoveEvent(this.element,"end",r,t),this.resetState()}handlePointerEvent(t,n){if(n.type!=="pointermove"||n.pointerType!=="mouse"&&n.pointerType!=="pen")return;this.preventDefault&&n.preventDefault(),this.stopPropagation&&n.stopPropagation();const r=Array.from(t.values()),i=this.getTargetElement(n);if(!i||r.length<this.minPointers||r.length>this.maxPointers)return;if(this.shouldPreventGesture(i)){if(!this.isActive)return;this.resetState(),this.emitMoveEvent(i,"end",r,n);return}const o={x:n.clientX,y:n.clientY};this.state.lastPosition=o,this.isActive||(this.isActive=!0,this.emitMoveEvent(i,"start",r,n)),this.emitMoveEvent(i,"ongoing",r,n)}emitMoveEvent(t,n,r,i){const o=this.state.lastPosition||bt(r),s=this.gesturesRegistry.getActiveGestures(t),a={gestureName:this.name,centroid:o,target:i.target,srcEvent:i,phase:n,pointers:r,timeStamp:i.timeStamp,activeGestures:s,customData:this.customData},c=On(this.name,n),l=new CustomEvent(c,{bubbles:!0,cancelable:!0,detail:a});t.dispatchEvent(l)}}class ws extends hr{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 ws(L({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=L({},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,n){const r=Array.from(t.values());if(n.type==="forceCancel"){this.cancel(n.target,r,n);return}const i=this.getTargetElement(n);if(!i)return;if(this.shouldPreventGesture(i)){this.cancel(i,r,n);return}const o=this.getRelevantPointers(r,i);if(o.length<this.minPointers||o.length>this.maxPointers){this.cancel(i,o,n);return}switch(n.type){case"pointerdown":!this.isActive&&!this.state.startCentroid&&(o.forEach(s=>{this.state.startPointers.set(s.pointerId,s)}),this.originalTarget=i,this.state.startCentroid=bt(o),this.state.lastCentroid=L({},this.state.startCentroid));break;case"pointermove":if(this.state.startCentroid&&o.length>=this.minPointers){const s=bt(o),a=s.x-this.state.startCentroid.x,c=s.y-this.state.startCentroid.y,l=Math.sqrt(a*a+c*c),u=vg(this.state.lastCentroid??this.state.startCentroid,s),d=this.state.lastCentroid?s.x-this.state.lastCentroid.x:0,h=this.state.lastCentroid?s.y-this.state.lastCentroid.y:0;!this.state.movementThresholdReached&&l>=this.threshold&&Eg(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(i,"start",o,n,s),this.emitPanEvent(i,"ongoing",o,n,s)):this.state.movementThresholdReached&&this.isActive&&(this.state.lastDeltas={x:d,y:h},this.state.totalDeltaX+=d,this.state.totalDeltaY+=h,this.state.activeDeltaX+=d,this.state.activeDeltaY+=h,this.emitPanEvent(i,"ongoing",o,n,s)),this.state.lastCentroid=s,this.state.lastDirection=u}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive&&this.state.movementThresholdReached){if(o.filter(s=>s.type!=="pointerup"&&s.type!=="pointercancel").length<this.minPointers){const s=this.state.lastCentroid||this.state.startCentroid;n.type==="pointercancel"&&this.emitPanEvent(i,"cancel",o,n,s),this.emitPanEvent(i,"end",o,n,s),this.resetState()}}else this.resetState();break}}emitPanEvent(t,n,r,i,o){var v,M;if(!this.state.startCentroid)return;const s=((v=this.state.lastDeltas)==null?void 0:v.x)??0,a=((M=this.state.lastDeltas)==null?void 0:M.y)??0,c=this.state.startPointers.values().next().value,l=c?(i.timeStamp-c.timeStamp)/1e3:0,u=l>0?s/l:0,d=l>0?a/l:0,h=Math.sqrt(u*u+d*d),f=this.gesturesRegistry.getActiveGestures(t),m={gestureName:this.name,initialCentroid:this.state.startCentroid,centroid:o,target:i.target,srcEvent:i,phase:n,pointers:r,timeStamp:i.timeStamp,deltaX:s,deltaY:a,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:f,customData:this.customData},p=On(this.name,n),b=new CustomEvent(p,{bubbles:!0,cancelable:!0,detail:m});t.dispatchEvent(b),this.preventDefault&&i.preventDefault(),this.stopPropagation&&i.stopPropagation()}cancel(t,n,r){if(this.isActive){const i=t??this.element;this.emitPanEvent(i,"cancel",n,r,this.state.lastCentroid),this.emitPanEvent(i,"end",n,r,this.state.lastCentroid)}this.resetState()}}class Ts extends hr{constructor(t){super(L({},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 Ts(L({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=L({},this.state,{startDistance:0,lastDistance:0,lastScale:1,lastTime:0,velocity:0,deltaScale:0})}handlePointerEvent(t,n){const r=Array.from(t.values()),i=this.getTargetElement(n);if(!i)return;if(this.shouldPreventGesture(i)){this.isActive&&(this.emitPinchEvent(i,"cancel",r,n),this.resetState());return}const o=this.getRelevantPointers(r,i);switch(n.type){case"pointerdown":if(o.length>=2&&!this.isActive){const s=So(o);this.state.startDistance=s,this.state.lastDistance=s,this.state.lastTime=n.timeStamp,this.originalTarget=i}break;case"pointermove":if(this.state.startDistance&&o.length>=this.minPointers){const s=So(o),a=Math.abs(s-this.state.lastDistance);if(a!==0&&a>=this.threshold){const c=this.state.startDistance?s/this.state.startDistance:1,l=c/this.state.lastScale;this.state.totalScale*=l;const u=(n.timeStamp-this.state.lastTime)/1e3;if(this.state.lastDistance){const h=(s-this.state.lastDistance)/u;this.state.velocity=Number.isNaN(h)?0:h}this.state.lastDistance=s,this.state.deltaScale=c-this.state.lastScale,this.state.lastScale=c,this.state.lastTime=n.timeStamp,this.isActive?this.emitPinchEvent(i,"ongoing",o,n):(this.isActive=!0,this.emitPinchEvent(i,"start",o,n),this.emitPinchEvent(i,"ongoing",o,n))}}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive){const s=o.filter(a=>a.type!=="pointerup"&&a.type!=="pointercancel");if(s.length<this.minPointers)n.type==="pointercancel"&&this.emitPinchEvent(i,"cancel",o,n),this.emitPinchEvent(i,"end",o,n),this.resetState();else if(s.length>=2){const a=So(s);this.state.startDistance=a/this.state.lastScale}}break}}emitPinchEvent(t,n,r,i){const o=bt(r),s=this.state.lastDistance,a=this.state.lastScale,c=this.gesturesRegistry.getActiveGestures(t),l={gestureName:this.name,centroid:o,target:i.target,srcEvent:i,phase:n,pointers:r,timeStamp:i.timeStamp,scale:a,deltaScale:this.state.deltaScale,totalScale:this.state.totalScale,distance:s,velocity:this.state.velocity,activeGestures:c,direction:Tg(this.state.velocity),customData:this.customData};this.preventDefault&&i.preventDefault(),this.stopPropagation&&i.stopPropagation();const u=On(this.name,n),d=new CustomEvent(u,{bubbles:!0,cancelable:!0,detail:l});t.dispatchEvent(d)}}class Cs extends hr{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 Cs(L({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=L({},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,n){const r=Array.from(t.values());if(n.type==="forceCancel"){this.cancelPress(n.target,r,n);return}const i=this.getTargetElement(n);if(!i)return;if(this.shouldPreventGesture(i)){this.isActive&&this.cancelPress(i,r,n);return}const o=this.getRelevantPointers(r,i);if(o.length<this.minPointers||o.length>this.maxPointers){this.isActive&&this.cancelPress(i,o,n);return}switch(n.type){case"pointerdown":!this.isActive&&!this.state.startCentroid&&(this.state.startCentroid=bt(o),this.state.lastPosition=L({},this.state.startCentroid),this.state.startTime=n.timeStamp,this.isActive=!0,this.originalTarget=i,this.clearPressTimer(),this.state.timerId=setTimeout(()=>{if(this.isActive&&this.state.startCentroid){this.state.pressThresholdReached=!0;const s=this.state.lastPosition;this.emitPressEvent(i,"start",o,n,s),this.emitPressEvent(i,"ongoing",o,n,s)}},this.duration));break;case"pointermove":if(this.isActive&&this.state.startCentroid){const s=bt(o);this.state.lastPosition=s;const a=s.x-this.state.startCentroid.x,c=s.y-this.state.startCentroid.y;Math.sqrt(a*a+c*c)>this.maxDistance&&this.cancelPress(i,o,n)}break;case"pointerup":if(this.isActive){if(this.state.pressThresholdReached){const s=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(i,"end",o,n,s)}this.resetState()}break;case"pointercancel":case"forceCancel":this.cancelPress(i,o,n);break}}emitPressEvent(t,n,r,i,o){const s=this.gesturesRegistry.getActiveGestures(t),a=i.timeStamp-this.state.startTime,c={gestureName:this.name,centroid:o,target:i.target,srcEvent:i,phase:n,pointers:r,timeStamp:i.timeStamp,x:o.x,y:o.y,duration:a,activeGestures:s,customData:this.customData},l=On(this.name,n),u=new CustomEvent(l,{bubbles:!0,cancelable:!0,detail:c});t.dispatchEvent(u),this.preventDefault&&i.preventDefault(),this.stopPropagation&&i.stopPropagation()}cancelPress(t,n,r){if(this.isActive&&this.state.pressThresholdReached){const i=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(t??this.element,"cancel",n,r,i),this.emitPressEvent(t??this.element,"end",n,r,i)}this.resetState()}}class _s extends hr{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 _s(L({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,n){const r=Array.from(t.values()),i=this.getTargetElement(n);if(!i)return;const o=this.getRelevantPointers(r,i);if(this.shouldPreventGesture(i)||o.length<this.minPointers||o.length>this.maxPointers){this.isActive&&this.cancelTap(i,o,n);return}switch(n.type){case"pointerdown":this.isActive||(this.state.startCentroid=bt(o),this.state.lastPosition=L({},this.state.startCentroid),this.isActive=!0,this.originalTarget=i);break;case"pointermove":if(this.isActive&&this.state.startCentroid){const s=bt(o);this.state.lastPosition=s;const a=s.x-this.state.startCentroid.x,c=s.y-this.state.startCentroid.y;Math.sqrt(a*a+c*c)>this.maxDistance&&this.cancelTap(i,o,n)}break;case"pointerup":if(this.isActive){this.state.currentTapCount+=1;const s=this.state.lastPosition||this.state.startCentroid;if(!s){this.cancelTap(i,o,n);return}this.state.currentTapCount>=this.taps?(this.fireTapEvent(i,o,n,s),this.resetState()):(this.state.lastTapTime=n.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(i,o,n);break}}fireTapEvent(t,n,r,i){const o=this.gesturesRegistry.getActiveGestures(t),s={gestureName:this.name,centroid:i,target:r.target,srcEvent:r,phase:"end",pointers:n,timeStamp:r.timeStamp,x:i.x,y:i.y,tapCount:this.state.currentTapCount,activeGestures:o,customData:this.customData},a=new CustomEvent(this.name,{bubbles:!0,cancelable:!0,detail:s});t.dispatchEvent(a),this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation()}cancelTap(t,n,r){if(this.state.startCentroid||this.state.lastPosition){const i=this.state.lastPosition||this.state.startCentroid,o=this.gesturesRegistry.getActiveGestures(t),s={gestureName:this.name,centroid:i,target:r.target,srcEvent:r,phase:"cancel",pointers:n,timeStamp:r.timeStamp,x:i.x,y:i.y,tapCount:this.state.currentTapCount,activeGestures:o,customData:this.customData},a=On(this.name,"cancel"),c=new CustomEvent(a,{bubbles:!0,cancelable:!0,detail:s});t.dispatchEvent(c)}this.resetState()}}class Rs extends yu{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 Rs(L({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,n,r,i){super.init(t,n,r,i),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 n=this.pointerManager.getPointers()||new Map,r=Array.from(n.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(i=>{this.state[i]<this.min&&(this.state[i]=this.min),this.state[i]>this.max&&(this.state[i]=this.max)}),this.emitWheelEvent(r,t)}emitWheelEvent(t,n){const r=t.length>0?bt(t):{x:n.clientX,y:n.clientY},i=this.gesturesRegistry.getActiveGestures(this.element),o={gestureName:this.name,centroid:r,target:n.target,srcEvent:n,phase:"ongoing",pointers:t,timeStamp:n.timeStamp,deltaX:n.deltaX*this.sensitivity*(this.invert?-1:1),deltaY:n.deltaY*this.sensitivity*(this.invert?-1:1),deltaZ:n.deltaZ*this.sensitivity*(this.invert?-1:1),deltaMode:n.deltaMode,totalDeltaX:this.state.totalDeltaX,totalDeltaY:this.state.totalDeltaY,totalDeltaZ:this.state.totalDeltaZ,activeGestures:i,customData:this.customData};this.preventDefault&&n.preventDefault(),this.stopPropagation&&n.stopPropagation();const s=On(this.name,"ongoing"),a=new CustomEvent(s,{bubbles:!0,cancelable:!0,detail:o});this.element.dispatchEvent(a)}}const dn=e=>e.preventDefault(),Ms=({svgRef:e})=>{k.useEffect(()=>{const n=e.current;if(!n)return;const r=new xg({gestures:[new ws({name:"pan",threshold:0,maxPointers:1}),new Es({name:"move",preventIf:["pan","pinch"]}),new Ts({name:"pinch",threshold:5,preventIf:["pan"]}),new Rs({name:"turnWheel",sensitivity:.01,initialDelta:1}),new _s({name:"tap",maxDistance:10,preventIf:["pan","pinch"]}),new Cs({name:"quickPress",duration:50,maxDistance:10})]});return r.registerElement(["pan","move","pinch","turnWheel","tap","quickPress"],n),()=>{r.destroy()}},[e]);const t=k.useCallback((n,r,i)=>{const o=e.current;return o==null||o.addEventListener(n,r,i),{cleanup:()=>o==null?void 0:o.removeEventListener(n,r)}},[e]);return k.useEffect(()=>{const n=e.current;return n==null||n.addEventListener("gesturestart",dn),n==null||n.addEventListener("gesturechange",dn),n==null||n.addEventListener("gestureend",dn),()=>{n==null||n.removeEventListener("gesturestart",dn),n==null||n.removeEventListener("gesturechange",dn),n==null||n.removeEventListener("gestureend",dn)}},[e]),{instance:{addInteractionListener:t}}};Ms.params={};Ms.getInitialState=()=>({});const Cg=[Ss,vs,Pi,Di,Ms,Oi],_g=["apiRef"],Rg=e=>{let{plugins:t}=e,n=kt(e.props,_g);const r={};t.forEach(s=>{Object.assign(r,s.params)});const i={};return Object.keys(n).forEach(s=>{const a=n[s];r[s]&&(i[s]=a)}),t.reduce((s,a)=>a.getDefaultizedParams?a.getDefaultizedParams({params:s}):s,i)};let Xa=0;function Mg(e,t,n){const r=fm(),i=k.useMemo(()=>[...Cg,...e],[e]),o=Rg({plugins:i,props:t});o.id=o.id??r;const a=k.useRef({}).current,c=Ig(t.apiRef),l=k.useRef(null),u=k.useRef(null),d=k.useRef(null);if(d.current==null){Xa+=1;const m={cacheKey:{id:Xa}};i.forEach(p=>{p.getInitialState&&Object.assign(m,p.getInitialState(o,m,n))}),d.current=new pm(m)}const h=m=>{const p=m({instance:a,params:o,plugins:i,store:d.current,svgRef:u,chartRootRef:l,seriesConfig:n});p.publicAPI&&Object.assign(c.current,p.publicAPI),p.instance&&Object.assign(a,p.instance)};return i.forEach(h),{contextValue:k.useMemo(()=>({store:d.current,publicAPI:c.current,instance:a,svgRef:u,chartRootRef:l}),[a,c])}}function jg(e){return e.current==null&&(e.current={}),e}function Ig(e){const t=k.useRef({});return e?jg(e):t}const js=k.createContext(null);process.env.NODE_ENV!=="production"&&(js.displayName="ChartContext");const Za=new Set;function Qn(e,t="warning"){if(process.env.NODE_ENV==="production")return;const n=Array.isArray(e)?e.join(`
112
+ `):e;Za.has(n)||(Za.add(n),t==="error"?console.error(n):console.warn(n))}function kg(e){const{componentName:t,propName:n,controlled:r,defaultValue:i,warningPrefix:o="MUI X"}=e,[{initialDefaultValue:s,isControlled:a}]=k.useState({initialDefaultValue:i,isControlled:r!==void 0});a!==(r!==void 0)&&Qn([`${o}: A component is changing the ${a?"":"un"}controlled ${n} state of ${t} to be ${a?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"],"error"),JSON.stringify(s)!==JSON.stringify(i)&&Qn([`${o}: A component is changing the default ${n} state of an uncontrolled ${t} after being initialized. To suppress this warning opt to use a controlled ${t}.`],"error")}const xu=process.env.NODE_ENV==="production"?()=>{}:kg,bu=4,vu=20+2*bu,Ag=40+2*bu,Og="hover",kr={minStart:0,maxEnd:100,step:5,minSpan:10,maxSpan:100,panning:!0,filterMode:"keep",slider:{enabled:!1,preview:!1,size:vu,showTooltip:Og}},Is=(e,t,n)=>{var r;if(e)return e===!0?L({axisId:t,axisDirection:n},kr):L({axisId:t,axisDirection:n},kr,e,{slider:L({},kr.slider,{size:((r=e.slider)==null?void 0:r.preview)??kr.slider.preview?Ag:vu},e.slider)})};function Su(e,t){const n={top:0,bottom:0,none:0};return(e&&e.length>0?e:[{id:Um,scaleType:"linear"}]).map((o,s)=>{var f;const a=o.dataKey,c=s===0?"bottom":"none",l=o.position??c,u=qm+(o.label?cu:0),d=o.id??`defaultized-x-axis-${s}`,h=L({offset:n[l]},o,{id:d,position:l,height:o.height??u,zoom:Is(o.zoom,d,"x")});if(l!=="none"&&(n[l]+=h.height,(f=h.zoom)!=null&&f.slider.enabled&&(n[l]+=h.zoom.slider.size)),a===void 0||o.data!==void 0)return h;if(t===void 0)throw new Error("MUI X Charts: x-axis uses `dataKey` but no `dataset` is provided.");return L({},h,{data:t.map(m=>m[a])})})}function Eu(e,t){const n={right:0,left:0,none:0};return(e&&e.length>0?e:[{id:Wm,scaleType:"linear"}]).map((o,s)=>{var f;const a=o.dataKey,c=s===0?"left":"none",l=o.position??c,u=Ym+(o.label?cu:0),d=o.id??`defaultized-y-axis-${s}`,h=L({offset:n[l]},o,{id:d,position:l,width:o.width??u,zoom:Is(o.zoom,d,"y")});if(l!=="none"&&(n[l]+=h.width,(f=h.zoom)!=null&&f.slider.enabled&&(n[l]+=h.zoom.slider.size)),a===void 0||o.data!==void 0)return h;if(t===void 0)throw new Error("MUI X Charts: y-axis uses `dataKey` but no `dataset` is provided.");return L({},h,{data:t.map(m=>m[a])})})}function Wr(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Pg(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ks(e){let t,n,r;e.length!==2?(t=Wr,n=(a,c)=>Wr(e(a),c),r=(a,c)=>e(a)-c):(t=e===Wr||e===Pg?e:Dg,n=e,r=e);function i(a,c,l=0,u=a.length){if(l<u){if(t(c,c)!==0)return u;do{const d=l+u>>>1;n(a[d],c)<0?l=d+1:u=d}while(l<u)}return l}function o(a,c,l=0,u=a.length){if(l<u){if(t(c,c)!==0)return u;do{const d=l+u>>>1;n(a[d],c)<=0?l=d+1:u=d}while(l<u)}return l}function s(a,c,l=0,u=a.length){const d=i(a,c,l,u-1);return d>l&&r(a[d-1],c)>-r(a[d],c)?d-1:d}return{left:i,center:s,right:o}}function Dg(){return 0}function $g(e){return e===null?NaN:+e}const Ng=ks(Wr),wu=Ng.right;ks($g).center;class Qa extends Map{constructor(t,n=Fg){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(el(this,t))}has(t){return super.has(el(this,t))}set(t,n){return super.set(Lg(this,t),n)}delete(t){return super.delete(zg(this,t))}}function el({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Lg({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function zg({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Fg(e){return e!==null&&typeof e=="object"?e.valueOf():e}const Bg=Math.sqrt(50),Vg=Math.sqrt(10),Gg=Math.sqrt(2);function ti(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),s=o>=Bg?10:o>=Vg?5:o>=Gg?2:1;let a,c,l;return i<0?(l=Math.pow(10,-i)/s,a=Math.round(e*l),c=Math.round(t*l),a/l<e&&++a,c/l>t&&--c,l=-l):(l=Math.pow(10,i)*s,a=Math.round(e/l),c=Math.round(t/l),a*l<e&&++a,c*l>t&&--c),c<a&&.5<=n&&n<2?ti(e,t,n*2):[a,c,l]}function Yo(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,s]=r?ti(t,e,n):ti(e,t,n);if(!(o>=i))return[];const a=o-i+1,c=new Array(a);if(r)if(s<0)for(let l=0;l<a;++l)c[l]=(o-l)/-s;else for(let l=0;l<a;++l)c[l]=(o-l)*s;else if(s<0)for(let l=0;l<a;++l)c[l]=(i+l)/-s;else for(let l=0;l<a;++l)c[l]=(i+l)*s;return c}function qo(e,t,n){return t=+t,e=+e,n=+n,ti(e,t,n)[2]}function Jo(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?qo(t,e,n):qo(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function Ug(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function $t(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Wg(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 tl=Symbol("implicit");function ni(){var e=new Qa,t=[],n=[],r=tl;function i(o){let s=e.get(o);if(s===void 0){if(r!==tl)return r;e.set(o,s=t.push(o)-1)}return n[s%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new Qa;for(const s of o)e.has(s)||e.set(s,t.push(s)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return ni(t,n).unknown(r)},$t.apply(i,arguments),i}function As(){var e=ni().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,s,a=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var h=t().length,f=i<r,m=f?i:r,p=f?r:i;o=(p-m)/Math.max(1,h-c+l*2),a&&(o=Math.floor(o)),m+=(p-m-o*(h-c))*u,s=o*(1-c),a&&(m=Math.round(m),s=Math.round(s));var b=Ug(h).map(function(v){return m+o*v});return n(f?b.reverse():b)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,a=!0,d()},e.bandwidth=function(){return s},e.step=function(){return o},e.round=function(h){return arguments.length?(a=!!h,d()):a},e.padding=function(h){return arguments.length?(c=Math.min(1,l=+h),d()):c},e.paddingInner=function(h){return arguments.length?(c=Math.min(1,h),d()):c},e.paddingOuter=function(h){return arguments.length?(l=+h,d()):l},e.align=function(h){return arguments.length?(u=Math.max(0,Math.min(1,h)),d()):u},e.copy=function(){return As(t(),[r,i]).round(a).paddingInner(c).paddingOuter(l).align(u)},$t.apply(d(),arguments)}function Tu(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Tu(t())},e}function Hg(){return Tu(As.apply(null,arguments).paddingInner(1))}function Os(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Cu(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function fr(){}var er=.7,ri=1/er,bn="\\s*([+-]?\\d+)\\s*",tr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ot="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Yg=/^#([0-9a-f]{3,8})$/,qg=new RegExp(`^rgb\\(${bn},${bn},${bn}\\)$`),Jg=new RegExp(`^rgb\\(${ot},${ot},${ot}\\)$`),Kg=new RegExp(`^rgba\\(${bn},${bn},${bn},${tr}\\)$`),Xg=new RegExp(`^rgba\\(${ot},${ot},${ot},${tr}\\)$`),Zg=new RegExp(`^hsl\\(${tr},${ot},${ot}\\)$`),Qg=new RegExp(`^hsla\\(${tr},${ot},${ot},${tr}\\)$`),nl={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};Os(fr,nr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:rl,formatHex:rl,formatHex8:e0,formatHsl:t0,formatRgb:il,toString:il});function rl(){return this.rgb().formatHex()}function e0(){return this.rgb().formatHex8()}function t0(){return _u(this).formatHsl()}function il(){return this.rgb().formatRgb()}function nr(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Yg.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?ol(t):n===3?new Ne(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ar(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ar(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=qg.exec(e))?new Ne(t[1],t[2],t[3],1):(t=Jg.exec(e))?new Ne(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Kg.exec(e))?Ar(t[1],t[2],t[3],t[4]):(t=Xg.exec(e))?Ar(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Zg.exec(e))?ll(t[1],t[2]/100,t[3]/100,1):(t=Qg.exec(e))?ll(t[1],t[2]/100,t[3]/100,t[4]):nl.hasOwnProperty(e)?ol(nl[e]):e==="transparent"?new Ne(NaN,NaN,NaN,0):null}function ol(e){return new Ne(e>>16&255,e>>8&255,e&255,1)}function Ar(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ne(e,t,n,r)}function n0(e){return e instanceof fr||(e=nr(e)),e?(e=e.rgb(),new Ne(e.r,e.g,e.b,e.opacity)):new Ne}function Ko(e,t,n,r){return arguments.length===1?n0(e):new Ne(e,t,n,r??1)}function Ne(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Os(Ne,Ko,Cu(fr,{brighter(e){return e=e==null?ri:Math.pow(ri,e),new Ne(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?er:Math.pow(er,e),new Ne(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ne(Gt(this.r),Gt(this.g),Gt(this.b),ii(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:sl,formatHex:sl,formatHex8:r0,formatRgb:al,toString:al}));function sl(){return`#${Bt(this.r)}${Bt(this.g)}${Bt(this.b)}`}function r0(){return`#${Bt(this.r)}${Bt(this.g)}${Bt(this.b)}${Bt((isNaN(this.opacity)?1:this.opacity)*255)}`}function al(){const e=ii(this.opacity);return`${e===1?"rgb(":"rgba("}${Gt(this.r)}, ${Gt(this.g)}, ${Gt(this.b)}${e===1?")":`, ${e})`}`}function ii(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Gt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Bt(e){return e=Gt(e),(e<16?"0":"")+e.toString(16)}function ll(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Je(e,t,n,r)}function _u(e){if(e instanceof Je)return new Je(e.h,e.s,e.l,e.opacity);if(e instanceof fr||(e=nr(e)),!e)return new Je;if(e instanceof Je)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=NaN,a=o-i,c=(o+i)/2;return a?(t===o?s=(n-r)/a+(n<r)*6:n===o?s=(r-t)/a+2:s=(t-n)/a+4,a/=c<.5?o+i:2-o-i,s*=60):a=c>0&&c<1?0:s,new Je(s,a,c,e.opacity)}function i0(e,t,n,r){return arguments.length===1?_u(e):new Je(e,t,n,r??1)}function Je(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Os(Je,i0,Cu(fr,{brighter(e){return e=e==null?ri:Math.pow(ri,e),new Je(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?er:Math.pow(er,e),new Je(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,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Ne(Eo(e>=240?e-240:e+120,i,r),Eo(e,i,r),Eo(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Je(cl(this.h),Or(this.s),Or(this.l),ii(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=ii(this.opacity);return`${e===1?"hsl(":"hsla("}${cl(this.h)}, ${Or(this.s)*100}%, ${Or(this.l)*100}%${e===1?")":`, ${e})`}`}}));function cl(e){return e=(e||0)%360,e<0?e+360:e}function Or(e){return Math.max(0,Math.min(1,e||0))}function Eo(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Ps=e=>()=>e;function o0(e,t){return function(n){return e+n*t}}function s0(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function a0(e){return(e=+e)==1?Ru:function(t,n){return n-t?s0(t,n,e):Ps(isNaN(t)?n:t)}}function Ru(e,t){var n=t-e;return n?o0(e,n):Ps(isNaN(e)?t:e)}const ul=function e(t){var n=a0(t);function r(i,o){var s=n((i=Ko(i)).r,(o=Ko(o)).r),a=n(i.g,o.g),c=n(i.b,o.b),l=Ru(i.opacity,o.opacity);return function(u){return i.r=s(u),i.g=a(u),i.b=c(u),i.opacity=l(u),i+""}}return r.gamma=e,r}(1);function l0(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function c0(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function u0(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),s;for(s=0;s<r;++s)i[s]=Ni(e[s],t[s]);for(;s<n;++s)o[s]=t[s];return function(a){for(s=0;s<r;++s)o[s]=i[s](a);return o}}function Ds(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Ke(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function d0(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Ni(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Xo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,wo=new RegExp(Xo.source,"g");function h0(e){return function(){return e}}function f0(e){return function(t){return e(t)+""}}function p0(e,t){var n=Xo.lastIndex=wo.lastIndex=0,r,i,o,s=-1,a=[],c=[];for(e=e+"",t=t+"";(r=Xo.exec(e))&&(i=wo.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,c.push({i:s,x:Ke(r,i)})),n=wo.lastIndex;return n<t.length&&(o=t.slice(n),a[s]?a[s]+=o:a[++s]=o),a.length<2?c[0]?f0(c[0].x):h0(t):(t=c.length,function(l){for(var u=0,d;u<t;++u)a[(d=c[u]).i]=d.x(l);return a.join("")})}function Ni(e,t){var n=typeof t,r;return t==null||n==="boolean"?Ps(t):(n==="number"?Ke:n==="string"?(r=nr(t))?(t=r,ul):p0:t instanceof nr?ul:t instanceof Date?Ds:c0(t)?l0:Array.isArray(t)?u0:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?d0:Ke)(e,t)}function Mu(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function m0(e){return function(){return e}}function g0(e){return+e}var dl=[0,1];function Ue(e){return e}function Zo(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:m0(isNaN(t)?NaN:.5)}function y0(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function x0(e,t,n){var r=e[0],i=e[1],o=t[0],s=t[1];return i<r?(r=Zo(i,r),o=n(s,o)):(r=Zo(r,i),o=n(o,s)),function(a){return o(r(a))}}function b0(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),s=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<r;)i[s]=Zo(e[s],e[s+1]),o[s]=n(t[s],t[s+1]);return function(a){var c=wu(e,a,1,r)-1;return o[c](i[c](a))}}function Li(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function $s(){var e=dl,t=dl,n=Ni,r,i,o,s=Ue,a,c,l;function u(){var h=Math.min(e.length,t.length);return s!==Ue&&(s=y0(e[0],e[h-1])),a=h>2?b0:x0,c=l=null,d}function d(h){return h==null||isNaN(h=+h)?o:(c||(c=a(e.map(r),t,n)))(r(s(h)))}return d.invert=function(h){return s(i((l||(l=a(t,e.map(r),Ke)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,g0),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),n=Mu,u()},d.clamp=function(h){return arguments.length?(s=h?!0:Ue,u()):s!==Ue},d.interpolate=function(h){return arguments.length?(n=h,u()):n},d.unknown=function(h){return arguments.length?(o=h,d):o},function(h,f){return r=h,i=f,u()}}function ju(){return $s()(Ue,Ue)}function v0(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function oi(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function wn(e){return e=oi(Math.abs(e)),e?e[1]:NaN}function S0(e,t){return function(n,r){for(var i=n.length,o=[],s=0,a=e[0],c=0;i>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),o.push(n.substring(i-=a,i+a)),!((c+=a+1)>r));)a=e[s=(s+1)%e.length];return o.reverse().join(t)}}function E0(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var w0=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function rr(e){if(!(t=w0.exec(e)))throw new Error("invalid format: "+e);var t;return new Ns({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]})}rr.prototype=Ns.prototype;function Ns(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+""}Ns.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 T0(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Iu;function C0(e,t){var n=oi(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(Iu=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+oi(e,Math.max(0,t+o-1))[0]}function hl(e,t){var n=oi(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const fl={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:v0,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)=>hl(e*100,t),r:hl,s:C0,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function pl(e){return e}var ml=Array.prototype.map,gl=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function _0(e){var t=e.grouping===void 0||e.thousands===void 0?pl:S0(ml.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?pl:E0(ml.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",a=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function l(d){d=rr(d);var h=d.fill,f=d.align,m=d.sign,p=d.symbol,b=d.zero,v=d.width,M=d.comma,S=d.precision,T=d.trim,C=d.type;C==="n"?(M=!0,C="g"):fl[C]||(S===void 0&&(S=12),T=!0,C="g"),(b||h==="0"&&f==="=")&&(b=!0,h="0",f="=");var w=p==="$"?n:p==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():"",E=p==="$"?r:/[%p]/.test(C)?s:"",j=fl[C],O=/[defgprs%]/.test(C);S=S===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function y(_){var A=w,I=E,P,U,B;if(C==="c")I=j(_)+I,_="";else{_=+_;var W=_<0||1/_<0;if(_=isNaN(_)?c:j(Math.abs(_),S),T&&(_=T0(_)),W&&+_==0&&m!=="+"&&(W=!1),A=(W?m==="("?m:a:m==="-"||m==="("?"":m)+A,I=(C==="s"?gl[8+Iu/3]:"")+I+(W&&m==="("?")":""),O){for(P=-1,U=_.length;++P<U;)if(B=_.charCodeAt(P),48>B||B>57){I=(B===46?i+_.slice(P+1):_.slice(P))+I,_=_.slice(0,P);break}}}M&&!b&&(_=t(_,1/0));var F=A.length+_.length+I.length,H=F<v?new Array(v-F+1).join(h):"";switch(M&&b&&(_=t(H+_,H.length?v-I.length:1/0),H=""),f){case"<":_=A+_+I+H;break;case"=":_=A+H+_+I;break;case"^":_=H.slice(0,F=H.length>>1)+A+_+I+H.slice(F);break;default:_=H+A+_+I;break}return o(_)}return y.toString=function(){return d+""},y}function u(d,h){var f=l((d=rr(d),d.type="f",d)),m=Math.max(-8,Math.min(8,Math.floor(wn(h)/3)))*3,p=Math.pow(10,-m),b=gl[8+m/3];return function(v){return f(p*v)+b}}return{format:l,formatPrefix:u}}var Pr,Ls,ku;R0({thousands:",",grouping:[3],currency:["$",""]});function R0(e){return Pr=_0(e),Ls=Pr.format,ku=Pr.formatPrefix,Pr}function M0(e){return Math.max(0,-wn(Math.abs(e)))}function j0(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(wn(t)/3)))*3-wn(Math.abs(e)))}function I0(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,wn(t)-wn(e))+1}function k0(e,t,n,r){var i=Jo(e,t,n),o;switch(r=rr(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=j0(i,s))&&(r.precision=o),ku(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=I0(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=M0(i))&&(r.precision=o-(r.type==="%")*2);break}}return Ls(r)}function zs(e){var t=e.domain;return e.ticks=function(n){var r=t();return Yo(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return k0(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,s=r[i],a=r[o],c,l,u=10;for(a<s&&(l=s,s=a,a=l,l=i,i=o,o=l);u-- >0;){if(l=qo(s,a,n),l===c)return r[i]=s,r[o]=a,t(r);if(l>0)s=Math.floor(s/l)*l,a=Math.ceil(a/l)*l;else if(l<0)s=Math.ceil(s*l)/l,a=Math.floor(a*l)/l;else break;c=l}return e},e}function Au(){var e=ju();return e.copy=function(){return Li(e,Au())},$t.apply(e,arguments),zs(e)}function Ou(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],s;return o<i&&(s=n,n=r,r=s,s=i,i=o,o=s),e[n]=t.floor(i),e[r]=t.ceil(o),e}function yl(e){return Math.log(e)}function xl(e){return Math.exp(e)}function A0(e){return-Math.log(-e)}function O0(e){return-Math.exp(-e)}function P0(e){return isFinite(e)?+("1e"+e):e<0?0:e}function D0(e){return e===10?P0:e===Math.E?Math.exp:t=>Math.pow(e,t)}function $0(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 bl(e){return(t,n)=>-e(-t,n)}function N0(e){const t=e(yl,xl),n=t.domain;let r=10,i,o;function s(){return i=$0(r),o=D0(r),n()[0]<0?(i=bl(i),o=bl(o),e(A0,O0)):e(yl,xl),t}return t.base=function(a){return arguments.length?(r=+a,s()):r},t.domain=function(a){return arguments.length?(n(a),s()):n()},t.ticks=a=>{const c=n();let l=c[0],u=c[c.length-1];const d=u<l;d&&([l,u]=[u,l]);let h=i(l),f=i(u),m,p;const b=a==null?10:+a;let v=[];if(!(r%1)&&f-h<b){if(h=Math.floor(h),f=Math.ceil(f),l>0){for(;h<=f;++h)for(m=1;m<r;++m)if(p=h<0?m/o(-h):m*o(h),!(p<l)){if(p>u)break;v.push(p)}}else for(;h<=f;++h)for(m=r-1;m>=1;--m)if(p=h>0?m/o(-h):m*o(h),!(p<l)){if(p>u)break;v.push(p)}v.length*2<b&&(v=Yo(l,u,b))}else v=Yo(h,f,Math.min(f-h,b)).map(o);return d?v.reverse():v},t.tickFormat=(a,c)=>{if(a==null&&(a=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=rr(c)).precision==null&&(c.trim=!0),c=Ls(c)),a===1/0)return c;const l=Math.max(1,r*a/t.ticks().length);return u=>{let d=u/o(Math.round(i(u)));return d*r<r-.5&&(d*=r),d<=l?c(u):""}},t.nice=()=>n(Ou(n(),{floor:a=>o(Math.floor(i(a))),ceil:a=>o(Math.ceil(i(a)))})),t}function Pu(){const e=N0($s()).domain([1,10]);return e.copy=()=>Li(e,Pu()).base(e.base()),$t.apply(e,arguments),e}function vl(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function L0(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function z0(e){return e<0?-e*e:e*e}function F0(e){var t=e(Ue,Ue),n=1;function r(){return n===1?e(Ue,Ue):n===.5?e(L0,z0):e(vl(n),vl(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},zs(t)}function Fs(){var e=F0($s());return e.copy=function(){return Li(e,Fs()).exponent(e.exponent())},$t.apply(e,arguments),e}function B0(){return Fs.apply(null,arguments).exponent(.5)}function Du(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[wu(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var s=t.indexOf(o);return[e[s-1],e[s]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return Du().domain(e).range(t).unknown(n)},$t.apply(i,arguments)}const To=new Date,Co=new Date;function we(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const s=i(o),a=i.ceil(o);return o-s<a-o?s:a},i.offset=(o,s)=>(t(o=new Date(+o),s==null?1:Math.floor(s)),o),i.range=(o,s,a)=>{const c=[];if(o=i.ceil(o),a=a==null?1:Math.floor(a),!(o<s)||!(a>0))return c;let l;do c.push(l=new Date(+o)),t(o,a),e(o);while(l<o&&o<s);return c},i.filter=o=>we(s=>{if(s>=s)for(;e(s),!o(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;t(s,-1),!o(s););else for(;--a>=0;)for(;t(s,1),!o(s););}),n&&(i.count=(o,s)=>(To.setTime(+o),Co.setTime(+s),e(To),e(Co),Math.floor(n(To,Co))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?s=>r(s)%o===0:s=>i.count(0,s)%o===0):i)),i}const si=we(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);si.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?we(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):si);si.range;const mt=1e3,We=mt*60,gt=We*60,vt=gt*24,Bs=vt*7,Sl=vt*30,_o=vt*365,Vt=we(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*mt)},(e,t)=>(t-e)/mt,e=>e.getUTCSeconds());Vt.range;const Vs=we(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*mt)},(e,t)=>{e.setTime(+e+t*We)},(e,t)=>(t-e)/We,e=>e.getMinutes());Vs.range;const Gs=we(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*We)},(e,t)=>(t-e)/We,e=>e.getUTCMinutes());Gs.range;const Us=we(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*mt-e.getMinutes()*We)},(e,t)=>{e.setTime(+e+t*gt)},(e,t)=>(t-e)/gt,e=>e.getHours());Us.range;const Ws=we(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*gt)},(e,t)=>(t-e)/gt,e=>e.getUTCHours());Ws.range;const pr=we(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*We)/vt,e=>e.getDate()-1);pr.range;const zi=we(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/vt,e=>e.getUTCDate()-1);zi.range;const $u=we(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/vt,e=>Math.floor(e/vt));$u.range;function Jt(e){return we(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*We)/Bs)}const Fi=Jt(0),ai=Jt(1),V0=Jt(2),G0=Jt(3),Tn=Jt(4),U0=Jt(5),W0=Jt(6);Fi.range;ai.range;V0.range;G0.range;Tn.range;U0.range;W0.range;function Kt(e){return we(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Bs)}const Bi=Kt(0),li=Kt(1),H0=Kt(2),Y0=Kt(3),Cn=Kt(4),q0=Kt(5),J0=Kt(6);Bi.range;li.range;H0.range;Y0.range;Cn.range;q0.range;J0.range;const Hs=we(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());Hs.range;const Ys=we(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());Ys.range;const St=we(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());St.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:we(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});St.range;const Et=we(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());Et.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:we(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Et.range;function Nu(e,t,n,r,i,o){const s=[[Vt,1,mt],[Vt,5,5*mt],[Vt,15,15*mt],[Vt,30,30*mt],[o,1,We],[o,5,5*We],[o,15,15*We],[o,30,30*We],[i,1,gt],[i,3,3*gt],[i,6,6*gt],[i,12,12*gt],[r,1,vt],[r,2,2*vt],[n,1,Bs],[t,1,Sl],[t,3,3*Sl],[e,1,_o]];function a(l,u,d){const h=u<l;h&&([l,u]=[u,l]);const f=d&&typeof d.range=="function"?d:c(l,u,d),m=f?f.range(l,+u+1):[];return h?m.reverse():m}function c(l,u,d){const h=Math.abs(u-l)/d,f=ks(([,,b])=>b).right(s,h);if(f===s.length)return e.every(Jo(l/_o,u/_o,d));if(f===0)return si.every(Math.max(Jo(l,u,d),1));const[m,p]=s[h/s[f-1][2]<s[f][2]/h?f-1:f];return m.every(p)}return[a,c]}const[K0,X0]=Nu(Et,Ys,Bi,$u,Ws,Gs),[Z0,Q0]=Nu(St,Hs,Fi,pr,Us,Vs);function Ro(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 Mo(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 $n(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function ey(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,s=e.shortDays,a=e.months,c=e.shortMonths,l=Nn(i),u=Ln(i),d=Nn(o),h=Ln(o),f=Nn(s),m=Ln(s),p=Nn(a),b=Ln(a),v=Nn(c),M=Ln(c),S={a:W,A:F,b:H,B:ne,c:null,d:Rl,e:Rl,f:wy,g:Oy,G:Dy,H:vy,I:Sy,j:Ey,L:Lu,m:Ty,M:Cy,p:Z,q:Pe,Q:Il,s:kl,S:_y,u:Ry,U:My,V:jy,w:Iy,W:ky,x:null,X:null,y:Ay,Y:Py,Z:$y,"%":jl},T={a:ct,A:ut,b:je,B:dt,c:null,d:Ml,e:Ml,f:Fy,g:Ky,G:Zy,H:Ny,I:Ly,j:zy,L:Fu,m:By,M:Vy,p:Qe,q:Le,Q:Il,s:kl,S:Gy,u:Uy,U:Wy,V:Hy,w:Yy,W:qy,x:null,X:null,y:Jy,Y:Xy,Z:Qy,"%":jl},C={a:y,A:_,b:A,B:I,c:P,d:Cl,e:Cl,f:gy,g:Tl,G:wl,H:_l,I:_l,j:hy,L:my,m:dy,M:fy,p:O,q:uy,Q:xy,s:by,S:py,u:oy,U:sy,V:ay,w:iy,W:ly,x:U,X:B,y:Tl,Y:wl,Z:cy,"%":yy};S.x=w(n,S),S.X=w(r,S),S.c=w(t,S),T.x=w(n,T),T.X=w(r,T),T.c=w(t,T);function w(V,q){return function(K){var N=[],re=-1,Q=0,Re=V.length,Te,me,_t;for(K instanceof Date||(K=new Date(+K));++re<Re;)V.charCodeAt(re)===37&&(N.push(V.slice(Q,re)),(me=El[Te=V.charAt(++re)])!=null?Te=V.charAt(++re):me=Te==="e"?" ":"0",(_t=q[Te])&&(Te=_t(K,me)),N.push(Te),Q=re+1);return N.push(V.slice(Q,re)),N.join("")}}function E(V,q){return function(K){var N=$n(1900,void 0,1),re=j(N,V,K+="",0),Q,Re;if(re!=K.length)return null;if("Q"in N)return new Date(N.Q);if("s"in N)return new Date(N.s*1e3+("L"in N?N.L:0));if(q&&!("Z"in N)&&(N.Z=0),"p"in N&&(N.H=N.H%12+N.p*12),N.m===void 0&&(N.m="q"in N?N.q:0),"V"in N){if(N.V<1||N.V>53)return null;"w"in N||(N.w=1),"Z"in N?(Q=Mo($n(N.y,0,1)),Re=Q.getUTCDay(),Q=Re>4||Re===0?li.ceil(Q):li(Q),Q=zi.offset(Q,(N.V-1)*7),N.y=Q.getUTCFullYear(),N.m=Q.getUTCMonth(),N.d=Q.getUTCDate()+(N.w+6)%7):(Q=Ro($n(N.y,0,1)),Re=Q.getDay(),Q=Re>4||Re===0?ai.ceil(Q):ai(Q),Q=pr.offset(Q,(N.V-1)*7),N.y=Q.getFullYear(),N.m=Q.getMonth(),N.d=Q.getDate()+(N.w+6)%7)}else("W"in N||"U"in N)&&("w"in N||(N.w="u"in N?N.u%7:"W"in N?1:0),Re="Z"in N?Mo($n(N.y,0,1)).getUTCDay():Ro($n(N.y,0,1)).getDay(),N.m=0,N.d="W"in N?(N.w+6)%7+N.W*7-(Re+5)%7:N.w+N.U*7-(Re+6)%7);return"Z"in N?(N.H+=N.Z/100|0,N.M+=N.Z%100,Mo(N)):Ro(N)}}function j(V,q,K,N){for(var re=0,Q=q.length,Re=K.length,Te,me;re<Q;){if(N>=Re)return-1;if(Te=q.charCodeAt(re++),Te===37){if(Te=q.charAt(re++),me=C[Te in El?q.charAt(re++):Te],!me||(N=me(V,K,N))<0)return-1}else if(Te!=K.charCodeAt(N++))return-1}return N}function O(V,q,K){var N=l.exec(q.slice(K));return N?(V.p=u.get(N[0].toLowerCase()),K+N[0].length):-1}function y(V,q,K){var N=f.exec(q.slice(K));return N?(V.w=m.get(N[0].toLowerCase()),K+N[0].length):-1}function _(V,q,K){var N=d.exec(q.slice(K));return N?(V.w=h.get(N[0].toLowerCase()),K+N[0].length):-1}function A(V,q,K){var N=v.exec(q.slice(K));return N?(V.m=M.get(N[0].toLowerCase()),K+N[0].length):-1}function I(V,q,K){var N=p.exec(q.slice(K));return N?(V.m=b.get(N[0].toLowerCase()),K+N[0].length):-1}function P(V,q,K){return j(V,t,q,K)}function U(V,q,K){return j(V,n,q,K)}function B(V,q,K){return j(V,r,q,K)}function W(V){return s[V.getDay()]}function F(V){return o[V.getDay()]}function H(V){return c[V.getMonth()]}function ne(V){return a[V.getMonth()]}function Z(V){return i[+(V.getHours()>=12)]}function Pe(V){return 1+~~(V.getMonth()/3)}function ct(V){return s[V.getUTCDay()]}function ut(V){return o[V.getUTCDay()]}function je(V){return c[V.getUTCMonth()]}function dt(V){return a[V.getUTCMonth()]}function Qe(V){return i[+(V.getUTCHours()>=12)]}function Le(V){return 1+~~(V.getUTCMonth()/3)}return{format:function(V){var q=w(V+="",S);return q.toString=function(){return V},q},parse:function(V){var q=E(V+="",!1);return q.toString=function(){return V},q},utcFormat:function(V){var q=w(V+="",T);return q.toString=function(){return V},q},utcParse:function(V){var q=E(V+="",!0);return q.toString=function(){return V},q}}}var El={"-":"",_:" ",0:"0"},_e=/^\s*\d+/,ty=/^%/,ny=/[\\^$*+?|[\]().{}]/g;function te(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function ry(e){return e.replace(ny,"\\$&")}function Nn(e){return new RegExp("^(?:"+e.map(ry).join("|")+")","i")}function Ln(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function iy(e,t,n){var r=_e.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function oy(e,t,n){var r=_e.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function sy(e,t,n){var r=_e.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function ay(e,t,n){var r=_e.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function ly(e,t,n){var r=_e.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function wl(e,t,n){var r=_e.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Tl(e,t,n){var r=_e.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function cy(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function uy(e,t,n){var r=_e.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function dy(e,t,n){var r=_e.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Cl(e,t,n){var r=_e.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function hy(e,t,n){var r=_e.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function _l(e,t,n){var r=_e.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function fy(e,t,n){var r=_e.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function py(e,t,n){var r=_e.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function my(e,t,n){var r=_e.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function gy(e,t,n){var r=_e.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function yy(e,t,n){var r=ty.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function xy(e,t,n){var r=_e.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function by(e,t,n){var r=_e.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Rl(e,t){return te(e.getDate(),t,2)}function vy(e,t){return te(e.getHours(),t,2)}function Sy(e,t){return te(e.getHours()%12||12,t,2)}function Ey(e,t){return te(1+pr.count(St(e),e),t,3)}function Lu(e,t){return te(e.getMilliseconds(),t,3)}function wy(e,t){return Lu(e,t)+"000"}function Ty(e,t){return te(e.getMonth()+1,t,2)}function Cy(e,t){return te(e.getMinutes(),t,2)}function _y(e,t){return te(e.getSeconds(),t,2)}function Ry(e){var t=e.getDay();return t===0?7:t}function My(e,t){return te(Fi.count(St(e)-1,e),t,2)}function zu(e){var t=e.getDay();return t>=4||t===0?Tn(e):Tn.ceil(e)}function jy(e,t){return e=zu(e),te(Tn.count(St(e),e)+(St(e).getDay()===4),t,2)}function Iy(e){return e.getDay()}function ky(e,t){return te(ai.count(St(e)-1,e),t,2)}function Ay(e,t){return te(e.getFullYear()%100,t,2)}function Oy(e,t){return e=zu(e),te(e.getFullYear()%100,t,2)}function Py(e,t){return te(e.getFullYear()%1e4,t,4)}function Dy(e,t){var n=e.getDay();return e=n>=4||n===0?Tn(e):Tn.ceil(e),te(e.getFullYear()%1e4,t,4)}function $y(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+te(t/60|0,"0",2)+te(t%60,"0",2)}function Ml(e,t){return te(e.getUTCDate(),t,2)}function Ny(e,t){return te(e.getUTCHours(),t,2)}function Ly(e,t){return te(e.getUTCHours()%12||12,t,2)}function zy(e,t){return te(1+zi.count(Et(e),e),t,3)}function Fu(e,t){return te(e.getUTCMilliseconds(),t,3)}function Fy(e,t){return Fu(e,t)+"000"}function By(e,t){return te(e.getUTCMonth()+1,t,2)}function Vy(e,t){return te(e.getUTCMinutes(),t,2)}function Gy(e,t){return te(e.getUTCSeconds(),t,2)}function Uy(e){var t=e.getUTCDay();return t===0?7:t}function Wy(e,t){return te(Bi.count(Et(e)-1,e),t,2)}function Bu(e){var t=e.getUTCDay();return t>=4||t===0?Cn(e):Cn.ceil(e)}function Hy(e,t){return e=Bu(e),te(Cn.count(Et(e),e)+(Et(e).getUTCDay()===4),t,2)}function Yy(e){return e.getUTCDay()}function qy(e,t){return te(li.count(Et(e)-1,e),t,2)}function Jy(e,t){return te(e.getUTCFullYear()%100,t,2)}function Ky(e,t){return e=Bu(e),te(e.getUTCFullYear()%100,t,2)}function Xy(e,t){return te(e.getUTCFullYear()%1e4,t,4)}function Zy(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Cn(e):Cn.ceil(e),te(e.getUTCFullYear()%1e4,t,4)}function Qy(){return"+0000"}function jl(){return"%"}function Il(e){return+e}function kl(e){return Math.floor(+e/1e3)}var hn,Vu,Gu;ex({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 ex(e){return hn=ey(e),Vu=hn.format,hn.parse,Gu=hn.utcFormat,hn.utcParse,hn}function tx(e){return new Date(e)}function nx(e){return e instanceof Date?+e:+new Date(+e)}function qs(e,t,n,r,i,o,s,a,c,l){var u=ju(),d=u.invert,h=u.domain,f=l(".%L"),m=l(":%S"),p=l("%I:%M"),b=l("%I %p"),v=l("%a %d"),M=l("%b %d"),S=l("%B"),T=l("%Y");function C(w){return(c(w)<w?f:a(w)<w?m:s(w)<w?p:o(w)<w?b:r(w)<w?i(w)<w?v:M:n(w)<w?S:T)(w)}return u.invert=function(w){return new Date(d(w))},u.domain=function(w){return arguments.length?h(Array.from(w,nx)):h().map(tx)},u.ticks=function(w){var E=h();return e(E[0],E[E.length-1],w??10)},u.tickFormat=function(w,E){return E==null?C:l(E)},u.nice=function(w){var E=h();return(!w||typeof w.range!="function")&&(w=t(E[0],E[E.length-1],w??10)),w?h(Ou(E,w)):u},u.copy=function(){return Li(u,qs(e,t,n,r,i,o,s,a,c,l))},u}function Uu(){return $t.apply(qs(Z0,Q0,St,Hs,Fi,pr,Us,Vs,Vt,Vu).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function rx(){return $t.apply(qs(K0,X0,Et,Ys,Bi,zi,Ws,Gs,Vt,Gu).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function ix(){var e=0,t=1,n,r,i,o,s=Ue,a=!1,c;function l(d){return d==null||isNaN(d=+d)?c:s(i===0?.5:(d=(o(d)-n)*i,a?Math.max(0,Math.min(1,d)):d))}l.domain=function(d){return arguments.length?([e,t]=d,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),l):[e,t]},l.clamp=function(d){return arguments.length?(a=!!d,l):a},l.interpolator=function(d){return arguments.length?(s=d,l):s};function u(d){return function(h){var f,m;return arguments.length?([f,m]=h,s=d(f,m),l):[s(0),s(1)]}}return l.range=u(Ni),l.rangeRound=u(Mu),l.unknown=function(d){return arguments.length?(c=d,l):c},function(d){return o=d,n=d(e),r=d(t),i=n===r?0:1/(r-n),l}}function ox(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Wu(){var e=zs(ix()(Ue));return e.copy=function(){return ox(e,Wu())},Wg.apply(e,arguments)}function sx(e,t){return function(r,i){return i.location==="tick"?i.scale.tickFormat(e)(r):i.location==="zoom-slider-tooltip"?t.tickFormat(2)(r):`${r}`}}function ax(e){return e.scaleType==="band"}function lx(e){return e.scaleType==="point"}function cx(e){return e.type==="piecewise"?Du(e.thresholds,e.colors):Wu([e.min??0,e.max??100],e.color)}function ci(e){return e.values?ni(e.values,e.colors).unknown(e.unknownColor??null):ni(e.colors.map((t,n)=>n),e.colors).unknown(e.unknownColor??null)}function Hr(e){return e.type==="ordinal"?ci(e):cx(e)}function ux(e){const{tickMaxStep:t,tickMinStep:n,tickNumber:r,range:i,domain:o}=e,s=n===void 0?999:Math.floor(Math.abs(o[1]-o[0])/n),a=t===void 0?2:Math.ceil(Math.abs(o[1]-o[0])/t),c=r??Math.floor(Math.abs(i[1]-i[0])/50);return Math.min(s,Math.max(a,c))}function dx(e,t){return t[1]-t[0]===0?1:e/((t[1]-t[0])/100)}function Qo(e,t,n){switch(e){case"log":return Pu(t,n);case"pow":return Fs(t,n);case"sqrt":return B0(t,n);case"time":return Uu(t,n);case"utc":return rx(t,n);default:return Au(t,n)}}const Al=e=>(e==null?void 0:e[0])instanceof Date;function Ol(e,t){const n=Uu(e.data,t);return(r,{location:i})=>i==="tick"?n.tickFormat(e.tickNumber)(r):`${r.toLocaleString()}`}const jo=(e,t)=>{const n=e[1]-e[0],r=t[1]-t[0],i=e[0]-t[0]*n/r,o=e[1]+(100-t[1])*n/r;return[i,o]};let Pl,Dl;class hx{constructor(){if(this.types=new Set,Pl)throw new Error("You can only create one instance!");Pl=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}class fx{constructor(){if(this.types=new Set,Dl)throw new Error("You can only create one instance!");Dl=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}const Vi=new hx;Vi.addType("bar");Vi.addType("line");Vi.addType("scatter");const px=new fx;px.addType("radar");function Hu(e){return Vi.getTypes().has(e)}const mx=(e,t,n,r,i,o,s,a)=>{var m;const c=r==="x"?i[t].xExtremumGetter:i[t].yExtremumGetter,l=((m=s[t])==null?void 0:m.series)??{},[u,d]=(c==null?void 0:c({series:l,axis:n,axisIndex:o,isDefaultAxis:o===0,getFilters:a}))??[1/0,-1/0],[h,f]=e;return[Math.min(u,h),Math.max(d,f)]},Yu=(e,t,n,r,i,o)=>{const a=Object.keys(n).filter(Hu).reduce((c,l)=>mx(c,l,e,t,n,r,i,o),[1/0,-1/0]);return Number.isNaN(a[0])||Number.isNaN(a[1])?[1/0,-1/0]:a},gx=(e,t,n,r)=>{const i=new Set;return Object.keys(t).filter(Hu).forEach(s=>{var l,u,d;const a=((l=n[s])==null?void 0:l.series)??{},c=(d=(u=t[s]).axisTooltipGetter)==null?void 0:d.call(u,a);c!==void 0&&c.forEach(({axisId:h,direction:f})=>{f===e&&i.add(h??r)})}),i},yx=(e,t,n,r)=>{var i;if(e.domainLimit!==void 0)return e.domainLimit;if(t==="x")for(const o of((i=r.line)==null?void 0:i.seriesOrder)??[]){const s=r.line.series[o];if(s.xAxisId===e.id||s.xAxisId===void 0&&n===0)return"strict"}return"nice"};function xx(e,t,n){const r=t==="x"?[e.left,e.left+e.width]:[e.top+e.height,e.top];return n.reverse?[r[1],r[0]]:r}const bx=.2,vx=.1;function qu({drawingArea:e,formattedSeries:t,axis:n,seriesConfig:r,axisDirection:i,zoomMap:o,zoomOptions:s,getFilters:a,preferStrictDomainInLineCharts:c}){if(n===void 0)return{axis:{},axisIds:[]};const l=gx(i,r,t,n[0].id),u={};return n.forEach((d,h)=>{const f=d,m=s==null?void 0:s[f.id],p=o==null?void 0:o.get(f.id),b=p?[p.start,p.end]:[0,100],v=xx(e,i,f),[M,S]=Yu(f,i,r,h,t,p===void 0&&!m?a:void 0),T=!f.ignoreTooltip&&l.has(f.id),C=f.data??[];if(ax(f)){const W=f.categoryGapRatio??bx,F=f.barGapRatio??vx,H=i==="y"?[v[1],v[0]]:v,ne=jo(H,b);if(u[f.id]=L({offset:0,height:0,categoryGapRatio:W,barGapRatio:F,triggerTooltip:T},f,{data:C,scale:As(f.data,ne).paddingInner(W).paddingOuter(W/2),tickNumber:f.data.length,colorScale:f.colorMap&&(f.colorMap.type==="ordinal"?ci(L({values:f.data},f.colorMap)):Hr(f.colorMap))}),Al(f.data)){const Z=Ol(f,H);u[f.id].valueFormatter=f.valueFormatter??Z}}if(lx(f)){const W=i==="y"?[...v].reverse():v,F=jo(W,b);if(u[f.id]=L({offset:0,height:0,triggerTooltip:T},f,{data:C,scale:Hg(f.data,F),tickNumber:f.data.length,colorScale:f.colorMap&&(f.colorMap.type==="ordinal"?ci(L({values:f.data},f.colorMap)):Hr(f.colorMap))}),Al(f.data)){const H=Ol(f,W);u[f.id].valueFormatter=f.valueFormatter??H}}if(f.scaleType==="band"||f.scaleType==="point")return;const w=f.scaleType??"linear",E=c?yx(f,i,h,t):f.domainLimit??"nice",j=[f.min??M,f.max??S];if(typeof E=="function"){const{min:W,max:F}=E(M,S);j[0]=W,j[1]=F}const O=ux(L({},f,{range:v,domain:j})),y=dx(O,b),_=jo(v,b),A=Qo(w,j,_),I=E==="nice"?A.nice(O):A,[P,U]=I.domain(),B=[f.min??P,f.max??U];u[f.id]=L({offset:0,height:0,triggerTooltip:T},f,{data:C,scaleType:w,scale:I.domain(B),tickNumber:y,colorScale:f.colorMap&&Hr(f.colorMap),valueFormatter:f.valueFormatter??sx(y,Qo(w,v.map(W=>A.invert(W)),v))})}),{axis:u,axisIds:n.map(({id:d})=>d)}}function Sx(e){return e!=null}function Ju({zoomMap:e,zoomOptions:t,seriesConfig:n,formattedSeries:r,direction:i}){return(o,s)=>{var b;const a=t[o.id];if(!a||a.filterMode!=="discard")return null;const c=e==null?void 0:e.get(o.id);if(c===void 0||c.start<=0&&c.end>=100)return null;let l=[];const u=o.scaleType;u==="point"||u==="band"?l=[0,(((b=o.data)==null?void 0:b.length)??1)-1]:l=Yu(o,i,n,s,r);let d,h;[d,h]=Qo(!u||u==="band"||u==="point"?"linear":u,l,[0,100]).nice().domain(),d=d instanceof Date?d.getTime():d,h=h instanceof Date?h.getTime():h;const m=d+c.start*(h-d)/100,p=d+c.end*(h-d)/100;return(v,M)=>{var T;const S=v[i]??((T=o.data)==null?void 0:T[M]);return S==null?!0:o.scaleType==="point"||o.scaleType==="band"||typeof S=="string"?M>=m&&M<=p:S>=m&&S<=p}}}const Ex=e=>({currentAxisId:t,seriesXAxisId:n,seriesYAxisId:r,isDefaultAxis:i})=>(o,s)=>{var l,u;return!(t===n?r:n)||i?((u=(l=Object.values(e??{}))[0])==null?void 0:u.call(l,o,s))??!0:[r,n].filter(d=>d!==t).map(d=>e[d??""]).filter(Sx).every(d=>d(o,s))},$l=e=>(t=[])=>t.reduce((n,r)=>{const{zoom:i,id:o}=r,s=Is(i,o,e);return s&&(n[o]=s),n},{}),wx=e=>{const t=new Map;return e.forEach(n=>{t.set(n.axisId,n)}),t},Ku=e=>e.zoom;X([Ku],e=>e==null?void 0:e.isInteracting);const Gi=X([Ku],e=>(e==null?void 0:e.zoomData)&&wx(e==null?void 0:e.zoomData)),mr=X([kn,An],(e,t)=>L({},$l("x")(e),$l("y")(t)));X([mr,(e,t)=>t],(e,t)=>e[t]);const Tx=X([Gi,mr,$i,dr],(e,t,n,r)=>e&&t&&Ju({zoomMap:e,zoomOptions:t,seriesConfig:n,formattedSeries:r,direction:"x"})),Cx=X([Gi,mr,$i,dr],(e,t,n,r)=>e&&t&&Ju({zoomMap:e,zoomOptions:t,seriesConfig:n,formattedSeries:r,direction:"y"})),Xu=X([Tx,Cx,kn,An],(e,t,n,r)=>{if(e===void 0||t===void 0)return;const i=n==null?void 0:n.reduce((s,a,c)=>{const l=e(a,c);return l!==null&&(s[a.id]=l),s},{}),o=r==null?void 0:r.reduce((s,a,c)=>{const l=t(a,c);return l!==null&&(s[a.id]=l),s},{});if(!(Object.keys(i??{}).length===0&&Object.keys(o??{}).length===0))return Ex(L({},i,o))}),Xt=X([kn,ur,dr,$i,Gi,mr,Xu,fu],(e,t,n,r,i,o,s,a)=>qu({drawingArea:t,formattedSeries:n,axis:e,seriesConfig:r,axisDirection:"x",zoomMap:i,zoomOptions:o,getFilters:s,preferStrictDomainInLineCharts:a})),Zt=X([An,ur,dr,$i,Gi,mr,Xu,fu],(e,t,n,r,i,o,s,a)=>qu({drawingArea:t,formattedSeries:n,axis:e,seriesConfig:r,axisDirection:"y",zoomMap:i,zoomOptions:o,getFilters:s,preferStrictDomainInLineCharts:a}));X([Xt,Zt,(e,t)=>t],(e,t,n)=>(e==null?void 0:e.axis[n])??(t==null?void 0:t.axis[n]));X([kn,An,(e,t)=>t],(e,t,n)=>{const r=(e==null?void 0:e.find(i=>i.id===n))??(t==null?void 0:t.find(i=>i.id===n))??null;if(r)return r});function Zu(e){return e.bandwidth!==void 0}function fn(e){return e instanceof Date?e.getTime():e}function _n(e,t){const{scale:n,data:r,reverse:i}=e;if(!Zu(n)){const s=n.invert(t);if(r===void 0)return-1;const a=fn(s);return r==null?void 0:r.findIndex((l,u)=>{const d=fn(l);return d>a&&(u===0||Math.abs(a-d)<=Math.abs(a-fn(r[u-1])))||d<=a&&(u===r.length-1||Math.abs(fn(s)-d)<Math.abs(fn(s)-fn(r[u+1])))})}const o=n.bandwidth()===0?Math.floor((t-Math.min(...n.range())+n.step()/2)/n.step()):Math.floor((t-Math.min(...n.range()))/n.step());return o<0||o>=r.length?-1:i?r.length-1-o:o}function Nl(e,t,n){const{scale:r,data:i}=e;if(!Zu(r)){const o=r.invert(t);return n<0?o:i[n]}return n<0||n>=i.length?null:i[n]}function Ll(e,t){const n=e.createSVGPoint();return n.x=t.clientX,n.y=t.clientY,n.matrixTransform(e.getScreenCTM().inverse())}function yt(e){const t=k.useRef(e);return st(()=>{t.current=e}),k.useRef((...n)=>(0,t.current)(...n)).current}const _x=Object.is;function Qu(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=0,r=0;for(const i in e)if(n+=1,!_x(e[i],t[i])||!(i in t))return!1;for(const i in t)r+=1;return n===r}const Js=({store:e})=>{const t=yt(function(){e.update(s=>L({},s,{interaction:{pointer:null,item:null}}))}),n=yt(function(s){e.update(a=>{const c=a.interaction.item;return s?c===null||Object.keys(s).some(l=>s[l]!==c[l])?a:L({},a,{interaction:L({},a.interaction,{item:null})}):c===null?a:L({},a,{interaction:L({},a.interaction,{item:null})})})}),r=yt(function(s){e.update(a=>Qu(a.interaction.item,s)?a:L({},a,{interaction:L({},a.interaction,{item:s})}))}),i=yt(function(s){e.update(a=>L({},a,{interaction:L({},a.interaction,{pointer:s})}))});return{instance:{cleanInteraction:t,setItemInteraction:r,removeItemInteraction:n,setPointerCoordinate:i}}};Js.getInitialState=()=>({interaction:{item:null,pointer:null}});Js.params={};const Ks=e=>e.interaction,Rx=X([Ks],e=>e!==void 0),Mx=X([Ks],e=>(e==null?void 0:e.item)??null),ed=X([Ks],e=>(e==null?void 0:e.pointer)??null),Ui=X([ed],e=>e&&e.x),Wi=X([ed],e=>e&&e.y);X([Mx],e=>e!==null);function qn(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 i=e.length;if(i!==t.length)return!1;for(let o=0;o<i;o+=1)if(!qn(e[o],t[o]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;const i=Array.from(e.entries());for(let o=0;o<i.length;o+=1)if(!t.has(i[o][0]))return!1;for(let o=0;o<i.length;o+=1){const s=i[o];if(!qn(s[1],t.get(s[0])))return!1}return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;const i=Array.from(e.entries());for(let o=0;o<i.length;o+=1)if(!t.has(i[o][0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const i=e.length;if(i!==t.length)return!1;for(let o=0;o<i;o+=1)if(e[o]!==t[o])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const n=Object.keys(e),r=n.length;if(r!==Object.keys(t).length)return!1;for(let i=0;i<r;i+=1)if(!Object.prototype.hasOwnProperty.call(t,n[i]))return!1;for(let i=0;i<r;i+=1){const o=n[i];if(!qn(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}const Hi=(e,t)=>t;function es(e,t,n=t.axisIds[0]){return Array.isArray(n)?n.map(r=>_n(t.axis[r],e)):_n(t.axis[n],e)}const td=(e,t,n)=>{if(e===null)return null;const r=es(e,t,n);return r===-1?null:r},jx=X([Ui,Xt,Hi],td),Ix=X([Wi,Zt,Hi],td),kx=X([Ui,Wi,Xt,Zt],(e,t,n,r)=>[...e===null?[]:n.axisIds.map(i=>({axisId:i,dataIndex:es(e,n,i)})),...t===null?[]:r.axisIds.map(i=>({axisId:i,dataIndex:es(t,r,i)}))].filter(i=>i.dataIndex!==null&&i.dataIndex>=0));function nd(e,t,n,r=t.axisIds[0]){return Array.isArray(r)?r.map((i,o)=>Nl(t.axis[i],e,n[o])):Nl(t.axis[r],e,n)}X([Ui,Xt,jx,Hi],(e,t,n,r)=>e===null||n===null||t.axisIds.length===0?null:nd(e,t,n,r));X([Wi,Zt,Ix,Hi],(e,t,n,r)=>e===null||n===null||t.axisIds.length===0?null:nd(e,t,n,r));const Ax=X([Ui,Xt],(e,t)=>e===null?[]:t.axisIds.filter(n=>t.axis[n].triggerTooltip).map(n=>({axisId:n,dataIndex:_n(t.axis[n],e)})).filter(({dataIndex:n})=>n>=0),{memoizeOptions:{resultEqualityCheck:qn}}),Ox=X([Wi,Zt],(e,t)=>e===null?[]:t.axisIds.filter(n=>t.axis[n].triggerTooltip).map(n=>({axisId:n,dataIndex:_n(t.axis[n],e)})).filter(({dataIndex:n})=>n>=0),{memoizeOptions:{resultEqualityCheck:qn}});X([Ax,Ox],(e,t)=>e.length>0||t.length>0);const zl={};function Px(e,t){const n=k.useRef(zl);return n.current===zl&&(n.current=e(t)),n}const Dx=()=>{};function $x(e,t,n,r){const i=Px(Nx,{store:e,selector:t,skip:r}).current;i.effect=n,k.useEffect(i.onMount(r),[r])}function Nx(e){const{store:t,selector:n,skip:r}=e;let i=!1,o;const s=()=>{a.dispose??(a.dispose=t.subscribe(c=>{const l=n(c);a.effect(o,l),o=l}))},a={effect:Dx,dispose:null,onMount:c=>()=>{if(!c)return i||(i=!0,o=n(t.value)),s(),()=>{var l;(l=a.dispose)==null||l.call(a),a.dispose=null}}};return r||(i=!0,o=n(t.value),s()),a}const Yi=({params:e,store:t,seriesConfig:n,svgRef:r,instance:i})=>{const{xAxis:o,yAxis:s,dataset:a,onHighlightedAxisChange:c}=e;if(process.env.NODE_ENV!=="production"){const S=[...o??[],...s??[]].filter(C=>C.id).map(C=>C.id),T=new Set(S.filter((C,w)=>S.indexOf(C)!==w));T.size>0&&Qn([`MUI X Charts: The following axis ids are duplicated: ${Array.from(T).join(", ")}.`,"Please make sure that each axis has a unique id."].join(`
113
+ `),"error")}const l=$e(t,ur),u=$e(t,dr),d=$e(t,Rx),{axis:h,axisIds:f}=$e(t,Xt),{axis:m,axisIds:p}=$e(t,Zt);xu({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedAxis",controlled:e.highlightedAxis,defaultValue:void 0}),st(()=>{e.highlightedAxis!==void 0&&t.update(S=>S.controlledCartesianAxisHighlight===e.highlightedAxis?S:L({},S,{controlledCartesianAxisHighlight:e.highlightedAxis}))},[t,e.highlightedAxis]);const b=k.useRef(!0);k.useEffect(()=>{if(b.current){b.current=!1;return}t.update(S=>L({},S,{cartesianAxis:L({},S.cartesianAxis,{x:Su(o,a),y:Eu(s,a)})}))},[n,l,o,s,a,t]);const v=f[0],M=p[0];return $x(t,kx,(S,T)=>{if(!Object.is(S,T)){if(S.length!==T.length){c(T);return}S!=null&&S.some(({axisId:C,dataIndex:w},E)=>T[E].axisId!==C||T[E].dataIndex!==w)&&c(T)}},!c),k.useEffect(()=>{const S=r.current;if(!d||!S||e.disableAxisListener)return()=>{};const T=i.addInteractionListener("moveEnd",_=>{var A;_.detail.activeGestures.pan||(A=i.cleanInteraction)==null||A.call(i)}),C=i.addInteractionListener("panEnd",_=>{var A;_.detail.activeGestures.move||(A=i.cleanInteraction)==null||A.call(i)}),w=i.addInteractionListener("quickPressEnd",_=>{var A;!_.detail.activeGestures.move&&!_.detail.activeGestures.pan&&((A=i.cleanInteraction)==null||A.call(i))}),E=_=>{var U,B;const A=_.detail.srcEvent,I=_.detail.target,P=Ll(S,A);if(_.detail.srcEvent.buttons>=1&&(I!=null&&I.hasPointerCapture(_.detail.srcEvent.pointerId))&&!(I!=null&&I.closest("[data-charts-zoom-slider]"))&&(I==null||I.releasePointerCapture(_.detail.srcEvent.pointerId)),!i.isPointInside(P.x,P.y,I)){(U=i.cleanInteraction)==null||U.call(i);return}(B=i.setPointerCoordinate)==null||B.call(i,P)},j=i.addInteractionListener("move",E),O=i.addInteractionListener("pan",E),y=i.addInteractionListener("quickPress",E);return()=>{j.cleanup(),T.cleanup(),O.cleanup(),C.cleanup(),y.cleanup(),w.cleanup()}},[r,t,h,v,m,M,i,e.disableAxisListener,d]),k.useEffect(()=>{const S=r.current,T=e.onAxisClick;if(S===null||!T)return()=>{};const C=i.addInteractionListener("tap",w=>{let E=null,j=!1;const O=Ll(S,w.detail.srcEvent),y=_n(h[v],O.x);j=y!==-1,E=j?y:_n(m[M],O.y);const _=j?f[0]:p[0];if(E==null||E===-1)return;const A=(j?h:m)[_].data[E],I={};Object.keys(u).filter(P=>["bar","line"].includes(P)).forEach(P=>{var U;(U=u[P])==null||U.seriesOrder.forEach(B=>{const W=u[P].series[B],F=W.xAxisId,H=W.yAxisId,ne=j?F:H;(ne===void 0||ne===_)&&(I[B]=W.data[E])})}),T(w.detail.srcEvent,{dataIndex:E,axisValue:A,seriesValues:I})});return()=>{C.cleanup()}},[e.onAxisClick,u,r,h,f,m,p,v,M,i]),{}};Yi.params={xAxis:!0,yAxis:!0,dataset:!0,onAxisClick:!0,disableAxisListener:!0,onHighlightedAxisChange:!0,highlightedAxis:!0};Yi.getDefaultizedParams=({params:e})=>L({},e,{colors:e.colors??pu,theme:e.theme??"light",defaultizedXAxis:Su(e.xAxis,e.dataset),defaultizedYAxis:Eu(e.yAxis,e.dataset)});Yi.getInitialState=e=>L({cartesianAxis:{x:e.defaultizedXAxis,y:e.defaultizedYAxis}},e.highlightedAxis===void 0?{}:{controlledCartesianAxisHighlight:e.highlightedAxis});function Fl(e,t){return e.id!==void 0?e:L({id:t},e)}function Bl(e){return e.colorMap?L({},e,{colorScale:e.colorMap.type==="ordinal"&&e.data?ci(L({values:e.data},e.colorMap)):Hr(e.colorMap.type==="continuous"?L({min:e.min,max:e.max},e.colorMap):e.colorMap)}):e}function rd(e,t){if(!e||e.length===0)return{axis:{},axisIds:[]};const n={},r=[];return e.forEach((i,o)=>{const s=i.dataKey,a=i.id??`defaultized-z-axis-${o}`;if(s===void 0||i.data!==void 0){n[a]=Bl(Fl(i,a)),r.push(a);return}if(t===void 0)throw new Error("MUI X Charts: z-axis uses `dataKey` but no `dataset` is provided.");n[a]=Bl(Fl(L({},i,{data:t.map(c=>c[s])}),a)),r.push(a)}),{axis:n,axisIds:r}}const Xs=({params:e,store:t})=>{const{zAxis:n,dataset:r}=e,i=k.useRef(!0);return k.useEffect(()=>{if(i.current){i.current=!1;return}t.update(o=>L({},o,{zAxis:rd(n,r)}))},[n,r,t]),{}};Xs.params={zAxis:!0,dataset:!0};Xs.getInitialState=e=>({zAxis:rd(e.zAxis,e.dataset)});const Lx=e=>e,zx=X([Lx],e=>e.zAxis),qi=({store:e,params:t})=>{xu({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedItem",controlled:t.highlightedItem,defaultValue:null}),st(()=>{e.update(i=>i.highlight.item===t.highlightedItem?i:L({},i,{highlight:L({},i.highlight,{item:t.highlightedItem})}))},[e,t.highlightedItem]);const n=yt(()=>{var i;(i=t.onHighlightChange)==null||i.call(t,null),e.update(o=>L({},o,{highlight:{item:null}}))}),r=yt(i=>{var s;const o=e.getSnapshot().highlight.item;Qu(o,i)||((s=t.onHighlightChange)==null||s.call(t,i),e.update(a=>L({},a,{highlight:{item:i}})))});return{instance:{clearHighlight:n,setHighlight:r}}};qi.getDefaultizedParams=({params:e})=>L({},e,{highlightedItem:e.highlightedItem??null});qi.getInitialState=e=>({highlight:{item:e.highlightedItem}});qi.params={highlightedItem:!0,onHighlightChange:!0};const Vl=(e,t)=>t==="x"?{x:e,y:null}:{x:null,y:e},id=e=>{var c;const{axis:t,getFilters:n,isDefaultAxis:r}=e,i=n==null?void 0:n({currentAxisId:t.id,isDefaultAxis:r}),o=i?(c=t.data)==null?void 0:c.filter((l,u)=>i({x:null,y:null},u)):t.data,s=Math.min(...o??[]),a=Math.max(...o??[]);return[s,a]},od=e=>t=>{const{series:n,axis:r,getFilters:i,isDefaultAxis:o}=t;return Object.keys(n).filter(s=>{const a=e==="x"?n[s].xAxisId:n[s].yAxisId;return a===r.id||o&&a===void 0}).reduce((s,a)=>{const{stackedData:c}=n[a],l=i==null?void 0:i({currentAxisId:r.id,isDefaultAxis:o,seriesXAxisId:n[a].xAxisId,seriesYAxisId:n[a].yAxisId}),[u,d]=(c==null?void 0:c.reduce((h,f,m)=>l&&(!l(Vl(f[0],e),m)||!l(Vl(f[1],e),m))?h:[Math.min(...f,h[0]),Math.max(...f,h[1])],[1/0,-1/0]))??[1/0,-1/0];return[Math.min(u,s[0]),Math.max(d,s[1])]},[1/0,-1/0])},Fx=e=>Object.keys(e.series).some(n=>e.series[n].layout==="horizontal")?od("x")(e):id(e),Bx=e=>Object.keys(e.series).some(n=>e.series[n].layout==="horizontal")?id(e):od("y")(e);function Se(e){return function(){return e}}const Gl=Math.abs,Ie=Math.atan2,zt=Math.cos,Vx=Math.max,Io=Math.min,tt=Math.sin,gn=Math.sqrt,De=1e-12,ir=Math.PI,ui=ir/2,Yr=2*ir;function Gx(e){return e>1?0:e<-1?ir:Math.acos(e)}function Ul(e){return e>=1?ui:e<=-1?-ui:Math.asin(e)}const ts=Math.PI,ns=2*ts,Ft=1e-6,Ux=ns-Ft;function sd(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Wx(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return sd;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class Hx{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?sd:Wx(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,o,s){this._append`C${+t},${+n},${+r},${+i},${this._x1=+o},${this._y1=+s}`}arcTo(t,n,r,i,o){if(t=+t,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,a=this._y1,c=r-t,l=i-n,u=s-t,d=a-n,h=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(h>Ft)if(!(Math.abs(d*c-l*u)>Ft)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let f=r-s,m=i-a,p=c*c+l*l,b=f*f+m*m,v=Math.sqrt(p),M=Math.sqrt(h),S=o*Math.tan((ts-Math.acos((p+h-b)/(2*v*M)))/2),T=S/M,C=S/v;Math.abs(T-1)>Ft&&this._append`L${t+T*u},${n+T*d}`,this._append`A${o},${o},0,0,${+(d*f>u*m)},${this._x1=t+C*c},${this._y1=n+C*l}`}}arc(t,n,r,i,o,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let a=r*Math.cos(i),c=r*Math.sin(i),l=t+a,u=n+c,d=1^s,h=s?i-o:o-i;this._x1===null?this._append`M${l},${u}`:(Math.abs(this._x1-l)>Ft||Math.abs(this._y1-u)>Ft)&&this._append`L${l},${u}`,r&&(h<0&&(h=h%ns+ns),h>Ux?this._append`A${r},${r},0,1,${d},${t-a},${n-c}A${r},${r},0,1,${d},${this._x1=l},${this._y1=u}`:h>Ft&&this._append`A${r},${r},0,${+(h>=ts)},${d},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function Yx(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Hx(t)}function qx(e){return e.innerRadius}function Jx(e){return e.outerRadius}function Kx(e){return e.startAngle}function Xx(e){return e.endAngle}function Zx(e){return e&&e.padAngle}function Qx(e,t,n,r,i,o,s,a){var c=n-e,l=r-t,u=s-i,d=a-o,h=d*c-u*l;if(!(h*h<De))return h=(u*(t-o)-d*(e-i))/h,[e+h*c,t+h*l]}function Dr(e,t,n,r,i,o,s){var a=e-n,c=t-r,l=(s?o:-o)/gn(a*a+c*c),u=l*c,d=-l*a,h=e+u,f=t+d,m=n+u,p=r+d,b=(h+m)/2,v=(f+p)/2,M=m-h,S=p-f,T=M*M+S*S,C=i-o,w=h*p-m*f,E=(S<0?-1:1)*gn(Vx(0,C*C*T-w*w)),j=(w*S-M*E)/T,O=(-w*M-S*E)/T,y=(w*S+M*E)/T,_=(-w*M+S*E)/T,A=j-b,I=O-v,P=y-b,U=_-v;return A*A+I*I>P*P+U*U&&(j=y,O=_),{cx:j,cy:O,x01:-u,y01:-d,x11:j*(i/C-1),y11:O*(i/C-1)}}function ad(){var e=qx,t=Jx,n=Se(0),r=null,i=Kx,o=Xx,s=Zx,a=null,c=Yx(l);function l(){var u,d,h=+e.apply(this,arguments),f=+t.apply(this,arguments),m=i.apply(this,arguments)-ui,p=o.apply(this,arguments)-ui,b=Gl(p-m),v=p>m;if(a||(a=u=c()),f<h&&(d=f,f=h,h=d),!(f>De))a.moveTo(0,0);else if(b>Yr-De)a.moveTo(f*zt(m),f*tt(m)),a.arc(0,0,f,m,p,!v),h>De&&(a.moveTo(h*zt(p),h*tt(p)),a.arc(0,0,h,p,m,v));else{var M=m,S=p,T=m,C=p,w=b,E=b,j=s.apply(this,arguments)/2,O=j>De&&(r?+r.apply(this,arguments):gn(h*h+f*f)),y=Io(Gl(f-h)/2,+n.apply(this,arguments)),_=y,A=y,I,P;if(O>De){var U=Ul(O/h*tt(j)),B=Ul(O/f*tt(j));(w-=U*2)>De?(U*=v?1:-1,T+=U,C-=U):(w=0,T=C=(m+p)/2),(E-=B*2)>De?(B*=v?1:-1,M+=B,S-=B):(E=0,M=S=(m+p)/2)}var W=f*zt(M),F=f*tt(M),H=h*zt(C),ne=h*tt(C);if(y>De){var Z=f*zt(S),Pe=f*tt(S),ct=h*zt(T),ut=h*tt(T),je;if(b<ir)if(je=Qx(W,F,ct,ut,Z,Pe,H,ne)){var dt=W-je[0],Qe=F-je[1],Le=Z-je[0],V=Pe-je[1],q=1/tt(Gx((dt*Le+Qe*V)/(gn(dt*dt+Qe*Qe)*gn(Le*Le+V*V)))/2),K=gn(je[0]*je[0]+je[1]*je[1]);_=Io(y,(h-K)/(q-1)),A=Io(y,(f-K)/(q+1))}else _=A=0}E>De?A>De?(I=Dr(ct,ut,W,F,f,A,v),P=Dr(Z,Pe,H,ne,f,A,v),a.moveTo(I.cx+I.x01,I.cy+I.y01),A<y?a.arc(I.cx,I.cy,A,Ie(I.y01,I.x01),Ie(P.y01,P.x01),!v):(a.arc(I.cx,I.cy,A,Ie(I.y01,I.x01),Ie(I.y11,I.x11),!v),a.arc(0,0,f,Ie(I.cy+I.y11,I.cx+I.x11),Ie(P.cy+P.y11,P.cx+P.x11),!v),a.arc(P.cx,P.cy,A,Ie(P.y11,P.x11),Ie(P.y01,P.x01),!v))):(a.moveTo(W,F),a.arc(0,0,f,M,S,!v)):a.moveTo(W,F),!(h>De)||!(w>De)?a.lineTo(H,ne):_>De?(I=Dr(H,ne,Z,Pe,h,-_,v),P=Dr(W,F,ct,ut,h,-_,v),a.lineTo(I.cx+I.x01,I.cy+I.y01),_<y?a.arc(I.cx,I.cy,_,Ie(I.y01,I.x01),Ie(P.y01,P.x01),!v):(a.arc(I.cx,I.cy,_,Ie(I.y01,I.x01),Ie(I.y11,I.x11),!v),a.arc(0,0,h,Ie(I.cy+I.y11,I.cx+I.x11),Ie(P.cy+P.y11,P.cx+P.x11),v),a.arc(P.cx,P.cy,_,Ie(P.y11,P.x11),Ie(P.y01,P.x01),!v))):a.arc(0,0,h,C,T,v)}if(a.closePath(),u)return a=null,u+""||null}return l.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-ir/2;return[zt(d)*u,tt(d)*u]},l.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:Se(+u),l):e},l.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:Se(+u),l):t},l.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:Se(+u),l):n},l.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:Se(+u),l):r},l.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:Se(+u),l):i},l.endAngle=function(u){return arguments.length?(o=typeof u=="function"?u:Se(+u),l):o},l.padAngle=function(u){return arguments.length?(s=typeof u=="function"?u:Se(+u),l):s},l.context=function(u){return arguments.length?(a=u??null,l):a},l}function ld(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function e1(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function t1(e){return e}function n1(){var e=t1,t=e1,n=null,r=Se(0),i=Se(Yr),o=Se(0);function s(a){var c,l=(a=ld(a)).length,u,d,h=0,f=new Array(l),m=new Array(l),p=+r.apply(this,arguments),b=Math.min(Yr,Math.max(-Yr,i.apply(this,arguments)-p)),v,M=Math.min(Math.abs(b)/l,o.apply(this,arguments)),S=M*(b<0?-1:1),T;for(c=0;c<l;++c)(T=m[f[c]=c]=+e(a[c],c,a))>0&&(h+=T);for(t!=null?f.sort(function(C,w){return t(m[C],m[w])}):n!=null&&f.sort(function(C,w){return n(a[C],a[w])}),c=0,d=h?(b-l*S)/h:0;c<l;++c,p=v)u=f[c],T=m[u],v=p+(T>0?T*d:0)+S,m[u]={data:a[u],index:c,value:T,startAngle:p,endAngle:v,padAngle:M};return m}return s.value=function(a){return arguments.length?(e=typeof a=="function"?a:Se(+a),s):e},s.sortValues=function(a){return arguments.length?(t=a,n=null,s):t},s.sort=function(a){return arguments.length?(n=a,t=null,s):n},s.startAngle=function(a){return arguments.length?(r=typeof a=="function"?a:Se(+a),s):r},s.endAngle=function(a){return arguments.length?(i=typeof a=="function"?a:Se(+a),s):i},s.padAngle=function(a){return arguments.length?(o=typeof a=="function"?a:Se(+a),s):o},s}function Rn(e,t){if((s=e.length)>1)for(var n=1,r,i,o=e[t[0]],s,a=o.length;n<s;++n)for(i=o,o=e[t[n]],r=0;r<a;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Mn(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function r1(e,t){return e[t]}function i1(e){const t=[];return t.key=e,t}function cd(){var e=Se([]),t=Mn,n=Rn,r=r1;function i(o){var s=Array.from(e.apply(this,arguments),i1),a,c=s.length,l=-1,u;for(const d of o)for(a=0,++l;a<c;++a)(s[a][l]=[0,+r(d,s[a].key,l,o)]).data=d;for(a=0,u=ld(t(s));a<c;++a)s[u[a]].index=a;return n(s,u),s}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:Se(Array.from(o)),i):e},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:Se(+o),i):r},i.order=function(o){return arguments.length?(t=o==null?Mn:typeof o=="function"?o:Se(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(n=o??Rn,i):n},i}function o1(e,t){if((r=e.length)>0){for(var n,r,i=0,o=e[0].length,s;i<o;++i){for(s=n=0;n<r;++n)s+=e[n][i][1]||0;if(s)for(n=0;n<r;++n)e[n][i][1]/=s}Rn(e,t)}}function s1(e,t){if((c=e.length)>0)for(var n,r=0,i,o,s,a,c,l=e[t[0]].length;r<l;++r)for(s=a=0,n=0;n<c;++n)(o=(i=e[t[n]][r])[1]-i[0])>0?(i[0]=s,i[1]=s+=o):o<0?(i[1]=a,i[0]=a+=o):(i[0]=0,i[1]=o)}function a1(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,o=r.length;n<o;++n){for(var s=0,a=0;s<i;++s)a+=e[s][n][1]||0;r[n][1]+=r[n][0]=-a/2}Rn(e,t)}}function l1(e,t){if(!(!((s=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,s;r<o;++r){for(var a=0,c=0,l=0;a<s;++a){for(var u=e[t[a]],d=u[r][1]||0,h=u[r-1][1]||0,f=(d-h)/2,m=0;m<a;++m){var p=e[t[m]],b=p[r][1]||0,v=p[r-1][1]||0;f+=b-v}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,Rn(e,t)}}function ud(e){var t=e.map(c1);return Mn(e).sort(function(n,r){return t[n]-t[r]})}function c1(e){for(var t=-1,n=0,r=e.length,i,o=-1/0;++t<r;)(i=+e[t][1])>o&&(o=i,n=t);return n}function dd(e){var t=e.map(hd);return Mn(e).sort(function(n,r){return t[n]-t[r]})}function hd(e){for(var t=0,n=-1,r=e.length,i;++n<r;)(i=+e[n][1])&&(t+=i);return t}function u1(e){return dd(e).reverse()}function d1(e){var t=e.length,n,r,i=e.map(hd),o=ud(e),s=0,a=0,c=[],l=[];for(n=0;n<t;++n)r=o[n],s<a?(s+=i[r],c.push(r)):(a+=i[r],l.push(r));return l.reverse().concat(c)}function h1(e){return Mn(e).reverse()}const ko={appearance:ud,ascending:dd,descending:u1,insideOut:d1,none:Mn,reverse:h1},Ao={expand:o1,diverging:s1,none:Rn,silhouette:a1,wiggle:l1},fd=e=>{const{series:t,seriesOrder:n,defaultStrategy:r}=e,i=[],o={};return n.forEach(s=>{const{stack:a,stackOrder:c,stackOffset:l}=t[s];a===void 0?i.push({ids:[s],stackingOrder:ko.none,stackingOffset:Ao.none}):o[a]===void 0?(o[a]=i.length,i.push({ids:[s],stackingOrder:ko[c??(r==null?void 0:r.stackOrder)??"none"],stackingOffset:Ao[l??(r==null?void 0:r.stackOffset)??"diverging"]})):(i[o[a]].ids.push(s),c!==void 0&&(i[o[a]].stackingOrder=ko[c]),l!==void 0&&(i[o[a]].stackingOffset=Ao[l]))}),i},f1=e=>e==null?"":e.toLocaleString(),p1=(e,t)=>{const{seriesOrder:n,series:r}=e,i=fd(e),o=t??[];n.forEach(a=>{const c=r[a].data;if(c!==void 0)c.forEach((l,u)=>{o.length<=u?o.push({[a]:l}):o[u][a]=l});else if(t===void 0)throw new Error([`MUI X Charts: bar series with id='${a}' has no data.`,"Either provide a data property to the series or use the dataset prop."].join(`
114
+ `))});const s={};return i.forEach(a=>{const{ids:c,stackingOffset:l,stackingOrder:u}=a,d=cd().keys(c.map(h=>{const f=r[h].dataKey;return r[h].data===void 0&&f!==void 0?f:h})).value((h,f)=>h[f]??0).order(u).offset(l)(o);c.forEach((h,f)=>{const m=r[h].dataKey;s[h]=L({layout:"vertical",labelMarkType:"square",minBarSize:0,valueFormatter:r[h].valueFormatter??f1},r[h],{data:m?t.map(p=>{const b=p[m];return typeof b!="number"?(process.env.NODE_ENV!=="production"&&b!==null&&Qn([`MUI X Charts: your dataset key "${m}" is used for plotting bars, but contains nonnumerical elements.`,"Bar plots only support numbers and null values."]),null):b}):r[h].data,stackedData:d[f].map(([p,b])=>[p,b])})})}),{seriesOrder:n,stackingGroups:i,series:s}};function wt(e,t){return typeof e=="function"?e(t):e}const m1=e=>{const{seriesOrder:t,series:n}=e;return t.reduce((r,i)=>{const o=wt(n[i].label,"legend");return o===void 0||r.push({markType:n[i].labelMarkType,id:i,seriesId:i,color:n[i].color,label:o}),r},[])},g1=(e,t,n)=>{const r=e.layout==="vertical",i=r?t==null?void 0:t.colorScale:n==null?void 0:n.colorScale,o=r?n==null?void 0:n.colorScale:t==null?void 0:t.colorScale,s=r?t==null?void 0:t.data:n==null?void 0:n.data;return o?a=>{if(a===void 0)return e.color;const c=e.data[a],l=c===null?e.color:o(c);return l===null?e.color:l}:i&&s?a=>{if(a===void 0)return e.color;const c=s[a],l=c===null?e.color:i(c);return l===null?e.color:l}:()=>e.color},y1=e=>{const{series:t,getColor:n,identifier:r}=e;if(!r||r.dataIndex===void 0)return null;const i=wt(t.label,"tooltip"),o=t.data[r.dataIndex];if(o==null)return null;const s=t.valueFormatter(o,{dataIndex:r.dataIndex});return{identifier:r,color:n(r.dataIndex),label:i,value:o,formattedValue:s,markType:t.labelMarkType}},x1=e=>Object.values(e).map(t=>t.layout==="horizontal"?{direction:"y",axisId:t.yAxisId}:{direction:"x",axisId:t.xAxisId}),b1=(e,t,n)=>L({id:e.id??`auto-generated-id-${t}`,color:n[t%n.length]},e),v1={seriesProcessor:p1,colorProcessor:g1,legendGetter:m1,tooltipGetter:y1,axisTooltipGetter:x1,xExtremumGetter:Fx,yExtremumGetter:Bx,getSeriesWithDefaultValues:b1},di=(e,t)=>[t[0]===null?e[0]:Math.min(e[0],t[0]),t[1]===null?e[1]:Math.max(e[1],t[1])],S1=e=>{const{series:t,axis:n,isDefaultAxis:r,getFilters:i}=e;return Object.keys(t).filter(o=>{const s=t[o].xAxisId;return s===n.id||s===void 0&&r}).reduce((o,s)=>{var l;const a=i==null?void 0:i({currentAxisId:n.id,isDefaultAxis:r,seriesXAxisId:t[s].xAxisId,seriesYAxisId:t[s].yAxisId}),c=(l=t[s].data)==null?void 0:l.reduce((u,d,h)=>a&&!a(d,h)?u:di(u,[d.x,d.x]),[1/0,-1/0]);return di(o,c??[1/0,-1/0])},[1/0,-1/0])},E1=e=>{const{series:t,axis:n,isDefaultAxis:r,getFilters:i}=e;return Object.keys(t).filter(o=>{const s=t[o].yAxisId;return s===n.id||s===void 0&&r}).reduce((o,s)=>{var l;const a=i==null?void 0:i({currentAxisId:n.id,isDefaultAxis:r,seriesXAxisId:t[s].xAxisId,seriesYAxisId:t[s].yAxisId}),c=(l=t[s].data)==null?void 0:l.reduce((u,d,h)=>a&&!a(d,h)?u:di(u,[d.y,d.y]),[1/0,-1/0]);return di(o,c??[1/0,-1/0])},[1/0,-1/0])},w1=({series:e,seriesOrder:t},n)=>({series:Object.fromEntries(Object.entries(e).map(([i,o])=>{const s=o==null?void 0:o.datasetKeys,a=["x","y","id"].filter(l=>typeof(s==null?void 0:s[l])!="string");if(o!=null&&o.datasetKeys&&a.length>0)throw new Error([`MUI X Charts: scatter series with id='${i}' has incomplete datasetKeys.`,`Properties ${a.map(l=>`"${l}"`).join(", ")} are missing.`].join(`
115
+ `));const c=s?(n==null?void 0:n.map(l=>({x:l[s.x]??null,y:l[s.y]??null,z:s.z&&l[s.z],id:s.id&&l[s.id]})))??[]:o.data??[];return[i,L({labelMarkType:"circle",markerSize:4},o,{preview:L({markerSize:1},o==null?void 0:o.preview),data:c,valueFormatter:o.valueFormatter??(l=>l&&`(${l.x}, ${l.y})`)})]})),seriesOrder:t}),T1=(e,t,n,r)=>{const i=r==null?void 0:r.colorScale,o=n==null?void 0:n.colorScale,s=t==null?void 0:t.colorScale;return i?a=>{var u,d;if(a===void 0)return e.color;if(((u=r==null?void 0:r.data)==null?void 0:u[a])!==void 0){const h=i((d=r==null?void 0:r.data)==null?void 0:d[a]);if(h!==null)return h}const c=e.data[a],l=c===null?e.color:i(c.z);return l===null?e.color:l}:o?a=>{if(a===void 0)return e.color;const c=e.data[a],l=c===null?e.color:o(c.y);return l===null?e.color:l}:s?a=>{if(a===void 0)return e.color;const c=e.data[a],l=c===null?e.color:s(c.x);return l===null?e.color:l}:()=>e.color},C1=e=>{const{seriesOrder:t,series:n}=e;return t.reduce((r,i)=>{const o=wt(n[i].label,"legend");return o===void 0||r.push({markType:n[i].labelMarkType,id:i,seriesId:i,color:n[i].color,label:o}),r},[])},_1=e=>{const{series:t,getColor:n,identifier:r}=e;if(!r||r.dataIndex===void 0)return null;const i=wt(t.label,"tooltip"),o=t.data[r.dataIndex],s=t.valueFormatter(o,{dataIndex:r.dataIndex});return{identifier:r,color:n(r.dataIndex),label:i,value:o,formattedValue:s,markType:t.labelMarkType}},R1=(e,t,n)=>L({id:e.id??`auto-generated-id-${t}`,color:n[t%n.length]},e),M1={seriesProcessor:w1,colorProcessor:T1,legendGetter:C1,tooltipGetter:_1,xExtremumGetter:S1,yExtremumGetter:E1,getSeriesWithDefaultValues:R1},j1=e=>{const{axis:t}=e,n=Math.min(...t.data??[]),r=Math.max(...t.data??[]);return[n,r]};function I1(e,t,n,r){return n.reduce((i,o,s)=>{if(t[s]===null)return i;const[a,c]=e(o);return r&&(!r({y:a,x:null},s)||!r({y:c,x:null},s))?i:[Math.min(a,c,i[0]),Math.max(a,c,i[1])]},[1/0,-1/0])}const k1=e=>{const{series:t,axis:n,isDefaultAxis:r,getFilters:i}=e;return Object.keys(t).filter(o=>{const s=t[o].yAxisId;return s===n.id||r&&s===void 0}).reduce((o,s)=>{const{area:a,stackedData:c,data:l}=t[s],u=a!==void 0,d=i==null?void 0:i({currentAxisId:n.id,isDefaultAxis:r,seriesXAxisId:t[s].xAxisId,seriesYAxisId:t[s].yAxisId}),h=u&&n.scaleType!=="log"&&typeof t[s].baseline!="string"?b=>b:b=>[b[1],b[1]],f=I1(h,l,c,d),[m,p]=f;return[Math.min(m,o[0]),Math.max(p,o[1])]},[1/0,-1/0])};function A1(e,t){const n={};return Object.keys(e).forEach(r=>{n[r]=L({},e[r],{valueFormatter:e[r].valueFormatter??t})}),n}const O1=(e,t)=>{const{seriesOrder:n,series:r}=e,i=fd(L({},e,{defaultStrategy:{stackOffset:"none"}})),o=t??[];n.forEach(a=>{const c=r[a].data;if(c!==void 0)c.forEach((l,u)=>{o.length<=u?o.push({[a]:l}):o[u][a]=l});else if(t===void 0&&process.env.NODE_ENV!=="production")throw new Error([`MUI X Charts: line series with id='${a}' has no data.`,"Either provide a data property to the series or use the dataset prop."].join(`
116
+ `))});const s={};return i.forEach(a=>{const{ids:c,stackingOrder:l,stackingOffset:u}=a,d=cd().keys(c.map(h=>{const f=r[h].dataKey;return r[h].data===void 0&&f!==void 0?f:h})).value((h,f)=>h[f]??0).order(l).offset(u)(o);c.forEach((h,f)=>{const m=r[h].dataKey;s[h]=L({labelMarkType:"line"},r[h],{data:m?t.map(p=>{const b=p[m];return typeof b!="number"?(process.env.NODE_ENV!=="production"&&b!==null&&Qn([`MUI X Charts: Your dataset key "${m}" is used for plotting line, but contains nonnumerical elements.`,"Line plots only support numbers and null values."]),null):b}):r[h].data,stackedData:d[f].map(([p,b])=>[p,b])})})}),{seriesOrder:n,stackingGroups:i,series:A1(s,a=>a==null?"":a.toLocaleString())}},P1=(e,t,n)=>{const r=n==null?void 0:n.colorScale,i=t==null?void 0:t.colorScale;return r?o=>{if(o===void 0)return e.color;const s=e.data[o],a=s===null?e.color:r(s);return a===null?e.color:a}:i?o=>{var c;if(o===void 0)return e.color;const s=(c=t.data)==null?void 0:c[o],a=s===null?e.color:i(s);return a===null?e.color:a}:()=>e.color},D1=e=>{const{seriesOrder:t,series:n}=e;return t.reduce((r,i)=>{const o=wt(n[i].label,"legend");return o===void 0||r.push({markType:n[i].labelMarkType,id:i,seriesId:i,color:n[i].color,label:o}),r},[])},$1=e=>{const{series:t,getColor:n,identifier:r}=e;if(!r||r.dataIndex===void 0)return null;const i=wt(t.label,"tooltip"),o=t.data[r.dataIndex],s=t.valueFormatter(o,{dataIndex:r.dataIndex});return{identifier:r,color:n(r.dataIndex),label:i,value:o,formattedValue:s,markType:t.labelMarkType}},N1=e=>Object.values(e).map(t=>({direction:"x",axisId:t.xAxisId})),L1=(e,t,n)=>L({id:e.id??`auto-generated-id-${t}`,color:n[t%n.length]},e),z1={colorProcessor:P1,seriesProcessor:O1,legendGetter:D1,tooltipGetter:$1,axisTooltipGetter:N1,xExtremumGetter:j1,yExtremumGetter:k1,getSeriesWithDefaultValues:L1},F1=(e="none")=>{if(typeof e=="function")return e;switch(e){case"none":return null;case"desc":return(t,n)=>n-t;case"asc":return(t,n)=>t-n;default:return null}},B1=e=>{const{seriesOrder:t,series:n}=e,r={};return t.forEach(i=>{const o=n1().startAngle(2*Math.PI*(n[i].startAngle??0)/360).endAngle(2*Math.PI*(n[i].endAngle??360)/360).padAngle(2*Math.PI*(n[i].paddingAngle??0)/360).sortValues(F1(n[i].sortingValues??"none"))(n[i].data.map(s=>s.value));r[i]=L({labelMarkType:"circle",valueFormatter:s=>s.value.toLocaleString()},n[i],{data:n[i].data.map((s,a)=>L({},s,{id:s.id??`auto-generated-pie-id-${i}-${a}`},o[a])).map((s,a)=>{var c,l;return L({labelMarkType:"circle"},s,{formattedValue:((l=(c=n[i]).valueFormatter)==null?void 0:l.call(c,L({},s,{label:wt(s.label,"arc")}),{dataIndex:a}))??s.value.toLocaleString()})})})}),{seriesOrder:t,series:r}},V1=e=>t=>e.data[t].color,G1=e=>{const{seriesOrder:t,series:n}=e;return t.reduce((r,i)=>(n[i].data.forEach((o,s)=>{const a=wt(o.label,"legend");a!==void 0&&r.push({markType:o.labelMarkType??n[i].labelMarkType,id:o.id??s,seriesId:i,color:o.color,label:a,itemId:o.id??s})}),r),[])},U1=e=>{const{series:t,getColor:n,identifier:r}=e;if(!r||r.dataIndex===void 0)return null;const i=t.data[r.dataIndex];if(i==null)return null;const o=wt(i.label,"tooltip"),s=L({},i,{label:o}),a=t.valueFormatter(s,{dataIndex:r.dataIndex});return{identifier:r,color:n(r.dataIndex),label:o,value:s,formattedValue:a,markType:i.labelMarkType??t.labelMarkType}},W1=(e,t,n)=>L({id:e.id??`auto-generated-id-${t}`},e,{data:e.data.map((r,i)=>L({color:n[i%n.length]},r))}),H1={colorProcessor:V1,seriesProcessor:B1,legendGetter:G1,tooltipGetter:U1,getSeriesWithDefaultValues:W1},Y1={bar:v1,scatter:M1,line:z1,pie:H1},q1=[Xs,Yi,Js,qi];function J1(e){const{children:t,plugins:n=q1,pluginParams:r={},seriesConfig:i=Y1}=e,{contextValue:o}=Mg(n,r,i);return g.jsxRuntimeExports.jsx(js.Provider,{value:o,children:t})}const pd=()=>{const e=k.useContext(js);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(`
117
+ `));return e};function Qt(){const e=pd();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(`
118
+ `));return e.store}function md(){const e=Qt();return $e(e,ur)}function gd(){const e=Qt();return $e(e,ug)}const rs=(e,t)=>e===void 0?t:Math.PI*e/180;function K1(){const e=Qt(),{axis:t,axisIds:n}=$e(e,Xt);return{xAxis:t,xAxisIds:n}}function X1(){const e=Qt(),{axis:t,axisIds:n}=$e(e,Zt);return{yAxis:t,yAxisIds:n}}function Z1(){const e=Qt(),{axis:t,axisIds:n}=$e(e,zx)??{axis:{},axisIds:[]};return{zAxis:t,zAxisIds:n}}function Q1(){const e=pd();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(`
119
+ `));return e.svgRef}function eb(){const e=gd();return k.useCallback(t=>`${e}-gradient-${t}`,[e])}function tb(){const e=gd();return k.useCallback(t=>`${e}-gradient-${t}-object-bound`,[e])}var Oo,Wl;function nb(){if(Wl)return Oo;Wl=1;var e=4,t=.001,n=1e-7,r=10,i=11,o=1/(i-1),s=typeof Float32Array=="function";function a(p,b){return 1-3*b+3*p}function c(p,b){return 3*b-6*p}function l(p){return 3*p}function u(p,b,v){return((a(b,v)*p+c(b,v))*p+l(b))*p}function d(p,b,v){return 3*a(b,v)*p*p+2*c(b,v)*p+l(b)}function h(p,b,v,M,S){var T,C,w=0;do C=b+(v-b)/2,T=u(C,M,S)-p,T>0?v=C:b=C;while(Math.abs(T)>n&&++w<r);return C}function f(p,b,v,M){for(var S=0;S<e;++S){var T=d(b,v,M);if(T===0)return b;var C=u(b,v,M)-p;b-=C/T}return b}function m(p){return p}return Oo=function(b,v,M,S){if(!(0<=b&&b<=1&&0<=M&&M<=1))throw new Error("bezier x values must be in [0, 1] range");if(b===v&&M===S)return m;for(var T=s?new Float32Array(i):new Array(i),C=0;C<i;++C)T[C]=u(C*o,b,M);function w(E){for(var j=0,O=1,y=i-1;O!==y&&T[O]<=E;++O)j+=o;--O;var _=(E-T[O])/(T[O+1]-T[O]),A=j+_*o,I=d(A,b,M);return I>=t?f(E,A,b,M):I===0?A:h(E,j,j+o,b,M)}return function(j){return j===0?0:j===1?1:u(w(j),v,S)}},Oo}var rb=nb();const ib=hh(rb),ob=300,sb=ib(.66,0,.34,1);var jn=0,Un=0,zn=0,yd=1e3,hi,Wn,fi=0,Wt=0,Ji=0,or=typeof performance=="object"&&performance.now?performance:Date,xd=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Zs(){return Wt||(xd(ab),Wt=or.now()+Ji)}function ab(){Wt=0}function pi(){this._call=this._time=this._next=null}pi.prototype=bd.prototype={constructor:pi,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Zs():+n)+(t==null?0:+t),!this._next&&Wn!==this&&(Wn?Wn._next=this:hi=this,Wn=this),this._call=e,this._time=n,os()},stop:function(){this._call&&(this._call=null,this._time=1/0,os())}};function bd(e,t,n){var r=new pi;return r.restart(e,t,n),r}function is(){Zs(),++jn;for(var e=hi,t;e;)(t=Wt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--jn}function Hl(){Wt=(fi=or.now())+Ji,jn=Un=0;try{is()}finally{jn=0,cb(),Wt=0}}function lb(){var e=or.now(),t=e-fi;t>yd&&(Ji-=t,fi=e)}function cb(){for(var e,t=hi,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:hi=n);Wn=e,os(r)}function os(e){if(!jn){Un&&(Un=clearTimeout(Un));var t=e-Wt;t>24?(e<1/0&&(Un=setTimeout(Hl,e-or.now()-Ji)),zn&&(zn=clearInterval(zn))):(zn||(fi=or.now(),zn=setInterval(lb,yd)),jn=1,xd(Hl))}}function ub(e,t,n){var r=new pi;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}class db{constructor(t,n,r){this.duration=void 0,this.elapsed=0,this.easingFn=void 0,this.timer=null,this.onTickCallback=void 0,this.duration=t,this.easingFn=n,this.onTickCallback=r,this.resume()}get running(){return this.timer!==null}timerCallback(t){this.elapsed=Math.min(t,this.duration);const n=this.duration===0?1:this.elapsed/this.duration,r=this.easingFn(n);this.onTickCallback(r),this.elapsed>=this.duration&&this.stop()}resume(){if(this.running||this.elapsed>=this.duration)return this;const t=Zs()-this.elapsed;return this.timer=bd(n=>this.timerCallback(n),0,t),is(),this}stop(){return this.running?(this.timer&&(this.timer.stop(),this.timer=null),this):this}finish(){return this.stop(),ub(()=>this.timerCallback(this.duration)),is(),this}}function hb(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i+=1){const o=n[i];if(!Object.prototype.hasOwnProperty.call(t,o)||!Object.is(e[o],t[o]))return!1}return!0}function fb(e,{createInterpolator:t,applyProps:n,skip:r,initialProps:i=e}){const o=k.useRef(i),s=k.useRef(null),a=k.useRef(null),c=k.useRef(e);st(()=>{c.current=e},[e]),st(()=>{var d;r&&((d=s.current)==null||d.finish(),s.current=null,a.current=null,o.current=e)},[e,r]);const l=k.useCallback(d=>{const h=o.current,f=t(h,e);s.current=new db(ob,sb,m=>{const p=f(m);o.current=p,n(d,p)})},[n,t,e]);return k.useCallback(d=>{var f,m,p,b;if(d===null){(f=s.current)==null||f.stop();return}const h=a.current;if(h===d){if(hb(c.current,e)){(m=s.current)==null||m.resume();return}(p=s.current)==null||p.stop()}h&&((b=s.current)==null||b.stop()),a.current=d,(s.current||!r)&&l(d)},[l,e,r])}function pb(e,{createInterpolator:t,transformProps:n,applyProps:r,skip:i,initialProps:o=e,ref:s}){const a=n??(u=>u),c=fb(e,{initialProps:o,createInterpolator:t,applyProps:(u,d)=>r(u,a(d)),skip:i});return L({},n(i?e:o),{ref:Ai(c,s)})}function Yl(e){const{isReversed:t,gradientId:n,size:r,direction:i,scale:o,colorMap:s}=e;return r<=0?null:g.jsxRuntimeExports.jsx("linearGradient",{id:n,x1:"0",x2:"0",y1:"0",y2:"0",[`${i}${t?1:2}`]:`${r}px`,gradientUnits:"userSpaceOnUse",children:s.thresholds.map((a,c)=>{const l=o(a);if(l===void 0)return null;const u=t?1-l/r:l/r;return Number.isNaN(u)?null:g.jsxRuntimeExports.jsxs(k.Fragment,{children:[g.jsxRuntimeExports.jsx("stop",{offset:u,stopColor:s.colors[c],stopOpacity:1}),g.jsxRuntimeExports.jsx("stop",{offset:u,stopColor:s.colors[c+1],stopOpacity:1})]},a.toString()+c)})})}const mb=10;function ql(e){const{gradientUnits:t,isReversed:n,gradientId:r,size:i,direction:o,scale:s,colorScale:a,colorMap:c}=e,l=[c.min??0,c.max??100],u=l.map(s).filter(m=>m!==void 0);if(u.length!==2)return null;const d=typeof l[0]=="number"?Ke(l[0],l[1]):Ds(l[0],l[1]),h=Math.round((Math.max(...u)-Math.min(...u))/mb),f=`${l[0]}-${l[1]}-`;return g.jsxRuntimeExports.jsx("linearGradient",{id:r,x1:"0",x2:"0",y1:"0",y2:"0",[`${o}${n?1:2}`]:t==="objectBoundingBox"?1:`${i}px`,gradientUnits:t??"userSpaceOnUse",children:Array.from({length:h+1},(m,p)=>{const b=d(p/h);if(b===void 0)return null;const v=s(b);if(v===void 0)return null;const M=n?1-v/i:v/i,S=a(b);return S===null?null:g.jsxRuntimeExports.jsx("stop",{offset:M,stopColor:S,stopOpacity:1},f+p)})})}const gb=10,yb=e=>e?{x1:"1",x2:"0",y1:"0",y2:"0"}:{x1:"0",x2:"1",y1:"0",y2:"0"};function Po(e){const{isReversed:t,gradientId:n,colorScale:r,colorMap:i}=e,o=[i.min??0,i.max??100],s=typeof o[0]=="number"?Ke(o[0],o[1]):Ds(o[0],o[1]),a=gb,c=`${o[0]}-${o[1]}-`;return g.jsxRuntimeExports.jsx("linearGradient",L({id:n},yb(t),{gradientUnits:"objectBoundingBox",children:Array.from({length:a+1},(l,u)=>{const d=u/a,h=s(d);if(h===void 0)return null;const f=r(h);return f===null?null:g.jsxRuntimeExports.jsx("stop",{offset:d,stopColor:f,stopOpacity:1},c+u)})}))}function xb(){const{top:e,height:t,bottom:n,left:r,width:i,right:o}=md(),s=e+t+n,a=r+i+o,c=eb(),l=tb(),{xAxis:u,xAxisIds:d}=K1(),{yAxis:h,yAxisIds:f}=X1(),{zAxis:m,zAxisIds:p}=Z1(),b=f.filter(S=>h[S].colorMap!==void 0),v=d.filter(S=>u[S].colorMap!==void 0),M=p.filter(S=>m[S].colorMap!==void 0);return b.length===0&&v.length===0&&M.length===0?null:g.jsxRuntimeExports.jsxs("defs",{children:[b.map(S=>{const T=c(S),C=l(S),{colorMap:w,scale:E,colorScale:j,reverse:O}=h[S];return(w==null?void 0:w.type)==="piecewise"?g.jsxRuntimeExports.jsx(Yl,{isReversed:!O,scale:E,colorMap:w,size:s,gradientId:T,direction:"y"},T):(w==null?void 0:w.type)==="continuous"?g.jsxRuntimeExports.jsxs(k.Fragment,{children:[g.jsxRuntimeExports.jsx(ql,{isReversed:!O,scale:E,colorScale:j,colorMap:w,size:s,gradientId:T,direction:"y"}),g.jsxRuntimeExports.jsx(Po,{isReversed:O,colorScale:j,colorMap:w,gradientId:C})]},T):null}),v.map(S=>{const T=c(S),C=l(S),{colorMap:w,scale:E,reverse:j,colorScale:O}=u[S];return(w==null?void 0:w.type)==="piecewise"?g.jsxRuntimeExports.jsx(Yl,{isReversed:j,scale:E,colorMap:w,size:a,gradientId:T,direction:"x"},T):(w==null?void 0:w.type)==="continuous"?g.jsxRuntimeExports.jsxs(k.Fragment,{children:[g.jsxRuntimeExports.jsx(ql,{isReversed:j,scale:E,colorScale:O,colorMap:w,size:a,gradientId:T,direction:"x"}),g.jsxRuntimeExports.jsx(Po,{isReversed:j,colorScale:O,colorMap:w,gradientId:C})]},T):null}),M.map(S=>{const T=l(S),{colorMap:C,colorScale:w}=m[S];return(C==null?void 0:C.type)==="continuous"?g.jsxRuntimeExports.jsx(Po,{colorScale:w,colorMap:C,gradientId:T},T):null})]})}const bb=["children","className","title","desc"],vb=Fe("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"})),Qs=k.forwardRef(function(t,n){const r=Qt(),{width:i,height:o}=$e(r,og),{width:s,height:a}=$e(r,ig),c=Q1(),l=Ai(c,n),u=cm({props:t,name:"MuiChartsSurface"}),{children:d,className:h,title:f,desc:m}=u,p=kt(u,bb),b=o>0&&i>0;return g.jsxRuntimeExports.jsxs(vb,L({ownerState:{width:s,height:a},viewBox:`0 0 ${i} ${o}`,className:h},p,{ref:l,children:[f&&g.jsxRuntimeExports.jsx("title",{children:f}),m&&g.jsxRuntimeExports.jsx("desc",{children:m}),g.jsxRuntimeExports.jsx(xb,{}),b&&d]}))});process.env.NODE_ENV!=="production"&&(Qs.displayName="ChartsSurface");process.env.NODE_ENV!=="production"&&(Qs.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 Fn(e,t){if(typeof e=="number")return e;if(e==="100%")return t;if(e.endsWith("%")){const n=Number.parseFloat(e.slice(0,e.length-1));if(!Number.isNaN(n))return n*t/100}if(e.endsWith("px")){const n=Number.parseFloat(e.slice(0,e.length-2));if(!Number.isNaN(n))return n}throw new Error(`MUI X Charts: Received an unknown value "${e}". It should be a number, or a string with a percentage value.`)}function Do(e){const t=rs(e);return[Math.sin(t),-Math.cos(t)]}function Sb(e,t){const n=[[0,0],Do(e),Do(t)],r=Math.min(e,t),i=Math.max(e,t),o=Math.floor(r/90)*90;for(let u=1;u<=4;u+=1){const d=o+u*90;d<i&&n.push(Do(d))}const s=Math.min(...n.map(([u])=>u)),a=Math.max(...n.map(([u])=>u)),c=Math.min(...n.map(([,u])=>u)),l=Math.max(...n.map(([,u])=>u));return{cx:-s/(a-s),cy:-c/(l-c),minX:s,maxX:a,minY:c,maxY:l}}function Eb(e,t,n,r,{minX:i,maxX:o,minY:s,maxY:a}){return Math.min(...[{ratio:Math.abs(i),space:e},{ratio:Math.abs(o),space:n-e},{ratio:Math.abs(s),space:t},{ratio:Math.abs(a),space:r-t}].map(({ratio:c,space:l})=>c<1e-5?1/0:l/c))}const ea=k.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"&&(ea.displayName="GaugeContext");function wb(e){const{value:t=null,valueMin:n=0,valueMax:r=100,startAngle:i=0,endAngle:o=360,outerRadius:s,innerRadius:a,cornerRadius:c,cx:l,cy:u,children:d}=e,{left:h,top:f,width:m,height:p}=md(),b=Sb(i,o),v=l?Fn(l,m):b.cx*m,M=u?Fn(u,p):b.cy*p;let S=h+v,T=f+M;const C=Eb(v,M,m,p,b);if(l===void 0){const y=C*(b.maxX-b.minX);S=h+(m-y)/2+b.cx*y}if(u===void 0){const y=C*(b.maxY-b.minY);T=f+(p-y)/2+b.cy*y}const w=Fn(s??C,C),E=Fn(a??"80%",C),j=Fn(c??0,w-E),O=k.useMemo(()=>{const y=rs(i),_=rs(o);return{value:t,valueMin:n,valueMax:r,startAngle:y,endAngle:_,outerRadius:w,innerRadius:E,cornerRadius:j,cx:S,cy:T,maxRadius:C,valueAngle:t===null?null:y+(_-y)*(t-n)/(r-n)}},[t,n,r,i,o,w,E,j,S,T,C]);return g.jsxRuntimeExports.jsx(ea.Provider,{value:O,children:d})}function ta(){return k.useContext(ea)}const Tb=["width","height","margin","title","desc","value","valueMin","valueMax","startAngle","endAngle","outerRadius","innerRadius","cornerRadius","cx","cy","children"],Cb=Fe("g")(({theme:e})=>({"& text":{fill:(e.vars||e).palette.text.primary}})),na=k.forwardRef(function(t,n){const{width:r,height:i,margin:o,title:s,desc:a,value:c,valueMin:l=0,valueMax:u=100,startAngle:d,endAngle:h,outerRadius:f,innerRadius:m,cornerRadius:p,cx:b,cy:v,children:M}=t,S=kt(t,Tb);return g.jsxRuntimeExports.jsx(J1,{pluginParams:{width:r,height:i,margin:hu(o,{left:10,right:10,top:10,bottom:10})},plugins:[],children:g.jsxRuntimeExports.jsx(wb,{value:c,valueMin:l,valueMax:u,startAngle:d,endAngle:h,outerRadius:f,innerRadius:m,cornerRadius:p,cx:b,cy:v,children:g.jsxRuntimeExports.jsx(Qs,L({title:s,desc:a,role:"meter","aria-valuenow":c===null?void 0:c,"aria-valuemin":l,"aria-valuemax":u},S,{ref:n,children:g.jsxRuntimeExports.jsx(Cb,{"aria-hidden":"true",children:M})}))})})});process.env.NODE_ENV!=="production"&&(na.displayName="GaugeContainer");process.env.NODE_ENV!=="production"&&(na.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 _b(e){const t=Qt(),n=$e(t,Dm);return e||n}function Rb(e,t){const n=Ke(e.startAngle,t.startAngle),r=Ke(e.endAngle,t.endAngle),i=Ke(e.innerRadius,t.innerRadius),o=Ke(e.outerRadius,t.outerRadius),s=Ke(e.cornerRadius,t.cornerRadius);return a=>({startAngle:n(a),endAngle:r(a),innerRadius:i(a),outerRadius:o(a),cornerRadius:s(a)})}function Mb(e){return pb({startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius},{createInterpolator:Rb,transformProps:t=>({d:ad().cornerRadius(t.cornerRadius)({innerRadius:t.innerRadius,outerRadius:t.outerRadius,startAngle:t.startAngle,endAngle:t.endAngle})}),applyProps(t,n){t.setAttribute("d",n.d)},initialProps:{startAngle:e.startAngle,endAngle:e.startAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius},skip:e.skipAnimation,ref:e.ref})}const jb=["cx","cy","startAngle","endAngle","cornerRadius","innerRadius","outerRadius","skipAnimation"],Ib=Fe("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.primary.main}));function vd(e){const{value:t,valueMin:n,valueMax:r,startAngle:i,endAngle:o,outerRadius:s,innerRadius:a,cornerRadius:c,cx:l,cy:u}=ta();if(t===null)return null;const d=i+(t-n)/(r-n)*(o-i);return g.jsxRuntimeExports.jsx(Sd,L({},e,{cx:l,cy:u,startAngle:i,endAngle:d,cornerRadius:c,innerRadius:a,outerRadius:s}))}process.env.NODE_ENV!=="production"&&(vd.propTypes={skipAnimation:x.bool});function Sd(e){let{cx:t,cy:n,startAngle:r,endAngle:i,cornerRadius:o,innerRadius:s,outerRadius:a,skipAnimation:c}=e,l=kt(e,jb);const u=_b(c),d=Mb({startAngle:r,endAngle:i,cornerRadius:o,innerRadius:s,outerRadius:a,skipAnimation:u});return g.jsxRuntimeExports.jsx(Ib,L({},d,{transform:`translate(${t}, ${n})`},l))}process.env.NODE_ENV!=="production"&&(Sd.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 kb=Fe("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.divider}));function Ab(e){const{startAngle:t,endAngle:n,outerRadius:r,innerRadius:i,cornerRadius:o,cx:s,cy:a}=ta();return g.jsxRuntimeExports.jsx(kb,L({transform:`translate(${s}, ${a})`,d:ad().cornerRadius(o)({startAngle:t,endAngle:n,innerRadius:i,outerRadius:r})},e))}function Ob(e){return In("MuiGauge",e)}ms("MuiGauge",["root","valueArc","referenceArc","valueText"]);function Pb(){return typeof window>"u"}const $r=new Map,Db=2e3,$b={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Nb=["minWidth","maxWidth","width","minHeight","maxHeight","height","top","left","fontSize","padding","margin","paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom"],Jl="mui_measurement_span";function Ed(e,t){return Nb.indexOf(e)>=0&&t===+t?`${t}px`:t}function wd(e){return e.split("").reduce((r,i)=>i===i.toUpperCase()?[...r,"-",i.toLowerCase()]:[...r,i],[]).join("")}const Lb=e=>Object.keys(e).sort().reduce((t,n)=>`${t}${wd(n)}:${Ed(n,e[n])};`,"");let $o;const zb=(e,t={})=>{if(e==null||Pb())return{width:0,height:0};const n=`${e}`,r=Lb(t),i=`${n}-${r}`,o=$r.get(i);if(o)return o;try{let s=document.getElementById(Jl);s===null&&(s=document.createElement("span"),s.setAttribute("id",Jl),s.setAttribute("aria-hidden","true"),document.body.appendChild(s));const a=L({},$b,t);Object.keys(a).map(u=>(s.style[wd(u)]=Ed(u,a[u]),u)),s.textContent=n;const c=s.getBoundingClientRect(),l={width:c.width,height:c.height};return $r.set(i,l),$r.size+1>Db&&$r.clear(),process.env.NODE_ENV==="test"?s.textContent="":($o&&clearTimeout($o),$o=setTimeout(()=>{s.textContent=""},0)),l}catch{return{width:0,height:0}}};function Fb({style:e,needsComputation:t,text:n}){return n.split(`
120
+ `).map(r=>L({text:r},t?zb(r,e):{width:0,height:0}))}function Bb(){const[e,t]=k.useState(typeof window<"u"||process.env.NODE_ENV==="test");return k.useEffect(()=>{t(!0)},[]),e}const Vb=["x","y","style","text","ownerState"],Gb=["angle","textAnchor","dominantBaseline"];function Td(e){const{x:t,y:n,style:r,text:i}=e,o=kt(e,Vb),s=r??{},{angle:a,textAnchor:c,dominantBaseline:l}=s,u=kt(s,Gb),d=Bb(),h=k.useMemo(()=>Fb({style:u,needsComputation:d&&i.includes(`
121
+ `),text:i}),[u,i,d]);let f;switch(l){case"hanging":case"text-before-edge":f=0;break;case"central":f=(h.length-1)/2*-h[0].height;break;default:f=(h.length-1)*-h[0].height;break}return g.jsxRuntimeExports.jsx("text",L({},o,{transform:a?`rotate(${a}, ${t}, ${n})`:void 0,x:t,y:n,textAnchor:c,dominantBaseline:l,style:u,children:h.map((m,p)=>g.jsxRuntimeExports.jsx("tspan",{x:t,dy:`${p===0?f:h[0].height}px`,dominantBaseline:l,children:m.text},p))}))}process.env.NODE_ENV!=="production"&&(Td.propTypes={lineHeight:x.number,needsComputation:x.bool,ownerState:x.any,style:x.object,text:x.string.isRequired});const Ub=["text","className"];function Wb({value:e}){return e===null?null:e.toLocaleString()}function Cd(e){const{text:t=Wb,className:n}=e,r=kt(e,Ub),{value:i,valueMin:o,valueMax:s,cx:a,cy:c}=ta(),l=typeof t=="function"?t({value:i,valueMin:o,valueMax:s}):t;return l===null?null:g.jsxRuntimeExports.jsx("g",{className:n,children:g.jsxRuntimeExports.jsx(Td,L({x:a,y:c,text:l,style:{textAnchor:"middle",dominantBaseline:"central"}},r))})}process.env.NODE_ENV!=="production"&&(Cd.propTypes={lineHeight:x.number,needsComputation:x.bool,ownerState:x.any,style:x.object,text:x.oneOfType([x.func,x.string])});const Hb=["text","children","classes","className","skipAnimation"],Yb=e=>{const{classes:t}=e;return bi({root:["root"],valueArc:["valueArc"],referenceArc:["referenceArc"],valueText:["valueText"]},Ob,t)},ra=k.forwardRef(function(t,n){const{text:r,children:i,className:o,skipAnimation:s}=t,a=kt(t,Hb),c=Yb(t);return g.jsxRuntimeExports.jsxs(na,L({},a,{className:Xe(c.root,o),ref:n,children:[g.jsxRuntimeExports.jsx(Ab,{className:c.referenceArc}),g.jsxRuntimeExports.jsx(vd,{className:c.valueArc,skipAnimation:s}),g.jsxRuntimeExports.jsx(Cd,{className:c.valueText,text:r}),i]}))});process.env.NODE_ENV!=="production"&&(ra.displayName="Gauge");process.env.NODE_ENV!=="production"&&(ra.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 qb=e=>{const t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60),i=e%60,o=[];return t>0?(o.push(t.toString()),o.push(n.toString().padStart(2,"0")),o.push(r.toString().padStart(2,"0")),o.push(i.toString().padStart(2,"0"))):n>0?(o.push(n.toString()),o.push(r.toString().padStart(2,"0")),o.push(i.toString().padStart(2,"0"))):(o.push(r.toString()),o.push(i.toString().padStart(2,"0"))),o.join(":")},nt=(e,t)=>{const n=Math.floor(e/86400),r=Math.floor(e%86400/3600),i=Math.floor(e%3600/60),o=e%60;if(typeof Intl<"u"&&"DurationFormat"in Intl)try{const a={};return n>0&&(a.days=n),r>0&&(a.hours=r),i>0&&(a.minutes=i),(o>0||Object.keys(a).length===0)&&(a.seconds=o),new Intl.DurationFormat(t,{style:"narrow"}).format(a)}catch{}const s=[];return n>0&&s.push(`${n}d`),r>0&&s.push(`${r}h`),i>0&&s.push(`${i}m`),(o>0||s.length===0)&&s.push(`${o}s`),s.join(" ")},Jb=(e,t,n)=>e==="countdown"&&n!==null?Math.min(100,t/n*100):e==="measuring"?t/60%1*100:0,Kb=({timerState:e,animationState:t,hasError:n,className:r})=>{const{t:i,i18n:o}=he.useTranslation(),s=R.useTheme(),{currentState:a,remainingTime:c,maxTime:l,currentProgress:u}=e,{showErrorAnimation:d,showPauseAnimation:h,showPulsatingText:f,pulsatingFinished:m,showLabels:p,showMainText:b,showIdlePulsating:v,idleDotsCount:M}=t;return g.jsxRuntimeExports.jsxs(R.Box,{className:r,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsxRuntimeExports.jsx(ra,{width:264,height:264,value:a==="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:n?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.jsxRuntimeExports.jsxs(R.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.jsxRuntimeExports.jsx(R.Box,{sx:{height:"16px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:1},children:g.jsxRuntimeExports.jsx(R.Fade,{in:p&&!n&&a!=="idle"&&a!=="success",timeout:300,children:g.jsxRuntimeExports.jsx(R.Typography,{variant:"body2",sx:{fontSize:"12px",color:a==="measured"&&(f||m)?s.palette.success.main:s.palette.text.secondary,transition:"color 0.8s ease-in-out"},children:g.jsxRuntimeExports.jsx("span",{style:{opacity:a==="measured"&&m?f?1:.6:1,transition:"opacity 2s ease-in-out"},children:a==="measuring"||a==="measured"?i("CycleTimer.CycleTime.lb","Cycle Time"):a==="countdown"?i("CycleTimer.RemainingTime.lb","Remaining Time"):""})})})}),g.jsxRuntimeExports.jsxs(R.Box,{sx:{position:"relative",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:[g.jsxRuntimeExports.jsx(R.Fade,{in:b&&a==="idle"&&!n,timeout:200,children:g.jsxRuntimeExports.jsxs(R.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.jsxRuntimeExports.jsx("span",{style:{opacity:v?1:.6,transition:"opacity 2s ease-in-out"},children:i("CycleTimer.WaitingForCycle.lb","Waiting for program cycle")}),g.jsxRuntimeExports.jsx("span",{style:{display:"inline-block",width:"18px",textAlign:"left",opacity:v?1:.6,transition:"opacity 2s ease-in-out"},children:".".repeat(M)})]})}),g.jsxRuntimeExports.jsx(R.Fade,{in:b&&n,timeout:200,children:g.jsxRuntimeExports.jsx(R.Typography,{variant:"h3",sx:{position:"absolute",fontSize:"40px",fontWeight:400,color:"#FFFFFF",lineHeight:"116.7%"},children:i("CycleTimer.Error.lb","Error")})}),g.jsxRuntimeExports.jsx(R.Fade,{in:b&&!n&&a!=="idle"&&a!=="success",timeout:300,children:g.jsxRuntimeExports.jsx(R.Typography,{variant:"h1",sx:{position:"absolute",fontSize:"48px",fontWeight:500,color:s.palette.text.primary,lineHeight:1,transition:"color 0.8s ease-in-out"},children:g.jsxRuntimeExports.jsx("span",{style:{opacity:1,transition:"opacity 2s ease-in-out"},children:qb(c)})})})]}),g.jsxRuntimeExports.jsx(R.Box,{sx:{height:"16px",display:"flex",marginTop:.5,alignItems:"center",justifyContent:"center"},children:g.jsxRuntimeExports.jsx(R.Fade,{in:p&&!n&&a!=="idle"&&a!=="success",timeout:300,children:g.jsxRuntimeExports.jsx(R.Typography,{variant:"body2",sx:{fontSize:"12px",color:a==="measured"&&(f||m)?s.palette.success.main:s.palette.text.secondary,transition:"color 0.8s ease-in-out"},children:g.jsxRuntimeExports.jsx("span",{style:{opacity:a==="measured"&&m?f?1:.6:1,transition:"opacity 2s ease-in-out"},children:a==="measuring"?i("CycleTimer.Measuring.lb","measuring..."):a==="measured"?i("CycleTimer.Determined.lb","determined"):a==="countdown"&&l!==null?i("CycleTimer.OfTime.lb",{time:nt(l,o.language)}):""})})})})]})]})},Xb=({timerState:e,animationState:t,hasError:n,compact:r,className:i})=>{const{t:o,i18n:s}=he.useTranslation(),a=R.useTheme(),{currentState:c,remainingTime:l,maxTime:u}=e,{showErrorAnimation:d,showPauseAnimation:h,showPulsatingText:f,pulsatingFinished:m,showIdlePulsating:p,idleDotsCount:b}=t;return r&&c==="idle"?g.jsxRuntimeExports.jsx(R.Box,{className:i,sx:{display:"flex",alignItems:"center",m:0},children:g.jsxRuntimeExports.jsx(R.Typography,{variant:"body2",sx:{color:n?a.palette.error.light:a.palette.text.primary,fontSize:"14px",transition:"color 0.5s ease-out"},children:n?o("CycleTimer.Error.lb","Error"):c==="idle"?"0s":nt(l,s.language)})}):g.jsxRuntimeExports.jsxs(R.Box,{className:i,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[!(c==="idle"&&r)&&g.jsxRuntimeExports.jsx(R.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.jsxRuntimeExports.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)"},role:"img","aria-label":"Timer progress",children:[g.jsxRuntimeExports.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:n?a.palette.error.light:c==="measured"?f||m?a.palette.success.main:a.palette.text.secondary:a.palette.success.main,strokeWidth:"2",opacity:c==="measured"&&m?f?1:.6:.3,style:{transition:"stroke 0.8s ease-in-out, opacity 2s ease-in-out"}}),g.jsxRuntimeExports.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:n?a.palette.error.light:c==="measured"?f||m?a.palette.success.main:a.palette.text.secondary:a.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-(c==="idle"?0:e.currentProgress)/100)}`,style:{opacity:c==="measured"&&m?f?1:.6:1,transition:"stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"}})]})}),g.jsxRuntimeExports.jsx(R.Typography,{variant:"body2",sx:{color:n?a.palette.error.light:c==="idle"?"rgba(255, 255, 255, 0.7)":c==="measured"?f||m?a.palette.success.main:a.palette.text.secondary:a.palette.text.primary,fontSize:"14px",lineHeight:"normal",letterSpacing:"normal",opacity:c==="idle"?p?1:.6:c==="measured"&&m?f?1:.6:1,transition:"color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"},children:n?o("CycleTimer.Error.lb","Error"):c==="idle"?g.jsxRuntimeExports.jsxs(g.jsxRuntimeExports.Fragment,{children:[g.jsxRuntimeExports.jsx("span",{children:o("CycleTimer.WaitingForCycle.lb","Waiting for program cycle")}),g.jsxRuntimeExports.jsx("span",{style:{display:"inline-block",width:"18px",textAlign:"left"},children:".".repeat(b)})]}):c==="measuring"?r?nt(l,s.language):`${nt(l,s.language)} / ${o("CycleTimer.Measuring.lb","measuring...")}`:c==="measured"?r?nt(l,s.language):`${nt(l,s.language)} / ${o("CycleTimer.Determined.lb","determined")}`:c==="countdown"&&u!==null?r?nt(l,s.language):`${nt(l,s.language)} / ${o("CycleTimer.Time.lb",{time:nt(u,s.language)})}`:nt(l,s.language)})]})},Zb=()=>{const[e,t]=$.useState({showPauseAnimation:!1,showErrorAnimation:!1,showPulsatingText:!1,pulsatingFinished:!1,showLabels:!0,showMainText:!0,showIdlePulsating:!1,idleDotsCount:0}),n=$.useRef(null),r=$.useRef(null),i=$.useRef(null),o=$.useRef(null),s=$.useRef(0),a=$.useRef(null),c=$.useRef(null),l=$.useCallback(()=>{t(S=>({...S,showPauseAnimation:!0})),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{t(S=>({...S,showPauseAnimation:!1}))},800)},[]),u=$.useCallback(()=>{t(S=>({...S,showErrorAnimation:!0})),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(S=>({...S,showErrorAnimation:!1}))},600)},[]),d=$.useCallback(()=>{t(S=>({...S,showErrorAnimation:!1})),r.current&&clearTimeout(r.current)},[]),h=$.useCallback(S=>{s.current=0,t(T=>({...T,showPulsatingText:!0,pulsatingFinished:!1})),setTimeout(()=>{t(T=>({...T,pulsatingFinished:!0})),i.current=setInterval(()=>{t(T=>({...T,showPulsatingText:!T.showPulsatingText}))},2e3),S&&S()},800)},[]),f=$.useCallback(()=>{i.current&&(clearInterval(i.current),i.current=null),t(S=>({...S,showPulsatingText:!1,pulsatingFinished:!1})),s.current=0},[]),m=$.useCallback(()=>{t(S=>({...S,showIdlePulsating:!0})),a.current=setInterval(()=>{t(S=>({...S,showIdlePulsating:!S.showIdlePulsating}))},2e3),c.current=setInterval(()=>{t(S=>({...S,idleDotsCount:(S.idleDotsCount+1)%4}))},800)},[]),p=$.useCallback(()=>{a.current&&(clearInterval(a.current),a.current=null),c.current&&(clearInterval(c.current),c.current=null),t(S=>({...S,showIdlePulsating:!1,idleDotsCount:0}))},[]),b=$.useCallback(()=>{t(S=>({...S,showLabels:!1,showMainText:!1})),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{t(S=>({...S,showLabels:!0,showMainText:!0}))},200)},[]),v=$.useCallback(()=>{t(S=>({...S,showLabels:!0,showMainText:!0}))},[]),M=$.useCallback(()=>{n.current&&clearTimeout(n.current),r.current&&clearTimeout(r.current),o.current&&clearTimeout(o.current),i.current&&clearInterval(i.current),a.current&&clearInterval(a.current),c.current&&clearInterval(c.current)},[]);return{animationState:e,triggerPauseAnimation:l,triggerErrorAnimation:u,clearErrorAnimation:d,startPulsatingAnimation:h,stopPulsatingAnimation:f,startIdleAnimations:m,stopIdleAnimations:p,triggerFadeTransition:b,setInitialAnimationState:v,cleanup:M}},Qb=({autoStart:e,onCycleEnd:t,onMeasuringComplete:n,hasError:r,onPauseAnimation:i,onErrorAnimation:o,onClearErrorAnimation:s,onStartPulsating:a})=>{const[c,l]=$.useState({currentState:"idle",remainingTime:0,maxTime:null,isRunning:!1,isPausedState:!1,currentProgress:0,wasRunningBeforeError:!1}),u=$.useRef(null),d=$.useRef(null),h=$.useRef(0),[f]=ue.useInterpolation([0],{tension:80,friction:18,onChange:([C])=>{l(w=>({...w,currentProgress:C}))}}),m=$.useCallback(()=>{l(C=>({...C,currentState:"idle",maxTime:null,isRunning:!1,isPausedState:!1,currentProgress:0})),h.current=0,d.current=null,f.setImmediate([0])},[f]),p=$.useCallback((C=0)=>{const w=C/60%1*100;l(E=>({...E,currentState:"measuring",maxTime:null,remainingTime:C,isPausedState:!1,currentProgress:w})),h.current=0,f.setImmediate([w]),e?(d.current=Date.now()-C*1e3,l(E=>({...E,isRunning:!0}))):d.current=null},[e,f]),b=$.useCallback((C,w=0)=>{l(O=>({...O,isRunning:!1})),d.current=null,l(O=>({...O,currentState:"countdown",maxTime:C,isPausedState:!1})),h.current=0;const E=Math.max(0,C-w),j=w>0?w/C*100:0;l(O=>({...O,remainingTime:E,currentProgress:j})),f.setImmediate([j]),E===0?(l(O=>({...O,isRunning:!1})),d.current=null,t&&queueMicrotask(()=>t())):e?setTimeout(()=>{d.current=Date.now()-w*1e3,l(O=>({...O,isRunning:!0}))},0):d.current=null},[e,t,f]),v=$.useCallback(()=>{l(C=>({...C,isRunning:!1,currentState:"measured"})),d.current=null,a(()=>{n&&n()})},[a,n]),M=$.useCallback(()=>{if(d.current&&c.isRunning){const w=Date.now()-d.current;h.current+=w;const E=h.current/1e3,j=Jb(c.currentState,E,c.maxTime);f.setTarget([j])}l(C=>({...C,isRunning:!1,isPausedState:!0})),i()},[c.isRunning,c.currentState,c.maxTime,f,i]),S=$.useCallback(()=>{c.isPausedState&&(c.remainingTime>0||c.currentState!=="countdown")&&(d.current=Date.now(),l(C=>({...C,isRunning:!0,isPausedState:!1})))},[c.isPausedState,c.remainingTime,c.currentState]),T=$.useCallback(()=>c.isPausedState,[c.isPausedState]);return $.useEffect(()=>{r?(c.isRunning&&!c.isPausedState&&(l(C=>({...C,wasRunningBeforeError:!0})),M()),o()):(c.wasRunningBeforeError&&c.isPausedState&&(l(C=>({...C,wasRunningBeforeError:!1})),S()),s())},[r,c.isRunning,c.isPausedState,c.wasRunningBeforeError,M,S,o,s]),$.useEffect(()=>{if(c.isRunning){const C=()=>{if(d.current){const E=(Date.now()-d.current+h.current)/1e3;if(c.currentState==="countdown"&&c.maxTime!==null){const j=Math.max(0,c.maxTime-E);l(y=>({...y,remainingTime:Math.ceil(j)}));const O=Math.min(100,E/c.maxTime*100);if(f.setTarget([O]),j<=0){l(y=>({...y,isRunning:!1,remainingTime:0})),d.current=null,f.setTarget([100]),t&&queueMicrotask(()=>t());return}}else if(c.currentState==="measuring"){l(O=>({...O,remainingTime:Math.floor(E)}));const j=E/60%1*100;f.setTarget([j])}c.isRunning&&(u.current=requestAnimationFrame(C))}};u.current=requestAnimationFrame(C)}else u.current&&(cancelAnimationFrame(u.current),u.current=null);return()=>{u.current&&cancelAnimationFrame(u.current)}},[c.isRunning,t,c.currentState,c.maxTime,f]),$.useEffect(()=>{let C=null;const w=()=>{f.update(1/60),C=requestAnimationFrame(w)};return C=requestAnimationFrame(w),()=>{C&&cancelAnimationFrame(C)}},[f]),{timerState:c,controls:{startNewCycle:b,startMeasuring:p,setIdle:m,completeMeasuring:v,pause:M,resume:S,isPaused:T}}},ev=g.externalizeComponent(ie.observer(({onCycleComplete:e,onCycleEnd:t,onMeasuringComplete:n,autoStart:r=!0,variant:i="default",compact:o=!1,className:s,hasError:a=!1})=>{const c=$.useRef(void 0),{animationState:l,triggerPauseAnimation:u,triggerErrorAnimation:d,clearErrorAnimation:h,startPulsatingAnimation:f,stopPulsatingAnimation:m,startIdleAnimations:p,stopIdleAnimations:b,triggerFadeTransition:v,setInitialAnimationState:M,cleanup:S}=Zb(),{timerState:T,controls:C}=Qb({autoStart:r,onCycleEnd:t,onMeasuringComplete:n,hasError:a,onPauseAnimation:u,onErrorAnimation:d,onClearErrorAnimation:h,onStartPulsating:f});return $.useEffect(()=>{const w=c.current;c.current!==void 0&&w!==T.currentState?(w==="measured"&&m(),w==="idle"&&b(),v()):M(),T.currentState==="idle"&&p(),c.current=T.currentState},[T.currentState,m,b,p,v,M]),$.useEffect(()=>{let w=!0;const E=setTimeout(()=>{w&&e(C)},0);return()=>{w=!1,clearTimeout(E)}},[e,C]),$.useEffect(()=>S,[S]),i==="small"?g.jsxRuntimeExports.jsx(Xb,{timerState:T,animationState:l,hasError:a,compact:o,className:s}):g.jsxRuntimeExports.jsx(Kb,{timerState:T,animationState:l,hasError:a,className:s})})),en=xp;process.env.NODE_ENV!=="production"&&(x.node,x.object.isRequired);function ia(e){return yp(e)}function tv(e){return In("MuiSvgIcon",e)}ms("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const nv=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${Ae(t)}`,`fontSize${Ae(n)}`]};return bi(i,tv,r)},rv=Fe("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Ae(n.color)}`],t[`fontSize${Ae(n.fontSize)}`]]}})(en(({theme:e})=>{var t,n,r,i,o,s,a,c,l,u,d,h,f,m;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(i=(t=e.transitions)==null?void 0:t.create)==null?void 0:i.call(t,"fill",{duration:(r=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:p=>!p.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(o=e.typography)==null?void 0:o.pxToRem)==null?void 0:s.call(o,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((c=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:c.call(a,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(l=e.typography)==null?void 0:l.pxToRem)==null?void 0:u.call(l,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,p])=>p&&p.main).map(([p])=>{var b,v;return{props:{color:p},style:{color:(v=(b=(e.vars??e).palette)==null?void 0:b[p])==null?void 0:v.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:(m=(f=(e.vars??e).palette)==null?void 0:f.action)==null?void 0:m.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),mi=k.forwardRef(function(t,n){const r=ia({props:t,name:"MuiSvgIcon"}),{children:i,className:o,color:s="inherit",component:a="svg",fontSize:c="medium",htmlColor:l,inheritViewBox:u=!1,titleAccess:d,viewBox:h="0 0 24 24",...f}=r,m=k.isValidElement(i)&&i.type==="svg",p={...r,color:s,component:a,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:m},b={};u||(b.viewBox=h);const v=nv(p);return g.jsxRuntimeExports.jsxs(rv,{as:a,className:Xe(v.root,o),focusable:"false",color:l,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n,...b,...f,...m&&i.props,ownerState:p,children:[m?i.props.children:i,d?g.jsxRuntimeExports.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(mi.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});mi.muiName="SvgIcon";function Nt(e,t){function n(r,i){return g.jsxRuntimeExports.jsx(mi,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:i,...r,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=mi.muiName,k.memo(k.forwardRef(n))}function iv(e){const{controlled:t,default:n,name:r,state:i="value"}=e,{current:o}=k.useRef(t!==void 0),[s,a]=k.useState(n),c=o?t:s;if(process.env.NODE_ENV!=="production"){k.useEffect(()=>{o!==(t!==void 0)&&console.error([`MUI: A component is changing the ${o?"":"un"}controlled ${i} state of ${r} to be ${o?"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"].join(`
122
+ `))},[i,r,t]);const{current:u}=k.useRef(n);k.useEffect(()=>{!o&&!Object.is(u,n)&&console.error([`MUI: A component is changing the default ${i} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join(`
123
+ `))},[JSON.stringify(n)])}const l=k.useCallback(u=>{o||a(u)},[]);return[c,l]}const ov=Nt(g.jsxRuntimeExports.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"),sv=Nt(g.jsxRuntimeExports.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),Kl=Nt(g.jsxRuntimeExports.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"),_d=g.externalizeComponent(ie.observer(({data:e,columns:t,getRowData:n,onRowClick:r,selectedItem:i,getItemId:o,title:s,showCount:a=!0,searchPlaceholder:c="Search programs",dataGridProps:l,CustomToolbar:u,selectFirstByDefault:d=!1,sx:h})=>{var j;const f=R.useTheme(),m=qe.useGridApiRef(),p=$.useRef(null),[b,v]=$.useState(null),M=$.useMemo(()=>e.map(n),[e,n]);$.useEffect(()=>{m.current&&M.length>0&&m.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:t.map(O=>O.field)})},[M,t,m]),$.useEffect(()=>{if(!p.current||!m.current)return;const O=new ResizeObserver(()=>{setTimeout(()=>{m.current&&M.length>0&&m.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:t.map(y=>y.field)})},100)});return O.observe(p.current),()=>{O.disconnect()}},[m,M.length,t]);const S=$.useMemo(()=>{if(i!==void 0)return i;if(b!==null)return b;if(d&&e.length>0){const O=e[0];return v(O),O}return null},[d,e,i,b]),T=O=>{const y=e.find(_=>n(_).id===O.id);y&&(i===void 0&&v(y),r&&r(y,O))},C=$.useMemo(()=>!S||!o?null:o(S),[S,o]);function w(){return g.jsxRuntimeExports.jsx(qe.Toolbar,{children:g.jsxRuntimeExports.jsxs(R.Box,{sx:{display:"flex",width:"100%",gap:1,p:.5,alignItems:"center"},children:[s&&g.jsxRuntimeExports.jsxs(R.Typography,{variant:"h6",sx:{fontWeight:500,color:"white"},children:[s,a&&` (${e.length})`]}),g.jsxRuntimeExports.jsxs(R.Box,{sx:{ml:"auto",display:"flex",gap:.5,alignItems:"center",pr:1},children:[g.jsxRuntimeExports.jsx(qe.FilterPanelTrigger,{render:g.jsxRuntimeExports.jsx(qe.ToolbarButton,{"aria-label":"Show filters",children:g.jsxRuntimeExports.jsx(sv,{fontSize:"small"})})}),g.jsxRuntimeExports.jsx(R.Divider,{orientation:"vertical",flexItem:!0,sx:{height:"24px",alignSelf:"center"}}),g.jsxRuntimeExports.jsx(qe.QuickFilter,{render:(O,y)=>g.jsxRuntimeExports.jsxs(R.Box,{...O,sx:{display:"flex",overflow:"hidden"},children:[!y.expanded&&g.jsxRuntimeExports.jsx(qe.QuickFilterTrigger,{render:g.jsxRuntimeExports.jsx(qe.ToolbarButton,{"aria-label":"Search",children:g.jsxRuntimeExports.jsx(Kl,{fontSize:"small"})})}),g.jsxRuntimeExports.jsxs(R.Box,{sx:{display:"flex",overflow:"hidden",transition:"all 0.3s ease-in-out",width:y.expanded?"200px":"0px",position:"relative"},children:[g.jsxRuntimeExports.jsxs(R.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.jsxRuntimeExports.jsx(Kl,{fontSize:"small",sx:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:"rgba(255, 255, 255, 0.6)",zIndex:1,pointerEvents:"none"}}),g.jsxRuntimeExports.jsx(qe.QuickFilterControl,{placeholder:c})]}),y.expanded&&y.value!==""&&g.jsxRuntimeExports.jsx(qe.QuickFilterClear,{render:g.jsxRuntimeExports.jsx(R.Box,{sx:{position:"absolute",right:"8px",top:"50%",transform:"translateY(-50%)",zIndex:1},children:g.jsxRuntimeExports.jsx(R.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.jsxRuntimeExports.jsx(qe.ToolbarButton,{"aria-label":"Clear",children:g.jsxRuntimeExports.jsx(ov,{fontSize:"small"})})})})})]})]})})]})]})})}const E=u||w;return g.jsxRuntimeExports.jsx(R.Box,{ref:p,sx:{height:"100%",display:"flex",flexDirection:"column","& *":{scrollbarWidth:"none",msOverflowStyle:"none","&::-webkit-scrollbar":{display:"none"}},"&:hover *":{scrollbarWidth:"thin",scrollbarColor:`${f.palette.divider} transparent`,"&::-webkit-scrollbar":{display:"block",width:"8px",height:"8px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:f.palette.divider,borderRadius:"4px"},"&::-webkit-scrollbar-thumb:hover":{background:f.palette.action.hover}},...h},children:g.jsxRuntimeExports.jsx(qe.DataGrid,{apiRef:m,rows:M,columns:t,onRowClick:T,disableColumnMenu:!1,disableRowSelectionOnClick:!0,disableMultipleRowSelection:!0,hideFooterSelectedRowCount:!0,filterMode:"client",sortingOrder:["desc","asc"],hideFooter:!1,showToolbar:!0,slots:{toolbar:E},initialState:{sorting:{sortModel:[]},filter:{filterModel:{items:[]}},...l==null?void 0:l.initialState},...l,autosizeOnMount:!0,autosizeOptions:{...(l==null?void 0:l.autosizeOptions)||{},includeOutliers:!0,includeHeaders:!0,expand:!0,columns:((j=l==null?void 0:l.autosizeOptions)==null?void 0:j.columns)||t.map(O=>O.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:r?"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"}},...C!==null&&{[`&[data-id="${C}"]`]:{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":{},...l==null?void 0:l.sx}})})}));_d.displayName="WandelbotsDataGrid";const vn=Ip({createStyledComponent:Fe("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>ia({props:e,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(vn.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 av=({title:e,titleId:t,...n},r)=>k.createElement("svg",{width:21,height:21,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("g",{id:"JogMinus"},k.createElement("path",{id:"Minus",d:"M0 13V8H21V13H0Z",fill:"white"}))),lv=$.forwardRef(av),cv=({title:e,titleId:t,...n},r)=>k.createElement("svg",{width:21,height:21,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("g",{id:"JogPlus"},k.createElement("g",{id:"Plus"},k.createElement("path",{d:"M0 13V8H8V13H0Z",fill:"white"}),k.createElement("path",{d:"M8 0L13 2.18557e-07L13 21H8L8 0Z",fill:"white"}),k.createElement("path",{d:"M13 13V8H21V13H13Z",fill:"white"})))),uv=$.forwardRef(cv),ss=g.externalizeComponent(ie.observer(({colors:e,label:t,getDisplayedValue:n,startJogging:r,stopJogging:i,disabled:o,activeJoggingDirection:s,...a})=>{var S,T,C,w,E,j,O;ue.useAnimationFrame(()=>{const y=n(),_=h.current;_&&(_.textContent=y)});const c=R.useTheme(),[l,u]=$.useState(null);$.useEffect(()=>{o&&M()},[o]);const d=s||l,h=$.useRef(null);e||(e={color:"#fff",backgroundColor:"#000",borderColor:"#000",buttonBackgroundColor:{disabled:"#000",default:"#000",hovered:"#000",pressed:"#000"},labelColor:"#000"});const f=d?(S=e.buttonBackgroundColor)==null?void 0:S.pressed:e.borderColor,m={width:"55px",color:e.color,path:{fill:e.color},alignContent:"center",fontSize:"37px",svg:{pointerEvents:"none"}},p={...m,backgroundColor:(T=e.buttonBackgroundColor)==null?void 0:T.default,":hover":{backgroundColor:(C=e.buttonBackgroundColor)==null?void 0:C.hovered},":active":{backgroundColor:(w=e.buttonBackgroundColor)==null?void 0:w.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor}},":disabled":{backgroundColor:(E=e.buttonBackgroundColor)==null?void 0:E.disabled,"svg path":{fill:c.palette.action.disabled}}},b={...m,backgroundColor:(j=e.buttonBackgroundColor)==null?void 0:j.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor},":disabled":{backgroundColor:(O=e.buttonBackgroundColor)==null?void 0:O.pressed,"svg path":{fill:c.palette.action.disabled}}};function v(y,_){o||y.button===0&&(u(_),r(_))}function M(){u(null),i()}return g.jsxRuntimeExports.jsxs(vn,{height:"64px",direction:"row",justifyContent:"center",...a,children:[g.jsxRuntimeExports.jsx(R.IconButton,{disabled:o,disableRipple:!0,onPointerDown:y=>v(y,"-"),onPointerUp:M,onPointerOut:M,size:"large",sx:{...d==="-"?b:p,borderRadius:"16px 0px 0px 16px",borderLeft:`2px solid ${f??"#fff"}`,borderBottom:`2px solid ${f??"#fff"}`,borderTop:`2px solid ${f??"#fff"}`},children:g.jsxRuntimeExports.jsx(lv,{})}),g.jsxRuntimeExports.jsxs(vn,{spacing:"6px",sx:{width:"150px",backgroundColor:e.backgroundColor,alignItems:"center",justifyContent:"center",opacity:"0.9",borderBottom:`2px solid ${f??"#fff"}`,borderTop:`2px solid ${f??"#fff"}`},children:[g.jsxRuntimeExports.jsx(vn,{height:"22px",direction:"row",alignItems:"center",justifyItems:"center",spacing:1,sx:{userSelect:"none",color:e.color,".MuiTypography-root":{fontWeight:700,...o?{color:c.palette.action.disabled}:{}},...o?{"svg path":{fill:c.palette.action.disabled}}:{}},children:t}),g.jsxRuntimeExports.jsx(R.Typography,{height:"22px",sx:{fontSize:"15px",color:o?c.palette.action.disabled:e.color,fontWeight:700},ref:h,children:n()})]}),g.jsxRuntimeExports.jsx(R.IconButton,{disableRipple:!0,disabled:o,onPointerDown:y=>v(y,"+"),onPointerUp:M,onPointerOut:M,size:"large",sx:{...d==="+"?b:p,borderRadius:"0px 16px 16px 0px",borderRight:`2px solid ${f??"#fff"}`,borderBottom:`2px solid ${f??"#fff"}`,borderTop:`2px solid ${f??"#fff"}`},children:g.jsxRuntimeExports.jsx(uv,{})})]})})),dv=Nt(g.jsxRuntimeExports.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),hv=Nt(g.jsxRuntimeExports.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");function Ht(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Rd=typeof global=="object"&&global&&global.Object===Object&&global,fv=typeof self=="object"&&self&&self.Object===Object&&self,lt=Rd||fv||Function("return this")(),No=function(){return lt.Date.now()},pv=/\s/;function mv(e){for(var t=e.length;t--&&pv.test(e.charAt(t)););return t}var gv=/^\s+/;function yv(e){return e&&e.slice(0,mv(e)+1).replace(gv,"")}var Pt=lt.Symbol,Md=Object.prototype,xv=Md.hasOwnProperty,bv=Md.toString,Bn=Pt?Pt.toStringTag:void 0;function vv(e){var t=xv.call(e,Bn),n=e[Bn];try{e[Bn]=void 0;var r=!0}catch{}var i=bv.call(e);return r&&(t?e[Bn]=n:delete e[Bn]),i}var Sv=Object.prototype,Ev=Sv.toString;function wv(e){return Ev.call(e)}var Tv="[object Null]",Cv="[object Undefined]",Xl=Pt?Pt.toStringTag:void 0;function tn(e){return e==null?e===void 0?Cv:Tv:Xl&&Xl in Object(e)?vv(e):wv(e)}function Yt(e){return e!=null&&typeof e=="object"}var _v="[object Symbol]";function Ki(e){return typeof e=="symbol"||Yt(e)&&tn(e)==_v}var Zl=NaN,Rv=/^[-+]0x[0-9a-f]+$/i,Mv=/^0b[01]+$/i,jv=/^0o[0-7]+$/i,Iv=parseInt;function Ql(e){if(typeof e=="number")return e;if(Ki(e))return Zl;if(Ht(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ht(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=yv(e);var n=Mv.test(e);return n||jv.test(e)?Iv(e.slice(2),n?2:8):Rv.test(e)?Zl:+e}var kv="Expected a function",Av=Math.max,Ov=Math.min;function Pv(e,t,n){var r,i,o,s,a,c,l=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(kv);t=Ql(t)||0,Ht(n)&&(u=!!n.leading,d="maxWait"in n,o=d?Av(Ql(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function f(w){var E=r,j=i;return r=i=void 0,l=w,s=e.apply(j,E),s}function m(w){return l=w,a=setTimeout(v,t),u?f(w):s}function p(w){var E=w-c,j=w-l,O=t-E;return d?Ov(O,o-j):O}function b(w){var E=w-c,j=w-l;return c===void 0||E>=t||E<0||d&&j>=o}function v(){var w=No();if(b(w))return M(w);a=setTimeout(v,p(w))}function M(w){return a=void 0,h&&r?f(w):(r=i=void 0,s)}function S(){a!==void 0&&clearTimeout(a),l=0,r=c=i=a=void 0}function T(){return a===void 0?s:M(No())}function C(){var w=No(),E=b(w);if(r=arguments,i=this,c=w,E){if(a===void 0)return m(c);if(d)return clearTimeout(a),a=setTimeout(v,t),f(c)}return a===void 0&&(a=setTimeout(v,t)),s}return C.cancel=S,C.flush=T,C}var Dv="Expected a function";function $v(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(Dv);return Ht(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Pv(e,t,{leading:r,maxWait:t,trailing:i})}const jd=g.externalizeComponent(ie.observer(({startJogging:e,stopJogging:t,lowerLimitDegs:n,upperLimitDegs:r,getValueDegs:i,disabled:o,...s})=>{var S,T,C,w,E,j,O,y,_,A,I,P,U,B,W;const{t:a}=he.useTranslation(),[c,l]=$.useState(),u=R.useTheme(),d={background:(S=u.palette.backgroundPaperElevation)==null?void 0:S[4],color:(T=u.palette.backgroundPaperElevation)==null?void 0:T[11]},h=ie.useLocalObservable(()=>({activeJoggingDir:null,startJogging(F){this.activeJoggingDir=F,e(F)},stopJogging(){this.activeJoggingDir=null,t()}})),f=$v(()=>{l(i())},50);ue.useAnimationFrame(f);function m(F){F.button===0&&h.startJogging("-")}function p(F){F.button===0&&h.startJogging("+")}function b(F){h.stopJogging()}function v(F){h.stopJogging()}function M(F,H=1){if(F===void 0||isNaN(F))return"";const ne=a("General.degree.variable",{amount:F.toFixed(H)});return F>0&&H===0?`+${ne}`:ne}return g.jsxRuntimeExports.jsxs(vn,{height:"64px",width:"100%",maxWidth:"260px",direction:"row",...s,sx:{"& .MuiIconButton-root":{width:"52px",color:u.palette.text.primary,alignContent:"center",backgroundColor:(C=u.palette.backgroundPaperElevation)==null?void 0:C[11],"& svg":{width:"42px",height:"42px"},"&.Mui-disabled":{backgroundColor:(w=u.palette.backgroundPaperElevation)==null?void 0:w[11],color:u.palette.action.disabled,opacity:1},"&:hover":{backgroundColor:(E=u.palette.backgroundPaperElevation)==null?void 0:E[9]},"&:active":{...d}}},children:[g.jsxRuntimeExports.jsx(R.IconButton,{onPointerDown:m,onPointerUp:b,onPointerOut:v,disabled:o,disableRipple:!0,sx:{borderRadius:"16px 0px 0px 16px",...h.activeJoggingDir==="-"?d:{}},children:g.jsxRuntimeExports.jsx(dv,{sx:{pointerEvents:"none",color:(_=(y=(O=(j=u.componentsExt)==null?void 0:j.JoggingPanel)==null?void 0:O.JoggingJoint)==null?void 0:y.Joint)==null?void 0:_.arrowColor}})}),g.jsxRuntimeExports.jsxs(vn,{flexGrow:1,alignItems:"center",justifyContent:"center",sx:{borderStyle:"solid",borderLeftWidth:0,borderRightWidth:0,border:"none",backgroundColor:(A=u.palette.backgroundPaperElevation)==null?void 0:A[11],paddingLeft:"20px",paddingRight:"20px",zIndex:1},children:[g.jsxRuntimeExports.jsx(R.Typography,{sx:{fontSize:"15px",fontWeight:700,position:"relative",top:"5px",color:o?u.palette.action.disabled:u.palette.text.primary},children:M(c)}),g.jsxRuntimeExports.jsx(R.Slider,{disabled:!0,"aria-label":"Joint position",min:n,max:r,value:c||0,track:!1,sx:{"& .MuiSlider-mark":{display:"none"},"& .MuiSlider-thumb":{width:"5px",height:"12px",borderRadius:"2px",color:o?u.palette.action.disabled:u.palette.text.primary},"& .MuiSlider-markLabel":{top:"20px",fontSize:"12px",color:o?u.palette.action.disabled:u.palette.text.secondary},"& .MuiSlider-rail":{backgroundColor:(I=u.palette.backgroundPaperElevation)==null?void 0:I[5],opacity:1}},marks:n!==void 0&&r!==void 0&&[{value:n,label:M(n,0)},{value:r,label:M(r,0)}]})]}),g.jsxRuntimeExports.jsx(R.IconButton,{onPointerDown:p,onPointerUp:b,onPointerOut:v,disabled:o,disableRipple:!0,sx:{borderRadius:"0px 16px 16px 0px",...h.activeJoggingDir==="+"?d:{}},children:g.jsxRuntimeExports.jsx(hv,{sx:{pointerEvents:"none",color:(W=(B=(U=(P=u.componentsExt)==null?void 0:P.JoggingPanel)==null?void 0:U.JoggingJoint)==null?void 0:B.Joint)==null?void 0:W.arrowColor}})})]})})),Nv=Nt(g.jsxRuntimeExports.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"),Lv=Nt(g.jsxRuntimeExports.jsx("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92-1.31-2.92-2.92-2.92"}),"Share");function pt(e,t,n){return Math.max(t,Math.min(n,e))}class zv{constructor(t=0,n=0,r=0,i=1){this.isQuaternion=!0,this._x=t,this._y=n,this._z=r,this._w=i}static slerpFlat(t,n,r,i,o,s,a){let c=r[i+0],l=r[i+1],u=r[i+2],d=r[i+3];const h=o[s+0],f=o[s+1],m=o[s+2],p=o[s+3];if(a===0){t[n+0]=c,t[n+1]=l,t[n+2]=u,t[n+3]=d;return}if(a===1){t[n+0]=h,t[n+1]=f,t[n+2]=m,t[n+3]=p;return}if(d!==p||c!==h||l!==f||u!==m){let b=1-a;const v=c*h+l*f+u*m+d*p,M=v>=0?1:-1,S=1-v*v;if(S>Number.EPSILON){const C=Math.sqrt(S),w=Math.atan2(C,v*M);b=Math.sin(b*w)/C,a=Math.sin(a*w)/C}const T=a*M;if(c=c*b+h*T,l=l*b+f*T,u=u*b+m*T,d=d*b+p*T,b===1-a){const C=1/Math.sqrt(c*c+l*l+u*u+d*d);c*=C,l*=C,u*=C,d*=C}}t[n]=c,t[n+1]=l,t[n+2]=u,t[n+3]=d}static multiplyQuaternionsFlat(t,n,r,i,o,s){const a=r[i],c=r[i+1],l=r[i+2],u=r[i+3],d=o[s],h=o[s+1],f=o[s+2],m=o[s+3];return t[n]=a*m+u*d+c*f-l*h,t[n+1]=c*m+u*h+l*d-a*f,t[n+2]=l*m+u*f+a*h-c*d,t[n+3]=u*m-a*d-c*h-l*f,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,n,r,i){return this._x=t,this._y=n,this._z=r,this._w=i,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,n=!0){const r=t._x,i=t._y,o=t._z,s=t._order,a=Math.cos,c=Math.sin,l=a(r/2),u=a(i/2),d=a(o/2),h=c(r/2),f=c(i/2),m=c(o/2);switch(s){case"XYZ":this._x=h*u*d+l*f*m,this._y=l*f*d-h*u*m,this._z=l*u*m+h*f*d,this._w=l*u*d-h*f*m;break;case"YXZ":this._x=h*u*d+l*f*m,this._y=l*f*d-h*u*m,this._z=l*u*m-h*f*d,this._w=l*u*d+h*f*m;break;case"ZXY":this._x=h*u*d-l*f*m,this._y=l*f*d+h*u*m,this._z=l*u*m+h*f*d,this._w=l*u*d-h*f*m;break;case"ZYX":this._x=h*u*d-l*f*m,this._y=l*f*d+h*u*m,this._z=l*u*m-h*f*d,this._w=l*u*d+h*f*m;break;case"YZX":this._x=h*u*d+l*f*m,this._y=l*f*d+h*u*m,this._z=l*u*m-h*f*d,this._w=l*u*d-h*f*m;break;case"XZY":this._x=h*u*d-l*f*m,this._y=l*f*d-h*u*m,this._z=l*u*m+h*f*d,this._w=l*u*d+h*f*m;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return n===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,n){const r=n/2,i=Math.sin(r);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(r),this._onChangeCallback(),this}setFromRotationMatrix(t){const n=t.elements,r=n[0],i=n[4],o=n[8],s=n[1],a=n[5],c=n[9],l=n[2],u=n[6],d=n[10],h=r+a+d;if(h>0){const f=.5/Math.sqrt(h+1);this._w=.25/f,this._x=(u-c)*f,this._y=(o-l)*f,this._z=(s-i)*f}else if(r>a&&r>d){const f=2*Math.sqrt(1+r-a-d);this._w=(u-c)/f,this._x=.25*f,this._y=(i+s)/f,this._z=(o+l)/f}else if(a>d){const f=2*Math.sqrt(1+a-r-d);this._w=(o-l)/f,this._x=(i+s)/f,this._y=.25*f,this._z=(c+u)/f}else{const f=2*Math.sqrt(1+d-r-a);this._w=(s-i)/f,this._x=(o+l)/f,this._y=(c+u)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(t,n){let r=t.dot(n)+1;return r<Number.EPSILON?(r=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=r):(this._x=0,this._y=-t.z,this._z=t.y,this._w=r)):(this._x=t.y*n.z-t.z*n.y,this._y=t.z*n.x-t.x*n.z,this._z=t.x*n.y-t.y*n.x,this._w=r),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(pt(this.dot(t),-1,1)))}rotateTowards(t,n){const r=this.angleTo(t);if(r===0)return this;const i=Math.min(1,n/r);return this.slerp(t,i),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,n){const r=t._x,i=t._y,o=t._z,s=t._w,a=n._x,c=n._y,l=n._z,u=n._w;return this._x=r*u+s*a+i*l-o*c,this._y=i*u+s*c+o*a-r*l,this._z=o*u+s*l+r*c-i*a,this._w=s*u-r*a-i*c-o*l,this._onChangeCallback(),this}slerp(t,n){if(n===0)return this;if(n===1)return this.copy(t);const r=this._x,i=this._y,o=this._z,s=this._w;let a=s*t._w+r*t._x+i*t._y+o*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=s,this._x=r,this._y=i,this._z=o,this;const c=1-a*a;if(c<=Number.EPSILON){const f=1-n;return this._w=f*s+n*this._w,this._x=f*r+n*this._x,this._y=f*i+n*this._y,this._z=f*o+n*this._z,this.normalize(),this}const l=Math.sqrt(c),u=Math.atan2(l,a),d=Math.sin((1-n)*u)/l,h=Math.sin(n*u)/l;return this._w=s*d+this._w*h,this._x=r*d+this._x*h,this._y=i*d+this._y*h,this._z=o*d+this._z*h,this._onChangeCallback(),this}slerpQuaternions(t,n,r){return this.copy(t).slerp(n,r)}random(){const t=2*Math.PI*Math.random(),n=2*Math.PI*Math.random(),r=Math.random(),i=Math.sqrt(1-r),o=Math.sqrt(r);return this.set(i*Math.sin(t),i*Math.cos(t),o*Math.sin(n),o*Math.cos(n))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,n=0){return this._x=t[n],this._y=t[n+1],this._z=t[n+2],this._w=t[n+3],this._onChangeCallback(),this}toArray(t=[],n=0){return t[n]=this._x,t[n+1]=this._y,t[n+2]=this._z,t[n+3]=this._w,t}fromBufferAttribute(t,n){return this._x=t.getX(n),this._y=t.getY(n),this._z=t.getZ(n),this._w=t.getW(n),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 Sn{constructor(t=0,n=0,r=0){Sn.prototype.isVector3=!0,this.x=t,this.y=n,this.z=r}set(t,n,r){return r===void 0&&(r=this.z),this.x=t,this.y=n,this.z=r,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,n){switch(t){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;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,n){return this.x=t.x+n.x,this.y=t.y+n.y,this.z=t.z+n.z,this}addScaledVector(t,n){return this.x+=t.x*n,this.y+=t.y*n,this.z+=t.z*n,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,n){return this.x=t.x-n.x,this.y=t.y-n.y,this.z=t.z-n.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,n){return this.x=t.x*n.x,this.y=t.y*n.y,this.z=t.z*n.z,this}applyEuler(t){return this.applyQuaternion(ec.setFromEuler(t))}applyAxisAngle(t,n){return this.applyQuaternion(ec.setFromAxisAngle(t,n))}applyMatrix3(t){const n=this.x,r=this.y,i=this.z,o=t.elements;return this.x=o[0]*n+o[3]*r+o[6]*i,this.y=o[1]*n+o[4]*r+o[7]*i,this.z=o[2]*n+o[5]*r+o[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const n=this.x,r=this.y,i=this.z,o=t.elements,s=1/(o[3]*n+o[7]*r+o[11]*i+o[15]);return this.x=(o[0]*n+o[4]*r+o[8]*i+o[12])*s,this.y=(o[1]*n+o[5]*r+o[9]*i+o[13])*s,this.z=(o[2]*n+o[6]*r+o[10]*i+o[14])*s,this}applyQuaternion(t){const n=this.x,r=this.y,i=this.z,o=t.x,s=t.y,a=t.z,c=t.w,l=2*(s*i-a*r),u=2*(a*n-o*i),d=2*(o*r-s*n);return this.x=n+c*l+s*d-a*u,this.y=r+c*u+a*l-o*d,this.z=i+c*d+o*u-s*l,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const n=this.x,r=this.y,i=this.z,o=t.elements;return this.x=o[0]*n+o[4]*r+o[8]*i,this.y=o[1]*n+o[5]*r+o[9]*i,this.z=o[2]*n+o[6]*r+o[10]*i,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,n){return this.x=pt(this.x,t.x,n.x),this.y=pt(this.y,t.y,n.y),this.z=pt(this.z,t.z,n.z),this}clampScalar(t,n){return this.x=pt(this.x,t,n),this.y=pt(this.y,t,n),this.z=pt(this.z,t,n),this}clampLength(t,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(pt(r,t,n))}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,n){return this.x+=(t.x-this.x)*n,this.y+=(t.y-this.y)*n,this.z+=(t.z-this.z)*n,this}lerpVectors(t,n,r){return this.x=t.x+(n.x-t.x)*r,this.y=t.y+(n.y-t.y)*r,this.z=t.z+(n.z-t.z)*r,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,n){const r=t.x,i=t.y,o=t.z,s=n.x,a=n.y,c=n.z;return this.x=i*c-o*a,this.y=o*s-r*c,this.z=r*a-i*s,this}projectOnVector(t){const n=t.lengthSq();if(n===0)return this.set(0,0,0);const r=t.dot(this)/n;return this.copy(t).multiplyScalar(r)}projectOnPlane(t){return Lo.copy(this).projectOnVector(t),this.sub(Lo)}reflect(t){return this.sub(Lo.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const n=Math.sqrt(this.lengthSq()*t.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(t)/n;return Math.acos(pt(r,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const n=this.x-t.x,r=this.y-t.y,i=this.z-t.z;return n*n+r*r+i*i}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,n,r){const i=Math.sin(n)*t;return this.x=i*Math.sin(r),this.y=Math.cos(n)*t,this.z=i*Math.cos(r),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,n,r){return this.x=t*Math.sin(n),this.y=r,this.z=t*Math.cos(n),this}setFromMatrixPosition(t){const n=t.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(t){const n=this.setFromMatrixColumn(t,0).length(),r=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=n,this.y=r,this.z=i,this}setFromMatrixColumn(t,n){return this.fromArray(t.elements,n*4)}setFromMatrix3Column(t,n){return this.fromArray(t.elements,n*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,n=0){return this.x=t[n],this.y=t[n+1],this.z=t[n+2],this}toArray(t=[],n=0){return t[n]=this.x,t[n+1]=this.y,t[n+2]=this.z,t}fromBufferAttribute(t,n){return this.x=t.getX(n),this.y=t.getY(n),this.z=t.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,n=Math.random()*2-1,r=Math.sqrt(1-n*n);return this.x=r*Math.cos(t),this.y=n,this.z=r*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Lo=new Sn,ec=new zv;function oa(e,t,n){if(t.length!==e.length)return!0;for(let r=0;r<t.length;r++)if(Math.abs(t[r]-e[r])>n)return!1;return!0}function Id(e,t,n){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 r=0;return r+=Math.abs(e.orientation[0]-t.orientation[0]),r+=Math.abs(e.orientation[1]-t.orientation[1]),r+=Math.abs(e.orientation[2]-t.orientation[2]),r+=Math.abs(e.position[0]-t.position[0]),r+=Math.abs(e.position[1]-t.position[1]),r+=Math.abs(e.position[2]-t.position[2]),r<=n}function sa(e,t,n){return e.coordinate_system===t.coordinate_system&&e.tcp===t.tcp&&Id(e.tcp_pose,t.tcp_pose,n)}function kd(e,t){const n=new Vo.Vector3(t[0],t[1],t[2]),r=new Vo.Vector3(e[0],e[1],e[2]),i=n.length(),o=n.normalize();let s=r.length(),a=r.normalize();a.dot(o)<0&&(s=-s,a=a.multiplyScalar(-1));let c=s-i;return c-=2*Math.PI*Math.floor((c+Math.PI)/(2*Math.PI)),s=i+c,[...a.multiplyScalar(s)]}const tc=1e-4;class Xi{constructor(t,n,r,i,o,s){this.nova=t,this.controller=n,this.motionGroup=r,this.description=i,this.initialMotionState=o,this.motionStateSocket=s,this.rapidlyChangingMotionState=o,s.addEventListener("message",a=>{var l;const c=(l=Ee.tryParseJson(a.data))==null?void 0:l.result;if(!c)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${a.data}`);oa(this.rapidlyChangingMotionState.joint_position,c.joint_position,tc)||de.runInAction(()=>{this.rapidlyChangingMotionState.joint_position=c.joint_position}),sa(this.rapidlyChangingMotionState,c,tc)||de.runInAction(()=>{var u,d,h;this.rapidlyChangingMotionState.tcp_pose==null?this.rapidlyChangingMotionState.tcp_pose=c.tcp_pose:(u=c.tcp_pose)!=null&&u.orientation&&((d=c.tcp_pose)!=null&&d.position)&&((h=this.rapidlyChangingMotionState.tcp_pose)!=null&&h.orientation)?this.rapidlyChangingMotionState.tcp_pose={position:c.tcp_pose.position,orientation:kd(c.tcp_pose.orientation,this.rapidlyChangingMotionState.tcp_pose.orientation)}:console.warn("Received incomplete tcp_pose, ignoring",c.tcp_pose)}),this.rapidlyChangingMotionState.standstill!==c.standstill&&de.runInAction(()=>{this.rapidlyChangingMotionState.standstill=c.standstill})}),de.makeAutoObservable(this)}static async open(t,n){var d;const[r,i]=n.split("@"),o=await t.api.controller.getCurrentRobotControllerState(i),s=o==null?void 0:o.motion_groups.find(h=>h.motion_group===n);if(!o||!s)throw new Error(`Controller ${i} or motion group ${n} not found`);const a=t.openReconnectingWebsocket(`/controllers/${i}/motion-groups/${n}/state-stream`),c=await a.firstMessage(),l=(d=Ee.tryParseJson(c.data))==null?void 0:d.result;if(!l)throw new Error(`Unable to parse initial motion state message ${c.data}`);console.log(`Connected motion state websocket to motion group ${s.motion_group}. Initial state:
124
+ `,l);const u=await t.api.motionGroup.getMotionGroupDescription(i,s.motion_group);return new Xi(t,o,s,u,l,a)}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,n)=>({index:n}))}dispose(){this.motionStateSocket.close()}}const nc="Movement request rejected. Another client is currently executing a 'Jogging' motion!";class Zi{constructor(t,n={}){this.motionStream=t,this.options=n,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=(n==null?void 0:n.tcp)||t.motionGroup.tcp||this.DEFAULT_TCP,this.orientation=(n==null?void 0:n.orientation)||this.DEFAULT_ORIENTATION,this.timeout=(n==null?void 0:n.timeout)||this.DEFAULT_INIT_TIMEOUT,this.mode=(n==null?void 0:n.mode)||this.DEFAULT_MODE,this.onError=n==null?void 0:n.onError}static async open(t,n,r={}){const i=await Xi.open(t,n),o=new Zi(i,r);return await o.setJoggingMode(o.mode),o}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(n=>n!==null);return t.forEach(n=>{n.dispose()}),this.joggingSocket=null,this.trajectorySocket=null,Promise.all(t.map(n=>n.closed()))}async setJoggingMode(t,n=!0){if(!(this.mode===t&&n)&&(this.dispose(),this.mode=t,this.mode==="jogging"))return this.initializeJoggingWebsocket()}async initializeJoggingWebsocket(){return new Promise((t,n)=>{const r=setTimeout(()=>{n(new Error(`Jogging initialization timeout after ${this.timeout} seconds`))},this.timeout);this.joggingSocket=this.nova.openReconnectingWebsocket(this.ENDPOINT_JOGGING),this.joggingSocket.addEventListener("message",i=>{var s,a,c,l;const o=Ee.tryParseJson(i.data);if(((s=o==null?void 0:o.result)==null?void 0:s.kind)==="INITIALIZE_RECEIVED"){clearTimeout(r),t();return}if(((a=o==null?void 0:o.result)==null?void 0:a.kind)==="MOTION_ERROR")if(clearTimeout(r),this.onBlocked&&((c=o==null?void 0:o.result)!=null&&c.message.includes(nc))){(l=this.joggingSocket)==null||l.dispose(),this.onBlocked();return}else this.onError?this.onError(i.data):n(new Error(i.data))}),this.joggingSocket.sendJson({message_type:"InitializeJoggingRequest",motion_group:this.motionGroupId,tcp:this.tcp})})}async rotateJoints({joint:t,direction:n,velocityRadsPerSec:r}){if(!this.joggingSocket||this.mode!=="jogging")throw new Error("Joint jogging websocket not connected; create one by setting jogging mode to 'jogging'");const i=new Array(this.numJoints).fill(0);i[t]=n==="-"?-r:r,this.joggingSocket.sendJson({message_type:"JointVelocityRequest",velocity:i})}async translateTCP({axis:t,direction:n,velocityMmPerSec:r}){if(!this.joggingSocket||this.mode!=="jogging")throw new Error("Continuous jogging websocket not connected; create one by setting jogging mode to 'jogging'");const i=[0,0,0],o=[0,0,0];o[Ee.XYZ_TO_VECTOR[t]]=n==="-"?-r:r,this.joggingSocket.sendJson({message_type:"TcpVelocityRequest",translation:o,rotation:i,use_tool_coordinate_system:this.orientation==="tool"})}async rotateTCP({axis:t,direction:n,velocityRadsPerSec:r}){if(!this.joggingSocket||this.mode!=="jogging")throw new Error("Continuous jogging websocket not connected; create one by setting jogging mode to 'jogging'");const i=[0,0,0],o=[0,0,0];i[Ee.XYZ_TO_VECTOR[t]]=n==="-"?-r:r,this.joggingSocket.sendJson({message_type:"TcpVelocityRequest",translation:o,rotation:i})}async runIncrementalCartesianMotion({currentTcpPose:t,currentJoints:n,velocityInRelevantUnits:r,axis:i,direction:o,motion:s}){const a=[];if(this.mode!=="trajectory")throw new Error("Set jogging mode to 'trajectory' to run incremental cartesian motions");if(s.type==="translate"){if(!t.position)throw new Error("Current pose has no position, cannot perform translation");const b=[...t.position];b[Ee.XYZ_TO_VECTOR[i]]+=s.distanceMm*(o==="-"?-1:1),a.push({limits_override:{tcp_velocity_limit:r},path:{path_definition_name:"PathLine",target_pose:{position:b,orientation:t.orientation}}})}else if(s.type==="rotate"){if(!t.orientation)throw new Error("Current pose has no orientation, cannot perform rotation");const b=new Sn(t.orientation[0],t.orientation[1],t.orientation[2]),v=b.length(),M=b.clone().normalize(),S=s.distanceRads*(o==="-"?-1:1),T=new Sn(0,0,0);T[i]=1;const C=Math.cos(.5*S)*Math.cos(.5*v),w=Math.sin(.5*S)*Math.sin(.5*v),E=Math.sin(.5*S)*Math.cos(.5*v),j=Math.cos(.5*S)*Math.sin(.5*v),O=T.dot(M),y=T.clone().cross(M),_=2*Math.acos(C-w*O),A=_/Math.sin(.5*_),I=new Sn().addScaledVector(y,w).addScaledVector(T,E).addScaledVector(M,j).multiplyScalar(A);a.push({limits_override:{tcp_orientation_velocity_limit:r},path:{path_definition_name:"PathLine",target_pose:{position:t.position,orientation:[...I]}}})}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 l={motion_group_model:c.motion_group_model,cycle_time:c.cycle_time,mounting:c.mounting,global:c.operation_limits.auto_limits},u=await this.nova.api.trajectoryPlanning.planTrajectory({motion_group_setup:l,start_joint_position:n,motion_commands:a}),d=u.response;if(!d)throw new Error(`Failed to plan jogging increment motion ${JSON.stringify(u)}`);this.trajectorySocket&&(console.warn("Trajectory jogging websocket already open; will close"),this.trajectorySocket.dispose()),this.trajectorySocket=this.nova.openReconnectingWebsocket(this.ENDPOINT_TRAJECTORY);const h=b=>{var v;if(!b||b.add_trajectory_error||b.message)if(this.onError)this.onError(b);else throw new Error(((v=b==null?void 0:b.add_trajectory_error)==null?void 0:v.message)||(b==null?void 0:b.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 b;await de.when(()=>!this.motionStream.rapidlyChangingMotionState.standstill),await de.when(()=>this.motionStream.rapidlyChangingMotionState.standstill),(b=this.trajectorySocket)==null||b.dispose(),this.trajectorySocket=null},m=async()=>{var b;await de.when(()=>this.motionStream.rapidlyChangingMotionState.standstill),(b=this.trajectorySocket)==null||b.dispose(),this.trajectorySocket=null},p=async b=>{if(b!=null&&b.message)if(this.onError){this.onError(b);return}else throw new Error(b.message||"Failed to execute trajectory, unknown error");this.motionStream.rapidlyChangingMotionState.standstill?await f():await m()};this.trajectorySocket.addEventListener("message",b=>{var M,S;const v=Ee.tryParseJson(b.data);if(!((M=v==null?void 0:v.result)!=null&&M.kind))throw new Error(`Failed to execute trajectory: Received invalid message ${b.data}`);if(this.onBlocked&&((S=v.result.message)!=null&&S.includes(nc))){this.onBlocked();return}if(v.result.kind==="INITIALIZE_RECEIVED")h(v.result);else if(v.result.kind==="START_RECEIVED")p(v);else if(v.result.kind!=="PAUSE_RECEIVED")if(v.result.kind==="MOTION_ERROR"&&v.result.message)if(this.onError){this.onError(v);return}else throw new Error(v.result.message);else throw new Error(`Failed to execute trajectory, cannot handle message type "${v.result.kind}"`)}),this.trajectorySocket.sendJson({message_type:"InitializeMovementRequest",trajectory:{message_type:"TrajectoryData",motion_group:this.motionGroupId,data:d,tcp:this.tcp}})}}var Fv="[object AsyncFunction]",Bv="[object Function]",Vv="[object GeneratorFunction]",Gv="[object Proxy]";function Ad(e){if(!Ht(e))return!1;var t=tn(e);return t==Bv||t==Vv||t==Fv||t==Gv}var zo=lt["__core-js_shared__"],rc=function(){var e=/[^.]+$/.exec(zo&&zo.keys&&zo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Uv(e){return!!rc&&rc in e}var Wv=Function.prototype,Hv=Wv.toString;function nn(e){if(e!=null){try{return Hv.call(e)}catch{}try{return e+""}catch{}}return""}var Yv=/[\\^$.*+?()[\]{}|]/g,qv=/^\[object .+?Constructor\]$/,Jv=Function.prototype,Kv=Object.prototype,Xv=Jv.toString,Zv=Kv.hasOwnProperty,Qv=RegExp("^"+Xv.call(Zv).replace(Yv,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function e2(e){if(!Ht(e)||Uv(e))return!1;var t=Ad(e)?Qv:qv;return t.test(nn(e))}function t2(e,t){return e==null?void 0:e[t]}function rn(e,t){var n=t2(e,t);return e2(n)?n:void 0}var ic=function(){try{var e=rn(Object,"defineProperty");return e({},"",{}),e}catch{}}();function n2(e,t,n){t=="__proto__"&&ic?ic(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function r2(e,t,n,r){for(var i=-1,o=e==null?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}function i2(e){return function(t,n,r){for(var i=-1,o=Object(t),s=r(t),a=s.length;a--;){var c=s[++i];if(n(o[c],c,o)===!1)break}return t}}var o2=i2();function s2(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var a2="[object Arguments]";function oc(e){return Yt(e)&&tn(e)==a2}var Od=Object.prototype,l2=Od.hasOwnProperty,c2=Od.propertyIsEnumerable,Pd=oc(function(){return arguments}())?oc:function(e){return Yt(e)&&l2.call(e,"callee")&&!c2.call(e,"callee")},at=Array.isArray;function u2(){return!1}var Dd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,sc=Dd&&typeof module=="object"&&module&&!module.nodeType&&module,d2=sc&&sc.exports===Dd,ac=d2?lt.Buffer:void 0,h2=ac?ac.isBuffer:void 0,as=h2||u2,f2=9007199254740991,p2=/^(?:0|[1-9]\d*)$/;function $d(e,t){var n=typeof e;return t=t??f2,!!t&&(n=="number"||n!="symbol"&&p2.test(e))&&e>-1&&e%1==0&&e<t}var m2=9007199254740991;function aa(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=m2}var g2="[object Arguments]",y2="[object Array]",x2="[object Boolean]",b2="[object Date]",v2="[object Error]",S2="[object Function]",E2="[object Map]",w2="[object Number]",T2="[object Object]",C2="[object RegExp]",_2="[object Set]",R2="[object String]",M2="[object WeakMap]",j2="[object ArrayBuffer]",I2="[object DataView]",k2="[object Float32Array]",A2="[object Float64Array]",O2="[object Int8Array]",P2="[object Int16Array]",D2="[object Int32Array]",$2="[object Uint8Array]",N2="[object Uint8ClampedArray]",L2="[object Uint16Array]",z2="[object Uint32Array]",fe={};fe[k2]=fe[A2]=fe[O2]=fe[P2]=fe[D2]=fe[$2]=fe[N2]=fe[L2]=fe[z2]=!0;fe[g2]=fe[y2]=fe[j2]=fe[x2]=fe[I2]=fe[b2]=fe[v2]=fe[S2]=fe[E2]=fe[w2]=fe[T2]=fe[C2]=fe[_2]=fe[R2]=fe[M2]=!1;function F2(e){return Yt(e)&&aa(e.length)&&!!fe[tn(e)]}function B2(e){return function(t){return e(t)}}var Nd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Jn=Nd&&typeof module=="object"&&module&&!module.nodeType&&module,V2=Jn&&Jn.exports===Nd,Fo=V2&&Rd.process,lc=function(){try{var e=Jn&&Jn.require&&Jn.require("util").types;return e||Fo&&Fo.binding&&Fo.binding("util")}catch{}}(),cc=lc&&lc.isTypedArray,Ld=cc?B2(cc):F2,G2=Object.prototype,U2=G2.hasOwnProperty;function W2(e,t){var n=at(e),r=!n&&Pd(e),i=!n&&!r&&as(e),o=!n&&!r&&!i&&Ld(e),s=n||r||i||o,a=s?s2(e.length,String):[],c=a.length;for(var l in e)U2.call(e,l)&&!(s&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||$d(l,c)))&&a.push(l);return a}var H2=Object.prototype;function Y2(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||H2;return e===n}function q2(e,t){return function(n){return e(t(n))}}var J2=q2(Object.keys,Object),K2=Object.prototype,X2=K2.hasOwnProperty;function Z2(e){if(!Y2(e))return J2(e);var t=[];for(var n in Object(e))X2.call(e,n)&&n!="constructor"&&t.push(n);return t}function zd(e){return e!=null&&aa(e.length)&&!Ad(e)}function la(e){return zd(e)?W2(e):Z2(e)}function Q2(e,t){return e&&o2(e,t,la)}function eS(e,t){return function(n,r){if(n==null)return n;if(!zd(n))return e(n,r);for(var i=n.length,o=-1,s=Object(n);++o<i&&r(s[o],o,s)!==!1;);return n}}var tS=eS(Q2);function nS(e,t,n,r){return tS(e,function(i,o,s){t(r,i,n(i),s)}),r}function rS(){this.__data__=[],this.size=0}function Fd(e,t){return e===t||e!==e&&t!==t}function Qi(e,t){for(var n=e.length;n--;)if(Fd(e[n][0],t))return n;return-1}var iS=Array.prototype,oS=iS.splice;function sS(e){var t=this.__data__,n=Qi(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():oS.call(t,n,1),--this.size,!0}function aS(e){var t=this.__data__,n=Qi(t,e);return n<0?void 0:t[n][1]}function lS(e){return Qi(this.__data__,e)>-1}function cS(e,t){var n=this.__data__,r=Qi(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Tt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Tt.prototype.clear=rS;Tt.prototype.delete=sS;Tt.prototype.get=aS;Tt.prototype.has=lS;Tt.prototype.set=cS;function uS(){this.__data__=new Tt,this.size=0}function dS(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function hS(e){return this.__data__.get(e)}function fS(e){return this.__data__.has(e)}var sr=rn(lt,"Map"),ar=rn(Object,"create");function pS(){this.__data__=ar?ar(null):{},this.size=0}function mS(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var gS="__lodash_hash_undefined__",yS=Object.prototype,xS=yS.hasOwnProperty;function bS(e){var t=this.__data__;if(ar){var n=t[e];return n===gS?void 0:n}return xS.call(t,e)?t[e]:void 0}var vS=Object.prototype,SS=vS.hasOwnProperty;function ES(e){var t=this.__data__;return ar?t[e]!==void 0:SS.call(t,e)}var wS="__lodash_hash_undefined__";function TS(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ar&&t===void 0?wS:t,this}function qt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}qt.prototype.clear=pS;qt.prototype.delete=mS;qt.prototype.get=bS;qt.prototype.has=ES;qt.prototype.set=TS;function CS(){this.size=0,this.__data__={hash:new qt,map:new(sr||Tt),string:new qt}}function _S(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function eo(e,t){var n=e.__data__;return _S(t)?n[typeof t=="string"?"string":"hash"]:n.map}function RS(e){var t=eo(this,e).delete(e);return this.size-=t?1:0,t}function MS(e){return eo(this,e).get(e)}function jS(e){return eo(this,e).has(e)}function IS(e,t){var n=eo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Ct(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ct.prototype.clear=CS;Ct.prototype.delete=RS;Ct.prototype.get=MS;Ct.prototype.has=jS;Ct.prototype.set=IS;var kS=200;function AS(e,t){var n=this.__data__;if(n instanceof Tt){var r=n.__data__;if(!sr||r.length<kS-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ct(r)}return n.set(e,t),this.size=n.size,this}function xt(e){var t=this.__data__=new Tt(e);this.size=t.size}xt.prototype.clear=uS;xt.prototype.delete=dS;xt.prototype.get=hS;xt.prototype.has=fS;xt.prototype.set=AS;var OS="__lodash_hash_undefined__";function PS(e){return this.__data__.set(e,OS),this}function DS(e){return this.__data__.has(e)}function gi(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Ct;++t<n;)this.add(e[t])}gi.prototype.add=gi.prototype.push=PS;gi.prototype.has=DS;function $S(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function NS(e,t){return e.has(t)}var LS=1,zS=2;function Bd(e,t,n,r,i,o){var s=n&LS,a=e.length,c=t.length;if(a!=c&&!(s&&c>a))return!1;var l=o.get(e),u=o.get(t);if(l&&u)return l==t&&u==e;var d=-1,h=!0,f=n&zS?new gi:void 0;for(o.set(e,t),o.set(t,e);++d<a;){var m=e[d],p=t[d];if(r)var b=s?r(p,m,d,t,e,o):r(m,p,d,e,t,o);if(b!==void 0){if(b)continue;h=!1;break}if(f){if(!$S(t,function(v,M){if(!NS(f,M)&&(m===v||i(m,v,n,r,o)))return f.push(M)})){h=!1;break}}else if(!(m===p||i(m,p,n,r,o))){h=!1;break}}return o.delete(e),o.delete(t),h}var uc=lt.Uint8Array;function FS(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function BS(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var VS=1,GS=2,US="[object Boolean]",WS="[object Date]",HS="[object Error]",YS="[object Map]",qS="[object Number]",JS="[object RegExp]",KS="[object Set]",XS="[object String]",ZS="[object Symbol]",QS="[object ArrayBuffer]",eE="[object DataView]",dc=Pt?Pt.prototype:void 0,Bo=dc?dc.valueOf:void 0;function tE(e,t,n,r,i,o,s){switch(n){case eE:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case QS:return!(e.byteLength!=t.byteLength||!o(new uc(e),new uc(t)));case US:case WS:case qS:return Fd(+e,+t);case HS:return e.name==t.name&&e.message==t.message;case JS:case XS:return e==t+"";case YS:var a=FS;case KS:var c=r&VS;if(a||(a=BS),e.size!=t.size&&!c)return!1;var l=s.get(e);if(l)return l==t;r|=GS,s.set(e,t);var u=Bd(a(e),a(t),r,i,o,s);return s.delete(e),u;case ZS:if(Bo)return Bo.call(e)==Bo.call(t)}return!1}function nE(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function rE(e,t,n){var r=t(e);return at(e)?r:nE(r,n(e))}function iE(e,t){for(var n=-1,r=e==null?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function oE(){return[]}var sE=Object.prototype,aE=sE.propertyIsEnumerable,hc=Object.getOwnPropertySymbols,lE=hc?function(e){return e==null?[]:(e=Object(e),iE(hc(e),function(t){return aE.call(e,t)}))}:oE;function fc(e){return rE(e,la,lE)}var cE=1,uE=Object.prototype,dE=uE.hasOwnProperty;function hE(e,t,n,r,i,o){var s=n&cE,a=fc(e),c=a.length,l=fc(t),u=l.length;if(c!=u&&!s)return!1;for(var d=c;d--;){var h=a[d];if(!(s?h in t:dE.call(t,h)))return!1}var f=o.get(e),m=o.get(t);if(f&&m)return f==t&&m==e;var p=!0;o.set(e,t),o.set(t,e);for(var b=s;++d<c;){h=a[d];var v=e[h],M=t[h];if(r)var S=s?r(M,v,h,t,e,o):r(v,M,h,e,t,o);if(!(S===void 0?v===M||i(v,M,n,r,o):S)){p=!1;break}b||(b=h=="constructor")}if(p&&!b){var T=e.constructor,C=t.constructor;T!=C&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof C=="function"&&C instanceof C)&&(p=!1)}return o.delete(e),o.delete(t),p}var ls=rn(lt,"DataView"),cs=rn(lt,"Promise"),us=rn(lt,"Set"),ds=rn(lt,"WeakMap"),pc="[object Map]",fE="[object Object]",mc="[object Promise]",gc="[object Set]",yc="[object WeakMap]",xc="[object DataView]",pE=nn(ls),mE=nn(sr),gE=nn(cs),yE=nn(us),xE=nn(ds),jt=tn;(ls&&jt(new ls(new ArrayBuffer(1)))!=xc||sr&&jt(new sr)!=pc||cs&&jt(cs.resolve())!=mc||us&&jt(new us)!=gc||ds&&jt(new ds)!=yc)&&(jt=function(e){var t=tn(e),n=t==fE?e.constructor:void 0,r=n?nn(n):"";if(r)switch(r){case pE:return xc;case mE:return pc;case gE:return mc;case yE:return gc;case xE:return yc}return t});var bE=1,bc="[object Arguments]",vc="[object Array]",Nr="[object Object]",vE=Object.prototype,Sc=vE.hasOwnProperty;function SE(e,t,n,r,i,o){var s=at(e),a=at(t),c=s?vc:jt(e),l=a?vc:jt(t);c=c==bc?Nr:c,l=l==bc?Nr:l;var u=c==Nr,d=l==Nr,h=c==l;if(h&&as(e)){if(!as(t))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new xt),s||Ld(e)?Bd(e,t,n,r,i,o):tE(e,t,c,n,r,i,o);if(!(n&bE)){var f=u&&Sc.call(e,"__wrapped__"),m=d&&Sc.call(t,"__wrapped__");if(f||m){var p=f?e.value():e,b=m?t.value():t;return o||(o=new xt),i(p,b,n,r,o)}}return h?(o||(o=new xt),hE(e,t,n,r,i,o)):!1}function to(e,t,n,r,i){return e===t?!0:e==null||t==null||!Yt(e)&&!Yt(t)?e!==e&&t!==t:SE(e,t,n,r,to,i)}var EE=1,wE=2;function TE(e,t,n,r){var i=n.length,o=i;if(e==null)return!o;for(e=Object(e);i--;){var s=n[i];if(s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){s=n[i];var a=s[0],c=e[a],l=s[1];if(s[2]){if(c===void 0&&!(a in e))return!1}else{var u=new xt,d;if(!(d===void 0?to(l,c,EE|wE,r,u):d))return!1}}return!0}function Vd(e){return e===e&&!Ht(e)}function CE(e){for(var t=la(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Vd(i)]}return t}function Gd(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function _E(e){var t=CE(e);return t.length==1&&t[0][2]?Gd(t[0][0],t[0][1]):function(n){return n===e||TE(n,e,t)}}var RE=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ME=/^\w*$/;function ca(e,t){if(at(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Ki(e)?!0:ME.test(e)||!RE.test(e)||t!=null&&e in Object(t)}var jE="Expected a function";function ua(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(jE);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(ua.Cache||Ct),n}ua.Cache=Ct;var IE=500;function kE(e){var t=ua(e,function(r){return n.size===IE&&n.clear(),r}),n=t.cache;return t}var AE=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,OE=/\\(\\)?/g,PE=kE(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(AE,function(n,r,i,o){t.push(i?o.replace(OE,"$1"):r||n)}),t});function DE(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var Ec=Pt?Pt.prototype:void 0,wc=Ec?Ec.toString:void 0;function Ud(e){if(typeof e=="string")return e;if(at(e))return DE(e,Ud)+"";if(Ki(e))return wc?wc.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Wd(e){return e==null?"":Ud(e)}function Hd(e,t){return at(e)?e:ca(e,t)?[e]:PE(Wd(e))}function no(e){if(typeof e=="string"||Ki(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Yd(e,t){t=Hd(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[no(t[n++])];return n&&n==r?e:void 0}function $E(e,t,n){var r=e==null?void 0:Yd(e,t);return r===void 0?n:r}function NE(e,t){return e!=null&&t in Object(e)}function LE(e,t,n){t=Hd(t,e);for(var r=-1,i=t.length,o=!1;++r<i;){var s=no(t[r]);if(!(o=e!=null&&n(e,s)))break;e=e[s]}return o||++r!=i?o:(i=e==null?0:e.length,!!i&&aa(i)&&$d(s,i)&&(at(e)||Pd(e)))}function zE(e,t){return e!=null&&LE(e,t,NE)}var FE=1,BE=2;function VE(e,t){return ca(e)&&Vd(t)?Gd(no(e),t):function(n){var r=$E(n,e);return r===void 0&&r===t?zE(n,e):to(t,r,FE|BE)}}function GE(e){return e}function UE(e){return function(t){return t==null?void 0:t[e]}}function WE(e){return function(t){return Yd(t,e)}}function HE(e){return ca(e)?UE(no(e)):WE(e)}function YE(e){return typeof e=="function"?e:e==null?GE:typeof e=="object"?at(e)?VE(e[0],e[1]):_E(e):HE(e)}function qE(e,t){return function(n,r){var i=at(n)?r2:nS,o={};return i(n,e,YE(r),o)}}var Lr=qE(function(e,t,n){n2(e,n,t)}),JE=0;function KE(e){var t=++JE;return Wd(e)+t}const hs=[{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}],XE=[{id:"continuous"},...hs],ZE=["coordsys","tool"];class ro{constructor(t,n,r,i){var o,s;this.jogger=t,this.coordSystems=n,this.motionGroupDescription=r,this.tcps=i,this.selectedTabId="cartesian",this.activationState="inactive",this.activationError=null,this.activationCounter=0,this.locks=new Set,this.blocked=!1,this.selectedCoordSystemId="world",this.selectedTcpId="",this.selectedOrientation="coordsys",this.selectedIncrementId="continuous",this.selectedCartesianMotionType="translate",this.incrementJogInProgress=null,this.translationVelocityMmPerSec=10,this.rotationVelocityDegPerSec=1,this.minTranslationVelocityMmPerSec=5,this.maxTranslationVelocityMmPerSec=250,this.minRotationVelocityDegPerSec=1,this.maxRotationVelocityDegPerSec=60,this.showCoordSystemSelect=!1,this.showTcpSelect=!0,this.showOrientationSelect=!0,this.showIncrementSelect=!0,this.showTabIcons=!1,this.showVelocitySliderLabel=!0,this.showVelocityLegend=!1,this.showJointsLegend=!1,this.disposers=[];for(const a of n)if(a.coordinate_system===""){a.coordinate_system="world";break}this.selectedCoordSystemId=((o=n[0])==null?void 0:o.coordinate_system)||"world",this.selectedTcpId=((s=i[0])==null?void 0:s.id)||"",de.makeAutoObservable(this,{},{autoBind:!0}),this.jogger.onBlocked=()=>{this.block()},this.loadFromLocalStorage(),this.disposers.push(de.autorun(()=>this.saveToLocalStorage())),window.joggingStore=this}static async loadFor(t){const{nova:n}=t,[r,i]=await Promise.all([n.api.controller.listCoordinateSystems(t.motionStream.controllerId,"ROTATION_VECTOR"),n.api.motionGroup.getMotionGroupDescription(t.motionStream.controllerId,t.motionGroupId)]),o=Object.entries(i.tcps||{}).map(([s,a])=>({id:s,readable_name:a.name,position:a.pose.position,orientation:a.pose.orientation}));return new ro(t,r||[],i,o)}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}get coordSystemCountByName(){return Oc.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=Ee.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 XE}get discreteIncrementOptions(){return hs}get incrementOptionsById(){return Lr(this.incrementOptions,t=>t.id)}get tabsById(){return Lr(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 Lr(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 Lr(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:hs.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,n){const r=this.tabs[n]||this.tabs[0];this.selectedTabId=r.id}setSelectedCoordSystemId(t){this.selectedCoordSystemId=t}setSelectedTcpId(t){this.selectedTcpId=t}setSelectedOrientation(t){this.selectedOrientation=t}setSelectedIncrementId(t){this.selectedIncrementId=t}setCurrentIncrementJog(t){this.incrementJogInProgress=t}setVelocityFromSlider(t){this.currentMotionType==="translate"?this.translationVelocityMmPerSec=t:this.rotationVelocityDegPerSec=t}setSelectedCartesianMotionType(t){this.selectedCartesianMotionType=t}lock(t){this.locks.add(t)}unlock(t){this.locks.delete(t)}block(){this.blocked=!0}unblock(){this.blocked=!1,this.jogger.mode==="jogging"&&this.jogger.initializeJoggingWebsocket()}async withMotionLock(t){const n=KE();this.lock(n);try{return await t()}finally{this.unlock(n)}}}const QE=ie.observer(({store:e})=>{const{t}=he.useTranslation();return g.jsxRuntimeExports.jsx(R.Backdrop,{open:!0,sx:{position:"absolute",zIndex:n=>n.zIndex.drawer+1,color:"#fff",background:"rgba(15, 15, 15, 0.88)",justifyContent:"flex-start",alignItems:"flex-start"},children:g.jsxRuntimeExports.jsxs(R.Stack,{sx:{m:2,width:"100%"},children:[g.jsxRuntimeExports.jsxs(R.Alert,{severity:"error",sx:{mb:2},children:[g.jsxRuntimeExports.jsx(R.AlertTitle,{children:t("Jogging.Blocked.ti")}),t("Jogging.Blocked.lb")]}),g.jsxRuntimeExports.jsx(R.Button,{variant:"contained",color:"secondary",onClick:()=>e.unblock(),children:t("Jogging.Blocked.Reenable.bt")})]})})}),ew=({title:e,titleId:t,...n},r)=>k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:r,"aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.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"})),tw=$.forwardRef(ew),nw=({title:e,titleId:t,...n},r)=>k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:r,"aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.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"})),rw=$.forwardRef(nw),iw=({title:e,titleId:t,...n},r)=>k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:19,fill:"none",ref:r,"aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.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"})),ow=$.forwardRef(iw),sw=({title:e,titleId:t,...n},r)=>k.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.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"})),aw=$.forwardRef(sw);function lw(e,t){return to(e,t)}const qd=({store:e})=>{const{t}=he.useTranslation(),[n,r]=$.useState(e.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached),i=$.useRef(n);ue.useAnimationFrame(()=>{const s=e.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached;lw(i.current,s)||(i.current=s,r(s))});const o=[];for(const[s,a]of n.entries())a&&o.push(s);return g.jsxRuntimeExports.jsx(R.Typography,{color:"error",sx:{margin:"0.5rem 1rem",textAlign:"center",minHeight:"1.5rem",visibility:o.length?"visible":"hidden"},children:t("Jogging.JointLimitsReached.lb",{jointNumbers:o.map(s=>s+1).join(", ")})})},cw=R.styled(R.FormControl)(({theme:e})=>({"&.MuiFormControl-root":{".MuiSelect-select":{paddingTop:"20px",paddingLeft:"12px"},label:{pointerEvents:"none",fontSize:"16px"},".MuiInputLabel-root":{"&.Mui-focused":{color:e.palette.text.primary}}}}));function zr({labelValue:e,...t}){return g.jsxRuntimeExports.jsxs(cw,{fullWidth:!0,variant:"filled",children:[g.jsxRuntimeExports.jsx(R.InputLabel,{id:t.labelId,children:e}),g.jsxRuntimeExports.jsx(R.Select,{...t})]})}const uw=ie.observer(({store:e})=>{var i;const{t}=he.useTranslation(),n=[];function r(o){switch(o){case"coordsys":return t("Jogging.Orientation.coordsys");case"tool":return t("Jogging.Orientation.tool");default:return o}}return e.showCoordSystemSelect&&n.push(g.jsxRuntimeExports.jsx(zr,{labelId:"jogging-coord-select",labelValue:t("Jogging.CoordinateSystem.hlb"),value:e.selectedCoordSystemId,size:"small",variant:"filled",displayEmpty:!0,onChange:o=>e.setSelectedCoordSystemId(o.target.value),disabled:e.isLocked,children:e.coordSystems.map(o=>g.jsxRuntimeExports.jsx(R.MenuItem,{value:o.coordinate_system,children:o.name&&e.coordSystemCountByName[o.name]>1?`${o.name} / ${o.coordinate_system}`:o.name||o.coordinate_system},o.coordinate_system))},"coord")),e.showTcpSelect&&n.push(g.jsxRuntimeExports.jsx(zr,{labelId:"jogging-tcp-select",labelValue:"TCP",value:e.selectedTcpId,size:"small",variant:"filled",onChange:o=>e.setSelectedTcpId(o.target.value),disabled:e.isLocked,children:e.tcps.map(o=>g.jsxRuntimeExports.jsx(R.MenuItem,{value:o.id,children:o.id},o.id))},"tcp")),e.showOrientationSelect&&n.push(g.jsxRuntimeExports.jsx(zr,{labelValue:t("Jogging.Cartesian.Orientation.lb"),id:"orientation-select",labelId:"orientation-select",value:e.selectedOrientation,onChange:o=>e.setSelectedOrientation(o.target.value),disabled:e.isLocked,children:ZE.map(o=>g.jsxRuntimeExports.jsx(R.MenuItem,{value:o,children:r(o)},o))},"orientation")),e.showIncrementSelect&&n.push(g.jsxRuntimeExports.jsxs(zr,{labelValue:t("Jogging.Increment.hlb"),labelId:"jogging-increment-select",size:"small",variant:"filled",value:((i=e.activeDiscreteIncrement)==null?void 0:i.id)||"continuous",onChange:o=>e.setSelectedIncrementId(o.target.value),disabled:e.isLocked,children:[g.jsxRuntimeExports.jsx(R.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(o=>g.jsxRuntimeExports.jsx(R.MenuItem,{value:o.id,children:e.currentMotionType==="translate"?`${o.mm}mm`:`${o.degrees}°`},o.id))]},"increment")),g.jsxRuntimeExports.jsx(R.Box,{component:"div",sx:{display:"grid",gap:"16px",gridTemplateColumns:"1fr 1fr",gridAutoRows:"min-content","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:n.map((o,s)=>g.jsxRuntimeExports.jsx(R.Box,{sx:{gridColumn:n.length%2===1&&s===n.length-1?"span 2":"auto"},children:o},s))})}),dw=R.styled(R.ToggleButtonGroup)(({theme:e})=>{var t;return{"&.MuiToggleButtonGroup-root":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[8],borderRadius:"8px",padding:"4px",gap:"4px",button:{border:"none",borderRadius:"4px",flex:"1 1 0px",minWidth:0,"&.MuiToggleButtonGroup-firstButton":{borderRadius:"8px 4px 4px 8px"},"&.MuiToggleButtonGroup-lastButton":{borderRadius:"4px 8px 8px 4px"}}}}});function Tc(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...r){return e(...r)||t(...r)}}function hw(e){return typeof e=="string"}function fw(e,t,n){return e===void 0||hw(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function qr(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function Cc(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function pw(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const f=Xe(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),m={...n==null?void 0:n.style,...i==null?void 0:i.style,...r==null?void 0:r.style},p={...n,...i,...r};return f.length>0&&(p.className=f),Object.keys(m).length>0&&(p.style=m),{props:p,internalRef:void 0}}const s=qr({...i,...r}),a=Cc(r),c=Cc(i),l=t(s),u=Xe(l==null?void 0:l.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),d={...l==null?void 0:l.style,...n==null?void 0:n.style,...i==null?void 0:i.style,...r==null?void 0:r.style},h={...l,...n,...c,...a};return u.length>0&&(h.className=u),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:l.ref}}function mw(e,t,n){return typeof e=="function"?e(t,n):e}function Mt(e){var d;const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...o}=e,s=i?{}:mw(n,r),{props:a,internalRef:c}=pw({...o,externalSlotProps:s}),l=Ai(c,s==null?void 0:s.ref,(d=e.additionalProps)==null?void 0:d.ref);return fw(t,{...a,ref:l},r)}function _c(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(`
125
+ `))}return!1}const gw={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function yw(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}const xw=2;function pn(e,t,n,r,i){return n===1?Math.min(e+t,i):Math.max(e-t,r)}function Jd(e,t){return e-t}function Rc(e,t){const{index:n}=e.reduce((r,i,o)=>{const s=Math.abs(t-i);return r===null||s<r.distance||s===r.distance?{distance:s,index:o}:r},null)??{};return n}function Fr(e,t){if(t.current!==void 0&&e.changedTouches){const n=e;for(let r=0;r<n.changedTouches.length;r+=1){const i=n.changedTouches[r];if(i.identifier===t.current)return{x:i.clientX,y:i.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function yi(e,t,n){return(e-t)*100/(n-t)}function bw(e,t,n){return(n-t)*e+t}function vw(e){if(Math.abs(e)<1){const n=e.toExponential().split("e-"),r=n[0].split(".")[1];return(r?r.length:0)+parseInt(n[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function Sw(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(vw(t)))}function Mc({values:e,newValue:t,index:n}){const r=e.slice();return r[n]=t,r.sort(Jd)}function Br({sliderRef:e,activeIndex:t,setActive:n}){var i,o,s;const r=Yn(e.current);(!((i=e.current)!=null&&i.contains(r.activeElement))||Number((o=r==null?void 0:r.activeElement)==null?void 0:o.getAttribute("data-index"))!==t)&&((s=e.current)==null||s.querySelector(`[type="range"][data-index="${t}"]`).focus()),n&&n(t)}function Vr(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?yw(e,t):!1}const Ew={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}%`})}},ww=e=>e;let Gr;function jc(){return Gr===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?Gr=CSS.supports("touch-action","none"):Gr=!0),Gr}function Tw(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:o=!1,marks:s=!1,max:a=100,min:c=0,name:l,onChange:u,onChangeCommitted:d,orientation:h="horizontal",rootRef:f,scale:m=ww,step:p=1,shiftStep:b=10,tabIndex:v,value:M}=e,S=k.useRef(void 0),[T,C]=k.useState(-1),[w,E]=k.useState(-1),[j,O]=k.useState(!1),y=k.useRef(0),_=k.useRef(null),[A,I]=iv({controlled:M,default:n??c,name:"Slider"}),P=u&&((z,G,Y)=>{const ee=z.nativeEvent||z,ae=new ee.constructor(ee.type,ee);Object.defineProperty(ae,"target",{writable:!0,value:{value:G,name:l}}),_.current=G,u(ae,G,Y)}),U=Array.isArray(A);let B=U?A.slice().sort(Jd):[A];B=B.map(z=>z==null?c:mn(z,c,a));const W=s===!0&&p!==null?[...Array(Math.floor((a-c)/p)+1)].map((z,G)=>({value:c+p*G})):s||[],F=W.map(z=>z.value),[H,ne]=k.useState(-1),Z=k.useRef(null),Pe=Ai(f,Z),ct=z=>G=>{var ee;const Y=Number(G.currentTarget.getAttribute("data-index"));_c(G.target)&&ne(Y),E(Y),(ee=z==null?void 0:z.onFocus)==null||ee.call(z,G)},ut=z=>G=>{var Y;_c(G.target)||ne(-1),E(-1),(Y=z==null?void 0:z.onBlur)==null||Y.call(z,G)},je=(z,G)=>{const Y=Number(z.currentTarget.getAttribute("data-index")),ee=B[Y],ae=F.indexOf(ee);let J=G;if(W&&p==null){const Ce=F[F.length-1];J>=Ce?J=Ce:J<=F[0]?J=F[0]:J=J<ee?F[ae-1]:F[ae+1]}if(J=mn(J,c,a),U){i&&(J=mn(J,B[Y-1]||-1/0,B[Y+1]||1/0));const Ce=J;J=Mc({values:B,newValue:J,index:Y});let ke=Y;i||(ke=J.indexOf(Ce)),Br({sliderRef:Z,activeIndex:ke})}I(J),ne(Y),P&&!Vr(J,A)&&P(z,J,Y),d&&d(z,_.current??J)},dt=z=>G=>{var Y;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(G.key)){G.preventDefault();const ee=Number(G.currentTarget.getAttribute("data-index")),ae=B[ee];let J=null;if(p!=null){const Ce=G.shiftKey?b:p;switch(G.key){case"ArrowUp":J=pn(ae,Ce,1,c,a);break;case"ArrowRight":J=pn(ae,Ce,o?-1:1,c,a);break;case"ArrowDown":J=pn(ae,Ce,-1,c,a);break;case"ArrowLeft":J=pn(ae,Ce,o?1:-1,c,a);break;case"PageUp":J=pn(ae,b,1,c,a);break;case"PageDown":J=pn(ae,b,-1,c,a);break;case"Home":J=c;break;case"End":J=a;break}}else if(W){const Ce=F[F.length-1],ke=F.indexOf(ae),ve=[o?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],Be=[o?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];ve.includes(G.key)?ke===0?J=F[0]:J=F[ke-1]:Be.includes(G.key)&&(ke===F.length-1?J=Ce:J=F[ke+1])}J!=null&&je(G,J)}(Y=z==null?void 0:z.onKeyDown)==null||Y.call(z,G)};st(()=>{var z;r&&Z.current.contains(document.activeElement)&&((z=document.activeElement)==null||z.blur())},[r]),r&&T!==-1&&C(-1),r&&H!==-1&&ne(-1);const Qe=z=>G=>{var Y;(Y=z.onChange)==null||Y.call(z,G),je(G,G.target.valueAsNumber)},Le=k.useRef(void 0);let V=h;o&&h==="horizontal"&&(V+="-reverse");const q=({finger:z,move:G=!1})=>{const{current:Y}=Z,{width:ee,height:ae,bottom:J,left:Ce}=Y.getBoundingClientRect();let ke;V.startsWith("vertical")?ke=(J-z.y)/ae:ke=(z.x-Ce)/ee,V.includes("-reverse")&&(ke=1-ke);let ve;if(ve=bw(ke,c,a),p)ve=Sw(ve,p,c);else{const Pn=Rc(F,ve);ve=F[Pn]}ve=mn(ve,c,a);let Be=0;if(U){G?Be=Le.current:Be=Rc(B,ve),i&&(ve=mn(ve,B[Be-1]||-1/0,B[Be+1]||1/0));const Pn=ve;ve=Mc({values:B,newValue:ve,index:Be}),i&&G||(Be=ve.indexOf(Pn),Le.current=Be)}return{newValue:ve,activeIndex:Be}},K=yt(z=>{const G=Fr(z,S);if(!G)return;if(y.current+=1,z.type==="mousemove"&&z.buttons===0){N(z);return}const{newValue:Y,activeIndex:ee}=q({finger:G,move:!0});Br({sliderRef:Z,activeIndex:ee,setActive:C}),I(Y),!j&&y.current>xw&&O(!0),P&&!Vr(Y,A)&&P(z,Y,ee)}),N=yt(z=>{const G=Fr(z,S);if(O(!1),!G)return;const{newValue:Y}=q({finger:G,move:!0});C(-1),z.type==="touchend"&&E(-1),d&&d(z,_.current??Y),S.current=void 0,Q()}),re=yt(z=>{if(r)return;jc()||z.preventDefault();const G=z.changedTouches[0];G!=null&&(S.current=G.identifier);const Y=Fr(z,S);if(Y!==!1){const{newValue:ae,activeIndex:J}=q({finger:Y});Br({sliderRef:Z,activeIndex:J,setActive:C}),I(ae),P&&!Vr(ae,A)&&P(z,ae,J)}y.current=0;const ee=Yn(Z.current);ee.addEventListener("touchmove",K,{passive:!0}),ee.addEventListener("touchend",N,{passive:!0})}),Q=k.useCallback(()=>{const z=Yn(Z.current);z.removeEventListener("mousemove",K),z.removeEventListener("mouseup",N),z.removeEventListener("touchmove",K),z.removeEventListener("touchend",N)},[N,K]);k.useEffect(()=>{const{current:z}=Z;return z.addEventListener("touchstart",re,{passive:jc()}),()=>{z.removeEventListener("touchstart",re),Q()}},[Q,re]),k.useEffect(()=>{r&&Q()},[r,Q]);const Re=z=>G=>{var ae;if((ae=z.onMouseDown)==null||ae.call(z,G),r||G.defaultPrevented||G.button!==0)return;G.preventDefault();const Y=Fr(G,S);if(Y!==!1){const{newValue:J,activeIndex:Ce}=q({finger:Y});Br({sliderRef:Z,activeIndex:Ce,setActive:C}),I(J),P&&!Vr(J,A)&&P(G,J,Ce)}y.current=0;const ee=Yn(Z.current);ee.addEventListener("mousemove",K,{passive:!0}),ee.addEventListener("mouseup",N)},Te=yi(U?B[0]:c,c,a),me=yi(B[B.length-1],c,a)-Te,_t=(z={})=>{const G=qr(z),Y={onMouseDown:Re(G||{})},ee={...G,...Y};return{...z,ref:Pe,...ee}},yr=z=>G=>{var ee;(ee=z.onMouseOver)==null||ee.call(z,G);const Y=Number(G.currentTarget.getAttribute("data-index"));E(Y)},xr=z=>G=>{var Y;(Y=z.onMouseLeave)==null||Y.call(z,G),E(-1)},br=(z={})=>{const G=qr(z),Y={onMouseOver:yr(G||{}),onMouseLeave:xr(G||{})};return{...z,...G,...Y}},vr=z=>({pointerEvents:T!==-1&&T!==z?"none":void 0});let on;return h==="vertical"&&(on=o?"vertical-rl":"vertical-lr"),{active:T,axis:V,axisProps:Ew,dragging:j,focusedThumbIndex:H,getHiddenInputProps:(z={})=>{const G=qr(z),Y={onChange:Qe(G||{}),onFocus:ct(G||{}),onBlur:ut(G||{}),onKeyDown:dt(G||{})},ee={...G,...Y};return{tabIndex:v,"aria-labelledby":t,"aria-orientation":h,"aria-valuemax":m(a),"aria-valuemin":m(c),name:l,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":e.step??void 0,disabled:r,...z,...ee,style:{...gw,direction:o?"rtl":"ltr",width:"100%",height:"100%",writingMode:on}}},getRootProps:_t,getThumbProps:br,marks:W,open:w,range:U,rootRef:Pe,trackLeap:me,trackOffset:Te,values:B,getThumbStyle:vr}}function Jr(e){return typeof e=="string"}const Cw=e=>!e||!Jr(e);function _w(e){return typeof e.main=="string"}function Rw(e,t=[]){if(!_w(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function da(e=[]){return([,t])=>t&&Rw(t,e)}function Mw(e){return In("MuiSlider",e)}const He=ms("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"]),jw=e=>{const{open:t}=e;return{offset:Xe(t&&He.valueLabelOpen),circle:He.valueLabelCircle,label:He.valueLabelLabel}};function Kd(e){const{children:t,className:n,value:r}=e,i=jw(e);return t?k.cloneElement(t,{className:t.props.className},g.jsxRuntimeExports.jsxs(k.Fragment,{children:[t.props.children,g.jsxRuntimeExports.jsx("span",{className:Xe(i.offset,n),"aria-hidden":!0,children:g.jsxRuntimeExports.jsx("span",{className:i.circle,children:g.jsxRuntimeExports.jsx("span",{className:i.label,children:r})})})]})):null}process.env.NODE_ENV!=="production"&&(Kd.propTypes={children:x.element.isRequired,className:x.string,value:x.node});function Ic(e){return e}const Iw=Fe("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Ae(n.color)}`],n.size!=="medium"&&t[`size${Ae(n.size)}`],n.marked&&t.marked,n.orientation==="vertical"&&t.vertical,n.track==="inverted"&&t.trackInverted,n.track===!1&&t.trackFalse]}})(en(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${He.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${He.dragging}`]:{[`& .${He.thumb}, & .${He.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(da()).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}}]}))),kw=Fe("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}}]}),Aw=Fe("span",{name:"MuiSlider",slot:"Track"})(en(({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(da()).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:Xn(e.palette[t].main,.62),borderColor:Xn(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:Kn(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:Kn(e.palette[t].main,.5)})}}}))]}))),Ow=Fe("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${Ae(n.color)}`],n.size!=="medium"&&t[`thumbSize${Ae(n.size)}`]]}})(en(({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%)"},[`&.${He.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(da()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${He.focusVisible}`]:{...e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${Wo(e.palette[t].main,.16)}`},"@media (hover: none)":{boxShadow:"none"}},[`&.${He.active}`]:{...e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${Wo(e.palette[t].main,.16)}`}}}}))]}))),Xd=Fe(Kd,{name:"MuiSlider",slot:"ValueLabel"})(en(({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%"},[`&.${He.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%"},[`&.${He.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"&&(Xd.propTypes={children:x.element.isRequired,index:x.number.isRequired,open:x.bool.isRequired,value:x.node});const Pw=Fe("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>bs(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(en(({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}}]}))),Dw=Fe("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>bs(e)&&e!=="markLabelActive"})(en(({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}}]}))),$w=e=>{const{disabled:t,dragging:n,marked:r,orientation:i,track:o,classes:s,color:a,size:c}=e,l={root:["root",t&&"disabled",n&&"dragging",r&&"marked",i==="vertical"&&"vertical",o==="inverted"&&"trackInverted",o===!1&&"trackFalse",a&&`color${Ae(a)}`,c&&`size${Ae(c)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",c&&`thumbSize${Ae(c)}`,a&&`thumbColor${Ae(a)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return bi(l,Mw,s)},Nw=({children:e})=>e,Zd=k.forwardRef(function(t,n){const r=ia({props:t,name:"MuiSlider"}),i=pp(),{"aria-label":o,"aria-valuetext":s,"aria-labelledby":a,component:c="span",components:l={},componentsProps:u={},color:d="primary",classes:h,className:f,disableSwap:m=!1,disabled:p=!1,getAriaLabel:b,getAriaValueText:v,marks:M=!1,max:S=100,min:T=0,name:C,onChange:w,onChangeCommitted:E,orientation:j="horizontal",shiftStep:O=10,size:y="medium",step:_=1,scale:A=Ic,slotProps:I,slots:P,tabIndex:U,track:B="normal",value:W,valueLabelDisplay:F="off",valueLabelFormat:H=Ic,...ne}=r,Z={...r,isRtl:i,max:S,min:T,classes:h,disabled:p,disableSwap:m,orientation:j,marks:M,color:d,size:y,step:_,shiftStep:O,scale:A,track:B,valueLabelDisplay:F,valueLabelFormat:H},{axisProps:Pe,getRootProps:ct,getHiddenInputProps:ut,getThumbProps:je,open:dt,active:Qe,axis:Le,focusedThumbIndex:V,range:q,dragging:K,marks:N,values:re,trackOffset:Q,trackLeap:Re,getThumbStyle:Te}=Tw({...Z,rootRef:n});Z.marked=N.length>0&&N.some(be=>be.label),Z.dragging=K,Z.focusedThumbIndex=V;const me=$w(Z),_t=(P==null?void 0:P.root)??l.Root??Iw,yr=(P==null?void 0:P.rail)??l.Rail??kw,xr=(P==null?void 0:P.track)??l.Track??Aw,br=(P==null?void 0:P.thumb)??l.Thumb??Ow,vr=(P==null?void 0:P.valueLabel)??l.ValueLabel??Xd,on=(P==null?void 0:P.mark)??l.Mark??Pw,Sr=(P==null?void 0:P.markLabel)??l.MarkLabel??Dw,z=(P==null?void 0:P.input)??l.Input??"input",G=(I==null?void 0:I.root)??u.root,Y=(I==null?void 0:I.rail)??u.rail,ee=(I==null?void 0:I.track)??u.track,ae=(I==null?void 0:I.thumb)??u.thumb,J=(I==null?void 0:I.valueLabel)??u.valueLabel,Ce=(I==null?void 0:I.mark)??u.mark,ke=(I==null?void 0:I.markLabel)??u.markLabel,ve=(I==null?void 0:I.input)??u.input,Be=Mt({elementType:_t,getSlotProps:ct,externalSlotProps:G,externalForwardedProps:ne,additionalProps:{...Cw(_t)&&{as:c}},ownerState:{...Z,...G==null?void 0:G.ownerState},className:[me.root,f]}),Pn=Mt({elementType:yr,externalSlotProps:Y,ownerState:Z,className:me.rail}),sh=Mt({elementType:xr,externalSlotProps:ee,additionalProps:{style:{...Pe[Le].offset(Q),...Pe[Le].leap(Re)}},ownerState:{...Z,...ee==null?void 0:ee.ownerState},className:me.track}),io=Mt({elementType:br,getSlotProps:je,externalSlotProps:ae,ownerState:{...Z,...ae==null?void 0:ae.ownerState},className:me.thumb}),ah=Mt({elementType:vr,externalSlotProps:J,ownerState:{...Z,...J==null?void 0:J.ownerState},className:me.valueLabel}),oo=Mt({elementType:on,externalSlotProps:Ce,ownerState:Z,className:me.mark}),so=Mt({elementType:Sr,externalSlotProps:ke,ownerState:Z,className:me.markLabel}),lh=Mt({elementType:z,getSlotProps:ut,externalSlotProps:ve,ownerState:Z});return g.jsxRuntimeExports.jsxs(_t,{...Be,children:[g.jsxRuntimeExports.jsx(yr,{...Pn}),g.jsxRuntimeExports.jsx(xr,{...sh}),N.filter(be=>be.value>=T&&be.value<=S).map((be,Me)=>{const ao=yi(be.value,T,S),Er=Pe[Le].offset(ao);let ht;return B===!1?ht=re.includes(be.value):ht=B==="normal"&&(q?be.value>=re[0]&&be.value<=re[re.length-1]:be.value<=re[0])||B==="inverted"&&(q?be.value<=re[0]||be.value>=re[re.length-1]:be.value>=re[0]),g.jsxRuntimeExports.jsxs(k.Fragment,{children:[g.jsxRuntimeExports.jsx(on,{"data-index":Me,...oo,...!Jr(on)&&{markActive:ht},style:{...Er,...oo.style},className:Xe(oo.className,ht&&me.markActive)}),be.label!=null?g.jsxRuntimeExports.jsx(Sr,{"aria-hidden":!0,"data-index":Me,...so,...!Jr(Sr)&&{markLabelActive:ht},style:{...Er,...so.style},className:Xe(me.markLabel,so.className,ht&&me.markLabelActive),children:be.label}):null]},Me)}),re.map((be,Me)=>{const ao=yi(be,T,S),Er=Pe[Le].offset(ao),ht=F==="off"?Nw:vr;return g.jsxRuntimeExports.jsx(ht,{...!Jr(ht)&&{valueLabelFormat:H,valueLabelDisplay:F,value:typeof H=="function"?H(A(be),Me):H,index:Me,open:dt===Me||Qe===Me||F==="on",disabled:p},...ah,children:g.jsxRuntimeExports.jsx(br,{"data-index":Me,...io,className:Xe(me.thumb,io.className,Qe===Me&&me.active,V===Me&&me.focusVisible),style:{...Er,...Te(Me),...io.style},children:g.jsxRuntimeExports.jsx(z,{"data-index":Me,"aria-label":b?b(Me):o,"aria-valuenow":A(be),"aria-labelledby":a,"aria-valuetext":v?v(A(be),Me):s,value:re[Me],...lh})})},Me)})]})});process.env.NODE_ENV!=="production"&&(Zd.propTypes={"aria-label":Tc(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":Tc(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 Lw="[object Number]";function zw(e){return typeof e=="number"||Yt(e)&&tn(e)==Lw}const Qd=ie.observer(e=>{var o,s,a;const t=R.useTheme(),{store:n}=e,{t:r}=he.useTranslation();function i(c,l){l===e.velocity||!zw(l)||e.onVelocityChange(l)}return g.jsxRuntimeExports.jsxs(R.Stack,{direction:"row",gap:2,alignItems:"center",children:[n.showVelocityLegend&&g.jsxRuntimeExports.jsx(R.Typography,{sx:{color:(a=(s=(o=t.componentsExt)==null?void 0:o.JoggingPanel)==null?void 0:s.VelocitySlider)==null?void 0:a.sliderLegendColor,fontSize:"14px"},children:r("Jogging.Velocity.bt")}),g.jsxRuntimeExports.jsx(Zd,{value:e.velocity,color:"secondary",onChange:i,min:e.min,max:e.max,"aria-labelledby":"input-slider",disabled:e.disabled,sx:{"& .MuiSlider-valueLabelOpen":{zIndex:100,backgroundColor:"transparent",top:"0px"}}}),n.showVelocitySliderLabel&&(e.renderValue?e.renderValue(e.velocity):g.jsxRuntimeExports.jsx(ha,{value:e.velocity.toString()}))]})});function ha({value:e,sx:t}){var r;const n=R.useTheme();return g.jsxRuntimeExports.jsx(R.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:"5px",sx:{padding:"6px 12px",background:(r=n.palette.backgroundPaperElevation)==null?void 0:r[8],borderRadius:"10px",minWidth:"111px",...t},children:g.jsxRuntimeExports.jsx(R.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:n.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const eh=ie.observer(({store:e})=>{const{t}=he.useTranslation(),n=ie.useLocalObservable(()=>({get valueLabelFormat(){return e.currentMotionType==="translate"?r=>`v = ${t("Jogging.Cartesian.Translation.velocityMmPerSec.lb",{amount:r})}`:r=>`ω = ${t("Jogging.Cartesian.Rotation.velocityDegPerSec.lb",{amount:r})}`}}));return g.jsxRuntimeExports.jsx(Qd,{store:e,velocity:e.velocityInDisplayUnits,min:e.minVelocityInDisplayUnits,max:e.maxVelocityInDisplayUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,renderValue:r=>g.jsxRuntimeExports.jsx(ha,{value:n.valueLabelFormat(r),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),Fw=ie.observer(({store:e,children:t})=>{const{t:n}=he.useTranslation(),r=R.useTheme();function i(h,f){(f==="translate"||f==="rotate")&&e.setSelectedCartesianMotionType(f)}ue.useReaction(()=>[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 o(h,f){const m=await e.activate(),p=m.motionStream.rapidlyChangingMotionState.tcp_pose,b=m.motionStream.rapidlyChangingMotionState.joint_position;p&&await e.withMotionLock(async()=>{try{e.setCurrentIncrementJog({axis:h.axis,direction:h.direction}),await e.jogger.runIncrementalCartesianMotion({currentTcpPose:p,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:f.mm}:{type:"rotate",distanceRads:Ee.degreesToRadians(f.degrees)}})}finally{e.setCurrentIncrementJog(null),await e.deactivate()}})}async function s(h){if(!e.isLocked){if(await e.activate(),e.activeDiscreteIncrement)return o(h,e.activeDiscreteIncrement);h.motionType==="translate"?await e.jogger.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 a(){e.isLocked||e.activeDiscreteIncrement||await e.deactivate()}function c(h,f,m){var b,v,M;const p=(M=(v=(b=m.componentsExt)==null?void 0:b.JoggingPanel)==null?void 0:v.JoggingCartesian)==null?void 0:M.Axis;if(p)return f==="translate"?p[h]:p.CustomRotation??p[h]}const l=[{id:"x",icon:g.jsxRuntimeExports.jsx(tw,{}),colors:c("X",e.selectedCartesianMotionType,r)},{id:"y",icon:g.jsxRuntimeExports.jsx(rw,{}),colors:c("Y",e.selectedCartesianMotionType,r)},{id:"z",icon:g.jsxRuntimeExports.jsx(ow,{}),colors:c("Z",e.selectedCartesianMotionType,r)}];function u(h){return n("General.mm.variable",{amount:h.toFixed(1)})}function d(h){return n("General.degree.variable",{amount:Ee.radiansToDegrees(h).toFixed(1)})}return g.jsxRuntimeExports.jsxs(R.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsxRuntimeExports.jsxs(R.Stack,{gap:2,children:[g.jsxRuntimeExports.jsx(uw,{store:e}),g.jsxRuntimeExports.jsx(eh,{store:e}),g.jsxRuntimeExports.jsx(R.Divider,{})]}),g.jsxRuntimeExports.jsx(R.Stack,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:g.jsxRuntimeExports.jsxs(R.Stack,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[g.jsxRuntimeExports.jsxs(dw,{value:e.selectedCartesianMotionType,onChange:i,exclusive:!0,"aria-label":n("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[g.jsxRuntimeExports.jsx(R.ToggleButton,{value:"translate",children:n("Jogging.Cartesian.Translation.bt")}),g.jsxRuntimeExports.jsx(R.ToggleButton,{value:"rotate",children:n("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&l.map(h=>{var f,m;return g.jsxRuntimeExports.jsx(ss,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((f=e.incrementJogInProgress)==null?void 0:f.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:g.jsxRuntimeExports.jsxs(g.jsxRuntimeExports.Fragment,{children:[h.icon,g.jsxRuntimeExports.jsx(R.Typography,{sx:{fontSize:"24px",color:((m=h.colors)==null?void 0:m.labelColor)??r.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var p,b;return u(((b=(p=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:p.position)==null?void 0:b[Ee.XYZ_TO_VECTOR[h.id]])||0)},startJogging:p=>s({axis:h.id,motionType:"translate",direction:p}),stopJogging:a},h.id)}),e.selectedCartesianMotionType==="rotate"&&l.map(h=>{var f,m;return g.jsxRuntimeExports.jsx(ss,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((f=e.incrementJogInProgress)==null?void 0:f.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:g.jsxRuntimeExports.jsxs(g.jsxRuntimeExports.Fragment,{children:[g.jsxRuntimeExports.jsx(aw,{}),g.jsxRuntimeExports.jsx(R.Typography,{sx:{fontSize:"24px",color:((m=h.colors)==null?void 0:m.labelColor)??r.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var p,b;return d(((b=(p=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:p.orientation)==null?void 0:b[Ee.XYZ_TO_VECTOR[h.id]])||0)},startJogging:p=>s({axis:h.id,motionType:"rotate",direction:p}),stopJogging:a},h.id)})]})}),g.jsxRuntimeExports.jsx(qd,{store:e}),t&&g.jsxRuntimeExports.jsx(R.Divider,{}),t]})}),Bw=ie.observer(({store:e,children:t})=>{const n=R.useTheme();async function r(o){await e.activate(),await e.jogger.rotateJoints({joint:o.joint,direction:o.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function i(){await e.jogger.stop(),await e.deactivate()}return g.jsxRuntimeExports.jsxs(R.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsxRuntimeExports.jsx(eh,{store:e}),g.jsxRuntimeExports.jsx(R.Divider,{}),g.jsxRuntimeExports.jsx(R.Stack,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},id:"JointControls",children:g.jsxRuntimeExports.jsx(R.Stack,{alignItems:"center",gap:"24px",children:e.jogger.motionStream.joints.map(o=>{var l,u,d;const s=(d=(u=(l=e.motionGroupDescription.operation_limits.auto_limits)==null?void 0:l.joints)==null?void 0:u[o.index])==null?void 0:d.position,a=(s==null?void 0:s.lower_limit)!==void 0?Ee.radiansToDegrees(s.lower_limit):void 0,c=(s==null?void 0:s.upper_limit)!==void 0?Ee.radiansToDegrees(s.upper_limit):void 0;return g.jsxRuntimeExports.jsxs(R.Stack,{direction:"row",alignItems:"center",justifyContent:"center",spacing:1.5,width:"100%",children:[e.showJointsLegend&&g.jsxRuntimeExports.jsx(R.Typography,{color:e.isLocked?n.palette.text.disabled:n.palette.text.secondary,children:`G${o.index+1}`}),g.jsxRuntimeExports.jsx(jd,{disabled:e.isLocked,lowerLimitDegs:a,upperLimitDegs:c,getValueDegs:()=>{const h=e.jogger.motionStream.rapidlyChangingMotionState.joint_position[o.index];return h!==void 0?Ee.radiansToDegrees(h):void 0},startJogging:h=>r({joint:o.index,direction:h}),stopJogging:i})]},`joint-${o.index}`)})})}),g.jsxRuntimeExports.jsx(qd,{store:e}),t&&g.jsxRuntimeExports.jsx(R.Divider,{}),t]})}),Vw=g.externalizeComponent(ie.observer(e=>{const t=Oc.isString(e.nova)?new Ah({instanceUrl:e.nova}):e.nova,n=ie.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function r(){de.runInAction(()=>{n.loadingError=null,n.joggingStore=null});try{let i=e.store;if(!i){const o=await Zi.open(t,e.motionGroupId);i=await ro.loadFor(o)}de.runInAction(()=>{n.joggingStore=i}),e.onSetup&&e.onSetup(i)}catch(i){n.loadingError=i}}return $.useEffect(()=>(r(),e.store?()=>null:()=>{var i;(i=n.joggingStore)==null||i.dispose()}),[e.store,e.nova,e.motionGroupId]),$.useEffect(()=>{const i=n.joggingStore;i&&(e.locked?i.lock("external"):i.unlock("external"))},[n.joggingStore,e.locked]),g.jsxRuntimeExports.jsx(R.Stack,{sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:n.joggingStore?g.jsxRuntimeExports.jsx(Gw,{store:n.joggingStore,children:e.children}):g.jsxRuntimeExports.jsx(Pc.LoadingCover,{message:"Loading jogging",error:n.loadingError})})})),Gw=ie.observer(({store:e,children:t})=>{const{t:n}=he.useTranslation();function r(){if(e.currentTab.id==="cartesian")return g.jsxRuntimeExports.jsx(g.jsxRuntimeExports.Fragment,{children:g.jsxRuntimeExports.jsx(Fw,{store:e,children:t})});if(e.currentTab.id==="joint")return g.jsxRuntimeExports.jsx(g.jsxRuntimeExports.Fragment,{children:g.jsxRuntimeExports.jsx(Bw,{store:e,children:t})})}return g.jsxRuntimeExports.jsxs(R.Stack,{flexGrow:1,sx:{overflow:"hidden"},children:[g.jsxRuntimeExports.jsx(R.Tabs,{value:e.tabIndex,onChange:e.onTabChange,variant:"fullWidth",children:e.tabs.map(i=>{const o=i.label==="cartesian"?n("Jogging.Cartesian.bt"):n("Jogging.Joints.bt"),s=i.label==="cartesian"?g.jsxRuntimeExports.jsx(Nv,{fontSize:"small",sx:{mr:1}}):g.jsxRuntimeExports.jsx(Lv,{fontSize:"small",sx:{mr:1}});return g.jsxRuntimeExports.jsx(R.Tab,{label:e.showTabIcons?g.jsxRuntimeExports.jsxs(R.Stack,{direction:"row",alignItems:"center",children:[s,o]}):o,id:`jogging-tab-${i.id}`,"aria-controls":`jogging-tab-${i.id}`},i.id)})}),g.jsxRuntimeExports.jsx(R.Stack,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:r()}),e.blocked&&g.jsxRuntimeExports.jsx(QE,{store:e})]})}),th=e=>{var a;const{value:t,ref:n}=e,r=R.useTheme(),[i,o]=$.useState(!1);async function s(){if(!n||!("current"in n))return console.warn("No copy target found"),!1;try{return await navigator.clipboard.writeText(t),console.log("Copied!"),o(!0),!0}catch(c){console.error(c);const l=window.getSelection();if(l&&n&&"current"in n&&n.current){const u=document.createRange();u.selectNodeContents(n.current),l.removeAllRanges(),l.addRange(u)}}return!1}return $.useEffect(()=>{if(!i)return;const c=setTimeout(()=>o(!1),3e3);return()=>{c&&clearTimeout(c)}},[i]),g.jsxRuntimeExports.jsx(R.Tooltip,{open:i,title:"Copied!",children:g.jsxRuntimeExports.jsx(R.Stack,{justifyContent:"center",sx:{height:"100%",boxSizing:"border-box",padding:"6px 12px",background:(a=r.palette.backgroundPaperElevation)==null?void 0:a[8],borderRadius:"10px",minWidth:"0",cursor:"pointer"},onClick:()=>s(),children:g.jsxRuntimeExports.jsx(R.Typography,{ref:n,align:"center",sx:{pointerEvents:"none",fontSize:"12px",color:r.palette.text.primary,whiteSpace:"nowrap",minWidth:0,textOverflow:"ellipsis",width:"100%",overflow:"hidden"},children:t})})})},Uw=g.externalizeComponent(ie.observer(({tcpPose:e,showCopyButton:t=!1})=>{const[n,r]=$.useState(null),i=Oh(e),o=async()=>{try{await navigator.clipboard.writeText(i),r("Copied!"),setTimeout(()=>r(null),2e3)}catch{r("Copy failed"),setTimeout(()=>r(null),2e3)}};return g.jsxRuntimeExports.jsxs(R.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},"data-testid":"pose-cartesian-values",children:[g.jsxRuntimeExports.jsx(th,{value:i}),t&&g.jsxRuntimeExports.jsx(R.Button,{variant:"contained",color:"secondary",size:"small",onClick:o,sx:{flexShrink:0},children:n||"Copy"})]})})),Ww=g.externalizeComponent(ie.observer(({joints:e,showCopyButton:t=!1})=>{const[n,r]=$.useState(null),i=`[${e.map(s=>parseFloat(s.toFixed(4))).join(", ")}]`,o=async()=>{try{await navigator.clipboard.writeText(i),r("Copied!"),setTimeout(()=>r(null),2e3)}catch{r("Copy failed"),setTimeout(()=>r(null),2e3)}};return g.jsxRuntimeExports.jsxs(R.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},"data-testid":"pose-joint-values",children:[g.jsxRuntimeExports.jsx(th,{value:i}),t&&g.jsxRuntimeExports.jsx(R.Button,{variant:"contained",color:"secondary",size:"small",onClick:o,sx:{flexShrink:0},children:n||"Copy"})]})}));class nh{constructor(){this.messages=[],this.addMessage=(t,n="info")=>{const r={id:Math.random().toString(36).substring(2,11),timestamp:new Date,message:t,level:n};this.messages.push(r)},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")},de.makeObservable(this,{messages:de.observable,addMessage:de.action,clearMessages:de.action})}}const gr=(e,t,n)=>({id:n||`${Date.now()}-${Math.random().toString(36).substring(2,11)}`,timestamp:new Date,message:e,level:t}),Hw=(e,t)=>gr(e,"debug",t),Yw=(e,t)=>gr(e,"info",t),qw=(e,t)=>gr(e,"warning",t),Jw=(e,t)=>gr(e,"error",t),rh=g.externalizeComponent(ie.observer(e=>{var u;const{messages:t=[],onClear:n,height:r=400,sx:i}=e,o=R.useTheme(),s=$.useRef(null);$.useEffect(()=>{if(t.length===0)return;const d=s.current;if(!d)return;const h=setTimeout(()=>{d.scrollTop=d.scrollHeight},10);return()=>clearTimeout(h)},[t.length]);const a=d=>d.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),c=d=>{switch(d){case"error":return o.palette.error.main;case"warning":return o.palette.warning.main;case"info":return o.palette.info.main;case"debug":return o.palette.text.disabled;default:return o.palette.text.secondary}},l=({message:d})=>{const[h,f]=$.useState(!1),[m,p]=$.useState(!1),[b,v]=$.useState(!1),M=d.message.length>150,S=async()=>{try{await navigator.clipboard.writeText(d.message),p(!0),setTimeout(()=>p(!1),2e3)}catch(C){console.error("Failed to copy message:",C)}},T=M&&!h?d.message.substring(0,150)+"...":d.message;return g.jsxRuntimeExports.jsx(R.Box,{onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),sx:{display:"flex",gap:1,fontFamily:"monospace",flexDirection:"column","&:hover":{backgroundColor:o.palette.action.hover},borderRadius:"4px",padding:"2px 4px",margin:"-2px -4px"},children:g.jsxRuntimeExports.jsxs(R.Box,{sx:{display:"flex",gap:1},children:[g.jsxRuntimeExports.jsxs(R.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:o.palette.text.disabled,whiteSpace:"nowrap",flexShrink:0},children:["[",a(d.timestamp),"]"]}),g.jsxRuntimeExports.jsx(R.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:c(d.level),wordBreak:"break-word",overflowWrap:"anywhere",hyphens:"auto",flex:1,whiteSpace:"pre-wrap"},children:T}),g.jsxRuntimeExports.jsxs(R.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.jsxRuntimeExports.jsx(R.IconButton,{size:"small",onClick:S,sx:{padding:"2px",color:o.palette.text.secondary,"&:hover":{backgroundColor:o.palette.action.hover}},title:m?"Copied!":"Copy message",children:g.jsxRuntimeExports.jsx(wr.ContentCopy,{sx:{fontSize:12}})}),M&&g.jsxRuntimeExports.jsx(R.IconButton,{size:"small",onClick:()=>f(!h),sx:{padding:"2px",color:o.palette.text.secondary,"&:hover":{backgroundColor:o.palette.action.hover}},title:h?"Collapse":"Expand",children:h?g.jsxRuntimeExports.jsx(wr.ExpandLess,{sx:{fontSize:12}}):g.jsxRuntimeExports.jsx(wr.ExpandMore,{sx:{fontSize:12}})})]})]})},d.id)};return g.jsxRuntimeExports.jsxs(R.Paper,{sx:{backgroundColor:((u=o.palette.backgroundPaperElevation)==null?void 0:u[2])||"#171927",backgroundImage:"none",height:r,display:"flex",flexDirection:"column",overflow:"hidden",...i},children:[g.jsxRuntimeExports.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px"},children:[g.jsxRuntimeExports.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsxRuntimeExports.jsx(wr.DescriptionOutlined,{sx:{fontSize:16,color:o.palette.action.active,opacity:.56}}),g.jsxRuntimeExports.jsx(R.Typography,{sx:{fontWeight:500,fontSize:"14px",lineHeight:"143%",letterSpacing:"0.17px",color:o.palette.text.primary},children:"Log"})]}),g.jsxRuntimeExports.jsx(R.Button,{onClick:n,variant:"text",sx:{fontWeight:500,fontSize:"13px",lineHeight:"22px",letterSpacing:"0.46px",color:o.palette.primary.main,textTransform:"none",minWidth:"auto",padding:"4px 8px","&:hover":{backgroundColor:o.palette.primary.main+"14"}},children:"Clear"})]}),g.jsxRuntimeExports.jsx(R.Box,{ref:s,sx:{flex:1,overflow:"auto",padding:"8px 16px",display:"flex",flexDirection:"column",gap:"2px",scrollbarWidth:"thin",scrollbarColor:`${o.palette.divider} transparent`,"&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:o.palette.divider,borderRadius:"3px","&:hover":{backgroundColor:o.palette.divider}}},children:t.length===0?g.jsxRuntimeExports.jsx(R.Typography,{sx:{color:o.palette.text.disabled,fontSize:"12px",fontStyle:"italic",textAlign:"center",marginTop:2},children:"No log messages"}):t.map(d=>g.jsxRuntimeExports.jsx(l,{message:d},d.id))})]})})),Kw=g.externalizeComponent(ie.observer(e=>{const{store:t,onStoreReady:n,...r}=e,i=$.useRef(n);$.useEffect(()=>{i.current=n},[n]);const o=$.useMemo(()=>{var c;const a=t||new nh;return(c=i.current)==null||c.call(i,a),a},[t]),s=()=>{o.clearMessages()};return g.jsxRuntimeExports.jsx(rh,{...r,messages:o.messages,onClear:s})}));function Xw(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function Zw({baseUrl:e=Xw(),...t}){return g.jsxRuntimeExports.jsxs(R.Dialog,{"aria-labelledby":"no-motion-group-modal-title",open:!0,fullWidth:!0,sx:{"& .MuiModal-backdrop":{backdropFilter:"blur(10px)"},"& .MuiDialog-paper":{"::before":{content:'""',height:"8px",width:"100%",background:"linear-gradient(90deg, #FF0E65 0%, #47D3FF 100%)"},background:"#101629"}},children:[g.jsxRuntimeExports.jsx(R.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),g.jsxRuntimeExports.jsxs(R.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[g.jsxRuntimeExports.jsx(R.Typography,{color:"#fff",children:"Found no devices to connect to."}),g.jsxRuntimeExports.jsx(R.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),g.jsxRuntimeExports.jsx(R.DialogActions,{children:g.jsxRuntimeExports.jsxs(R.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[g.jsxRuntimeExports.jsx(R.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),g.jsxRuntimeExports.jsx(R.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}const Qw=Nt(g.jsxRuntimeExports.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"),eT=({title:e,titleId:t,...n},r)=>k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,fill:"none",ref:r,"aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.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"})),tT=$.forwardRef(eT);var fa=(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))(fa||{});const ih=g.externalizeComponent(ie.observer(({setupState:e,className:t})=>{const n=R.useTheme(),{t:r}=he.useTranslation(),i=()=>{var l,u,d,h,f,m,p;switch(e){case"READY":return{label:r("RobotSetupReadinessIndicator.Ready.lb"),indicatorColor:((l=n.palette.tertiary)==null?void 0:l.main)||n.palette.primary.main,backgroundColor:((u=n.palette.backgroundPaperElevation)==null?void 0:u[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText};case"ROBOT_DISCONNECTED":return{label:r("RobotSetupReadinessIndicator.RobotDisconnected.lb"),indicatorColor:n.palette.error.main,backgroundColor:((d=n.palette.backgroundPaperElevation)==null?void 0:d[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText};case"CELL_OPEN":return{label:r("RobotSetupReadinessIndicator.CellOpen.lb"),indicatorColor:n.palette.error.main,backgroundColor:((h=n.palette.backgroundPaperElevation)==null?void 0:h[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText};case"E_STOP":return{label:r("RobotSetupReadinessIndicator.EStop.lb"),indicatorColor:n.palette.error.main,backgroundColor:((f=n.palette.backgroundPaperElevation)==null?void 0:f[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText};case"MANUAL_MODE":return{label:r("RobotSetupReadinessIndicator.ManualMode.lb"),indicatorColor:n.palette.error.main,backgroundColor:((m=n.palette.backgroundPaperElevation)==null?void 0:m[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText};case"PRECONDITION_NOT_FULFILLED":default:return{label:r("RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb"),indicatorColor:n.palette.error.main,backgroundColor:((p=n.palette.backgroundPaperElevation)==null?void 0:p[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText}}},{label:o,indicatorColor:s,backgroundColor:a,textColor:c}=i();return g.jsxRuntimeExports.jsx(R.Chip,{className:t,label:g.jsxRuntimeExports.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsxRuntimeExports.jsx(R.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:s,flexShrink:0}}),g.jsxRuntimeExports.jsx(R.Typography,{variant:"body2",sx:{color:c,fontSize:"0.75rem",lineHeight:1.2},children:o})]}),variant:"filled",sx:{backgroundColor:a,color:n.palette.getContrastText(a),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),nT=g.externalizeComponent(ie.observer(({robotName:e,robotType:t,setupState:n,PreconditionComponent:r=ih,className:i})=>{var c;const o=R.useTheme(),s=t||"Robot",a=n===fa.READY;return g.jsxRuntimeExports.jsxs(R.Box,{className:i,sx:{border:`1px solid ${o.palette.divider}`,background:((c=o.palette.backgroundPaperElevation)==null?void 0:c[8])||"#292B3F",borderRadius:"8px",padding:"20px",display:"flex",alignItems:"center",justifyContent:"space-between",opacity:1},children:[g.jsxRuntimeExports.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",gap:2,flex:1},children:[a?g.jsxRuntimeExports.jsx(R.Box,{sx:{fontSize:24,display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,"& svg":{fill:`${o.palette.primary.main} !important`},"& svg path":{fill:`${o.palette.primary.main} !important`}},children:g.jsxRuntimeExports.jsx(tT,{})}):g.jsxRuntimeExports.jsx(Qw,{sx:{color:o.palette.error.main,fontSize:24}}),g.jsxRuntimeExports.jsx(R.Typography,{variant:"body1",sx:{fontWeight:500,color:o.palette.text.primary},children:e}),g.jsxRuntimeExports.jsx(R.Divider,{orientation:"vertical",flexItem:!0,sx:{backgroundColor:o.palette.text.secondary,opacity:.3,width:"1px"}}),g.jsxRuntimeExports.jsx(R.Typography,{variant:"body2",sx:{color:o.palette.text.secondary},children:s})]}),r&&g.jsxRuntimeExports.jsx(r,{setupState:n})]})})),rT=({title:e,titleId:t,...n},r)=>k.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.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"})),iT=$.forwardRef(rT),oT=({title:e,titleId:t,...n},r)=>k.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.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"})),sT=$.forwardRef(oT),it=ie.observer(({id:e,icon:t,color:n,title:r,name:i,label:o,explanation:s,literalValue:a,anchorOrigin:c,transformOrigin:l})=>{const u=ie.useLocalObservable(()=>({anchorEl:null,get isPopoverOpen(){return!!u.anchorEl},openPopover(d){u.anchorEl=d.currentTarget},closePopover(){u.anchorEl=null}}));return g.jsxRuntimeExports.jsxs(g.jsxRuntimeExports.Fragment,{children:[g.jsxRuntimeExports.jsxs(R.Stack,{"aria-owns":u.isPopoverOpen?e:void 0,"aria-haspopup":"true",onMouseEnter:u.openPopover,onMouseLeave:u.closePopover,direction:"row",spacing:1,sx:{cursor:"pointer"},children:[g.jsxRuntimeExports.jsx(R.SvgIcon,{component:t,sx:{color:n}}),o&&g.jsxRuntimeExports.jsx("div",{style:{color:n},children:o})]}),g.jsxRuntimeExports.jsx(R.Popover,{id:e,sx:{pointerEvents:"none"},open:u.isPopoverOpen,anchorEl:u.anchorEl,anchorOrigin:c??{vertical:"bottom",horizontal:"left"},transformOrigin:l??{vertical:"top",horizontal:"left"},onClose:u.closePopover,disableRestoreFocus:!0,children:g.jsxRuntimeExports.jsxs(R.Stack,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[g.jsxRuntimeExports.jsxs("div",{children:[r&&g.jsxRuntimeExports.jsx(R.Typography,{component:"span",fontSize:"14px",children:`${r}: `}),g.jsxRuntimeExports.jsx(R.Typography,{component:"span",color:n,fontWeight:"bold",fontSize:"14px",children:i})]}),g.jsxRuntimeExports.jsx(R.Typography,{fontSize:"14px",children:s}),a&&g.jsxRuntimeExports.jsx(R.Typography,{fontSize:"12px",children:a})]})})]})}),aT=ie.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:n,transformOrigin:r,compact:i})=>{const o=R.useTheme(),{t:s}=he.useTranslation();return e?g.jsxRuntimeExports.jsx(it,{id:"motion-group-virtual",icon:sT,color:o.palette.tertiary.main,name:s("SafetyBar.ControllerType.Virtual.lb"),label:i?null:s("SafetyBar.ControllerType.Virtual.lb"),explanation:g.jsxRuntimeExports.jsxs(he.Trans,{i18nKey:"SafetyBar.MotionGroup.Virtual.Explanation.lb",values:{motionGroupId:t},children:["Motion group ",g.jsxRuntimeExports.jsx("code",{children:t})," refers to a virtual robot with no physical counterpart. It can be freely manipulated without special safety precautions."]}),anchorOrigin:n,transformOrigin:r}):g.jsxRuntimeExports.jsx(it,{id:"motion-group-physical",icon:iT,color:o.palette.primary.main,name:s("SafetyBar.ControllerType.Physical.lb"),label:i?null:s("SafetyBar.ControllerType.Physical.lb"),explanation:g.jsxRuntimeExports.jsx(he.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:g.jsxRuntimeExports.jsx("code",{}),strong:g.jsxRuntimeExports.jsx("strong",{})}}),anchorOrigin:n,transformOrigin:r})}),lT=({title:e,titleId:t,...n},r)=>k.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.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"})),cT=$.forwardRef(lT),uT=({title:e,titleId:t,...n},r)=>k.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.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})),dT=$.forwardRef(uT),hT=({title:e,titleId:t,...n},r)=>k.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.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"})),fT=$.forwardRef(hT),pT=ie.observer(({operationMode:e,anchorOrigin:t,transformOrigin:n,compact:r})=>{const{t:i}=he.useTranslation(),o=R.useTheme();switch(e){case"OPERATION_MODE_AUTO":return g.jsxRuntimeExports.jsx(it,{id:"operation-mode-auto",icon:cT,title:i("SafetyBar.OperationMode.ti"),name:i("SafetyBar.OperationMode.Automatic.ti"),label:r?null:i("SafetyBar.OperationMode.Automatic.ti"),color:o.palette.text.secondary,explanation:g.jsxRuntimeExports.jsx(he.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:n});case"OPERATION_MODE_MANUAL":case"OPERATION_MODE_MANUAL_T1":case"OPERATION_MODE_MANUAL_T2":return g.jsxRuntimeExports.jsx(it,{id:"operation-mode-manual",icon:fT,color:o.palette.warning.main,title:i("SafetyBar.OperationMode.ti"),name:i("SafetyBar.OperationMode.Manual.lb"),label:r?null:i("SafetyBar.OperationMode.Manual.lb"),explanation:g.jsxRuntimeExports.jsx(he.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:n});default:return g.jsxRuntimeExports.jsx(it,{id:"operation-mode-error",icon:dT,color:o.palette.warning.main,title:i("SafetyBar.OperationMode.ti"),name:i("SafetyBar.OperationMode.Error.lb"),label:r?null:i("SafetyBar.OperationMode.Error.lb"),explanation:g.jsxRuntimeExports.jsx(he.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:n})}}),mT=({title:e,titleId:t,...n},r)=>k.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.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"})),gT=$.forwardRef(mT),yT=({title:e,titleId:t,...n},r)=>k.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),k.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"}),k.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"})),xT=$.forwardRef(yT),bT=({title:e,titleId:t,...n},r)=>k.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.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})),vT=$.forwardRef(bT),ST=({title:e,titleId:t,...n},r)=>k.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.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"})),ET=$.forwardRef(ST),wT=({title:e,titleId:t,...n},r)=>k.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.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"})),TT=$.forwardRef(wT),CT=ie.observer(({safetyState:e,anchorOrigin:t,transformOrigin:n,compact:r})=>{const{t:i}=he.useTranslation(),o=R.useTheme();switch(e){case"SAFETY_STATE_NORMAL":return g.jsxRuntimeExports.jsx(it,{id:"safety-state-normal",title:i("SafetyBar.SafetyState.ti"),name:i("SafetyBar.SafetyState.Normal.lb"),label:r?null:i("SafetyBar.SafetyState.Normal.lb"),icon:ET,color:o.palette.text.secondary,explanation:g.jsxRuntimeExports.jsx(he.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:n});case"SAFETY_STATE_DEVICE_EMERGENCY_STOP":case"SAFETY_STATE_ROBOT_EMERGENCY_STOP":return g.jsxRuntimeExports.jsx(it,{id:"safety-state-estop",title:i("SafetyBar.SafetyState.ti"),name:i("SafetyBar.SafetyState.Estop.lb"),label:r?null:i("SafetyBar.SafetyState.Estop.lb"),icon:xT,color:o.palette.error.main,explanation:g.jsxRuntimeExports.jsx(he.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:n});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.jsxRuntimeExports.jsx(it,{id:"safety-state-stop",icon:TT,title:i("SafetyBar.SafetyState.ti"),name:i("SafetyBar.SafetyState.Stop.lb"),label:r?null:i("SafetyBar.SafetyState.Stop.lb"),color:o.palette.warning.main,explanation:g.jsxRuntimeExports.jsx(he.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:n});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.jsxRuntimeExports.jsx(it,{id:"safety-state-manual-action-required",icon:vT,color:o.palette.warning.main,title:i("SafetyBar.SafetyState.ti"),name:i("SafetyBar.SafetyState.ManualActionRequired.lb"),label:r?null:i("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:g.jsxRuntimeExports.jsx(he.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:n});case"SAFETY_STATE_UNKNOWN":case"SAFETY_STATE_FAULT":return g.jsxRuntimeExports.jsx(it,{id:"safety-state-error",icon:gT,color:o.palette.error.main,title:i("SafetyBar.SafetyState.ti"),name:i("SafetyBar.SafetyState.Error.lb"),label:r?null:i("SafetyBar.SafetyState.Error.lb"),explanation:g.jsxRuntimeExports.jsx(he.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:n});default:Pc.assertUnreachable(e,`Unknown safety state ${e}`)}}),_T=g.externalizeComponent(ie.observer(({isVirtual:e,motionGroupId:t,operationMode:n,safetyState:r,anchorOrigin:i,transformOrigin:o,compact:s=!0})=>{const a=s?1:2;return g.jsxRuntimeExports.jsxs(R.Stack,{direction:"row",gap:a,alignItems:"center",sx:{height:"24px"},children:[g.jsxRuntimeExports.jsx(CT,{safetyState:r,anchorOrigin:i,transformOrigin:o,compact:s}),g.jsxRuntimeExports.jsx(R.Divider,{orientation:"vertical",flexItem:!0}),g.jsxRuntimeExports.jsx(pT,{operationMode:n,anchorOrigin:i,transformOrigin:o,compact:s}),g.jsxRuntimeExports.jsx(R.Divider,{orientation:"vertical",flexItem:!0}),g.jsxRuntimeExports.jsx(aT,{isVirtual:e,motionGroupId:t,anchorOrigin:i,transformOrigin:o,compact:s})]})})),RT=R.styled(R.Fab,{shouldForwardProp:e=>e!=="selected"})(({theme:e})=>{var t,n,r;return{borderRadius:"20px","&:hover":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[7]},variants:[{props:({selected:i})=>!i,style:{background:(n=e.palette.backgroundPaperElevation)==null?void 0:n[0],color:e.palette.action.disabled,"> img":{opacity:.4}}},{props:({selected:i})=>i,style:{background:(r=e.palette.backgroundPaperElevation)==null?void 0:r[11],border:`1px solid ${e.palette.divider}`,color:e.palette.primary.contrastText}}]}}),MT=e=>{const{ref:t,...n}=e;return g.jsxRuntimeExports.jsx(RT,{ref:t,selected:e.selected,...n,color:"secondary",variant:"circular"})};function jT(e){const{children:t,value:n,index:r,...i}=e;return g.jsxRuntimeExports.jsx("div",{role:"tabpanel",hidden:n!==r,id:`tabpanel-${r}`,"aria-labelledby":`tab-${r}`,...i,children:n===r&&g.jsxRuntimeExports.jsx(R.Box,{children:t})})}function IT({children:e,...t}){const{fullWidth:n,indicator:r,onChange:i,orientation:o,scrollButtons:s,selectionFollowsFocus:a,textColor:c,value:l,variant:u,...d}=t;return g.jsxRuntimeExports.jsx(R.Box,{...d,children:e})}const kT=g.externalizeComponent(ie.observer(e=>{const{items:t,activeTab:n,defaultActiveTab:r=0,onTabChange:i,sx:o,ref:s}=e,a=n!==void 0,[c,l]=$.useState(r),u=a?n:c;$.useEffect(()=>{a||t.length!==0&&(c<0||c>t.length-1)&&l(0)},[t.length,a,c]);const d=(h,f)=>{a||l(f),i==null||i(f)};return g.jsxRuntimeExports.jsxs(R.Box,{ref:s,sx:{height:"100%",display:"flex",flexDirection:"column",...o},children:[g.jsxRuntimeExports.jsx(R.Box,{sx:{px:0,py:0,overflow:"visible",position:"relative",paddingTop:h=>h.spacing(2),paddingRight:h=>h.spacing(2.5)},children:g.jsxRuntimeExports.jsx(R.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,f)=>{var T,C,w;const m=()=>{if(!h.badge)return;const E=h.badge.content,j=h.badge.max;return typeof E=="number"&&j&&E>j?`${j}+`:E},p=()=>{if(!h.badge)return!1;const E=h.badge.content,j=h.badge.showZero;return!(E===0&&!j)},b=m(),v=p(),M=()=>{a||l(f),i==null||i(f)},S=g.jsxRuntimeExports.jsx(R.Tab,{label:h.label,icon:h.icon,iconPosition:"start",disableRipple:!0,onClick:M,sx:{minHeight:"32px",height:"32px",padding:"0px 10px",borderRadius:"12px",backgroundColor:E=>{var j;return((j=E.palette.backgroundPaperElevation)==null?void 0:j[11])||"#32344B"},color:"text.primary",opacity:u===f?1:.38,fontSize:"13px",transition:"all 0.2s ease-in-out",position:"relative",overflow:"visible","&:hover":{opacity:u===f?1:.6},"&.Mui-selected":{opacity:1,backgroundColor:E=>{var j;return((j=E.palette.backgroundPaperElevation)==null?void 0:j[11])||"#32344B"},color:"text.primary"},"&:focus":{outline:"none"},"&:active":{transform:"none"}}},h.id);return v?g.jsxRuntimeExports.jsx(IT,{component:"span",sx:{display:"inline-flex"},children:g.jsxRuntimeExports.jsx(R.Badge,{badgeContent:b,color:((T=h.badge)==null?void 0:T.color)||"error",max:(C=h.badge)==null?void 0:C.max,showZero:(w=h.badge)==null?void 0:w.showZero,anchorOrigin:{vertical:"top",horizontal:"right"},overlap:"rectangular",sx:{"& .MuiBadge-badge":{opacity:"1 !important"}},children:S})},h.id):S})})}),g.jsxRuntimeExports.jsx(R.Box,{sx:{mt:h=>h.spacing(2),borderBottom:1,borderColor:"divider"}}),g.jsxRuntimeExports.jsx(R.Box,{sx:{flex:1,overflow:"auto"},children:t.map((h,f)=>g.jsxRuntimeExports.jsx(jT,{value:u,index:f,children:h.content},h.id))})]})})),AT=e=>{const t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60),i=e%60,o=[];return t>0?(o.push(t.toString()),o.push(n.toString().padStart(2,"0")),o.push(r.toString().padStart(2,"0")),o.push(i.toString().padStart(2,"0"))):n>0?(o.push(n.toString()),o.push(r.toString().padStart(2,"0")),o.push(i.toString().padStart(2,"0"))):(o.push(r.toString()),o.push(i.toString().padStart(2,"0"))),o.join(":")},kc=(e,t)=>{const n=Math.floor(e/86400),r=Math.floor(e%86400/3600),i=Math.floor(e%3600/60),o=e%60;if(typeof Intl<"u"&&"DurationFormat"in Intl)try{const a={};return n>0&&(a.days=n),r>0&&(a.hours=r),i>0&&(a.minutes=i),(o>0||Object.keys(a).length===0)&&(a.seconds=o),new Intl.DurationFormat(t,{style:"narrow"}).format(a)}catch{}const s=[];return n>0&&s.push(`${n}d`),r>0&&s.push(`${r}h`),i>0&&s.push(`${i}m`),(o>0||s.length===0)&&s.push(`${o}s`),s.join(" ")},OT=({timerState:e,animationState:t,hasError:n,className:r})=>{const{t:i}=he.useTranslation(),o=ou(),{elapsedTime:s,currentProgress:a}=e,{showErrorAnimation:c,showPauseAnimation:l,showMainText:u}=t;return g.jsxRuntimeExports.jsxs(R.Box,{className:r,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsxRuntimeExports.jsx(dh.Gauge,{width:264,height:264,value:a,valueMin:0,valueMax:100,innerRadius:"85%",outerRadius:"100%",margin:0,skipAnimation:!0,text:()=>"",sx:{opacity:l||c?.6:1,transition:"opacity 0.5s ease-out","& .MuiGauge-valueArc":{fill:n?o.palette.error.light:o.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.jsxRuntimeExports.jsx(R.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.jsxRuntimeExports.jsxs(R.Box,{sx:{position:"relative",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:[g.jsxRuntimeExports.jsx(R.Fade,{in:u&&n,timeout:200,children:g.jsxRuntimeExports.jsx(R.Typography,{variant:"h6",sx:{position:"absolute",fontSize:"16px",fontWeight:500,color:o.palette.error.light},children:i("timer.error")})}),g.jsxRuntimeExports.jsx(R.Fade,{in:u&&!n,timeout:300,children:g.jsxRuntimeExports.jsx(R.Typography,{variant:"h1",sx:{position:"absolute",fontSize:"48px",fontWeight:500,color:o.palette.text.primary,lineHeight:1,letterSpacing:"-0.5px"},children:AT(s)})})]})})]})},PT=({timerState:e,animationState:t,hasError:n,compact:r,className:i})=>{const{t:o,i18n:s}=he.useTranslation(),a=ou(),{elapsedTime:c,currentProgress:l}=e,{showErrorAnimation:u,showPauseAnimation:d}=t;return r?g.jsxRuntimeExports.jsx(R.Box,{className:i,sx:{display:"flex",alignItems:"center",m:0},children:g.jsxRuntimeExports.jsx(R.Typography,{variant:"body2",sx:{color:n?a.palette.error.light:a.palette.text.primary,fontSize:"14px",transition:"color 0.5s ease-out"},children:n?o("timer.error"):kc(c,s.language)})}):g.jsxRuntimeExports.jsxs(R.Box,{className:i,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[g.jsxRuntimeExports.jsx(R.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.jsxRuntimeExports.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)"},role:"img","aria-label":"Timer progress",children:[g.jsxRuntimeExports.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:n?a.palette.error.light:a.palette.success.main,strokeWidth:"2",opacity:.3,style:{transition:"stroke 0.8s ease-in-out, opacity 2s ease-in-out"}}),g.jsxRuntimeExports.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:n?a.palette.error.light:a.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-l/100)}`,style:{transition:"stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"}})]})}),g.jsxRuntimeExports.jsx(R.Typography,{variant:"body2",sx:{color:n?a.palette.error.light:a.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:n?o("timer.error"):kc(c,s.language)})]})},DT=()=>{const[e,t]=$.useState({showPauseAnimation:!1,showErrorAnimation:!1,showMainText:!0}),n=$.useRef(null),r=$.useRef(null),i=$.useRef(null),o=$.useCallback(()=>{t(d=>({...d,showPauseAnimation:!0})),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{t(d=>({...d,showPauseAnimation:!1}))},800)},[]),s=$.useCallback(()=>{t(d=>({...d,showErrorAnimation:!0})),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(d=>({...d,showErrorAnimation:!1}))},600)},[]),a=$.useCallback(()=>{t(d=>({...d,showErrorAnimation:!1})),r.current&&clearTimeout(r.current)},[]),c=$.useCallback(()=>{t(d=>({...d,showMainText:!1})),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{t(d=>({...d,showMainText:!0}))},200)},[]),l=$.useCallback(()=>{t(d=>({...d,showMainText:!0}))},[]),u=$.useCallback(()=>{n.current&&clearTimeout(n.current),r.current&&clearTimeout(r.current),i.current&&clearTimeout(i.current)},[]);return{animationState:e,triggerPauseAnimation:o,triggerErrorAnimation:s,clearErrorAnimation:a,triggerFadeTransition:c,setInitialAnimationState:l,cleanup:u}},$T=({autoStart:e,hasError:t,onPauseAnimation:n,onErrorAnimation:r,onClearErrorAnimation:i})=>{const[o,s]=$.useState({elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0,wasRunningBeforeError:!1}),a=$.useRef(null),c=$.useRef(null),l=$.useRef(0),u=$.useRef(0),[d]=ue.useInterpolation([0],{tension:80,friction:18,onChange:([v])=>{s(M=>({...M,currentProgress:v}))}}),h=$.useCallback((v=0)=>{const M=v/60%1*100;s(S=>({...S,elapsedTime:v,isPausedState:!1,currentProgress:M})),l.current=0,u.current=M,d.setImmediate([M]),e?(c.current=Date.now()-v*1e3,s(S=>({...S,isRunning:!0}))):c.current=null},[e,d]),f=$.useCallback(()=>{if(c.current&&o.isRunning){const M=(Date.now()-c.current)/1e3+l.current,S=M/60%1*100;d.setTarget([S]),s(T=>({...T,elapsedTime:Math.floor(M)}))}s(v=>({...v,isRunning:!1,isPausedState:!0})),n()},[o.isRunning,d,n]),m=$.useCallback(()=>{o.isPausedState&&(l.current=o.elapsedTime,c.current=Date.now(),s(v=>({...v,isRunning:!0,isPausedState:!1})))},[o.isPausedState,o.elapsedTime]),p=$.useCallback(()=>{s(v=>({...v,elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0})),l.current=0,c.current=null,u.current=0,d.setImmediate([0])},[d]),b=$.useCallback(()=>o.isPausedState,[o.isPausedState]);return $.useEffect(()=>{t?(o.isRunning&&(s(v=>({...v,wasRunningBeforeError:!0})),f()),r()):(o.wasRunningBeforeError&&!o.isRunning&&(s(v=>({...v,wasRunningBeforeError:!1})),m()),i())},[t,o.isRunning,o.wasRunningBeforeError,f,m,r,i]),$.useEffect(()=>{if(o.isRunning){const v=()=>{if(c.current){const S=(Date.now()-c.current)/1e3+l.current,T=S/60%1*100;s(w=>({...w,elapsedTime:Math.floor(S)})),Math.abs(T-u.current)>.1&&(d.setTarget([T]),u.current=T)}a.current=requestAnimationFrame(v)};a.current=requestAnimationFrame(v)}else a.current&&(cancelAnimationFrame(a.current),a.current=null);return()=>{a.current&&(cancelAnimationFrame(a.current),a.current=null)}},[o.isRunning,d]),$.useEffect(()=>{let v=null;const M=()=>{d.update(),v=requestAnimationFrame(M)};return v=requestAnimationFrame(M),()=>{v&&cancelAnimationFrame(v)}},[d]),{timerState:o,controls:{start:h,pause:f,resume:m,reset:p,isPaused:b}}},NT=g.externalizeComponent(ie.observer(({onTimerReady:e,autoStart:t=!0,variant:n="default",compact:r=!1,className:i,hasError:o=!1})=>{const{animationState:s,triggerPauseAnimation:a,triggerErrorAnimation:c,clearErrorAnimation:l,setInitialAnimationState:u,cleanup:d}=DT(),{timerState:h,controls:f}=$T({autoStart:t,hasError:o,onPauseAnimation:a,onErrorAnimation:c,onClearErrorAnimation:l});return $.useEffect(()=>{u()},[u]),$.useEffect(()=>{let m=!0;const p=setTimeout(()=>{m&&e(f)},0);return()=>{m=!1,clearTimeout(p)}},[e,f]),$.useEffect(()=>d,[d]),n==="small"?g.jsxRuntimeExports.jsx(PT,{timerState:h,animationState:s,hasError:o,compact:r,className:i}):g.jsxRuntimeExports.jsx(OT,{timerState:h,animationState:s,hasError:o,className:i})})),Ac=1e-4,LT={a:0,d:0,alpha:0,theta:0,reverse_rotation_direction:!1};class xi{constructor(t,n,r,i,o,s,a,c,l,u){this.nova=t,this.controller=n,this.motionGroup=r,this.initialMotionState=i,this.motionStateSocket=o,this.isVirtual=s,this.tcps=a,this.description=c,this.initialControllerState=l,this.controllerStateSocket=u,this.connectedJoggingSocket=null,this.joggingVelocity=10,this.activationState="inactive",this.rapidlyChangingMotionState=i,this.controllerState=l,u.addEventListener("message",d=>{var f;const h=(f=Ee.tryParseJson(d.data))==null?void 0:f.result;h&&de.runInAction(()=>{this.controllerState=h})}),o.addEventListener("message",d=>{var f;const h=(f=Ee.tryParseJson(d.data))==null?void 0:f.result;if(!h)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${d.data}`);oa(this.rapidlyChangingMotionState.joint_position,h.joint_position,Ac)||de.runInAction(()=>{this.rapidlyChangingMotionState.joint_position=h.joint_position}),sa(this.rapidlyChangingMotionState,h,Ac)||de.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose=h.tcp_pose}),this.rapidlyChangingMotionState.standstill!==h.standstill&&de.runInAction(()=>{this.rapidlyChangingMotionState.standstill=h.standstill})}),de.makeAutoObservable(this)}static async connectMultiple(t,n){return Promise.all(n.map(r=>xi.connect(t,r)))}static async connect(t,n){var v,M;const[r,i]=n.split("@"),o=await t.api.controller.getCurrentRobotControllerState(i),s=o==null?void 0:o.motion_groups.find(S=>S.motion_group===n);if(!o||!s)throw new Error(`Controller ${i} or motion group ${n} not found`);const a=t.openReconnectingWebsocket(`/controllers/${i}/motion-groups/${n}/state-stream`),c=await a.firstMessage(),l=(v=Ee.tryParseJson(c.data))==null?void 0:v.result;if(!l)throw new Error(`Unable to parse initial motion state message ${c.data}`);console.log(`Connected motion state websocket to motion group ${s.motion_group}. Initial state:
126
+ `,l);const d=(await t.api.controller.getRobotController(o.controller)).configuration.kind==="VirtualController",h=await t.api.motionGroup.getMotionGroupDescription(i,s.motion_group),f=Object.entries(h.tcps||{}).map(([S,T])=>({id:S,readable_name:T.name,position:T.pose.position,orientation:T.pose.orientation})),m=t.openReconnectingWebsocket(`/controllers/${o.controller}/state-stream?response_rate=1000`),p=await m.firstMessage(),b=(M=Ee.tryParseJson(p.data))==null?void 0:M.result;if(!b)throw new Error(`Unable to parse initial controller state message ${p.data}`);return console.log(`Connected controller state websocket to controller ${o.controller}. Initial state:
127
+ `,b),new xi(t,o,s,l,a,d,f,h,b,m)}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get modelFromController(){return this.description.motion_group_model}get wandelscriptIdentifier(){const t=this.motionGroupId.split("@")[0];return`${this.controllerId.replace(/-/g,"_")}_${t}`}get joggingVelocityRads(){return this.joggingVelocity*Math.PI/180}get joints(){return this.initialMotionState.joint_position.map((t,n)=>({index:n}))}get dhParameters(){if(this.description.dh_parameters!==void 0)return this.description.dh_parameters.map(t=>({...LT,...t}))}get safetyZones(){return this.description.safety_zones}get mountingPosition(){var t,n,r;return this.description.mounting?[(((t=this.description.mounting.position)==null?void 0:t[0])||0)/1e3,(((n=this.description.mounting.position)==null?void 0:n[1])||0)/1e3,(((r=this.description.mounting.position)==null?void 0:r[2])||0)/1e3]:[0,0,0]}get mountingQuaternion(){var i,o,s,a,c,l;const t=new pa.Vector3(((o=(i=this.description.mounting)==null?void 0:i.orientation)==null?void 0:o[0])||0,((a=(s=this.description.mounting)==null?void 0:s.orientation)==null?void 0:a[1])||0,((l=(c=this.description.mounting)==null?void 0:c.orientation)==null?void 0:l[2])||0),n=t.length(),r=t.normalize();return new pa.Quaternion().setFromAxisAngle(r,n)}get isEstopActive(){return["SAFETY_STATE_ROBOT_EMERGENCY_STOP","SAFETY_STATE_DEVICE_EMERGENCY_STOP"].includes(this.controllerState.safety_state)}get isMoveableSafetyState(){return["SAFETY_STATE_NORMAL","SAFETY_STATE_REDUCED"].includes(this.controllerState.safety_state)}get isMoveableOperationMode(){return["OPERATION_MODE_AUTO","OPERATION_MODE_MANUAL","OPERATION_MODE_MANUAL_T1","OPERATION_MODE_MANUAL_T2"].includes(this.controllerState.operation_mode)}get canBeMoved(){return this.isMoveableSafetyState&&this.isMoveableOperationMode&&this.activationState==="active"}async deactivate(){if(this.activationState!=="active"){console.error("Tried to deactivate while already deactivating");return}de.runInAction(()=>{this.activationState="deactivating"});try{await this.nova.api.controller.setDefaultMode(this.controllerId,"ROBOT_SYSTEM_MODE_MONITOR"),de.runInAction(()=>{this.activationState="inactive"})}catch(t){throw de.runInAction(()=>{this.activationState="active"}),t}}async activate(){if(this.activationState!=="inactive"){console.error("Tried to activate while already activating");return}de.runInAction(()=>{this.activationState="activating"});try{await this.nova.api.controller.setDefaultMode(this.controllerId,"ROBOT_SYSTEM_MODE_CONTROL"),de.runInAction(()=>{this.activationState="active"})}catch(t){throw de.runInAction(()=>{this.activationState="inactive"}),t}}toggleActivation(){this.activationState==="inactive"?this.activate():this.activationState==="active"&&this.deactivate()}dispose(){this.motionStateSocket.close(),this.connectedJoggingSocket&&this.connectedJoggingSocket.close()}setJoggingVelocity(t){this.joggingVelocity=t}}function oh(){var t,n,r,i,o,s,a;const e=R.createTheme({palette:{mode:"dark",text:{primary:"rgba(255, 255, 255, 1)",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.38)"},primary:{main:"rgba(142, 86, 252, 1)",dark:"rgba(136, 58, 255, 1)",light:"rgba(157, 131, 246, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},secondary:{main:"rgba(255, 255, 255, 1)",dark:"rgba(255, 255, 255, 0.06)",contrastText:"rgba(255, 255, 255, 0.87)"},tertiary:{main:"rgba(100, 255, 218, 1)",dark:"rgba(38, 166, 154, 1)",light:"rgba(167, 255, 235, 1)",contrastText:"rgba(0, 0, 0, 1)"},error:{main:"rgba(239, 83, 80, 1)",dark:"rgba(229, 57, 53, 1)",light:"rgba(239, 154, 154, 1)",contrastText:"rgba(255, 255, 255, 1)"},warning:{main:"rgba(255, 171, 64, 1)",dark:"rgba(255, 145, 0, 1)",light:"rgba(255, 209, 128, 1)",contrastText:"rgba(0, 0, 0, 0.87)"},success:{main:"rgba(38, 166, 154, 1)",dark:"rgba(0, 121, 107, 1)",light:"rgba(128, 203, 196, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},background:{default:"rgba(2, 6, 23, 1)",paper:"rgba(17, 19, 31, 1)"},action:{active:"rgba(255, 255, 255, 0.56)",hover:"rgba(255, 255, 255, 0.08)",selected:"rgba(255, 255, 255, 0.16)",disabledBackground:"rgba(255, 255, 255, 0.12)",focus:"rgba(255, 255, 255, 0.12)",disabled:"rgba(255, 255, 255, 0.38)"},common:{white:"rgba(255, 255, 255, 1)",black:"rgba(0, 0, 0, 1)"},divider:"rgba(255, 255, 255, 0.12)",backgroundPaperElevation:{0:"rgba(17,19,31,1.0)",1:"rgba(20,22,35,1.0)",2:"rgba(23,25,39,1.0)",3:"rgba(26,28,43,1.0)",4:"rgba(29,31,47,1.0)",5:"rgba(32,34,51,1.0)",6:"rgba(35,37,55,1.0)",7:"rgba(38,40,59,1.0)",8:"rgba(41,43,63,1.0)",9:"rgba(44,46,67,1.0)",10:"rgba(47,49,71,1.0)",11:"rgba(50,52,75,1.0)",12:"rgba(53,55,79,1.0)",13:"rgba(56,58,83,1.0)",14:"rgba(59,61,87,1.0)",15:"rgba(62,64,91,1.0)",16:"rgba(57,63,87,1.0)"}},paletteExt:{primary:{hover:"rgba(142, 86, 252, 0.08)",selected:"rgba(142, 86, 252, 0.16)",focus:"rgba(142, 86, 252, 0.12)",focusVisible:"rgba(142, 86, 252, 0.3)",outlineBorder:"rgba(142, 86, 252, 0.5)"},secondary:{tonal:"rgba(255,255,255,0.1)"}}});return{...e,components:{MuiCssBaseline:{styleOverrides:{"html, body, *":{scrollbarWidth:"none",msOverflowStyle:"none"},"html:hover, body:hover, *:hover":{scrollbarWidth:"thin",scrollbarColor:`${e.palette.divider} transparent`},".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:(r=(n=(t=e.paletteExt)==null?void 0:t.secondary)==null?void 0:n.tonal)==null?void 0:r.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:(i=e.palette.backgroundPaperElevation)==null?void 0:i[1]}}},MuiToggleButtonGroup:{styleOverrides:{root:{".MuiToggleButtonGroup-firstButton":{borderRadius:"10px 0 0 10px"},".MuiToggleButtonGroup-lastButton":{borderRadius:"0 10px 10px 0"}}}},MuiToggleButton:{styleOverrides:{root:{textTransform:"none",padding:"6px 16px"}}},MuiSelect:{variants:[{props:{variant:"filled"},style:{borderRadius:"10px","::before, ::after":{visibility:"collapse"},".MuiInputBase-input":{padding:"6px 16px",borderRadius:"10px"}}}]},MuiDrawer:{styleOverrides:{paper:{border:"none",boxShadow:"4px 0 8px -4px rgba(0, 0, 0, 0.3)"}}},MuiFab:{styleOverrides:{root:{background:(s=(o=e.paletteExt)==null?void 0:o.secondary)==null?void 0:s.tonal}},variants:[{props:{color:"primary"},style:{background:e.palette.primary.main}}]}},componentsExt:{JoggingPanel:{JoggingCartesian:{Axis:{X:{backgroundColor:"rgba(215, 66, 56, 1)",borderColor:"rgba(215, 66, 56, 1)",buttonBackgroundColor:{default:"rgba(241, 77, 66, 1)",pressed:"rgba(138, 41, 35, 1)",hovered:"rgba(241, 77, 66, 1)",disabled:"rgba(241, 77, 66, 1)"},color:"rgba(255, 198, 198, 1)",labelColor:e.palette.text.primary},Y:{backgroundColor:"rgba(20, 151, 108, 1)",borderColor:"rgba(20, 151, 108, 1)",buttonBackgroundColor:{default:"rgba(28, 188, 135, 1)",pressed:"rgba(11, 89, 63, 1)",disabled:"rgba(28, 188, 135, 1)",hovered:"rgba(28, 188, 135, 1)"},color:"rgba(215, 255, 242, 1)",labelColor:e.palette.text.primary},Z:{backgroundColor:"rgba(1, 87, 155, 1)",borderColor:"rgba(1, 87, 155, 1)",buttonBackgroundColor:{default:"rgba(2, 136, 209, 1)",pressed:"rgba(2, 64, 114, 1)",disabled:"rgba(2, 136, 209, 1)",hovered:"rgba(2, 136, 209, 1)"},color:"rgba(210, 239, 255, 1)",labelColor:e.palette.text.primary}}},JoggingJoint:{Joint:{arrowColor:e.palette.text.primary}},VelocitySlider:{sliderLegendColor:e.palette.text.primary}},WandelscriptEditor:{monacoTheme:{base:"vs-dark",inherit:!0,rules:[{token:"keyword",foreground:"#b349a9ff"}],colors:{"editor.background":R.rgbToHex(((a=e.palette.backgroundPaperElevation)==null?void 0:a[5])??""),"editor.foreground":"#d4d4d4","editorLineNumber.foreground":"#797979","editorLineNumber.activeForeground":"#e9e9e9","editor.lineHighlightBorder":"#e9e9e911"}}}}}}function zT(){const e=oh();return e.palette.mode="light",e}function FT(e){var r,i,o,s;let t=!0;((r=e.palette)==null?void 0:r.mode)==="light"?t=!1:((i=e.palette)==null?void 0:i.mode)!=="dark"&&(t=!(typeof window<"u"&&((s=(o=window.matchMedia)==null?void 0:o.call(window,"(prefers-color-scheme: light)"))==null?void 0:s.matches)));const n=t?oh():zT();return iu(n,e)}exports.AppHeader=Dh;exports.ConnectedMotionGroup=xi;exports.CycleTimer=ev;exports.JoggerConnection=Zi;exports.JoggingCartesianAxisControl=ss;exports.JoggingJointRotationControl=jd;exports.JoggingPanel=Vw;exports.JoggingStore=ro;exports.LogPanel=Kw;exports.LogStore=nh;exports.LogViewer=rh;exports.MotionStreamConnection=Xi;exports.NoMotionGroupModal=Zw;exports.PoseCartesianValues=Uw;exports.PoseJointValues=Ww;exports.RobotListItem=nT;exports.RobotSetupReadinessIndicator=ih;exports.RobotSetupReadinessState=fa;exports.SafetyBar=_T;exports.SelectableFab=MT;exports.TabBar=kT;exports.Timer=NT;exports.VelocitySlider=Qd;exports.VelocitySliderLabel=ha;exports.WandelbotsDataGrid=_d;exports.createDebugMessage=Hw;exports.createErrorMessage=Jw;exports.createInfoMessage=Yw;exports.createLogMessage=gr;exports.createNovaMuiTheme=FT;exports.createWarningMessage=qw;exports.jointValuesEqual=oa;exports.poseEqual=Id;exports.tcpMotionEqual=sa;exports.unwrapRotationVector=kd;
128
+ //# sourceMappingURL=theming-ZJr8jTwS.cjs.map