@syncfusion/ej2-lineargauge
Version:
Essential JS 2 LinearGauge Components
1 lines • 116 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-svg-base"),require("@syncfusion/ej2-pdf-export")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-svg-base","@syncfusion/ej2-pdf-export"],e):e((t=t||self).ej={},t.ej2Base,t.ej2SvgBase,t.ej2PdfExport)}(this,function(t,T,d,_){"use strict";D=function(t,e){return(D=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)};var D,N,e=function(t,e){function i(){this.constructor=t}D(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)},i=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;0<=l;l--)(n=t[l])&&(a=(r<3?n(a):3<r?n(e,i,a):n(e,i))||a);return 3<r&&a&&Object.defineProperty(e,i,a),a},M=(N=T.ChildProperty,e(o,N),i([T.Property("16px")],o.prototype,"size",void 0),i([T.Property("")],o.prototype,"color",void 0),i([T.Property("Segoe UI")],o.prototype,"fontFamily",void 0),i([T.Property("Regular")],o.prototype,"fontWeight",void 0),i([T.Property("Normal")],o.prototype,"fontStyle",void 0),i([T.Property(1)],o.prototype,"opacity",void 0),o);function o(){return null!==N&&N.apply(this,arguments)||this}V=T.ChildProperty,e(U,V),i([T.Property("16px")],U.prototype,"size",void 0),i([T.Property("")],U.prototype,"fontFamily",void 0),i([T.Property("normal")],U.prototype,"fontWeight",void 0),i([T.Property("normal")],U.prototype,"fontStyle",void 0);var V,j=U;function U(){return null!==V&&V.apply(this,arguments)||this}G=T.ChildProperty,e(H,G),i([T.Property(10)],H.prototype,"left",void 0),i([T.Property(10)],H.prototype,"right",void 0),i([T.Property(10)],H.prototype,"top",void 0),i([T.Property(10)],H.prototype,"bottom",void 0);var G,W=H;function H(){return null!==G&&G.apply(this,arguments)||this}X=T.ChildProperty,e(Y,X),i([T.Property(null)],Y.prototype,"color",void 0),i([T.Property(0)],Y.prototype,"width",void 0),i([T.Property("")],Y.prototype,"dashArray",void 0);var X,n=Y;function Y(){return null!==X&&X.apply(this,arguments)||this}J=T.ChildProperty,e(r,J),i([T.Property("")],r.prototype,"content",void 0),i([T.Property(0)],r.prototype,"x",void 0),i([T.Property(0)],r.prototype,"y",void 0),i([T.Property("None")],r.prototype,"verticalAlignment",void 0),i([T.Property("None")],r.prototype,"horizontalAlignment",void 0),i([T.Property("-1")],r.prototype,"zIndex",void 0),i([T.Complex({size:"12px",color:null},M)],r.prototype,"font",void 0),i([T.Property(null)],r.prototype,"axisIndex",void 0),i([T.Property(null)],r.prototype,"axisValue",void 0);var J,q=r;function r(){return null!==J&&J.apply(this,arguments)||this}Z=T.ChildProperty,e(a,Z),i([T.Property("Normal")],a.prototype,"type",void 0),i([T.Property(0)],a.prototype,"height",void 0),i([T.Property(0)],a.prototype,"width",void 0),i([T.Property(10)],a.prototype,"roundedCornerRadius",void 0),i([T.Property("transparent")],a.prototype,"backgroundColor",void 0),i([T.Complex({width:1,color:null},n)],a.prototype,"border",void 0),i([T.Property(0)],a.prototype,"offset",void 0);var Z,Q=a;function a(){return null!==Z&&Z.apply(this,arguments)||this}K=T.ChildProperty,e(l,K),i([T.Property(null)],l.prototype,"fill",void 0),i([T.Complex({size:null,opacity:null,fontFamily:null,fontWeight:null},M)],l.prototype,"textStyle",void 0),i([T.Property(null)],l.prototype,"format",void 0),i([T.Property(null)],l.prototype,"template",void 0),i([T.Property(!0)],l.prototype,"enableAnimation",void 0),i([T.Complex({color:null,width:null},n)],l.prototype,"border",void 0),i([T.Property("End")],l.prototype,"position",void 0),i([T.Property(!1)],l.prototype,"showAtMousePosition",void 0);var K,$=l;function l(){return null!==K&&K.apply(this,arguments)||this}tt=T.ChildProperty,e(s,tt),i([T.Property(!1)],s.prototype,"enable",void 0),i([T.Property("")],s.prototype,"fill",void 0),i([T.Complex({color:"",size:null,opacity:null,fontFamily:null,fontWeight:null},M)],s.prototype,"textStyle",void 0),i([T.Property(null)],s.prototype,"format",void 0),i([T.Property(!1)],s.prototype,"showAtMousePosition",void 0),i([T.Complex({},$)],s.prototype,"rangeSettings",void 0),i([T.Property("End")],s.prototype,"position",void 0),i([T.Property(null)],s.prototype,"template",void 0),i([T.Property(!0)],s.prototype,"enableAnimation",void 0),i([T.Complex({color:null,width:null},n)],s.prototype,"border",void 0),i([T.Property("Pointer")],s.prototype,"type",void 0);var tt,e=s;function s(){return null!==tt&&tt.apply(this,arguments)||this}et=function(t,e){return(et=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)};var et,it,i=function(t,e){function i(){this.constructor=t}et(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)},h=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;0<=l;l--)(n=t[l])&&(a=(r<3?n(a):3<r?n(e,i,a):n(e,i))||a);return 3<r&&a&&Object.defineProperty(e,i,a),a},ot=(it=T.ChildProperty,i(p,it),h([T.Property("")],p.prototype,"dashArray",void 0),h([T.Property(null)],p.prototype,"height",void 0),h([T.Property(2)],p.prototype,"width",void 0),h([T.Property(null)],p.prototype,"color",void 0),h([T.Property(0)],p.prototype,"offset",void 0),p);function p(){return null!==it&&it.apply(this,arguments)||this}nt=T.ChildProperty,i(u,nt),h([T.Complex({size:"12px",color:null,fontStyle:null,fontWeight:null,fontFamily:null},M)],u.prototype,"font",void 0),h([T.Property(!1)],u.prototype,"useRangeColor",void 0),h([T.Property("")],u.prototype,"format",void 0),h([T.Property(0)],u.prototype,"offset",void 0),h([T.Property("Auto")],u.prototype,"position",void 0);var nt,rt=u;function u(){return null!==nt&&nt.apply(this,arguments)||this}at=T.ChildProperty,i(g,at),h([T.Property(0)],g.prototype,"start",void 0),h([T.Property(0)],g.prototype,"end",void 0),h([T.Property(null)],g.prototype,"linearGradient",void 0),h([T.Property(null)],g.prototype,"radialGradient",void 0),h([T.Property("Outside")],g.prototype,"position",void 0),h([T.Property("")],g.prototype,"color",void 0),h([T.Property(10)],g.prototype,"startWidth",void 0),h([T.Property(10)],g.prototype,"endWidth",void 0),h([T.Property(0)],g.prototype,"offset",void 0),h([T.Complex({color:"#000000",width:0},n)],g.prototype,"border",void 0);var at,lt=g;function g(){return null!==at&&at.apply(this,arguments)||this}st=T.ChildProperty,i(c,st),h([T.Property(20)],c.prototype,"height",void 0),h([T.Property(2)],c.prototype,"width",void 0),h([T.Property(null)],c.prototype,"interval",void 0),h([T.Property(null)],c.prototype,"color",void 0),h([T.Property(null)],c.prototype,"offset",void 0),h([T.Property("Auto")],c.prototype,"position",void 0);var st,ht=c;function c(){return null!==st&&st.apply(this,arguments)||this}dt=T.ChildProperty,i(m,dt),h([T.Property("Marker")],m.prototype,"type",void 0),h([T.Property(null)],m.prototype,"linearGradient",void 0),h([T.Property(null)],m.prototype,"radialGradient",void 0),h([T.Property(null)],m.prototype,"value",void 0),h([T.Property("InvertedTriangle")],m.prototype,"markerType",void 0),h([T.Property(null)],m.prototype,"imageUrl",void 0),h([T.Complex({color:"#808080"},n)],m.prototype,"border",void 0),h([T.Property(10)],m.prototype,"roundedCornerRadius",void 0),h([T.Property("Far")],m.prototype,"placement",void 0),h([T.Property(20)],m.prototype,"height",void 0),h([T.Property(20)],m.prototype,"width",void 0),h([T.Property(null)],m.prototype,"color",void 0),h([T.Property(1)],m.prototype,"opacity",void 0),h([T.Property(0)],m.prototype,"animationDuration",void 0),h([T.Property(!1)],m.prototype,"enableDrag",void 0),h([T.Property(0)],m.prototype,"offset",void 0),h([T.Property("Auto")],m.prototype,"position",void 0),h([T.Property(null)],m.prototype,"description",void 0),h([T.Property("")],m.prototype,"text",void 0),h([T.Complex({size:"16px",fontStyle:"normal",fontWeight:"normal",fontFamily:null},j)],m.prototype,"textStyle",void 0);var dt,pt=m;function m(){var t=null!==dt&&dt.apply(this,arguments)||this;return t.animationComplete=!0,t.isPointerAnimation=!0,t.currentValue=null,t}ut=T.ChildProperty,i(y,ut),h([T.Property(0)],y.prototype,"minimum",void 0),h([T.Property(100)],y.prototype,"maximum",void 0),h([T.Property(!1)],y.prototype,"isInversed",void 0),h([T.Property(!1)],y.prototype,"showLastLabel",void 0),h([T.Property(!1)],y.prototype,"opposedPosition",void 0),h([T.Complex({},ot)],y.prototype,"line",void 0),h([T.Collection([{}],lt)],y.prototype,"ranges",void 0),h([T.Collection([{}],pt)],y.prototype,"pointers",void 0),h([T.Complex({width:2,height:20},ht)],y.prototype,"majorTicks",void 0),h([T.Complex({width:1,height:10},ht)],y.prototype,"minorTicks",void 0),h([T.Complex({},rt)],y.prototype,"labelStyle",void 0);var ut,i=y;function y(){var t=null!==ut&&ut.apply(this,arguments)||this;return t.visibleLabels=[],t}var gt,ct="animationComplete",mt="axisLabelRender",yt="tooltipRender",ft="annotationRender",bt="gaugeMouseMove",vt="gaugeMouseLeave",xt="gaugeMouseDown",wt="gaugeMouseUp",Ct="dragStart",Ft="dragMove",St="dragEnd",Pt="resized",h=(gt=function(t,e){return(gt=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)},function(t,e){function i(){this.constructor=t}gt(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});function At(t,e){return-1!==t.indexOf("%")?e/100*parseInt(t,10):parseInt(t,10)}function Tt(t,e){return T.isNullOrUndefined(t)?null:-1!==t.indexOf("%")?e:parseInt(t,10)}function f(t,e){var i=document.getElementById("gauge-measuretext");return null===i&&(i=T.createElement("text",{id:"gauge-measuretext"}),document.body.appendChild(i)),i.innerText=t,i.style.position="absolute",i.style.fontSize=e.size,i.style.fontWeight=e.fontWeight,i.style.fontStyle=e.fontStyle,i.style.fontFamily=e.fontFamily,i.style.visibility="hidden",i.style.top="-100",i.style.left="0",i.style.whiteSpace="nowrap",new E(i.clientWidth,i.clientHeight)}function x(t,e,i){var o=e;if(t<f(e,i).width)for(var n=e.length-1;0<=n;--n)if(f(o=e.substring(0,n)+"...",i).width<=t||o.length<4)return o=o.length<4?" ":o;return o}function kt(t,e,i,o,n,r){r="pointer"===r?t<=o&&n<=t:null!=e&&e<=o&&n<=e&&null!=i&&i<=o&&n<=i;return r}function Et(t,e,i,o,n,r){var a=t.getBoundingClientRect(),l=e.getBoundingClientRect(),s=-1<e.id.indexOf("MarkerPointer")?l.height/2:o.isInversed?l.height:0,e=-1<e.id.indexOf("MarkerPointer")?l.width/2:o.isInversed?0:l.width,h=new E(o.lineBounds.width,o.lineBounds.height),s="drag"===n?r.y-o.lineBounds.y:l.top+s-a.top-o.lineBounds.y,t=ee(t),n="drag"===n?r.x-o.lineBounds.x+t:l.left+e-a.left-o.lineBounds.x+t,r="Vertical"===i?h.height:h.width,l="Vertical"===i?s:n;return("Vertical"===i?o.isInversed?l/r:1-l/r:o.isInversed?1-l/r:l/r)*o.visibleRange.delta+o.visibleRange.min}function Lt(t,e,i){var o=document.getElementById("gauge_path");null===o&&((o=T.createElement("text",{id:"gauge_path"})).style.position="absolute",o.style.top="0px",o.style.left="0px",i.appendChild(o));i=new d.SvgRenderer("id").createSvg({id:"box_path",width:e.width,height:e.height}),i.appendChild(t),o.appendChild(i),e=t.getBBox();return T.remove(o),e}function w(t){return document.getElementById(t)}function b(t){t=w(t);t&&T.remove(t)}function k(t,e,i,o){t=(t-o.min)/o.delta;return"Vertical"===i?e.isInversed?t:1-t:e.isInversed?1-t:t}function Ot(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 Bt(t,e,i){for(var o=0,n=Object.keys(e);o<n.length;o++){var r=n[o];t=t.split("{"+r+"}").join(It(e[r],i).toString())}return t}function It(t,e){e=e.format&&!isNaN(Number(t))?e.intl.getNumberFormat({format:e.format,useGrouping:e.useGroupingSeparator})(Number(t)):t;return null!==e?e:""}function zt(e,t){var i=null;try{"function"==typeof e?i=T.compile(e):document.querySelectorAll(e).length?i=T.compile(document.querySelector(e).innerHTML.trim()):(t.isVue||t.isVue3)&&(i=T.compile(e))}catch(t){i=T.compile(e)}return i}function Rt(t,e){e.appendChild(t);var i=t.offsetWidth,o=t.offsetHeight;return e.removeChild(t),new E(i,o)}function _t(t,e,i,o){T.createElement("a",{attrs:{download:t+"."+e.toLocaleLowerCase(),href:i}}).dispatchEvent(new MouseEvent(o?"click":"move",{view:window,bubbles:!1,cancelable:!0}))}function Dt(t){this.id=t}var Nt,Mt=function(t,e,i,o){this.min=t,this.max=e,this.interval=i,this.delta=o},Vt=function(t,e){this.x=t,this.y=e},E=function(t,e){this.width=t,this.height=e},L=function(t,e,i,o){this.x=t,this.y=e,this.width=i,this.height=o},v=(h(jt,Nt=Dt),jt);function jt(t,e,i,o,n,r,a,l){void 0===l&&(l="");t=Nt.call(this,t)||this;return t.opacity=n,t.fill=e,t.stroke=o,t["stroke-width"]=i,t["stroke-dasharray"]=r,t.d=a,t.transform=l,t}var Ut,Gt=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},C=(h(Wt,Ut=Dt),Wt);function Wt(t,e,i,o,n,r,a){void 0===r&&(r="");t=Ut.call(this,t)||this;return t.transform="",t.baseLine="auto",t.x=e,t.y=i,t.anchor=o,t.text=n,t.transform=r,t.baseLine=a,t}var Ht=function(t,e,i,o,n){this.text=t,this.value=e,this.size=i,this.x=o,this.y=n},Xt=function(t,e){this.align=e,this.axisIndex=t};function Yt(t,e,i,o,n){var r=new d.SvgRenderer(""),i=(T.isNullOrUndefined(t.id)||b(t.id),"fill:"+i+"; font-size:"+e.size+"; font-style:"+e.fontStyle+" ; font-weight:"+e.fontWeight+"; font-family:"+e.fontFamily+"; text-anchor:"+t.anchor+"; transform:"+t.transform+"; opacity:"+(T.isNullOrUndefined(o)?e.opacity:o)+"; dominant-baseline:"+t.baseLine+";"),e={id:t.id,x:t.x,y:t.y,style:i},o=r.createText(e,t.text);return n.appendChild(o),o}function Jt(t,e,i,o){for(var n,r=e-t,a=qt(i,o),l=r/a,s=Math.pow(10,Math.floor(Math.log(l)/Math.log(10))),h=0,d=[10,5,2,1];h<d.length&&!(a<r/(n=s*d[h]));h++)l=n;return l}function qt(t,e){e=5*("Horizontal"===e?.533:1);return Math.max(t*(e/100),1)}function F(t,e){var t=t.id.replace(e.element.id,"").split("_"),i=parseInt(t[2],10),t=parseInt(t[4],10);return{axis:e.axes[i],axisIndex:i,pointer:e.axes[i].pointers[t],pointerIndex:t}}function Zt(e,t){var i=null;return t.forEach(function(t){e>=t.start&&t.end>=e&&t.start!==t.end&&(i=t.interior)}),i}function Qt(t,e,i){var o=i.getBoundingClientRect(),n=i.ownerDocument.defaultView.pageXOffset,r=i.ownerDocument.defaultView.pageYOffset,a=i.ownerDocument.documentElement.clientTop,i=i.ownerDocument.documentElement.clientLeft,n=o.left+n-i,i=o.top+r-a;return new Vt(t-n,e-i)}function Kt(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 $t(t,e,i,o,n,r,a,l){var s,h=i.width,d=i.height,p=t.x,u=t.y;switch(e){case"Circle":s=(h+d)/4,p="Vertical"===r?a.opposedPosition?"Near"===l.placement?p-s:p+s:"Far"!==l.placement?p-s:p+s:p,u="Vertical"===r?u:a.opposedPosition?"Near"===l.placement?u-s:u+s:"Far"===l.placement?u+s:u-s,T.merge(n,{r:s,cx:p,cy:u});break;case"Diamond":case"Rectangle":p="Horizontal"===r?p-h/2:!a.opposedPosition&&"Far"!==l.placement||a.opposedPosition&&"Near"===l.placement?p-h:p,u="Vertical"===r?u:a.opposedPosition?"Near"===l.placement?u-d/2:u+d/2:"Far"===l.placement?u+d/2:u-d/2,T.merge(n,{d:"Diamond"===e?"M "+p+" "+u+" L "+(p+h/2)+" "+(u-d/2)+" L "+(p+h)+" "+u+" L "+(p+h/2)+" "+(u+d/2)+" L "+p+" "+u+" z":"M "+p+" "+(u-d/2)+" L "+(p+h)+" "+(u-d/2)+" L "+(p+h)+" "+(u+d/2)+" L "+p+" "+(u+d/2)+" L "+p+" "+(u-d/2)+" z"});break;case"Triangle":T.merge(n,{d:"Vertical"===r?"M "+p+" "+u+" L"+(p-h)+" "+(u-d/2)+"L"+(p-h)+" "+(u+d/2)+" Z":"M "+p+" "+u+" L"+(p+h/2)+" "+(u-d)+"L"+(p-h/2)+" "+(u-d)+" Z"});break;case"InvertedTriangle":T.merge(n,{d:"Vertical"===r?"M "+p+" "+u+" L"+(p+h)+" "+(u-d/2)+"L"+(p+h)+" "+(u+d/2)+" Z":"M "+p+" "+u+" L"+(p+h/2)+" "+(u+d)+"L"+(p-h/2)+" "+(u+d)+" Z"});break;case"Arrow":T.merge(n,{d:"Vertical"===r?"M "+p+" "+u+" L"+(p-h/2)+" "+(u-d/2)+" L"+(p-h/2)+" "+(u-d/2+d/4)+" L"+(p-h)+" "+(u-d/2+d/4)+" L"+(p-h)+" "+(u+d/2-d/4)+" L"+(p-h/2)+" "+(u+d/2-d/4)+" L"+(p-h/2)+" "+(u+d/2)+"z":"M "+p+" "+u+" L"+(p+h/2)+" "+(u-d/2)+" L"+(p+h/2-h/4)+" "+(u-d/2)+" L"+(p+h/2-h/4)+" "+(u-d)+" L"+(p-h/2+h/4)+" "+(u-d)+" L"+(p-h/2+h/4)+" "+(u-d/2)+" L"+(p-h/2)+" "+(u-d/2)+"z"});break;case"InvertedArrow":T.merge(n,{d:"Vertical"===r?"M "+p+" "+u+"L"+(p+h/2)+" "+(u-d/2)+" L"+(p+h/2)+" "+(u-d/2+d/4)+" L"+(p+h)+" "+(u-d/2+d/4)+" L"+(p+h)+" "+(u+d/2-d/4)+" L"+(p+h/2)+" "+(u+d/2-d/4)+" L"+(p+h/2)+" "+(u+d/2)+"z":"M "+p+" "+u+" L"+(p+h/2)+" "+(u+d/2)+" L"+(p+h/2-h/4)+" "+(u+d/2)+" L"+(p+h/2-h/4)+" "+(u+d)+" L"+(p-h/2+h/4)+" "+(u+d)+" L"+(p-h/2+h/4)+" "+(u+d/2)+" L"+(p-h/2)+" "+(u+d/2)+"z"});break;case"Image":T.merge(n,{href:o,height:d,width:h,x:p-h/2,y:u-d/2})}return n}function S(t,e,i,o,n,r){var a,l=t.x,t=t.y;return"Text"===e&&(a=(e=f(r.text,r.textStyle)).height,e=e.width,l="Horizontal"===o?l-e/2:!n.opposedPosition&&"Far"!==r.placement||n.opposedPosition&&"Near"===r.placement?"Inside"===r.position&&!n.opposedPosition||"Cross"===r.position||n.opposedPosition&&"Near"===r.placement&&"Outside"===r.position?l-e/2:l-e:"Cross"===r.position&&"Far"===r.placement||n.opposedPosition&&"Cross"===r.position&&("None"===r.placement||"Center"===r.placement)?l+e/2:l,t="Vertical"===o?t+a/4:n.opposedPosition?"Near"===r.placement?t:"Cross"===r.position?t+a/2+a/4:"Outside"===r.position?t+a:t+a/2:"Far"===r.placement?"Cross"===r.position?t+a/2+a/4:"Inside"===r.position?t+a:t+a/2:t,T.merge(i,{x:l,y:t})),i}function te(t,e,i,o,n,r,a,l){var s=" ",h=l;switch(e){case"RoundedRectangle":g=t.x,d=t.y,m=t.width,p=t.height,y=g+m-(h=("Vertical"===i&&0===t.height||"Horizontal"===i&&0===t.width)&&10<h?10:h),u=d+p-h,c=h+d,f=h+g,("container"===n||"bar"===n&&("Vertical"===i&&0!==t.height||"Horizontal"===i&&0!==t.width))&&(g+m/2<f&&(y=f=g+m/2),d+p/2<c)&&(u=c=d+p/2),"bar"===n&&("Vertical"===i&&0===t.height||"Horizontal"===i&&0===t.width)&&(t.width<h/2&&!a.isInversed?y=y+h+h/2:t.width<h/2&&a.isInversed&&(f=g-Math.ceil(h/4)),t.height<h/2&&!a.isInversed?c=d-Math.ceil(h/4):t.height<h/2&&a.isInversed&&(u=u+h+h/2)),s=(s=(s="M "+g+" "+c+" Q "+g+" "+d+" "+f+" "+d+" ")+("L "+y+" "+d+" Q "+(g+m)+" "+d+" "+(g+m)+" "+c+" ")+("L "+(g+m)+" "+u+" Q "+(g+m)+" "+(d+p)+" "+y+" "+(d+p)+" "))+(" L "+f+" "+(d+p)+" Q "+g+" "+(d+p)+" "+g+" "+u+" ")+("L "+g+" "+c+" z");break;case"Thermometer":var d,p,u,g,c,m="Vertical"===i?t.width:t.height,y=m+m/2/Math.PI,f=m/2;s="Vertical"===i?(d=r+r/2/Math.PI-y,p="bar"===n?t.y+d:t.y,u="bar"===n?t.y+(f-f/Math.PI):t.y,g=t.height,"M"+t.x+" "+(p+g)+" A "+y+" "+y+", 0, 1, 0, "+(t.x+t.width)+" "+(p+g)+" L "+(t.x+t.width)+" "+u+" A "+f+" "+f+", 0, 1, 0, "+t.x+" "+u+" z "):(c="bar"!==n||a.isInversed?t.x:t.x-(r+r/2/Math.PI-y),m="bar"===n?t.width-(f-f/Math.PI):t.width,"M"+c+" "+t.y+" A "+y+" "+y+", 0, 1, 0, "+c+" "+(t.y+t.height)+" L "+(("bar"===n?t.x:c)+m)+" "+(t.y+t.height)+" A "+f+" "+f+", 0, 1, 0, "+(("bar"===n?t.x:c)+m)+" "+t.y+" z ")}return s}function ee(t){var e=w(t.id+"_svg"),i=0;return i=T.isNullOrUndefined(e)||T.isNullOrUndefined(t)?i:t.getBoundingClientRect().left-e.getBoundingClientRect().left}function ie(t,e){var i,o=w(e.element.id+"_EJ2_Title_Tooltip");o?(o.innerText=t,o.style.top=(e.actualRect.y+10).toString()+"px",o.style.left=e.actualRect.x.toString()+"px"):(i=(i=f(t,{size:"12px",fontFamily:"Segoe UI"}).width+10)<e.actualRect.width?i:e.actualRect.width-10,(o=T.createElement("div",{id:e.element.id+"_EJ2_Title_Tooltip",className:"EJ2-LinearGauge-Tooltip"})).innerText=t,o.style.cssText="top:"+(e.actualRect.y+10).toString()+"px; left:"+e.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:'+i+"px;",document.body.style.overflow="hidden",w(e.element.id+"_Secondary_Element").appendChild(o))}function oe(){0<document.getElementsByClassName("EJ2-LinearGauge-Tooltip").length&&document.getElementsByClassName("EJ2-LinearGauge-Tooltip")[0].remove()}P.prototype.calculateAxesBounds=function(){var t,e,i,o,n;this.gauge.nearSizes=[],this.gauge.farSizes=[];this.checkThermometer();for(var r=0;r<this.gauge.axes.length;r++){(t=this.gauge.axes[r]).checkAlign=new Xt(r,t.opposedPosition?"Far":"Near"),(t.opposedPosition?this.gauge.farSizes:this.gauge.nearSizes).push(1),this.calculateLineBounds(t,r),this.calculateTickBounds(t),this.calculateLabelBounds(t),0<t.pointers.length&&this.calculatePointerBounds(t),0<t.ranges.length&&this.calculateRangesBounds(t);var a=t.labelBounds,l=this.gauge.axes[r].labelStyle.offset;"Vertical"===this.gauge.orientation?(e=t.opposedPosition?t.lineBounds.x:a.x-l-8,i=t.lineBounds.y,n=t.lineBounds.height,o=Math.abs(t.opposedPosition?a.x+a.width+8-e-l:t.lineBounds.x-e)):(i=t.opposedPosition?t.lineBounds.y:a.y-a.height-l-8,e=t.lineBounds.x,o=t.lineBounds.width,n=Math.abs(t.opposedPosition?a.y+8-i-l:Math.abs(t.lineBounds.y-i))),t.bounds=new L(e,i,o,n)}},P.prototype.calculateLineBounds=function(t,e){var i,o,n,r,a=t.line.height,l=this.gauge.orientation,s=this.gauge.containerBounds,a=0<t.line.width?a:null,h=("Vertical"===l?(o=T.isNullOrUndefined(a)?s.y:s.y+(s.height/2-a/2),n=t.line.width,r=T.isNullOrUndefined(a)?s.height:a):(i=T.isNullOrUndefined(a)?s.x:s.x+(s.width/2-a/2),r=t.line.width,n=T.isNullOrUndefined(a)?s.width:a),this.checkPreviousAxes(t,e)),d=0;if(!T.isNullOrUndefined(h)){for(var p=h;0<=p;p--)if(this.gauge.axes[p].minimum!==this.gauge.axes[p].maximum){h=p,d++;break}0===d&&(h=null)}T.isNullOrUndefined(h)?"Vertical"===l?i=(t.opposedPosition?s.x+s.width:s.x)+t.line.offset:o=(t.opposedPosition?s.y+s.height:s.y)+t.line.offset:(a=this.gauge.axes[h],"Vertical"===l?i=(t.opposedPosition?a.bounds.x+a.bounds.width:a.bounds.x)+t.line.offset:o=(t.opposedPosition?a.bounds.y+a.bounds.height:a.bounds.y)+t.line.offset),t.lineBounds=new L(i,o,n,r),t.minimum===t.maximum&&(t.lineBounds=new L(0,0,0,0))},P.prototype.calculateTickBounds=function(t){var e,i,o=Math.min(t.minimum,t.maximum),n=Math.max(t.minimum,t.maximum),o=o===n?n-1:o,r=t.lineBounds,a=t.majorTicks,l=t.minorTicks,s=(t.majorInterval=a.interval,t.minorInterval=l.interval,"Vertical"===this.gauge.orientation?r.height:r.width),h=("Vertical"===this.gauge.orientation?r.width:r.height)/2;t.majorInterval=T.isNullOrUndefined(t.majorInterval)?Jt(o,n,s,this.gauge.orientation):a.interval,t.visibleRange=new Mt(o,n,t.majorInterval,n-o),t.minorInterval=T.isNullOrUndefined(t.minorInterval)?t.majorInterval/2:t.minorInterval,"Vertical"===this.gauge.orientation?(e="Auto"===t.majorTicks.position?(t.opposedPosition?r.x+h:r.x-h-a.height)+a.offset:e,e="Auto"!==t.majorTicks.position?"Cross"===t.majorTicks.position?r.x-a.height/2-a.offset:"Inside"===t.majorTicks.position&&!t.opposedPosition||"Outside"===t.majorTicks.position&&t.opposedPosition?r.x-h-a.height-a.offset:r.x+h+a.offset:e,t.majorTickBounds=new L(e,r.y,a.height,r.height),t.minimum===t.maximum&&(t.majorTickBounds=new L(0,0,0,0)),e="Auto"===t.minorTicks.position?(t.opposedPosition?r.x+h:r.x-h-l.height)+l.offset:e,e="Auto"!==t.minorTicks.position?"Cross"===t.minorTicks.position?r.x-l.height/2-l.offset:"Inside"===t.minorTicks.position&&!t.opposedPosition||"Outside"===t.minorTicks.position&&t.opposedPosition?r.x-h-l.height-l.offset:r.x+h+l.offset:e,t.minorTickBounds=new L(e,r.y,l.height,r.height)):(i="Auto"===t.majorTicks.position?(t.opposedPosition?r.y+h:r.y-h-a.height)+a.offset:i,i="Auto"!==t.majorTicks.position?"Cross"===t.majorTicks.position?r.y-a.height/2-a.offset:"Inside"===t.majorTicks.position&&!t.opposedPosition||"Outside"===t.majorTicks.position&&t.opposedPosition?r.y-h-a.height-a.offset:r.y+h+a.offset:i,t.majorTickBounds=new L(r.x,i,r.width,a.height),t.minimum===t.maximum&&(t.majorTickBounds=new L(0,0,0,0)),i="Auto"===t.minorTicks.position?(t.opposedPosition?r.y+h:r.y-h-l.height)+l.offset:i,i="Auto"!==t.minorTicks.position?"Cross"===t.minorTicks.position?r.y-l.height/2-a.offset:"Inside"===t.minorTicks.position&&!t.opposedPosition||"Outside"===t.minorTicks.position&&t.opposedPosition?r.y-h-l.height-l.offset:r.y+h+l.offset:i,t.minorTickBounds=new L(r.x,i,r.width,l.height)),t.minimum===t.maximum&&(t.minorTickBounds=new L(0,0,0,0))},P.prototype.calculateLabelBounds=function(t){var e,i,o,n,r,a,l="Auto"!==t.labelStyle.position&&"Auto"!==t.majorTicks.position&&"Auto"!==t.minorTicks.position,s=l&&t.labelStyle.position===t.minorTicks.position&&t.minorTicks.position!==t.majorTicks.position?t.minorTickBounds:t.majorTickBounds,h=t.labelStyle.offset;this.calculateVisibleLabels(t),t.minimum===t.maximum?t.labelBounds=new L(0,0,0,0):(e=t.maxLabelSize.width,i=t.maxLabelSize.height/2,"Vertical"===this.gauge.orientation?(o="Auto"===t.labelStyle.position?(t.opposedPosition?s.x+s.width+5:s.x-e-5)+h:o,n=s.x,r=("Cross"===t.majorTicks.position||"Cross"===t.minorTicks.position)&&s.width>t.lineBounds.width?s.width/2:t.lineBounds.width/2,n=l&&t.labelStyle.position!==t.minorTicks.position&&t.labelStyle.position!==t.majorTicks.position?"Cross"!==t.minorTicks.position&&"Cross"!==t.majorTicks.position?"Inside"===t.labelStyle.position?s.x-t.lineBounds.width:"Outside"===t.labelStyle.position?s.x+t.lineBounds.width:s.x:"Inside"===t.labelStyle.position?t.lineBounds.x-r:"Outside"===t.labelStyle.position?t.lineBounds.x-s.width+r:s.x:s.x,o="Auto"!==t.labelStyle.position?"Cross"===t.labelStyle.position?t.lineBounds.x-t.maxLabelSize.width/4-h:"Inside"===t.labelStyle.position&&!t.opposedPosition||"Outside"===t.labelStyle.position&&t.opposedPosition?n-e-5-h:n+s.width+5+h:o,n=t.lineBounds.y):(n="Auto"===t.labelStyle.position?(t.opposedPosition?s.y+s.height+5+i:s.y-5)+h:n,a=s.y,r=("Cross"===t.majorTicks.position||"Cross"===t.minorTicks.position)&&s.height>t.lineBounds.height?s.height/2:t.lineBounds.height/2,a=l&&t.labelStyle.position!==t.minorTicks.position&&t.labelStyle.position!==t.majorTicks.position?"Cross"!==t.minorTicks.position&&"Cross"!==t.majorTicks.position?"Inside"===t.labelStyle.position?s.y-t.lineBounds.height:"Outside"===t.labelStyle.position?s.y+t.lineBounds.height:s.y:"Inside"===t.labelStyle.position?t.lineBounds.y-r:"Outside"===t.labelStyle.position?t.lineBounds.y-s.height+r:s.y:s.y,n="Auto"!==t.labelStyle.position?"Cross"===t.labelStyle.position?t.lineBounds.y+t.maxLabelSize.height/4-h:"Inside"===t.labelStyle.position&&!t.opposedPosition||"Outside"===t.labelStyle.position&&t.opposedPosition?a-5-h:a+s.height+5+i+h:n,o=t.lineBounds.x),t.labelBounds=new L(o,n,e,i))},P.prototype.calculatePointerBounds=function(t){for(var e,i=t.visibleRange,o=Math.min(i.min,i.max),n=Math.max(i.min,i.max),r=0;r<t.pointers.length;r++)e=t.pointers[r],!T.isNullOrUndefined(e.offset)&&0<e.offset.length?e.currentOffset=At(e.offset,"Horizontal"===this.gauge.orientation?this.gauge.availableSize.height/2:this.gauge.availableSize.width/2):e.currentOffset=e.offset,e.currentValue=null===e.value||e.value<o?o:e.value>n?n:e.value,0<e.width&&kt(e.currentValue,null,null,i.max,i.min,"pointer")&&this["calculate"+e.type+"Bounds"](t,e)},P.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,d=e.border.width,p=f(e.text,e.textStyle);"Vertical"===this.gauge.orientation?(i="Auto"===e.position?(i=t.opposedPosition?"Far"===l?h.x+h.width:"Center"===l?s.x+s.width:n.x:("Near"===l?h:"Center"===l?s:n).x,t.opposedPosition?("Near"===e.placement?"InvertedTriangle"===e.markerType||"InvertedArrow"===e.markerType?i+d:i-d:"Triangle"===e.markerType||"Arrow"===e.markerType?i-d:i+d)+r:("Far"===e.placement?"Triangle"===e.markerType||"Arrow"===e.markerType?i-d:i+d:"InvertedTriangle"===e.markerType||"InvertedArrow"===e.markerType?i+d:i-d)+r):"Cross"===e.position?n.x-("Text"===e.markerType?p.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?p:e).width:0)-r:n.x+n.width/2+r,o=k(e.currentValue,t,this.gauge.orientation,a)*n.height+n.y):(o="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:n).y,t.opposedPosition?("Near"===e.placement?"InvertedTriangle"===e.markerType||"InvertedArrow"===e.markerType?o+d:o-d:"Triangle"===e.markerType||"Arrow"===e.markerType?o-d:o+d)+r:("Far"===e.placement?"Triangle"===e.markerType||"Arrow"===e.markerType?o-d:o+d:"InvertedTriangle"===e.markerType||"InvertedArrow"===e.markerType?o+d:o-d)+r):"Cross"===e.position?n.y-("Text"===e.markerType?p: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?p:e).height:0)-r:n.y+n.height/2+r,i=k(e.currentValue,t,this.gauge.orientation,a)*n.width+n.x),e.bounds=new L(i,o,e.width,e.height),t.minimum===t.maximum&&(e.bounds=new L(0,0,0,0),e.width=0,e.height=0)},P.prototype.calculateBarBounds=function(t,e){var i,o,n,r,a=t.lineBounds,l=t.visibleRange,s=this.gauge.orientation,h=e.currentOffset,d=this.gauge.containerBounds;"Vertical"===s?("Auto"===e.position?(i=0<d.width?d.x+(d.width/2-e.width/2):t.opposedPosition?a.x-e.width-10:a.x+10,i+=h):i="Cross"===e.position?a.x-e.width/2-h:"Inside"===e.position&&!t.opposedPosition||"Outside"===e.position&&t.opposedPosition?a.x-a.width/2-e.width-h:a.x+a.width/2+h,o=k(e.currentValue,t,s,l)*a.height+a.y,r=k(l.min,t,s,l)*a.height+a.y,n=Math.abs(r-o),o=t.isInversed?r:o,r=e.width):("Auto"===e.position?(o=0<d.height?d.y+d.height/2-e.height/2:t.opposedPosition?a.y-e.height-10:a.y+10,o+=h):o="Cross"===e.position?a.y-e.height/2-h:"Inside"===e.position&&!t.opposedPosition||"Outside"===e.position&&t.opposedPosition?a.y-a.height/2-e.height-h:a.y+a.height/2+h,n=e.height,i=k(l.min,t,s,l)*a.width+a.x,d=k(e.currentValue,t,s,l)*a.width+a.x,r=Math.abs(d-i),i=t.isInversed?d:i),e.bounds=new L(i,o,r,n),t.minimum===t.maximum&&(e.bounds=new L(0,0,0,0),e.width=0,e.height=0)},P.prototype.calculateRangesBounds=function(t){for(var e,i,o,n,r,a,l,s,h,d,p,u,g=t.lineBounds,c=t.visibleRange,m=this.gauge.orientation,y=0;y<t.ranges.length;y++)e=t.ranges[y],this.gauge.gradientModule&&(h=this.gauge.gradientModule.getGradientColorString(e)),!T.isNullOrUndefined(e.offset)&&0<e.offset.length?e.currentOffset=At(e.offset,"Horizontal"===this.gauge.orientation?this.gauge.availableSize.height/2:this.gauge.availableSize.width/2):e.currentOffset=e.offset,kt(null,i=Math.max(e.start,c.min),o=Math.min(e.end,c.max),c.max,c.min,"range")&&(o=Math.max(i,o),i=Math.min(i,e.end),s=e.position,d=e.startWidth,p=e.endWidth,u=!T.isNullOrUndefined(this.gauge.rangePalettes)&&0<this.gauge.rangePalettes.length?this.gauge.rangePalettes:Kt(this.gauge.theme),e.interior=h||e.color||u[y%u.length],"Vertical"===this.gauge.orientation?(a=g.x+e.currentOffset+("Cross"===s?d/2:"Outside"===s||"Auto"===s?-g.width/2:"Inside"===s?g.width/2:0),l=k(o,t,m,c)*g.height+g.y,u=k(i,t,m,c)*g.height+g.y,n=t.opposedPosition?"Inside"===s||"Cross"===s?a-d:a+d:"Inside"===s?a+d:a-d,r=t.opposedPosition?"Inside"===s||"Cross"===s?a-p:a+p:"Inside"===s?a+p:a-p,e.path="M"+a+" "+l+" L "+a+" "+(l+(u-=l))+" L "+n+" "+(l+u)+" L "+r+" "+l+" L "+a+" "+l+" z "):(a=k(o,t,m,c)*g.width+g.x,l=t.lineBounds.y+e.currentOffset+("Cross"===s?d/2:"Outside"===s||"Auto"===s?-g.height/2:"Inside"===s?g.height/2:0),u=k(i,t,m,c)*g.width+g.x,n=t.opposedPosition?"Inside"===s||"Cross"===s?l-d:l+d:"Inside"===s?l+d:l-d,r=t.opposedPosition?"Inside"===s||"Cross"===s?l-p:l+p:"Inside"===s?l+p:l-p,e.path="M"+a+" "+l+" L "+(a-(u=a-u))+" "+l+" L "+(a-u)+" "+n+" L "+a+" "+r+" L "+a+" "+l+" z "))},P.prototype.checkPreviousAxes=function(t,e){e-=1;return e=0<=e?this.gauge.axes[e].checkAlign.align===t.checkAlign.align?e:this.checkPreviousAxes(t,e):null},P.prototype.calculateVisibleLabels=function(o){if(o.visibleLabels=[],o.minimum!==o.maximum){for(var n,t=o.visibleRange.min,e=o.visibleRange.max,i=o.visibleRange.interval,r=void 0,a=o.labelStyle,l=a.format&&null!==a.format.match("{value}"),s=function(t){function e(t){t.cancel||o.visibleLabels.push(new Ht(t.text,i,n))}var i=t;-1!==i.toString().indexOf("e")&&T.isNullOrUndefined(h.gauge.format)&&(t=parseInt(i.toString().split("-")[1],10),i=parseInt(i.toFixed(t),10)),r={cancel:!1,name:mt,axis:o,text:l?Bt(a.format,{value:i},h.gauge):It(i,h.gauge).toString(),value:i};e.bind(h),h.gauge.trigger(mt,r,e)},h=this,d=t;d<=e&&0<i;d+=i)s(d);var t=o.visibleLabels.length?o.visibleLabels[o.visibleLabels.length-1].value:null,p=o.visibleRange.max;t!==p&&!0===o.showLastLabel&&(r={cancel:!1,name:mt,axis:o,text:l?Bt(a.format,{value:p},this.gauge):It(p,this.gauge).toString(),value:p},(t=function(t){n=f(t.text,o.labelStyle.font),t.cancel||o.visibleLabels.push(new Ht(t.text,p,n))}).bind(this),this.gauge.trigger(mt,r,t)),this.getMaxLabelWidth(o)}},P.prototype.getMaxLabelWidth=function(t){var e;t.maxLabelSize=new E(0,0);for(var i=0;i<t.visibleLabels.length;i++)(e=t.visibleLabels[i]).size=f(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)},P.prototype.checkThermometer=function(){"Thermometer"===this.gauge.container.type&&this.gauge.axes.map(function(e){e.isInversed&&e.pointers.map(function(t){"Bar"===t.type&&(e.isInversed=!1)})})},P.prototype.destroy=function(){this.gauge=null};var ne=P;function P(t){this.gauge=t}function re(t){this.gauge=t}re.prototype.performMarkerAnimation=function(t,e,i){var o,n,r,a=this,l=t,s=e.visibleRange,h="Vertical"===this.gauge.orientation?e.lineBounds.height:e.lineBounds.width,d="Vertical"===this.gauge.orientation?e.lineBounds.y:e.lineBounds.x,p=("Vertical"===this.gauge.orientation?i.bounds.y=k(i.currentValue,e,this.gauge.orientation,s)*h+d:i.bounds.x=k(i.currentValue,e,this.gauge.orientation,s)*h+d,o=new v(l.id,null,null,null),o=$t(i.bounds,i.markerType,new E(i.width,i.height),i.imageUrl,o,this.gauge.orientation,e,i),"Text"===i.markerType&&(n=new C(l.id,0,0,"middle",i.text,null,"auto"),n=S(i.bounds,i.markerType,n,this.gauge.orientation,e,i)),"string"==typeof i.startValue?parseInt(i.startValue,10):i.startValue),u=i.currentValue,p=p===u?s.min:p,g=Math.abs(p-u),c=o.d,m=o.cx,y=o.cy,f=("Text"===i.markerType?n:o).x,b=("Text"===i.markerType?n:o).y;new T.Animation({}).animate(l,{name:"Linear",duration:"Enable"!==T.animationMode||(0!==i.animationDuration||this.gauge.allowLoadingAnimation)&&0!==this.gauge.animationDuration?this.gauge.allowLoadingAnimation&&0===i.animationDuration?this.gauge.animationDuration/this.gauge.splitUpCount:i.animationDuration:1e3,progress:function(t){t.timeStamp>=t.delay&&(r=(t.timeStamp-t.delay)/t.duration,r=p<u?p+r*g:p-r*g,"Vertical"===a.gauge.orientation?(i.bounds.y=k(r,e,a.gauge.orientation,s)*h+d,o=$t(i.bounds,i.markerType,new E(i.width,i.height),i.imageUrl,o,a.gauge.orientation,e,i),"Text"===i.markerType&&(n=S(i.bounds,i.markerType,n,a.gauge.orientation,e,i)),T.isNullOrUndefined(o.r)?T.isNullOrUndefined(("Text"===i.markerType?n:o).y)?l.setAttribute("d",o.d):l.setAttribute("y","Text"===i.markerType?n.y:o.y.toString()):l.setAttribute("cy",o.cy.toString())):(i.bounds.x=k(r,e,a.gauge.orientation,s)*h+d,o=$t(i.bounds,i.markerType,new E(i.width,i.height),i.imageUrl,o,a.gauge.orientation,e,i),"Text"===i.markerType&&(n=S(i.bounds,i.markerType,n,a.gauge.orientation,e,i)),T.isNullOrUndefined(o.r)?T.isNullOrUndefined(("Text"===i.markerType?n:o).x)?l.setAttribute("d",o.d):l.setAttribute("x","Text"===i.markerType?n.x:o.x.toString()):l.setAttribute("cx",o.cx.toString())),l.style.visibility="visible")},end:function(){var t;T.isNullOrUndefined(y)?T.isNullOrUndefined(b)?l.setAttribute("d",c):(l.setAttribute("y",b.toString()),l.setAttribute("x",f.toString())):(l.setAttribute("cy",y.toString()),l.setAttribute("cx",m.toString())),l.style.visibility="visible",i.isPointerAnimation=!1,i.animationComplete=!0,i.startValue=i.value=i.currentValue,a.gauge.trigger(ct,{axis:e,pointer:i}),a.gauge.allowLoadingAnimation&&(!T.isNullOrUndefined(a.gauge.annotationsModule)&&0<a.gauge.annotations.length&&(""!==a.gauge.annotations[0].content||1<a.gauge.annotations.length)?(t=document.getElementById(a.gauge.element.id+"_AnnotationsGroup"),a.gauge.annotationsModule.annotationAnimate(t,a.gauge)):(a.gauge.allowLoadingAnimation=!1,a.gauge.isOverAllAnimationComplete=!0))}})},re.prototype.performBarAnimation=function(t,e,i){var o,n,r,a,l,s,h,d,p,u=this,g=e.visibleRange,c=t,m="Vertical"===this.gauge.orientation?e.lineBounds.height:e.lineBounds.width,y="Vertical"===this.gauge.orientation?e.lineBounds.y:e.lineBounds.x,f="string"==typeof i.startValue?parseInt(i.startValue,10):i.startValue,b=i.currentValue,f=f===b?g.min:f,v=c.tagName,x=Math.abs(f-b),w=k(b,e,this.gauge.orientation,g)*m+y,C=k(g.min,e,this.gauge.orientation,g)*m+y,F="Vertical"===this.gauge.orientation?e.isInversed?C:w:e.isInversed?w:C,S=Math.abs(C-w),P=("Thermometer"===this.gauge.container.type&&0===f&&0<this.gauge.container.width&&(b===e.minimum?t.style.visibility="visible":(h=c.parentElement.childNodes[1].childNodes[0].childNodes[0],"Vertical"===this.gauge.orientation?(C=h.getAttribute("y"),r=h.getAttribute("height"),a=parseInt(C,10)+parseInt(r,10),h.setAttribute("y",a.toString())):(w=h.getAttribute("x"),l=h.getAttribute("width"),a=parseInt(w,10)+parseInt(l,10),h.setAttribute("width","0")))),d=i.value===e.minimum&&"RoundedRectangle"===this.gauge.container.type?"":te(i.bounds,this.gauge.container.type,this.gauge.orientation,new E(i.bounds.width,i.bounds.height),"bar",this.gauge.container.width,e,i.roundedCornerRadius),i.bounds.width),A=i.bounds.height;new T.Animation({}).animate(c,{name:"Linear",duration:"Enable"!==T.animationMode||(0!==i.animationDuration||this.gauge.allowLoadingAnimation)&&0!==this.gauge.animationDuration?this.gauge.allowLoadingAnimation&&0===i.animationDuration?this.gauge.animationDuration/this.gauge.splitUpCount:i.animationDuration:1e3,progress:function(t){t.timeStamp>=t.delay&&(o=(t.timeStamp-t.delay)/t.duration,p=k(f<b?f+o*x:f-o*x,e,u.gauge.orientation,g)*m+y,n=k(g.min,e,u.gauge.orientation,g)*m+y,s=Math.abs(p-n),"Vertical"===u.gauge.orientation?(i.bounds.y=e.isInversed?n:p,A=s):(i.bounds.x=e.isInversed?p:n,P=s),"path"===v?(0===f&&"Thermometer"===u.gauge.container.type&&("Vertical"===u.gauge.orientation?h.setAttribute("y",(a-o*parseInt(r,10)).toString()):h.setAttribute("width",(o*parseInt(l,10)).toString())),p=i.value===e.minimum&&"RoundedRectangle"===u.gauge.container.type?"":te(new L(i.bounds.x,i.bounds.y,P,A),u.gauge.container.type,u.gauge.orientation,new E(P,A),"bar",u.gauge.container.width,e,i.roundedCornerRadius),c.setAttribute("d",p)):"Vertical"===u.gauge.orientation?(c.setAttribute("y",i.bounds.y.toString()),c.setAttribute("height",A.toString())):(c.setAttribute("x",i.bounds.x.toString()),c.setAttribute("width",P.toString())),c.style.visibility="visible")},end:function(){var t;"path"===v?0===f&&"Thermometer"===u.gauge.container.type?c.parentElement.children[1].remove():c.setAttribute("d",d):"Vertical"===u.gauge.orientation?(c.setAttribute("y",F.toString()),c.setAttribute("height",S.toString())):(c.setAttribute("x",F.toString()),c.setAttribute("width",S.toString())),c.style.visibility="visible",i.isPointerAnimation=!1,i.startValue=i.value=i.currentValue,u.gauge.trigger(ct,{axis:e,pointer:i}),u.gauge.allowLoadingAnimation&&(!T.isNullOrUndefined(u.gauge.annotationsModule)&&0<u.gauge.annotations.length&&(""!==u.gauge.annotations[0].content||1<u.gauge.annotations.length)?(t=document.getElementById(u.gauge.element.id+"_AnnotationsGroup"),u.gauge.annotationsModule.annotationAnimate(t,u.gauge)):(u.gauge.allowLoadingAnimation=!1,u.gauge.isOverAllAnimationComplete=!0))}})},ae=function(t,e){return(ae=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)};(function(t,e){function i(){this.constructor=t}ae(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)})(A,le=re),A.prototype.renderAxes=function(){var t,e,i,o=this,n=(this.axisElements=[],this.gauge.svgObject.querySelector("#"+this.gauge.element.id+"_Axis_Collections"));n&&T.remove(n),this.axisObject=this.gauge.renderer.createGroup({id:this.gauge.element.id+"_Axis_Collections",transform:"translate( 0, 0 )"});for(var r=this.gauge.splitUpCount=0;r<this.gauge.axes.length;r++)e=(t=this.gauge.axes[r]).majorTicks,i=t.minorTicks,this.htmlObject=this.gauge.renderer.createGroup({id:this.gauge.element.id+"_Axis_Group_"+r}),this.gauge.allowLoadingAnimation&&(0===this.gauge.splitUpCount&&(0<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&&(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=0<t.pointers.length?this.gauge.splitUpCount+1:this.gauge.splitUpCount)),this.drawAxisLine(t,this.htmlObject,r),this.drawRanges(t,this.htmlObject,r),this.drawTicks(t,e,this.htmlObject,"MajorTicks",t.majorTickBounds,r),this.drawTicks(t,i,this.htmlObject,"MinorTicks",t.minorTickBounds,r),this.drawAxisLabels(t,this.htmlObject,r),this.drawPointers(t,this.htmlObject,r),this.axisElements.push(this.htmlObject);this.axisElements.forEach(function(t){o.axisObject.appendChild(t)}),this.gauge.svgObject.appendChild(this.axisObject),this.gauge.nearSizes.length!==this.gauge.farSizes.length&&1<this.gauge.axes.length&&this.axisAlign(this.gauge.axes)},A.prototype.axisAlign=function(t){var e,i=0,o=0;"Vertical"===this.gauge.orientation?(t.forEach(function(t){t.opposedPosition?o+=t.bounds.width:i+=t.bounds.width}),i+=this.gauge.containerBounds.width/2,o+=this.gauge.containerBounds.width/2,e=i/2-o/2,this.axisObject.setAttribute("transform","translate("+e+",0)"),T.isNullOrUndefined(this.gauge.containerObject)||this.gauge.containerObject.setAttribute("transform","translate("+e+",0)")):(t.forEach(function(t){t.opposedPosition?o+=t.bounds.height:i+=t.bounds.height}),i+=this.gauge.containerBounds.height/2,o+=this.gauge.containerBounds.height/2,e=i/2-o/2,this.axisObject.setAttribute("transform","translate(0,"+e+")"),T.isNullOrUndefined(this.gauge.containerObject)||this.gauge.containerObject.setAttribute("transform","translate(0,"+e+")"))},A.prototype.drawAxisLine=function(t,e,i){var o=t.lineBounds,n="",r=t.line.color||this.gauge.themeStyle.lineColor;0<t.line.width&&(n="M"+o.x+" "+o.y+" L "+("Vertical"===this.gauge.orientation?o.x:o.x+o.width)+" "+("Vertical"===this.gauge.orientation?o.y+o.height:o.y)+"z",o=new v(this.gauge.element.id+"_AxisLine_"+i,r,t.line.width,r,1,t.line.dashArray,n),i=this.gauge.renderer.drawPath(o),this.gauge.allowLoadingAnimation&&i.classList.add(this.gauge.element.id+"animation"),e.appendChild(i))},A.prototype.drawTicks=function(t,e,i,o,n,r){for(var a,l,s="",h=t.visibleRange,d=t.lineBounds,p=t.majorTicks.color||this.gauge.themeStyle.majorTickColor,u=t.minorTicks.color||this.gauge.themeStyle.minorTickColor,p="MajorTicks"===o?p:u,g="MajorTicks"===o?t.majorInterval:t.minorInterval,c=t.minimum!==t.maximum?e.height:0,m=h.min;m<=h.max&&0<g;m+=g)"MajorTicks"!==o&&"MinorTicks"!==o||(s="Vertical"===this.gauge.orientation?(l=n.x,a=k(m,t,this.gauge.orientation,h)*d.height+d.y,s.concat("M"+l+" "+a+" L"+(l+c)+" "+a+" ")):(l=k(m,t,this.gauge.orientation,h)*d.width+d.x,a=n.y,s.concat("M"+l+" "+a+" L"+l+" "+(a+c)+" ")));u=new v(this.gauge.element.id+"_"+o+"Line_"+r,p,e.width,p,1,null,s),r=this.gauge.renderer.drawPath(u);this.gauge.allowLoadingAnimation&&r.classList.add(this.gauge.element.id+"animation"),i.appendChild(r)},A.prototype.drawAxisLabels=function(t,e,i){for(var o,n,r,a=t.lineBounds,l=t.labelBounds,s=t.majorTickBounds,h=t.visibleRange,d=this.gauge.themeStyle.labelColor,p=t.labelStyle.offset,u=t.visibleLabels.length-1,g=this.gauge.renderer.createGroup({id:this.gauge.element.id+"_AxisLabelsGroup_"+i}),c=0;c<t.visibleLabels.length;c++){var m,y,f,b=t.visibleLabels[c].size,v=t.labelStyle.useRangeColor?Zt(t.visibleLabels[c].value,t.ranges):null,b=(v=T.isNullOrUndefined(v)?t.labelStyle.font.color||d:v,"Vertical"===this.gauge.orientation?(o=k(t.visibleLabels[c].value,t,this.gauge.orientation,h)*a.height+a.y,y="Auto"!==t.labelStyle.position||t.opposedPosition?l.x:s.x-b.width-5+p,o+=b.height/4,t.visibleLabels[c].x=y,t.visibleLabels[c].y=o):0!==c&&c!==u||"None"===this.gauge.edgeLabelPlacement?(y=k(t.visibleLabels[c].value,t,this.gauge.orientation,h)*a.width+a.x,o=l.y,n="middle",r="",t.visibleLabels[c].x=y,t.visibleLabels[c].y=o):("Shift"===this.gauge.edgeLabelPlacement?(y=0===c?k(t.visibleLabels[c].value,t,this.gauge.orientation,h)*a.width+a.x+(t.isInversed?-t.visibleLabels[c].size.width/2:t.visibleLabels[c].size.width/2):k(t.visibleLabels[c].value,t,this.gauge.orientation,h)*a.width+a.x-(t.isInversed?-t.visibleLabels[c].size.width/2:t.visibleLabels[c].size.width/2),this.gauge.allowMargin&&c===u&&(!t.isInversed&&y-t.visibleLabels[c].size.width/2<t.visibleLabels[c-1].x+t.visibleLabels[c-1].size.width/2?y+=t.visibleLabels[c].size.width/2:t.isInversed&&y+t.visibleLabels[c].size.width/2>t.visibleLabels[c-1].x-t.visibleLabels[c-1].size.width/2&&(y-=t.visibleLabels[c].size.width/2))):"Trim"===this.gauge.edgeLabelPlacement?(y=k(t.visibleLabels[c].value,t,this.gauge.orientation,h)*a.width+a.x,c===u&&(this.gauge.allowMargin?t.isInversed&&y+t.visibleLabels[c].size.width/2>t.visibleLabels[c-1].x-t.visibleLabels[c-1].size.width/2?(m=t.visibleLabels[c].size.width-(y+t.visibleLabels[c].size.width/2-(t.visibleLabels[c-1].x-t.visibleLabels[c-1].size.width/2)+2),t.visibleLabels[c].text=x(m,t.visibleLabels[c].text,t.labelStyle.font)):!t.isInversed&&y-t.visibleLabels[c].size.width/2<t.visibleLabels[c-1].x+t.visibleLabels[c-1].size.width/2&&(m=t.visibleLabels[c].size.width-(t.visibleLabels[c-1].x+t.visibleLabels[c-1].size.width/2-(y-t.visibleLabels[c].size.width/2)+2),t.visibleLabels[c].text=x(m,t.visibleLabels[c].text,t.labelStyle.font)):!t.isInversed&&this.gauge.margin.right<=10?(f=.75*t.visibleLabels[c].size.width,t.visibleLabels[c].text=x(f,t.visibleLabels[c].text,t.labelStyle.font)):t.isInversed&&y+t.visibleLabels[c].size.width/2>t.visibleLabels[c-1].x-t.visibleLabels[c-1].size.width/2&&(f=t.visibleLabels[c].size.width-(y+t.visibleLabels[c].size.width/2-(t.visibleLabels[c-1].x-t.visibleLabels[c-1].size.width/2)+2),t.visibleLabels[c].text=x(f,t.visibleLabels[c].text,t.labelStyle.font)))):"Auto"===this.gauge.edgeLabelPlacement&&(this.gauge.allowMargin?(y=k(t.visibleLabels[c].value,t,this.gauge.orientation,h)*a.width+a.x,c===u&&t.isInversed&&y+t.visibleLabels[c].size.width/2>t.visibleLabels[c-1].x-t.visibleLabels[c-1].size.width/2&&(b=t.visibleLabels[c].size.width-(y+t.visibleLabels[c].size.width/2-(t.visibleLabels[c-1].x-t.visibleLabels[c-1].size.width/2)+2),t.visibleLabels[c].text=x(b,t.visibleLabels[c].text,t.labelStyle.font))):(y=c===u?k(t.visibleLabels[c].value,t,this.gauge.orientation,h)*a.width+a.x-(t.isInversed?-t.visibleLabels[c].size.width/2:t.visibleLabels[c].size.width/2):k(t.visibleLabels[c].value,t,this.gauge.orientation,h)*a.width+a.x+(t.isInversed?-t.visibleLabels[c].size.width/2:t.visibleLabels[c].size.width/2),c===u&&(!t.isInversed&&y-t.visibleLabels[c].size.width/2<t.visibleLabels[c-1].x+t.visibleLabels[c-1].size.width/2?(y+=t.visibleLabels[c].size.width/2,f=.75*t.visibleLabels[c].size.width,t.visibleLabels[c].text=x(f,t.visibleLabels[c].text,t.labelStyle.font)):t.isInversed&&y+t.visibleLabels[c].size.width/2>t.visibleLabels[c-1].x-t.visibleLabels[c-1].size.width/2&&(y-=t.visibleLabels[c].size.width/2,b=t.visibleLabels[c].size.width-(y+t.visibleLabels[c].size.width/2-(t.visibleLabels[c-1].x-t.visibleLabels[c-1].size.width/2)+2),t.visibleLabels[c].text=x(b,t.visibleLabels[c].text,t.labelStyle.font))))),o=l.y,t.visibleLabels[c].x=y,t.visibleLabels[c].y=o,n="middle",r=""),{size:t.labelStyle.font.size,color:t.labelStyle.font.color,fontFamily:t.labelStyle.font.fontFamily,fontWeight:t.labelStyle.font.fontWeight,fontStyle:t.labelStyle.font.fontStyle,opacity:t.labelStyle.font.opacity}),b=(b.fontFamily=b.fontFamily||this.gauge.themeStyle