@syncfusion/ej2-lineargauge
Version:
Essential JS 2 LinearGauge Components
11 lines • 120 kB
JavaScript
/*!
* filename: ej2-lineargauge.min.js
* version : 31.1.17
* Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
* Use of this code is subject to the terms of our license.
* A copy of the current license can be obtained at any time by e-mailing
* licensing@syncfusion.com. Any infringement will be prosecuted under
* applicable laws.
*/
/*! For license information please see ej2-lineargauge.min.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("SyncfusionBase"),require("SyncfusionSvgBase"),require("SyncfusionPdfExport")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionSvgBase","SyncfusionPdfExport"],e):"object"==typeof exports?exports.SyncfusionLinearGauge=e(require("SyncfusionBase"),require("SyncfusionSvgBase"),require("SyncfusionPdfExport")):t.SyncfusionLinearGauge=e(t.SyncfusionBase,t.SyncfusionSvgBase,t.SyncfusionPdfExport)}(self,((t,e,i)=>(()=>{"use strict";var o={766:e=>{e.exports=t},461:t=>{t.exports=i},727:t=>{t.exports=e}},n={};function r(t){var e=n[t];if(void 0!==e)return e.exports;var i=n[t]={exports:{}};return o[t](i,i.exports,r),i.exports}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.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var a={};return(()=>{r.r(a),r.d(a,{Align:()=>lt,Annotation:()=>u,Annotations:()=>Pt,Axis:()=>w,Border:()=>h,ColorStop:()=>Et,Container:()=>d,CustomizeOption:()=>it,Font:()=>n,GaugeLocation:()=>$,GaugeTooltip:()=>At,Gradient:()=>It,GradientPosition:()=>Lt,ImageExport:()=>Nt,Label:()=>f,Line:()=>y,LinearGauge:()=>_t,LinearGradient:()=>Ot,Margin:()=>s,PathOption:()=>ot,PdfExport:()=>Vt,Pointer:()=>x,Print:()=>Dt,RadialGradient:()=>Bt,Range:()=>v,RangeTooltip:()=>p,Rect:()=>et,RectOption:()=>nt,Size:()=>tt,TextOption:()=>rt,TextStyle:()=>l,Tick:()=>b,TooltipSettings:()=>g,VisibleLabels:()=>at,VisibleRange:()=>K,calculateNiceInterval:()=>ht,calculateShapes:()=>mt,calculateTextPosition:()=>yt,convertPixelToValue:()=>j,formatValue:()=>q,getActualDesiredIntervalsCount:()=>ut,getBox:()=>ft,getElement:()=>G,getElementOffset:()=>Z,getExtraWidth:()=>vt,getFontStyle:()=>X,getMousePosition:()=>gt,getPathToRect:()=>U,getPointer:()=>dt,getRangeColor:()=>pt,getRangePalette:()=>ct,getTemplateFunction:()=>J,measureText:()=>N,removeElement:()=>W,removeTooltip:()=>xt,showTooltip:()=>bt,stringToNumber:()=>_,stringToNumberSize:()=>D,textElement:()=>st,textFormatter:()=>Y,textTrim:()=>M,triggerDownload:()=>Q,valueToCoefficient:()=>H,withInRange:()=>V});var t,e=r(766),i=(t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},t(e,i)},function(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}),o=function(t,e,i,o){var n,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),o([(0,e.Property)("16px")],n.prototype,"size",void 0),o([(0,e.Property)("")],n.prototype,"color",void 0),o([(0,e.Property)("Segoe UI")],n.prototype,"fontFamily",void 0),o([(0,e.Property)("Regular")],n.prototype,"fontWeight",void 0),o([(0,e.Property)("Normal")],n.prototype,"fontStyle",void 0),o([(0,e.Property)(1)],n.prototype,"opacity",void 0),n}(e.ChildProperty),l=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),o([(0,e.Property)("16px")],n.prototype,"size",void 0),o([(0,e.Property)("")],n.prototype,"fontFamily",void 0),o([(0,e.Property)("normal")],n.prototype,"fontWeight",void 0),o([(0,e.Property)("normal")],n.prototype,"fontStyle",void 0),n}(e.ChildProperty),s=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),o([(0,e.Property)(10)],n.prototype,"left",void 0),o([(0,e.Property)(10)],n.prototype,"right",void 0),o([(0,e.Property)(10)],n.prototype,"top",void 0),o([(0,e.Property)(10)],n.prototype,"bottom",void 0),n}(e.ChildProperty),h=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),o([(0,e.Property)(null)],n.prototype,"color",void 0),o([(0,e.Property)(0)],n.prototype,"width",void 0),o([(0,e.Property)("")],n.prototype,"dashArray",void 0),n}(e.ChildProperty),u=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return i(r,t),o([(0,e.Property)("")],r.prototype,"content",void 0),o([(0,e.Property)(0)],r.prototype,"x",void 0),o([(0,e.Property)(0)],r.prototype,"y",void 0),o([(0,e.Property)("None")],r.prototype,"verticalAlignment",void 0),o([(0,e.Property)("None")],r.prototype,"horizontalAlignment",void 0),o([(0,e.Property)("-1")],r.prototype,"zIndex",void 0),o([(0,e.Complex)({size:"12px",color:null},n)],r.prototype,"font",void 0),o([(0,e.Property)(null)],r.prototype,"axisIndex",void 0),o([(0,e.Property)(null)],r.prototype,"axisValue",void 0),r}(e.ChildProperty),d=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),o([(0,e.Property)("Normal")],n.prototype,"type",void 0),o([(0,e.Property)(0)],n.prototype,"height",void 0),o([(0,e.Property)(0)],n.prototype,"width",void 0),o([(0,e.Property)(10)],n.prototype,"roundedCornerRadius",void 0),o([(0,e.Property)("transparent")],n.prototype,"backgroundColor",void 0),o([(0,e.Complex)({width:1,color:null},h)],n.prototype,"border",void 0),o([(0,e.Property)(0)],n.prototype,"offset",void 0),n}(e.ChildProperty),p=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return i(r,t),o([(0,e.Property)(null)],r.prototype,"fill",void 0),o([(0,e.Complex)({size:null,opacity:null,fontFamily:null,fontWeight:null},n)],r.prototype,"textStyle",void 0),o([(0,e.Property)(null)],r.prototype,"format",void 0),o([(0,e.Property)(null)],r.prototype,"template",void 0),o([(0,e.Property)(!0)],r.prototype,"enableAnimation",void 0),o([(0,e.Complex)({color:null,width:null},h)],r.prototype,"border",void 0),o([(0,e.Property)("End")],r.prototype,"position",void 0),o([(0,e.Property)(!1)],r.prototype,"showAtMousePosition",void 0),r}(e.ChildProperty),g=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return i(r,t),o([(0,e.Property)(!1)],r.prototype,"enable",void 0),o([(0,e.Property)("")],r.prototype,"fill",void 0),o([(0,e.Complex)({color:"",size:null,opacity:null,fontFamily:null,fontWeight:null},n)],r.prototype,"textStyle",void 0),o([(0,e.Property)(null)],r.prototype,"format",void 0),o([(0,e.Property)(!1)],r.prototype,"showAtMousePosition",void 0),o([(0,e.Complex)({},p)],r.prototype,"rangeSettings",void 0),o([(0,e.Property)("End")],r.prototype,"position",void 0),o([(0,e.Property)(null)],r.prototype,"template",void 0),o([(0,e.Property)(!0)],r.prototype,"enableAnimation",void 0),o([(0,e.Complex)({color:null,width:null},h)],r.prototype,"border",void 0),o([(0,e.Property)("Pointer")],r.prototype,"type",void 0),r}(e.ChildProperty),c=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},t(e,i)};return function(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),m=function(t,e,i,o){var n,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},y=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return c(i,t),m([(0,e.Property)("")],i.prototype,"dashArray",void 0),m([(0,e.Property)(null)],i.prototype,"height",void 0),m([(0,e.Property)(2)],i.prototype,"width",void 0),m([(0,e.Property)(null)],i.prototype,"color",void 0),m([(0,e.Property)(0)],i.prototype,"offset",void 0),i}(e.ChildProperty),f=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return c(i,t),m([(0,e.Complex)({size:"12px",color:null,fontStyle:null,fontWeight:null,fontFamily:null},n)],i.prototype,"font",void 0),m([(0,e.Property)(!1)],i.prototype,"useRangeColor",void 0),m([(0,e.Property)("")],i.prototype,"format",void 0),m([(0,e.Property)(0)],i.prototype,"offset",void 0),m([(0,e.Property)("Auto")],i.prototype,"position",void 0),i}(e.ChildProperty),v=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return c(i,t),m([(0,e.Property)(0)],i.prototype,"start",void 0),m([(0,e.Property)(0)],i.prototype,"end",void 0),m([(0,e.Property)(null)],i.prototype,"linearGradient",void 0),m([(0,e.Property)(null)],i.prototype,"radialGradient",void 0),m([(0,e.Property)("Outside")],i.prototype,"position",void 0),m([(0,e.Property)("")],i.prototype,"color",void 0),m([(0,e.Property)(10)],i.prototype,"startWidth",void 0),m([(0,e.Property)(10)],i.prototype,"endWidth",void 0),m([(0,e.Property)(0)],i.prototype,"offset",void 0),m([(0,e.Complex)({color:"#000000",width:0},h)],i.prototype,"border",void 0),i}(e.ChildProperty),b=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return c(i,t),m([(0,e.Property)(20)],i.prototype,"height",void 0),m([(0,e.Property)(2)],i.prototype,"width",void 0),m([(0,e.Property)(null)],i.prototype,"interval",void 0),m([(0,e.Property)(null)],i.prototype,"color",void 0),m([(0,e.Property)(null)],i.prototype,"offset",void 0),m([(0,e.Property)("Auto")],i.prototype,"position",void 0),i}(e.ChildProperty),x=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.animationComplete=!0,e.isPointerAnimation=!0,e.currentValue=null,e}return c(i,t),m([(0,e.Property)("Marker")],i.prototype,"type",void 0),m([(0,e.Property)(null)],i.prototype,"linearGradient",void 0),m([(0,e.Property)(null)],i.prototype,"radialGradient",void 0),m([(0,e.Property)(null)],i.prototype,"value",void 0),m([(0,e.Property)("InvertedTriangle")],i.prototype,"markerType",void 0),m([(0,e.Property)(null)],i.prototype,"imageUrl",void 0),m([(0,e.Complex)({color:"#808080"},h)],i.prototype,"border",void 0),m([(0,e.Property)(10)],i.prototype,"roundedCornerRadius",void 0),m([(0,e.Property)("Far")],i.prototype,"placement",void 0),m([(0,e.Property)(20)],i.prototype,"height",void 0),m([(0,e.Property)(20)],i.prototype,"width",void 0),m([(0,e.Property)(null)],i.prototype,"color",void 0),m([(0,e.Property)(1)],i.prototype,"opacity",void 0),m([(0,e.Property)(0)],i.prototype,"animationDuration",void 0),m([(0,e.Property)(!1)],i.prototype,"enableDrag",void 0),m([(0,e.Property)(0)],i.prototype,"offset",void 0),m([(0,e.Property)("Auto")],i.prototype,"position",void 0),m([(0,e.Property)(null)],i.prototype,"description",void 0),m([(0,e.Property)("")],i.prototype,"text",void 0),m([(0,e.Complex)({size:"16px",fontStyle:"normal",fontWeight:"normal",fontFamily:null},l)],i.prototype,"textStyle",void 0),i}(e.ChildProperty),w=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.visibleLabels=[],e}return c(i,t),m([(0,e.Property)(0)],i.prototype,"minimum",void 0),m([(0,e.Property)(100)],i.prototype,"maximum",void 0),m([(0,e.Property)(!1)],i.prototype,"isInversed",void 0),m([(0,e.Property)(!1)],i.prototype,"showLastLabel",void 0),m([(0,e.Property)(!1)],i.prototype,"opposedPosition",void 0),m([(0,e.Complex)({},y)],i.prototype,"line",void 0),m([(0,e.Collection)([{}],v)],i.prototype,"ranges",void 0),m([(0,e.Collection)([{}],x)],i.prototype,"pointers",void 0),m([(0,e.Complex)({width:2,height:20},b)],i.prototype,"majorTicks",void 0),m([(0,e.Complex)({width:1,height:10},b)],i.prototype,"minorTicks",void 0),m([(0,e.Complex)({},f)],i.prototype,"labelStyle",void 0),i}(e.ChildProperty),C="animationComplete",F="axisLabelRender",S="tooltipRender",P="annotationRender",A="gaugeMouseMove",T="gaugeMouseLeave",k="gaugeMouseDown",E="gaugeMouseUp",L="dragStart",O="dragMove",B="dragEnd",I="resized",z=r(727),R=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},t(e,i)};return function(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}();function _(t,e){return-1!==t.indexOf("%")?e/100*parseInt(t,10):parseInt(t,10)}function D(t,i){return(0,e.isNullOrUndefined)(t)?null:-1!==t.indexOf("%")?i:parseInt(t,10)}function N(t,i){var o=document.getElementById("gauge-measuretext");return null===o&&(o=(0,e.createElement)("text",{id:"gauge-measuretext"}),document.body.appendChild(o)),o.innerText=t,o.style.position="absolute",o.style.fontSize=i.size,o.style.fontWeight=i.fontWeight,o.style.fontStyle=i.fontStyle,o.style.fontFamily=i.fontFamily,o.style.visibility="hidden",o.style.top="-100",o.style.left="0",o.style.whiteSpace="nowrap",new tt(o.clientWidth,o.clientHeight)}function M(t,e,i){var o=e,n=N(e,i).width;if(n>t)for(var r=e.length-1;r>=0;--r)if((n=N(o=e.substring(0,r)+"...",i).width)<=t||o.length<4)return o.length<4&&(o=" "),o;return o}function V(t,e,i,o,n,r){return"pointer"===r?t<=o&&t>=n:null!=e&&e<=o&&e>=n&&null!=i&&i<=o&&i>=n}function j(t,e,i,o,n,r){var a=t.getBoundingClientRect(),l=e.getBoundingClientRect(),s=e.id.indexOf("MarkerPointer")>-1?l.height/2:o.isInversed?l.height:0,h=e.id.indexOf("MarkerPointer")>-1?l.width/2:o.isInversed?0:l.width,u=new tt(o.lineBounds.width,o.lineBounds.height),d="drag"===n?r.y-o.lineBounds.y:l.top+s-a.top-o.lineBounds.y,p=vt(t),g="drag"===n?r.x-o.lineBounds.x+p:l.left+h-a.left-o.lineBounds.x+p,c="Vertical"===i?u.height:u.width,m="Vertical"===i?d:g,y="Vertical"===i?o.isInversed?m/c:1-m/c:o.isInversed?1-m/c:m/c;return y=y*o.visibleRange.delta+o.visibleRange.min}function U(t,i,o){var n=document.getElementById("gauge_path");null===n&&((n=(0,e.createElement)("text",{id:"gauge_path"})).style.position="absolute",n.style.top="0px",n.style.left="0px",o.appendChild(n));var r=new z.SvgRenderer("id").createSvg({id:"box_path",width:i.width,height:i.height});r.appendChild(t),n.appendChild(r);var a=t.getBBox();return(0,e.remove)(n),a}function G(t){return document.getElementById(t)}function W(t){var i=G(t);i&&(0,e.remove)(i)}function H(t,e,i,o){var n=(t-o.min)/o.delta;return n="Vertical"===i?e.isInversed?n:1-n:e.isInversed?1-n:n}function X(t){return"font-size:"+t.size+"; font-style:"+t.fontStyle+"; font-weight:"+t.fontWeight+"; font-family:"+t.fontFamily+";opacity:"+t.opacity+"; color:"+t.color+";"}function Y(t,e,i){for(var o=0,n=Object.keys(e);o<n.length;o++){var r=n[o];t=t.split("{"+r+"}").join(q(e[r],i).toString())}return t}function q(t,e){var i;return null!==(i=e.format&&!isNaN(Number(t))?e.intl.getNumberFormat({format:e.format,useGrouping:e.useGroupingSeparator})(Number(t)):t)?i:""}function J(t,i){var o=null;try{"function"==typeof t?o=(0,e.compile)(t):document.querySelectorAll(t).length?o=(0,e.compile)(document.querySelector(t).innerHTML.trim()):(i.isVue||i.isVue3)&&(o=(0,e.compile)(t))}catch(i){o=(0,e.compile)(t)}return o}function Z(t,e){e.appendChild(t);var i=t.offsetWidth,o=t.offsetHeight;return e.removeChild(t),new tt(i,o)}function Q(t,i,o,n){(0,e.createElement)("a",{attrs:{download:t+"."+i.toLocaleLowerCase(),href:o}}).dispatchEvent(new MouseEvent(n?"click":"move",{view:window,bubbles:!1,cancelable:!0}))}var K=function(t,e,i,o){this.min=t,this.max=e,this.interval=i,this.delta=o},$=function(t,e){this.x=t,this.y=e},tt=function(t,e){this.width=t,this.height=e},et=function(t,e,i,o){this.x=t,this.y=e,this.width=i,this.height=o},it=function(t){this.id=t},ot=function(t){function e(e,i,o,n,r,a,l,s){void 0===s&&(s="");var h=t.call(this,e)||this;return h.opacity=r,h.fill=i,h.stroke=n,h["stroke-width"]=o,h["stroke-dasharray"]=a,h.d=l,h.transform=s,h}return R(e,t),e}(it),nt=function(t,e,i,o,n){this.opacity=o,this.id=t,this.y=n.y,this.x=n.x,this.fill=e,this.stroke=i.color,this["stroke-width"]=i.width,this["stroke-dasharray"]=i.dashArray,this.height=n.height,this.width=n.width},rt=function(t){function e(e,i,o,n,r,a,l){void 0===a&&(a="");var s=t.call(this,e)||this;return s.transform="",s.baseLine="auto",s.x=i,s.y=o,s.anchor=n,s.text=r,s.transform=a,s.baseLine=l,s}return R(e,t),e}(it),at=function(t,e,i,o,n){this.text=t,this.value=e,this.size=i,this.x=o,this.y=n},lt=function(t,e){this.align=e,this.axisIndex=t};function st(t,i,o,n,r){var a,l=new z.SvgRenderer("");(0,e.isNullOrUndefined)(t.id)||W(t.id);var s="fill:"+o+"; font-size:"+i.size+"; font-style:"+i.fontStyle+" ; font-weight:"+i.fontWeight+"; font-family:"+i.fontFamily+"; text-anchor:"+t.anchor+"; transform:"+t.transform+"; opacity:"+((0,e.isNullOrUndefined)(n)?i.opacity:n)+"; dominant-baseline:"+t.baseLine+";";a={id:t.id,x:t.x,y:t.y,style:s};var h=l.createText(a,t.text);return r.appendChild(h),h}function ht(t,e,i,o){for(var n,r=e-t,a=ut(i,o),l=r/a,s=Math.pow(10,Math.floor(Math.log(l)/Math.log(10))),h=0,u=[10,5,2,1];h<u.length;h++){if(a<r/(n=s*u[h]))break;l=n}return l}function ut(t,e){var i=5*("Horizontal"===e?.533:1);return i=Math.max(t*(i/100),1)}function dt(t,e){var i;i=t.id.replace(e.element.id,"").split("_");var o=parseInt(i[2],10),n=parseInt(i[4],10);return{axis:e.axes[o],axisIndex:o,pointer:e.axes[o].pointers[n],pointerIndex:n}}function pt(t,e){var i=null;return e.forEach((function(e){t>=e.start&&e.end>=t&&e.start!==e.end&&(i=e.interior)})),i}function gt(t,e,i){var o=i.getBoundingClientRect(),n=i.ownerDocument.defaultView.pageXOffset,r=i.ownerDocument.defaultView.pageYOffset,a=i.ownerDocument.documentElement.clientTop,l=i.ownerDocument.documentElement.clientLeft,s=o.left+n-l,h=o.top+r-a;return new $(t-s,e-h)}function ct(t){var e;switch(t.toLowerCase()){case"tailwind":e=["#0369A1","#14B8A6","#15803D","#334155","#5A61F6","#65A30D","#8B5CF6","#9333EA","#F59E0B","#F97316"];break;case"tailwinddark":e=["#10B981","#22D3EE","#2DD4BF","#4ADE80","#8B5CF6","#E879F9","#F472B6","#F87171","#F97316","#FCD34D"];break;case"tailwind3":e=["#2F4074","#03B4B4","#0D72DE","#FF5733","#D63384","#F39C12","#EF291F","#91C822"];break;case"tailwind3dark":e=["#8029F1","#1ABC9C","#0D72DE","#FF5733","#D63384","#F39C12","#EF291F","#91C822"];break;case"fluent":e=["#614570","#4C6FB1","#CC6952","#3F579A","#4EA09B","#6E7A89","#D4515C","#E6AF5D","#639751","#9D4D69"];break;case"fluentdark":e=["#8AB113","#2A72D5","#43B786","#584EC6","#E85F9C","#6E7A89","#EA6266","#EBA844","#26BC7A","#BC4870"];break;case"material3":e=["#6200EE","#E77A16","#82C100","#7107DC","#05BB3D","#D21020","#FAD200","#0085FF","#9204EA","#08EE9B"];break;case"material3dark":e=["#4EAAFF","#FA4EAB","#FFF500","#17EA58","#38FFE7","#FF9E45","#B3F32F","#B93CE4","#FC5664","#9B55FF"];break;case"fluent2":e=["#6200EE","#09AF74","#0076E5","#CB3587","#E7910F","#0364DE","#66CD15","#F3A93C","#107C10","#C19C00"];break;case"fluent2dark":case"fluent2highcontrast":e=["#9BB449","#2A72D5","#43B786","#3F579A","#584EC6","#E85F9C","#6E7A89","#EA6266","#0B6A0B","#C19C00"];break;case"bootstrap5":case"bootstrap5dark":e=["#6610F2","#6f42C1","#D63384","#DC3545","#FD7E14","#FFC107","#198754","#0DCAF0"];break;default:e=["#ff5985","#ffb133","#fcde0b","#27d5ff","#50c917"]}return e}function mt(t,i,o,n,r,a,l,s){var h,u,d=o.width,p=o.height,g=t.x,c=t.y;switch(i){case"Circle":u=(d+p)/4,g="Vertical"===a?l.opposedPosition?"Near"===s.placement?g-u:g+u:"Far"!==s.placement?g-u:g+u:g,c="Vertical"===a?c:l.opposedPosition?"Near"===s.placement?c-u:c+u:"Far"===s.placement?c+u:c-u,(0,e.merge)(r,{r:u,cx:g,cy:c});break;case"Diamond":case"Rectangle":g="Horizontal"===a?g-d/2:!l.opposedPosition&&"Far"!==s.placement||l.opposedPosition&&"Near"===s.placement?g-d:g,c="Vertical"===a?c:l.opposedPosition?"Near"===s.placement?c-p/2:c+p/2:"Far"===s.placement?c+p/2:c-p/2,h="Diamond"===i?"M "+g+" "+c+" L "+(g+d/2)+" "+(c-p/2)+" L "+(g+d)+" "+c+" L "+(g+d/2)+" "+(c+p/2)+" L "+g+" "+c+" z":"M "+g+" "+(c-p/2)+" L "+(g+d)+" "+(c-p/2)+" L "+(g+d)+" "+(c+p/2)+" L "+g+" "+(c+p/2)+" L "+g+" "+(c-p/2)+" z",(0,e.merge)(r,{d:h});break;case"Triangle":h="Vertical"===a?"M "+g+" "+c+" L"+(g-d)+" "+(c-p/2)+"L"+(g-d)+" "+(c+p/2)+" Z":"M "+g+" "+c+" L"+(g+d/2)+" "+(c-p)+"L"+(g-d/2)+" "+(c-p)+" Z",(0,e.merge)(r,{d:h});break;case"InvertedTriangle":h="Vertical"===a?"M "+g+" "+c+" L"+(g+d)+" "+(c-p/2)+"L"+(g+d)+" "+(c+p/2)+" Z":"M "+g+" "+c+" L"+(g+d/2)+" "+(c+p)+"L"+(g-d/2)+" "+(c+p)+" Z",(0,e.merge)(r,{d:h});break;case"Arrow":h="Vertical"===a?"M "+g+" "+c+" L"+(g-d/2)+" "+(c-p/2)+" L"+(g-d/2)+" "+(c-p/2+p/4)+" L"+(g-d)+" "+(c-p/2+p/4)+" L"+(g-d)+" "+(c+p/2-p/4)+" L"+(g-d/2)+" "+(c+p/2-p/4)+" L"+(g-d/2)+" "+(c+p/2)+"z":"M "+g+" "+c+" L"+(g+d/2)+" "+(c-p/2)+" L"+(g+d/2-d/4)+" "+(c-p/2)+" L"+(g+d/2-d/4)+" "+(c-p)+" L"+(g-d/2+d/4)+" "+(c-p)+" L"+(g-d/2+d/4)+" "+(c-p/2)+" L"+(g-d/2)+" "+(c-p/2)+"z",(0,e.merge)(r,{d:h});break;case"InvertedArrow":h="Vertical"===a?"M "+g+" "+c+"L"+(g+d/2)+" "+(c-p/2)+" L"+(g+d/2)+" "+(c-p/2+p/4)+" L"+(g+d)+" "+(c-p/2+p/4)+" L"+(g+d)+" "+(c+p/2-p/4)+" L"+(g+d/2)+" "+(c+p/2-p/4)+" L"+(g+d/2)+" "+(c+p/2)+"z":"M "+g+" "+c+" L"+(g+d/2)+" "+(c+p/2)+" L"+(g+d/2-d/4)+" "+(c+p/2)+" L"+(g+d/2-d/4)+" "+(c+p)+" L"+(g-d/2+d/4)+" "+(c+p)+" L"+(g-d/2+d/4)+" "+(c+p/2)+" L"+(g-d/2)+" "+(c+p/2)+"z",(0,e.merge)(r,{d:h});break;case"Image":(0,e.merge)(r,{href:n,height:p,width:d,x:g-d/2,y:c-p/2})}return r}function yt(t,i,o,n,r,a){var l,s,h,u=t.x,d=t.y;if("Text"===i)s=(h=N(a.text,a.textStyle)).height,l=h.width,u="Horizontal"===n?u-l/2:!r.opposedPosition&&"Far"!==a.placement||r.opposedPosition&&"Near"===a.placement?"Inside"===a.position&&!r.opposedPosition||"Cross"===a.position||r.opposedPosition&&"Near"===a.placement&&"Outside"===a.position?u-l/2:u-l:"Cross"===a.position&&"Far"===a.placement||r.opposedPosition&&"Cross"===a.position&&("None"===a.placement||"Center"===a.placement)?u+l/2:u,d="Vertical"===n?d+s/4:r.opposedPosition?"Near"===a.placement?d:"Cross"===a.position?d+s/2+s/4:"Outside"===a.position?d+s:d+s/2:"Far"===a.placement?"Cross"===a.position?d+s/2+s/4:"Inside"===a.position?d+s:d+s/2:d,(0,e.merge)(o,{x:u,y:d});return o}function ft(t,e,i,o,n,r,a,l){var s,h,u,d,p,g,c,m,y,f,v=" ",b=l;switch(e){case"RoundedRectangle":h=t.x,u=t.y,d=t.width,p=t.height,("Vertical"===i&&0===t.height||"Horizontal"===i&&0===t.width)&&b>10&&(b=10),y=h+d-b,f=u+p-b,g=b+u,s=b+h,("container"===n||"bar"===n&&("Vertical"===i&&0!==t.height||"Horizontal"===i&&0!==t.width))&&(s>h+d/2&&(y=s=h+d/2),g>u+p/2&&(f=g=u+p/2)),"bar"===n&&("Vertical"===i&&0===t.height||"Horizontal"===i&&0===t.width)&&(t.width<b/2&&!a.isInversed?y=y+b+b/2:t.width<b/2&&a.isInversed&&(s=h-Math.ceil(b/4)),t.height<b/2&&!a.isInversed?g=u-Math.ceil(b/4):t.height<b/2&&a.isInversed&&(f=f+b+b/2)),v="M "+h+" "+g+" Q "+h+" "+u+" "+s+" "+u+" ",v+="L "+y+" "+u+" Q "+(h+d)+" "+u+" "+(h+d)+" "+g+" ",v+="L "+(h+d)+" "+f+" Q "+(h+d)+" "+(u+p)+" "+y+" "+(u+p)+" ",v+=" L "+s+" "+(u+p)+" Q "+h+" "+(u+p)+" "+h+" "+f+" ",v+="L "+h+" "+g+" z";break;case"Thermometer":var x="Vertical"===i?t.width:t.height;if(c=x+x/2/Math.PI,m=x/2,"Vertical"===i){var w=r+r/2/Math.PI-c,C="bar"===n?t.y+w:t.y,F="bar"===n?t.y+(m-m/Math.PI):t.y,S=t.height;v="M"+t.x+" "+(C+S)+" A "+c+" "+c+", 0, 1, 0, "+(t.x+t.width)+" "+(C+S)+" L "+(t.x+t.width)+" "+F+" A "+m+" "+m+", 0, 1, 0, "+t.x+" "+F+" z "}else{var P="bar"!==n||a.isInversed?t.x:t.x-(r+r/2/Math.PI-c),A="bar"===n?t.width-(m-m/Math.PI):t.width;v="M"+P+" "+t.y+" A "+c+" "+c+", 0, 1, 0, "+P+" "+(t.y+t.height)+" L "+(("bar"===n?t.x:P)+A)+" "+(t.y+t.height)+" A "+m+" "+m+", 0, 1, 0, "+(("bar"===n?t.x:P)+A)+" "+t.y+" z "}}return v}function vt(t){var i=G(t.id+"_svg"),o=0;return(0,e.isNullOrUndefined)(i)||(0,e.isNullOrUndefined)(t)||(o=t.getBoundingClientRect().left-i.getBoundingClientRect().left),o}function bt(t,i){var o=G(i.element.id+"_EJ2_Title_Tooltip");if(o)o.innerText=t,o.style.top=(i.actualRect.y+10).toString()+"px",o.style.left=i.actualRect.x.toString()+"px";else{var n=N(t,{size:"12px",fontFamily:"Segoe UI"}).width+10;n=n<i.actualRect.width?n:i.actualRect.width-10,(o=(0,e.createElement)("div",{id:i.element.id+"_EJ2_Title_Tooltip",className:"EJ2-LinearGauge-Tooltip"})).innerText=t,o.style.cssText="top:"+(i.actualRect.y+10).toString()+"px; left:"+i.actualRect.x.toString()+'px; background-color:rgb(255, 255, 255) !important; color:black !important; position:absolute; border:1px solid rgb(112, 112, 112); padding-left:3px; padding-right:2px;padding-bottom:2px; padding-top:2px; font-size:12px; font-family:"Segoe UI";width:'+n+"px;",document.body.style.overflow="hidden",G(i.element.id+"_Secondary_Element").appendChild(o)}}function xt(){document.getElementsByClassName("EJ2-LinearGauge-Tooltip").length>0&&document.getElementsByClassName("EJ2-LinearGauge-Tooltip")[0].remove()}var wt=function(){function t(t){this.gauge=t}return t.prototype.calculateAxesBounds=function(){var t,e,i,o,n,r;this.gauge.nearSizes=[],this.gauge.farSizes=[];this.checkThermometer();for(var a=0;a<this.gauge.axes.length;a++){(t=this.gauge.axes[a]).checkAlign=new lt(a,t.opposedPosition?"Far":"Near"),t.opposedPosition?this.gauge.farSizes.push(1):this.gauge.nearSizes.push(1),this.calculateLineBounds(t,a),this.calculateTickBounds(t),this.calculateLabelBounds(t),t.pointers.length>0&&this.calculatePointerBounds(t),t.ranges.length>0&&this.calculateRangesBounds(t),e=t.labelBounds;var l=this.gauge.axes[a].labelStyle.offset;"Vertical"===this.gauge.orientation?(i=t.opposedPosition?t.lineBounds.x:e.x-l-8,o=t.lineBounds.y,r=t.lineBounds.height,n=Math.abs(t.opposedPosition?e.x+e.width+8-i-l:t.lineBounds.x-i)):(o=t.opposedPosition?t.lineBounds.y:e.y-e.height-l-8,i=t.lineBounds.x,n=t.lineBounds.width,r=Math.abs(t.opposedPosition?e.y+8-o-l:Math.abs(t.lineBounds.y-o))),t.bounds=new et(i,o,n,r)}},t.prototype.calculateLineBounds=function(t,i){var o,n,r,a,l,s=t.line.height,h=this.gauge.orientation,u=this.gauge.containerBounds;s=t.line.width>0?s:null,"Vertical"===h?(n=(0,e.isNullOrUndefined)(s)?u.y:u.y+(u.height/2-s/2),r=t.line.width,a=(0,e.isNullOrUndefined)(s)?u.height:s):(o=(0,e.isNullOrUndefined)(s)?u.x:u.x+(u.width/2-s/2),a=t.line.width,r=(0,e.isNullOrUndefined)(s)?u.width:s);var d=this.checkPreviousAxes(t,i),p=0;if(!(0,e.isNullOrUndefined)(d)){for(var g=d;g>=0;g--)if(this.gauge.axes[g].minimum!==this.gauge.axes[g].maximum){d=g,p++;break}0===p&&(d=null)}(0,e.isNullOrUndefined)(d)?"Vertical"===h?o=(t.opposedPosition?u.x+u.width:u.x)+t.line.offset:n=(t.opposedPosition?u.y+u.height:u.y)+t.line.offset:(l=this.gauge.axes[d],"Vertical"===h?o=(t.opposedPosition?l.bounds.x+l.bounds.width:l.bounds.x)+t.line.offset:n=(t.opposedPosition?l.bounds.y+l.bounds.height:l.bounds.y)+t.line.offset),t.lineBounds=new et(o,n,r,a),t.minimum===t.maximum&&(t.lineBounds=new et(0,0,0,0))},t.prototype.calculateTickBounds=function(t){var i,o,n=Math.min(t.minimum,t.maximum),r=Math.max(t.minimum,t.maximum);n=n===r?r-1:n;var a=t.lineBounds,l=t.majorTicks,s=t.minorTicks;t.majorInterval=l.interval,t.minorInterval=s.interval;var h="Vertical"===this.gauge.orientation?a.height:a.width,u=("Vertical"===this.gauge.orientation?a.width:a.height)/2;t.majorInterval=(0,e.isNullOrUndefined)(t.majorInterval)?ht(n,r,h,this.gauge.orientation):l.interval,t.visibleRange=new K(n,r,t.majorInterval,r-n),t.minorInterval=(0,e.isNullOrUndefined)(t.minorInterval)?t.majorInterval/2:t.minorInterval,"Vertical"===this.gauge.orientation?(i="Auto"===t.majorTicks.position?(t.opposedPosition?a.x+u:a.x-u-l.height)+l.offset:i,i="Auto"!==t.majorTicks.position?"Cross"===t.majorTicks.position?a.x-l.height/2-l.offset:"Inside"===t.majorTicks.position&&!t.opposedPosition||"Outside"===t.majorTicks.position&&t.opposedPosition?a.x-u-l.height-l.offset:a.x+u+l.offset:i,t.majorTickBounds=new et(i,a.y,l.height,a.height),t.minimum===t.maximum&&(t.majorTickBounds=new et(0,0,0,0)),i="Auto"===t.minorTicks.position?(t.opposedPosition?a.x+u:a.x-u-s.height)+s.offset:i,i="Auto"!==t.minorTicks.position?"Cross"===t.minorTicks.position?a.x-s.height/2-s.offset:"Inside"===t.minorTicks.position&&!t.opposedPosition||"Outside"===t.minorTicks.position&&t.opposedPosition?a.x-u-s.height-s.offset:a.x+u+s.offset:i,t.minorTickBounds=new et(i,a.y,s.height,a.height),t.minimum===t.maximum&&(t.minorTickBounds=new et(0,0,0,0))):(o="Auto"===t.majorTicks.position?(t.opposedPosition?a.y+u:a.y-u-l.height)+l.offset:o,o="Auto"!==t.majorTicks.position?"Cross"===t.majorTicks.position?a.y-l.height/2-l.offset:"Inside"===t.majorTicks.position&&!t.opposedPosition||"Outside"===t.majorTicks.position&&t.opposedPosition?a.y-u-l.height-l.offset:a.y+u+l.offset:o,t.majorTickBounds=new et(a.x,o,a.width,l.height),t.minimum===t.maximum&&(t.majorTickBounds=new et(0,0,0,0)),o="Auto"===t.minorTicks.position?(t.opposedPosition?a.y+u:a.y-u-s.height)+s.offset:o,o="Auto"!==t.minorTicks.position?"Cross"===t.minorTicks.position?a.y-s.height/2-l.offset:"Inside"===t.minorTicks.position&&!t.opposedPosition||"Outside"===t.minorTicks.position&&t.opposedPosition?a.y-u-s.height-s.offset:a.y+u+s.offset:o,t.minorTickBounds=new et(a.x,o,a.width,s.height),t.minimum===t.maximum&&(t.minorTickBounds=new et(0,0,0,0)))},t.prototype.calculateLabelBounds=function(t){var e,i,o="Auto"!==t.labelStyle.position&&"Auto"!==t.majorTicks.position&&"Auto"!==t.minorTicks.position,n=o&&t.labelStyle.position===t.minorTicks.position&&t.minorTicks.position!==t.majorTicks.position?t.minorTickBounds:t.majorTickBounds,r=t.labelStyle.offset;if(this.calculateVisibleLabels(t),t.minimum===t.maximum)t.labelBounds=new et(0,0,0,0);else{var a=t.maxLabelSize.width,l=t.maxLabelSize.height/2;if("Vertical"===this.gauge.orientation){e="Auto"===t.labelStyle.position?(t.opposedPosition?n.x+n.width+5:n.x-a-5)+r:e;var s=n.x,h=("Cross"===t.majorTicks.position||"Cross"===t.minorTicks.position)&&n.width>t.lineBounds.width?n.width/2:t.lineBounds.width/2;s=o&&t.labelStyle.position!==t.minorTicks.position&&t.labelStyle.position!==t.majorTicks.position?"Cross"!==t.minorTicks.position&&"Cross"!==t.majorTicks.position?"Inside"===t.labelStyle.position?n.x-t.lineBounds.width:"Outside"===t.labelStyle.position?n.x+t.lineBounds.width:n.x:"Inside"===t.labelStyle.position?t.lineBounds.x-h:"Outside"===t.labelStyle.position?t.lineBounds.x-n.width+h:n.x:n.x,e="Auto"!==t.labelStyle.position?"Cross"===t.labelStyle.position?t.lineBounds.x-t.maxLabelSize.width/4-r:"Inside"===t.labelStyle.position&&!t.opposedPosition||"Outside"===t.labelStyle.position&&t.opposedPosition?s-a-5-r:s+n.width+5+r:e,i=t.lineBounds.y}else{i="Auto"===t.labelStyle.position?(t.opposedPosition?n.y+n.height+5+l:n.y-5)+r:i;var u=n.y;h=("Cross"===t.majorTicks.position||"Cross"===t.minorTicks.position)&&n.height>t.lineBounds.height?n.height/2:t.lineBounds.height/2;u=o&&t.labelStyle.position!==t.minorTicks.position&&t.labelStyle.position!==t.majorTicks.position?"Cross"!==t.minorTicks.position&&"Cross"!==t.majorTicks.position?"Inside"===t.labelStyle.position?n.y-t.lineBounds.height:"Outside"===t.labelStyle.position?n.y+t.lineBounds.height:n.y:"Inside"===t.labelStyle.position?t.lineBounds.y-h:"Outside"===t.labelStyle.position?t.lineBounds.y-n.height+h:n.y:n.y,i="Auto"!==t.labelStyle.position?"Cross"===t.labelStyle.position?t.lineBounds.y+t.maxLabelSize.height/4-r:"Inside"===t.labelStyle.position&&!t.opposedPosition||"Outside"===t.labelStyle.position&&t.opposedPosition?u-5-r:u+n.height+5+l+r:i,e=t.lineBounds.x}t.labelBounds=new et(e,i,a,l)}},t.prototype.calculatePointerBounds=function(t){for(var i,o=t.visibleRange,n=Math.min(o.min,o.max),r=Math.max(o.min,o.max),a=0;a<t.pointers.length;a++)i=t.pointers[a],!(0,e.isNullOrUndefined)(i.offset)&&i.offset.length>0?i.currentOffset=_(i.offset,"Horizontal"===this.gauge.orientation?this.gauge.availableSize.height/2:this.gauge.availableSize.width/2):i.currentOffset=i.offset,i.currentValue=null!==i.value?i.value<n?n:i.value>r?r:i.value:n,i.width>0&&V(i.currentValue,null,null,o.max,o.min,"pointer")&&this["calculate"+i.type+"Bounds"](t,i)},t.prototype.calculateMarkerBounds=function(t,e){var i,o,n=t.lineBounds,r=e.currentOffset,a=t.visibleRange,l=e.placement,s=t.majorTickBounds,h=t.labelBounds,u=e.border.width,d=N(e.text,e.textStyle);"Vertical"===this.gauge.orientation?("Auto"===e.position?(i=t.opposedPosition?"Far"===l?h.x+h.width:"Center"===l?s.x+s.width:n.x:"Near"===l?h.x:"Center"===l?s.x:n.x,i=t.opposedPosition?("Near"===e.placement?"InvertedTriangle"===e.markerType||"InvertedArrow"===e.markerType?i+u:i-u:"Triangle"===e.markerType||"Arrow"===e.markerType?i-u:i+u)+r:("Far"===e.placement?"Triangle"===e.markerType||"Arrow"===e.markerType?i-u:i+u:"InvertedTriangle"===e.markerType||"InvertedArrow"===e.markerType?i+u:i-u)+r):i="Cross"===e.position?n.x-("Text"===e.markerType?d.width:e.width/2)-r:"Inside"===e.position&&!t.opposedPosition||"Outside"===e.position&&t.opposedPosition?n.x-n.width/2-("InvertedTriangle"!==e.markerType&&"Triangle"!==e.markerType?"Text"===e.markerType?d.width:e.width:0)-r:n.x+n.width/2+r,o=H(e.currentValue,t,this.gauge.orientation,a)*n.height+n.y):("Auto"===e.position?(o=t.opposedPosition?"Far"===l?h.y:"Center"===l?s.y+s.height:n.y:"Near"===l?h.y-h.height:"Center"===l?s.y:n.y,o=t.opposedPosition?("Near"===e.placement?"InvertedTriangle"===e.markerType||"InvertedArrow"===e.markerType?o+u:o-u:"Triangle"===e.markerType||"Arrow"===e.markerType?o-u:o+u)+r:("Far"===e.placement?"Triangle"===e.markerType||"Arrow"===e.markerType?o-u:o+u:"InvertedTriangle"===e.markerType||"InvertedArrow"===e.markerType?o+u:o-u)+r):o="Cross"===e.position?n.y-("Text"===e.markerType?d.height:e.height)/2-r:"Inside"===e.position&&!t.opposedPosition||"Outside"===e.position&&t.opposedPosition?n.y-n.height/2-("InvertedTriangle"!==e.markerType&&"Triangle"!==e.markerType?"Text"===e.markerType?d.height:e.height:0)-r:n.y+n.height/2+r,i=H(e.currentValue,t,this.gauge.orientation,a)*n.width+n.x),e.bounds=new et(i,o,e.width,e.height),t.minimum===t.maximum&&(e.bounds=new et(0,0,0,0),e.width=0,e.height=0)},t.prototype.calculateBarBounds=function(t,e){var i,o,n,r,a,l,s=t.lineBounds,h=t.visibleRange,u=this.gauge.orientation,d=e.currentOffset,p=this.gauge.containerBounds;"Vertical"===u?("Auto"===e.position?(i=p.width>0?p.x+(p.width/2-e.width/2):t.opposedPosition?s.x-e.width-10:s.x+10,i+=d):i="Cross"===e.position?s.x-e.width/2-d:"Inside"===e.position&&!t.opposedPosition||"Outside"===e.position&&t.opposedPosition?s.x-s.width/2-e.width-d:s.x+s.width/2+d,n=H(e.currentValue,t,u,h)*s.height+s.y,r=H(h.min,t,u,h)*s.height+s.y,a=Math.abs(r-n),n=t.isInversed?r:n,l=e.width):("Auto"===e.position?(n=p.height>0?p.y+p.height/2-e.height/2:t.opposedPosition?s.y-e.height-10:s.y+10,n+=d):n="Cross"===e.position?s.y-e.height/2-d:"Inside"===e.position&&!t.opposedPosition||"Outside"===e.position&&t.opposedPosition?s.y-s.height/2-e.height-d:s.y+s.height/2+d,a=e.height,i=H(h.min,t,u,h)*s.width+s.x,o=H(e.currentValue,t,u,h)*s.width+s.x,l=Math.abs(o-i),i=t.isInversed?o:i),e.bounds=new et(i,n,l,a),t.minimum===t.maximum&&(e.bounds=new et(0,0,0,0),e.width=0,e.height=0)},t.prototype.calculateRangesBounds=function(t){for(var i,o,n,r,a,l,s,h,u,d,p,g,c,m,y=t.lineBounds,f=t.visibleRange,v=this.gauge.orientation,b=0;b<t.ranges.length;b++)i=t.ranges[b],this.gauge.gradientModule&&(p=this.gauge.gradientModule.getGradientColorString(i)),!(0,e.isNullOrUndefined)(i.offset)&&i.offset.length>0?i.currentOffset=_(i.offset,"Horizontal"===this.gauge.orientation?this.gauge.availableSize.height/2:this.gauge.availableSize.width/2):i.currentOffset=i.offset,V(null,o=Math.max(i.start,f.min),n=Math.min(i.end,f.max),f.max,f.min,"range")&&(n=Math.max(o,n),o=Math.min(o,i.end),d=i.position,g=i.startWidth,c=i.endWidth,m=!(0,e.isNullOrUndefined)(this.gauge.rangePalettes)&&this.gauge.rangePalettes.length>0?this.gauge.rangePalettes:ct(this.gauge.theme),i.interior=p||(i.color?i.color:m[b%m.length]),"Vertical"===this.gauge.orientation?(l=y.x+i.currentOffset+("Cross"===d?g/2:"Outside"===d||"Auto"===d?-y.width/2:"Inside"===d?y.width/2:0),s=H(n,t,v,f)*y.height+y.y,u=H(o,t,v,f)*y.height+y.y,u-=s,r=t.opposedPosition?"Inside"===d||"Cross"===d?l-g:l+g:"Inside"===d?l+g:l-g,a=t.opposedPosition?"Inside"===d||"Cross"===d?l-c:l+c:"Inside"===d?l+c:l-c,i.path="M"+l+" "+s+" L "+l+" "+(s+u)+" L "+r+" "+(s+u)+" L "+a+" "+s+" L "+l+" "+s+" z "):(l=H(n,t,v,f)*y.width+y.x,s=t.lineBounds.y+i.currentOffset+("Cross"===d?g/2:"Outside"===d||"Auto"===d?-y.height/2:"Inside"===d?y.height/2:0),h=l-(h=H(o,t,v,f)*y.width+y.x),r=t.opposedPosition?"Inside"===d||"Cross"===d?s-g:s+g:"Inside"===d?s+g:s-g,a=t.opposedPosition?"Inside"===d||"Cross"===d?s-c:s+c:"Inside"===d?s+c:s-c,i.path="M"+l+" "+s+" L "+(l-h)+" "+s+" L "+(l-h)+" "+r+" L "+l+" "+a+" L "+l+" "+s+" z "))},t.prototype.checkPreviousAxes=function(t,e){var i=e-1;return i=i>=0?this.gauge.axes[i].checkAlign.align===t.checkAlign.align?i:this.checkPreviousAxes(t,i):null},t.prototype.calculateVisibleLabels=function(t){if(t.visibleLabels=[],t.minimum!==t.maximum){for(var i,o=t.visibleRange.min,n=t.visibleRange.max,r=t.visibleRange.interval,a=void 0,l=t.labelStyle,s=l.format&&null!==l.format.match("{value}"),h=function(o){var n=o;if(-1!==n.toString().indexOf("e")&&(0,e.isNullOrUndefined)(u.gauge.format)){var r=parseInt(n.toString().split("-")[1],10);n=parseInt(n.toFixed(r),10)}a={cancel:!1,name:F,axis:t,text:s?Y(l.format,{value:n},u.gauge):q(n,u.gauge).toString(),value:n};var h=function(e){e.cancel||t.visibleLabels.push(new at(e.text,n,i))};h.bind(u),u.gauge.trigger(F,a,h)},u=this,d=o;d<=n&&r>0;d+=r)h(d);var p=t.visibleLabels.length?t.visibleLabels[t.visibleLabels.length-1].value:null,g=t.visibleRange.max;if(p!==g&&!0===t.showLastLabel){a={cancel:!1,name:F,axis:t,text:s?Y(l.format,{value:g},this.gauge):q(g,this.gauge).toString(),value:g};var c=function(e){i=N(e.text,t.labelStyle.font),e.cancel||t.visibleLabels.push(new at(e.text,g,i))};c.bind(this),this.gauge.trigger(F,a,c)}this.getMaxLabelWidth(t)}},t.prototype.getMaxLabelWidth=function(t){var e;t.maxLabelSize=new tt(0,0);for(var i=0;i<t.visibleLabels.length;i++)(e=t.visibleLabels[i]).size=N(e.text,t.labelStyle.font),e.size.width>t.maxLabelSize.width&&(t.maxLabelSize.width=e.size.width),e.size.height>t.maxLabelSize.height&&(t.maxLabelSize.height=e.size.height)},t.prototype.checkThermometer=function(){"Thermometer"===this.gauge.container.type&&this.gauge.axes.map((function(t){t.isInversed&&t.pointers.map((function(e){"Bar"===e.type&&(t.isInversed=!1)}))}))},t.prototype.destroy=function(){this.gauge=null},t}(),Ct=function(){function t(t){this.gauge=t}return t.prototype.performMarkerAnimation=function(t,i,o){var n,r,a,l,s=this,h=t,u=i.visibleRange,d="Vertical"===this.gauge.orientation?i.lineBounds.height:i.lineBounds.width,p="Vertical"===this.gauge.orientation?i.lineBounds.y:i.lineBounds.x;"Vertical"===this.gauge.orientation?o.bounds.y=H(o.currentValue,i,this.gauge.orientation,u)*d+p:o.bounds.x=H(o.currentValue,i,this.gauge.orientation,u)*d+p,n=new ot(h.id,null,null,null),n=mt(o.bounds,o.markerType,new tt(o.width,o.height),o.imageUrl,n,this.gauge.orientation,i,o),"Text"===o.markerType&&(r=new rt(h.id,0,0,"middle",o.text,null,"auto"),r=yt(o.bounds,o.markerType,r,this.gauge.orientation,i,o));var g="string"==typeof o.startValue?parseInt(o.startValue,10):o.startValue,c=o.currentValue;g=g===c?u.min:g;var m=Math.abs(g-c),y=n.d,f=n.cx,v=n.cy,b="Text"===o.markerType?r.x:n.x,x="Text"===o.markerType?r.y:n.y;new e.Animation({}).animate(h,{name:"Linear",duration:"Enable"!==e.animationMode||(0!==o.animationDuration||this.gauge.allowLoadingAnimation)&&0!==this.gauge.animationDuration?this.gauge.allowLoadingAnimation&&0===o.animationDuration?this.gauge.animationDuration/this.gauge.splitUpCount:o.animationDuration:1e3,progress:function(t){t.timeStamp>=t.delay&&(a=(t.timeStamp-t.delay)/t.duration,l=g<c?g+a*m:g-a*m,"Vertical"===s.gauge.orientation?(o.bounds.y=H(l,i,s.gauge.orientation,u)*d+p,n=mt(o.bounds,o.markerType,new tt(o.width,o.height),o.imageUrl,n,s.gauge.orientation,i,o),"Text"===o.markerType&&(r=yt(o.bounds,o.markerType,r,s.gauge.orientation,i,o)),(0,e.isNullOrUndefined)(n.r)?(0,e.isNullOrUndefined)("Text"===o.markerType?r.y:n.y)?h.setAttribute("d",n.d):h.setAttribute("y","Text"===o.markerType?r.y:n.y.toString()):h.setAttribute("cy",n.cy.toString()),h.style.visibility="visible"):(o.bounds.x=H(l,i,s.gauge.orientation,u)*d+p,n=mt(o.bounds,o.markerType,new tt(o.width,o.height),o.imageUrl,n,s.gauge.orientation,i,o),"Text"===o.markerType&&(r=yt(o.bounds,o.markerType,r,s.gauge.orientation,i,o)),(0,e.isNullOrUndefined)(n.r)?(0,e.isNullOrUndefined)("Text"===o.markerType?r.x:n.x)?h.setAttribute("d",n.d):h.setAttribute("x","Text"===o.markerType?r.x:n.x.toString()):h.setAttribute("cx",n.cx.toString()),h.style.visibility="visible"))},end:function(){if((0,e.isNullOrUndefined)(v)?(0,e.isNullOrUndefined)(x)?h.setAttribute("d",y):(h.setAttribute("y",x.toString()),h.setAttribute("x",b.toString())):(h.setAttribute("cy",v.toString()),h.setAttribute("cx",f.toString())),h.style.visibility="visible",o.isPointerAnimation=!1,o.animationComplete=!0,o.startValue=o.value=o.currentValue,s.gauge.trigger(C,{axis:i,pointer:o}),s.gauge.allowLoadingAnimation)if(!(0,e.isNullOrUndefined)(s.gauge.annotationsModule)&&s.gauge.annotations.length>0&&(""!==s.gauge.annotations[0].content||s.gauge.annotations.length>1)){var t=document.getElementById(s.gauge.element.id+"_AnnotationsGroup");s.gauge.annotationsModule.annotationAnimate(t,s.gauge)}else s.gauge.allowLoadingAnimation=!1,s.gauge.isOverAllAnimationComplete=!0}})},t.prototype.performBarAnimation=function(t,i,o){var n,r,a,l,s,h,u,d,p,g,c=this,m=10,y=i.visibleRange,f=t,v="Vertical"===this.gauge.orientation?i.lineBounds.height:i.lineBounds.width,b="Vertical"===this.gauge.orientation?i.lineBounds.y:i.lineBounds.x,x="string"==typeof o.startValue?parseInt(o.startValue,10):o.startValue,w=o.currentValue;x=x===w?y.min:x;var F,S="",P=f.tagName,A=Math.abs(x-w),T=H(w,i,this.gauge.orientation,y)*v+b,k=H(y.min,i,this.gauge.orientation,y)*v+b,E="Vertical"===this.gauge.orientation?i.isInversed?k:T:i.isInversed?T:k,L=Math.abs(k-T);"Thermometer"===this.gauge.container.type&&0===x&&this.gauge.container.width>0&&(w===i.minimum?t.style.visibility="visible":(g=f.parentElement.childNodes[1].childNodes[0].childNodes[0],"Vertical"===this.gauge.orientation?(s=g.getAttribute("y"),l=g.getAttribute("height"),u=parseInt(s,m)+parseInt(l,m),g.setAttribute("y",u.toString())):(h=g.getAttribute("x"),d=g.getAttribute("width"),u=parseInt(h,m)+parseInt(d,m),g.setAttribute("width","0")))),F=o.value===i.minimum&&"RoundedRectangle"===this.gauge.container.type?"":ft(o.bounds,this.gauge.container.type,this.gauge.orientation,new tt(o.bounds.width,o.bounds.height),"bar",this.gauge.container.width,i,o.roundedCornerRadius);var O=o.bounds.width,B=o.bounds.height;new e.Animation({}).animate(f,{name:"Linear",duration:"Enable"!==e.animationMode||(0!==o.animationDuration||this.gauge.allowLoadingAnimation)&&0!==this.gauge.animationDuration?this.gauge.allowLoadingAnimation&&0===o.animationDuration?this.gauge.animationDuration/this.gauge.splitUpCount:o.animationDuration:1e3,progress:function(t){t.timeStamp>=t.delay&&(n=(t.timeStamp-t.delay)/t.duration,r=H(x<w?x+n*A:x-n*A,i,c.gauge.orientation,y)*v+b,a=H(y.min,i,c.gauge.orientation,y)*v+b,p=Math.abs(r-a),"Vertical"===c.gauge.orientation?(o.bounds.y=i.isInversed?a:r,B=p):(o.bounds.x=i.isInversed?r:a,O=p),"path"===P?(0===x&&"Thermometer"===c.gauge.container.type&&("Vertical"===c.gauge.orientation?g.setAttribute("y",(u-n*parseInt(l,m)).toString()):g.setAttribute("width",(n*parseInt(d,m)).toString())),S=o.value===i.minimum&&"RoundedRectangle"===c.gauge.container.type?"":ft(new et(o.bounds.x,o.bounds.y,O,B),c.gauge.container.type,c.gauge.orientation,new tt(O,B),"bar",c.gauge.container.width,i,o.roundedCornerRadius),f.setAttribute("d",S),f.style.visibility="visible"):("Vertical"===c.gauge.orientation?(f.setAttribute("y",o.bounds.y.toString()),f.setAttribute("height",B.toString())):(f.setAttribute("x",o.bounds.x.toString()),f.setAttribute("width",O.toString())),f.style.visibility="visible"))},end:function(){if("path"===P?0===x&&"Thermometer"===c.gauge.container.type?f.parentElement.children[1].remove():f.setAttribute("d",F):"Vertical"===c.gauge.orientation?(f.setAttribute("y",E.toString()),f.setAttribute("height",L.toString())):(f.setAttribute("x",E.toString()),f.setAttribute("width",L.toString())),f.style.visibility="visible",o.isPointerAnimation=!1,o.startValue=o.value=o.currentValue,c.gauge.trigger(C,{axis:i,pointer:o}),c.gauge.allowLoadingAnimation)if(!(0,e.isNullOrUndefined)(c.gauge.annotationsModule)&&c.gauge.annotations.length>0&&(""!==c.gauge.annotations[0].content||c.gauge.annotations.length>1)){var t=document.getElementById(c.gauge.element.id+"_AnnotationsGroup");c.gauge.annotationsModule.annotationAnimate(t,c.gauge)}else c.gauge.allowLoadingAnimation=!1,c.gauge.isOverAllAnimationComplete=!0}})},t}(),Ft=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},t(e,i)};return function(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),St=function(t){function i(e){return t.call(this,e)||this}return Ft(i,t),i.prototype.renderAxes=function(){var t,i,o,n=this;this.axisElements=[];var r=this.gauge.svgObject.querySelector("#"+this.gauge.element.id+"_Axis_Collections");r&&(0,e.remove)(r),this.axisObject=this.gauge.renderer.createGroup({id:this.gauge.element.id+"_Axis_Collections",transform:"translate( 0, 0 )"}),this.gauge.splitUpCount=0;for(var a=0;a<this.gauge.axes.length;a++)i=(t=this.gauge.axes[a]).majorTicks,o=t.minorTicks,this.htmlObject=this.gauge.renderer.createGroup({id:this.gauge.element.id+"_Axis_Group_"+a}),this.gauge.allowLoadingAnimation&&(0===this.gauge.splitUpCount&&(t.line.width>0||t.majorTicks.height>0&&t.majorTicks.width>0||t.minorTicks.height>0&&t.minorTicks.width>0||this.gauge.container.width>0||t.ranges.length>0&&(1!==t.ranges.length||t.ranges[0].start!==t.ranges[0].end||0!==t.ranges[0].start))&&this.gauge.splitUpCount++,0!==this.gauge.splitUpCount&&1!==this.gauge.splitUpCount||(this.gauge.splitUpCount=t.pointers.length>0?this.gauge.splitUpCount+1:this.gauge.splitUpCount)),this.drawAxisLine(t,this.htmlObject,a),this.drawRanges(t,this.htmlObject,a),this.drawTicks(t,i,this.htmlObject,"MajorTicks",t.majorTickBounds,a),this.drawTicks(t,o,this.htmlObject,"MinorTicks",t.minorTickBounds,a),this.drawAxisLabels(t,this.htmlObject,a),this.drawPointers(t,this.htmlObject,a),this.axisElements.push(this.htmlObject);this.axisElements.forEach((function(t){n.axisObject.appendChild(t)})),this.gauge.svgObject.appendChild(this.axisObject),this.gauge.nearSizes.length!==this.gauge.farSizes.length&&this.gauge.axes.length>1&&this.axisAlign(this.gauge.axes)},i.prototype.axisAlign=function(t){var i,o,n=0,r=0;"Vertical"===this.gauge.orientation?(t.forEach((function(t){t.opposedPosition?r+=t.bounds.width:n+=t.bounds.width})),n+=this.gauge.containerBounds.width/2,r+=this.gauge.containerBounds.width/2,i=n/2-r/2,this.axisObject.setAttribute("transform","translate("+i+",0)"),(0,e.isNullOrUndefined)(this.gauge.containerObject)||this.gauge.containerObject.setAttribute("transform","translate("+i+",0)")):(t.forEach((function(t){t.opposedPosition?r+=t.bounds.height:n+=t.bounds.height})),n+=this.gauge.containerBounds.height/2,r+=this.gauge.containerBounds.height/2,o=n/2-r/2,this.axisObject.setAttribute("transform","translate(0,"+o+")"),(0,e.isNullOrUndefined)(this.gauge.containerObject)||this.gauge.containerObject.setAttribute("transform","translate(0,"+o+")"))},i.prototype.drawAxisLine=function(t,e,i){var o,n=t.lineBounds,r="",a=t.line.color||this.gauge.themeStyle.lineColor;if(t.line.width>0){r="M"+n.x+" "+n.y+" L "+("Vertical"===this.gauge.orientation?n.x:n.x+n.width)+" "+("Vertical"===this.gauge.orientation?n.y+n.height:n.y)+"z",o=new ot(this.gauge.element.id+"_AxisLine_"+i,a,t.line.width,a,1,t.line.dashArray,r);var l=this.gauge.renderer.drawPath(o);this.gauge.allowLoadingAnimation&&l.classList.add(this.gauge.element.id+"animation"),e.appendChild(l)}},i.prototype.drawTicks=function(t,e,i,o,n,r){for(var a,l,s="",h=t.visibleRange,u=t.lineBounds,d=t.majorTicks.color||this.gauge.themeStyle.majorTickColor,p=t.minorTicks.color||this.gauge.themeStyle.minorTickColor,g="MajorTicks"===o?d:p,c="MajorTicks"===o?t.majorInterval:t.minorInterval,m=t.minimum!==t.maximum?e.height:0,y=h.min;y<=h.max&&c>0;y+=c)"MajorTicks"!==o&&"MinorTicks"!==o||("Vertical"===this.gauge.orientation?(l=n.x,a=H(y,t,this.gauge.orientation,h)*u.height+u.y,s=s.concat("M"+l+" "+a+" L"+(l+m)+" "+a+" ")):(l=H(y,t,this.gauge.orientation,h)*u.width+u.x,a=n.y,s=s.concat("M"+l+" "+a+" L"+l+" "+(a+m)+" ")));var f=new ot(this.gauge.element.id+"_"+o+"Line_"+r,g,e.width,g,1,null,s),v=this.gauge.renderer.drawPath(f);this.gauge.allowLoadingAnimation&&v.classList.add(this.gauge.element.id+"animation"),i.appendChild(v)},i.prototype.drawAxisLabels=function(t,i,o){for(var n,r,a,l,s,h,u=t.lineBounds,d=t.labelBounds,p=t.majorTickBounds,g=t.visibleRange,c=this.gauge.themeStyle.labelColor,m=t.labelStyle.offset,y=t.visibleLabels.length-1,f=this.gauge.renderer.createGroup({id:this.gauge.element.id+"_AxisLabelsGroup_"+o}),v=0;v<t.visibleLabels.length;v++){if(a=t.visibleLabels[v].size,h=t.labelStyle.useRangeColor?pt(t.visibleLabels[v].value,t.ranges):null,h=(0,e.isNullOrUndefined)(h)?t.labelStyle.font.color||c:h,"Vertical"===this.gauge.orientation)r=H(t.visibleLabels[v].value,t,this.gauge.orientation,g)*u.height+u.y,n="Auto"===t.labelStyle.position?t.opposedPosition?d.x:p.x-a.width-5+m:d.x,r+=a.height/4,t.visibleLabels[v].x=n,t.visibleLabels[v].y=r;else if(0!==v&&v!==y||"None"===this.gauge.edgeLabelPlacement)n=H(t.visibleLabels[v].value,t