{"size": 12553, "ext": "js", "max_stars_repo_path": "excel/Wijmo/wijgauge/jquery.wijmo.wijgauge.min.js", "max_stars_repo_name": "ljx0517/phalconeye", "max_stars_repo_stars_event_min_datetime": "2015-01-02T16:41:11.000Z", "max_stars_repo_stars_event_max_datetime": "2015-01-02T16:41:11.000Z", "max_issues_repo_path": "excel/Wijmo/wijgauge/jquery.wijmo.wijgauge.min.js", "max_issues_repo_name": "ljx0517/phalconeye", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "excel/Wijmo/wijgauge/jquery.wijmo.wijgauge.min.js", "max_forks_repo_name": "ljx0517/phalconeye", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 12553.0, "max_line_length": 12553, "alphanum_fraction": 0.7361586872}
var __extends=this.__extends||function(e,t){function r(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);r.prototype=t.prototype,e.prototype=new r},wijmo;(function(e){(function(t){var n=jQuery;(function(e){e[e.east=0]="east",e[e.west=1]="west",e[e.south=2]="south",e[e.north=3]="north"})(t.Compass||(t.Compass={}));var r=t.Compass,i=function(){function e(){}return e.mod360=function(e){var t=e%360;return e<0&&(t+=360),t},e.getAngle=function(e,t,n){var r=this,i=r.distance(t,n),s=r.distance(t,e),o=r.distance(n,e),u=i*i,a=s*s,f=o*o,l=Math.acos((f-a-u)/(-2*s*i));return Math.round(180/Math.PI*l)},e.distance=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},e.log=function(e,t){return e<=0?NaN:t===1||t<0?NaN:Math.log(e)/Math.log(t)},e.generateValues=function(e,t,n){var r=[],i,s;if(t>e&&n>0){i=parseInt(((t-e)/n+1).toString(),10);for(s=0;s<i;s++)r.push(e+s*n)}else n===0&&r.push(e);return r},e.isInRange=function(e,t,n){return e>=t&&e<=n||e<=t&&e>=n},e.paintMarker=function(e,t,n,r,i,s,o){var u;return t==="rect"?e.rect(n-i/2,r-s/2,i,s):(o?u=e.paintMarker(t,n,r,s):u=e.paintMarker(t,n,r,i),u)},e.formatString=function(e,t){if(n.isFunction(t))return t.call(this,e);if(t!==""){var r=/\{0(?::((?:n|d|p|c)\d?))?\}/gi,i,s;if(r.test(t))return i=t.match(r),s="$1",t.replace(/\{0(?::(?:(?:n|d|p|c)\d?))?\}/gi,Globalize.format(e,s))}return e},e.getPositionByAngle=function(e,t,n,r){var i={x:0,y:0},s=Raphael.rad(r);return i.x=e-n*Math.cos(s),i.y=t-n*Math.sin(s),i},e.donut=function(e,t,n,r,i,s,o){var u=this.getPositionByAngle,a=u(t,n,r,s),f=u(t,n,r,o),l=u(t,n,i,s),c=u(t,n,i,o),h=o-s>180,p;(o-s)%360!==0?(p=["M",a.x,a.y,"A",r,r,0,+h,1,f.x,f.y,"L",c.x,c.y,"A",i,i,0,+h,1,l.x,l.y,"L",a.x,a.y,"z"],e.path(p.join(" "))):e.circle(t,n,r)},e}();t.GaugeUtil=i,Raphael.fn.isoTri=function(e,t,n,r,i){var s=e,o=t+r/2,u=e+n,a=t,f=e+n,l=t+r,c;return i==3?(s=e,o=t,u=e-n/2,a=t+r,f=e+n/2,l=t+r):i===0?(s=e-n/2,o=t-r/2,u=e-n/2,a=t+r/2,f=e+n/2,l=t):i===1&&(s=e-n/2,o=t,u=e+n/2,a=t-r/2,f=e+n/2,l=t+r/2),c=["M",s,o,"L",u,a,"L",f,l,"z"],this.path(c.join(" "))};var s=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t.prototype._create=function(){var t=this,r=t.options,i;window.wijmoApplyWijTouchUtilEvents&&(n=window.wijmoApplyWijTouchUtilEvents(n)),t.element.is(":hidden")&&t.element.wijAddVisibilityObserver&&t.element.wijAddVisibilityObserver(function(){t.redraw(),t.element.wijRemoveVisibilityObserver&&t.element.wijRemoveVisibilityObserver()},"wijgauge"),isNaN(r.width)&&t._setDefaultWidth(),isNaN(r.height)&&t._setDefaultHeight(),t._setDefaultWidthHeight(),r.face&&r.face.template&&typeof r.face.template=="string"&&window[r.face.template]&&(r.face.template=window[r.face.template]),r.pointer&&r.pointer.template&&typeof r.pointer.template=="string"&&window[r.pointer.template]&&(r.pointer.template=window[r.pointer.template]),r.cap&&r.cap.template&&typeof r.cap.template=="string"&&window[r.cap.template]&&(r.cap.template=window[r.cap.template]),t.element.addClass(r.wijCSS.widget);try{t.canvas=Raphael(t.element[0],r.width,r.height)}catch(s){var o=t.element.css("display");i=n("<div></div>").insertBefore(t.element).append(t.element),t.element.addClass("ui-helper-hidden-accessible").appendTo(n("body")),o==="none"&&t.element.css("display","block"),t.canvas=Raphael(t.element[0],r.width,r.height),t.element.appendTo(i).unwrap().removeClass("ui-helper-hidden-accessible"),o==="none"&&t.element.css("display","none")}t._autoCalculate(),t._draw(),t._bindResizeEvent(),e.prototype._create.call(this)},t.prototype._setDefaultWidth=function(){},t.prototype._setDefaultHeight=function(){},t.prototype._setDefaultWidthHeight=function(){var e=this,t=e.element,n=e.options,r=t.get(0).style,i=r.width,s=r.height;i!==""&&(n.width=t.width()),s!==""&&(n.height=t.height())},t.prototype._autoCalculate=function(){},t.prototype._setOption=function(t,r){var i=this,s=i.options,o=s[t];if(t==="value")i._trigger("beforeValueChanged",null,{newValue:r,oldValue:o})!==!1&&(e.prototype._setOption.call(this,t,r),i._set_value(r,o),i._trigger("valueChanged",null,{newValue:r,oldValue:o}));else{e.prototype._setOption.call(this,t,r),n.isPlainObject(r)&&(s[t]=n.extend({},o,r));if(s.radius==="auto"){i._autoCalculate(),i.redraw();return}i["_set_"+t]&&i["_set_"+t](r,o)}},t.prototype._innerDisable=function(){e.prototype._innerDisable.call(this),this._handleDisabledOption(!0,this.element)},t.prototype._innerEnable=function(){e.prototype._innerEnable.call(this),this._handleDisabledOption(!1,this.element)},t.prototype._set_value=function(e,t){this._setPointer()},t.prototype._set_autoResize=function(){this._unbindResizeEvent(),this._bindResizeEvent()},t.prototype._set_max=function(){this._redrawMarksAndLabels(),this._set_ranges(),this._setPointer()},t.prototype._set_min=function(){this._redrawMarksAndLabels(),this._set_ranges(),this._setPointer()},t.prototype._set_width=function(){this.redraw()},t.prototype._set_height=function(){this.redraw()},t.prototype._set_isInverted=function(){this.redraw()},t.prototype._set_tickMajor=function(){this._redrawMarksAndLabels()},t.prototype._set_tickMinor=function(){this._redrawMarksAndLabels()},t.prototype._set_pointer=function(){var e=this;e._removePointer(),e._paintPointer(),e._setPointer()},t.prototype._removePointer=function(){var e=this;e.pointer&&(e._destroyRaphaelElement(e.pointer),e.pointer=null)},t.prototype._set_islogarithmic=function(){var e=this;e._redrawMarksAndLabels(),e._setPointer()},t.prototype._set_logarithmicBase=function(){var e=this;e._redrawMarksAndLabels(),e._setPointer()},t.prototype._set_labels=function(){this._redrawMarksAndLabels()},t.prototype._set_margin=function(e,t){e!==t&&this.redraw()},t.prototype._set_marginTop=function(e,t){this._set_margin(e,t)},t.prototype._set_marginBottom=function(e,t){this._set_margin(e,t)},t.prototype._set_marginLeft=function(e,t){this._set_margin(e,t)},t.prototype._set_marginRight=function(e,t){this._set_margin(e,t)},t.prototype._set_ranges=function(){var e=this;e._removeRanges(),e._paintRanges(),e._resetElementPosition()},t.prototype._set_face=function(){var e=this;e._removeFace(),e._paintFace(),e._resetElementPosition(!0)},t.prototype._removeFace=function(){var e=this;e.face&&(e._destroyRaphaelElement(e.face),e.face=null)},t.prototype._clearState=function(){var e=this;e.labels=[],e.majorMarks=[],e.minorMarks=[],e.face=null,e.pointer=null},t.prototype._resetElementPosition=function(e){var t=this;e&&t.ranges&&n.each(t.ranges,function(e,t){t.toFront()}),t.majorMarks&&n.each(t.majorMarks,function(e,t){t.toFront()}),t.minorMarks&&n.each(t.minorMarks,function(e,t){t.toFront()}),t.labels&&n.each(t.labels,function(e,t){t.toFront()}),t.pointer&&t.pointer.toFront(),t.cap&&t.cap.toFront()},t.prototype._redrawMarksAndLabels=function(){var e=this;e._removeMarksAndLabels(),e._drawMarksAndLabels()},t.prototype._removeMarksAndLabels=function(){var e=this;e._unbindEvents(e.labels),e._destroyRaphaelArray(e.labels),e._unbindEvents(e.majorMarks),e._destroyRaphaelArray(e.majorMarks),e._unbindEvents(e.minorMarks),e._destroyRaphaelArray(e.minorMarks)},t.prototype._destroyRaphaelArray=function(e){if(!e)return;var t=e.length,n=0,r;for(;t&&n<t;n++)r=e[n],this._destroyRaphaelElement(r),e[n]=null;e=null},t.prototype._destroyRaphaelElement=function(e){var t;e&&e[0]&&(t=n(e.node),t.unbind().removeData(),e.wijRemove(),t.remove(),t=null,e=null)},t.prototype._drawMarksAndLabels=function(){var e=this;e.labels=[],e.majorMarks=[],e.minorMarks=[],e._paintMarks()},t.prototype._handleDisabledOption=function(e,t){var n=this;e?(n.disabledDiv||(n.disabledDiv=n._createDisabledDiv(t)),n.disabledDiv.appendTo("body")):n.disabledDiv&&(n.disabledDiv.remove(),n.disabledDiv=null)},t.prototype._createDisabledDiv=function(e){var t=this,r=t.options,i=e||t.element,s=i.offset(),o=r.width||i.outerWidth(),u=r.height||i.outerHeight(),a;return a=n("<div></div>").css({"z-index":"99999",position:"absolute",width:o,height:u,left:s.left,top:s.top}),Raphael.vml&&a.addClass(r.stateDisabled).css("background-color","#fff"),a},t.prototype._triggerPainted=function(){return this._trigger("painted")},t.prototype._draw=function(){var e=this,t=e.options;e.pointer=null,e._innerBbox={width:t.width-t.marginLeft-t.marginRight,height:t.height-t.marginTop-t.marginBottom,left:t.marginLeft,top:t.marginTop},e.face=e._paintFace(),e.ranges&&e._removeRanges(),e._paintRanges(),e._drawMarksAndLabels(),e._paintPointer(),e.pointer&&(e._setOffPointerValue(),e._setPointer()),n.wijraphael.clearRaphaelCache(),e._triggerPainted()},t.prototype.redraw=function(){var e=this,t=e.options;e._clearElements(),e._clearState(),e.canvas.clear(),e.canvas.setSize(t.width,t.height),e._draw()},t.prototype.destroy=function(){var t=this;t._unbindResizeEvent(),t._clearElements(),t.canvas.clear(),t.canvas=null,t._clearVariables(),t.element.removeClass("ui-widget").empty(),t.disabledDiv&&(t.disabledDiv.remove(),t.disabledDiv=null),e.prototype.destroy.call(this)},t.prototype._clearVariables=function(){var e=this;e._innerBbox=null,e.resizeTimer=null},t.prototype._clearElements=function(){var e=this;e._removeMarksAndLabels(),e._removeRanges(),e._removeFace(),e._removePointer()},t.prototype.getCanvas=function(){return this.canvas},t.prototype._percentage=function(){var e=this,t=e.options,n=t.max,r=t.min,i=t.value;return isNaN(i)?0:n===r?1:(i-r)/(n-r)},t.prototype._valueToLogical=function(e){var t=this,n=t.options,r=n.min,s=n.max,o=n.logarithmicBase,u,a;return e<r?0:s<e?1:(u=(e-r)/(s-r),n.islogarithmic?a=i.log(1+(o-1)*u,n.logarithmicBase):a=u,a)},t.prototype._logicalToValue=function(e){var t=this,n=t.options,r=n.max,i=n.min,s;if(e<0)return i;if(1<=e)return r;if(!n.islogarithmic)s=e;else{if(n.logarithmicBase<=1)return n.min;s=(Math.pow(n.logarithmicBase,e)-1)/(n.logarithmicBase-1)}return i+(r-i)*s},t.prototype._bindResizeEvent=function(){var e=this;e.options.autoResize&&e.element.on("resize."+e.widgetName,function(){clearTimeout(e.resizeTimer),e.resizeTimer=setTimeout(function(){e.redraw()},250)})},t.prototype._unbindResizeEvent=function(){this.element.off("resize."+this.widgetName)},t.prototype._bindClickEvents=function(e){var t=this;n.each(e,function(e,r){n(r.node).bind("click."+t.widgetName,function(e){t._trigger("click",e,{ele:r})})})},t.prototype._unbindEvents=function(e){var t=this;n.each(e,function(e,r){n(r.node).unbind("."+t.widgetName)})},t.prototype._setOffPointerValue=function(){},t.prototype._setPointer=function(){},t.prototype._paintPointer=function(){},t.prototype._paintFace=function(){},t.prototype._paintRanges=function(){var e=this,t=e.options,r=t.ranges||[];e.ranges=[],n.each(r,function(t,n){e._paintRange(n)})},t.prototype._paintRange=function(e){},t.prototype._removeRanges=function(){var e=this;e.ranges&&e._destroyRaphaelArray(e.ranges)},t.prototype._paintMarks=function(){var e=this,t=e.options,r=i.generateValues,s=r(t.min,t.max,t.tickMajor.interval),o=r(t.min,t.max,t.tickMinor.interval),u=t.labels,a=u.visible;t.tickMajor.visible&&n.each(s,function(n,r){e.majorMarks.push(e._paintMark(r,t.tickMajor,!0)),a&&e.labels.push(e._paintLabel(r,u))}),t.tickMinor.visible&&n.each(o,function(r,i){var o=!1;n.each(s,function(e,t){if(i===t)return o=!0,!1}),o||e.minorMarks.push(e._paintMark(i,t.tickMinor,!1))}),e._bindClickEvents(e.majorMarks),e._bindClickEvents(e.minorMarks),e._bindClickEvents(e.labels)},t.prototype._paintMark=function(e,t,n){},t.prototype._paintLabel=function(e,t){},t}(e.wijmoWidget);t.wijgauge=s;var o=function(){function e(){this.value=0,this.max=100,this.min=0,this.width=600,this.height=400,this.autoResize=!0,this.tickMajor={position:"inside",style:{fill:"#1E395B",stroke:"none"},factor:2,visible:!0,marker:"rect",offset:0,interval:10},this.tickMinor={position:"inside",style:{fill:"#1E395B",stroke:"none"},factor:1,visible:!1,marker:"rect",offset:0,interval:5},this.pointer={length:1,style:{fill:"#1E395B",stroke:"#1E395B"},width:8,offset:0,shape:"tri",visible:!0,template:null},this.islogarithmic=!1,this.logarithmicBase=10,this.labels={format:"",style:{fill:"#1E395B","font-size":12,"font-weight":"800"},visible:!0,offset:0},this.animation={enabled:!0,duration:2e3,easing:">"},this.face={style:{fill:"270-#FFFFFF-#D9E3F0",stroke:"#7BA0CC","stroke-width":4},template:null},this.marginTop=0,this.marginRight=0,this.marginBottom=0,this.marginLeft=0,this.ranges=[],this.isInverted=!1,this.beforeValueChanged=null,this.valueChanged=null,this.painted=null}return e}();s.prototype.options=n.extend({},e.wijmoWidget.prototype.options,new o)})(e.gauge||(e.gauge={}));var t=e.gauge})(wijmo||(wijmo={}));