@wandelbots/wandelbots-js-react-components 2.40.0-pr.feature-seperate-timer.383.c9c6f2b → 2.40.0-pr.feature-seperate-timer.383.0494cf4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"useTimerLogic.d.ts","sourceRoot":"","sources":["../../../src/components/CycleTimer/useTimerLogic.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAGzC,UAAU,kBAAkB;IAC1B,SAAS,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAA;IAChC,QAAQ,EAAE,OAAO,CAAA;IACjB,gBAAgB,EAAE,MAAM,IAAI,CAAA;IAC5B,gBAAgB,EAAE,MAAM,IAAI,CAAA;IAC5B,qBAAqB,EAAE,MAAM,IAAI,CAAA;IACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,EAAE,MAAM,IAAI,KAAK,IAAI,CAAA;CACpD;AAED,eAAO,MAAM,aAAa,GAAI,wIAS3B,kBAAkB;;;wCAkEA,MAAM,mBAAkB,MAAM;0CAzB9B,MAAM;;;;;;;CAwQ1B,CAAA"}
1
+ {"version":3,"file":"useTimerLogic.d.ts","sourceRoot":"","sources":["../../../src/components/CycleTimer/useTimerLogic.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAGzC,UAAU,kBAAkB;IAC1B,SAAS,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAA;IAChC,QAAQ,EAAE,OAAO,CAAA;IACjB,gBAAgB,EAAE,MAAM,IAAI,CAAA;IAC5B,gBAAgB,EAAE,MAAM,IAAI,CAAA;IAC5B,qBAAqB,EAAE,MAAM,IAAI,CAAA;IACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,EAAE,MAAM,IAAI,KAAK,IAAI,CAAA;CACpD;AAED,eAAO,MAAM,aAAa,GAAI,wIAS3B,kBAAkB;;;wCAkEA,MAAM,mBAAkB,MAAM;0CAzB9B,MAAM;;;;;;;CAuQ1B,CAAA"}
package/dist/index.cjs CHANGED
@@ -122,7 +122,7 @@ Avoid returning a new reference inside your input selector, e.g.
122
122
  `));return e.store}function vm(){const e=Dr();return ot(e,Aa)}function Sm(){const e=Dr();return ot(e,fx)}const rl=(e,t)=>e===void 0?t:Math.PI*e/180;function tC(){const e=Dr(),{axis:t,axisIds:r}=ot(e,$r);return{xAxis:t,xAxisIds:r}}function rC(){const e=Dr(),{axis:t,axisIds:r}=ot(e,Ur);return{yAxis:t,yAxisIds:r}}function nC(){const e=Dr(),{axis:t,axisIds:r}=ot(e,GS)??{axis:{},axisIds:[]};return{zAxis:t,zAxisIds:r}}function aC(){const e=xm();if(!e)throw new Error(["MUI X Charts: Could not find the svg ref context.","It looks like you rendered your component outside of a ChartContainer parent component."].join(`
123
123
  `));return e.svgRef}function oC(){const e=Sm();return N.useCallback(t=>`${e}-gradient-${t}`,[e])}function sC(){const e=Sm();return N.useCallback(t=>`${e}-gradient-${t}-object-bound`,[e])}var Si,gd;function iC(){if(gd)return Si;gd=1;var e=4,t=.001,r=1e-7,n=10,a=11,o=1/(a-1),s=typeof Float32Array=="function";function i(m,y){return 1-3*y+3*m}function l(m,y){return 3*y-6*m}function c(m){return 3*m}function u(m,y,S){return((i(y,S)*m+l(y,S))*m+c(y))*m}function d(m,y,S){return 3*i(y,S)*m*m+2*l(y,S)*m+c(y)}function h(m,y,S,A,w){var O,T,C=0;do T=y+(S-y)/2,O=u(T,A,w)-m,O>0?S=T:y=T;while(Math.abs(O)>r&&++C<n);return T}function p(m,y,S,A){for(var w=0;w<e;++w){var O=d(y,S,A);if(O===0)return y;var T=u(y,S,A)-m;y-=T/O}return y}function f(m){return m}return Si=function(y,S,A,w){if(!(0<=y&&y<=1&&0<=A&&A<=1))throw new Error("bezier x values must be in [0, 1] range");if(y===S&&A===w)return f;for(var O=s?new Float32Array(a):new Array(a),T=0;T<a;++T)O[T]=u(T*o,y,A);function C(R){for(var I=0,V=1,b=a-1;V!==b&&O[V]<=R;++V)I+=o;--V;var _=(R-O[V])/(O[V+1]-O[V]),G=I+_*o,M=d(G,y,A);return M>=t?p(R,G,y,A):M===0?G:h(R,I,I+o,y,A)}return function(I){return I===0?0:I===1?1:u(C(I),S,w)}},Si}var lC=iC();const cC=Tg(lC),uC=300,dC=cC(.66,0,.34,1);var wn=0,na=0,Gn=0,wm=1e3,Ho,aa,qo=0,_r=0,Is=0,xa=typeof performance=="object"&&performance.now?performance:Date,Cm=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function yc(){return _r||(Cm(hC),_r=xa.now()+Is)}function hC(){_r=0}function Wo(){this._call=this._time=this._next=null}Wo.prototype=Om.prototype={constructor:Wo,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?yc():+r)+(t==null?0:+t),!this._next&&aa!==this&&(aa?aa._next=this:Ho=this,aa=this),this._call=e,this._time=r,al()},stop:function(){this._call&&(this._call=null,this._time=1/0,al())}};function Om(e,t,r){var n=new Wo;return n.restart(e,t,r),n}function nl(){yc(),++wn;for(var e=Ho,t;e;)(t=_r-e._time)>=0&&e._call.call(void 0,t),e=e._next;--wn}function yd(){_r=(qo=xa.now())+Is,wn=na=0;try{nl()}finally{wn=0,mC(),_r=0}}function pC(){var e=xa.now(),t=e-qo;t>wm&&(Is-=t,qo=e)}function mC(){for(var e,t=Ho,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Ho=r);aa=e,al(n)}function al(e){if(!wn){na&&(na=clearTimeout(na));var t=e-_r;t>24?(e<1/0&&(na=setTimeout(yd,e-xa.now()-Is)),Gn&&(Gn=clearInterval(Gn))):(Gn||(qo=xa.now(),Gn=setInterval(pC,wm)),wn=1,Cm(yd))}}function fC(e,t,r){var n=new Wo;return t=t==null?0:+t,n.restart(a=>{n.stop(),e(a+t)},t,r),n}class gC{constructor(t,r,n){this.duration=void 0,this.elapsed=0,this.easingFn=void 0,this.timer=null,this.onTickCallback=void 0,this.duration=t,this.easingFn=r,this.onTickCallback=n,this.resume()}get running(){return this.timer!==null}timerCallback(t){this.elapsed=Math.min(t,this.duration);const r=this.duration===0?1:this.elapsed/this.duration,n=this.easingFn(r);this.onTickCallback(n),this.elapsed>=this.duration&&this.stop()}resume(){if(this.running||this.elapsed>=this.duration)return this;const t=yc()-this.elapsed;return this.timer=Om(r=>this.timerCallback(r),0,t),nl(),this}stop(){return this.running?(this.timer&&(this.timer.stop(),this.timer=null),this):this}finish(){return this.stop(),fC(()=>this.timerCallback(this.duration)),nl(),this}}function yC(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let a=0;a<r.length;a+=1){const o=r[a];if(!Object.prototype.hasOwnProperty.call(t,o)||!Object.is(e[o],t[o]))return!1}return!0}function bC(e,{createInterpolator:t,applyProps:r,skip:n,initialProps:a=e}){const o=N.useRef(a),s=N.useRef(null),i=N.useRef(null),l=N.useRef(e);Ut(()=>{l.current=e},[e]),Ut(()=>{var d;n&&((d=s.current)==null||d.finish(),s.current=null,i.current=null,o.current=e)},[e,n]);const c=N.useCallback(d=>{const h=o.current,p=t(h,e);s.current=new gC(uC,dC,f=>{const m=p(f);o.current=m,r(d,m)})},[r,t,e]);return N.useCallback(d=>{var p,f,m,y;if(d===null){(p=s.current)==null||p.stop();return}const h=i.current;if(h===d){if(yC(l.current,e)){(f=s.current)==null||f.resume();return}(m=s.current)==null||m.stop()}h&&((y=s.current)==null||y.stop()),i.current=d,(s.current||!n)&&c(d)},[c,e,n])}function xC(e,{createInterpolator:t,transformProps:r,applyProps:n,skip:a,initialProps:o=e,ref:s}){const i=r??(u=>u),l=bC(e,{initialProps:o,createInterpolator:t,applyProps:(u,d)=>n(u,i(d)),skip:a});return K({},r(a?e:o),{ref:ms(l,s)})}function bd(e){const{isReversed:t,gradientId:r,size:n,direction:a,scale:o,colorMap:s}=e;return n<=0?null:g.jsx("linearGradient",{id:r,x1:"0",x2:"0",y1:"0",y2:"0",[`${a}${t?1:2}`]:`${n}px`,gradientUnits:"userSpaceOnUse",children:s.thresholds.map((i,l)=>{const c=o(i);if(c===void 0)return null;const u=t?1-c/n:c/n;return Number.isNaN(u)?null:g.jsxs(N.Fragment,{children:[g.jsx("stop",{offset:u,stopColor:s.colors[l],stopOpacity:1}),g.jsx("stop",{offset:u,stopColor:s.colors[l+1],stopOpacity:1})]},i.toString()+l)})})}const vC=10;function xd(e){const{gradientUnits:t,isReversed:r,gradientId:n,size:a,direction:o,scale:s,colorScale:i,colorMap:l}=e,c=[l.min??0,l.max??100],u=c.map(s).filter(f=>f!==void 0);if(u.length!==2)return null;const d=typeof c[0]=="number"?Tt(c[0],c[1]):ec(c[0],c[1]),h=Math.round((Math.max(...u)-Math.min(...u))/vC),p=`${c[0]}-${c[1]}-`;return g.jsx("linearGradient",{id:n,x1:"0",x2:"0",y1:"0",y2:"0",[`${o}${r?1:2}`]:t==="objectBoundingBox"?1:`${a}px`,gradientUnits:t??"userSpaceOnUse",children:Array.from({length:h+1},(f,m)=>{const y=d(m/h);if(y===void 0)return null;const S=s(y);if(S===void 0)return null;const A=r?1-S/a:S/a,w=i(y);return w===null?null:g.jsx("stop",{offset:A,stopColor:w,stopOpacity:1},p+m)})})}const SC=10,wC=e=>e?{x1:"1",x2:"0",y1:"0",y2:"0"}:{x1:"0",x2:"1",y1:"0",y2:"0"};function wi(e){const{isReversed:t,gradientId:r,colorScale:n,colorMap:a}=e,o=[a.min??0,a.max??100],s=typeof o[0]=="number"?Tt(o[0],o[1]):ec(o[0],o[1]),i=SC,l=`${o[0]}-${o[1]}-`;return g.jsx("linearGradient",K({id:r},wC(t),{gradientUnits:"objectBoundingBox",children:Array.from({length:i+1},(c,u)=>{const d=u/i,h=s(d);if(h===void 0)return null;const p=n(h);return p===null?null:g.jsx("stop",{offset:d,stopColor:p,stopOpacity:1},l+u)})}))}function CC(){const{top:e,height:t,bottom:r,left:n,width:a,right:o}=vm(),s=e+t+r,i=n+a+o,l=oC(),c=sC(),{xAxis:u,xAxisIds:d}=tC(),{yAxis:h,yAxisIds:p}=rC(),{zAxis:f,zAxisIds:m}=nC(),y=p.filter(w=>h[w].colorMap!==void 0),S=d.filter(w=>u[w].colorMap!==void 0),A=m.filter(w=>f[w].colorMap!==void 0);return y.length===0&&S.length===0&&A.length===0?null:g.jsxs("defs",{children:[y.map(w=>{const O=l(w),T=c(w),{colorMap:C,scale:R,colorScale:I,reverse:V}=h[w];return(C==null?void 0:C.type)==="piecewise"?g.jsx(bd,{isReversed:!V,scale:R,colorMap:C,size:s,gradientId:O,direction:"y"},O):(C==null?void 0:C.type)==="continuous"?g.jsxs(N.Fragment,{children:[g.jsx(xd,{isReversed:!V,scale:R,colorScale:I,colorMap:C,size:s,gradientId:O,direction:"y"}),g.jsx(wi,{isReversed:V,colorScale:I,colorMap:C,gradientId:T})]},O):null}),S.map(w=>{const O=l(w),T=c(w),{colorMap:C,scale:R,reverse:I,colorScale:V}=u[w];return(C==null?void 0:C.type)==="piecewise"?g.jsx(bd,{isReversed:I,scale:R,colorMap:C,size:i,gradientId:O,direction:"x"},O):(C==null?void 0:C.type)==="continuous"?g.jsxs(N.Fragment,{children:[g.jsx(xd,{isReversed:I,scale:R,colorScale:V,colorMap:C,size:i,gradientId:O,direction:"x"}),g.jsx(wi,{isReversed:I,colorScale:V,colorMap:C,gradientId:T})]},O):null}),A.map(w=>{const O=c(w),{colorMap:T,colorScale:C}=f[w];return(T==null?void 0:T.type)==="continuous"?g.jsx(wi,{colorScale:C,colorMap:T,gradientId:O},O):null})]})}const OC=["children","className","title","desc"],TC=pt("svg",{name:"MuiChartsSurface",slot:"Root"})(({ownerState:e})=>({width:e.width??"100%",height:e.height??"100%",display:"flex",position:"relative",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden",touchAction:"pan-y",userSelect:"none"})),bc=N.forwardRef(function(t,r){const n=Dr(),{width:a,height:o}=ot(n,ux),{width:s,height:i}=ot(n,cx),l=aC(),c=ms(l,r),u=mb({props:t,name:"MuiChartsSurface"}),{children:d,className:h,title:p,desc:f}=u,m=ur(u,OC),y=o>0&&a>0;return g.jsxs(TC,K({ownerState:{width:s,height:i},viewBox:`0 0 ${a} ${o}`,className:h},m,{ref:c,children:[p&&g.jsx("title",{children:p}),f&&g.jsx("desc",{children:f}),g.jsx(CC,{}),y&&d]}))});process.env.NODE_ENV!=="production"&&(bc.displayName="ChartsSurface");process.env.NODE_ENV!=="production"&&(bc.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 Hn(e,t){if(typeof e=="number")return e;if(e==="100%")return t;if(e.endsWith("%")){const r=Number.parseFloat(e.slice(0,e.length-1));if(!Number.isNaN(r))return r*t/100}if(e.endsWith("px")){const r=Number.parseFloat(e.slice(0,e.length-2));if(!Number.isNaN(r))return r}throw new Error(`MUI X Charts: Received an unknown value "${e}". It should be a number, or a string with a percentage value.`)}function Ci(e){const t=rl(e);return[Math.sin(t),-Math.cos(t)]}function PC(e,t){const r=[[0,0],Ci(e),Ci(t)],n=Math.min(e,t),a=Math.max(e,t),o=Math.floor(n/90)*90;for(let u=1;u<=4;u+=1){const d=o+u*90;d<a&&r.push(Ci(d))}const s=Math.min(...r.map(([u])=>u)),i=Math.max(...r.map(([u])=>u)),l=Math.min(...r.map(([,u])=>u)),c=Math.max(...r.map(([,u])=>u));return{cx:-s/(i-s),cy:-l/(c-l),minX:s,maxX:i,minY:l,maxY:c}}function RC(e,t,r,n,{minX:a,maxX:o,minY:s,maxY:i}){return Math.min(...[{ratio:Math.abs(a),space:e},{ratio:Math.abs(o),space:r-e},{ratio:Math.abs(s),space:t},{ratio:Math.abs(i),space:n-t}].map(({ratio:l,space:c})=>l<1e-5?1/0:c/l))}const xc=N.createContext({value:null,valueMin:0,valueMax:0,startAngle:0,endAngle:0,innerRadius:0,outerRadius:0,cornerRadius:0,cx:0,cy:0,maxRadius:0,valueAngle:null});process.env.NODE_ENV!=="production"&&(xc.displayName="GaugeContext");function AC(e){const{value:t=null,valueMin:r=0,valueMax:n=100,startAngle:a=0,endAngle:o=360,outerRadius:s,innerRadius:i,cornerRadius:l,cx:c,cy:u,children:d}=e,{left:h,top:p,width:f,height:m}=vm(),y=PC(a,o),S=c?Hn(c,f):y.cx*f,A=u?Hn(u,m):y.cy*m;let w=h+S,O=p+A;const T=RC(S,A,f,m,y);if(c===void 0){const b=T*(y.maxX-y.minX);w=h+(f-b)/2+y.cx*b}if(u===void 0){const b=T*(y.maxY-y.minY);O=p+(m-b)/2+y.cy*b}const C=Hn(s??T,T),R=Hn(i??"80%",T),I=Hn(l??0,C-R),V=N.useMemo(()=>{const b=rl(a),_=rl(o);return{value:t,valueMin:r,valueMax:n,startAngle:b,endAngle:_,outerRadius:C,innerRadius:R,cornerRadius:I,cx:w,cy:O,maxRadius:T,valueAngle:t===null?null:b+(_-b)*(t-r)/(n-r)}},[t,r,n,a,o,C,R,I,w,O,T]);return g.jsx(xc.Provider,{value:V,children:d})}function vc(){return N.useContext(xc)}const _C=["width","height","margin","title","desc","value","valueMin","valueMax","startAngle","endAngle","outerRadius","innerRadius","cornerRadius","cx","cy","children"],EC=pt("g")(({theme:e})=>({"& text":{fill:(e.vars||e).palette.text.primary}})),Sc=N.forwardRef(function(t,r){const{width:n,height:a,margin:o,title:s,desc:i,value:l,valueMin:c=0,valueMax:u=100,startAngle:d,endAngle:h,outerRadius:p,innerRadius:f,cornerRadius:m,cx:y,cy:S,children:A}=t,w=ur(t,_C);return g.jsx(eC,{pluginParams:{width:n,height:a,margin:yp(o,{left:10,right:10,top:10,bottom:10})},plugins:[],children:g.jsx(AC,{value:l,valueMin:c,valueMax:u,startAngle:d,endAngle:h,outerRadius:p,innerRadius:f,cornerRadius:m,cx:y,cy:S,children:g.jsx(bc,K({title:s,desc:i,role:"meter","aria-valuenow":l===null?void 0:l,"aria-valuemin":c,"aria-valuemax":u},w,{ref:r,children:g.jsx(EC,{"aria-hidden":"true",children:A})}))})})});process.env.NODE_ENV!=="production"&&(Sc.displayName="GaugeContainer");process.env.NODE_ENV!=="production"&&(Sc.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 IC(e){const t=Dr(),r=ot(t,Bb);return e||r}function VC(e,t){const r=Tt(e.startAngle,t.startAngle),n=Tt(e.endAngle,t.endAngle),a=Tt(e.innerRadius,t.innerRadius),o=Tt(e.outerRadius,t.outerRadius),s=Tt(e.cornerRadius,t.cornerRadius);return i=>({startAngle:r(i),endAngle:n(i),innerRadius:a(i),outerRadius:o(i),cornerRadius:s(i)})}function MC(e){return xC({startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius},{createInterpolator:VC,transformProps:t=>({d:hm().cornerRadius(t.cornerRadius)({innerRadius:t.innerRadius,outerRadius:t.outerRadius,startAngle:t.startAngle,endAngle:t.endAngle})}),applyProps(t,r){t.setAttribute("d",r.d)},initialProps:{startAngle:e.startAngle,endAngle:e.startAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius},skip:e.skipAnimation,ref:e.ref})}const jC=["cx","cy","startAngle","endAngle","cornerRadius","innerRadius","outerRadius","skipAnimation"],kC=pt("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.primary.main}));function Tm(e){const{value:t,valueMin:r,valueMax:n,startAngle:a,endAngle:o,outerRadius:s,innerRadius:i,cornerRadius:l,cx:c,cy:u}=vc();if(t===null)return null;const d=a+(t-r)/(n-r)*(o-a);return g.jsx(Pm,K({},e,{cx:c,cy:u,startAngle:a,endAngle:d,cornerRadius:l,innerRadius:i,outerRadius:s}))}process.env.NODE_ENV!=="production"&&(Tm.propTypes={skipAnimation:x.bool});function Pm(e){let{cx:t,cy:r,startAngle:n,endAngle:a,cornerRadius:o,innerRadius:s,outerRadius:i,skipAnimation:l}=e,c=ur(e,jC);const u=IC(l),d=MC({startAngle:n,endAngle:a,cornerRadius:o,innerRadius:s,outerRadius:i,skipAnimation:u});return g.jsx(kC,K({},d,{transform:`translate(${t}, ${r})`},c))}process.env.NODE_ENV!=="production"&&(Pm.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 $C=pt("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.divider}));function UC(e){const{startAngle:t,endAngle:r,outerRadius:n,innerRadius:a,cornerRadius:o,cx:s,cy:i}=vc();return g.jsx($C,K({transform:`translate(${s}, ${i})`,d:hm().cornerRadius(o)({startAngle:t,endAngle:r,innerRadius:a,outerRadius:n})},e))}function DC(e){return On("MuiGauge",e)}jl("MuiGauge",["root","valueArc","referenceArc","valueText"]);function LC(){return typeof window>"u"}const no=new Map,BC=2e3,FC={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},NC=["minWidth","maxWidth","width","minHeight","maxHeight","height","top","left","fontSize","padding","margin","paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom"],vd="mui_measurement_span";function Rm(e,t){return NC.indexOf(e)>=0&&t===+t?`${t}px`:t}function Am(e){return e.split("").reduce((n,a)=>a===a.toUpperCase()?[...n,"-",a.toLowerCase()]:[...n,a],[]).join("")}const zC=e=>Object.keys(e).sort().reduce((t,r)=>`${t}${Am(r)}:${Rm(r,e[r])};`,"");let Oi;const GC=(e,t={})=>{if(e==null||LC())return{width:0,height:0};const r=`${e}`,n=zC(t),a=`${r}-${n}`,o=no.get(a);if(o)return o;try{let s=document.getElementById(vd);s===null&&(s=document.createElement("span"),s.setAttribute("id",vd),s.setAttribute("aria-hidden","true"),document.body.appendChild(s));const i=K({},FC,t);Object.keys(i).map(u=>(s.style[Am(u)]=Rm(u,i[u]),u)),s.textContent=r;const l=s.getBoundingClientRect(),c={width:l.width,height:l.height};return no.set(a,c),no.size+1>BC&&no.clear(),process.env.NODE_ENV==="test"?s.textContent="":(Oi&&clearTimeout(Oi),Oi=setTimeout(()=>{s.textContent=""},0)),c}catch{return{width:0,height:0}}};function HC({style:e,needsComputation:t,text:r}){return r.split(`
124
124
  `).map(n=>K({text:n},t?GC(n,e):{width:0,height:0}))}function qC(){const[e,t]=N.useState(typeof window<"u"||process.env.NODE_ENV==="test");return N.useEffect(()=>{t(!0)},[]),e}const WC=["x","y","style","text","ownerState"],JC=["angle","textAnchor","dominantBaseline"];function _m(e){const{x:t,y:r,style:n,text:a}=e,o=ur(e,WC),s=n??{},{angle:i,textAnchor:l,dominantBaseline:c}=s,u=ur(s,JC),d=qC(),h=N.useMemo(()=>HC({style:u,needsComputation:d&&a.includes(`
125
- `),text:a}),[u,a,d]);let p;switch(c){case"hanging":case"text-before-edge":p=0;break;case"central":p=(h.length-1)/2*-h[0].height;break;default:p=(h.length-1)*-h[0].height;break}return g.jsx("text",K({},o,{transform:i?`rotate(${i}, ${t}, ${r})`:void 0,x:t,y:r,textAnchor:l,dominantBaseline:c,style:u,children:h.map((f,m)=>g.jsx("tspan",{x:t,dy:`${m===0?p:h[0].height}px`,dominantBaseline:c,children:f.text},m))}))}process.env.NODE_ENV!=="production"&&(_m.propTypes={lineHeight:x.number,needsComputation:x.bool,ownerState:x.any,style:x.object,text:x.string.isRequired});const YC=["text","className"];function KC({value:e}){return e===null?null:e.toLocaleString()}function Em(e){const{text:t=KC,className:r}=e,n=ur(e,YC),{value:a,valueMin:o,valueMax:s,cx:i,cy:l}=vc(),c=typeof t=="function"?t({value:a,valueMin:o,valueMax:s}):t;return c===null?null:g.jsx("g",{className:r,children:g.jsx(_m,K({x:i,y:l,text:c,style:{textAnchor:"middle",dominantBaseline:"central"}},n))})}process.env.NODE_ENV!=="production"&&(Em.propTypes={lineHeight:x.number,needsComputation:x.bool,ownerState:x.any,style:x.object,text:x.oneOfType([x.func,x.string])});const QC=["text","children","classes","className","skipAnimation"],XC=e=>{const{classes:t}=e;return ts({root:["root"],valueArc:["valueArc"],referenceArc:["referenceArc"],valueText:["valueText"]},DC,t)},wc=N.forwardRef(function(t,r){const{text:n,children:a,className:o,skipAnimation:s}=t,i=ur(t,QC),l=XC(t);return g.jsxs(Sc,K({},i,{className:Pt(l.root,o),ref:r,children:[g.jsx(UC,{className:l.referenceArc}),g.jsx(Tm,{className:l.valueArc,skipAnimation:s}),g.jsx(Em,{className:l.valueText,text:n}),a]}))});process.env.NODE_ENV!=="production"&&(wc.displayName="Gauge");process.env.NODE_ENV!=="production"&&(wc.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 wt=e=>{const t=Math.floor(e/60),r=e%60;return`${t}:${r.toString().padStart(2,"0")}`},ZC=(e,t,r)=>e==="countdown"&&r!==null?Math.min(100,t/r*100):e==="measuring"?t/60%1*100:0,eO=({timerState:e,animationState:t,hasError:r,className:n})=>{const{t:a}=Se.useTranslation(),o=P.useTheme(),{currentState:s,remainingTime:i,maxTime:l,currentProgress:c}=e,{showErrorAnimation:u,showPauseAnimation:d,showPulsatingText:h,pulsatingFinished:p,showLabels:f,showMainText:m,showIdlePulsating:y,idleDotsCount:S}=t;return g.jsxs(P.Box,{className:n,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx(wc,{width:264,height:264,value:s==="idle"?0:c,valueMin:0,valueMax:100,innerRadius:"85%",outerRadius:"100%",margin:0,skipAnimation:!0,text:()=>"",sx:{opacity:d||u?.6:1,transition:"opacity 0.5s ease-out","& .MuiGauge-valueArc":{fill:r?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.jsxs(P.Box,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:225,height:225,borderRadius:"50%",backgroundColor:"#292B3F",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1,transition:"background-color 0.5s ease-out"},children:[g.jsx(P.Box,{sx:{height:"16px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:1},children:g.jsx(P.Fade,{in:f&&!r&&s!=="idle"&&s!=="success",timeout:300,children:g.jsx(P.Typography,{variant:"body2",sx:{fontSize:"12px",color:s==="measured"&&(h||p)?o.palette.success.main:o.palette.text.secondary,transition:"color 0.8s ease-in-out"},children:g.jsx("span",{style:{opacity:s==="measured"&&p?h?1:.6:1,transition:"opacity 2s ease-in-out"},children:s==="measuring"||s==="measured"?a("CycleTimer.CycleTime.lb","Cycle Time"):s==="countdown"?a("CycleTimer.RemainingTime.lb","Remaining Time"):""})})})}),g.jsxs(P.Box,{sx:{position:"relative",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:[g.jsx(P.Fade,{in:m&&s==="idle"&&!r,timeout:200,children:g.jsxs(P.Typography,{variant:"body2",sx:{position:"absolute",fontSize:"12px",fontWeight:400,color:"rgba(255, 255, 255, 0.7)",lineHeight:"166%",letterSpacing:"0.17px",textAlign:"center",width:"200px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx("span",{style:{opacity:y?1:.6,transition:"opacity 2s ease-in-out"},children:a("CycleTimer.WaitingForCycle.lb","Waiting for program cycle")}),g.jsx("span",{style:{display:"inline-block",width:"18px",textAlign:"left",opacity:y?1:.6,transition:"opacity 2s ease-in-out"},children:".".repeat(S)})]})}),g.jsx(P.Fade,{in:m&&r,timeout:200,children:g.jsx(P.Typography,{variant:"h3",sx:{position:"absolute",fontSize:"40px",fontWeight:400,color:"#FFFFFF",lineHeight:"116.7%"},children:a("CycleTimer.Error.lb","Error")})}),g.jsx(P.Fade,{in:m&&!r&&s!=="idle"&&s!=="success",timeout:300,children:g.jsx(P.Typography,{variant:"h1",sx:{position:"absolute",fontSize:"48px",fontWeight:500,color:o.palette.text.primary,lineHeight:1,transition:"color 0.8s ease-in-out"},children:g.jsx("span",{style:{opacity:1,transition:"opacity 2s ease-in-out"},children:wt(i)})})})]}),g.jsx(P.Box,{sx:{height:"16px",display:"flex",marginTop:.5,alignItems:"center",justifyContent:"center"},children:g.jsx(P.Fade,{in:f&&!r&&s!=="idle"&&s!=="success",timeout:300,children:g.jsx(P.Typography,{variant:"body2",sx:{fontSize:"12px",color:s==="measured"&&(h||p)?o.palette.success.main:o.palette.text.secondary,transition:"color 0.8s ease-in-out"},children:g.jsx("span",{style:{opacity:s==="measured"&&p?h?1:.6:1,transition:"opacity 2s ease-in-out"},children:s==="measuring"?a("CycleTimer.Measuring.lb","measuring..."):s==="measured"?a("CycleTimer.Determined.lb","determined"):s==="countdown"&&l!==null?a("CycleTimer.OfTime.lb",{time:wt(l)}):""})})})})]})]})},tO=({timerState:e,animationState:t,hasError:r,compact:n,className:a})=>{const{t:o}=Se.useTranslation(),s=P.useTheme(),{currentState:i,remainingTime:l,maxTime:c}=e,{showErrorAnimation:u,showPauseAnimation:d,showPulsatingText:h,pulsatingFinished:p,showIdlePulsating:f,idleDotsCount:m}=t;return n&&i==="idle"?g.jsx(P.Box,{className:a,sx:{display:"flex",alignItems:"center",m:0},children:g.jsx(P.Typography,{variant:"body2",sx:{color:r?s.palette.error.light:s.palette.text.primary,fontSize:"14px",transition:"color 0.5s ease-out"},children:r?o("CycleTimer.Error.lb","Error"):i==="idle"?"0:00":wt(l)})}):g.jsxs(P.Box,{className:a,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[!(i==="idle"&&n)&&g.jsx(P.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:d||u?.6:1,transition:"opacity 0.5s ease-out"},children:g.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)"},role:"img","aria-label":"Timer progress",children:[g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:r?s.palette.error.light:i==="measured"?h||p?s.palette.success.main:s.palette.text.secondary:s.palette.success.main,strokeWidth:"2",opacity:i==="measured"&&p?h?1:.6:.3,style:{transition:"stroke 0.8s ease-in-out, opacity 2s ease-in-out"}}),g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:r?s.palette.error.light:i==="measured"?h||p?s.palette.success.main:s.palette.text.secondary:s.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-(i==="idle"?0:e.currentProgress)/100)}`,style:{opacity:i==="measured"&&p?h?1:.6:1,transition:"stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"}})]})}),g.jsx(P.Typography,{variant:"body2",sx:{color:r?s.palette.error.light:i==="idle"?"rgba(255, 255, 255, 0.7)":i==="measured"?h||p?s.palette.success.main:s.palette.text.secondary:s.palette.text.primary,fontSize:"14px",lineHeight:"normal",letterSpacing:"normal",opacity:i==="idle"?f?1:.6:i==="measured"&&p?h?1:.6:1,transition:"color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"},children:r?o("CycleTimer.Error.lb","Error"):i==="idle"?g.jsxs(g.Fragment,{children:[g.jsx("span",{children:o("CycleTimer.WaitingForCycle.lb","Waiting for program cycle")}),g.jsx("span",{style:{display:"inline-block",width:"18px",textAlign:"left"},children:".".repeat(m)})]}):i==="measuring"?n?`${wt(l)} ${o("CycleTimer.Time.lb",{time:""}).replace(/\s*$/,"")}`:`${wt(l)} / ${o("CycleTimer.Measuring.lb","measuring...")}`:i==="measured"?n?`${wt(l)} ${o("CycleTimer.Time.lb",{time:""}).replace(/\s*$/,"")}`:`${wt(l)} / ${o("CycleTimer.Determined.lb","determined")}`:i==="countdown"&&c!==null?n?`${wt(l)} ${o("CycleTimer.Time.lb",{time:""}).replace(/\s*$/,"")}`:`${wt(l)} / ${o("CycleTimer.Time.lb",{time:wt(c)})}`:wt(l)})]})},rO=()=>{const[e,t]=z.useState({showPauseAnimation:!1,showErrorAnimation:!1,showPulsatingText:!1,pulsatingFinished:!1,showLabels:!0,showMainText:!0,showIdlePulsating:!1,idleDotsCount:0}),r=z.useRef(null),n=z.useRef(null),a=z.useRef(null),o=z.useRef(null),s=z.useRef(0),i=z.useRef(null),l=z.useRef(null),c=z.useCallback(()=>{t(w=>({...w,showPauseAnimation:!0})),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(w=>({...w,showPauseAnimation:!1}))},800)},[]),u=z.useCallback(()=>{t(w=>({...w,showErrorAnimation:!0})),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{t(w=>({...w,showErrorAnimation:!1}))},600)},[]),d=z.useCallback(()=>{t(w=>({...w,showErrorAnimation:!1})),n.current&&clearTimeout(n.current)},[]),h=z.useCallback(w=>{s.current=0,t(O=>({...O,showPulsatingText:!0,pulsatingFinished:!1})),setTimeout(()=>{t(O=>({...O,pulsatingFinished:!0})),a.current=setInterval(()=>{t(O=>({...O,showPulsatingText:!O.showPulsatingText}))},2e3),w&&w()},800)},[]),p=z.useCallback(()=>{a.current&&(clearInterval(a.current),a.current=null),t(w=>({...w,showPulsatingText:!1,pulsatingFinished:!1})),s.current=0},[]),f=z.useCallback(()=>{t(w=>({...w,showIdlePulsating:!0})),i.current=setInterval(()=>{t(w=>({...w,showIdlePulsating:!w.showIdlePulsating}))},2e3),l.current=setInterval(()=>{t(w=>({...w,idleDotsCount:(w.idleDotsCount+1)%4}))},800)},[]),m=z.useCallback(()=>{i.current&&(clearInterval(i.current),i.current=null),l.current&&(clearInterval(l.current),l.current=null),t(w=>({...w,showIdlePulsating:!1,idleDotsCount:0}))},[]),y=z.useCallback(()=>{t(w=>({...w,showLabels:!1,showMainText:!1})),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{t(w=>({...w,showLabels:!0,showMainText:!0}))},200)},[]),S=z.useCallback(()=>{t(w=>({...w,showLabels:!0,showMainText:!0}))},[]),A=z.useCallback(()=>{r.current&&clearTimeout(r.current),n.current&&clearTimeout(n.current),o.current&&clearTimeout(o.current),a.current&&clearInterval(a.current),i.current&&clearInterval(i.current),l.current&&clearInterval(l.current)},[]);return{animationState:e,triggerPauseAnimation:c,triggerErrorAnimation:u,clearErrorAnimation:d,startPulsatingAnimation:h,stopPulsatingAnimation:p,startIdleAnimations:f,stopIdleAnimations:m,triggerFadeTransition:y,setInitialAnimationState:S,cleanup:A}};class Cc{constructor(t=[],r={}){this.currentValues=[],this.targetValues=[],this.previousTargetValues=[],this.targetUpdateTime=0,this.animationId=null,this.updateCount=0,this.velocities=[],this.animate=()=>{this.update(.016666666666666666)?this.animationId=null:this.animationId=requestAnimationFrame(this.animate)},this.options={tension:120,friction:20,threshold:.001,onChange:()=>{},onComplete:()=>{},...r},this.currentValues=[...t],this.targetValues=[...t],this.previousTargetValues=[...t],this.velocities=new Array(t.length).fill(0),this.targetUpdateTime=performance.now(),this.updateCount=0}update(t=1/60){let r=!1,n=!0;this.updateCount++;const a=Math.min(t,1/15),o=this.updateCount===1?.7:1;for(let s=0;s<this.currentValues.length;s++){const i=this.currentValues[s],l=this.targetValues[s],c=this.velocities[s],u=l-i,d=u*this.options.tension*o,h=c*this.options.friction,p=d-h,f=c+p*a,m=i+f*a;Math.abs(u)<this.options.threshold&&Math.abs(f)<this.options.threshold*10?this.currentValues[s]!==l&&(this.currentValues[s]=l,this.velocities[s]=0,r=!0):(n=!1,this.currentValues[s]=m,this.velocities[s]=f,r=!0)}return r&&this.options.onChange(this.currentValues),n&&this.options.onComplete(this.currentValues),n}setTarget(t){const r=performance.now(),n=r-this.targetUpdateTime;this.previousTargetValues=[...this.targetValues],this.targetValues=[...t],this.targetUpdateTime=r,this.updateCount=0;const a=this.previousTargetValues.every((o,s)=>o===this.currentValues[s]);if(n<8&&n>0&&this.previousTargetValues.length>0&&!a){const o=Math.min(n/8,1);for(let s=0;s<this.targetValues.length;s++){const i=this.previousTargetValues[s]||0,l=t[s]||0;Math.abs(l-i)>.1&&(this.targetValues[s]=i+(l-i)*o)}}for(;this.currentValues.length<t.length;)this.currentValues.push(t[this.currentValues.length]),this.velocities.push(0);this.currentValues.length>t.length&&(this.currentValues=this.currentValues.slice(0,t.length),this.velocities=this.velocities.slice(0,t.length))}getCurrentValues(){return[...this.currentValues]}getValue(t){return this.currentValues[t]??0}isInterpolating(){return this.animationId!==null}stop(){this.animationId!==null&&(cancelAnimationFrame(this.animationId),this.animationId=null)}setImmediate(t){this.stop(),this.currentValues=[...t],this.targetValues=[...t],this.previousTargetValues=[...t],this.velocities=new Array(t.length).fill(0),this.targetUpdateTime=performance.now(),this.updateCount=0,this.options.onChange(this.currentValues)}updateOptions(t){this.options={...this.options,...t}}startAutoInterpolation(){this.startInterpolation()}destroy(){this.stop()}startInterpolation(){this.animationId===null&&this.animate()}}function Oc(e=[],t={}){const r=z.useRef(null);return r.current||(r.current=new Cc(e,t)),z.useEffect(()=>{var n;(n=r.current)==null||n.updateOptions(t)},[t]),z.useEffect(()=>()=>{var n;(n=r.current)==null||n.destroy()},[]),[r.current]}const nO=({autoStart:e,onCycleEnd:t,onMeasuringComplete:r,hasError:n,onPauseAnimation:a,onErrorAnimation:o,onClearErrorAnimation:s,onStartPulsating:i})=>{const[l,c]=z.useState({currentState:"idle",remainingTime:0,maxTime:null,isRunning:!1,isPausedState:!1,currentProgress:0,wasRunningBeforeError:!1}),u=z.useRef(null),d=z.useRef(null),h=z.useRef(0),[p]=Oc([0],{tension:80,friction:18,onChange:([T])=>{c(C=>({...C,currentProgress:T}))}}),f=z.useCallback(()=>{c(T=>({...T,currentState:"idle",maxTime:null,isRunning:!1,isPausedState:!1,currentProgress:0})),h.current=0,d.current=null,p.setImmediate([0])},[p]),m=z.useCallback((T=0)=>{const C=T/60%1*100;c(R=>({...R,currentState:"measuring",maxTime:null,remainingTime:T,isPausedState:!1,currentProgress:C})),h.current=0,p.setImmediate([C]),e?(d.current=Date.now()-T*1e3,c(R=>({...R,isRunning:!0}))):d.current=null},[e,p]),y=z.useCallback((T,C=0)=>{c(V=>({...V,isRunning:!1})),d.current=null,c(V=>({...V,currentState:"countdown",maxTime:T,isPausedState:!1})),h.current=0;const R=Math.max(0,T-C),I=C>0?C/T*100:0;c(V=>({...V,remainingTime:R,currentProgress:I})),p.setImmediate([I]),R===0?(c(V=>({...V,isRunning:!1})),d.current=null,t&&queueMicrotask(()=>t())):e?setTimeout(()=>{d.current=Date.now()-C*1e3,c(V=>({...V,isRunning:!0}))},0):d.current=null},[e,t,p]),S=z.useCallback(()=>{l.currentState==="measuring"&&(c(T=>({...T,isRunning:!1,currentState:"measured"})),d.current=null,i(()=>{r&&r()}))},[l.currentState,i,r]),A=z.useCallback(()=>{if(d.current&&l.isRunning){const C=Date.now()-d.current;h.current+=C;const R=h.current/1e3,I=ZC(l.currentState,R,l.maxTime);p.setTarget([I])}c(T=>({...T,isRunning:!1,isPausedState:!0})),a()},[l.isRunning,l.currentState,l.maxTime,p,a]),w=z.useCallback(()=>{l.isPausedState&&(l.remainingTime>0||l.currentState!=="countdown")&&(d.current=Date.now(),c(T=>({...T,isRunning:!0,isPausedState:!1})))},[l.isPausedState,l.remainingTime,l.currentState]),O=z.useCallback(()=>l.isPausedState,[l.isPausedState]);return z.useEffect(()=>{n?(l.isRunning&&!l.isPausedState&&(c(T=>({...T,wasRunningBeforeError:!0})),A()),o()):(l.wasRunningBeforeError&&l.isPausedState&&(c(T=>({...T,wasRunningBeforeError:!1})),w()),s())},[n,l.isRunning,l.isPausedState,l.wasRunningBeforeError,A,w,o,s]),z.useEffect(()=>{if(l.isRunning){const T=()=>{if(d.current){const R=(Date.now()-d.current+h.current)/1e3;if(l.currentState==="countdown"&&l.maxTime!==null){const I=Math.max(0,l.maxTime-R);c(b=>({...b,remainingTime:Math.ceil(I)}));const V=Math.min(100,R/l.maxTime*100);if(p.setTarget([V]),I<=0){c(b=>({...b,isRunning:!1,remainingTime:0})),d.current=null,p.setTarget([100]),t&&queueMicrotask(()=>t());return}}else if(l.currentState==="measuring"){c(V=>({...V,remainingTime:Math.floor(R)}));const I=R/60%1*100;p.setTarget([I])}l.isRunning&&(u.current=requestAnimationFrame(T))}};u.current=requestAnimationFrame(T)}else u.current&&(cancelAnimationFrame(u.current),u.current=null);return()=>{u.current&&cancelAnimationFrame(u.current)}},[l.isRunning,t,l.currentState,l.maxTime,p]),z.useEffect(()=>{let T=null;const C=()=>{p.update(1/60),T=requestAnimationFrame(C)};return T=requestAnimationFrame(C),()=>{T&&cancelAnimationFrame(T)}},[p]),{timerState:l,controls:{startNewCycle:y,startMeasuring:m,setIdle:f,completeMeasuring:S,pause:A,resume:w,isPaused:O}}},aO=qe(ge.observer(({onCycleComplete:e,onCycleEnd:t,onMeasuringComplete:r,autoStart:n=!0,variant:a="default",compact:o=!1,className:s,hasError:i=!1})=>{const l=z.useRef(void 0),{animationState:c,triggerPauseAnimation:u,triggerErrorAnimation:d,clearErrorAnimation:h,startPulsatingAnimation:p,stopPulsatingAnimation:f,startIdleAnimations:m,stopIdleAnimations:y,triggerFadeTransition:S,setInitialAnimationState:A,cleanup:w}=rO(),{timerState:O,controls:T}=nO({autoStart:n,onCycleEnd:t,onMeasuringComplete:r,hasError:i,onPauseAnimation:u,onErrorAnimation:d,onClearErrorAnimation:h,onStartPulsating:p});return z.useEffect(()=>{const C=l.current;l.current!==void 0&&C!==O.currentState?(C==="measured"&&f(),C==="idle"&&y(),S()):A(),O.currentState==="idle"&&m(),l.current=O.currentState},[O.currentState,f,y,m,S,A]),z.useEffect(()=>{let C=!0;const R=setTimeout(()=>{C&&e(T)},0);return()=>{C=!1,clearTimeout(R)}},[e,T]),z.useEffect(()=>w,[w]),a==="small"?g.jsx(tO,{timerState:O,animationState:c,hasError:i,compact:o,className:s}):g.jsx(eO,{timerState:O,animationState:c,hasError:i,className:s})})),ol=e=>{const t=Math.floor(e/60),r=e%60;return`${t}:${r.toString().padStart(2,"0")}`},oO=({timerState:e,animationState:t,hasError:r,className:n})=>{const{t:a}=Se.useTranslation(),o=up(),{elapsedTime:s,currentProgress:i}=e,{showErrorAnimation:l,showPauseAnimation:c,showMainText:u}=t;return g.jsxs(P.Box,{className:n,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx(Sg.Gauge,{width:264,height:264,value:i,valueMin:0,valueMax:100,innerRadius:"85%",outerRadius:"100%",margin:0,skipAnimation:!0,text:()=>"",sx:{opacity:c||l?.6:1,transition:"opacity 0.5s ease-out","& .MuiGauge-valueArc":{fill:r?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.jsx(P.Box,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:225,height:225,borderRadius:"50%",backgroundColor:"#292B3F",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1,transition:"background-color 0.5s ease-out"},children:g.jsxs(P.Box,{sx:{position:"relative",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:[g.jsx(P.Fade,{in:u&&r,timeout:200,children:g.jsx(P.Typography,{variant:"h6",sx:{position:"absolute",fontSize:"16px",fontWeight:500,color:o.palette.error.light},children:a("timer.error")})}),g.jsx(P.Fade,{in:u&&!r,timeout:300,children:g.jsx(P.Typography,{variant:"h1",sx:{position:"absolute",fontSize:"48px",fontWeight:500,color:o.palette.text.primary,lineHeight:1,letterSpacing:"-0.5px"},children:ol(s)})})]})})]})},sO=({timerState:e,animationState:t,hasError:r,compact:n,className:a})=>{const{t:o}=Se.useTranslation(),s=up(),{elapsedTime:i,currentProgress:l}=e,{showErrorAnimation:c,showPauseAnimation:u}=t;return n?g.jsx(P.Box,{className:a,sx:{display:"flex",alignItems:"center",m:0},children:g.jsx(P.Typography,{variant:"body2",sx:{color:r?s.palette.error.light:s.palette.text.primary,fontSize:"14px",transition:"color 0.5s ease-out"},children:r?o("timer.error"):ol(i)})}):g.jsxs(P.Box,{className:a,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[g.jsx(P.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:u||c?.6:1,transition:"opacity 0.5s ease-out"},children:g.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)"},role:"img","aria-label":"Timer progress",children:[g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:r?s.palette.error.light:s.palette.success.main,strokeWidth:"2",opacity:.3,style:{transition:"stroke 0.8s ease-in-out, opacity 2s ease-in-out"}}),g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:r?s.palette.error.light:s.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.jsx(P.Typography,{variant:"body2",sx:{color:r?s.palette.error.light:s.palette.text.primary,fontSize:"14px",lineHeight:"normal",letterSpacing:"normal",transition:"color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"},children:r?o("timer.error"):ol(i)})]})},iO=()=>{const[e,t]=z.useState({showPauseAnimation:!1,showErrorAnimation:!1,showMainText:!0}),r=z.useRef(null),n=z.useRef(null),a=z.useRef(null),o=z.useCallback(()=>{t(d=>({...d,showPauseAnimation:!0})),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(d=>({...d,showPauseAnimation:!1}))},800)},[]),s=z.useCallback(()=>{t(d=>({...d,showErrorAnimation:!0})),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{t(d=>({...d,showErrorAnimation:!1}))},600)},[]),i=z.useCallback(()=>{t(d=>({...d,showErrorAnimation:!1})),n.current&&clearTimeout(n.current)},[]),l=z.useCallback(()=>{t(d=>({...d,showMainText:!1})),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{t(d=>({...d,showMainText:!0}))},200)},[]),c=z.useCallback(()=>{t(d=>({...d,showMainText:!0}))},[]),u=z.useCallback(()=>{r.current&&clearTimeout(r.current),n.current&&clearTimeout(n.current),a.current&&clearTimeout(a.current)},[]);return{animationState:e,triggerPauseAnimation:o,triggerErrorAnimation:s,clearErrorAnimation:i,triggerFadeTransition:l,setInitialAnimationState:c,cleanup:u}},lO=({autoStart:e,hasError:t,onPauseAnimation:r,onErrorAnimation:n,onClearErrorAnimation:a})=>{const[o,s]=z.useState({elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0,wasRunningBeforeError:!1}),i=z.useRef(null),l=z.useRef(null),c=z.useRef(0),u=z.useRef(0),[d]=Oc([0],{tension:80,friction:18,onChange:([S])=>{s(A=>({...A,currentProgress:S}))}}),h=z.useCallback((S=0)=>{const A=S/60%1*100;s(w=>({...w,elapsedTime:S,isPausedState:!1,currentProgress:A})),c.current=0,u.current=A,d.setImmediate([A]),e?(l.current=Date.now()-S*1e3,s(w=>({...w,isRunning:!0}))):l.current=null},[e,d]),p=z.useCallback(()=>{if(l.current&&o.isRunning){const A=(Date.now()-l.current)/1e3+c.current,w=A/60%1*100;d.setTarget([w]),s(O=>({...O,elapsedTime:Math.floor(A)}))}s(S=>({...S,isRunning:!1,isPausedState:!0})),r()},[o.isRunning,d,r]),f=z.useCallback(()=>{o.isPausedState&&(c.current=o.elapsedTime,l.current=Date.now(),s(S=>({...S,isRunning:!0,isPausedState:!1})))},[o.isPausedState,o.elapsedTime]),m=z.useCallback(()=>{s(S=>({...S,elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0})),c.current=0,l.current=null,u.current=0,d.setImmediate([0])},[d]),y=z.useCallback(()=>o.isPausedState,[o.isPausedState]);return z.useEffect(()=>{t?(o.isRunning&&(s(S=>({...S,wasRunningBeforeError:!0})),p()),n()):(o.wasRunningBeforeError&&!o.isRunning&&(s(S=>({...S,wasRunningBeforeError:!1})),f()),a())},[t,o.isRunning,o.wasRunningBeforeError,p,f,n,a]),z.useEffect(()=>{if(o.isRunning){const S=()=>{if(l.current){const w=(Date.now()-l.current)/1e3+c.current,O=w/60%1*100;s(C=>({...C,elapsedTime:Math.floor(w)})),Math.abs(O-u.current)>.1&&(d.setTarget([O]),u.current=O)}i.current=requestAnimationFrame(S)};i.current=requestAnimationFrame(S)}else i.current&&(cancelAnimationFrame(i.current),i.current=null);return()=>{i.current&&(cancelAnimationFrame(i.current),i.current=null)}},[o.isRunning,d]),z.useEffect(()=>{let S=null;const A=()=>{d.update(),S=requestAnimationFrame(A)};return S=requestAnimationFrame(A),()=>{S&&cancelAnimationFrame(S)}},[d]),{timerState:o,controls:{start:h,pause:p,resume:f,reset:m,isPaused:y}}},cO=qe(ge.observer(({onTimerReady:e,autoStart:t=!0,variant:r="default",compact:n=!1,className:a,hasError:o=!1})=>{const{animationState:s,triggerPauseAnimation:i,triggerErrorAnimation:l,clearErrorAnimation:c,setInitialAnimationState:u,cleanup:d}=iO(),{timerState:h,controls:p}=lO({autoStart:t,hasError:o,onPauseAnimation:i,onErrorAnimation:l,onClearErrorAnimation:c});return z.useEffect(()=>{u()},[u]),z.useEffect(()=>{let f=!0;const m=setTimeout(()=>{f&&e(p)},0);return()=>{f=!1,clearTimeout(m)}},[e,p]),z.useEffect(()=>d,[d]),r==="small"?g.jsx(sO,{timerState:h,animationState:s,hasError:o,compact:n,className:a}):g.jsx(oO,{timerState:h,animationState:s,hasError:o,className:a})})),Lr=Cy;process.env.NODE_ENV!=="production"&&(x.node,x.object.isRequired);function Tc(e){return wy(e)}function uO(e){return On("MuiSvgIcon",e)}jl("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const dO=e=>{const{color:t,fontSize:r,classes:n}=e,a={root:["root",t!=="inherit"&&`color${et(t)}`,`fontSize${et(r)}`]};return ts(a,uO,n)},hO=pt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${et(r.color)}`],t[`fontSize${et(r.fontSize)}`]]}})(Lr(({theme:e})=>{var t,r,n,a,o,s,i,l,c,u,d,h,p,f;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(a=(t=e.transitions)==null?void 0:t.create)==null?void 0:a.call(t,"fill",{duration:(n=(r=(e.vars??e).transitions)==null?void 0:r.duration)==null?void 0:n.shorter}),variants:[{props:m=>!m.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(o=e.typography)==null?void 0:o.pxToRem)==null?void 0:s.call(o,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:l.call(i,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,m])=>m&&m.main).map(([m])=>{var y,S;return{props:{color:m},style:{color:(S=(y=(e.vars??e).palette)==null?void 0:y[m])==null?void 0:S.main}}}),{props:{color:"action"},style:{color:(h=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:h.active}},{props:{color:"disabled"},style:{color:(f=(p=(e.vars??e).palette)==null?void 0:p.action)==null?void 0:f.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Jo=N.forwardRef(function(t,r){const n=Tc({props:t,name:"MuiSvgIcon"}),{children:a,className:o,color:s="inherit",component:i="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:h="0 0 24 24",...p}=n,f=N.isValidElement(a)&&a.type==="svg",m={...n,color:s,component:i,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:f},y={};u||(y.viewBox=h);const S=dO(m);return g.jsxs(hO,{as:i,className:Pt(S.root,o),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r,...y,...p,...f&&a.props,ownerState:m,children:[f?a.props.children:a,d?g.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(Jo.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});Jo.muiName="SvgIcon";function gr(e,t){function r(n,a){return g.jsx(Jo,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:a,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=Jo.muiName,N.memo(N.forwardRef(r))}function pO(e){const{controlled:t,default:r,name:n,state:a="value"}=e,{current:o}=N.useRef(t!==void 0),[s,i]=N.useState(r),l=o?t:s;if(process.env.NODE_ENV!=="production"){N.useEffect(()=>{o!==(t!==void 0)&&console.error([`MUI: A component is changing the ${o?"":"un"}controlled ${a} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
125
+ `),text:a}),[u,a,d]);let p;switch(c){case"hanging":case"text-before-edge":p=0;break;case"central":p=(h.length-1)/2*-h[0].height;break;default:p=(h.length-1)*-h[0].height;break}return g.jsx("text",K({},o,{transform:i?`rotate(${i}, ${t}, ${r})`:void 0,x:t,y:r,textAnchor:l,dominantBaseline:c,style:u,children:h.map((f,m)=>g.jsx("tspan",{x:t,dy:`${m===0?p:h[0].height}px`,dominantBaseline:c,children:f.text},m))}))}process.env.NODE_ENV!=="production"&&(_m.propTypes={lineHeight:x.number,needsComputation:x.bool,ownerState:x.any,style:x.object,text:x.string.isRequired});const YC=["text","className"];function KC({value:e}){return e===null?null:e.toLocaleString()}function Em(e){const{text:t=KC,className:r}=e,n=ur(e,YC),{value:a,valueMin:o,valueMax:s,cx:i,cy:l}=vc(),c=typeof t=="function"?t({value:a,valueMin:o,valueMax:s}):t;return c===null?null:g.jsx("g",{className:r,children:g.jsx(_m,K({x:i,y:l,text:c,style:{textAnchor:"middle",dominantBaseline:"central"}},n))})}process.env.NODE_ENV!=="production"&&(Em.propTypes={lineHeight:x.number,needsComputation:x.bool,ownerState:x.any,style:x.object,text:x.oneOfType([x.func,x.string])});const QC=["text","children","classes","className","skipAnimation"],XC=e=>{const{classes:t}=e;return ts({root:["root"],valueArc:["valueArc"],referenceArc:["referenceArc"],valueText:["valueText"]},DC,t)},wc=N.forwardRef(function(t,r){const{text:n,children:a,className:o,skipAnimation:s}=t,i=ur(t,QC),l=XC(t);return g.jsxs(Sc,K({},i,{className:Pt(l.root,o),ref:r,children:[g.jsx(UC,{className:l.referenceArc}),g.jsx(Tm,{className:l.valueArc,skipAnimation:s}),g.jsx(Em,{className:l.valueText,text:n}),a]}))});process.env.NODE_ENV!=="production"&&(wc.displayName="Gauge");process.env.NODE_ENV!=="production"&&(wc.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 wt=e=>{const t=Math.floor(e/60),r=e%60;return`${t}:${r.toString().padStart(2,"0")}`},ZC=(e,t,r)=>e==="countdown"&&r!==null?Math.min(100,t/r*100):e==="measuring"?t/60%1*100:0,eO=({timerState:e,animationState:t,hasError:r,className:n})=>{const{t:a}=Se.useTranslation(),o=P.useTheme(),{currentState:s,remainingTime:i,maxTime:l,currentProgress:c}=e,{showErrorAnimation:u,showPauseAnimation:d,showPulsatingText:h,pulsatingFinished:p,showLabels:f,showMainText:m,showIdlePulsating:y,idleDotsCount:S}=t;return g.jsxs(P.Box,{className:n,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx(wc,{width:264,height:264,value:s==="idle"?0:c,valueMin:0,valueMax:100,innerRadius:"85%",outerRadius:"100%",margin:0,skipAnimation:!0,text:()=>"",sx:{opacity:d||u?.6:1,transition:"opacity 0.5s ease-out","& .MuiGauge-valueArc":{fill:r?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.jsxs(P.Box,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:225,height:225,borderRadius:"50%",backgroundColor:"#292B3F",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1,transition:"background-color 0.5s ease-out"},children:[g.jsx(P.Box,{sx:{height:"16px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:1},children:g.jsx(P.Fade,{in:f&&!r&&s!=="idle"&&s!=="success",timeout:300,children:g.jsx(P.Typography,{variant:"body2",sx:{fontSize:"12px",color:s==="measured"&&(h||p)?o.palette.success.main:o.palette.text.secondary,transition:"color 0.8s ease-in-out"},children:g.jsx("span",{style:{opacity:s==="measured"&&p?h?1:.6:1,transition:"opacity 2s ease-in-out"},children:s==="measuring"||s==="measured"?a("CycleTimer.CycleTime.lb","Cycle Time"):s==="countdown"?a("CycleTimer.RemainingTime.lb","Remaining Time"):""})})})}),g.jsxs(P.Box,{sx:{position:"relative",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:[g.jsx(P.Fade,{in:m&&s==="idle"&&!r,timeout:200,children:g.jsxs(P.Typography,{variant:"body2",sx:{position:"absolute",fontSize:"12px",fontWeight:400,color:"rgba(255, 255, 255, 0.7)",lineHeight:"166%",letterSpacing:"0.17px",textAlign:"center",width:"200px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx("span",{style:{opacity:y?1:.6,transition:"opacity 2s ease-in-out"},children:a("CycleTimer.WaitingForCycle.lb","Waiting for program cycle")}),g.jsx("span",{style:{display:"inline-block",width:"18px",textAlign:"left",opacity:y?1:.6,transition:"opacity 2s ease-in-out"},children:".".repeat(S)})]})}),g.jsx(P.Fade,{in:m&&r,timeout:200,children:g.jsx(P.Typography,{variant:"h3",sx:{position:"absolute",fontSize:"40px",fontWeight:400,color:"#FFFFFF",lineHeight:"116.7%"},children:a("CycleTimer.Error.lb","Error")})}),g.jsx(P.Fade,{in:m&&!r&&s!=="idle"&&s!=="success",timeout:300,children:g.jsx(P.Typography,{variant:"h1",sx:{position:"absolute",fontSize:"48px",fontWeight:500,color:o.palette.text.primary,lineHeight:1,transition:"color 0.8s ease-in-out"},children:g.jsx("span",{style:{opacity:1,transition:"opacity 2s ease-in-out"},children:wt(i)})})})]}),g.jsx(P.Box,{sx:{height:"16px",display:"flex",marginTop:.5,alignItems:"center",justifyContent:"center"},children:g.jsx(P.Fade,{in:f&&!r&&s!=="idle"&&s!=="success",timeout:300,children:g.jsx(P.Typography,{variant:"body2",sx:{fontSize:"12px",color:s==="measured"&&(h||p)?o.palette.success.main:o.palette.text.secondary,transition:"color 0.8s ease-in-out"},children:g.jsx("span",{style:{opacity:s==="measured"&&p?h?1:.6:1,transition:"opacity 2s ease-in-out"},children:s==="measuring"?a("CycleTimer.Measuring.lb","measuring..."):s==="measured"?a("CycleTimer.Determined.lb","determined"):s==="countdown"&&l!==null?a("CycleTimer.OfTime.lb",{time:wt(l)}):""})})})})]})]})},tO=({timerState:e,animationState:t,hasError:r,compact:n,className:a})=>{const{t:o}=Se.useTranslation(),s=P.useTheme(),{currentState:i,remainingTime:l,maxTime:c}=e,{showErrorAnimation:u,showPauseAnimation:d,showPulsatingText:h,pulsatingFinished:p,showIdlePulsating:f,idleDotsCount:m}=t;return n&&i==="idle"?g.jsx(P.Box,{className:a,sx:{display:"flex",alignItems:"center",m:0},children:g.jsx(P.Typography,{variant:"body2",sx:{color:r?s.palette.error.light:s.palette.text.primary,fontSize:"14px",transition:"color 0.5s ease-out"},children:r?o("CycleTimer.Error.lb","Error"):i==="idle"?"0:00":wt(l)})}):g.jsxs(P.Box,{className:a,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[!(i==="idle"&&n)&&g.jsx(P.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:d||u?.6:1,transition:"opacity 0.5s ease-out"},children:g.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)"},role:"img","aria-label":"Timer progress",children:[g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:r?s.palette.error.light:i==="measured"?h||p?s.palette.success.main:s.palette.text.secondary:s.palette.success.main,strokeWidth:"2",opacity:i==="measured"&&p?h?1:.6:.3,style:{transition:"stroke 0.8s ease-in-out, opacity 2s ease-in-out"}}),g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:r?s.palette.error.light:i==="measured"?h||p?s.palette.success.main:s.palette.text.secondary:s.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-(i==="idle"?0:e.currentProgress)/100)}`,style:{opacity:i==="measured"&&p?h?1:.6:1,transition:"stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"}})]})}),g.jsx(P.Typography,{variant:"body2",sx:{color:r?s.palette.error.light:i==="idle"?"rgba(255, 255, 255, 0.7)":i==="measured"?h||p?s.palette.success.main:s.palette.text.secondary:s.palette.text.primary,fontSize:"14px",lineHeight:"normal",letterSpacing:"normal",opacity:i==="idle"?f?1:.6:i==="measured"&&p?h?1:.6:1,transition:"color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"},children:r?o("CycleTimer.Error.lb","Error"):i==="idle"?g.jsxs(g.Fragment,{children:[g.jsx("span",{children:o("CycleTimer.WaitingForCycle.lb","Waiting for program cycle")}),g.jsx("span",{style:{display:"inline-block",width:"18px",textAlign:"left"},children:".".repeat(m)})]}):i==="measuring"?n?`${wt(l)} ${o("CycleTimer.Time.lb",{time:""}).replace(/\s*$/,"")}`:`${wt(l)} / ${o("CycleTimer.Measuring.lb","measuring...")}`:i==="measured"?n?`${wt(l)} ${o("CycleTimer.Time.lb",{time:""}).replace(/\s*$/,"")}`:`${wt(l)} / ${o("CycleTimer.Determined.lb","determined")}`:i==="countdown"&&c!==null?n?`${wt(l)} ${o("CycleTimer.Time.lb",{time:""}).replace(/\s*$/,"")}`:`${wt(l)} / ${o("CycleTimer.Time.lb",{time:wt(c)})}`:wt(l)})]})},rO=()=>{const[e,t]=z.useState({showPauseAnimation:!1,showErrorAnimation:!1,showPulsatingText:!1,pulsatingFinished:!1,showLabels:!0,showMainText:!0,showIdlePulsating:!1,idleDotsCount:0}),r=z.useRef(null),n=z.useRef(null),a=z.useRef(null),o=z.useRef(null),s=z.useRef(0),i=z.useRef(null),l=z.useRef(null),c=z.useCallback(()=>{t(w=>({...w,showPauseAnimation:!0})),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(w=>({...w,showPauseAnimation:!1}))},800)},[]),u=z.useCallback(()=>{t(w=>({...w,showErrorAnimation:!0})),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{t(w=>({...w,showErrorAnimation:!1}))},600)},[]),d=z.useCallback(()=>{t(w=>({...w,showErrorAnimation:!1})),n.current&&clearTimeout(n.current)},[]),h=z.useCallback(w=>{s.current=0,t(O=>({...O,showPulsatingText:!0,pulsatingFinished:!1})),setTimeout(()=>{t(O=>({...O,pulsatingFinished:!0})),a.current=setInterval(()=>{t(O=>({...O,showPulsatingText:!O.showPulsatingText}))},2e3),w&&w()},800)},[]),p=z.useCallback(()=>{a.current&&(clearInterval(a.current),a.current=null),t(w=>({...w,showPulsatingText:!1,pulsatingFinished:!1})),s.current=0},[]),f=z.useCallback(()=>{t(w=>({...w,showIdlePulsating:!0})),i.current=setInterval(()=>{t(w=>({...w,showIdlePulsating:!w.showIdlePulsating}))},2e3),l.current=setInterval(()=>{t(w=>({...w,idleDotsCount:(w.idleDotsCount+1)%4}))},800)},[]),m=z.useCallback(()=>{i.current&&(clearInterval(i.current),i.current=null),l.current&&(clearInterval(l.current),l.current=null),t(w=>({...w,showIdlePulsating:!1,idleDotsCount:0}))},[]),y=z.useCallback(()=>{t(w=>({...w,showLabels:!1,showMainText:!1})),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{t(w=>({...w,showLabels:!0,showMainText:!0}))},200)},[]),S=z.useCallback(()=>{t(w=>({...w,showLabels:!0,showMainText:!0}))},[]),A=z.useCallback(()=>{r.current&&clearTimeout(r.current),n.current&&clearTimeout(n.current),o.current&&clearTimeout(o.current),a.current&&clearInterval(a.current),i.current&&clearInterval(i.current),l.current&&clearInterval(l.current)},[]);return{animationState:e,triggerPauseAnimation:c,triggerErrorAnimation:u,clearErrorAnimation:d,startPulsatingAnimation:h,stopPulsatingAnimation:p,startIdleAnimations:f,stopIdleAnimations:m,triggerFadeTransition:y,setInitialAnimationState:S,cleanup:A}};class Cc{constructor(t=[],r={}){this.currentValues=[],this.targetValues=[],this.previousTargetValues=[],this.targetUpdateTime=0,this.animationId=null,this.updateCount=0,this.velocities=[],this.animate=()=>{this.update(.016666666666666666)?this.animationId=null:this.animationId=requestAnimationFrame(this.animate)},this.options={tension:120,friction:20,threshold:.001,onChange:()=>{},onComplete:()=>{},...r},this.currentValues=[...t],this.targetValues=[...t],this.previousTargetValues=[...t],this.velocities=new Array(t.length).fill(0),this.targetUpdateTime=performance.now(),this.updateCount=0}update(t=1/60){let r=!1,n=!0;this.updateCount++;const a=Math.min(t,1/15),o=this.updateCount===1?.7:1;for(let s=0;s<this.currentValues.length;s++){const i=this.currentValues[s],l=this.targetValues[s],c=this.velocities[s],u=l-i,d=u*this.options.tension*o,h=c*this.options.friction,p=d-h,f=c+p*a,m=i+f*a;Math.abs(u)<this.options.threshold&&Math.abs(f)<this.options.threshold*10?this.currentValues[s]!==l&&(this.currentValues[s]=l,this.velocities[s]=0,r=!0):(n=!1,this.currentValues[s]=m,this.velocities[s]=f,r=!0)}return r&&this.options.onChange(this.currentValues),n&&this.options.onComplete(this.currentValues),n}setTarget(t){const r=performance.now(),n=r-this.targetUpdateTime;this.previousTargetValues=[...this.targetValues],this.targetValues=[...t],this.targetUpdateTime=r,this.updateCount=0;const a=this.previousTargetValues.every((o,s)=>o===this.currentValues[s]);if(n<8&&n>0&&this.previousTargetValues.length>0&&!a){const o=Math.min(n/8,1);for(let s=0;s<this.targetValues.length;s++){const i=this.previousTargetValues[s]||0,l=t[s]||0;Math.abs(l-i)>.1&&(this.targetValues[s]=i+(l-i)*o)}}for(;this.currentValues.length<t.length;)this.currentValues.push(t[this.currentValues.length]),this.velocities.push(0);this.currentValues.length>t.length&&(this.currentValues=this.currentValues.slice(0,t.length),this.velocities=this.velocities.slice(0,t.length))}getCurrentValues(){return[...this.currentValues]}getValue(t){return this.currentValues[t]??0}isInterpolating(){return this.animationId!==null}stop(){this.animationId!==null&&(cancelAnimationFrame(this.animationId),this.animationId=null)}setImmediate(t){this.stop(),this.currentValues=[...t],this.targetValues=[...t],this.previousTargetValues=[...t],this.velocities=new Array(t.length).fill(0),this.targetUpdateTime=performance.now(),this.updateCount=0,this.options.onChange(this.currentValues)}updateOptions(t){this.options={...this.options,...t}}startAutoInterpolation(){this.startInterpolation()}destroy(){this.stop()}startInterpolation(){this.animationId===null&&this.animate()}}function Oc(e=[],t={}){const r=z.useRef(null);return r.current||(r.current=new Cc(e,t)),z.useEffect(()=>{var n;(n=r.current)==null||n.updateOptions(t)},[t]),z.useEffect(()=>()=>{var n;(n=r.current)==null||n.destroy()},[]),[r.current]}const nO=({autoStart:e,onCycleEnd:t,onMeasuringComplete:r,hasError:n,onPauseAnimation:a,onErrorAnimation:o,onClearErrorAnimation:s,onStartPulsating:i})=>{const[l,c]=z.useState({currentState:"idle",remainingTime:0,maxTime:null,isRunning:!1,isPausedState:!1,currentProgress:0,wasRunningBeforeError:!1}),u=z.useRef(null),d=z.useRef(null),h=z.useRef(0),[p]=Oc([0],{tension:80,friction:18,onChange:([T])=>{c(C=>({...C,currentProgress:T}))}}),f=z.useCallback(()=>{c(T=>({...T,currentState:"idle",maxTime:null,isRunning:!1,isPausedState:!1,currentProgress:0})),h.current=0,d.current=null,p.setImmediate([0])},[p]),m=z.useCallback((T=0)=>{const C=T/60%1*100;c(R=>({...R,currentState:"measuring",maxTime:null,remainingTime:T,isPausedState:!1,currentProgress:C})),h.current=0,p.setImmediate([C]),e?(d.current=Date.now()-T*1e3,c(R=>({...R,isRunning:!0}))):d.current=null},[e,p]),y=z.useCallback((T,C=0)=>{c(V=>({...V,isRunning:!1})),d.current=null,c(V=>({...V,currentState:"countdown",maxTime:T,isPausedState:!1})),h.current=0;const R=Math.max(0,T-C),I=C>0?C/T*100:0;c(V=>({...V,remainingTime:R,currentProgress:I})),p.setImmediate([I]),R===0?(c(V=>({...V,isRunning:!1})),d.current=null,t&&queueMicrotask(()=>t())):e?setTimeout(()=>{d.current=Date.now()-C*1e3,c(V=>({...V,isRunning:!0}))},0):d.current=null},[e,t,p]),S=z.useCallback(()=>{c(T=>({...T,isRunning:!1,currentState:"measured"})),d.current=null,i(()=>{r&&r()})},[i,r]),A=z.useCallback(()=>{if(d.current&&l.isRunning){const C=Date.now()-d.current;h.current+=C;const R=h.current/1e3,I=ZC(l.currentState,R,l.maxTime);p.setTarget([I])}c(T=>({...T,isRunning:!1,isPausedState:!0})),a()},[l.isRunning,l.currentState,l.maxTime,p,a]),w=z.useCallback(()=>{l.isPausedState&&(l.remainingTime>0||l.currentState!=="countdown")&&(d.current=Date.now(),c(T=>({...T,isRunning:!0,isPausedState:!1})))},[l.isPausedState,l.remainingTime,l.currentState]),O=z.useCallback(()=>l.isPausedState,[l.isPausedState]);return z.useEffect(()=>{n?(l.isRunning&&!l.isPausedState&&(c(T=>({...T,wasRunningBeforeError:!0})),A()),o()):(l.wasRunningBeforeError&&l.isPausedState&&(c(T=>({...T,wasRunningBeforeError:!1})),w()),s())},[n,l.isRunning,l.isPausedState,l.wasRunningBeforeError,A,w,o,s]),z.useEffect(()=>{if(l.isRunning){const T=()=>{if(d.current){const R=(Date.now()-d.current+h.current)/1e3;if(l.currentState==="countdown"&&l.maxTime!==null){const I=Math.max(0,l.maxTime-R);c(b=>({...b,remainingTime:Math.ceil(I)}));const V=Math.min(100,R/l.maxTime*100);if(p.setTarget([V]),I<=0){c(b=>({...b,isRunning:!1,remainingTime:0})),d.current=null,p.setTarget([100]),t&&queueMicrotask(()=>t());return}}else if(l.currentState==="measuring"){c(V=>({...V,remainingTime:Math.floor(R)}));const I=R/60%1*100;p.setTarget([I])}l.isRunning&&(u.current=requestAnimationFrame(T))}};u.current=requestAnimationFrame(T)}else u.current&&(cancelAnimationFrame(u.current),u.current=null);return()=>{u.current&&cancelAnimationFrame(u.current)}},[l.isRunning,t,l.currentState,l.maxTime,p]),z.useEffect(()=>{let T=null;const C=()=>{p.update(1/60),T=requestAnimationFrame(C)};return T=requestAnimationFrame(C),()=>{T&&cancelAnimationFrame(T)}},[p]),{timerState:l,controls:{startNewCycle:y,startMeasuring:m,setIdle:f,completeMeasuring:S,pause:A,resume:w,isPaused:O}}},aO=qe(ge.observer(({onCycleComplete:e,onCycleEnd:t,onMeasuringComplete:r,autoStart:n=!0,variant:a="default",compact:o=!1,className:s,hasError:i=!1})=>{const l=z.useRef(void 0),{animationState:c,triggerPauseAnimation:u,triggerErrorAnimation:d,clearErrorAnimation:h,startPulsatingAnimation:p,stopPulsatingAnimation:f,startIdleAnimations:m,stopIdleAnimations:y,triggerFadeTransition:S,setInitialAnimationState:A,cleanup:w}=rO(),{timerState:O,controls:T}=nO({autoStart:n,onCycleEnd:t,onMeasuringComplete:r,hasError:i,onPauseAnimation:u,onErrorAnimation:d,onClearErrorAnimation:h,onStartPulsating:p});return z.useEffect(()=>{const C=l.current;l.current!==void 0&&C!==O.currentState?(C==="measured"&&f(),C==="idle"&&y(),S()):A(),O.currentState==="idle"&&m(),l.current=O.currentState},[O.currentState,f,y,m,S,A]),z.useEffect(()=>{let C=!0;const R=setTimeout(()=>{C&&e(T)},0);return()=>{C=!1,clearTimeout(R)}},[e,T]),z.useEffect(()=>w,[w]),a==="small"?g.jsx(tO,{timerState:O,animationState:c,hasError:i,compact:o,className:s}):g.jsx(eO,{timerState:O,animationState:c,hasError:i,className:s})})),ol=e=>{const t=Math.floor(e/60),r=e%60;return`${t}:${r.toString().padStart(2,"0")}`},oO=({timerState:e,animationState:t,hasError:r,className:n})=>{const{t:a}=Se.useTranslation(),o=up(),{elapsedTime:s,currentProgress:i}=e,{showErrorAnimation:l,showPauseAnimation:c,showMainText:u}=t;return g.jsxs(P.Box,{className:n,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx(Sg.Gauge,{width:264,height:264,value:i,valueMin:0,valueMax:100,innerRadius:"85%",outerRadius:"100%",margin:0,skipAnimation:!0,text:()=>"",sx:{opacity:c||l?.6:1,transition:"opacity 0.5s ease-out","& .MuiGauge-valueArc":{fill:r?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.jsx(P.Box,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:225,height:225,borderRadius:"50%",backgroundColor:"#292B3F",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1,transition:"background-color 0.5s ease-out"},children:g.jsxs(P.Box,{sx:{position:"relative",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:[g.jsx(P.Fade,{in:u&&r,timeout:200,children:g.jsx(P.Typography,{variant:"h6",sx:{position:"absolute",fontSize:"16px",fontWeight:500,color:o.palette.error.light},children:a("timer.error")})}),g.jsx(P.Fade,{in:u&&!r,timeout:300,children:g.jsx(P.Typography,{variant:"h1",sx:{position:"absolute",fontSize:"48px",fontWeight:500,color:o.palette.text.primary,lineHeight:1,letterSpacing:"-0.5px"},children:ol(s)})})]})})]})},sO=({timerState:e,animationState:t,hasError:r,compact:n,className:a})=>{const{t:o}=Se.useTranslation(),s=up(),{elapsedTime:i,currentProgress:l}=e,{showErrorAnimation:c,showPauseAnimation:u}=t;return n?g.jsx(P.Box,{className:a,sx:{display:"flex",alignItems:"center",m:0},children:g.jsx(P.Typography,{variant:"body2",sx:{color:r?s.palette.error.light:s.palette.text.primary,fontSize:"14px",transition:"color 0.5s ease-out"},children:r?o("timer.error"):ol(i)})}):g.jsxs(P.Box,{className:a,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[g.jsx(P.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:u||c?.6:1,transition:"opacity 0.5s ease-out"},children:g.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)"},role:"img","aria-label":"Timer progress",children:[g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:r?s.palette.error.light:s.palette.success.main,strokeWidth:"2",opacity:.3,style:{transition:"stroke 0.8s ease-in-out, opacity 2s ease-in-out"}}),g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:r?s.palette.error.light:s.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.jsx(P.Typography,{variant:"body2",sx:{color:r?s.palette.error.light:s.palette.text.primary,fontSize:"14px",lineHeight:"normal",letterSpacing:"normal",transition:"color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"},children:r?o("timer.error"):ol(i)})]})},iO=()=>{const[e,t]=z.useState({showPauseAnimation:!1,showErrorAnimation:!1,showMainText:!0}),r=z.useRef(null),n=z.useRef(null),a=z.useRef(null),o=z.useCallback(()=>{t(d=>({...d,showPauseAnimation:!0})),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(d=>({...d,showPauseAnimation:!1}))},800)},[]),s=z.useCallback(()=>{t(d=>({...d,showErrorAnimation:!0})),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{t(d=>({...d,showErrorAnimation:!1}))},600)},[]),i=z.useCallback(()=>{t(d=>({...d,showErrorAnimation:!1})),n.current&&clearTimeout(n.current)},[]),l=z.useCallback(()=>{t(d=>({...d,showMainText:!1})),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{t(d=>({...d,showMainText:!0}))},200)},[]),c=z.useCallback(()=>{t(d=>({...d,showMainText:!0}))},[]),u=z.useCallback(()=>{r.current&&clearTimeout(r.current),n.current&&clearTimeout(n.current),a.current&&clearTimeout(a.current)},[]);return{animationState:e,triggerPauseAnimation:o,triggerErrorAnimation:s,clearErrorAnimation:i,triggerFadeTransition:l,setInitialAnimationState:c,cleanup:u}},lO=({autoStart:e,hasError:t,onPauseAnimation:r,onErrorAnimation:n,onClearErrorAnimation:a})=>{const[o,s]=z.useState({elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0,wasRunningBeforeError:!1}),i=z.useRef(null),l=z.useRef(null),c=z.useRef(0),u=z.useRef(0),[d]=Oc([0],{tension:80,friction:18,onChange:([S])=>{s(A=>({...A,currentProgress:S}))}}),h=z.useCallback((S=0)=>{const A=S/60%1*100;s(w=>({...w,elapsedTime:S,isPausedState:!1,currentProgress:A})),c.current=0,u.current=A,d.setImmediate([A]),e?(l.current=Date.now()-S*1e3,s(w=>({...w,isRunning:!0}))):l.current=null},[e,d]),p=z.useCallback(()=>{if(l.current&&o.isRunning){const A=(Date.now()-l.current)/1e3+c.current,w=A/60%1*100;d.setTarget([w]),s(O=>({...O,elapsedTime:Math.floor(A)}))}s(S=>({...S,isRunning:!1,isPausedState:!0})),r()},[o.isRunning,d,r]),f=z.useCallback(()=>{o.isPausedState&&(c.current=o.elapsedTime,l.current=Date.now(),s(S=>({...S,isRunning:!0,isPausedState:!1})))},[o.isPausedState,o.elapsedTime]),m=z.useCallback(()=>{s(S=>({...S,elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0})),c.current=0,l.current=null,u.current=0,d.setImmediate([0])},[d]),y=z.useCallback(()=>o.isPausedState,[o.isPausedState]);return z.useEffect(()=>{t?(o.isRunning&&(s(S=>({...S,wasRunningBeforeError:!0})),p()),n()):(o.wasRunningBeforeError&&!o.isRunning&&(s(S=>({...S,wasRunningBeforeError:!1})),f()),a())},[t,o.isRunning,o.wasRunningBeforeError,p,f,n,a]),z.useEffect(()=>{if(o.isRunning){const S=()=>{if(l.current){const w=(Date.now()-l.current)/1e3+c.current,O=w/60%1*100;s(C=>({...C,elapsedTime:Math.floor(w)})),Math.abs(O-u.current)>.1&&(d.setTarget([O]),u.current=O)}i.current=requestAnimationFrame(S)};i.current=requestAnimationFrame(S)}else i.current&&(cancelAnimationFrame(i.current),i.current=null);return()=>{i.current&&(cancelAnimationFrame(i.current),i.current=null)}},[o.isRunning,d]),z.useEffect(()=>{let S=null;const A=()=>{d.update(),S=requestAnimationFrame(A)};return S=requestAnimationFrame(A),()=>{S&&cancelAnimationFrame(S)}},[d]),{timerState:o,controls:{start:h,pause:p,resume:f,reset:m,isPaused:y}}},cO=qe(ge.observer(({onTimerReady:e,autoStart:t=!0,variant:r="default",compact:n=!1,className:a,hasError:o=!1})=>{const{animationState:s,triggerPauseAnimation:i,triggerErrorAnimation:l,clearErrorAnimation:c,setInitialAnimationState:u,cleanup:d}=iO(),{timerState:h,controls:p}=lO({autoStart:t,hasError:o,onPauseAnimation:i,onErrorAnimation:l,onClearErrorAnimation:c});return z.useEffect(()=>{u()},[u]),z.useEffect(()=>{let f=!0;const m=setTimeout(()=>{f&&e(p)},0);return()=>{f=!1,clearTimeout(m)}},[e,p]),z.useEffect(()=>d,[d]),r==="small"?g.jsx(sO,{timerState:h,animationState:s,hasError:o,compact:n,className:a}):g.jsx(oO,{timerState:h,animationState:s,hasError:o,className:a})})),Lr=Cy;process.env.NODE_ENV!=="production"&&(x.node,x.object.isRequired);function Tc(e){return wy(e)}function uO(e){return On("MuiSvgIcon",e)}jl("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const dO=e=>{const{color:t,fontSize:r,classes:n}=e,a={root:["root",t!=="inherit"&&`color${et(t)}`,`fontSize${et(r)}`]};return ts(a,uO,n)},hO=pt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${et(r.color)}`],t[`fontSize${et(r.fontSize)}`]]}})(Lr(({theme:e})=>{var t,r,n,a,o,s,i,l,c,u,d,h,p,f;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(a=(t=e.transitions)==null?void 0:t.create)==null?void 0:a.call(t,"fill",{duration:(n=(r=(e.vars??e).transitions)==null?void 0:r.duration)==null?void 0:n.shorter}),variants:[{props:m=>!m.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(o=e.typography)==null?void 0:o.pxToRem)==null?void 0:s.call(o,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:l.call(i,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,m])=>m&&m.main).map(([m])=>{var y,S;return{props:{color:m},style:{color:(S=(y=(e.vars??e).palette)==null?void 0:y[m])==null?void 0:S.main}}}),{props:{color:"action"},style:{color:(h=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:h.active}},{props:{color:"disabled"},style:{color:(f=(p=(e.vars??e).palette)==null?void 0:p.action)==null?void 0:f.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Jo=N.forwardRef(function(t,r){const n=Tc({props:t,name:"MuiSvgIcon"}),{children:a,className:o,color:s="inherit",component:i="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:h="0 0 24 24",...p}=n,f=N.isValidElement(a)&&a.type==="svg",m={...n,color:s,component:i,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:f},y={};u||(y.viewBox=h);const S=dO(m);return g.jsxs(hO,{as:i,className:Pt(S.root,o),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r,...y,...p,...f&&a.props,ownerState:m,children:[f?a.props.children:a,d?g.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(Jo.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});Jo.muiName="SvgIcon";function gr(e,t){function r(n,a){return g.jsx(Jo,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:a,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=Jo.muiName,N.memo(N.forwardRef(r))}function pO(e){const{controlled:t,default:r,name:n,state:a="value"}=e,{current:o}=N.useRef(t!==void 0),[s,i]=N.useState(r),l=o?t:s;if(process.env.NODE_ENV!=="production"){N.useEffect(()=>{o!==(t!==void 0)&&console.error([`MUI: A component is changing the ${o?"":"un"}controlled ${a} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
126
126
  `))},[a,n,t]);const{current:u}=N.useRef(r);N.useEffect(()=>{!o&&!Object.is(u,r)&&console.error([`MUI: A component is changing the default ${a} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
127
127
  `))},[JSON.stringify(r)])}const c=N.useCallback(u=>{o||i(u)},[]);return[l,c]}const mO=gr(g.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),fO=gr(g.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),Sd=gr(g.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search"),Im=qe(ge.observer(({data:e,columns:t,getRowData:r,onRowClick:n,selectedItem:a,getItemId:o,title:s,showCount:i=!0,searchPlaceholder:l="Search programs",dataGridProps:c,CustomToolbar:u,selectFirstByDefault:d=!1,sx:h})=>{var I;const p=P.useTheme(),f=vt.useGridApiRef(),m=z.useRef(null),[y,S]=z.useState(null),A=z.useMemo(()=>e.map(r),[e,r]);z.useEffect(()=>{f.current&&A.length>0&&f.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:t.map(V=>V.field)})},[A,t,f]),z.useEffect(()=>{if(!m.current||!f.current)return;const V=new ResizeObserver(()=>{setTimeout(()=>{f.current&&A.length>0&&f.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:t.map(b=>b.field)})},100)});return V.observe(m.current),()=>{V.disconnect()}},[f,A.length,t]);const w=z.useMemo(()=>{if(a!==void 0)return a;if(y!==null)return y;if(d&&e.length>0){const V=e[0];return S(V),V}return null},[d,e,a,y]),O=V=>{const b=e.find(_=>r(_).id===V.id);b&&(a===void 0&&S(b),n&&n(b,V))},T=z.useMemo(()=>!w||!o?null:o(w),[w,o]);function C(){return g.jsx(vt.Toolbar,{children:g.jsxs(P.Box,{sx:{display:"flex",width:"100%",gap:1,p:.5,alignItems:"center"},children:[s&&g.jsxs(P.Typography,{variant:"h6",sx:{fontWeight:500,color:"white"},children:[s,i&&` (${e.length})`]}),g.jsxs(P.Box,{sx:{ml:"auto",display:"flex",gap:.5,alignItems:"center",pr:1},children:[g.jsx(vt.FilterPanelTrigger,{render:g.jsx(vt.ToolbarButton,{"aria-label":"Show filters",children:g.jsx(fO,{fontSize:"small"})})}),g.jsx(P.Divider,{orientation:"vertical",flexItem:!0,sx:{height:"24px",alignSelf:"center"}}),g.jsx(vt.QuickFilter,{render:(V,b)=>g.jsxs(P.Box,{...V,sx:{display:"flex",overflow:"hidden"},children:[!b.expanded&&g.jsx(vt.QuickFilterTrigger,{render:g.jsx(vt.ToolbarButton,{"aria-label":"Search",children:g.jsx(Sd,{fontSize:"small"})})}),g.jsxs(P.Box,{sx:{display:"flex",overflow:"hidden",transition:"all 0.3s ease-in-out",width:b.expanded?"200px":"0px",position:"relative"},children:[g.jsxs(P.Box,{sx:{flex:1,position:"relative","& .MuiInputBase-root":{height:"32px",borderRadius:"16px",backgroundColor:"#171927",paddingLeft:"40px",paddingRight:b.expanded&&b.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:[b.expanded&&g.jsx(Sd,{fontSize:"small",sx:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:"rgba(255, 255, 255, 0.6)",zIndex:1,pointerEvents:"none"}}),g.jsx(vt.QuickFilterControl,{placeholder:l})]}),b.expanded&&b.value!==""&&g.jsx(vt.QuickFilterClear,{render:g.jsx(P.Box,{sx:{position:"absolute",right:"8px",top:"50%",transform:"translateY(-50%)",zIndex:1},children:g.jsx(P.Box,{sx:{minWidth:"24px",width:"24px",height:"24px",padding:0,color:"rgba(255, 255, 255, 0.6)","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.1)"}},children:g.jsx(vt.ToolbarButton,{"aria-label":"Clear",children:g.jsx(mO,{fontSize:"small"})})})})})]})]})})]})]})})}const R=u||C;return g.jsx(P.Box,{ref:m,sx:{height:"100%",display:"flex",flexDirection:"column","& *":{scrollbarWidth:"none",msOverflowStyle:"none","&::-webkit-scrollbar":{display:"none"}},"&:hover *":{scrollbarWidth:"thin",scrollbarColor:`${p.palette.divider} transparent`,"&::-webkit-scrollbar":{display:"block",width:"8px",height:"8px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:p.palette.divider,borderRadius:"4px"},"&::-webkit-scrollbar-thumb:hover":{background:p.palette.action.hover}},...h},children:g.jsx(vt.DataGrid,{apiRef:f,rows:A,columns:t,onRowClick:O,disableColumnMenu:!1,disableRowSelectionOnClick:!0,disableMultipleRowSelection:!0,hideFooterSelectedRowCount:!0,filterMode:"client",sortingOrder:["desc","asc"],hideFooter:!1,showToolbar:!0,slots:{toolbar:R},initialState:{sorting:{sortModel:[]},filter:{filterModel:{items:[]}},...c==null?void 0:c.initialState},...c,autosizeOnMount:!0,autosizeOptions:{...(c==null?void 0:c.autosizeOptions)||{},includeOutliers:!0,includeHeaders:!0,expand:!0,columns:((I=c==null?void 0:c.autosizeOptions)==null?void 0:I.columns)||t.map(V=>V.field)},sx:{border:"none",width:"100%","& .MuiPaper-root":{boxShadow:"none !important"},"& .MuiDataGrid-overlay":{},"& .MuiDataGrid-main":{border:"none","& .MuiPaper-root":{}},"& .MuiDataGrid-container--top [role=row]":{},"& .MuiDataGrid-topContainer":{borderBottom:"none !important"},"& .MuiDataGrid-columnHeaders":{border:"none",borderBottom:"none !important"},"& .MuiDataGrid-row":{cursor:n?"pointer":"default",border:"none",margin:"1px 0",position:"relative",backgroundColor:"transparent !important","&:hover":{backgroundColor:"transparent !important","&::before":{content:'""',position:"absolute",top:0,left:"16px",right:"16px",bottom:0,backgroundColor:"action.hover",borderRadius:"16px",zIndex:0}},"&.Mui-selected":{backgroundColor:"transparent !important","&:hover":{backgroundColor:"transparent !important"}},...T!==null&&{[`&[data-id="${T}"]`]:{backgroundColor:"transparent !important","&::before":{content:'""',position:"absolute",top:0,left:"16px",right:"16px",bottom:0,backgroundColor:"rgba(255, 255, 255, 0.08) !important",borderRadius:"16px",zIndex:0},"&:hover":{backgroundColor:"transparent !important"},"&:hover::before":{backgroundColor:"rgba(255, 255, 255, 0.12) !important"}}}},"& .MuiDataGrid-cell--textLeft":{paddingLeft:"40px"},"& .MuiDataGrid-cell":{border:"none",position:"relative",zIndex:1,"&:focus":{outline:"none"},"&:focus-within":{outline:"none"},"&:hover":{backgroundColor:"transparent !important"}},"& .MuiDataGrid-columnHeader":{border:"none",paddingLeft:"40px",paddingRight:"40px","& .MuiDataGrid-columnHeaderTitle":{color:"rgba(255, 255, 255, 0.6)"}},"& .MuiDataGrid-toolbarContainer":{padding:"8px",border:"none !important",borderBottom:"none !important","& .MuiBox-root":{},"& .MuiFormControl-root":{},"& .MuiInputBase-root":{},"& .MuiPaper-root":{boxShadow:"none !important"},"& *":{borderBottom:"none !important"}},"& .MuiDataGrid-toolbar":{borderBottom:"none !important"},"& .MuiDataGrid-toolbarFilterList":{border:"none"},"& .MuiDataGrid-withBorderColor":{borderColor:"transparent !important"},"& .MuiDataGrid-columnSeparator":{display:"none"},"& .MuiDataGrid-footerContainer":{display:"none"},"& .MuiDataGrid-filler":{border:"none !important",borderTop:"none !important",borderBottom:"none !important",borderLeft:"none !important",borderRight:"none !important","--rowBorderColor":"none !important"},"& .MuiBackdrop-root":{},"& .MuiModal-backdrop":{},...c==null?void 0:c.sx}})})}));Im.displayName="WandelbotsDataGrid";const hn=ky({createStyledComponent:pt("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>Tc({props:e,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(hn.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 gO=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:21,height:21,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("g",{id:"JogMinus"},N.createElement("path",{id:"Minus",d:"M0 13V8H21V13H0Z",fill:"white"}))),yO=z.forwardRef(gO),bO=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:21,height:21,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("g",{id:"JogPlus"},N.createElement("g",{id:"Plus"},N.createElement("path",{d:"M0 13V8H8V13H0Z",fill:"white"}),N.createElement("path",{d:"M8 0L13 2.18557e-07L13 21H8L8 0Z",fill:"white"}),N.createElement("path",{d:"M13 13V8H21V13H13Z",fill:"white"})))),xO=z.forwardRef(bO);function Vs(e){z.useEffect(e,[])}function Vm(e){Vs(()=>ke.autorun(e))}function Mm(e,t,r){Vs(()=>ke.reaction(e,t,r))}function An(e){return Vs(()=>{let t;function r(){e(),t=requestAnimationFrame(r)}return t=requestAnimationFrame(r),()=>{cancelAnimationFrame(t)}})}const sl=qe(ge.observer(({colors:e,label:t,getDisplayedValue:r,startJogging:n,stopJogging:a,disabled:o,activeJoggingDirection:s,...i})=>{var w,O,T,C,R,I,V;An(()=>{const b=r(),_=h.current;_&&(_.textContent=b)});const l=P.useTheme(),[c,u]=z.useState(null);z.useEffect(()=>{o&&A()},[o]);const d=s||c,h=z.useRef(null);e||(e={color:"#fff",backgroundColor:"#000",borderColor:"#000",buttonBackgroundColor:{disabled:"#000",default:"#000",hovered:"#000",pressed:"#000"},labelColor:"#000"});const p=d?(w=e.buttonBackgroundColor)==null?void 0:w.pressed:e.borderColor,f={width:"55px",color:e.color,path:{fill:e.color},alignContent:"center",fontSize:"37px",svg:{pointerEvents:"none"}},m={...f,backgroundColor:(O=e.buttonBackgroundColor)==null?void 0:O.default,":hover":{backgroundColor:(T=e.buttonBackgroundColor)==null?void 0:T.hovered},":active":{backgroundColor:(C=e.buttonBackgroundColor)==null?void 0:C.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor}},":disabled":{backgroundColor:(R=e.buttonBackgroundColor)==null?void 0:R.disabled,"svg path":{fill:l.palette.action.disabled}}},y={...f,backgroundColor:(I=e.buttonBackgroundColor)==null?void 0:I.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor},":disabled":{backgroundColor:(V=e.buttonBackgroundColor)==null?void 0:V.pressed,"svg path":{fill:l.palette.action.disabled}}};function S(b,_){o||b.button===0&&(u(_),n(_))}function A(){u(null),a()}return g.jsxs(hn,{height:"64px",direction:"row",justifyContent:"center",...i,children:[g.jsx(P.IconButton,{disabled:o,disableRipple:!0,onPointerDown:b=>S(b,"-"),onPointerUp:A,onPointerOut:A,size:"large",sx:{...d==="-"?y:m,borderRadius:"16px 0px 0px 16px",borderLeft:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:g.jsx(yO,{})}),g.jsxs(hn,{spacing:"6px",sx:{width:"150px",backgroundColor:e.backgroundColor,alignItems:"center",justifyContent:"center",opacity:"0.9",borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:[g.jsx(hn,{height:"22px",direction:"row",alignItems:"center",justifyItems:"center",spacing:1,sx:{userSelect:"none",color:e.color,".MuiTypography-root":{fontWeight:700,...o?{color:l.palette.action.disabled}:{}},...o?{"svg path":{fill:l.palette.action.disabled}}:{}},children:t}),g.jsx(P.Typography,{height:"22px",sx:{fontSize:"15px",color:o?l.palette.action.disabled:e.color,fontWeight:700},ref:h,children:r()})]}),g.jsx(P.IconButton,{disableRipple:!0,disabled:o,onPointerDown:b=>S(b,"+"),onPointerUp:A,onPointerOut:A,size:"large",sx:{...d==="+"?y:m,borderRadius:"0px 16px 16px 0px",borderRight:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:g.jsx(xO,{})})]})})),vO=gr(g.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),SO=gr(g.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");function Er(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var jm=typeof global=="object"&&global&&global.Object===Object&&global,wO=typeof self=="object"&&self&&self.Object===Object&&self,Lt=jm||wO||Function("return this")(),Ti=function(){return Lt.Date.now()},CO=/\s/;function OO(e){for(var t=e.length;t--&&CO.test(e.charAt(t)););return t}var TO=/^\s+/;function PO(e){return e&&e.slice(0,OO(e)+1).replace(TO,"")}var pr=Lt.Symbol,km=Object.prototype,RO=km.hasOwnProperty,AO=km.toString,qn=pr?pr.toStringTag:void 0;function _O(e){var t=RO.call(e,qn),r=e[qn];try{e[qn]=void 0;var n=!0}catch{}var a=AO.call(e);return n&&(t?e[qn]=r:delete e[qn]),a}var EO=Object.prototype,IO=EO.toString;function VO(e){return IO.call(e)}var MO="[object Null]",jO="[object Undefined]",wd=pr?pr.toStringTag:void 0;function Br(e){return e==null?e===void 0?jO:MO:wd&&wd in Object(e)?_O(e):VO(e)}function Ir(e){return e!=null&&typeof e=="object"}var kO="[object Symbol]";function Ms(e){return typeof e=="symbol"||Ir(e)&&Br(e)==kO}var Cd=NaN,$O=/^[-+]0x[0-9a-f]+$/i,UO=/^0b[01]+$/i,DO=/^0o[0-7]+$/i,LO=parseInt;function Od(e){if(typeof e=="number")return e;if(Ms(e))return Cd;if(Er(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Er(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=PO(e);var r=UO.test(e);return r||DO.test(e)?LO(e.slice(2),r?2:8):$O.test(e)?Cd:+e}var BO="Expected a function",FO=Math.max,NO=Math.min;function zO(e,t,r){var n,a,o,s,i,l,c=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(BO);t=Od(t)||0,Er(r)&&(u=!!r.leading,d="maxWait"in r,o=d?FO(Od(r.maxWait)||0,t):o,h="trailing"in r?!!r.trailing:h);function p(C){var R=n,I=a;return n=a=void 0,c=C,s=e.apply(I,R),s}function f(C){return c=C,i=setTimeout(S,t),u?p(C):s}function m(C){var R=C-l,I=C-c,V=t-R;return d?NO(V,o-I):V}function y(C){var R=C-l,I=C-c;return l===void 0||R>=t||R<0||d&&I>=o}function S(){var C=Ti();if(y(C))return A(C);i=setTimeout(S,m(C))}function A(C){return i=void 0,h&&n?p(C):(n=a=void 0,s)}function w(){i!==void 0&&clearTimeout(i),c=0,n=l=a=i=void 0}function O(){return i===void 0?s:A(Ti())}function T(){var C=Ti(),R=y(C);if(n=arguments,a=this,l=C,R){if(i===void 0)return f(l);if(d)return clearTimeout(i),i=setTimeout(S,t),p(l)}return i===void 0&&(i=setTimeout(S,t)),s}return T.cancel=w,T.flush=O,T}var GO="Expected a function";function HO(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(GO);return Er(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),zO(e,t,{leading:n,maxWait:t,trailing:a})}const $m=qe(ge.observer(({startJogging:e,stopJogging:t,lowerLimitDegs:r,upperLimitDegs:n,getValueDegs:a,disabled:o,...s})=>{var w,O,T,C,R,I,V,b,_,G,M,H,ne,re,ae;const{t:i}=Se.useTranslation(),[l,c]=z.useState(),u=P.useTheme(),d={background:(w=u.palette.backgroundPaperElevation)==null?void 0:w[4],color:(O=u.palette.backgroundPaperElevation)==null?void 0:O[11]},h=ge.useLocalObservable(()=>({activeJoggingDir:null,startJogging(ee){this.activeJoggingDir=ee,e(ee)},stopJogging(){this.activeJoggingDir=null,t()}})),p=HO(()=>{c(a())},50);An(p);function f(ee){ee.button===0&&h.startJogging("-")}function m(ee){ee.button===0&&h.startJogging("+")}function y(ee){h.stopJogging()}function S(ee){h.stopJogging()}function A(ee,le=1){if(ee===void 0||isNaN(ee))return"";const J=i("General.degree.variable",{amount:ee.toFixed(le)});return ee>0&&le===0?`+${J}`:J}return g.jsxs(hn,{height:"64px",width:"100%",maxWidth:"260px",direction:"row",...s,sx:{"& .MuiIconButton-root":{width:"52px",color:u.palette.text.primary,alignContent:"center",backgroundColor:(T=u.palette.backgroundPaperElevation)==null?void 0:T[11],"& svg":{width:"42px",height:"42px"},"&.Mui-disabled":{backgroundColor:(C=u.palette.backgroundPaperElevation)==null?void 0:C[11],color:u.palette.action.disabled,opacity:1},"&:hover":{backgroundColor:(R=u.palette.backgroundPaperElevation)==null?void 0:R[9]},"&:active":{...d}}},children:[g.jsx(P.IconButton,{onPointerDown:f,onPointerUp:y,onPointerOut:S,disabled:o,disableRipple:!0,sx:{borderRadius:"16px 0px 0px 16px",...h.activeJoggingDir==="-"?d:{}},children:g.jsx(vO,{sx:{pointerEvents:"none",color:(_=(b=(V=(I=u.componentsExt)==null?void 0:I.JoggingPanel)==null?void 0:V.JoggingJoint)==null?void 0:b.Joint)==null?void 0:_.arrowColor}})}),g.jsxs(hn,{flexGrow:1,alignItems:"center",justifyContent:"center",sx:{borderStyle:"solid",borderLeftWidth:0,borderRightWidth:0,border:"none",backgroundColor:(G=u.palette.backgroundPaperElevation)==null?void 0:G[11],paddingLeft:"20px",paddingRight:"20px",zIndex:1},children:[g.jsx(P.Typography,{sx:{fontSize:"15px",fontWeight:700,position:"relative",top:"5px",color:o?u.palette.action.disabled:u.palette.text.primary},children:A(l)}),g.jsx(P.Slider,{disabled:!0,"aria-label":"Joint position",min:r,max:n,value:l||0,track:!1,sx:{"& .MuiSlider-mark":{display:"none"},"& .MuiSlider-thumb":{width:"5px",height:"12px",borderRadius:"2px",color:o?u.palette.action.disabled:u.palette.text.primary},"& .MuiSlider-markLabel":{top:"20px",fontSize:"12px",color:o?u.palette.action.disabled:u.palette.text.secondary},"& .MuiSlider-rail":{backgroundColor:(M=u.palette.backgroundPaperElevation)==null?void 0:M[5],opacity:1}},marks:r!==void 0&&n!==void 0&&[{value:r,label:A(r,0)},{value:n,label:A(n,0)}]})]}),g.jsx(P.IconButton,{onPointerDown:m,onPointerUp:y,onPointerOut:S,disabled:o,disableRipple:!0,sx:{borderRadius:"0px 16px 16px 0px",...h.activeJoggingDir==="+"?d:{}},children:g.jsx(SO,{sx:{pointerEvents:"none",color:(ae=(re=(ne=(H=u.componentsExt)==null?void 0:H.JoggingPanel)==null?void 0:ne.JoggingJoint)==null?void 0:re.Joint)==null?void 0:ae.arrowColor}})})]})})),qO=gr(g.jsx("path",{d:"M10 9h4V6h3l-5-5-5 5h3zm-1 1H6V7l-5 5 5 5v-3h3zm14 2-5-5v3h-3v4h3v3zm-9 3h-4v3H7l5 5 5-5h-3z"}),"OpenWith"),WO=gr(g.jsx("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92-1.31-2.92-2.92-2.92"}),"Share");function JO(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Um=JO;function YO(){this.__data__=[],this.size=0}var KO=YO;function QO(e,t){return e===t||e!==e&&t!==t}var Dm=QO;function XO(e,t){for(var r=e.length;r--;)if(Dm(e[r][0],t))return r;return-1}var js=XO,ZO=Array.prototype,eT=ZO.splice;function tT(e){var t=this.__data__,r=js(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():eT.call(t,r,1),--this.size,!0}var rT=tT;function nT(e){var t=this.__data__,r=js(t,e);return r<0?void 0:t[r][1]}var aT=nT;function oT(e){return js(this.__data__,e)>-1}var sT=oT;function iT(e,t){var r=this.__data__,n=js(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var lT=iT;function _n(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}_n.prototype.clear=KO;_n.prototype.delete=rT;_n.prototype.get=aT;_n.prototype.has=sT;_n.prototype.set=lT;var ks=_n;function cT(){this.__data__=new ks,this.size=0}var uT=cT;function dT(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var hT=dT;function pT(e){return this.__data__.get(e)}var mT=pT;function fT(e){return this.__data__.has(e)}var gT=fT,yT=typeof global=="object"&&global&&global.Object===Object&&global,Lm=yT,bT=typeof self=="object"&&self&&self.Object===Object&&self,xT=Lm||bT||Function("return this")(),Zt=xT,vT=Zt.Symbol,Cn=vT,Bm=Object.prototype,ST=Bm.hasOwnProperty,wT=Bm.toString,Wn=Cn?Cn.toStringTag:void 0;function CT(e){var t=ST.call(e,Wn),r=e[Wn];try{e[Wn]=void 0;var n=!0}catch{}var a=wT.call(e);return n&&(t?e[Wn]=r:delete e[Wn]),a}var OT=CT,TT=Object.prototype,PT=TT.toString;function RT(e){return PT.call(e)}var AT=RT,_T="[object Null]",ET="[object Undefined]",Td=Cn?Cn.toStringTag:void 0;function IT(e){return e==null?e===void 0?ET:_T:Td&&Td in Object(e)?OT(e):AT(e)}var ja=IT,VT="[object AsyncFunction]",MT="[object Function]",jT="[object GeneratorFunction]",kT="[object Proxy]";function $T(e){if(!Um(e))return!1;var t=ja(e);return t==MT||t==jT||t==VT||t==kT}var Fm=$T,UT=Zt["__core-js_shared__"],Pi=UT,Pd=function(){var e=/[^.]+$/.exec(Pi&&Pi.keys&&Pi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function DT(e){return!!Pd&&Pd in e}var LT=DT,BT=Function.prototype,FT=BT.toString;function NT(e){if(e!=null){try{return FT.call(e)}catch{}try{return e+""}catch{}}return""}var Fr=NT,zT=/[\\^$.*+?()[\]{}|]/g,GT=/^\[object .+?Constructor\]$/,HT=Function.prototype,qT=Object.prototype,WT=HT.toString,JT=qT.hasOwnProperty,YT=RegExp("^"+WT.call(JT).replace(zT,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function KT(e){if(!Um(e)||LT(e))return!1;var t=Fm(e)?YT:GT;return t.test(Fr(e))}var QT=KT;function XT(e,t){return e==null?void 0:e[t]}var ZT=XT;function eP(e,t){var r=ZT(e,t);return QT(r)?r:void 0}var En=eP,tP=En(Zt,"Map"),va=tP,rP=En(Object,"create"),Sa=rP;function nP(){this.__data__=Sa?Sa(null):{},this.size=0}var aP=nP;function oP(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var sP=oP,iP="__lodash_hash_undefined__",lP=Object.prototype,cP=lP.hasOwnProperty;function uP(e){var t=this.__data__;if(Sa){var r=t[e];return r===iP?void 0:r}return cP.call(t,e)?t[e]:void 0}var dP=uP,hP=Object.prototype,pP=hP.hasOwnProperty;function mP(e){var t=this.__data__;return Sa?t[e]!==void 0:pP.call(t,e)}var fP=mP,gP="__lodash_hash_undefined__";function yP(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Sa&&t===void 0?gP:t,this}var bP=yP;function In(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}In.prototype.clear=aP;In.prototype.delete=sP;In.prototype.get=dP;In.prototype.has=fP;In.prototype.set=bP;var Rd=In;function xP(){this.size=0,this.__data__={hash:new Rd,map:new(va||ks),string:new Rd}}var vP=xP;function SP(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var wP=SP;function CP(e,t){var r=e.__data__;return wP(t)?r[typeof t=="string"?"string":"hash"]:r.map}var $s=CP;function OP(e){var t=$s(this,e).delete(e);return this.size-=t?1:0,t}var TP=OP;function PP(e){return $s(this,e).get(e)}var RP=PP;function AP(e){return $s(this,e).has(e)}var _P=AP;function EP(e,t){var r=$s(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var IP=EP;function Vn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Vn.prototype.clear=vP;Vn.prototype.delete=TP;Vn.prototype.get=RP;Vn.prototype.has=_P;Vn.prototype.set=IP;var Nm=Vn,VP=200;function MP(e,t){var r=this.__data__;if(r instanceof ks){var n=r.__data__;if(!va||n.length<VP-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Nm(n)}return r.set(e,t),this.size=r.size,this}var jP=MP;function Mn(e){var t=this.__data__=new ks(e);this.size=t.size}Mn.prototype.clear=uT;Mn.prototype.delete=hT;Mn.prototype.get=mT;Mn.prototype.has=gT;Mn.prototype.set=jP;var Ri=Mn,kP="__lodash_hash_undefined__";function $P(e){return this.__data__.set(e,kP),this}var UP=$P;function DP(e){return this.__data__.has(e)}var LP=DP;function Yo(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Nm;++t<r;)this.add(e[t])}Yo.prototype.add=Yo.prototype.push=UP;Yo.prototype.has=LP;var BP=Yo;function FP(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var NP=FP;function zP(e,t){return e.has(t)}var GP=zP,HP=1,qP=2;function WP(e,t,r,n,a,o){var s=r&HP,i=e.length,l=t.length;if(i!=l&&!(s&&l>i))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=r&qP?new BP:void 0;for(o.set(e,t),o.set(t,e);++d<i;){var f=e[d],m=t[d];if(n)var y=s?n(m,f,d,t,e,o):n(f,m,d,e,t,o);if(y!==void 0){if(y)continue;h=!1;break}if(p){if(!NP(t,function(S,A){if(!GP(p,A)&&(f===S||a(f,S,r,n,o)))return p.push(A)})){h=!1;break}}else if(!(f===m||a(f,m,r,n,o))){h=!1;break}}return o.delete(e),o.delete(t),h}var zm=WP,JP=Zt.Uint8Array,Ad=JP;function YP(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var KP=YP;function QP(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var XP=QP,ZP=1,eR=2,tR="[object Boolean]",rR="[object Date]",nR="[object Error]",aR="[object Map]",oR="[object Number]",sR="[object RegExp]",iR="[object Set]",lR="[object String]",cR="[object Symbol]",uR="[object ArrayBuffer]",dR="[object DataView]",_d=Cn?Cn.prototype:void 0,Ai=_d?_d.valueOf:void 0;function hR(e,t,r,n,a,o,s){switch(r){case dR:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case uR:return!(e.byteLength!=t.byteLength||!o(new Ad(e),new Ad(t)));case tR:case rR:case oR:return Dm(+e,+t);case nR:return e.name==t.name&&e.message==t.message;case sR:case lR:return e==t+"";case aR:var i=KP;case iR:var l=n&ZP;if(i||(i=XP),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;n|=eR,s.set(e,t);var u=zm(i(e),i(t),n,a,o,s);return s.delete(e),u;case cR:if(Ai)return Ai.call(e)==Ai.call(t)}return!1}var pR=hR;function mR(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var fR=mR,gR=Array.isArray,Ko=gR;function yR(e,t,r){var n=t(e);return Ko(e)?n:fR(n,r(e))}var bR=yR;function xR(e,t){for(var r=-1,n=e==null?0:e.length,a=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[a++]=s)}return o}var vR=xR;function SR(){return[]}var wR=SR,CR=Object.prototype,OR=CR.propertyIsEnumerable,Ed=Object.getOwnPropertySymbols,TR=Ed?function(e){return e==null?[]:(e=Object(e),vR(Ed(e),function(t){return OR.call(e,t)}))}:wR,PR=TR;function RR(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var AR=RR;function _R(e){return e!=null&&typeof e=="object"}var wa=_R,ER="[object Arguments]";function IR(e){return wa(e)&&ja(e)==ER}var Id=IR,Gm=Object.prototype,VR=Gm.hasOwnProperty,MR=Gm.propertyIsEnumerable,jR=Id(function(){return arguments}())?Id:function(e){return wa(e)&&VR.call(e,"callee")&&!MR.call(e,"callee")},kR=jR;function $R(){return!1}var UR=$R,Hm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vd=Hm&&typeof module=="object"&&module&&!module.nodeType&&module,DR=Vd&&Vd.exports===Hm,Md=DR?Zt.Buffer:void 0,LR=Md?Md.isBuffer:void 0,BR=LR||UR,il=BR,FR=9007199254740991,NR=/^(?:0|[1-9]\d*)$/;function zR(e,t){var r=typeof e;return t=t??FR,!!t&&(r=="number"||r!="symbol"&&NR.test(e))&&e>-1&&e%1==0&&e<t}var GR=zR,HR=9007199254740991;function qR(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=HR}var qm=qR,WR="[object Arguments]",JR="[object Array]",YR="[object Boolean]",KR="[object Date]",QR="[object Error]",XR="[object Function]",ZR="[object Map]",eA="[object Number]",tA="[object Object]",rA="[object RegExp]",nA="[object Set]",aA="[object String]",oA="[object WeakMap]",sA="[object ArrayBuffer]",iA="[object DataView]",lA="[object Float32Array]",cA="[object Float64Array]",uA="[object Int8Array]",dA="[object Int16Array]",hA="[object Int32Array]",pA="[object Uint8Array]",mA="[object Uint8ClampedArray]",fA="[object Uint16Array]",gA="[object Uint32Array]",_e={};_e[lA]=_e[cA]=_e[uA]=_e[dA]=_e[hA]=_e[pA]=_e[mA]=_e[fA]=_e[gA]=!0;_e[WR]=_e[JR]=_e[sA]=_e[YR]=_e[iA]=_e[KR]=_e[QR]=_e[XR]=_e[ZR]=_e[eA]=_e[tA]=_e[rA]=_e[nA]=_e[aA]=_e[oA]=!1;function yA(e){return wa(e)&&qm(e.length)&&!!_e[ja(e)]}var bA=yA;function xA(e){return function(t){return e(t)}}var vA=xA,Wm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,la=Wm&&typeof module=="object"&&module&&!module.nodeType&&module,SA=la&&la.exports===Wm,_i=SA&&Lm.process,wA=function(){try{var e=la&&la.require&&la.require("util").types;return e||_i&&_i.binding&&_i.binding("util")}catch{}}(),jd=wA,kd=jd&&jd.isTypedArray,CA=kd?vA(kd):bA,Jm=CA,OA=Object.prototype,TA=OA.hasOwnProperty;function PA(e,t){var r=Ko(e),n=!r&&kR(e),a=!r&&!n&&il(e),o=!r&&!n&&!a&&Jm(e),s=r||n||a||o,i=s?AR(e.length,String):[],l=i.length;for(var c in e)(t||TA.call(e,c))&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||GR(c,l)))&&i.push(c);return i}var RA=PA,AA=Object.prototype;function _A(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||AA;return e===r}var EA=_A;function IA(e,t){return function(r){return e(t(r))}}var VA=IA,MA=VA(Object.keys,Object),jA=MA,kA=Object.prototype,$A=kA.hasOwnProperty;function UA(e){if(!EA(e))return jA(e);var t=[];for(var r in Object(e))$A.call(e,r)&&r!="constructor"&&t.push(r);return t}var DA=UA;function LA(e){return e!=null&&qm(e.length)&&!Fm(e)}var BA=LA;function FA(e){return BA(e)?RA(e):DA(e)}var NA=FA;function zA(e){return bR(e,NA,PR)}var $d=zA,GA=1,HA=Object.prototype,qA=HA.hasOwnProperty;function WA(e,t,r,n,a,o){var s=r&GA,i=$d(e),l=i.length,c=$d(t),u=c.length;if(l!=u&&!s)return!1;for(var d=l;d--;){var h=i[d];if(!(s?h in t:qA.call(t,h)))return!1}var p=o.get(e),f=o.get(t);if(p&&f)return p==t&&f==e;var m=!0;o.set(e,t),o.set(t,e);for(var y=s;++d<l;){h=i[d];var S=e[h],A=t[h];if(n)var w=s?n(A,S,h,t,e,o):n(S,A,h,e,t,o);if(!(w===void 0?S===A||a(S,A,r,n,o):w)){m=!1;break}y||(y=h=="constructor")}if(m&&!y){var O=e.constructor,T=t.constructor;O!=T&&"constructor"in e&&"constructor"in t&&!(typeof O=="function"&&O instanceof O&&typeof T=="function"&&T instanceof T)&&(m=!1)}return o.delete(e),o.delete(t),m}var JA=WA,YA=En(Zt,"DataView"),ll=YA,KA=En(Zt,"Promise"),cl=KA,QA=En(Zt,"Set"),ul=QA,XA=En(Zt,"WeakMap"),dl=XA,Ud="[object Map]",ZA="[object Object]",Dd="[object Promise]",Ld="[object Set]",Bd="[object WeakMap]",Fd="[object DataView]",e2=Fr(ll),t2=Fr(va),r2=Fr(cl),n2=Fr(ul),a2=Fr(dl),vr=ja;(ll&&vr(new ll(new ArrayBuffer(1)))!=Fd||va&&vr(new va)!=Ud||cl&&vr(cl.resolve())!=Dd||ul&&vr(new ul)!=Ld||dl&&vr(new dl)!=Bd)&&(vr=function(e){var t=ja(e),r=t==ZA?e.constructor:void 0,n=r?Fr(r):"";if(n)switch(n){case e2:return Fd;case t2:return Ud;case r2:return Dd;case n2:return Ld;case a2:return Bd}return t});var Nd=vr,o2=1,zd="[object Arguments]",Gd="[object Array]",ao="[object Object]",s2=Object.prototype,Hd=s2.hasOwnProperty;function i2(e,t,r,n,a,o){var s=Ko(e),i=Ko(t),l=s?Gd:Nd(e),c=i?Gd:Nd(t);l=l==zd?ao:l,c=c==zd?ao:c;var u=l==ao,d=c==ao,h=l==c;if(h&&il(e)){if(!il(t))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new Ri),s||Jm(e)?zm(e,t,r,n,a,o):pR(e,t,l,r,n,a,o);if(!(r&o2)){var p=u&&Hd.call(e,"__wrapped__"),f=d&&Hd.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,y=f?t.value():t;return o||(o=new Ri),a(m,y,r,n,o)}}return h?(o||(o=new Ri),JA(e,t,r,n,a,o)):!1}var l2=i2;function Ym(e,t,r,n,a){return e===t?!0:e==null||t==null||!wa(e)&&!wa(t)?e!==e&&t!==t:l2(e,t,r,n,Ym,a)}var c2=Ym;function u2(e,t){return c2(e,t)}var d2=u2;/*! *****************************************************************************
128
128
  Copyright (c) Microsoft Corporation. All rights reserved.