@openremote/or-gauge 1.17.2 → 1.17.3

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,4 +1,4 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("ORModel"),require("ORTranslate"),require("ORIcon"),require("ORCore")):"function"==typeof define&&define.amd?define(["ORModel","ORTranslate","ORIcon","ORCore"],e):"object"==typeof exports?exports.ORGauge=e(require("ORModel"),require("ORTranslate"),require("ORIcon"),require("ORCore")):t.ORGauge=e(t.ORModel,t.ORTranslate,t.ORIcon,t.ORCore)}(self,(t,e,i,s)=>(()=>{var n={1(t){(function(){var e,i,s,n,o,r,a,h,l,u,p,c,d=[].slice,g={}.hasOwnProperty,f=function(t,e){for(var i in e)g.call(e,i)&&(t[i]=e[i]);function s(){this.constructor=t}return s.prototype=e.prototype,t.prototype=new s,t.__super__=e.prototype,t},m=[].indexOf||function(t){for(var e=0,i=this.length;e<i;e++)if(e in this&&this[e]===t)return e;return -1};!function(){var t,e,i,s,n,o,r;for(i=0,n=(r=["ms","moz","webkit","o"]).length;i<n&&(o=r[i],!window.requestAnimationFrame);i++)window.requestAnimationFrame=window[o+"RequestAnimationFrame"],window.cancelAnimationFrame=window[o+"CancelAnimationFrame"]||window[o+"CancelRequestAnimationFrame"];t=null,s=0,e={},requestAnimationFrame?window.cancelAnimationFrame||(t=window.requestAnimationFrame,window.requestAnimationFrame=function(i,n){var o;return o=++s,t(function(){if(!e[o])return i()},n),o},window.cancelAnimationFrame=function(t){return e[t]=!0}):(window.requestAnimationFrame=function(t,e){var i,s,n,o;return o=Math.max(0,16-((i=new Date().getTime())-n)),s=window.setTimeout(function(){return t(i+o)},o),n=i+o,s},window.cancelAnimationFrame=function(t){return clearTimeout(t)})}(),c=function(t){var e,i;for(e=Math.floor(t/3600),i=Math.floor((t-3600*e)/60),t-=3600*e+60*i,t+="",i+="";i.length<2;)i="0"+i;for(;t.length<2;)t="0"+t;return(e=e?e+":":"")+i+":"+t},u=function(){var t,e,i;return e=1<=arguments.length?d.call(arguments,0):[],i=e[0],t=e[1],h(i.toFixed(t))},p=function(t,e){var i,s,n;for(i in s={},t)g.call(t,i)&&(n=t[i],s[i]=n);for(i in e)g.call(e,i)&&(n=e[i],s[i]=n);return s},h=function(t){var e,i,s,n;for(t+="",s=(i=t.split("."))[0],n="",i.length>1&&(n="."+i[1]),e=/(\d+)(\d{3})/;e.test(s);)s=s.replace(e,"$1,$2");return s+n},l=function(t){return"#"===t.charAt(0)?t.substring(1,7):t},i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),e.prototype.displayScale=1,e.prototype.forceUpdate=!0,e.prototype.setTextField=function(t,e){return this.textField=t instanceof r?t:new r(t,e)},e.prototype.setMinValue=function(t,e){var i,s,n,o,r;if(this.minValue=t,null==e&&(e=!0),e){for(s=0,this.displayedValue=this.minValue,o=this.gp||[],r=[],n=o.length;s<n;s++)i=o[s],r.push(i.displayedValue=this.minValue);return r}},e.prototype.setOptions=function(t){return null==t&&(t=null),this.options=p(this.options,t),this.textField&&(this.textField.el.style.fontSize=t.fontSize+"px"),this.options.angle>.5&&(this.options.angle=.5),this.configDisplayScale(),this},e.prototype.configDisplayScale=function(){var t,e,i,s,n;return s=this.displayScale,!1===this.options.highDpiSupport?delete this.displayScale:(e=window.devicePixelRatio||1,t=this.ctx.webkitBackingStorePixelRatio||this.ctx.mozBackingStorePixelRatio||this.ctx.msBackingStorePixelRatio||this.ctx.oBackingStorePixelRatio||this.ctx.backingStorePixelRatio||1,this.displayScale=e/t),this.displayScale!==s&&(n=this.canvas.G__width||this.canvas.width,i=this.canvas.G__height||this.canvas.height,this.canvas.width=n*this.displayScale,this.canvas.height=i*this.displayScale,this.canvas.style.width=n+"px",this.canvas.style.height=i+"px",this.canvas.G__width=n,this.canvas.G__height=i),this},e.prototype.parseValue=function(t){return isFinite(t=parseFloat(t)||Number(t))?t:0},e}(a=function(){function t(t,e){null==t&&(t=!0),this.clear=null==e||e,t&&AnimationUpdater.add(this)}return t.prototype.animationSpeed=32,t.prototype.update=function(t){var e;return null==t&&(t=!1),(!!t||this.displayedValue!==this.value)&&(this.ctx&&this.clear&&this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),.001>=Math.abs((e=this.value-this.displayedValue)/this.animationSpeed)?this.displayedValue=this.value:this.displayedValue=this.displayedValue+e/this.animationSpeed,this.render(),!0)},t}()),r=function(){function t(t,e){this.el=t,this.fractionDigits=e}return t.prototype.render=function(t){return this.el.innerHTML=u(t.displayedValue,this.fractionDigits)},t}(),function(t){function e(t,i){if(this.elem=t,this.text=null!=i&&i,e.__super__.constructor.call(this),void 0===this.elem)throw Error("The element isn't defined.");this.value=+this.elem.innerHTML,this.text&&(this.value=0)}f(e,t),e.prototype.displayedValue=0,e.prototype.value=0,e.prototype.setVal=function(t){return this.value=+t},e.prototype.render=function(){var t;return t=this.text?c(this.displayedValue.toFixed(0)):h(u(this.displayedValue)),this.elem.innerHTML=t}}(a),o=function(t){function e(t){if(this.gauge=t,void 0===this.gauge)throw Error("The element isn't defined.");this.ctx=this.gauge.ctx,this.canvas=this.gauge.canvas,e.__super__.constructor.call(this,!1,!1),this.setOptions()}return f(e,t),e.prototype.displayedValue=0,e.prototype.value=0,e.prototype.options={strokeWidth:.035,length:.1,color:"#000000",iconPath:null,iconScale:1,iconAngle:0},e.prototype.img=null,e.prototype.setOptions=function(t){if(null==t&&(t=null),this.options=p(this.options,t),this.length=2*this.gauge.radius*this.gauge.options.radiusScale*this.options.length,this.strokeWidth=this.canvas.height*this.options.strokeWidth,this.maxValue=this.gauge.maxValue,this.minValue=this.gauge.minValue,this.animationSpeed=this.gauge.animationSpeed,this.options.angle=this.gauge.options.angle,this.options.iconPath)return this.img=new Image,this.img.src=this.options.iconPath},e.prototype.render=function(){var t,e,i,s,n,o,r,a,h;if(t=this.gauge.getAngle.call(this,this.displayedValue),a=Math.round(this.length*Math.cos(t)),h=Math.round(this.length*Math.sin(t)),o=Math.round(this.strokeWidth*Math.cos(t-Math.PI/2)),r=Math.round(this.strokeWidth*Math.sin(t-Math.PI/2)),e=Math.round(this.strokeWidth*Math.cos(t+Math.PI/2)),i=Math.round(this.strokeWidth*Math.sin(t+Math.PI/2)),this.ctx.beginPath(),this.ctx.fillStyle=this.options.color,this.ctx.arc(0,0,this.strokeWidth,0,2*Math.PI,!1),this.ctx.fill(),this.ctx.beginPath(),this.ctx.moveTo(o,r),this.ctx.lineTo(a,h),this.ctx.lineTo(e,i),this.ctx.fill(),this.img)return s=Math.round(this.img.width*this.options.iconScale),n=Math.round(this.img.height*this.options.iconScale),this.ctx.save(),this.ctx.translate(a,h),this.ctx.rotate(t+Math.PI/180*(90+this.options.iconAngle)),this.ctx.drawImage(this.img,-s/2,-n/2,s,n),this.ctx.restore()},e}(a),function(){function t(t){this.elem=t}t.prototype.updateValues=function(t){return this.value=t[0],this.maxValue=t[1],this.avgValue=t[2],this.render()},t.prototype.render=function(){var t,e;return this.textField&&this.textField.text(u(this.value)),0===this.maxValue&&(this.maxValue=2*this.avgValue),e=this.value/this.maxValue*100,t=this.avgValue/this.maxValue*100,$(".bar-value",this.elem).css({width:e+"%"}),$(".typical-value",this.elem).css({width:t+"%"})}}(),n=function(t){function e(t){var i,s;this.canvas=t,e.__super__.constructor.call(this),this.percentColors=null,"u">typeof G_vmlCanvasManager&&(this.canvas=window.G_vmlCanvasManager.initElement(this.canvas)),this.ctx=this.canvas.getContext("2d"),i=this.canvas.clientHeight,s=this.canvas.clientWidth,this.canvas.height=i,this.canvas.width=s,this.gp=[new o(this)],this.setOptions()}return f(e,t),e.prototype.elem=null,e.prototype.value=[20],e.prototype.maxValue=80,e.prototype.minValue=0,e.prototype.displayedAngle=0,e.prototype.displayedValue=0,e.prototype.lineWidth=40,e.prototype.paddingTop=.1,e.prototype.paddingBottom=.1,e.prototype.percentColors=null,e.prototype.options={colorStart:"#6fadcf",colorStop:void 0,gradientType:0,strokeColor:"#e0e0e0",pointer:{length:.8,strokeWidth:.035,iconScale:1},angle:.15,lineWidth:.44,radiusScale:1,fontSize:40,limitMax:!1,limitMin:!1},e.prototype.setOptions=function(t){var i,s,n,o,r;for(null==t&&(t=null),e.__super__.setOptions.call(this,t),this.configPercentColors(),this.extraPadding=0,this.options.angle<0&&(o=Math.PI*(1+this.options.angle),this.extraPadding=Math.sin(o)),this.availableHeight=this.canvas.height*(1-this.paddingTop-this.paddingBottom),this.lineWidth=this.availableHeight*this.options.lineWidth,this.radius=(this.availableHeight-this.lineWidth/2)/(1+this.extraPadding),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),s=0,n=(r=this.gp).length;s<n;s++)(i=r[s]).setOptions(this.options.pointer),i.render();return this.render(),this},e.prototype.configPercentColors=function(){var t,e,i,s,n,o,r;if(this.percentColors=null,void 0!==this.options.percentColors){for(this.percentColors=[],o=[],i=s=0,n=this.options.percentColors.length-1;0<=n?s<=n:s>=n;i=0<=n?++s:--s)r=parseInt(l(this.options.percentColors[i][1]).substring(0,2),16),e=parseInt(l(this.options.percentColors[i][1]).substring(2,4),16),t=parseInt(l(this.options.percentColors[i][1]).substring(4,6),16),o.push(this.percentColors[i]={pct:this.options.percentColors[i][0],color:{r:r,g:e,b:t}});return o}},e.prototype.set=function(t){var e,i,s,n,r,a,h,l,u;for(t instanceof Array||(t=[t]),i=s=0,h=t.length-1;0<=h?s<=h:s>=h;i=0<=h?++s:--s)t[i]=this.parseValue(t[i]);if(t.length>this.gp.length)for(i=n=0,l=t.length-this.gp.length;0<=l?n<l:n>l;i=0<=l?++n:--n)(e=new o(this)).setOptions(this.options.pointer),this.gp.push(e);else t.length<this.gp.length&&(this.gp=this.gp.slice(this.gp.length-t.length));for(a=0,i=0,r=t.length;a<r;a++)(u=t[a])>this.maxValue?this.options.limitMax?u=this.maxValue:this.maxValue=u+1:u<this.minValue&&(this.options.limitMin?u=this.minValue:this.minValue=u-1),this.gp[i].value=u,this.gp[i++].setOptions({minValue:this.minValue,maxValue:this.maxValue,angle:this.options.angle});return this.value=Math.max(Math.min(t[t.length-1],this.maxValue),this.minValue),AnimationUpdater.add(this),AnimationUpdater.run(this.forceUpdate),this.forceUpdate=!1},e.prototype.getAngle=function(t){return(1+this.options.angle)*Math.PI+(t-this.minValue)/(this.maxValue-this.minValue)*(1-2*this.options.angle)*Math.PI},e.prototype.getColorForPercentage=function(t,e){var i,s,n,o,r,a,h;if(0===t)i=this.percentColors[0].color;else for(i=this.percentColors[this.percentColors.length-1].color,n=o=0,a=this.percentColors.length-1;0<=a?o<=a:o>=a;n=0<=a?++o:--o)if(t<=this.percentColors[n].pct){!0===e?(h=this.percentColors[n-1]||this.percentColors[0],s=this.percentColors[n],r=(t-h.pct)/(s.pct-h.pct),i={r:Math.floor(h.color.r*(1-r)+s.color.r*r),g:Math.floor(h.color.g*(1-r)+s.color.g*r),b:Math.floor(h.color.b*(1-r)+s.color.b*r)}):i=this.percentColors[n].color;break}return"rgb("+[i.r,i.g,i.b].join(",")+")"},e.prototype.getColorForValue=function(t,e){var i;return i=(t-this.minValue)/(this.maxValue-this.minValue),this.getColorForPercentage(i,e)},e.prototype.renderStaticLabels=function(t,e,i,s){var n,o,r,a,h,l,p,c,d,g;for(this.ctx.save(),this.ctx.translate(e,i),n=t.font||"10px Times",l=/\d+\.?\d?/,h=n.match(l)[0],c=n.slice(h.length),o=parseFloat(h)*this.displayScale,this.ctx.font=o+c,this.ctx.fillStyle=t.color||"#000000",this.ctx.textBaseline="bottom",this.ctx.textAlign="center",r=0,a=(p=t.labels).length;r<a;r++)void 0!==(g=p[r]).label?(!this.options.limitMin||g>=this.minValue)&&(!this.options.limitMax||g<=this.maxValue)&&(h=(n=g.font||t.font).match(l)[0],c=n.slice(h.length),o=parseFloat(h)*this.displayScale,this.ctx.font=o+c,d=this.getAngle(g.label)-3*Math.PI/2,this.ctx.rotate(d),this.ctx.fillText(u(g.label,t.fractionDigits),0,-s-this.lineWidth/2),this.ctx.rotate(-d)):(!this.options.limitMin||g>=this.minValue)&&(!this.options.limitMax||g<=this.maxValue)&&(d=this.getAngle(g)-3*Math.PI/2,this.ctx.rotate(d),this.ctx.fillText(u(g,t.fractionDigits),0,-s-this.lineWidth/2),this.ctx.rotate(-d));return this.ctx.restore()},e.prototype.renderTicks=function(t,e,i,s){var n,o,r,a,h,l,u,p,c,d,g,f,m,v,y,x,_,A,b,S;if(t!=={}){for(l=t.divisions||0,A=t.subDivisions||0,r=t.divColor||"#fff",v=t.subColor||"#fff",a=t.divLength||.7,x=t.subLength||.2,y=parseFloat(d=parseFloat(c=parseFloat(this.maxValue)-parseFloat(this.minValue))/parseFloat(t.divisions))/parseFloat(t.subDivisions),n=parseFloat(this.minValue),o=0+y,h=(p=c/400)*(t.divWidth||1),_=p*(t.subWidth||1),f=[],b=u=0,g=l+1;u<g;b=u+=1)this.ctx.lineWidth=this.lineWidth*a,m=this.lineWidth/2*(1-a),S=this.radius*this.options.radiusScale+m,this.ctx.strokeStyle=r,this.ctx.beginPath(),this.ctx.arc(0,0,S,this.getAngle(n-h),this.getAngle(n+h),!1),this.ctx.stroke(),o=n+y,n+=d,b!==t.divisions&&A>0?f.push((function(){var t,e,i;for(i=[],t=0,e=A-1;t<e;t+=1)this.ctx.lineWidth=this.lineWidth*x,m=this.lineWidth/2*(1-x),S=this.radius*this.options.radiusScale+m,this.ctx.strokeStyle=v,this.ctx.beginPath(),this.ctx.arc(0,0,S,this.getAngle(o-_),this.getAngle(o+_),!1),this.ctx.stroke(),i.push(o+=y);return i}).call(this)):f.push(void 0);return f}},e.prototype.render=function(){var t,e,i,s,n,o,r,a,h,l,u,p,c,d,g,f;if(g=this.canvas.width/2,i=this.canvas.height*this.paddingTop+this.availableHeight-(this.radius+this.lineWidth/2)*this.extraPadding,t=this.getAngle(this.displayedValue),this.textField&&this.textField.render(this),this.ctx.lineCap="butt",l=this.radius*this.options.radiusScale,this.options.staticLabels&&this.renderStaticLabels(this.options.staticLabels,g,i,l),this.options.staticZones)for(this.ctx.save(),this.ctx.translate(g,i),this.ctx.lineWidth=this.lineWidth,s=0,o=(u=this.options.staticZones).length;s<o;s++)h=(f=u[s]).min,this.options.limitMin&&h<this.minValue&&(h=this.minValue),a=f.max,this.options.limitMax&&a>this.maxValue&&(a=this.maxValue),d=this.radius*this.options.radiusScale,f.height&&(this.ctx.lineWidth=this.lineWidth*f.height,c=this.lineWidth/2*(f.offset||1-f.height),d=this.radius*this.options.radiusScale+c),this.ctx.strokeStyle=f.strokeStyle,this.ctx.beginPath(),this.ctx.arc(0,0,d,this.getAngle(h),this.getAngle(a),!1),this.ctx.stroke();else void 0!==this.options.customFillStyle?e=this.options.customFillStyle(this):null!==this.percentColors?e=this.getColorForValue(this.displayedValue,this.options.generateGradient):void 0!==this.options.colorStop?((e=0===this.options.gradientType?this.ctx.createRadialGradient(g,i,9,g,i,70):this.ctx.createLinearGradient(0,0,g,0)).addColorStop(0,this.options.colorStart),e.addColorStop(1,this.options.colorStop)):e=this.options.colorStart,this.ctx.strokeStyle=e,this.ctx.beginPath(),this.ctx.arc(g,i,l,(1+this.options.angle)*Math.PI,t,!1),this.ctx.lineWidth=this.lineWidth,this.ctx.stroke(),this.ctx.strokeStyle=this.options.strokeColor,this.ctx.beginPath(),this.ctx.arc(g,i,l,t,(2-this.options.angle)*Math.PI,!1),this.ctx.stroke(),this.ctx.save(),this.ctx.translate(g,i);for(this.options.renderTicks&&this.renderTicks(this.options.renderTicks,g,i,l),this.ctx.restore(),this.ctx.translate(g,i),n=0,r=(p=this.gp).length;n<r;n++)p[n].update(!0);return this.ctx.translate(-g,-i)},e}(i),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),e.prototype.strokeGradient=function(t,e,i,s){var n;return(n=this.ctx.createRadialGradient(t,e,i,t,e,s)).addColorStop(0,this.options.shadowColor),n.addColorStop(.12,this.options._orgStrokeColor),n.addColorStop(.88,this.options._orgStrokeColor),n.addColorStop(1,this.options.shadowColor),n},e.prototype.setOptions=function(t){var i,s,n,o;return null==t&&(t=null),e.__super__.setOptions.call(this,t),o=this.canvas.width/2,i=this.canvas.height/2,s=this.radius-this.lineWidth/2,n=this.radius+this.lineWidth/2,this.options._orgStrokeColor=this.options.strokeColor,this.options.strokeColor=this.strokeGradient(o,i,s,n),this},e}(e=function(t){function e(t){this.canvas=t,e.__super__.constructor.call(this),"u">typeof G_vmlCanvasManager&&(this.canvas=window.G_vmlCanvasManager.initElement(this.canvas)),this.ctx=this.canvas.getContext("2d"),this.setOptions(),this.render()}return f(e,t),e.prototype.lineWidth=15,e.prototype.displayedValue=0,e.prototype.value=33,e.prototype.maxValue=80,e.prototype.minValue=0,e.prototype.options={lineWidth:.1,colorStart:"#6f6ea0",colorStop:"#c0c0db",strokeColor:"#eeeeee",shadowColor:"#d5d5d5",angle:.35,radiusScale:1},e.prototype.getAngle=function(t){return(1-this.options.angle)*Math.PI+(t-this.minValue)/(this.maxValue-this.minValue)*(2+this.options.angle-(1-this.options.angle))*Math.PI},e.prototype.setOptions=function(t){return null==t&&(t=null),e.__super__.setOptions.call(this,t),this.lineWidth=this.canvas.height*this.options.lineWidth,this.radius=this.options.radiusScale*(this.canvas.height/2-this.lineWidth/2),this},e.prototype.set=function(t){return this.value=this.parseValue(t),this.value>this.maxValue?this.options.limitMax?this.value=this.maxValue:this.maxValue=this.value:this.value<this.minValue&&(this.options.limitMin?this.value=this.minValue:this.minValue=this.value),AnimationUpdater.add(this),AnimationUpdater.run(this.forceUpdate),this.forceUpdate=!1},e.prototype.render=function(){var t,e,i,s;return t=this.getAngle(this.displayedValue),s=this.canvas.width/2,i=this.canvas.height/2,this.textField&&this.textField.render(this),(e=this.ctx.createRadialGradient(s,i,39,s,i,70)).addColorStop(0,this.options.colorStart),e.addColorStop(1,this.options.colorStop),this.radius,this.lineWidth,this.radius,this.lineWidth,this.ctx.strokeStyle=this.options.strokeColor,this.ctx.beginPath(),this.ctx.arc(s,i,this.radius,(1-this.options.angle)*Math.PI,(2+this.options.angle)*Math.PI,!1),this.ctx.lineWidth=this.lineWidth,this.ctx.lineCap="round",this.ctx.stroke(),this.ctx.strokeStyle=e,this.ctx.beginPath(),this.ctx.arc(s,i,this.radius,(1-this.options.angle)*Math.PI,t,!1),this.ctx.stroke()},e}(i)),window.AnimationUpdater={elements:[],animId:null,addAll:function(t){var e,i,s,n;for(i=0,n=[],s=t.length;i<s;i++)e=t[i],n.push(AnimationUpdater.elements.push(e));return n},add:function(t){if(0>m.call(AnimationUpdater.elements,t))return AnimationUpdater.elements.push(t)},run:function(t){var e,i,s,n,o,r,a;if(null==t&&(t=!1),isFinite(parseFloat(t))||!0===t){for(e=!0,a=[],r=AnimationUpdater.elements,s=i=0,o=r.length;i<o;s=++i)r[s].update(!0===t)?e=!1:a.push(s);for(n=a.length-1;n>=0;n+=-1)s=a[n],AnimationUpdater.elements.splice(s,1);return AnimationUpdater.animId=e?null:requestAnimationFrame(AnimationUpdater.run)}if(!1===t)return!0===AnimationUpdater.animId&&cancelAnimationFrame(AnimationUpdater.animId),AnimationUpdater.animId=requestAnimationFrame(AnimationUpdater.run)}},"function"==typeof window.define&&null!=window.define.amd?define(function(){return{Gauge:n,Donut:s,BaseDonut:e,TextRenderer:r}}):null!=t.exports?t.exports={Gauge:n,Donut:s,BaseDonut:e,TextRenderer:r}:(window.Gauge=n,window.Donut=s,window.BaseDonut=e,window.TextRenderer=r)}).call(this)},51(t,e,i){var s=0/0,n=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,a=/^0o[0-7]+$/i,h=parseInt,l="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g,u="object"==typeof self&&self&&self.Object===Object&&self,p=l||u||Function("return this")(),c=Object.prototype.toString,d=Math.max,g=Math.min,f=function(){return p.Date.now()};function m(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function v(t){if("number"==typeof t)return t;if("symbol"==typeof(e=t)||e&&"object"==typeof e&&"[object Symbol]"==c.call(e))return s;if(m(t)){var e,i="function"==typeof t.valueOf?t.valueOf():t;t=m(i)?i+"":i}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(n,"");var l=r.test(t);return l||a.test(t)?h(t.slice(2),l?2:8):o.test(t)?s:+t}t.exports=function(t,e,i){var s,n,o,r,a,h,l=0,u=!1,p=!1,c=!0;if("function"!=typeof t)throw TypeError("Expected a function");function y(e){var i=s,o=n;return s=n=void 0,l=e,r=t.apply(o,i)}function x(t){var i=t-h,s=t-l;return void 0===h||i>=e||i<0||p&&s>=o}function _(){var t,i,s,n=f();if(x(n))return A(n);a=setTimeout(_,(t=n-h,i=n-l,s=e-t,p?g(s,o-i):s))}function A(t){return(a=void 0,c&&s)?y(t):(s=n=void 0,r)}function b(){var t,i=f(),o=x(i);if(s=arguments,n=this,h=i,o){if(void 0===a)return l=t=h,a=setTimeout(_,e),u?y(t):r;if(p)return a=setTimeout(_,e),y(h)}return void 0===a&&(a=setTimeout(_,e)),r}return e=v(e)||0,m(i)&&(u=!!i.leading,o=(p="maxWait"in i)?d(v(i.maxWait)||0,e):o,c="trailing"in i?!!i.trailing:c),b.cancel=function(){void 0!==a&&clearTimeout(a),l=0,s=h=n=a=void 0},b.flush=function(){return void 0===a?r:A(f())},b}},954(t){"use strict";t.exports=s},368(t){"use strict";t.exports=i},650(e){"use strict";e.exports=t},673(t){"use strict";t.exports=e}},o={};function r(t){var e=o[t];if(void 0!==e)return e.exports;var i=o[t]={exports:{}};return n[t].call(i.exports,i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(t){if("object"==typeof window)return window}})(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var a={};return(()=>{"use strict";let t;r.r(a),r.d(a,{OrGauge:()=>tS});let e=globalThis,i=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),n=new WeakMap;class o{constructor(t,e,i){if(this._$cssResult$=!0,i!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(i&&void 0===t){let i=void 0!==e&&1===e.length;i&&(t=n.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&n.set(e,t))}return t}toString(){return this.cssText}}let h=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e,i="";for(let e of t.cssRules)i+=e.cssText;return new o("string"==typeof(e=i)?e:e+"",void 0,s)})(t):t,{is:l,defineProperty:u,getOwnPropertyDescriptor:p,getOwnPropertyNames:c,getOwnPropertySymbols:d,getPrototypeOf:g}=Object,f=globalThis,m=f.trustedTypes,v=m?m.emptyScript:"",y=f.reactiveElementPolyfillSupport,x={toAttribute(t,e){switch(e){case Boolean:t=t?v:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},_=(t,e)=>!l(t,e),A={attribute:!0,type:String,converter:x,reflect:!1,useDefault:!1,hasChanged:_};Symbol.metadata??=Symbol("metadata"),f.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=A){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&u(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){let{get:s,set:n}=p(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:s,set(e){let o=s?.call(this);n?.call(this,e),this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??A}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;let t=g(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){let t=this.properties;for(let e of[...c(t),...d(t)])this.createProperty(e,t[e])}let t=this[Symbol.metadata];if(null!==t){let e=litPropertyMetadata.get(t);if(void 0!==e)for(let[t,i]of e)this.elementProperties.set(t,i)}for(let[t,e]of(this._$Eh=new Map,this.elementProperties)){let i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t))for(let i of new Set(t.flat(1/0).reverse()))e.unshift(h(i));else void 0!==t&&e.push(h(t));return e}static _$Eu(t,e){let i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map;for(let e of this.constructor.elementProperties.keys())this.hasOwnProperty(e)&&(t.set(e,this[e]),delete this[e]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,s)=>{if(i)t.adoptedStyleSheets=s.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let i of s){let s=document.createElement("style"),n=e.litNonce;void 0!==n&&s.setAttribute("nonce",n),s.textContent=i.cssText,t.appendChild(s)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){let i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(void 0!==s&&!0===i.reflect){let n=(void 0!==i.converter?.toAttribute?i.converter:x).toAttribute(e,i.type);this._$Em=t,null==n?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(t,e){let i=this.constructor,s=i._$Eh.get(t);if(void 0!==s&&this._$Em!==s){let t=i.getPropertyOptions(s),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:x;this._$Em=s;let o=n.fromAttribute(e,t.type);this[s]=o??this._$Ej?.get(s)??o,this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){let s=this.constructor,n=this[t];if(!(((i??=s.getPropertyOptions(t)).hasChanged??_)(n,e)||i.useDefault&&i.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(s._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:n},o){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),!0!==n||void 0!==o)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}let t=this.constructor.elementProperties;if(t.size>0)for(let[e,i]of t){let{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let t=!1,e=this._$AL;try{(t=this.shouldUpdate(e))?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:"open"},b.elementProperties=new Map,b.finalized=new Map,y?.({ReactiveElement:b}),(f.reactiveElementVersions??=[]).push("2.1.1");let S=globalThis,w=S.trustedTypes,C=w?w.createPolicy("lit-html",{createHTML:t=>t}):void 0,M="$lit$",P=`lit$${Math.random().toFixed(9).slice(2)}$`,E="?"+P,O=`<${E}>`,V=document,R=()=>V.createComment(""),T=t=>null===t||"object"!=typeof t&&"function"!=typeof t,U=Array.isArray,k="[ \n\f\r]",W=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,F=/-->/g,j=/>/g,I=RegExp(`>|${k}(?:([^\\s"'>=/]+)(${k}*=${k}*(?:[^
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("ORModel"),require("ORCore"),require("ORTranslate"),require("ORIcon")):"function"==typeof define&&define.amd?define(["ORModel","ORCore","ORTranslate","ORIcon"],e):"object"==typeof exports?exports.ORGauge=e(require("ORModel"),require("ORCore"),require("ORTranslate"),require("ORIcon")):t.ORGauge=e(t.ORModel,t.ORCore,t.ORTranslate,t.ORIcon)}(self,(t,e,i,s)=>(()=>{var n={1(t){(function(){var e,i,s,n,o,r,a,h,l,u,p,c,d=[].slice,g={}.hasOwnProperty,f=function(t,e){for(var i in e)g.call(e,i)&&(t[i]=e[i]);function s(){this.constructor=t}return s.prototype=e.prototype,t.prototype=new s,t.__super__=e.prototype,t},m=[].indexOf||function(t){for(var e=0,i=this.length;e<i;e++)if(e in this&&this[e]===t)return e;return -1};!function(){var t,e,i,s,n,o,r;for(i=0,n=(r=["ms","moz","webkit","o"]).length;i<n&&(o=r[i],!window.requestAnimationFrame);i++)window.requestAnimationFrame=window[o+"RequestAnimationFrame"],window.cancelAnimationFrame=window[o+"CancelAnimationFrame"]||window[o+"CancelRequestAnimationFrame"];t=null,s=0,e={},requestAnimationFrame?window.cancelAnimationFrame||(t=window.requestAnimationFrame,window.requestAnimationFrame=function(i,n){var o;return o=++s,t(function(){if(!e[o])return i()},n),o},window.cancelAnimationFrame=function(t){return e[t]=!0}):(window.requestAnimationFrame=function(t,e){var i,s,n,o;return o=Math.max(0,16-((i=new Date().getTime())-n)),s=window.setTimeout(function(){return t(i+o)},o),n=i+o,s},window.cancelAnimationFrame=function(t){return clearTimeout(t)})}(),c=function(t){var e,i;for(e=Math.floor(t/3600),i=Math.floor((t-3600*e)/60),t-=3600*e+60*i,t+="",i+="";i.length<2;)i="0"+i;for(;t.length<2;)t="0"+t;return(e=e?e+":":"")+i+":"+t},u=function(){var t,e,i;return e=1<=arguments.length?d.call(arguments,0):[],i=e[0],t=e[1],h(i.toFixed(t))},p=function(t,e){var i,s,n;for(i in s={},t)g.call(t,i)&&(n=t[i],s[i]=n);for(i in e)g.call(e,i)&&(n=e[i],s[i]=n);return s},h=function(t){var e,i,s,n;for(t+="",s=(i=t.split("."))[0],n="",i.length>1&&(n="."+i[1]),e=/(\d+)(\d{3})/;e.test(s);)s=s.replace(e,"$1,$2");return s+n},l=function(t){return"#"===t.charAt(0)?t.substring(1,7):t},i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),e.prototype.displayScale=1,e.prototype.forceUpdate=!0,e.prototype.setTextField=function(t,e){return this.textField=t instanceof r?t:new r(t,e)},e.prototype.setMinValue=function(t,e){var i,s,n,o,r;if(this.minValue=t,null==e&&(e=!0),e){for(s=0,this.displayedValue=this.minValue,o=this.gp||[],r=[],n=o.length;s<n;s++)i=o[s],r.push(i.displayedValue=this.minValue);return r}},e.prototype.setOptions=function(t){return null==t&&(t=null),this.options=p(this.options,t),this.textField&&(this.textField.el.style.fontSize=t.fontSize+"px"),this.options.angle>.5&&(this.options.angle=.5),this.configDisplayScale(),this},e.prototype.configDisplayScale=function(){var t,e,i,s,n;return s=this.displayScale,!1===this.options.highDpiSupport?delete this.displayScale:(e=window.devicePixelRatio||1,t=this.ctx.webkitBackingStorePixelRatio||this.ctx.mozBackingStorePixelRatio||this.ctx.msBackingStorePixelRatio||this.ctx.oBackingStorePixelRatio||this.ctx.backingStorePixelRatio||1,this.displayScale=e/t),this.displayScale!==s&&(n=this.canvas.G__width||this.canvas.width,i=this.canvas.G__height||this.canvas.height,this.canvas.width=n*this.displayScale,this.canvas.height=i*this.displayScale,this.canvas.style.width=n+"px",this.canvas.style.height=i+"px",this.canvas.G__width=n,this.canvas.G__height=i),this},e.prototype.parseValue=function(t){return isFinite(t=parseFloat(t)||Number(t))?t:0},e}(a=function(){function t(t,e){null==t&&(t=!0),this.clear=null==e||e,t&&AnimationUpdater.add(this)}return t.prototype.animationSpeed=32,t.prototype.update=function(t){var e;return null==t&&(t=!1),(!!t||this.displayedValue!==this.value)&&(this.ctx&&this.clear&&this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),.001>=Math.abs((e=this.value-this.displayedValue)/this.animationSpeed)?this.displayedValue=this.value:this.displayedValue=this.displayedValue+e/this.animationSpeed,this.render(),!0)},t}()),r=function(){function t(t,e){this.el=t,this.fractionDigits=e}return t.prototype.render=function(t){return this.el.innerHTML=u(t.displayedValue,this.fractionDigits)},t}(),function(t){function e(t,i){if(this.elem=t,this.text=null!=i&&i,e.__super__.constructor.call(this),void 0===this.elem)throw Error("The element isn't defined.");this.value=+this.elem.innerHTML,this.text&&(this.value=0)}f(e,t),e.prototype.displayedValue=0,e.prototype.value=0,e.prototype.setVal=function(t){return this.value=+t},e.prototype.render=function(){var t;return t=this.text?c(this.displayedValue.toFixed(0)):h(u(this.displayedValue)),this.elem.innerHTML=t}}(a),o=function(t){function e(t){if(this.gauge=t,void 0===this.gauge)throw Error("The element isn't defined.");this.ctx=this.gauge.ctx,this.canvas=this.gauge.canvas,e.__super__.constructor.call(this,!1,!1),this.setOptions()}return f(e,t),e.prototype.displayedValue=0,e.prototype.value=0,e.prototype.options={strokeWidth:.035,length:.1,color:"#000000",iconPath:null,iconScale:1,iconAngle:0},e.prototype.img=null,e.prototype.setOptions=function(t){if(null==t&&(t=null),this.options=p(this.options,t),this.length=2*this.gauge.radius*this.gauge.options.radiusScale*this.options.length,this.strokeWidth=this.canvas.height*this.options.strokeWidth,this.maxValue=this.gauge.maxValue,this.minValue=this.gauge.minValue,this.animationSpeed=this.gauge.animationSpeed,this.options.angle=this.gauge.options.angle,this.options.iconPath)return this.img=new Image,this.img.src=this.options.iconPath},e.prototype.render=function(){var t,e,i,s,n,o,r,a,h;if(t=this.gauge.getAngle.call(this,this.displayedValue),a=Math.round(this.length*Math.cos(t)),h=Math.round(this.length*Math.sin(t)),o=Math.round(this.strokeWidth*Math.cos(t-Math.PI/2)),r=Math.round(this.strokeWidth*Math.sin(t-Math.PI/2)),e=Math.round(this.strokeWidth*Math.cos(t+Math.PI/2)),i=Math.round(this.strokeWidth*Math.sin(t+Math.PI/2)),this.ctx.beginPath(),this.ctx.fillStyle=this.options.color,this.ctx.arc(0,0,this.strokeWidth,0,2*Math.PI,!1),this.ctx.fill(),this.ctx.beginPath(),this.ctx.moveTo(o,r),this.ctx.lineTo(a,h),this.ctx.lineTo(e,i),this.ctx.fill(),this.img)return s=Math.round(this.img.width*this.options.iconScale),n=Math.round(this.img.height*this.options.iconScale),this.ctx.save(),this.ctx.translate(a,h),this.ctx.rotate(t+Math.PI/180*(90+this.options.iconAngle)),this.ctx.drawImage(this.img,-s/2,-n/2,s,n),this.ctx.restore()},e}(a),function(){function t(t){this.elem=t}t.prototype.updateValues=function(t){return this.value=t[0],this.maxValue=t[1],this.avgValue=t[2],this.render()},t.prototype.render=function(){var t,e;return this.textField&&this.textField.text(u(this.value)),0===this.maxValue&&(this.maxValue=2*this.avgValue),e=this.value/this.maxValue*100,t=this.avgValue/this.maxValue*100,$(".bar-value",this.elem).css({width:e+"%"}),$(".typical-value",this.elem).css({width:t+"%"})}}(),n=function(t){function e(t){var i,s;this.canvas=t,e.__super__.constructor.call(this),this.percentColors=null,"u">typeof G_vmlCanvasManager&&(this.canvas=window.G_vmlCanvasManager.initElement(this.canvas)),this.ctx=this.canvas.getContext("2d"),i=this.canvas.clientHeight,s=this.canvas.clientWidth,this.canvas.height=i,this.canvas.width=s,this.gp=[new o(this)],this.setOptions()}return f(e,t),e.prototype.elem=null,e.prototype.value=[20],e.prototype.maxValue=80,e.prototype.minValue=0,e.prototype.displayedAngle=0,e.prototype.displayedValue=0,e.prototype.lineWidth=40,e.prototype.paddingTop=.1,e.prototype.paddingBottom=.1,e.prototype.percentColors=null,e.prototype.options={colorStart:"#6fadcf",colorStop:void 0,gradientType:0,strokeColor:"#e0e0e0",pointer:{length:.8,strokeWidth:.035,iconScale:1},angle:.15,lineWidth:.44,radiusScale:1,fontSize:40,limitMax:!1,limitMin:!1},e.prototype.setOptions=function(t){var i,s,n,o,r;for(null==t&&(t=null),e.__super__.setOptions.call(this,t),this.configPercentColors(),this.extraPadding=0,this.options.angle<0&&(o=Math.PI*(1+this.options.angle),this.extraPadding=Math.sin(o)),this.availableHeight=this.canvas.height*(1-this.paddingTop-this.paddingBottom),this.lineWidth=this.availableHeight*this.options.lineWidth,this.radius=(this.availableHeight-this.lineWidth/2)/(1+this.extraPadding),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),s=0,n=(r=this.gp).length;s<n;s++)(i=r[s]).setOptions(this.options.pointer),i.render();return this.render(),this},e.prototype.configPercentColors=function(){var t,e,i,s,n,o,r;if(this.percentColors=null,void 0!==this.options.percentColors){for(this.percentColors=[],o=[],i=s=0,n=this.options.percentColors.length-1;0<=n?s<=n:s>=n;i=0<=n?++s:--s)r=parseInt(l(this.options.percentColors[i][1]).substring(0,2),16),e=parseInt(l(this.options.percentColors[i][1]).substring(2,4),16),t=parseInt(l(this.options.percentColors[i][1]).substring(4,6),16),o.push(this.percentColors[i]={pct:this.options.percentColors[i][0],color:{r:r,g:e,b:t}});return o}},e.prototype.set=function(t){var e,i,s,n,r,a,h,l,u;for(t instanceof Array||(t=[t]),i=s=0,h=t.length-1;0<=h?s<=h:s>=h;i=0<=h?++s:--s)t[i]=this.parseValue(t[i]);if(t.length>this.gp.length)for(i=n=0,l=t.length-this.gp.length;0<=l?n<l:n>l;i=0<=l?++n:--n)(e=new o(this)).setOptions(this.options.pointer),this.gp.push(e);else t.length<this.gp.length&&(this.gp=this.gp.slice(this.gp.length-t.length));for(a=0,i=0,r=t.length;a<r;a++)(u=t[a])>this.maxValue?this.options.limitMax?u=this.maxValue:this.maxValue=u+1:u<this.minValue&&(this.options.limitMin?u=this.minValue:this.minValue=u-1),this.gp[i].value=u,this.gp[i++].setOptions({minValue:this.minValue,maxValue:this.maxValue,angle:this.options.angle});return this.value=Math.max(Math.min(t[t.length-1],this.maxValue),this.minValue),AnimationUpdater.add(this),AnimationUpdater.run(this.forceUpdate),this.forceUpdate=!1},e.prototype.getAngle=function(t){return(1+this.options.angle)*Math.PI+(t-this.minValue)/(this.maxValue-this.minValue)*(1-2*this.options.angle)*Math.PI},e.prototype.getColorForPercentage=function(t,e){var i,s,n,o,r,a,h;if(0===t)i=this.percentColors[0].color;else for(i=this.percentColors[this.percentColors.length-1].color,n=o=0,a=this.percentColors.length-1;0<=a?o<=a:o>=a;n=0<=a?++o:--o)if(t<=this.percentColors[n].pct){!0===e?(h=this.percentColors[n-1]||this.percentColors[0],s=this.percentColors[n],r=(t-h.pct)/(s.pct-h.pct),i={r:Math.floor(h.color.r*(1-r)+s.color.r*r),g:Math.floor(h.color.g*(1-r)+s.color.g*r),b:Math.floor(h.color.b*(1-r)+s.color.b*r)}):i=this.percentColors[n].color;break}return"rgb("+[i.r,i.g,i.b].join(",")+")"},e.prototype.getColorForValue=function(t,e){var i;return i=(t-this.minValue)/(this.maxValue-this.minValue),this.getColorForPercentage(i,e)},e.prototype.renderStaticLabels=function(t,e,i,s){var n,o,r,a,h,l,p,c,d,g;for(this.ctx.save(),this.ctx.translate(e,i),n=t.font||"10px Times",l=/\d+\.?\d?/,h=n.match(l)[0],c=n.slice(h.length),o=parseFloat(h)*this.displayScale,this.ctx.font=o+c,this.ctx.fillStyle=t.color||"#000000",this.ctx.textBaseline="bottom",this.ctx.textAlign="center",r=0,a=(p=t.labels).length;r<a;r++)void 0!==(g=p[r]).label?(!this.options.limitMin||g>=this.minValue)&&(!this.options.limitMax||g<=this.maxValue)&&(h=(n=g.font||t.font).match(l)[0],c=n.slice(h.length),o=parseFloat(h)*this.displayScale,this.ctx.font=o+c,d=this.getAngle(g.label)-3*Math.PI/2,this.ctx.rotate(d),this.ctx.fillText(u(g.label,t.fractionDigits),0,-s-this.lineWidth/2),this.ctx.rotate(-d)):(!this.options.limitMin||g>=this.minValue)&&(!this.options.limitMax||g<=this.maxValue)&&(d=this.getAngle(g)-3*Math.PI/2,this.ctx.rotate(d),this.ctx.fillText(u(g,t.fractionDigits),0,-s-this.lineWidth/2),this.ctx.rotate(-d));return this.ctx.restore()},e.prototype.renderTicks=function(t,e,i,s){var n,o,r,a,h,l,u,p,c,d,g,f,m,v,y,x,_,A,b,S;if(t!=={}){for(l=t.divisions||0,A=t.subDivisions||0,r=t.divColor||"#fff",v=t.subColor||"#fff",a=t.divLength||.7,x=t.subLength||.2,y=parseFloat(d=parseFloat(c=parseFloat(this.maxValue)-parseFloat(this.minValue))/parseFloat(t.divisions))/parseFloat(t.subDivisions),n=parseFloat(this.minValue),o=0+y,h=(p=c/400)*(t.divWidth||1),_=p*(t.subWidth||1),f=[],b=u=0,g=l+1;u<g;b=u+=1)this.ctx.lineWidth=this.lineWidth*a,m=this.lineWidth/2*(1-a),S=this.radius*this.options.radiusScale+m,this.ctx.strokeStyle=r,this.ctx.beginPath(),this.ctx.arc(0,0,S,this.getAngle(n-h),this.getAngle(n+h),!1),this.ctx.stroke(),o=n+y,n+=d,b!==t.divisions&&A>0?f.push((function(){var t,e,i;for(i=[],t=0,e=A-1;t<e;t+=1)this.ctx.lineWidth=this.lineWidth*x,m=this.lineWidth/2*(1-x),S=this.radius*this.options.radiusScale+m,this.ctx.strokeStyle=v,this.ctx.beginPath(),this.ctx.arc(0,0,S,this.getAngle(o-_),this.getAngle(o+_),!1),this.ctx.stroke(),i.push(o+=y);return i}).call(this)):f.push(void 0);return f}},e.prototype.render=function(){var t,e,i,s,n,o,r,a,h,l,u,p,c,d,g,f;if(g=this.canvas.width/2,i=this.canvas.height*this.paddingTop+this.availableHeight-(this.radius+this.lineWidth/2)*this.extraPadding,t=this.getAngle(this.displayedValue),this.textField&&this.textField.render(this),this.ctx.lineCap="butt",l=this.radius*this.options.radiusScale,this.options.staticLabels&&this.renderStaticLabels(this.options.staticLabels,g,i,l),this.options.staticZones)for(this.ctx.save(),this.ctx.translate(g,i),this.ctx.lineWidth=this.lineWidth,s=0,o=(u=this.options.staticZones).length;s<o;s++)h=(f=u[s]).min,this.options.limitMin&&h<this.minValue&&(h=this.minValue),a=f.max,this.options.limitMax&&a>this.maxValue&&(a=this.maxValue),d=this.radius*this.options.radiusScale,f.height&&(this.ctx.lineWidth=this.lineWidth*f.height,c=this.lineWidth/2*(f.offset||1-f.height),d=this.radius*this.options.radiusScale+c),this.ctx.strokeStyle=f.strokeStyle,this.ctx.beginPath(),this.ctx.arc(0,0,d,this.getAngle(h),this.getAngle(a),!1),this.ctx.stroke();else void 0!==this.options.customFillStyle?e=this.options.customFillStyle(this):null!==this.percentColors?e=this.getColorForValue(this.displayedValue,this.options.generateGradient):void 0!==this.options.colorStop?((e=0===this.options.gradientType?this.ctx.createRadialGradient(g,i,9,g,i,70):this.ctx.createLinearGradient(0,0,g,0)).addColorStop(0,this.options.colorStart),e.addColorStop(1,this.options.colorStop)):e=this.options.colorStart,this.ctx.strokeStyle=e,this.ctx.beginPath(),this.ctx.arc(g,i,l,(1+this.options.angle)*Math.PI,t,!1),this.ctx.lineWidth=this.lineWidth,this.ctx.stroke(),this.ctx.strokeStyle=this.options.strokeColor,this.ctx.beginPath(),this.ctx.arc(g,i,l,t,(2-this.options.angle)*Math.PI,!1),this.ctx.stroke(),this.ctx.save(),this.ctx.translate(g,i);for(this.options.renderTicks&&this.renderTicks(this.options.renderTicks,g,i,l),this.ctx.restore(),this.ctx.translate(g,i),n=0,r=(p=this.gp).length;n<r;n++)p[n].update(!0);return this.ctx.translate(-g,-i)},e}(i),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),e.prototype.strokeGradient=function(t,e,i,s){var n;return(n=this.ctx.createRadialGradient(t,e,i,t,e,s)).addColorStop(0,this.options.shadowColor),n.addColorStop(.12,this.options._orgStrokeColor),n.addColorStop(.88,this.options._orgStrokeColor),n.addColorStop(1,this.options.shadowColor),n},e.prototype.setOptions=function(t){var i,s,n,o;return null==t&&(t=null),e.__super__.setOptions.call(this,t),o=this.canvas.width/2,i=this.canvas.height/2,s=this.radius-this.lineWidth/2,n=this.radius+this.lineWidth/2,this.options._orgStrokeColor=this.options.strokeColor,this.options.strokeColor=this.strokeGradient(o,i,s,n),this},e}(e=function(t){function e(t){this.canvas=t,e.__super__.constructor.call(this),"u">typeof G_vmlCanvasManager&&(this.canvas=window.G_vmlCanvasManager.initElement(this.canvas)),this.ctx=this.canvas.getContext("2d"),this.setOptions(),this.render()}return f(e,t),e.prototype.lineWidth=15,e.prototype.displayedValue=0,e.prototype.value=33,e.prototype.maxValue=80,e.prototype.minValue=0,e.prototype.options={lineWidth:.1,colorStart:"#6f6ea0",colorStop:"#c0c0db",strokeColor:"#eeeeee",shadowColor:"#d5d5d5",angle:.35,radiusScale:1},e.prototype.getAngle=function(t){return(1-this.options.angle)*Math.PI+(t-this.minValue)/(this.maxValue-this.minValue)*(2+this.options.angle-(1-this.options.angle))*Math.PI},e.prototype.setOptions=function(t){return null==t&&(t=null),e.__super__.setOptions.call(this,t),this.lineWidth=this.canvas.height*this.options.lineWidth,this.radius=this.options.radiusScale*(this.canvas.height/2-this.lineWidth/2),this},e.prototype.set=function(t){return this.value=this.parseValue(t),this.value>this.maxValue?this.options.limitMax?this.value=this.maxValue:this.maxValue=this.value:this.value<this.minValue&&(this.options.limitMin?this.value=this.minValue:this.minValue=this.value),AnimationUpdater.add(this),AnimationUpdater.run(this.forceUpdate),this.forceUpdate=!1},e.prototype.render=function(){var t,e,i,s;return t=this.getAngle(this.displayedValue),s=this.canvas.width/2,i=this.canvas.height/2,this.textField&&this.textField.render(this),(e=this.ctx.createRadialGradient(s,i,39,s,i,70)).addColorStop(0,this.options.colorStart),e.addColorStop(1,this.options.colorStop),this.radius,this.lineWidth,this.radius,this.lineWidth,this.ctx.strokeStyle=this.options.strokeColor,this.ctx.beginPath(),this.ctx.arc(s,i,this.radius,(1-this.options.angle)*Math.PI,(2+this.options.angle)*Math.PI,!1),this.ctx.lineWidth=this.lineWidth,this.ctx.lineCap="round",this.ctx.stroke(),this.ctx.strokeStyle=e,this.ctx.beginPath(),this.ctx.arc(s,i,this.radius,(1-this.options.angle)*Math.PI,t,!1),this.ctx.stroke()},e}(i)),window.AnimationUpdater={elements:[],animId:null,addAll:function(t){var e,i,s,n;for(i=0,n=[],s=t.length;i<s;i++)e=t[i],n.push(AnimationUpdater.elements.push(e));return n},add:function(t){if(0>m.call(AnimationUpdater.elements,t))return AnimationUpdater.elements.push(t)},run:function(t){var e,i,s,n,o,r,a;if(null==t&&(t=!1),isFinite(parseFloat(t))||!0===t){for(e=!0,a=[],r=AnimationUpdater.elements,s=i=0,o=r.length;i<o;s=++i)r[s].update(!0===t)?e=!1:a.push(s);for(n=a.length-1;n>=0;n+=-1)s=a[n],AnimationUpdater.elements.splice(s,1);return AnimationUpdater.animId=e?null:requestAnimationFrame(AnimationUpdater.run)}if(!1===t)return!0===AnimationUpdater.animId&&cancelAnimationFrame(AnimationUpdater.animId),AnimationUpdater.animId=requestAnimationFrame(AnimationUpdater.run)}},"function"==typeof window.define&&null!=window.define.amd?define(function(){return{Gauge:n,Donut:s,BaseDonut:e,TextRenderer:r}}):null!=t.exports?t.exports={Gauge:n,Donut:s,BaseDonut:e,TextRenderer:r}:(window.Gauge=n,window.Donut=s,window.BaseDonut=e,window.TextRenderer=r)}).call(this)},51(t,e,i){var s=0/0,n=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,a=/^0o[0-7]+$/i,h=parseInt,l="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g,u="object"==typeof self&&self&&self.Object===Object&&self,p=l||u||Function("return this")(),c=Object.prototype.toString,d=Math.max,g=Math.min,f=function(){return p.Date.now()};function m(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function v(t){if("number"==typeof t)return t;if("symbol"==typeof(e=t)||e&&"object"==typeof e&&"[object Symbol]"==c.call(e))return s;if(m(t)){var e,i="function"==typeof t.valueOf?t.valueOf():t;t=m(i)?i+"":i}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(n,"");var l=r.test(t);return l||a.test(t)?h(t.slice(2),l?2:8):o.test(t)?s:+t}t.exports=function(t,e,i){var s,n,o,r,a,h,l=0,u=!1,p=!1,c=!0;if("function"!=typeof t)throw TypeError("Expected a function");function y(e){var i=s,o=n;return s=n=void 0,l=e,r=t.apply(o,i)}function x(t){var i=t-h,s=t-l;return void 0===h||i>=e||i<0||p&&s>=o}function _(){var t,i,s,n=f();if(x(n))return A(n);a=setTimeout(_,(t=n-h,i=n-l,s=e-t,p?g(s,o-i):s))}function A(t){return(a=void 0,c&&s)?y(t):(s=n=void 0,r)}function b(){var t,i=f(),o=x(i);if(s=arguments,n=this,h=i,o){if(void 0===a)return l=t=h,a=setTimeout(_,e),u?y(t):r;if(p)return a=setTimeout(_,e),y(h)}return void 0===a&&(a=setTimeout(_,e)),r}return e=v(e)||0,m(i)&&(u=!!i.leading,o=(p="maxWait"in i)?d(v(i.maxWait)||0,e):o,c="trailing"in i?!!i.trailing:c),b.cancel=function(){void 0!==a&&clearTimeout(a),l=0,s=h=n=a=void 0},b.flush=function(){return void 0===a?r:A(f())},b}},954(t){"use strict";t.exports=e},368(t){"use strict";t.exports=s},650(e){"use strict";e.exports=t},673(t){"use strict";t.exports=i}},o={};function r(t){var e=o[t];if(void 0!==e)return e.exports;var i=o[t]={exports:{}};return n[t].call(i.exports,i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(t){if("object"==typeof window)return window}})(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var a={};return(()=>{"use strict";let t;r.r(a),r.d(a,{OrGauge:()=>tS});let e=globalThis,i=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),n=new WeakMap;class o{constructor(t,e,i){if(this._$cssResult$=!0,i!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(i&&void 0===t){let i=void 0!==e&&1===e.length;i&&(t=n.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&n.set(e,t))}return t}toString(){return this.cssText}}let h=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e,i="";for(let e of t.cssRules)i+=e.cssText;return new o("string"==typeof(e=i)?e:e+"",void 0,s)})(t):t,{is:l,defineProperty:u,getOwnPropertyDescriptor:p,getOwnPropertyNames:c,getOwnPropertySymbols:d,getPrototypeOf:g}=Object,f=globalThis,m=f.trustedTypes,v=m?m.emptyScript:"",y=f.reactiveElementPolyfillSupport,x={toAttribute(t,e){switch(e){case Boolean:t=t?v:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},_=(t,e)=>!l(t,e),A={attribute:!0,type:String,converter:x,reflect:!1,useDefault:!1,hasChanged:_};Symbol.metadata??=Symbol("metadata"),f.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=A){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&u(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){let{get:s,set:n}=p(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:s,set(e){let o=s?.call(this);n?.call(this,e),this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??A}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;let t=g(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){let t=this.properties;for(let e of[...c(t),...d(t)])this.createProperty(e,t[e])}let t=this[Symbol.metadata];if(null!==t){let e=litPropertyMetadata.get(t);if(void 0!==e)for(let[t,i]of e)this.elementProperties.set(t,i)}for(let[t,e]of(this._$Eh=new Map,this.elementProperties)){let i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t))for(let i of new Set(t.flat(1/0).reverse()))e.unshift(h(i));else void 0!==t&&e.push(h(t));return e}static _$Eu(t,e){let i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map;for(let e of this.constructor.elementProperties.keys())this.hasOwnProperty(e)&&(t.set(e,this[e]),delete this[e]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,s)=>{if(i)t.adoptedStyleSheets=s.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let i of s){let s=document.createElement("style"),n=e.litNonce;void 0!==n&&s.setAttribute("nonce",n),s.textContent=i.cssText,t.appendChild(s)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){let i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(void 0!==s&&!0===i.reflect){let n=(void 0!==i.converter?.toAttribute?i.converter:x).toAttribute(e,i.type);this._$Em=t,null==n?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(t,e){let i=this.constructor,s=i._$Eh.get(t);if(void 0!==s&&this._$Em!==s){let t=i.getPropertyOptions(s),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:x;this._$Em=s;let o=n.fromAttribute(e,t.type);this[s]=o??this._$Ej?.get(s)??o,this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){let s=this.constructor,n=this[t];if(!(((i??=s.getPropertyOptions(t)).hasChanged??_)(n,e)||i.useDefault&&i.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(s._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:n},o){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),!0!==n||void 0!==o)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}let t=this.constructor.elementProperties;if(t.size>0)for(let[e,i]of t){let{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let t=!1,e=this._$AL;try{(t=this.shouldUpdate(e))?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:"open"},b.elementProperties=new Map,b.finalized=new Map,y?.({ReactiveElement:b}),(f.reactiveElementVersions??=[]).push("2.1.1");let S=globalThis,w=S.trustedTypes,C=w?w.createPolicy("lit-html",{createHTML:t=>t}):void 0,M="$lit$",P=`lit$${Math.random().toFixed(9).slice(2)}$`,E="?"+P,O=`<${E}>`,V=document,R=()=>V.createComment(""),T=t=>null===t||"object"!=typeof t&&"function"!=typeof t,U=Array.isArray,k="[ \n\f\r]",W=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,F=/-->/g,j=/>/g,I=RegExp(`>|${k}(?:([^\\s"'>=/]+)(${k}*=${k}*(?:[^
2
2
  \f\r"'\`<>=]|("|')|))|$)`,"g"),D=/'/g,N=/"/g,H=/^(?:script|style|textarea|title)$/i,z=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),L=z(1),q=(z(2),z(3),Symbol.for("lit-noChange")),G=Symbol.for("lit-nothing"),B=new WeakMap,Z=V.createTreeWalker(V,129);function J(t,e){if(!U(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==C?C.createHTML(e):e}class K{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let n=0,o=0;const r=t.length-1,a=this.parts,[h,l]=((t,e)=>{let i=t.length-1,s=[],n,o=2===e?"<svg>":3===e?"<math>":"",r=W;for(let e=0;e<i;e++){let i=t[e],a,h,l=-1,u=0;for(;u<i.length&&(r.lastIndex=u,null!==(h=r.exec(i)));)u=r.lastIndex,r===W?"!--"===h[1]?r=F:void 0!==h[1]?r=j:void 0!==h[2]?(H.test(h[2])&&(n=RegExp("</"+h[2],"g")),r=I):void 0!==h[3]&&(r=I):r===I?">"===h[0]?(r=n??W,l=-1):void 0===h[1]?l=-2:(l=r.lastIndex-h[2].length,a=h[1],r=void 0===h[3]?I:'"'===h[3]?N:D):r===N||r===D?r=I:r===F||r===j?r=W:(r=I,n=void 0);let p=r===I&&t[e+1].startsWith("/>")?" ":"";o+=r===W?i+O:l>=0?(s.push(a),i.slice(0,l)+M+i.slice(l)+P+p):i+P+(-2===l?e:p)}return[J(t,o+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]})(t,e);if(this.el=K.createElement(h,i),Z.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=Z.nextNode())&&a.length<r;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(M)){const e=l[o++],i=s.getAttribute(t).split(P),r=/([.?@])?(.*)/.exec(e);a.push({type:1,index:n,name:r[2],strings:i,ctor:"."===r[1]?te:"?"===r[1]?ti:"@"===r[1]?ts:tt}),s.removeAttribute(t)}else t.startsWith(P)&&(a.push({type:6,index:n}),s.removeAttribute(t));if(H.test(s.tagName)){const t=s.textContent.split(P),e=t.length-1;if(e>0){s.textContent=w?w.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],R()),Z.nextNode(),a.push({type:2,index:++n});s.append(t[e],R())}}}else if(8===s.nodeType)if(s.data===E)a.push({type:2,index:n});else{let t=-1;for(;-1!==(t=s.data.indexOf(P,t+1));)a.push({type:7,index:n}),t+=P.length-1}n++}}static createElement(t,e){let i=V.createElement("template");return i.innerHTML=t,i}}function Q(t,e,i=t,s){if(e===q)return e;let n=void 0!==s?i._$Co?.[s]:i._$Cl,o=T(e)?void 0:e._$litDirective$;return n?.constructor!==o&&(n?._$AO?.(!1),void 0===o?n=void 0:(n=new o(t))._$AT(t,i,s),void 0!==s?(i._$Co??=[])[s]=n:i._$Cl=n),void 0!==n&&(e=Q(t,n._$AS(t,e.values),n,s)),e}class X{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:i}=this._$AD,s=(t?.creationScope??V).importNode(e,!0);Z.currentNode=s;let n=Z.nextNode(),o=0,r=0,a=i[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new Y(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new tn(n,this,t)),this._$AV.push(e),a=i[++r]}o!==a?.index&&(n=Z.nextNode(),o++)}return Z.currentNode=V,s}p(t){let e=0;for(let i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class Y{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){let i;T(t=Q(this,t,e))?t===G||null==t||""===t?(this._$AH!==G&&this._$AR(),this._$AH=G):t!==this._$AH&&t!==q&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):U(i=t)||"function"==typeof i?.[Symbol.iterator]?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==G&&T(this._$AH)?this._$AA.nextSibling.data=t:this.T(V.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=K.createElement(J(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{let t=new X(s,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=B.get(t.strings);return void 0===e&&B.set(t.strings,e=new K(t)),e}k(t){U(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,i,s=0;for(let n of t)s===e.length?e.push(i=new Y(this.O(R()),this.O(R()),this,this.options)):i=e[s],i._$AI(n),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class tt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,n){this.type=1,this._$AH=G,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=G}_$AI(t,e=this,i,s){let n=this.strings,o=!1;if(void 0===n)(o=!T(t=Q(this,t,e,0))||t!==this._$AH&&t!==q)&&(this._$AH=t);else{let s,r,a=t;for(t=n[0],s=0;s<n.length-1;s++)(r=Q(this,a[i+s],e,s))===q&&(r=this._$AH[s]),o||=!T(r)||r!==this._$AH[s],r===G?t=G:t!==G&&(t+=(r??"")+n[s+1]),this._$AH[s]=r}o&&!s&&this.j(t)}j(t){t===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class te extends tt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===G?void 0:t}}class ti extends tt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==G)}}class ts extends tt{constructor(t,e,i,s,n){super(t,e,i,s,n),this.type=5}_$AI(t,e=this){if((t=Q(this,t,e,0)??G)===q)return;let i=this._$AH,s=t===G&&i!==G||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==G&&(i===G||s);s&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class tn{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Q(this,t)}}let to=S.litHtmlPolyfillSupport;to?.(K,Y),(S.litHtmlVersions??=[]).push("3.3.1");let tr=globalThis;class ta extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{let s=i?.renderBefore??e,n=s._$litPart$;if(void 0===n){let t=i?.renderBefore??null;s._$litPart$=n=new Y(e.insertBefore(R(),t),t,void 0,i??{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return q}}ta._$litElement$=!0,ta.finalized=!0,tr.litElementHydrateSupport?.({LitElement:ta});let th=tr.litElementPolyfillSupport;th?.({LitElement:ta}),(tr.litElementVersions??=[]).push("4.2.1");let tl={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:_};function tu(t){return(e,i)=>{let s;return"object"==typeof i?((t=tl,e,i)=>{let{kind:s,metadata:n}=i,o=globalThis.litPropertyMetadata.get(n);if(void 0===o&&globalThis.litPropertyMetadata.set(n,o=new Map),"setter"===s&&((t=Object.create(t)).wrapped=!0),o.set(i.name,t),"accessor"===s){let{name:s}=i;return{set(i){let n=e.get.call(this);e.set.call(this,i),this.requestUpdate(s,n,t)},init(e){return void 0!==e&&this.C(s,void 0,t,e),e}}}if("setter"===s){let{name:s}=i;return function(i){let n=this[s];e.call(this,i),this.requestUpdate(s,n,t)}}throw Error("Unsupported decorator location: "+s)})(t,e,i):(s=e.hasOwnProperty(i),e.constructor.createProperty(i,t),s?Object.getOwnPropertyDescriptor(e,i):void 0)}}function tp(t){return tu({...t,state:!0,attribute:!1})}let tc=(t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,i),i);function td(t,e){return(i,s,n)=>{let o=e=>e.renderRoot?.querySelector(t)??null;if(e){let t,{get:e,set:r}="object"==typeof s?i:n??(t=Symbol(),{get(){return this[t]},set(e){this[t]=e}});return tc(i,s,{get(){let t=e.call(this);return void 0===t&&(null!==(t=o(this))||this.hasUpdated)&&r.call(this,t),t}})}return tc(i,s,{get(){return o(this)}})}}var tg=r(650),tf=r(1),tm=r(954),tv=r.n(tm),ty=r(673),tx=r(51),t_=r.n(tx),t$=r(368),tA=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};let tb=((t,...e)=>new o(1===t.length?t[0]:e.reduce((e,i,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1],t[0]),t,s))`
3
3
  :host {
4
4
  display: flex;
package/dist/umd/index.js CHANGED
@@ -1,4 +1,4 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("ORModel"),require("ORTranslate"),require("ORIcon"),require("ORCore")):"function"==typeof define&&define.amd?define(["ORModel","ORTranslate","ORIcon","ORCore"],e):"object"==typeof exports?exports.ORGauge=e(require("ORModel"),require("ORTranslate"),require("ORIcon"),require("ORCore")):t.ORGauge=e(t.ORModel,t.ORTranslate,t.ORIcon,t.ORCore)}(self,(t,e,i,s)=>(()=>{var n={1(t){(function(){var e,i,s,n,o,r,a,h,l,u,p,c,d=[].slice,g={}.hasOwnProperty,f=function(t,e){for(var i in e)g.call(e,i)&&(t[i]=e[i]);function s(){this.constructor=t}return s.prototype=e.prototype,t.prototype=new s,t.__super__=e.prototype,t},m=[].indexOf||function(t){for(var e=0,i=this.length;e<i;e++)if(e in this&&this[e]===t)return e;return -1};!function(){var t,e,i,s,n,o,r;for(i=0,n=(r=["ms","moz","webkit","o"]).length;i<n&&(o=r[i],!window.requestAnimationFrame);i++)window.requestAnimationFrame=window[o+"RequestAnimationFrame"],window.cancelAnimationFrame=window[o+"CancelAnimationFrame"]||window[o+"CancelRequestAnimationFrame"];t=null,s=0,e={},requestAnimationFrame?window.cancelAnimationFrame||(t=window.requestAnimationFrame,window.requestAnimationFrame=function(i,n){var o;return o=++s,t(function(){if(!e[o])return i()},n),o},window.cancelAnimationFrame=function(t){return e[t]=!0}):(window.requestAnimationFrame=function(t,e){var i,s,n,o;return o=Math.max(0,16-((i=new Date().getTime())-n)),s=window.setTimeout(function(){return t(i+o)},o),n=i+o,s},window.cancelAnimationFrame=function(t){return clearTimeout(t)})}(),c=function(t){var e,i;for(e=Math.floor(t/3600),i=Math.floor((t-3600*e)/60),t-=3600*e+60*i,t+="",i+="";i.length<2;)i="0"+i;for(;t.length<2;)t="0"+t;return(e=e?e+":":"")+i+":"+t},u=function(){var t,e,i;return e=1<=arguments.length?d.call(arguments,0):[],i=e[0],t=e[1],h(i.toFixed(t))},p=function(t,e){var i,s,n;for(i in s={},t)g.call(t,i)&&(n=t[i],s[i]=n);for(i in e)g.call(e,i)&&(n=e[i],s[i]=n);return s},h=function(t){var e,i,s,n;for(t+="",s=(i=t.split("."))[0],n="",i.length>1&&(n="."+i[1]),e=/(\d+)(\d{3})/;e.test(s);)s=s.replace(e,"$1,$2");return s+n},l=function(t){return"#"===t.charAt(0)?t.substring(1,7):t},i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),e.prototype.displayScale=1,e.prototype.forceUpdate=!0,e.prototype.setTextField=function(t,e){return this.textField=t instanceof r?t:new r(t,e)},e.prototype.setMinValue=function(t,e){var i,s,n,o,r;if(this.minValue=t,null==e&&(e=!0),e){for(s=0,this.displayedValue=this.minValue,o=this.gp||[],r=[],n=o.length;s<n;s++)i=o[s],r.push(i.displayedValue=this.minValue);return r}},e.prototype.setOptions=function(t){return null==t&&(t=null),this.options=p(this.options,t),this.textField&&(this.textField.el.style.fontSize=t.fontSize+"px"),this.options.angle>.5&&(this.options.angle=.5),this.configDisplayScale(),this},e.prototype.configDisplayScale=function(){var t,e,i,s,n;return s=this.displayScale,!1===this.options.highDpiSupport?delete this.displayScale:(e=window.devicePixelRatio||1,t=this.ctx.webkitBackingStorePixelRatio||this.ctx.mozBackingStorePixelRatio||this.ctx.msBackingStorePixelRatio||this.ctx.oBackingStorePixelRatio||this.ctx.backingStorePixelRatio||1,this.displayScale=e/t),this.displayScale!==s&&(n=this.canvas.G__width||this.canvas.width,i=this.canvas.G__height||this.canvas.height,this.canvas.width=n*this.displayScale,this.canvas.height=i*this.displayScale,this.canvas.style.width=n+"px",this.canvas.style.height=i+"px",this.canvas.G__width=n,this.canvas.G__height=i),this},e.prototype.parseValue=function(t){return isFinite(t=parseFloat(t)||Number(t))?t:0},e}(a=function(){function t(t,e){null==t&&(t=!0),this.clear=null==e||e,t&&AnimationUpdater.add(this)}return t.prototype.animationSpeed=32,t.prototype.update=function(t){var e;return null==t&&(t=!1),(!!t||this.displayedValue!==this.value)&&(this.ctx&&this.clear&&this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),.001>=Math.abs((e=this.value-this.displayedValue)/this.animationSpeed)?this.displayedValue=this.value:this.displayedValue=this.displayedValue+e/this.animationSpeed,this.render(),!0)},t}()),r=function(){function t(t,e){this.el=t,this.fractionDigits=e}return t.prototype.render=function(t){return this.el.innerHTML=u(t.displayedValue,this.fractionDigits)},t}(),function(t){function e(t,i){if(this.elem=t,this.text=null!=i&&i,e.__super__.constructor.call(this),void 0===this.elem)throw Error("The element isn't defined.");this.value=+this.elem.innerHTML,this.text&&(this.value=0)}f(e,t),e.prototype.displayedValue=0,e.prototype.value=0,e.prototype.setVal=function(t){return this.value=+t},e.prototype.render=function(){var t;return t=this.text?c(this.displayedValue.toFixed(0)):h(u(this.displayedValue)),this.elem.innerHTML=t}}(a),o=function(t){function e(t){if(this.gauge=t,void 0===this.gauge)throw Error("The element isn't defined.");this.ctx=this.gauge.ctx,this.canvas=this.gauge.canvas,e.__super__.constructor.call(this,!1,!1),this.setOptions()}return f(e,t),e.prototype.displayedValue=0,e.prototype.value=0,e.prototype.options={strokeWidth:.035,length:.1,color:"#000000",iconPath:null,iconScale:1,iconAngle:0},e.prototype.img=null,e.prototype.setOptions=function(t){if(null==t&&(t=null),this.options=p(this.options,t),this.length=2*this.gauge.radius*this.gauge.options.radiusScale*this.options.length,this.strokeWidth=this.canvas.height*this.options.strokeWidth,this.maxValue=this.gauge.maxValue,this.minValue=this.gauge.minValue,this.animationSpeed=this.gauge.animationSpeed,this.options.angle=this.gauge.options.angle,this.options.iconPath)return this.img=new Image,this.img.src=this.options.iconPath},e.prototype.render=function(){var t,e,i,s,n,o,r,a,h;if(t=this.gauge.getAngle.call(this,this.displayedValue),a=Math.round(this.length*Math.cos(t)),h=Math.round(this.length*Math.sin(t)),o=Math.round(this.strokeWidth*Math.cos(t-Math.PI/2)),r=Math.round(this.strokeWidth*Math.sin(t-Math.PI/2)),e=Math.round(this.strokeWidth*Math.cos(t+Math.PI/2)),i=Math.round(this.strokeWidth*Math.sin(t+Math.PI/2)),this.ctx.beginPath(),this.ctx.fillStyle=this.options.color,this.ctx.arc(0,0,this.strokeWidth,0,2*Math.PI,!1),this.ctx.fill(),this.ctx.beginPath(),this.ctx.moveTo(o,r),this.ctx.lineTo(a,h),this.ctx.lineTo(e,i),this.ctx.fill(),this.img)return s=Math.round(this.img.width*this.options.iconScale),n=Math.round(this.img.height*this.options.iconScale),this.ctx.save(),this.ctx.translate(a,h),this.ctx.rotate(t+Math.PI/180*(90+this.options.iconAngle)),this.ctx.drawImage(this.img,-s/2,-n/2,s,n),this.ctx.restore()},e}(a),function(){function t(t){this.elem=t}t.prototype.updateValues=function(t){return this.value=t[0],this.maxValue=t[1],this.avgValue=t[2],this.render()},t.prototype.render=function(){var t,e;return this.textField&&this.textField.text(u(this.value)),0===this.maxValue&&(this.maxValue=2*this.avgValue),e=this.value/this.maxValue*100,t=this.avgValue/this.maxValue*100,$(".bar-value",this.elem).css({width:e+"%"}),$(".typical-value",this.elem).css({width:t+"%"})}}(),n=function(t){function e(t){var i,s;this.canvas=t,e.__super__.constructor.call(this),this.percentColors=null,"u">typeof G_vmlCanvasManager&&(this.canvas=window.G_vmlCanvasManager.initElement(this.canvas)),this.ctx=this.canvas.getContext("2d"),i=this.canvas.clientHeight,s=this.canvas.clientWidth,this.canvas.height=i,this.canvas.width=s,this.gp=[new o(this)],this.setOptions()}return f(e,t),e.prototype.elem=null,e.prototype.value=[20],e.prototype.maxValue=80,e.prototype.minValue=0,e.prototype.displayedAngle=0,e.prototype.displayedValue=0,e.prototype.lineWidth=40,e.prototype.paddingTop=.1,e.prototype.paddingBottom=.1,e.prototype.percentColors=null,e.prototype.options={colorStart:"#6fadcf",colorStop:void 0,gradientType:0,strokeColor:"#e0e0e0",pointer:{length:.8,strokeWidth:.035,iconScale:1},angle:.15,lineWidth:.44,radiusScale:1,fontSize:40,limitMax:!1,limitMin:!1},e.prototype.setOptions=function(t){var i,s,n,o,r;for(null==t&&(t=null),e.__super__.setOptions.call(this,t),this.configPercentColors(),this.extraPadding=0,this.options.angle<0&&(o=Math.PI*(1+this.options.angle),this.extraPadding=Math.sin(o)),this.availableHeight=this.canvas.height*(1-this.paddingTop-this.paddingBottom),this.lineWidth=this.availableHeight*this.options.lineWidth,this.radius=(this.availableHeight-this.lineWidth/2)/(1+this.extraPadding),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),s=0,n=(r=this.gp).length;s<n;s++)(i=r[s]).setOptions(this.options.pointer),i.render();return this.render(),this},e.prototype.configPercentColors=function(){var t,e,i,s,n,o,r;if(this.percentColors=null,void 0!==this.options.percentColors){for(this.percentColors=[],o=[],i=s=0,n=this.options.percentColors.length-1;0<=n?s<=n:s>=n;i=0<=n?++s:--s)r=parseInt(l(this.options.percentColors[i][1]).substring(0,2),16),e=parseInt(l(this.options.percentColors[i][1]).substring(2,4),16),t=parseInt(l(this.options.percentColors[i][1]).substring(4,6),16),o.push(this.percentColors[i]={pct:this.options.percentColors[i][0],color:{r:r,g:e,b:t}});return o}},e.prototype.set=function(t){var e,i,s,n,r,a,h,l,u;for(t instanceof Array||(t=[t]),i=s=0,h=t.length-1;0<=h?s<=h:s>=h;i=0<=h?++s:--s)t[i]=this.parseValue(t[i]);if(t.length>this.gp.length)for(i=n=0,l=t.length-this.gp.length;0<=l?n<l:n>l;i=0<=l?++n:--n)(e=new o(this)).setOptions(this.options.pointer),this.gp.push(e);else t.length<this.gp.length&&(this.gp=this.gp.slice(this.gp.length-t.length));for(a=0,i=0,r=t.length;a<r;a++)(u=t[a])>this.maxValue?this.options.limitMax?u=this.maxValue:this.maxValue=u+1:u<this.minValue&&(this.options.limitMin?u=this.minValue:this.minValue=u-1),this.gp[i].value=u,this.gp[i++].setOptions({minValue:this.minValue,maxValue:this.maxValue,angle:this.options.angle});return this.value=Math.max(Math.min(t[t.length-1],this.maxValue),this.minValue),AnimationUpdater.add(this),AnimationUpdater.run(this.forceUpdate),this.forceUpdate=!1},e.prototype.getAngle=function(t){return(1+this.options.angle)*Math.PI+(t-this.minValue)/(this.maxValue-this.minValue)*(1-2*this.options.angle)*Math.PI},e.prototype.getColorForPercentage=function(t,e){var i,s,n,o,r,a,h;if(0===t)i=this.percentColors[0].color;else for(i=this.percentColors[this.percentColors.length-1].color,n=o=0,a=this.percentColors.length-1;0<=a?o<=a:o>=a;n=0<=a?++o:--o)if(t<=this.percentColors[n].pct){!0===e?(h=this.percentColors[n-1]||this.percentColors[0],s=this.percentColors[n],r=(t-h.pct)/(s.pct-h.pct),i={r:Math.floor(h.color.r*(1-r)+s.color.r*r),g:Math.floor(h.color.g*(1-r)+s.color.g*r),b:Math.floor(h.color.b*(1-r)+s.color.b*r)}):i=this.percentColors[n].color;break}return"rgb("+[i.r,i.g,i.b].join(",")+")"},e.prototype.getColorForValue=function(t,e){var i;return i=(t-this.minValue)/(this.maxValue-this.minValue),this.getColorForPercentage(i,e)},e.prototype.renderStaticLabels=function(t,e,i,s){var n,o,r,a,h,l,p,c,d,g;for(this.ctx.save(),this.ctx.translate(e,i),n=t.font||"10px Times",l=/\d+\.?\d?/,h=n.match(l)[0],c=n.slice(h.length),o=parseFloat(h)*this.displayScale,this.ctx.font=o+c,this.ctx.fillStyle=t.color||"#000000",this.ctx.textBaseline="bottom",this.ctx.textAlign="center",r=0,a=(p=t.labels).length;r<a;r++)void 0!==(g=p[r]).label?(!this.options.limitMin||g>=this.minValue)&&(!this.options.limitMax||g<=this.maxValue)&&(h=(n=g.font||t.font).match(l)[0],c=n.slice(h.length),o=parseFloat(h)*this.displayScale,this.ctx.font=o+c,d=this.getAngle(g.label)-3*Math.PI/2,this.ctx.rotate(d),this.ctx.fillText(u(g.label,t.fractionDigits),0,-s-this.lineWidth/2),this.ctx.rotate(-d)):(!this.options.limitMin||g>=this.minValue)&&(!this.options.limitMax||g<=this.maxValue)&&(d=this.getAngle(g)-3*Math.PI/2,this.ctx.rotate(d),this.ctx.fillText(u(g,t.fractionDigits),0,-s-this.lineWidth/2),this.ctx.rotate(-d));return this.ctx.restore()},e.prototype.renderTicks=function(t,e,i,s){var n,o,r,a,h,l,u,p,c,d,g,f,m,v,y,x,_,A,b,S;if(t!=={}){for(l=t.divisions||0,A=t.subDivisions||0,r=t.divColor||"#fff",v=t.subColor||"#fff",a=t.divLength||.7,x=t.subLength||.2,y=parseFloat(d=parseFloat(c=parseFloat(this.maxValue)-parseFloat(this.minValue))/parseFloat(t.divisions))/parseFloat(t.subDivisions),n=parseFloat(this.minValue),o=0+y,h=(p=c/400)*(t.divWidth||1),_=p*(t.subWidth||1),f=[],b=u=0,g=l+1;u<g;b=u+=1)this.ctx.lineWidth=this.lineWidth*a,m=this.lineWidth/2*(1-a),S=this.radius*this.options.radiusScale+m,this.ctx.strokeStyle=r,this.ctx.beginPath(),this.ctx.arc(0,0,S,this.getAngle(n-h),this.getAngle(n+h),!1),this.ctx.stroke(),o=n+y,n+=d,b!==t.divisions&&A>0?f.push((function(){var t,e,i;for(i=[],t=0,e=A-1;t<e;t+=1)this.ctx.lineWidth=this.lineWidth*x,m=this.lineWidth/2*(1-x),S=this.radius*this.options.radiusScale+m,this.ctx.strokeStyle=v,this.ctx.beginPath(),this.ctx.arc(0,0,S,this.getAngle(o-_),this.getAngle(o+_),!1),this.ctx.stroke(),i.push(o+=y);return i}).call(this)):f.push(void 0);return f}},e.prototype.render=function(){var t,e,i,s,n,o,r,a,h,l,u,p,c,d,g,f;if(g=this.canvas.width/2,i=this.canvas.height*this.paddingTop+this.availableHeight-(this.radius+this.lineWidth/2)*this.extraPadding,t=this.getAngle(this.displayedValue),this.textField&&this.textField.render(this),this.ctx.lineCap="butt",l=this.radius*this.options.radiusScale,this.options.staticLabels&&this.renderStaticLabels(this.options.staticLabels,g,i,l),this.options.staticZones)for(this.ctx.save(),this.ctx.translate(g,i),this.ctx.lineWidth=this.lineWidth,s=0,o=(u=this.options.staticZones).length;s<o;s++)h=(f=u[s]).min,this.options.limitMin&&h<this.minValue&&(h=this.minValue),a=f.max,this.options.limitMax&&a>this.maxValue&&(a=this.maxValue),d=this.radius*this.options.radiusScale,f.height&&(this.ctx.lineWidth=this.lineWidth*f.height,c=this.lineWidth/2*(f.offset||1-f.height),d=this.radius*this.options.radiusScale+c),this.ctx.strokeStyle=f.strokeStyle,this.ctx.beginPath(),this.ctx.arc(0,0,d,this.getAngle(h),this.getAngle(a),!1),this.ctx.stroke();else void 0!==this.options.customFillStyle?e=this.options.customFillStyle(this):null!==this.percentColors?e=this.getColorForValue(this.displayedValue,this.options.generateGradient):void 0!==this.options.colorStop?((e=0===this.options.gradientType?this.ctx.createRadialGradient(g,i,9,g,i,70):this.ctx.createLinearGradient(0,0,g,0)).addColorStop(0,this.options.colorStart),e.addColorStop(1,this.options.colorStop)):e=this.options.colorStart,this.ctx.strokeStyle=e,this.ctx.beginPath(),this.ctx.arc(g,i,l,(1+this.options.angle)*Math.PI,t,!1),this.ctx.lineWidth=this.lineWidth,this.ctx.stroke(),this.ctx.strokeStyle=this.options.strokeColor,this.ctx.beginPath(),this.ctx.arc(g,i,l,t,(2-this.options.angle)*Math.PI,!1),this.ctx.stroke(),this.ctx.save(),this.ctx.translate(g,i);for(this.options.renderTicks&&this.renderTicks(this.options.renderTicks,g,i,l),this.ctx.restore(),this.ctx.translate(g,i),n=0,r=(p=this.gp).length;n<r;n++)p[n].update(!0);return this.ctx.translate(-g,-i)},e}(i),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),e.prototype.strokeGradient=function(t,e,i,s){var n;return(n=this.ctx.createRadialGradient(t,e,i,t,e,s)).addColorStop(0,this.options.shadowColor),n.addColorStop(.12,this.options._orgStrokeColor),n.addColorStop(.88,this.options._orgStrokeColor),n.addColorStop(1,this.options.shadowColor),n},e.prototype.setOptions=function(t){var i,s,n,o;return null==t&&(t=null),e.__super__.setOptions.call(this,t),o=this.canvas.width/2,i=this.canvas.height/2,s=this.radius-this.lineWidth/2,n=this.radius+this.lineWidth/2,this.options._orgStrokeColor=this.options.strokeColor,this.options.strokeColor=this.strokeGradient(o,i,s,n),this},e}(e=function(t){function e(t){this.canvas=t,e.__super__.constructor.call(this),"u">typeof G_vmlCanvasManager&&(this.canvas=window.G_vmlCanvasManager.initElement(this.canvas)),this.ctx=this.canvas.getContext("2d"),this.setOptions(),this.render()}return f(e,t),e.prototype.lineWidth=15,e.prototype.displayedValue=0,e.prototype.value=33,e.prototype.maxValue=80,e.prototype.minValue=0,e.prototype.options={lineWidth:.1,colorStart:"#6f6ea0",colorStop:"#c0c0db",strokeColor:"#eeeeee",shadowColor:"#d5d5d5",angle:.35,radiusScale:1},e.prototype.getAngle=function(t){return(1-this.options.angle)*Math.PI+(t-this.minValue)/(this.maxValue-this.minValue)*(2+this.options.angle-(1-this.options.angle))*Math.PI},e.prototype.setOptions=function(t){return null==t&&(t=null),e.__super__.setOptions.call(this,t),this.lineWidth=this.canvas.height*this.options.lineWidth,this.radius=this.options.radiusScale*(this.canvas.height/2-this.lineWidth/2),this},e.prototype.set=function(t){return this.value=this.parseValue(t),this.value>this.maxValue?this.options.limitMax?this.value=this.maxValue:this.maxValue=this.value:this.value<this.minValue&&(this.options.limitMin?this.value=this.minValue:this.minValue=this.value),AnimationUpdater.add(this),AnimationUpdater.run(this.forceUpdate),this.forceUpdate=!1},e.prototype.render=function(){var t,e,i,s;return t=this.getAngle(this.displayedValue),s=this.canvas.width/2,i=this.canvas.height/2,this.textField&&this.textField.render(this),(e=this.ctx.createRadialGradient(s,i,39,s,i,70)).addColorStop(0,this.options.colorStart),e.addColorStop(1,this.options.colorStop),this.radius,this.lineWidth,this.radius,this.lineWidth,this.ctx.strokeStyle=this.options.strokeColor,this.ctx.beginPath(),this.ctx.arc(s,i,this.radius,(1-this.options.angle)*Math.PI,(2+this.options.angle)*Math.PI,!1),this.ctx.lineWidth=this.lineWidth,this.ctx.lineCap="round",this.ctx.stroke(),this.ctx.strokeStyle=e,this.ctx.beginPath(),this.ctx.arc(s,i,this.radius,(1-this.options.angle)*Math.PI,t,!1),this.ctx.stroke()},e}(i)),window.AnimationUpdater={elements:[],animId:null,addAll:function(t){var e,i,s,n;for(i=0,n=[],s=t.length;i<s;i++)e=t[i],n.push(AnimationUpdater.elements.push(e));return n},add:function(t){if(0>m.call(AnimationUpdater.elements,t))return AnimationUpdater.elements.push(t)},run:function(t){var e,i,s,n,o,r,a;if(null==t&&(t=!1),isFinite(parseFloat(t))||!0===t){for(e=!0,a=[],r=AnimationUpdater.elements,s=i=0,o=r.length;i<o;s=++i)r[s].update(!0===t)?e=!1:a.push(s);for(n=a.length-1;n>=0;n+=-1)s=a[n],AnimationUpdater.elements.splice(s,1);return AnimationUpdater.animId=e?null:requestAnimationFrame(AnimationUpdater.run)}if(!1===t)return!0===AnimationUpdater.animId&&cancelAnimationFrame(AnimationUpdater.animId),AnimationUpdater.animId=requestAnimationFrame(AnimationUpdater.run)}},"function"==typeof window.define&&null!=window.define.amd?define(function(){return{Gauge:n,Donut:s,BaseDonut:e,TextRenderer:r}}):null!=t.exports?t.exports={Gauge:n,Donut:s,BaseDonut:e,TextRenderer:r}:(window.Gauge=n,window.Donut=s,window.BaseDonut=e,window.TextRenderer=r)}).call(this)},51(t,e,i){var s=0/0,n=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,a=/^0o[0-7]+$/i,h=parseInt,l="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g,u="object"==typeof self&&self&&self.Object===Object&&self,p=l||u||Function("return this")(),c=Object.prototype.toString,d=Math.max,g=Math.min,f=function(){return p.Date.now()};function m(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function v(t){if("number"==typeof t)return t;if("symbol"==typeof(e=t)||e&&"object"==typeof e&&"[object Symbol]"==c.call(e))return s;if(m(t)){var e,i="function"==typeof t.valueOf?t.valueOf():t;t=m(i)?i+"":i}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(n,"");var l=r.test(t);return l||a.test(t)?h(t.slice(2),l?2:8):o.test(t)?s:+t}t.exports=function(t,e,i){var s,n,o,r,a,h,l=0,u=!1,p=!1,c=!0;if("function"!=typeof t)throw TypeError("Expected a function");function y(e){var i=s,o=n;return s=n=void 0,l=e,r=t.apply(o,i)}function x(t){var i=t-h,s=t-l;return void 0===h||i>=e||i<0||p&&s>=o}function _(){var t,i,s,n=f();if(x(n))return A(n);a=setTimeout(_,(t=n-h,i=n-l,s=e-t,p?g(s,o-i):s))}function A(t){return(a=void 0,c&&s)?y(t):(s=n=void 0,r)}function b(){var t,i=f(),o=x(i);if(s=arguments,n=this,h=i,o){if(void 0===a)return l=t=h,a=setTimeout(_,e),u?y(t):r;if(p)return a=setTimeout(_,e),y(h)}return void 0===a&&(a=setTimeout(_,e)),r}return e=v(e)||0,m(i)&&(u=!!i.leading,o=(p="maxWait"in i)?d(v(i.maxWait)||0,e):o,c="trailing"in i?!!i.trailing:c),b.cancel=function(){void 0!==a&&clearTimeout(a),l=0,s=h=n=a=void 0},b.flush=function(){return void 0===a?r:A(f())},b}},954(t){"use strict";t.exports=s},368(t){"use strict";t.exports=i},650(e){"use strict";e.exports=t},673(t){"use strict";t.exports=e}},o={};function r(t){var e=o[t];if(void 0!==e)return e.exports;var i=o[t]={exports:{}};return n[t].call(i.exports,i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(t){if("object"==typeof window)return window}})(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var a={};return(()=>{"use strict";let t;r.r(a),r.d(a,{OrGauge:()=>tS});let e=globalThis,i=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),n=new WeakMap;class o{constructor(t,e,i){if(this._$cssResult$=!0,i!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(i&&void 0===t){let i=void 0!==e&&1===e.length;i&&(t=n.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&n.set(e,t))}return t}toString(){return this.cssText}}let h=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e,i="";for(let e of t.cssRules)i+=e.cssText;return new o("string"==typeof(e=i)?e:e+"",void 0,s)})(t):t,{is:l,defineProperty:u,getOwnPropertyDescriptor:p,getOwnPropertyNames:c,getOwnPropertySymbols:d,getPrototypeOf:g}=Object,f=globalThis,m=f.trustedTypes,v=m?m.emptyScript:"",y=f.reactiveElementPolyfillSupport,x={toAttribute(t,e){switch(e){case Boolean:t=t?v:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},_=(t,e)=>!l(t,e),A={attribute:!0,type:String,converter:x,reflect:!1,useDefault:!1,hasChanged:_};Symbol.metadata??=Symbol("metadata"),f.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=A){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&u(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){let{get:s,set:n}=p(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:s,set(e){let o=s?.call(this);n?.call(this,e),this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??A}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;let t=g(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){let t=this.properties;for(let e of[...c(t),...d(t)])this.createProperty(e,t[e])}let t=this[Symbol.metadata];if(null!==t){let e=litPropertyMetadata.get(t);if(void 0!==e)for(let[t,i]of e)this.elementProperties.set(t,i)}for(let[t,e]of(this._$Eh=new Map,this.elementProperties)){let i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t))for(let i of new Set(t.flat(1/0).reverse()))e.unshift(h(i));else void 0!==t&&e.push(h(t));return e}static _$Eu(t,e){let i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map;for(let e of this.constructor.elementProperties.keys())this.hasOwnProperty(e)&&(t.set(e,this[e]),delete this[e]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,s)=>{if(i)t.adoptedStyleSheets=s.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let i of s){let s=document.createElement("style"),n=e.litNonce;void 0!==n&&s.setAttribute("nonce",n),s.textContent=i.cssText,t.appendChild(s)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){let i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(void 0!==s&&!0===i.reflect){let n=(void 0!==i.converter?.toAttribute?i.converter:x).toAttribute(e,i.type);this._$Em=t,null==n?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(t,e){let i=this.constructor,s=i._$Eh.get(t);if(void 0!==s&&this._$Em!==s){let t=i.getPropertyOptions(s),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:x;this._$Em=s;let o=n.fromAttribute(e,t.type);this[s]=o??this._$Ej?.get(s)??o,this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){let s=this.constructor,n=this[t];if(!(((i??=s.getPropertyOptions(t)).hasChanged??_)(n,e)||i.useDefault&&i.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(s._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:n},o){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),!0!==n||void 0!==o)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}let t=this.constructor.elementProperties;if(t.size>0)for(let[e,i]of t){let{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let t=!1,e=this._$AL;try{(t=this.shouldUpdate(e))?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:"open"},b.elementProperties=new Map,b.finalized=new Map,y?.({ReactiveElement:b}),(f.reactiveElementVersions??=[]).push("2.1.1");let S=globalThis,w=S.trustedTypes,C=w?w.createPolicy("lit-html",{createHTML:t=>t}):void 0,M="$lit$",P=`lit$${Math.random().toFixed(9).slice(2)}$`,E="?"+P,O=`<${E}>`,V=document,R=()=>V.createComment(""),T=t=>null===t||"object"!=typeof t&&"function"!=typeof t,U=Array.isArray,k="[ \n\f\r]",W=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,F=/-->/g,j=/>/g,I=RegExp(`>|${k}(?:([^\\s"'>=/]+)(${k}*=${k}*(?:[^
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("ORModel"),require("ORCore"),require("ORTranslate"),require("ORIcon")):"function"==typeof define&&define.amd?define(["ORModel","ORCore","ORTranslate","ORIcon"],e):"object"==typeof exports?exports.ORGauge=e(require("ORModel"),require("ORCore"),require("ORTranslate"),require("ORIcon")):t.ORGauge=e(t.ORModel,t.ORCore,t.ORTranslate,t.ORIcon)}(self,(t,e,i,s)=>(()=>{var n={1(t){(function(){var e,i,s,n,o,r,a,h,l,u,p,c,d=[].slice,g={}.hasOwnProperty,f=function(t,e){for(var i in e)g.call(e,i)&&(t[i]=e[i]);function s(){this.constructor=t}return s.prototype=e.prototype,t.prototype=new s,t.__super__=e.prototype,t},m=[].indexOf||function(t){for(var e=0,i=this.length;e<i;e++)if(e in this&&this[e]===t)return e;return -1};!function(){var t,e,i,s,n,o,r;for(i=0,n=(r=["ms","moz","webkit","o"]).length;i<n&&(o=r[i],!window.requestAnimationFrame);i++)window.requestAnimationFrame=window[o+"RequestAnimationFrame"],window.cancelAnimationFrame=window[o+"CancelAnimationFrame"]||window[o+"CancelRequestAnimationFrame"];t=null,s=0,e={},requestAnimationFrame?window.cancelAnimationFrame||(t=window.requestAnimationFrame,window.requestAnimationFrame=function(i,n){var o;return o=++s,t(function(){if(!e[o])return i()},n),o},window.cancelAnimationFrame=function(t){return e[t]=!0}):(window.requestAnimationFrame=function(t,e){var i,s,n,o;return o=Math.max(0,16-((i=new Date().getTime())-n)),s=window.setTimeout(function(){return t(i+o)},o),n=i+o,s},window.cancelAnimationFrame=function(t){return clearTimeout(t)})}(),c=function(t){var e,i;for(e=Math.floor(t/3600),i=Math.floor((t-3600*e)/60),t-=3600*e+60*i,t+="",i+="";i.length<2;)i="0"+i;for(;t.length<2;)t="0"+t;return(e=e?e+":":"")+i+":"+t},u=function(){var t,e,i;return e=1<=arguments.length?d.call(arguments,0):[],i=e[0],t=e[1],h(i.toFixed(t))},p=function(t,e){var i,s,n;for(i in s={},t)g.call(t,i)&&(n=t[i],s[i]=n);for(i in e)g.call(e,i)&&(n=e[i],s[i]=n);return s},h=function(t){var e,i,s,n;for(t+="",s=(i=t.split("."))[0],n="",i.length>1&&(n="."+i[1]),e=/(\d+)(\d{3})/;e.test(s);)s=s.replace(e,"$1,$2");return s+n},l=function(t){return"#"===t.charAt(0)?t.substring(1,7):t},i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),e.prototype.displayScale=1,e.prototype.forceUpdate=!0,e.prototype.setTextField=function(t,e){return this.textField=t instanceof r?t:new r(t,e)},e.prototype.setMinValue=function(t,e){var i,s,n,o,r;if(this.minValue=t,null==e&&(e=!0),e){for(s=0,this.displayedValue=this.minValue,o=this.gp||[],r=[],n=o.length;s<n;s++)i=o[s],r.push(i.displayedValue=this.minValue);return r}},e.prototype.setOptions=function(t){return null==t&&(t=null),this.options=p(this.options,t),this.textField&&(this.textField.el.style.fontSize=t.fontSize+"px"),this.options.angle>.5&&(this.options.angle=.5),this.configDisplayScale(),this},e.prototype.configDisplayScale=function(){var t,e,i,s,n;return s=this.displayScale,!1===this.options.highDpiSupport?delete this.displayScale:(e=window.devicePixelRatio||1,t=this.ctx.webkitBackingStorePixelRatio||this.ctx.mozBackingStorePixelRatio||this.ctx.msBackingStorePixelRatio||this.ctx.oBackingStorePixelRatio||this.ctx.backingStorePixelRatio||1,this.displayScale=e/t),this.displayScale!==s&&(n=this.canvas.G__width||this.canvas.width,i=this.canvas.G__height||this.canvas.height,this.canvas.width=n*this.displayScale,this.canvas.height=i*this.displayScale,this.canvas.style.width=n+"px",this.canvas.style.height=i+"px",this.canvas.G__width=n,this.canvas.G__height=i),this},e.prototype.parseValue=function(t){return isFinite(t=parseFloat(t)||Number(t))?t:0},e}(a=function(){function t(t,e){null==t&&(t=!0),this.clear=null==e||e,t&&AnimationUpdater.add(this)}return t.prototype.animationSpeed=32,t.prototype.update=function(t){var e;return null==t&&(t=!1),(!!t||this.displayedValue!==this.value)&&(this.ctx&&this.clear&&this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),.001>=Math.abs((e=this.value-this.displayedValue)/this.animationSpeed)?this.displayedValue=this.value:this.displayedValue=this.displayedValue+e/this.animationSpeed,this.render(),!0)},t}()),r=function(){function t(t,e){this.el=t,this.fractionDigits=e}return t.prototype.render=function(t){return this.el.innerHTML=u(t.displayedValue,this.fractionDigits)},t}(),function(t){function e(t,i){if(this.elem=t,this.text=null!=i&&i,e.__super__.constructor.call(this),void 0===this.elem)throw Error("The element isn't defined.");this.value=+this.elem.innerHTML,this.text&&(this.value=0)}f(e,t),e.prototype.displayedValue=0,e.prototype.value=0,e.prototype.setVal=function(t){return this.value=+t},e.prototype.render=function(){var t;return t=this.text?c(this.displayedValue.toFixed(0)):h(u(this.displayedValue)),this.elem.innerHTML=t}}(a),o=function(t){function e(t){if(this.gauge=t,void 0===this.gauge)throw Error("The element isn't defined.");this.ctx=this.gauge.ctx,this.canvas=this.gauge.canvas,e.__super__.constructor.call(this,!1,!1),this.setOptions()}return f(e,t),e.prototype.displayedValue=0,e.prototype.value=0,e.prototype.options={strokeWidth:.035,length:.1,color:"#000000",iconPath:null,iconScale:1,iconAngle:0},e.prototype.img=null,e.prototype.setOptions=function(t){if(null==t&&(t=null),this.options=p(this.options,t),this.length=2*this.gauge.radius*this.gauge.options.radiusScale*this.options.length,this.strokeWidth=this.canvas.height*this.options.strokeWidth,this.maxValue=this.gauge.maxValue,this.minValue=this.gauge.minValue,this.animationSpeed=this.gauge.animationSpeed,this.options.angle=this.gauge.options.angle,this.options.iconPath)return this.img=new Image,this.img.src=this.options.iconPath},e.prototype.render=function(){var t,e,i,s,n,o,r,a,h;if(t=this.gauge.getAngle.call(this,this.displayedValue),a=Math.round(this.length*Math.cos(t)),h=Math.round(this.length*Math.sin(t)),o=Math.round(this.strokeWidth*Math.cos(t-Math.PI/2)),r=Math.round(this.strokeWidth*Math.sin(t-Math.PI/2)),e=Math.round(this.strokeWidth*Math.cos(t+Math.PI/2)),i=Math.round(this.strokeWidth*Math.sin(t+Math.PI/2)),this.ctx.beginPath(),this.ctx.fillStyle=this.options.color,this.ctx.arc(0,0,this.strokeWidth,0,2*Math.PI,!1),this.ctx.fill(),this.ctx.beginPath(),this.ctx.moveTo(o,r),this.ctx.lineTo(a,h),this.ctx.lineTo(e,i),this.ctx.fill(),this.img)return s=Math.round(this.img.width*this.options.iconScale),n=Math.round(this.img.height*this.options.iconScale),this.ctx.save(),this.ctx.translate(a,h),this.ctx.rotate(t+Math.PI/180*(90+this.options.iconAngle)),this.ctx.drawImage(this.img,-s/2,-n/2,s,n),this.ctx.restore()},e}(a),function(){function t(t){this.elem=t}t.prototype.updateValues=function(t){return this.value=t[0],this.maxValue=t[1],this.avgValue=t[2],this.render()},t.prototype.render=function(){var t,e;return this.textField&&this.textField.text(u(this.value)),0===this.maxValue&&(this.maxValue=2*this.avgValue),e=this.value/this.maxValue*100,t=this.avgValue/this.maxValue*100,$(".bar-value",this.elem).css({width:e+"%"}),$(".typical-value",this.elem).css({width:t+"%"})}}(),n=function(t){function e(t){var i,s;this.canvas=t,e.__super__.constructor.call(this),this.percentColors=null,"u">typeof G_vmlCanvasManager&&(this.canvas=window.G_vmlCanvasManager.initElement(this.canvas)),this.ctx=this.canvas.getContext("2d"),i=this.canvas.clientHeight,s=this.canvas.clientWidth,this.canvas.height=i,this.canvas.width=s,this.gp=[new o(this)],this.setOptions()}return f(e,t),e.prototype.elem=null,e.prototype.value=[20],e.prototype.maxValue=80,e.prototype.minValue=0,e.prototype.displayedAngle=0,e.prototype.displayedValue=0,e.prototype.lineWidth=40,e.prototype.paddingTop=.1,e.prototype.paddingBottom=.1,e.prototype.percentColors=null,e.prototype.options={colorStart:"#6fadcf",colorStop:void 0,gradientType:0,strokeColor:"#e0e0e0",pointer:{length:.8,strokeWidth:.035,iconScale:1},angle:.15,lineWidth:.44,radiusScale:1,fontSize:40,limitMax:!1,limitMin:!1},e.prototype.setOptions=function(t){var i,s,n,o,r;for(null==t&&(t=null),e.__super__.setOptions.call(this,t),this.configPercentColors(),this.extraPadding=0,this.options.angle<0&&(o=Math.PI*(1+this.options.angle),this.extraPadding=Math.sin(o)),this.availableHeight=this.canvas.height*(1-this.paddingTop-this.paddingBottom),this.lineWidth=this.availableHeight*this.options.lineWidth,this.radius=(this.availableHeight-this.lineWidth/2)/(1+this.extraPadding),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),s=0,n=(r=this.gp).length;s<n;s++)(i=r[s]).setOptions(this.options.pointer),i.render();return this.render(),this},e.prototype.configPercentColors=function(){var t,e,i,s,n,o,r;if(this.percentColors=null,void 0!==this.options.percentColors){for(this.percentColors=[],o=[],i=s=0,n=this.options.percentColors.length-1;0<=n?s<=n:s>=n;i=0<=n?++s:--s)r=parseInt(l(this.options.percentColors[i][1]).substring(0,2),16),e=parseInt(l(this.options.percentColors[i][1]).substring(2,4),16),t=parseInt(l(this.options.percentColors[i][1]).substring(4,6),16),o.push(this.percentColors[i]={pct:this.options.percentColors[i][0],color:{r:r,g:e,b:t}});return o}},e.prototype.set=function(t){var e,i,s,n,r,a,h,l,u;for(t instanceof Array||(t=[t]),i=s=0,h=t.length-1;0<=h?s<=h:s>=h;i=0<=h?++s:--s)t[i]=this.parseValue(t[i]);if(t.length>this.gp.length)for(i=n=0,l=t.length-this.gp.length;0<=l?n<l:n>l;i=0<=l?++n:--n)(e=new o(this)).setOptions(this.options.pointer),this.gp.push(e);else t.length<this.gp.length&&(this.gp=this.gp.slice(this.gp.length-t.length));for(a=0,i=0,r=t.length;a<r;a++)(u=t[a])>this.maxValue?this.options.limitMax?u=this.maxValue:this.maxValue=u+1:u<this.minValue&&(this.options.limitMin?u=this.minValue:this.minValue=u-1),this.gp[i].value=u,this.gp[i++].setOptions({minValue:this.minValue,maxValue:this.maxValue,angle:this.options.angle});return this.value=Math.max(Math.min(t[t.length-1],this.maxValue),this.minValue),AnimationUpdater.add(this),AnimationUpdater.run(this.forceUpdate),this.forceUpdate=!1},e.prototype.getAngle=function(t){return(1+this.options.angle)*Math.PI+(t-this.minValue)/(this.maxValue-this.minValue)*(1-2*this.options.angle)*Math.PI},e.prototype.getColorForPercentage=function(t,e){var i,s,n,o,r,a,h;if(0===t)i=this.percentColors[0].color;else for(i=this.percentColors[this.percentColors.length-1].color,n=o=0,a=this.percentColors.length-1;0<=a?o<=a:o>=a;n=0<=a?++o:--o)if(t<=this.percentColors[n].pct){!0===e?(h=this.percentColors[n-1]||this.percentColors[0],s=this.percentColors[n],r=(t-h.pct)/(s.pct-h.pct),i={r:Math.floor(h.color.r*(1-r)+s.color.r*r),g:Math.floor(h.color.g*(1-r)+s.color.g*r),b:Math.floor(h.color.b*(1-r)+s.color.b*r)}):i=this.percentColors[n].color;break}return"rgb("+[i.r,i.g,i.b].join(",")+")"},e.prototype.getColorForValue=function(t,e){var i;return i=(t-this.minValue)/(this.maxValue-this.minValue),this.getColorForPercentage(i,e)},e.prototype.renderStaticLabels=function(t,e,i,s){var n,o,r,a,h,l,p,c,d,g;for(this.ctx.save(),this.ctx.translate(e,i),n=t.font||"10px Times",l=/\d+\.?\d?/,h=n.match(l)[0],c=n.slice(h.length),o=parseFloat(h)*this.displayScale,this.ctx.font=o+c,this.ctx.fillStyle=t.color||"#000000",this.ctx.textBaseline="bottom",this.ctx.textAlign="center",r=0,a=(p=t.labels).length;r<a;r++)void 0!==(g=p[r]).label?(!this.options.limitMin||g>=this.minValue)&&(!this.options.limitMax||g<=this.maxValue)&&(h=(n=g.font||t.font).match(l)[0],c=n.slice(h.length),o=parseFloat(h)*this.displayScale,this.ctx.font=o+c,d=this.getAngle(g.label)-3*Math.PI/2,this.ctx.rotate(d),this.ctx.fillText(u(g.label,t.fractionDigits),0,-s-this.lineWidth/2),this.ctx.rotate(-d)):(!this.options.limitMin||g>=this.minValue)&&(!this.options.limitMax||g<=this.maxValue)&&(d=this.getAngle(g)-3*Math.PI/2,this.ctx.rotate(d),this.ctx.fillText(u(g,t.fractionDigits),0,-s-this.lineWidth/2),this.ctx.rotate(-d));return this.ctx.restore()},e.prototype.renderTicks=function(t,e,i,s){var n,o,r,a,h,l,u,p,c,d,g,f,m,v,y,x,_,A,b,S;if(t!=={}){for(l=t.divisions||0,A=t.subDivisions||0,r=t.divColor||"#fff",v=t.subColor||"#fff",a=t.divLength||.7,x=t.subLength||.2,y=parseFloat(d=parseFloat(c=parseFloat(this.maxValue)-parseFloat(this.minValue))/parseFloat(t.divisions))/parseFloat(t.subDivisions),n=parseFloat(this.minValue),o=0+y,h=(p=c/400)*(t.divWidth||1),_=p*(t.subWidth||1),f=[],b=u=0,g=l+1;u<g;b=u+=1)this.ctx.lineWidth=this.lineWidth*a,m=this.lineWidth/2*(1-a),S=this.radius*this.options.radiusScale+m,this.ctx.strokeStyle=r,this.ctx.beginPath(),this.ctx.arc(0,0,S,this.getAngle(n-h),this.getAngle(n+h),!1),this.ctx.stroke(),o=n+y,n+=d,b!==t.divisions&&A>0?f.push((function(){var t,e,i;for(i=[],t=0,e=A-1;t<e;t+=1)this.ctx.lineWidth=this.lineWidth*x,m=this.lineWidth/2*(1-x),S=this.radius*this.options.radiusScale+m,this.ctx.strokeStyle=v,this.ctx.beginPath(),this.ctx.arc(0,0,S,this.getAngle(o-_),this.getAngle(o+_),!1),this.ctx.stroke(),i.push(o+=y);return i}).call(this)):f.push(void 0);return f}},e.prototype.render=function(){var t,e,i,s,n,o,r,a,h,l,u,p,c,d,g,f;if(g=this.canvas.width/2,i=this.canvas.height*this.paddingTop+this.availableHeight-(this.radius+this.lineWidth/2)*this.extraPadding,t=this.getAngle(this.displayedValue),this.textField&&this.textField.render(this),this.ctx.lineCap="butt",l=this.radius*this.options.radiusScale,this.options.staticLabels&&this.renderStaticLabels(this.options.staticLabels,g,i,l),this.options.staticZones)for(this.ctx.save(),this.ctx.translate(g,i),this.ctx.lineWidth=this.lineWidth,s=0,o=(u=this.options.staticZones).length;s<o;s++)h=(f=u[s]).min,this.options.limitMin&&h<this.minValue&&(h=this.minValue),a=f.max,this.options.limitMax&&a>this.maxValue&&(a=this.maxValue),d=this.radius*this.options.radiusScale,f.height&&(this.ctx.lineWidth=this.lineWidth*f.height,c=this.lineWidth/2*(f.offset||1-f.height),d=this.radius*this.options.radiusScale+c),this.ctx.strokeStyle=f.strokeStyle,this.ctx.beginPath(),this.ctx.arc(0,0,d,this.getAngle(h),this.getAngle(a),!1),this.ctx.stroke();else void 0!==this.options.customFillStyle?e=this.options.customFillStyle(this):null!==this.percentColors?e=this.getColorForValue(this.displayedValue,this.options.generateGradient):void 0!==this.options.colorStop?((e=0===this.options.gradientType?this.ctx.createRadialGradient(g,i,9,g,i,70):this.ctx.createLinearGradient(0,0,g,0)).addColorStop(0,this.options.colorStart),e.addColorStop(1,this.options.colorStop)):e=this.options.colorStart,this.ctx.strokeStyle=e,this.ctx.beginPath(),this.ctx.arc(g,i,l,(1+this.options.angle)*Math.PI,t,!1),this.ctx.lineWidth=this.lineWidth,this.ctx.stroke(),this.ctx.strokeStyle=this.options.strokeColor,this.ctx.beginPath(),this.ctx.arc(g,i,l,t,(2-this.options.angle)*Math.PI,!1),this.ctx.stroke(),this.ctx.save(),this.ctx.translate(g,i);for(this.options.renderTicks&&this.renderTicks(this.options.renderTicks,g,i,l),this.ctx.restore(),this.ctx.translate(g,i),n=0,r=(p=this.gp).length;n<r;n++)p[n].update(!0);return this.ctx.translate(-g,-i)},e}(i),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),e.prototype.strokeGradient=function(t,e,i,s){var n;return(n=this.ctx.createRadialGradient(t,e,i,t,e,s)).addColorStop(0,this.options.shadowColor),n.addColorStop(.12,this.options._orgStrokeColor),n.addColorStop(.88,this.options._orgStrokeColor),n.addColorStop(1,this.options.shadowColor),n},e.prototype.setOptions=function(t){var i,s,n,o;return null==t&&(t=null),e.__super__.setOptions.call(this,t),o=this.canvas.width/2,i=this.canvas.height/2,s=this.radius-this.lineWidth/2,n=this.radius+this.lineWidth/2,this.options._orgStrokeColor=this.options.strokeColor,this.options.strokeColor=this.strokeGradient(o,i,s,n),this},e}(e=function(t){function e(t){this.canvas=t,e.__super__.constructor.call(this),"u">typeof G_vmlCanvasManager&&(this.canvas=window.G_vmlCanvasManager.initElement(this.canvas)),this.ctx=this.canvas.getContext("2d"),this.setOptions(),this.render()}return f(e,t),e.prototype.lineWidth=15,e.prototype.displayedValue=0,e.prototype.value=33,e.prototype.maxValue=80,e.prototype.minValue=0,e.prototype.options={lineWidth:.1,colorStart:"#6f6ea0",colorStop:"#c0c0db",strokeColor:"#eeeeee",shadowColor:"#d5d5d5",angle:.35,radiusScale:1},e.prototype.getAngle=function(t){return(1-this.options.angle)*Math.PI+(t-this.minValue)/(this.maxValue-this.minValue)*(2+this.options.angle-(1-this.options.angle))*Math.PI},e.prototype.setOptions=function(t){return null==t&&(t=null),e.__super__.setOptions.call(this,t),this.lineWidth=this.canvas.height*this.options.lineWidth,this.radius=this.options.radiusScale*(this.canvas.height/2-this.lineWidth/2),this},e.prototype.set=function(t){return this.value=this.parseValue(t),this.value>this.maxValue?this.options.limitMax?this.value=this.maxValue:this.maxValue=this.value:this.value<this.minValue&&(this.options.limitMin?this.value=this.minValue:this.minValue=this.value),AnimationUpdater.add(this),AnimationUpdater.run(this.forceUpdate),this.forceUpdate=!1},e.prototype.render=function(){var t,e,i,s;return t=this.getAngle(this.displayedValue),s=this.canvas.width/2,i=this.canvas.height/2,this.textField&&this.textField.render(this),(e=this.ctx.createRadialGradient(s,i,39,s,i,70)).addColorStop(0,this.options.colorStart),e.addColorStop(1,this.options.colorStop),this.radius,this.lineWidth,this.radius,this.lineWidth,this.ctx.strokeStyle=this.options.strokeColor,this.ctx.beginPath(),this.ctx.arc(s,i,this.radius,(1-this.options.angle)*Math.PI,(2+this.options.angle)*Math.PI,!1),this.ctx.lineWidth=this.lineWidth,this.ctx.lineCap="round",this.ctx.stroke(),this.ctx.strokeStyle=e,this.ctx.beginPath(),this.ctx.arc(s,i,this.radius,(1-this.options.angle)*Math.PI,t,!1),this.ctx.stroke()},e}(i)),window.AnimationUpdater={elements:[],animId:null,addAll:function(t){var e,i,s,n;for(i=0,n=[],s=t.length;i<s;i++)e=t[i],n.push(AnimationUpdater.elements.push(e));return n},add:function(t){if(0>m.call(AnimationUpdater.elements,t))return AnimationUpdater.elements.push(t)},run:function(t){var e,i,s,n,o,r,a;if(null==t&&(t=!1),isFinite(parseFloat(t))||!0===t){for(e=!0,a=[],r=AnimationUpdater.elements,s=i=0,o=r.length;i<o;s=++i)r[s].update(!0===t)?e=!1:a.push(s);for(n=a.length-1;n>=0;n+=-1)s=a[n],AnimationUpdater.elements.splice(s,1);return AnimationUpdater.animId=e?null:requestAnimationFrame(AnimationUpdater.run)}if(!1===t)return!0===AnimationUpdater.animId&&cancelAnimationFrame(AnimationUpdater.animId),AnimationUpdater.animId=requestAnimationFrame(AnimationUpdater.run)}},"function"==typeof window.define&&null!=window.define.amd?define(function(){return{Gauge:n,Donut:s,BaseDonut:e,TextRenderer:r}}):null!=t.exports?t.exports={Gauge:n,Donut:s,BaseDonut:e,TextRenderer:r}:(window.Gauge=n,window.Donut=s,window.BaseDonut=e,window.TextRenderer=r)}).call(this)},51(t,e,i){var s=0/0,n=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,a=/^0o[0-7]+$/i,h=parseInt,l="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g,u="object"==typeof self&&self&&self.Object===Object&&self,p=l||u||Function("return this")(),c=Object.prototype.toString,d=Math.max,g=Math.min,f=function(){return p.Date.now()};function m(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function v(t){if("number"==typeof t)return t;if("symbol"==typeof(e=t)||e&&"object"==typeof e&&"[object Symbol]"==c.call(e))return s;if(m(t)){var e,i="function"==typeof t.valueOf?t.valueOf():t;t=m(i)?i+"":i}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(n,"");var l=r.test(t);return l||a.test(t)?h(t.slice(2),l?2:8):o.test(t)?s:+t}t.exports=function(t,e,i){var s,n,o,r,a,h,l=0,u=!1,p=!1,c=!0;if("function"!=typeof t)throw TypeError("Expected a function");function y(e){var i=s,o=n;return s=n=void 0,l=e,r=t.apply(o,i)}function x(t){var i=t-h,s=t-l;return void 0===h||i>=e||i<0||p&&s>=o}function _(){var t,i,s,n=f();if(x(n))return A(n);a=setTimeout(_,(t=n-h,i=n-l,s=e-t,p?g(s,o-i):s))}function A(t){return(a=void 0,c&&s)?y(t):(s=n=void 0,r)}function b(){var t,i=f(),o=x(i);if(s=arguments,n=this,h=i,o){if(void 0===a)return l=t=h,a=setTimeout(_,e),u?y(t):r;if(p)return a=setTimeout(_,e),y(h)}return void 0===a&&(a=setTimeout(_,e)),r}return e=v(e)||0,m(i)&&(u=!!i.leading,o=(p="maxWait"in i)?d(v(i.maxWait)||0,e):o,c="trailing"in i?!!i.trailing:c),b.cancel=function(){void 0!==a&&clearTimeout(a),l=0,s=h=n=a=void 0},b.flush=function(){return void 0===a?r:A(f())},b}},954(t){"use strict";t.exports=e},368(t){"use strict";t.exports=s},650(e){"use strict";e.exports=t},673(t){"use strict";t.exports=i}},o={};function r(t){var e=o[t];if(void 0!==e)return e.exports;var i=o[t]={exports:{}};return n[t].call(i.exports,i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(t){if("object"==typeof window)return window}})(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var a={};return(()=>{"use strict";let t;r.r(a),r.d(a,{OrGauge:()=>tS});let e=globalThis,i=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),n=new WeakMap;class o{constructor(t,e,i){if(this._$cssResult$=!0,i!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(i&&void 0===t){let i=void 0!==e&&1===e.length;i&&(t=n.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&n.set(e,t))}return t}toString(){return this.cssText}}let h=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e,i="";for(let e of t.cssRules)i+=e.cssText;return new o("string"==typeof(e=i)?e:e+"",void 0,s)})(t):t,{is:l,defineProperty:u,getOwnPropertyDescriptor:p,getOwnPropertyNames:c,getOwnPropertySymbols:d,getPrototypeOf:g}=Object,f=globalThis,m=f.trustedTypes,v=m?m.emptyScript:"",y=f.reactiveElementPolyfillSupport,x={toAttribute(t,e){switch(e){case Boolean:t=t?v:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},_=(t,e)=>!l(t,e),A={attribute:!0,type:String,converter:x,reflect:!1,useDefault:!1,hasChanged:_};Symbol.metadata??=Symbol("metadata"),f.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=A){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&u(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){let{get:s,set:n}=p(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:s,set(e){let o=s?.call(this);n?.call(this,e),this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??A}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;let t=g(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){let t=this.properties;for(let e of[...c(t),...d(t)])this.createProperty(e,t[e])}let t=this[Symbol.metadata];if(null!==t){let e=litPropertyMetadata.get(t);if(void 0!==e)for(let[t,i]of e)this.elementProperties.set(t,i)}for(let[t,e]of(this._$Eh=new Map,this.elementProperties)){let i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t))for(let i of new Set(t.flat(1/0).reverse()))e.unshift(h(i));else void 0!==t&&e.push(h(t));return e}static _$Eu(t,e){let i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map;for(let e of this.constructor.elementProperties.keys())this.hasOwnProperty(e)&&(t.set(e,this[e]),delete this[e]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,s)=>{if(i)t.adoptedStyleSheets=s.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let i of s){let s=document.createElement("style"),n=e.litNonce;void 0!==n&&s.setAttribute("nonce",n),s.textContent=i.cssText,t.appendChild(s)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){let i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(void 0!==s&&!0===i.reflect){let n=(void 0!==i.converter?.toAttribute?i.converter:x).toAttribute(e,i.type);this._$Em=t,null==n?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(t,e){let i=this.constructor,s=i._$Eh.get(t);if(void 0!==s&&this._$Em!==s){let t=i.getPropertyOptions(s),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:x;this._$Em=s;let o=n.fromAttribute(e,t.type);this[s]=o??this._$Ej?.get(s)??o,this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){let s=this.constructor,n=this[t];if(!(((i??=s.getPropertyOptions(t)).hasChanged??_)(n,e)||i.useDefault&&i.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(s._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:n},o){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),!0!==n||void 0!==o)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}let t=this.constructor.elementProperties;if(t.size>0)for(let[e,i]of t){let{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let t=!1,e=this._$AL;try{(t=this.shouldUpdate(e))?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:"open"},b.elementProperties=new Map,b.finalized=new Map,y?.({ReactiveElement:b}),(f.reactiveElementVersions??=[]).push("2.1.1");let S=globalThis,w=S.trustedTypes,C=w?w.createPolicy("lit-html",{createHTML:t=>t}):void 0,M="$lit$",P=`lit$${Math.random().toFixed(9).slice(2)}$`,E="?"+P,O=`<${E}>`,V=document,R=()=>V.createComment(""),T=t=>null===t||"object"!=typeof t&&"function"!=typeof t,U=Array.isArray,k="[ \n\f\r]",W=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,F=/-->/g,j=/>/g,I=RegExp(`>|${k}(?:([^\\s"'>=/]+)(${k}*=${k}*(?:[^
2
2
  \f\r"'\`<>=]|("|')|))|$)`,"g"),D=/'/g,N=/"/g,H=/^(?:script|style|textarea|title)$/i,z=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),L=z(1),q=(z(2),z(3),Symbol.for("lit-noChange")),G=Symbol.for("lit-nothing"),B=new WeakMap,Z=V.createTreeWalker(V,129);function J(t,e){if(!U(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==C?C.createHTML(e):e}class K{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let n=0,o=0;const r=t.length-1,a=this.parts,[h,l]=((t,e)=>{let i=t.length-1,s=[],n,o=2===e?"<svg>":3===e?"<math>":"",r=W;for(let e=0;e<i;e++){let i=t[e],a,h,l=-1,u=0;for(;u<i.length&&(r.lastIndex=u,null!==(h=r.exec(i)));)u=r.lastIndex,r===W?"!--"===h[1]?r=F:void 0!==h[1]?r=j:void 0!==h[2]?(H.test(h[2])&&(n=RegExp("</"+h[2],"g")),r=I):void 0!==h[3]&&(r=I):r===I?">"===h[0]?(r=n??W,l=-1):void 0===h[1]?l=-2:(l=r.lastIndex-h[2].length,a=h[1],r=void 0===h[3]?I:'"'===h[3]?N:D):r===N||r===D?r=I:r===F||r===j?r=W:(r=I,n=void 0);let p=r===I&&t[e+1].startsWith("/>")?" ":"";o+=r===W?i+O:l>=0?(s.push(a),i.slice(0,l)+M+i.slice(l)+P+p):i+P+(-2===l?e:p)}return[J(t,o+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]})(t,e);if(this.el=K.createElement(h,i),Z.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=Z.nextNode())&&a.length<r;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(M)){const e=l[o++],i=s.getAttribute(t).split(P),r=/([.?@])?(.*)/.exec(e);a.push({type:1,index:n,name:r[2],strings:i,ctor:"."===r[1]?te:"?"===r[1]?ti:"@"===r[1]?ts:tt}),s.removeAttribute(t)}else t.startsWith(P)&&(a.push({type:6,index:n}),s.removeAttribute(t));if(H.test(s.tagName)){const t=s.textContent.split(P),e=t.length-1;if(e>0){s.textContent=w?w.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],R()),Z.nextNode(),a.push({type:2,index:++n});s.append(t[e],R())}}}else if(8===s.nodeType)if(s.data===E)a.push({type:2,index:n});else{let t=-1;for(;-1!==(t=s.data.indexOf(P,t+1));)a.push({type:7,index:n}),t+=P.length-1}n++}}static createElement(t,e){let i=V.createElement("template");return i.innerHTML=t,i}}function Q(t,e,i=t,s){if(e===q)return e;let n=void 0!==s?i._$Co?.[s]:i._$Cl,o=T(e)?void 0:e._$litDirective$;return n?.constructor!==o&&(n?._$AO?.(!1),void 0===o?n=void 0:(n=new o(t))._$AT(t,i,s),void 0!==s?(i._$Co??=[])[s]=n:i._$Cl=n),void 0!==n&&(e=Q(t,n._$AS(t,e.values),n,s)),e}class X{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:i}=this._$AD,s=(t?.creationScope??V).importNode(e,!0);Z.currentNode=s;let n=Z.nextNode(),o=0,r=0,a=i[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new Y(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new tn(n,this,t)),this._$AV.push(e),a=i[++r]}o!==a?.index&&(n=Z.nextNode(),o++)}return Z.currentNode=V,s}p(t){let e=0;for(let i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class Y{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){let i;T(t=Q(this,t,e))?t===G||null==t||""===t?(this._$AH!==G&&this._$AR(),this._$AH=G):t!==this._$AH&&t!==q&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):U(i=t)||"function"==typeof i?.[Symbol.iterator]?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==G&&T(this._$AH)?this._$AA.nextSibling.data=t:this.T(V.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=K.createElement(J(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{let t=new X(s,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=B.get(t.strings);return void 0===e&&B.set(t.strings,e=new K(t)),e}k(t){U(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,i,s=0;for(let n of t)s===e.length?e.push(i=new Y(this.O(R()),this.O(R()),this,this.options)):i=e[s],i._$AI(n),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class tt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,n){this.type=1,this._$AH=G,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=G}_$AI(t,e=this,i,s){let n=this.strings,o=!1;if(void 0===n)(o=!T(t=Q(this,t,e,0))||t!==this._$AH&&t!==q)&&(this._$AH=t);else{let s,r,a=t;for(t=n[0],s=0;s<n.length-1;s++)(r=Q(this,a[i+s],e,s))===q&&(r=this._$AH[s]),o||=!T(r)||r!==this._$AH[s],r===G?t=G:t!==G&&(t+=(r??"")+n[s+1]),this._$AH[s]=r}o&&!s&&this.j(t)}j(t){t===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class te extends tt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===G?void 0:t}}class ti extends tt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==G)}}class ts extends tt{constructor(t,e,i,s,n){super(t,e,i,s,n),this.type=5}_$AI(t,e=this){if((t=Q(this,t,e,0)??G)===q)return;let i=this._$AH,s=t===G&&i!==G||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==G&&(i===G||s);s&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class tn{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Q(this,t)}}let to=S.litHtmlPolyfillSupport;to?.(K,Y),(S.litHtmlVersions??=[]).push("3.3.1");let tr=globalThis;class ta extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{let s=i?.renderBefore??e,n=s._$litPart$;if(void 0===n){let t=i?.renderBefore??null;s._$litPart$=n=new Y(e.insertBefore(R(),t),t,void 0,i??{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return q}}ta._$litElement$=!0,ta.finalized=!0,tr.litElementHydrateSupport?.({LitElement:ta});let th=tr.litElementPolyfillSupport;th?.({LitElement:ta}),(tr.litElementVersions??=[]).push("4.2.1");let tl={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:_};function tu(t){return(e,i)=>{let s;return"object"==typeof i?((t=tl,e,i)=>{let{kind:s,metadata:n}=i,o=globalThis.litPropertyMetadata.get(n);if(void 0===o&&globalThis.litPropertyMetadata.set(n,o=new Map),"setter"===s&&((t=Object.create(t)).wrapped=!0),o.set(i.name,t),"accessor"===s){let{name:s}=i;return{set(i){let n=e.get.call(this);e.set.call(this,i),this.requestUpdate(s,n,t)},init(e){return void 0!==e&&this.C(s,void 0,t,e),e}}}if("setter"===s){let{name:s}=i;return function(i){let n=this[s];e.call(this,i),this.requestUpdate(s,n,t)}}throw Error("Unsupported decorator location: "+s)})(t,e,i):(s=e.hasOwnProperty(i),e.constructor.createProperty(i,t),s?Object.getOwnPropertyDescriptor(e,i):void 0)}}function tp(t){return tu({...t,state:!0,attribute:!1})}let tc=(t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,i),i);function td(t,e){return(i,s,n)=>{let o=e=>e.renderRoot?.querySelector(t)??null;if(e){let t,{get:e,set:r}="object"==typeof s?i:n??(t=Symbol(),{get(){return this[t]},set(e){this[t]=e}});return tc(i,s,{get(){let t=e.call(this);return void 0===t&&(null!==(t=o(this))||this.hasUpdated)&&r.call(this,t),t}})}return tc(i,s,{get(){return o(this)}})}}var tg=r(650),tf=r(1),tm=r(954),tv=r.n(tm),ty=r(673),tx=r(51),t_=r.n(tx),t$=r(368),tA=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};let tb=((t,...e)=>new o(1===t.length?t[0]:e.reduce((e,i,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1],t[0]),t,s))`
3
3
  :host {
4
4
  display: flex;