webpackJsonp([16],{511:function(e,t){e.exports=function(e){function t(e){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",e)}try{"undefined"!=typeof execScript&&function(){return"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener}()?execScript(e):"undefined"!=typeof eval?eval.call(null,e):t("EvalError: No eval function available")}catch(e){t(e)}}},512:function(e,t,n){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(0),o=n.n(s),r=n(6),h=n.n(r),c=n(17),d=(n.n(c),Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),p=function(e){function t(e){return a(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return l(t,e),u(t,[{key:"componentWillMount",value:function(){}},{key:"genId",value:function(){if(this.props.name)return this.props.name;var e="jarviswidget-"+t.counter++;return e=e.toLowerCase().replace(/\W+/gm,"-"),e=location.pathname.substr(1).replace(/\//g,"-")+"--"+e}},{key:"render",value:function(){var e=this,t=this.props.color?"jarviswidget-color-"+this.props.color:"",n=h()("jarviswidget",t,{"jarviswidget-sortable":1==this.props.sortable}),a={};return this.widgetId=this.genId(),["colorbutton","editbutton","togglebutton","deletebutton","fullscreenbutton","custombutton","sortable"].forEach(function(t){e.props[t]||(a["data-widget-"+t]=!1)}),["hidden","collapsed"].forEach(function(t){e.props[t]&&(a["data-widget-"+t]=!0)}),["refresh","load"].forEach(function(t){e.props[t]&&(a["data-widget-"+t]=e.props[t])}),o.a.createElement("div",d({className:n,id:this.widgetId,ref:"widget"},a),this.props.children)}},{key:"componentDidMount",value:function(){$(this.refs[this.widgetId]).find(".widget-body").prepend("")}}]),t}(o.a.Component);p.counter=0,p.defaultProps={colorbutton:!1,editbutton:!1,togglebutton:!1,deletebutton:!1,fullscreenbutton:!1,custombutton:!1,collapsed:!1,sortable:!1,hidden:!1,color:!1,load:!1,refresh:!1};var g=p;t.a=g,p.Body=o.a.createClass({displayName:"Body",render:function(){var e=d({},this.props),t=e.children,n=e.props;return o.a.createElement("div",n,this.props.editbutton?o.a.createElement("div",{className:"jarviswidget-editbox"},o.a.createElement("input",{className:"form-control",type:"text"})):null,o.a.createElement("div",{className:"widget-body"},t))}});!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(p,"JarvisWidget","/home/this/WebstormProjects/trading-charts-demo/src/app/components/widgets/JarvisWidget.js"),__REACT_HOT_LOADER__.register(g,"default","/home/this/WebstormProjects/trading-charts-demo/src/app/components/widgets/JarvisWidget.js"))}()},513:function(e,t,n){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}n.d(t,"a",function(){return p});var s=n(519),o=(n.n(s),n(0)),r=n.n(o),h=n(17),c=(n.n(h),function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}()),d=function(e){function t(){return a(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),c(t,[{key:"barChart",value:function(e){var t=e.data("sparkline-bar-color")||e.css("color")||"#0000f0",n=e.data("sparkline-height")||"26px",a=e.data("sparkline-barwidth")||5,i=e.data("sparkline-barspacing")||2,l=e.data("sparkline-negbar-color")||"#A90329",s=e.data("sparkline-barstacked-color")||["#A90329","#0099c6","#98AA56","#da532c","#4490B1","#6E9461","#990099","#B4CAD3"];e.sparkline(this.props.values||"html",{barColor:t,type:"bar",height:n,barWidth:a,barSpacing:i,stackedBarColor:s,negBarColor:l,zeroAxis:"false",tooltipContainer:this.container})}},{key:"lineChart",value:function(e){var t=e.data("sparkline-height")||"20px",n=e.data("sparkline-width")||"90px",a=e.data("sparkline-line-color")||e.css("color")||"#0000f0",i=e.data("sparkline-line-width")||1,l=e.data("fill-color")||"#c0d0f0",s=e.data("sparkline-spot-color")||"#f08000",o=e.data("sparkline-minspot-color")||"#ed1c24",r=e.data("sparkline-maxspot-color")||"#f08000",h=e.data("sparkline-highlightspot-color")||"#50f050",c=e.data("sparkline-highlightline-color")||"f02020",d=e.data("sparkline-spotradius")||1.5,u=e.data("sparkline-min-y"),p=e.data("sparkline-max-y"),g=e.data("sparkline-min-x"),f=e.data("sparkline-max-x"),m=e.data("min-val"),v=e.data("max-val"),b=e.data("norm-color")||"#c0c0c0",y=e.data("draw-normal")||!1;e.sparkline(this.props.values||"html",{type:"line",width:n,height:t,lineWidth:i,lineColor:a,fillColor:l,spotColor:s,minSpotColor:o,maxSpotColor:r,highlightSpotColor:h,highlightLineColor:c,spotRadius:d,chartRangeMin:u,chartRangeMax:p,chartRangeMinX:g,chartRangeMaxX:f,normalRangeMin:m,normalRangeMax:v,normalRangeColor:b,drawNormalOnTop:y,tooltipContainer:this.container})}},{key:"pieChart",value:function(e){var t=e.data("sparkline-piecolor")||["#B4CAD3","#4490B1","#98AA56","#da532c","#6E9461","#0099c6","#990099","#717D8A"],n=e.data("sparkline-piesize")||90,a=e.data("border-color")||"#45494C",i=e.data("sparkline-offset")||0;e.sparkline(this.props.values||"html",{type:"pie",width:n,height:n,tooltipFormat:'<span style="color: {{color}}">&#9679;</span> ({{percent.1}}%)',sliceColors:t,borderWidth:1,offset:i,borderColor:a,tooltipContainer:this.container})}},{key:"boxChart",value:function(e){var t=e.data("sparkline-width")||"auto",n=e.data("sparkline-height")||"auto",a=e.data("sparkline-boxraw"),i=e.data("sparkline-targetval"),l=e.data("sparkline-min"),s=e.data("sparkline-max"),o=e.data("sparkline-showoutlier")||!0,r=e.data("sparkline-outlier-iqr")||1.5,h=e.data("sparkline-spotradius")||1.5,c=e.css("color")||"#000000",d=e.data("fill-color")||"#c0d0f0",u=e.data("sparkline-whis-color")||"#000000",p=e.data("sparkline-outline-color")||"#303030",g=e.data("sparkline-outlinefill-color")||"#f0f0f0",f=e.data("sparkline-outlinemedian-color")||"#f00000",m=e.data("sparkline-outlinetarget-color")||"#40a020";e.sparkline(this.props.values||"html",{type:"box",width:t,height:n,raw:a,target:i,minValue:l,maxValue:s,showOutliers:o,outlierIQR:r,spotRadius:h,boxLineColor:c,boxFillColor:d,whiskerColor:u,outlierLineColor:p,outlierFillColor:g,medianColor:f,targetColor:m,tooltipContainer:this.container})}},{key:"bulletChart",value:function(e){var t=e.data("sparkline-height")||"auto",n=e.data("sparkline-width")||2,a=e.data("sparkline-bullet-color")||"#ed1c24",i=e.data("sparkline-performance-color")||"#3030f0",l=e.data("sparkline-bulletrange-color")||["#d3dafe","#a8b6ff","#7f94ff"];e.sparkline(this.props.values||"html",{type:"bullet",height:t,targetWidth:n,targetColor:a,performanceColor:i,rangeColors:l,tooltipContainer:this.container})}},{key:"discreteChart",value:function(e){var t=e.data("sparkline-height")||26,n=e.data("sparkline-width")||50,a=e.css("color"),i=e.data("sparkline-line-height")||5,l=e.data("sparkline-threshold"),s=e.data("sparkline-threshold-color")||"#ed1c24";e.sparkline(this.props.values||"html",{type:"discrete",width:n,height:t,lineColor:a,lineHeight:i,thresholdValue:l,thresholdColor:s,tooltipContainer:this.container})}},{key:"tristaneChart",value:function(e){var t=e.data("sparkline-height")||26,n=e.data("sparkline-posbar-color")||"#60f060",a=e.data("sparkline-negbar-color")||"#f04040",i=e.data("sparkline-zerobar-color")||"#909090",l=e.data("sparkline-barwidth")||5,s=e.data("sparkline-barspacing")||2,o=e.data("sparkline-zeroaxis");e.sparkline(this.props.values||"html",{type:"tristate",height:t,posBarColor:n,negBarColor:a,zeroBarColor:i,barWidth:l,barSpacing:s,zeroAxis:o,tooltipContainer:this.container})}},{key:"compositeBarChart",value:function(e){var t=e.data("sparkline-height")||"20px",n=e.data("sparkline-width")||"100%",a=e.data("sparkline-barwidth")||3,i=e.data("sparkline-line-width")||1,l=e.data("sparkline-color-top")||"#ed1c24",s=e.data("sparkline-color-bottom")||"#333333";e.sparkline(e.data("sparkline-bar-val"),{type:"bar",width:n,height:t,barColor:s,barWidth:a,tooltipContainer:this.container}),e.sparkline(e.data("sparkline-line-val"),{width:n,height:t,lineColor:l,lineWidth:i,composite:!0,fillColor:!1,tooltipContainer:this.container})}},{key:"compositeLineChart",value:function(e){var t=e.data("sparkline-height"),n=e.data("sparkline-width"),a=e.data("sparkline-bar-val"),i=e.data("sparkline-bar-val-spots-top"),l=e.data("sparkline-bar-val-spots-bottom"),s=e.data("sparkline-line-width-top"),o=e.data("sparkline-line-width-bottom"),r=e.data("sparkline-color-top"),h=e.data("sparkline-color-bottom"),c=e.data("sparkline-spotradius-top"),d=e.data("sparkline-spotradius-bottom"),u=e.data("sparkline-spot-color"),p=e.data("sparkline-minspot-color-top"),g=e.data("sparkline-maxspot-color-top"),f=e.data("sparkline-minspot-color-bottom"),m=e.data("sparkline-maxspot-color-bottom"),v=e.data("sparkline-highlightspot-color-top"),b=e.data("sparkline-highlightline-color-top"),y=e.data("sparkline-highlightspot-color-bottom"),w=e.data("sparkline-highlightline-color-bottom"),E=e.data("sparkline-fillcolor-top"),x=e.data("sparkline-fillcolor-bottom");e.sparkline(a,{type:"line",spotRadius:c,spotColor:u,minSpotColor:p,maxSpotColor:g,highlightSpotColor:v,highlightLineColor:b,valueSpots:i,lineWidth:s,width:n,height:t,lineColor:r,fillColor:E,tooltipContainer:this.container}),e.sparkline(e.data("sparkline-line-val"),{type:"line",spotRadius:d,spotColor:u,minSpotColor:f,maxSpotColor:m,highlightSpotColor:y,highlightLineColor:w,valueSpots:l,lineWidth:o,width:n,height:t,lineColor:h,composite:!0,fillColor:x,tooltipContainer:this.container})}},{key:"drawElement",value:function(e){var t=$(e),n=t.data("sparkline-type")||"bar";"bar"==n&&this.barChart(t),"line"==n&&this.lineChart(t),"pie"==n&&this.pieChart(t),"box"==n&&this.boxChart(t),"bullet"==n&&this.bulletChart(t),"discrete"==n&&this.discreteChart(t),"tristate"==n&&this.tristaneChart(t),"compositebar"==n&&this.compositeBarChart(t),"compositeline"==n&&this.compositeLineChart(t)}},{key:"drawSparklines",value:function(){var e=this,t=n.i(h.findDOMNode)(this);if(this.props.values)this.drawElement(t);else{var a=$(t).find(".sparkline:not(:has(>canvas))");[].forEach.call(a,function(t){e.drawElement(t)})}}},{key:"componentDidUpdate",value:function(){this.drawSparklines()}},{key:"componentDidMount",value:function(){this.drawSparklines()}},{key:"render",value:function(){var e=this.props.className+(this.props.values?" sparkline":"");return r.a.createElement("div",{className:e},this.props.children)}}]),t}(r.a.Component),u=d;t.b=u;var p=function(e){function t(){return a(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),t}(d);!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(d,"SparklineContainer","/home/this/WebstormProjects/trading-charts-demo/src/app/components/graphs/inline/SparklineContainer.js"),__REACT_HOT_LOADER__.register(p,"Sparkline","/home/this/WebstormProjects/trading-charts-demo/src/app/components/graphs/inline/SparklineContainer.js"),__REACT_HOT_LOADER__.register(u,"default","/home/this/WebstormProjects/trading-charts-demo/src/app/components/graphs/inline/SparklineContainer.js"))}()},514:function(e,t,n){"use strict";function a(e,t){var n={};for(var a in e)t.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(0),r=n.n(o),h=n(513),c=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),d=function(e){function t(){var e,n,a,s;i(this,t);for(var o=arguments.length,r=Array(o),h=0;h<o;h++)r[h]=arguments[h];return n=a=l(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(r))),a.state={id:1,charts:[{id:1,values:[110,150,300,130,400,240,220,310,220,300,270,210]}]},a.handleAddChart=function(){var e;return(e=a).__handleAddChart__REACT_HOT_LOADER__.apply(e,arguments)},a.handleDeleteChart=function(){var e;return(e=a).__handleDeleteChart__REACT_HOT_LOADER__.apply(e,arguments)},s=n,l(a,s)}return s(t,e),c(t,[{key:"__handleDeleteChart__REACT_HOT_LOADER__",value:function(){return this.__handleDeleteChart__REACT_HOT_LOADER__.apply(this,arguments)}},{key:"__handleAddChart__REACT_HOT_LOADER__",value:function(){return this.__handleAddChart__REACT_HOT_LOADER__.apply(this,arguments)}},{key:"__handleAddChart__REACT_HOT_LOADER__",value:function(){var e=this.state.id,t=this.state.charts;e++;for(var n=[],a=0;a<10;a++)n.push(Math.floor(51*Math.random())+50);t.push({id:e,values:n}),this.setState({id:e,charts:t})}},{key:"__handleDeleteChart__REACT_HOT_LOADER__",value:function(e){var t=this.state.charts;this.setState({charts:t.filter(function(t){return t.id!==e})})}},{key:"render",value:function(){var e=this,t=this.state.charts,n=this.props,i=n.className;a(n,["className"]);return r.a.createElement("div",{className:"col-xs-12 col-sm-12 col-md-12 col-lg-12"},r.a.createElement("button",{className:"btn btn-default btn-xs",onClick:this.handleAddChart},r.a.createElement("i",{className:"fa fa-plus"})," chart"),r.a.createElement("ul",{id:"sparks",className:i,style:{textAlign:"left"}},t.map(function(t,n){return r.a.createElement("li",{key:n,className:"sparks-info"},r.a.createElement("div",{style:{textAlign:"center"}},"value ",t.id," ",r.a.createElement("button",{value:t.id,className:"btn btn-danger btn-xs",onClick:e.handleDeleteChart.bind(e,t.id)},r.a.createElement("i",{className:"fa fa-minus"}))),r.a.createElement(h.a,{className:"custom-sparkline txt-color-blue",values:t.values}))})))}}]),t}(r.a.Component),u=d;t.a=u;!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(d,"Stats","/home/this/WebstormProjects/trading-charts-demo/src/app/components/common/Stats.js"),__REACT_HOT_LOADER__.register(u,"default","/home/this/WebstormProjects/trading-charts-demo/src/app/components/common/Stats.js"))}()},515:function(e,t,n){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(0),o=n.n(s),r=n(70),h=n.n(r),c=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),d=function(e){function t(e){a(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={items:n.props.items||[],icon:n.props.icon||"fa fa-fw fa-home"},n}return l(t,e),c(t,[{key:"componentWillMount",value:function(){}},{key:"onNavigationChange",value:function(e){var t=e.item;t.route&&(this.state.items=[],this.state.icon="",this._addCrumb(t),this.forceUpdate())}},{key:"_addCrumb",value:function(e){this.state.items.unshift(e.title),!this.state.icon&&e.icon&&(this.state.icon=e.icon),e.parent&&this._addCrumb(e.parent)}},{key:"render",value:function(){var e=h.a.head(this.state.items);return o.a.createElement("div",{className:this.props.className+" big-breadcrumbs"},o.a.createElement("h1",{className:"page-title txt-color-blueDark"},o.a.createElement("i",{className:this.state.icon})," "+e,h.a.tail(this.state.items).map(function(e){return o.a.createElement("span",{key:h.a.uniqueId("big-breadcrumb-")},o.a.createElement("span",{className:"page-title-separator"},">"),e)})))}}]),t}(o.a.Component),u=d;t.a=u;!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(d,"BigBreadcrumbs","/home/this/WebstormProjects/trading-charts-demo/src/app/components/navigation/components/BigBreadcrumbs.js"),__REACT_HOT_LOADER__.register(u,"default","/home/this/WebstormProjects/trading-charts-demo/src/app/components/navigation/components/BigBreadcrumbs.js"))}()},516:function(e,t,n){"use strict";var a={grid:"article",widgets:".jarviswidget",localStorage:!0,deleteSettingsKey:"#deletesettingskey-options",settingsKeyLabel:"Reset settings?",deletePositionKey:"#deletepositionkey-options",positionKeyLabel:"Reset position?",sortable:!0,buttonsHidden:!1,toggleButton:!0,toggleClass:"fa fa-minus | fa fa-plus",toggleSpeed:200,onToggle:function(){},deleteButton:!0,deleteMsg:"Warning: This action cannot be undone!",deleteClass:"fa fa-times",deleteSpeed:200,onDelete:function(){},editButton:!0,editPlaceholder:".jarviswidget-editbox",editClass:"fa fa-cog | fa fa-save",editSpeed:200,onEdit:function(){},colorButton:!0,fullscreenButton:!0,fullscreenClass:"fa fa-expand | fa fa-compress",fullscreenDiff:3,onFullscreen:function(){},customButton:!1,customClass:"folder-10 | next-10",customStart:function(){alert("Hello you, this is a custom button...")},customEnd:function(){alert("bye, till next time...")},buttonOrder:"%refresh% %custom% %edit% %toggle% %fullscreen% %delete%",opacity:1,dragHandle:"> header",placeholderClass:"jarviswidget-placeholder",indicator:!0,indicatorTime:600,ajax:!0,timestampPlaceholder:".jarviswidget-timestamp",timestampFormat:"Last update: %m%/%d%/%y% %h%:%i%:%s%",refreshButton:!0,refreshButtonClass:"fa fa-refresh",labelError:"Sorry but there was a error:",labelUpdated:"Last Update:",labelRefresh:"Refresh",labelDelete:"Delete widget:",afterLoad:function(){},rtl:!1,onChange:function(){},onSave:function(){},ajaxnav:!0};t.a=a;!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(a,"default","/home/this/WebstormProjects/trading-charts-demo/src/app/components/widgets/WidgetDefaults.js")}()},517:function(e,t,n){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(520),o=(n.n(s),n(0)),r=n.n(o),h=n(516),c=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),d=function(e){function t(){return a(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),c(t,[{key:"render",value:function(){var e=this;return r.a.createElement("section",{id:"widget-grid",ref:function(t){return e.grid=t}},this.props.children)}},{key:"componentDidMount",value:function(){$(this.grid).jarvisWidgets(h.a)}}]),t}(r.a.Component),u=d;t.a=u;!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(d,"WidgetGrid","/home/this/WebstormProjects/trading-charts-demo/src/app/components/widgets/WidgetGrid.js"),__REACT_HOT_LOADER__.register(u,"default","/home/this/WebstormProjects/trading-charts-demo/src/app/components/widgets/WidgetGrid.js"))}()},518:function(e,t){e.exports="/**\n*\n* jquery.sparkline.js\n*\n* v@VERSION@\n* (c) Splunk, Inc\n* Contact: Gareth Watts (gareth@splunk.com)\n* http://omnipotent.net/jquery.sparkline/\n*\n* Generates inline sparkline charts from data supplied either to the method\n* or inline in HTML\n*\n* Compatible with Internet Explorer 6.0+ and modern browsers equipped with the canvas tag\n* (Firefox 2.0+, Safari, Opera, etc)\n*\n* License: New BSD License\n*\n* Copyright (c) 2012, Splunk Inc.\n* All rights reserved.\n*\n* Redistribution and use in source and binary forms, with or without modification,\n* are permitted provided that the following conditions are met:\n*\n*     * Redistributions of source code must retain the above copyright notice,\n*       this list of conditions and the following disclaimer.\n*     * Redistributions in binary form must reproduce the above copyright notice,\n*       this list of conditions and the following disclaimer in the documentation\n*       and/or other materials provided with the distribution.\n*     * Neither the name of Splunk Inc nor the names of its contributors may\n*       be used to endorse or promote products derived from this software without\n*       specific prior written permission.\n*\n* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY\n* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT\n* SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT\n* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*\n*\n* Usage:\n*  $(selector).sparkline(values, options)\n*\n* If values is undefined or set to 'html' then the data values are read from the specified tag:\n*   <p>Sparkline: <span class=\"sparkline\">1,4,6,6,8,5,3,5</span></p>\n*   $('.sparkline').sparkline();\n* There must be no spaces in the enclosed data set\n*\n* Otherwise values must be an array of numbers or null values\n*    <p>Sparkline: <span id=\"sparkline1\">This text replaced if the browser is compatible</span></p>\n*    $('#sparkline1').sparkline([1,4,6,6,8,5,3,5])\n*    $('#sparkline2').sparkline([1,4,6,null,null,5,3,5])\n*\n* Values can also be specified in an HTML comment, or as a values attribute:\n*    <p>Sparkline: <span class=\"sparkline\">\x3c!--1,4,6,6,8,5,3,5 --\x3e</span></p>\n*    <p>Sparkline: <span class=\"sparkline\" values=\"1,4,6,6,8,5,3,5\"></span></p>\n*    $('.sparkline').sparkline();\n*\n* For line charts, x values can also be specified:\n*   <p>Sparkline: <span class=\"sparkline\">1:1,2.7:4,3.4:6,5:6,6:8,8.7:5,9:3,10:5</span></p>\n*    $('#sparkline1').sparkline([ [1,1], [2.7,4], [3.4,6], [5,6], [6,8], [8.7,5], [9,3], [10,5] ])\n*\n* By default, options should be passed in as the second argument to the sparkline function:\n*   $('.sparkline').sparkline([1,2,3,4], {type: 'bar'})\n*\n* Options can also be set by passing them on the tag itself.  This feature is disabled by default though\n* as there's a slight performance overhead:\n*   $('.sparkline').sparkline([1,2,3,4], {enableTagOptions: true})\n*   <p>Sparkline: <span class=\"sparkline\" sparkType=\"bar\" sparkBarColor=\"red\">loading</span></p>\n* Prefix all options supplied as tag attribute with \"spark\" (configurable by setting tagOptionsPrefix)\n*\n* Supported options:\n*   lineColor - Color of the line used for the chart\n*   fillColor - Color used to fill in the chart - Set to '' or false for a transparent chart\n*   width - Width of the chart - Defaults to 3 times the number of values in pixels\n*   height - Height of the chart - Defaults to the height of the containing element\n*   chartRangeMin - Specify the minimum value to use for the Y range of the chart - Defaults to the minimum value supplied\n*   chartRangeMax - Specify the maximum value to use for the Y range of the chart - Defaults to the maximum value supplied\n*   chartRangeClip - Clip out of range values to the max/min specified by chartRangeMin and chartRangeMax\n*   chartRangeMinX - Specify the minimum value to use for the X range of the chart - Defaults to the minimum value supplied\n*   chartRangeMaxX - Specify the maximum value to use for the X range of the chart - Defaults to the maximum value supplied\n*   composite - If true then don't erase any existing chart attached to the tag, but draw\n*           another chart over the top - Note that width and height are ignored if an\n*           existing chart is detected.\n*   tagValuesAttribute - Name of tag attribute to check for data values - Defaults to 'values'\n*   enableTagOptions - Whether to check tags for sparkline options\n*   tagOptionsPrefix - Prefix used for options supplied as tag attributes - Defaults to 'spark'\n*   disableHiddenCheck - If set to true, then the plugin will assume that charts will never be drawn into a\n*           hidden dom element, avoding a browser reflow\n*   disableInteraction - If set to true then all mouseover/click interaction behaviour will be disabled,\n*       making the plugin perform much like it did in 1.x\n*   disableTooltips - If set to true then tooltips will be disabled - Defaults to false (tooltips enabled)\n*   disableHighlight - If set to true then highlighting of selected chart elements on mouseover will be disabled\n*       defaults to false (highlights enabled)\n*   highlightLighten - Factor to lighten/darken highlighted chart values by - Defaults to 1.4 for a 40% increase\n*   tooltipContainer - Specify which DOM element the tooltip should be rendered into - defaults to document.body\n*   tooltipClassname - Optional CSS classname to apply to tooltips - If not specified then a default style will be applied\n*   tooltipOffsetX - How many pixels away from the mouse pointer to render the tooltip on the X axis\n*   tooltipOffsetY - How many pixels away from the mouse pointer to render the tooltip on the r axis\n*   tooltipFormatter  - Optional callback that allows you to override the HTML displayed in the tooltip\n*       callback is given arguments of (sparkline, options, fields)\n*   tooltipChartTitle - If specified then the tooltip uses the string specified by this setting as a title\n*   tooltipFormat - A format string or SPFormat object  (or an array thereof for multiple entries)\n*       to control the format of the tooltip\n*   tooltipPrefix - A string to prepend to each field displayed in a tooltip\n*   tooltipSuffix - A string to append to each field displayed in a tooltip\n*   tooltipSkipNull - If true then null values will not have a tooltip displayed (defaults to true)\n*   tooltipValueLookups - An object or range map to map field values to tooltip strings\n*       (eg. to map -1 to \"Lost\", 0 to \"Draw\", and 1 to \"Win\")\n*   numberFormatter - Optional callback for formatting numbers in tooltips\n*   numberDigitGroupSep - Character to use for group separator in numbers \"1,234\" - Defaults to \",\"\n*   numberDecimalMark - Character to use for the decimal point when formatting numbers - Defaults to \".\"\n*   numberDigitGroupCount - Number of digits between group separator - Defaults to 3\n*\n* There are 7 types of sparkline, selected by supplying a \"type\" option of 'line' (default),\n* 'bar', 'tristate', 'bullet', 'discrete', 'pie' or 'box'\n*    line - Line chart.  Options:\n*       spotColor - Set to '' to not end each line in a circular spot\n*       minSpotColor - If set, color of spot at minimum value\n*       maxSpotColor - If set, color of spot at maximum value\n*       spotRadius - Radius in pixels\n*       lineWidth - Width of line in pixels\n*       normalRangeMin\n*       normalRangeMax - If set draws a filled horizontal bar between these two values marking the \"normal\"\n*                      or expected range of values\n*       normalRangeColor - Color to use for the above bar\n*       drawNormalOnTop - Draw the normal range above the chart fill color if true\n*       defaultPixelsPerValue - Defaults to 3 pixels of width for each value in the chart\n*       highlightSpotColor - The color to use for drawing a highlight spot on mouseover - Set to null to disable\n*       highlightLineColor - The color to use for drawing a highlight line on mouseover - Set to null to disable\n*       valueSpots - Specify which points to draw spots on, and in which color.  Accepts a range map\n*\n*   bar - Bar chart.  Options:\n*       barColor - Color of bars for postive values\n*       negBarColor - Color of bars for negative values\n*       zeroColor - Color of bars with zero values\n*       nullColor - Color of bars with null values - Defaults to omitting the bar entirely\n*       barWidth - Width of bars in pixels\n*       colorMap - Optional mappnig of values to colors to override the *BarColor values above\n*                  can be an Array of values to control the color of individual bars or a range map\n*                  to specify colors for individual ranges of values\n*       barSpacing - Gap between bars in pixels\n*       zeroAxis - Centers the y-axis around zero if true\n*\n*   tristate - Charts values of win (>0), lose (<0) or draw (=0)\n*       posBarColor - Color of win values\n*       negBarColor - Color of lose values\n*       zeroBarColor - Color of draw values\n*       barWidth - Width of bars in pixels\n*       barSpacing - Gap between bars in pixels\n*       colorMap - Optional mappnig of values to colors to override the *BarColor values above\n*                  can be an Array of values to control the color of individual bars or a range map\n*                  to specify colors for individual ranges of values\n*\n*   discrete - Options:\n*       lineHeight - Height of each line in pixels - Defaults to 30% of the graph height\n*       thesholdValue - Values less than this value will be drawn using thresholdColor instead of lineColor\n*       thresholdColor\n*\n*   bullet - Values for bullet graphs msut be in the order: target, performance, range1, range2, range3, ...\n*       options:\n*       targetColor - The color of the vertical target marker\n*       targetWidth - The width of the target marker in pixels\n*       performanceColor - The color of the performance measure horizontal bar\n*       rangeColors - Colors to use for each qualitative range background color\n*\n*   pie - Pie chart. Options:\n*       sliceColors - An array of colors to use for pie slices\n*       offset - Angle in degrees to offset the first slice - Try -90 or +90\n*       borderWidth - Width of border to draw around the pie chart, in pixels - Defaults to 0 (no border)\n*       borderColor - Color to use for the pie chart border - Defaults to #000\n*\n*   box - Box plot. Options:\n*       raw - Set to true to supply pre-computed plot points as values\n*             values should be: low_outlier, low_whisker, q1, median, q3, high_whisker, high_outlier\n*             When set to false you can supply any number of values and the box plot will\n*             be computed for you.  Default is false.\n*       showOutliers - Set to true (default) to display outliers as circles\n*       outlierIQR - Interquartile range used to determine outliers.  Default 1.5\n*       boxLineColor - Outline color of the box\n*       boxFillColor - Fill color for the box\n*       whiskerColor - Line color used for whiskers\n*       outlierLineColor - Outline color of outlier circles\n*       outlierFillColor - Fill color of the outlier circles\n*       spotRadius - Radius of outlier circles\n*       medianColor - Line color of the median line\n*       target - Draw a target cross hair at the supplied value (default undefined)\n*\n*\n*\n*   Examples:\n*   $('#sparkline1').sparkline(myvalues, { lineColor: '#f00', fillColor: false });\n*   $('.barsparks').sparkline('html', { type:'bar', height:'40px', barWidth:5 });\n*   $('#tristate').sparkline([1,1,-1,1,0,0,-1], { type:'tristate' }):\n*   $('#discrete').sparkline([1,3,4,5,5,3,4,5], { type:'discrete' });\n*   $('#bullet').sparkline([10,12,12,9,7], { type:'bullet' });\n*   $('#pie').sparkline([1,1,2], { type:'pie' });\n*/\n\n/*jslint regexp: true, browser: true, jquery: true, white: true, nomen: false, plusplus: false, maxerr: 500, indent: 4 */\n\n(function(document, Math, undefined) { // performance/minified-size optimization\n(function(factory) {\n    if(typeof define === 'function' && define.amd) {\n        define(['jquery'], factory);\n    } else if (jQuery && !jQuery.fn.sparkline) {\n        factory(jQuery);\n    }\n}\n(function($) {\n    'use strict';\n\n    var UNSET_OPTION = {},\n        getDefaults, createClass, SPFormat, clipval, quartile, normalizeValue, normalizeValues,\n        remove, isNumber, all, sum, addCSS, ensureArray, formatNumber, RangeMap,\n        MouseHandler, Tooltip, barHighlightMixin,\n        line, bar, tristate, discrete, bullet, pie, box, defaultStyles, initStyles,\n        VShape, VCanvas_base, VCanvas_canvas, VCanvas_vml, pending, shapeCount = 0;\n\n\n    /**\n     * Default configuration settings\n     */\n    getDefaults = function () {\n        return {\n            // Settings common to most/all chart types\n            common: {\n                type: 'line',\n                lineColor: '#00f',\n                fillColor: '#cdf',\n                defaultPixelsPerValue: 3,\n                width: 'auto',\n                height: 'auto',\n                composite: false,\n                tagValuesAttribute: 'values',\n                tagOptionsPrefix: 'spark',\n                enableTagOptions: false,\n                enableHighlight: true,\n                highlightLighten: 1.4,\n                tooltipSkipNull: true,\n                tooltipPrefix: '',\n                tooltipSuffix: '',\n                disableHiddenCheck: false,\n                numberFormatter: false,\n                numberDigitGroupCount: 3,\n                numberDigitGroupSep: ',',\n                numberDecimalMark: '.',\n                disableTooltips: false,\n                disableInteraction: false\n            },\n            // Defaults for line charts\n            line: {\n                spotColor: '#f80',\n                highlightSpotColor: '#5f5',\n                highlightLineColor: '#f22',\n                spotRadius: 1.5,\n                minSpotColor: '#f80',\n                maxSpotColor: '#f80',\n                lineWidth: 1,\n                normalRangeMin: undefined,\n                normalRangeMax: undefined,\n                normalRangeColor: '#ccc',\n                drawNormalOnTop: false,\n                chartRangeMin: undefined,\n                chartRangeMax: undefined,\n                chartRangeMinX: undefined,\n                chartRangeMaxX: undefined,\n                tooltipFormat: new SPFormat('<span style=\"color: {{color}}\">&#9679;</span> {{prefix}}{{y}}{{suffix}}')\n            },\n            // Defaults for bar charts\n            bar: {\n                barColor: '#3366cc',\n                negBarColor: '#f44',\n                stackedBarColor: ['#3366cc', '#dc3912', '#ff9900', '#109618', '#66aa00',\n                    '#dd4477', '#0099c6', '#990099'],\n                zeroColor: undefined,\n                nullColor: undefined,\n                zeroAxis: true,\n                barWidth: 4,\n                barSpacing: 1,\n                chartRangeMax: undefined,\n                chartRangeMin: undefined,\n                chartRangeClip: false,\n                colorMap: undefined,\n                tooltipFormat: new SPFormat('<span style=\"color: {{color}}\">&#9679;</span> {{prefix}}{{value}}{{suffix}}')\n            },\n            // Defaults for tristate charts\n            tristate: {\n                barWidth: 4,\n                barSpacing: 1,\n                posBarColor: '#6f6',\n                negBarColor: '#f44',\n                zeroBarColor: '#999',\n                colorMap: {},\n                tooltipFormat: new SPFormat('<span style=\"color: {{color}}\">&#9679;</span> {{value:map}}'),\n                tooltipValueLookups: { map: { '-1': 'Loss', '0': 'Draw', '1': 'Win' } }\n            },\n            // Defaults for discrete charts\n            discrete: {\n                lineHeight: 'auto',\n                thresholdColor: undefined,\n                thresholdValue: 0,\n                chartRangeMax: undefined,\n                chartRangeMin: undefined,\n                chartRangeClip: false,\n                tooltipFormat: new SPFormat('{{prefix}}{{value}}{{suffix}}')\n            },\n            // Defaults for bullet charts\n            bullet: {\n                targetColor: '#f33',\n                targetWidth: 3, // width of the target bar in pixels\n                performanceColor: '#33f',\n                rangeColors: ['#d3dafe', '#a8b6ff', '#7f94ff'],\n                base: undefined, // set this to a number to change the base start number\n                tooltipFormat: new SPFormat('{{fieldkey:fields}} - {{value}}'),\n                tooltipValueLookups: { fields: {r: 'Range', p: 'Performance', t: 'Target'} }\n            },\n            // Defaults for pie charts\n            pie: {\n                offset: 0,\n                sliceColors: ['#3366cc', '#dc3912', '#ff9900', '#109618', '#66aa00',\n                    '#dd4477', '#0099c6', '#990099'],\n                borderWidth: 0,\n                borderColor: '#000',\n                tooltipFormat: new SPFormat('<span style=\"color: {{color}}\">&#9679;</span> {{value}} ({{percent.1}}%)')\n            },\n            // Defaults for box plots\n            box: {\n                raw: false,\n                boxLineColor: '#000',\n                boxFillColor: '#cdf',\n                whiskerColor: '#000',\n                outlierLineColor: '#333',\n                outlierFillColor: '#fff',\n                medianColor: '#f00',\n                showOutliers: true,\n                outlierIQR: 1.5,\n                spotRadius: 1.5,\n                target: undefined,\n                targetColor: '#4a2',\n                chartRangeMax: undefined,\n                chartRangeMin: undefined,\n                tooltipFormat: new SPFormat('{{field:fields}}: {{value}}'),\n                tooltipFormatFieldlistKey: 'field',\n                tooltipValueLookups: { fields: { lq: 'Lower Quartile', med: 'Median',\n                    uq: 'Upper Quartile', lo: 'Left Outlier', ro: 'Right Outlier',\n                    lw: 'Left Whisker', rw: 'Right Whisker'} }\n            }\n        };\n    };\n\n    // You can have tooltips use a css class other than jqstooltip by specifying tooltipClassname\n    defaultStyles = '.jqstooltip { ' +\n            'position: absolute;' +\n            'left: 0px;' +\n            'top: 0px;' +\n            'visibility: hidden;' +\n            'background: rgb(0, 0, 0) transparent;' +\n            'background-color: rgba(0,0,0,0.6);' +\n            'filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);' +\n            '-ms-filter: \"progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)\";' +\n            'color: white;' +\n            'font: 10px arial, san serif;' +\n            'text-align: left;' +\n            'white-space: nowrap;' +\n            'padding: 5px;' +\n            'border: 1px solid white;' +\n            'box-sizing: content-box;' +\n            'z-index: 10000;' +\n            '}' +\n            '.jqsfield { ' +\n            'color: white;' +\n            'font: 10px arial, san serif;' +\n            'text-align: left;' +\n            '}';\n\n\n    /**\n     * Utilities\n     */\n\n    createClass = function (/* [baseclass, [mixin, ...]], definition */) {\n        var Class, args;\n        Class = function () {\n            this.init.apply(this, arguments);\n        };\n        if (arguments.length > 1) {\n            if (arguments[0]) {\n                Class.prototype = $.extend(new arguments[0](), arguments[arguments.length - 1]);\n                Class._super = arguments[0].prototype;\n            } else {\n                Class.prototype = arguments[arguments.length - 1];\n            }\n            if (arguments.length > 2) {\n                args = Array.prototype.slice.call(arguments, 1, -1);\n                args.unshift(Class.prototype);\n                $.extend.apply($, args);\n            }\n        } else {\n            Class.prototype = arguments[0];\n        }\n        Class.prototype.cls = Class;\n        return Class;\n    };\n\n    /**\n     * Wraps a format string for tooltips\n     * {{x}}\n     * {{x.2}\n     * {{x:months}}\n     */\n    $.SPFormatClass = SPFormat = createClass({\n        fre: /\\{\\{([\\w.]+?)(:(.+?))?\\}\\}/g,\n        precre: /(\\w+)\\.(\\d+)/,\n\n        init: function (format, fclass) {\n            this.format = format;\n            this.fclass = fclass;\n        },\n\n        render: function (fieldset, lookups, options) {\n            var self = this,\n                fields = fieldset,\n                match, token, lookupkey, fieldvalue, prec;\n            return this.format.replace(this.fre, function () {\n                var lookup;\n                token = arguments[1];\n                lookupkey = arguments[3];\n                match = self.precre.exec(token);\n                if (match) {\n                    prec = match[2];\n                    token = match[1];\n                } else {\n                    prec = false;\n                }\n                fieldvalue = fields[token];\n                if (fieldvalue === undefined) {\n                    return '';\n                }\n                if (lookupkey && lookups && lookups[lookupkey]) {\n                    lookup = lookups[lookupkey];\n                    if (lookup.get) { // RangeMap\n                        return lookups[lookupkey].get(fieldvalue) || fieldvalue;\n                    } else {\n                        return lookups[lookupkey][fieldvalue] || fieldvalue;\n                    }\n                }\n                if (isNumber(fieldvalue)) {\n                    if (options.get('numberFormatter')) {\n                        fieldvalue = options.get('numberFormatter')(fieldvalue);\n                    } else {\n                        fieldvalue = formatNumber(fieldvalue, prec,\n                            options.get('numberDigitGroupCount'),\n                            options.get('numberDigitGroupSep'),\n                            options.get('numberDecimalMark'));\n                    }\n                }\n                return fieldvalue;\n            });\n        }\n    });\n\n    // convience method to avoid needing the new operator\n    $.spformat = function(format, fclass) {\n        return new SPFormat(format, fclass);\n    };\n\n    clipval = function (val, min, max) {\n        if (val < min) {\n            return min;\n        }\n        if (val > max) {\n            return max;\n        }\n        return val;\n    };\n\n    quartile = function (values, q) {\n        var vl;\n        if (q === 2) {\n            vl = Math.floor(values.length / 2);\n            return values.length % 2 ? values[vl] : (values[vl-1] + values[vl]) / 2;\n        } else {\n            if (values.length % 2 ) { // odd\n                vl = (values.length * q + q) / 4;\n                return vl % 1 ? (values[Math.floor(vl)] + values[Math.floor(vl) - 1]) / 2 : values[vl-1];\n            } else { //even\n                vl = (values.length * q + 2) / 4;\n                return vl % 1 ? (values[Math.floor(vl)] + values[Math.floor(vl) - 1]) / 2 :  values[vl-1];\n\n            }\n        }\n    };\n\n    normalizeValue = function (val) {\n        var nf;\n        switch (val) {\n            case 'undefined':\n                val = undefined;\n                break;\n            case 'null':\n                val = null;\n                break;\n            case 'true':\n                val = true;\n                break;\n            case 'false':\n                val = false;\n                break;\n            default:\n                nf = parseFloat(val);\n                if (val == nf) {\n                    val = nf;\n                }\n        }\n        return val;\n    };\n\n    normalizeValues = function (vals) {\n        var i, result = [];\n        for (i = vals.length; i--;) {\n            result[i] = normalizeValue(vals[i]);\n        }\n        return result;\n    };\n\n    remove = function (vals, filter) {\n        var i, vl, result = [];\n        for (i = 0, vl = vals.length; i < vl; i++) {\n            if (vals[i] !== filter) {\n                result.push(vals[i]);\n            }\n        }\n        return result;\n    };\n\n    isNumber = function (num) {\n        return !isNaN(parseFloat(num)) && isFinite(num);\n    };\n\n    formatNumber = function (num, prec, groupsize, groupsep, decsep) {\n        var p, i;\n        num = (prec === false ? parseFloat(num).toString() : num.toFixed(prec)).split('');\n        p = (p = $.inArray('.', num)) < 0 ? num.length : p;\n        if (p < num.length) {\n            num[p] = decsep;\n        }\n        for (i = p - groupsize; i > 0; i -= groupsize) {\n            num.splice(i, 0, groupsep);\n        }\n        return num.join('');\n    };\n\n    // determine if all values of an array match a value\n    // returns true if the array is empty\n    all = function (val, arr, ignoreNull) {\n        var i;\n        for (i = arr.length; i--; ) {\n            if (ignoreNull && arr[i] === null) continue;\n            if (arr[i] !== val) {\n                return false;\n            }\n        }\n        return true;\n    };\n\n    // sums the numeric values in an array, ignoring other values\n    sum = function (vals) {\n        var total = 0, i;\n        for (i = vals.length; i--;) {\n            total += typeof vals[i] === 'number' ? vals[i] : 0;\n        }\n        return total;\n    };\n\n    ensureArray = function (val) {\n        return $.isArray(val) ? val : [val];\n    };\n\n    // http://paulirish.com/2008/bookmarklet-inject-new-css-rules/\n    addCSS = function(css) {\n        var tag, iefail;\n        if (document.createStyleSheet) {\n            try {\n                document.createStyleSheet().cssText = css;\n                return;\n            } catch (e) {\n                // IE <= 9 maxes out at 31 stylesheets; inject into page instead.\n                iefail = true;\n            }\n        }\n        tag = document.createElement('style');\n        tag.type = 'text/css';\n        document.getElementsByTagName('head')[0].appendChild(tag);\n        if (iefail) {\n            document.styleSheets[document.styleSheets.length - 1].cssText = css;\n        } else {\n            tag[(typeof document.body.style.WebkitAppearance == 'string') /* webkit only */ ? 'innerText' : 'innerHTML'] = css;\n        }\n    };\n\n\n    // Provide a cross-browser interface to a few simple drawing primitives\n    $.fn.simpledraw = function (width, height, useExisting, interact) {\n        var target, mhandler;\n        if (useExisting && (target = this.data('_jqs_vcanvas'))) {\n            return target;\n        }\n\n        if ($.fn.sparkline.canvas === false) {\n            // We've already determined that neither Canvas nor VML are available\n            return false;\n\n        } else if ($.fn.sparkline.canvas === undefined) {\n            // No function defined yet -- need to see if we support Canvas or VML\n            var el = document.createElement('canvas');\n            if (!!(el.getContext && el.getContext('2d'))) {\n                // Canvas is available\n                $.fn.sparkline.canvas = function(width, height, target, interact) {\n                    return new VCanvas_canvas(width, height, target, interact);\n                };\n            } else if (document.namespaces && !document.namespaces.v) {\n                // VML is available\n                document.namespaces.add('v', 'urn:schemas-microsoft-com:vml', '#default#VML');\n                $.fn.sparkline.canvas = function(width, height, target, interact) {\n                    return new VCanvas_vml(width, height, target);\n                };\n            } else {\n                // Neither Canvas nor VML are available\n                $.fn.sparkline.canvas = false;\n                return false;\n            }\n        }\n\n        if (width === undefined) {\n            width = $(this).innerWidth();\n        }\n        if (height === undefined) {\n            height = $(this).innerHeight();\n        }\n\n        target = $.fn.sparkline.canvas(width, height, this, interact);\n\n        mhandler = $(this).data('_jqs_mhandler');\n        if (mhandler) {\n            mhandler.registerCanvas(target);\n        }\n        return target;\n    };\n\n    $.fn.cleardraw = function () {\n        var target = this.data('_jqs_vcanvas');\n        if (target) {\n            target.reset();\n        }\n    };\n\n\n    $.RangeMapClass = RangeMap = createClass({\n        init: function (map) {\n            var key, range, rangelist = [];\n            for (key in map) {\n                if (map.hasOwnProperty(key) && typeof key === 'string' && key.indexOf(':') > -1) {\n                    range = key.split(':');\n                    range[0] = range[0].length === 0 ? -Infinity : parseFloat(range[0]);\n                    range[1] = range[1].length === 0 ? Infinity : parseFloat(range[1]);\n                    range[2] = map[key];\n                    rangelist.push(range);\n                }\n            }\n            this.map = map;\n            this.rangelist = rangelist || false;\n        },\n\n        get: function (value) {\n            var rangelist = this.rangelist,\n                i, range, result;\n            if ((result = this.map[value]) !== undefined) {\n                return result;\n            }\n            if (rangelist) {\n                for (i = rangelist.length; i--;) {\n                    range = rangelist[i];\n                    if (range[0] <= value && range[1] >= value) {\n                        return range[2];\n                    }\n                }\n            }\n            return undefined;\n        }\n    });\n\n    // Convenience function\n    $.range_map = function(map) {\n        return new RangeMap(map);\n    };\n\n\n    MouseHandler = createClass({\n        init: function (el, options) {\n            var $el = $(el);\n            this.$el = $el;\n            this.options = options;\n            this.currentPageX = 0;\n            this.currentPageY = 0;\n            this.el = el;\n            this.splist = [];\n            this.tooltip = null;\n            this.over = false;\n            this.displayTooltips = !options.get('disableTooltips');\n            this.highlightEnabled = !options.get('disableHighlight');\n        },\n\n        registerSparkline: function (sp) {\n            this.splist.push(sp);\n            if (this.over) {\n                this.updateDisplay();\n            }\n        },\n\n        registerCanvas: function (canvas) {\n            var $canvas = $(canvas.canvas);\n            this.canvas = canvas;\n            this.$canvas = $canvas;\n            $canvas.mouseenter($.proxy(this.mouseenter, this));\n            $canvas.mouseleave($.proxy(this.mouseleave, this));\n            $canvas.click($.proxy(this.mouseclick, this));\n        },\n\n        reset: function (removeTooltip) {\n            this.splist = [];\n            if (this.tooltip && removeTooltip) {\n                this.tooltip.remove();\n                this.tooltip = undefined;\n            }\n        },\n\n        mouseclick: function (e) {\n            var clickEvent = $.Event('sparklineClick');\n            clickEvent.originalEvent = e;\n            clickEvent.sparklines = this.splist;\n            this.$el.trigger(clickEvent);\n        },\n\n        mouseenter: function (e) {\n            $(document.body).unbind('mousemove.jqs');\n            $(document.body).bind('mousemove.jqs', $.proxy(this.mousemove, this));\n            this.over = true;\n            this.currentPageX = e.pageX;\n            this.currentPageY = e.pageY;\n            this.currentEl = e.target;\n            if (!this.tooltip && this.displayTooltips) {\n                this.tooltip = new Tooltip(this.options);\n                this.tooltip.updatePosition(e.pageX, e.pageY);\n            }\n            this.updateDisplay();\n        },\n\n        mouseleave: function () {\n            $(document.body).unbind('mousemove.jqs');\n            var splist = this.splist,\n                 spcount = splist.length,\n                 needsRefresh = false,\n                 sp, i;\n            this.over = false;\n            this.currentEl = null;\n\n            if (this.tooltip) {\n                this.tooltip.remove();\n                this.tooltip = null;\n            }\n\n            for (i = 0; i < spcount; i++) {\n                sp = splist[i];\n                if (sp.clearRegionHighlight()) {\n                    needsRefresh = true;\n                }\n            }\n\n            if (needsRefresh) {\n                this.canvas.render();\n            }\n        },\n\n        mousemove: function (e) {\n            this.currentPageX = e.pageX;\n            this.currentPageY = e.pageY;\n            this.currentEl = e.target;\n            if (this.tooltip) {\n                this.tooltip.updatePosition(e.pageX, e.pageY);\n            }\n            this.updateDisplay();\n        },\n\n        updateDisplay: function () {\n            var splist = this.splist,\n                 spcount = splist.length,\n                 needsRefresh = false,\n                 offset = this.$canvas.offset(),\n                 localX = this.currentPageX - offset.left,\n                 localY = this.currentPageY - offset.top,\n                 tooltiphtml, sp, i, result, changeEvent;\n            if (!this.over) {\n                return;\n            }\n            for (i = 0; i < spcount; i++) {\n                sp = splist[i];\n                result = sp.setRegionHighlight(this.currentEl, localX, localY);\n                if (result) {\n                    needsRefresh = true;\n                }\n            }\n            if (needsRefresh) {\n                changeEvent = $.Event('sparklineRegionChange');\n                changeEvent.sparklines = this.splist;\n                this.$el.trigger(changeEvent);\n                if (this.tooltip) {\n                    tooltiphtml = '';\n                    for (i = 0; i < spcount; i++) {\n                        sp = splist[i];\n                        tooltiphtml += sp.getCurrentRegionTooltip();\n                    }\n                    this.tooltip.setContent(tooltiphtml);\n                }\n                if (!this.disableHighlight) {\n                    this.canvas.render();\n                }\n            }\n            if (result === null) {\n                this.mouseleave();\n            }\n        }\n    });\n\n\n    Tooltip = createClass({\n        sizeStyle: 'position: static !important;' +\n            'display: block !important;' +\n            'visibility: hidden !important;' +\n            'float: left !important;',\n\n        init: function (options) {\n            var tooltipClassname = options.get('tooltipClassname', 'jqstooltip'),\n                sizetipStyle = this.sizeStyle,\n                offset;\n            this.container = options.get('tooltipContainer') || document.body;\n            this.tooltipOffsetX = options.get('tooltipOffsetX', 10);\n            this.tooltipOffsetY = options.get('tooltipOffsetY', 12);\n            // remove any previous lingering tooltip\n            $('#jqssizetip').remove();\n            $('#jqstooltip').remove();\n            this.sizetip = $('<div/>', {\n                id: 'jqssizetip',\n                style: sizetipStyle,\n                'class': tooltipClassname\n            });\n            this.tooltip = $('<div/>', {\n                id: 'jqstooltip',\n                'class': tooltipClassname\n            }).appendTo(this.container);\n            // account for the container's location\n            offset = this.tooltip.offset();\n            this.offsetLeft = offset.left;\n            this.offsetTop = offset.top;\n            this.hidden = true;\n            $(window).unbind('resize.jqs scroll.jqs');\n            $(window).bind('resize.jqs scroll.jqs', $.proxy(this.updateWindowDims, this));\n            this.updateWindowDims();\n        },\n\n        updateWindowDims: function () {\n            this.scrollTop = $(window).scrollTop();\n            this.scrollLeft = $(window).scrollLeft();\n            this.scrollRight = this.scrollLeft + $(window).width();\n            this.updatePosition();\n        },\n\n        getSize: function (content) {\n            this.sizetip.html(content).appendTo(this.container);\n            this.width = this.sizetip.width() + 1;\n            this.height = this.sizetip.height();\n            this.sizetip.remove();\n        },\n\n        setContent: function (content) {\n            if (!content) {\n                this.tooltip.css('visibility', 'hidden');\n                this.hidden = true;\n                return;\n            }\n            this.getSize(content);\n            this.tooltip.html(content)\n                .css({\n                    'width': this.width,\n                    'height': this.height,\n                    'visibility': 'visible'\n                });\n            if (this.hidden) {\n                this.hidden = false;\n                this.updatePosition();\n            }\n        },\n\n        updatePosition: function (x, y) {\n            if (x === undefined) {\n                if (this.mousex === undefined) {\n                    return;\n                }\n                x = this.mousex - this.offsetLeft;\n                y = this.mousey - this.offsetTop;\n\n            } else {\n                this.mousex = x = x - this.offsetLeft;\n                this.mousey = y = y - this.offsetTop;\n            }\n            if (!this.height || !this.width || this.hidden) {\n                return;\n            }\n\n            y -= this.height + this.tooltipOffsetY;\n            x += this.tooltipOffsetX;\n\n            if (y < this.scrollTop) {\n                y = this.scrollTop;\n            }\n            if (x < this.scrollLeft) {\n                x = this.scrollLeft;\n            } else if (x + this.width > this.scrollRight) {\n                x = this.scrollRight - this.width;\n            }\n\n            this.tooltip.css({\n                'left': x,\n                'top': y\n            });\n        },\n\n        remove: function () {\n            this.tooltip.remove();\n            this.sizetip.remove();\n            this.sizetip = this.tooltip = undefined;\n            $(window).unbind('resize.jqs scroll.jqs');\n        }\n    });\n\n\n    initStyles = function() {\n        addCSS(defaultStyles);\n    };\n\n    $(initStyles);\n\n    pending = [];\n    $.fn.sparkline = function (userValues, userOptions) {\n        return this.each(function () {\n            var options = new $.fn.sparkline.options(this, userOptions),\n                 $this = $(this),\n                 render, i;\n            render = function () {\n                var values, width, height, tmp, mhandler, sp, vals;\n                if (userValues === 'html' || userValues === undefined) {\n                    vals = this.getAttribute(options.get('tagValuesAttribute'));\n                    if (vals === undefined || vals === null) {\n                        vals = $this.html();\n                    }\n                    values = vals.replace(/(^\\s*\x3c!--)|(--\x3e\\s*$)|\\s+/g, '').split(',');\n                } else {\n                    values = userValues;\n                }\n\n                width = options.get('width') === 'auto' ? values.length * options.get('defaultPixelsPerValue') : options.get('width');\n                if (options.get('height') === 'auto') {\n                    if (!options.get('composite') || !$.data(this, '_jqs_vcanvas')) {\n                        // must be a better way to get the line height\n                        tmp = document.createElement('span');\n                        tmp.innerHTML = 'a';\n                        $this.html(tmp);\n                        height = $(tmp).innerHeight() || $(tmp).height();\n                        $(tmp).remove();\n                        tmp = null;\n                    }\n                } else {\n                    height = options.get('height');\n                }\n\n                if (!options.get('disableInteraction')) {\n                    mhandler = $.data(this, '_jqs_mhandler');\n                    if (!mhandler) {\n                        mhandler = new MouseHandler(this, options);\n                        $.data(this, '_jqs_mhandler', mhandler);\n                    } else if (!options.get('composite')) {\n                        mhandler.reset();\n                    }\n                } else {\n                    mhandler = false;\n                }\n\n                if (options.get('composite') && !$.data(this, '_jqs_vcanvas')) {\n                    if (!$.data(this, '_jqs_errnotify')) {\n                        alert('Attempted to attach a composite sparkline to an element with no existing sparkline');\n                        $.data(this, '_jqs_errnotify', true);\n                    }\n                    return;\n                }\n\n                sp = new $.fn.sparkline[options.get('type')](this, values, options, width, height);\n\n                sp.render();\n\n                if (mhandler) {\n                    mhandler.registerSparkline(sp);\n                }\n            };\n            if (($(this).html() && !options.get('disableHiddenCheck') && $(this).is(':hidden')) || !$(this).parents('body').length) {\n                if (!options.get('composite') && $.data(this, '_jqs_pending')) {\n                    // remove any existing references to the element\n                    for (i = pending.length; i; i--) {\n                        if (pending[i - 1][0] == this) {\n                            pending.splice(i - 1, 1);\n                        }\n                    }\n                }\n                pending.push([this, render]);\n                $.data(this, '_jqs_pending', true);\n            } else {\n                render.call(this);\n            }\n        });\n    };\n\n    $.fn.sparkline.defaults = getDefaults();\n\n\n    $.sparkline_display_visible = function () {\n        var el, i, pl;\n        var done = [];\n        for (i = 0, pl = pending.length; i < pl; i++) {\n            el = pending[i][0];\n            if ($(el).is(':visible') && !$(el).parents().is(':hidden')) {\n                pending[i][1].call(el);\n                $.data(pending[i][0], '_jqs_pending', false);\n                done.push(i);\n            } else if (!$(el).closest('html').length && !$.data(el, '_jqs_pending')) {\n                // element has been inserted and removed from the DOM\n                // If it was not yet inserted into the dom then the .data request\n                // will return true.\n                // removing from the dom causes the data to be removed.\n                $.data(pending[i][0], '_jqs_pending', false);\n                done.push(i);\n            }\n        }\n        for (i = done.length; i; i--) {\n            pending.splice(done[i - 1], 1);\n        }\n    };\n\n\n    /**\n     * User option handler\n     */\n    $.fn.sparkline.options = createClass({\n        init: function (tag, userOptions) {\n            var extendedOptions, defaults, base, tagOptionType;\n            this.userOptions = userOptions = userOptions || {};\n            this.tag = tag;\n            this.tagValCache = {};\n            defaults = $.fn.sparkline.defaults;\n            base = defaults.common;\n            this.tagOptionsPrefix = userOptions.enableTagOptions && (userOptions.tagOptionsPrefix || base.tagOptionsPrefix);\n\n            tagOptionType = this.getTagSetting('type');\n            if (tagOptionType === UNSET_OPTION) {\n                extendedOptions = defaults[userOptions.type || base.type];\n            } else {\n                extendedOptions = defaults[tagOptionType];\n            }\n            this.mergedOptions = $.extend({}, base, extendedOptions, userOptions);\n        },\n\n\n        getTagSetting: function (key) {\n            var prefix = this.tagOptionsPrefix,\n                val, i, pairs, keyval;\n            if (prefix === false || prefix === undefined) {\n                return UNSET_OPTION;\n            }\n            if (this.tagValCache.hasOwnProperty(key)) {\n                val = this.tagValCache.key;\n            } else {\n                val = this.tag.getAttribute(prefix + key);\n                if (val === undefined || val === null) {\n                    val = UNSET_OPTION;\n                } else if (val.substr(0, 1) === '[') {\n                    val = val.substr(1, val.length - 2).split(',');\n                    for (i = val.length; i--;) {\n                        val[i] = normalizeValue(val[i].replace(/(^\\s*)|(\\s*$)/g, ''));\n                    }\n                } else if (val.substr(0, 1) === '{') {\n                    pairs = val.substr(1, val.length - 2).split(',');\n                    val = {};\n                    for (i = pairs.length; i--;) {\n                        keyval = pairs[i].split(':', 2);\n                        val[keyval[0].replace(/(^\\s*)|(\\s*$)/g, '')] = normalizeValue(keyval[1].replace(/(^\\s*)|(\\s*$)/g, ''));\n                    }\n                } else {\n                    val = normalizeValue(val);\n                }\n                this.tagValCache.key = val;\n            }\n            return val;\n        },\n\n        get: function (key, defaultval) {\n            var tagOption = this.getTagSetting(key),\n                result;\n            if (tagOption !== UNSET_OPTION) {\n                return tagOption;\n            }\n            return (result = this.mergedOptions[key]) === undefined ? defaultval : result;\n        }\n    });\n\n\n    $.fn.sparkline._base = createClass({\n        disabled: false,\n\n        init: function (el, values, options, width, height) {\n            this.el = el;\n            this.$el = $(el);\n            this.values = values;\n            this.options = options;\n            this.width = width;\n            this.height = height;\n            this.currentRegion = undefined;\n        },\n\n        /**\n         * Setup the canvas\n         */\n        initTarget: function () {\n            var interactive = !this.options.get('disableInteraction');\n            if (!(this.target = this.$el.simpledraw(this.width, this.height, this.options.get('composite'), interactive))) {\n                this.disabled = true;\n            } else {\n                this.canvasWidth = this.target.pixelWidth;\n                this.canvasHeight = this.target.pixelHeight;\n            }\n        },\n\n        /**\n         * Actually render the chart to the canvas\n         */\n        render: function () {\n            if (this.disabled) {\n                this.el.innerHTML = '';\n                return false;\n            }\n            return true;\n        },\n\n        /**\n         * Return a region id for a given x/y co-ordinate\n         */\n        getRegion: function (x, y) {\n        },\n\n        /**\n         * Highlight an item based on the moused-over x,y co-ordinate\n         */\n        setRegionHighlight: function (el, x, y) {\n            var currentRegion = this.currentRegion,\n                highlightEnabled = !this.options.get('disableHighlight'),\n                newRegion;\n            if (x > this.canvasWidth || y > this.canvasHeight || x < 0 || y < 0) {\n                return null;\n            }\n            newRegion = this.getRegion(el, x, y);\n            if (currentRegion !== newRegion) {\n                if (currentRegion !== undefined && highlightEnabled) {\n                    this.removeHighlight();\n                }\n                this.currentRegion = newRegion;\n                if (newRegion !== undefined && highlightEnabled) {\n                    this.renderHighlight();\n                }\n                return true;\n            }\n            return false;\n        },\n\n        /**\n         * Reset any currently highlighted item\n         */\n        clearRegionHighlight: function () {\n            if (this.currentRegion !== undefined) {\n                this.removeHighlight();\n                this.currentRegion = undefined;\n                return true;\n            }\n            return false;\n        },\n\n        renderHighlight: function () {\n            this.changeHighlight(true);\n        },\n\n        removeHighlight: function () {\n            this.changeHighlight(false);\n        },\n\n        changeHighlight: function (highlight)  {},\n\n        /**\n         * Fetch the HTML to display as a tooltip\n         */\n        getCurrentRegionTooltip: function () {\n            var options = this.options,\n                header = '',\n                entries = [],\n                fields, formats, formatlen, fclass, text, i,\n                showFields, showFieldsKey, newFields, fv,\n                formatter, format, fieldlen, j;\n            if (this.currentRegion === undefined) {\n                return '';\n            }\n            fields = this.getCurrentRegionFields();\n            formatter = options.get('tooltipFormatter');\n            if (formatter) {\n                return formatter(this, options, fields);\n            }\n            if (options.get('tooltipChartTitle')) {\n                header += '<div class=\"jqs jqstitle\">' + options.get('tooltipChartTitle') + '</div>\\n';\n            }\n            formats = this.options.get('tooltipFormat');\n            if (!formats) {\n                return '';\n            }\n            if (!$.isArray(formats)) {\n                formats = [formats];\n            }\n            if (!$.isArray(fields)) {\n                fields = [fields];\n            }\n            showFields = this.options.get('tooltipFormatFieldlist');\n            showFieldsKey = this.options.get('tooltipFormatFieldlistKey');\n            if (showFields && showFieldsKey) {\n                // user-selected ordering of fields\n                newFields = [];\n                for (i = fields.length; i--;) {\n                    fv = fields[i][showFieldsKey];\n                    if ((j = $.inArray(fv, showFields)) != -1) {\n                        newFields[j] = fields[i];\n                    }\n                }\n                fields = newFields;\n            }\n            formatlen = formats.length;\n            fieldlen = fields.length;\n            for (i = 0; i < formatlen; i++) {\n                format = formats[i];\n                if (typeof format === 'string') {\n                    format = new SPFormat(format);\n                }\n                fclass = format.fclass || 'jqsfield';\n                for (j = 0; j < fieldlen; j++) {\n                    if (!fields[j].isNull || !options.get('tooltipSkipNull')) {\n                        $.extend(fields[j], {\n                            prefix: options.get('tooltipPrefix'),\n                            suffix: options.get('tooltipSuffix')\n                        });\n                        text = format.render(fields[j], options.get('tooltipValueLookups'), options);\n                        entries.push('<div class=\"' + fclass + '\">' + text + '</div>');\n                    }\n                }\n            }\n            if (entries.length) {\n                return header + entries.join('\\n');\n            }\n            return '';\n        },\n\n        getCurrentRegionFields: function () {},\n\n        calcHighlightColor: function (color, options) {\n            var highlightColor = options.get('highlightColor'),\n                lighten = options.get('highlightLighten'),\n                parse, mult, rgbnew, i;\n            if (highlightColor) {\n                return highlightColor;\n            }\n            if (lighten) {\n                // extract RGB values\n                parse = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(color) || /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(color);\n                if (parse) {\n                    rgbnew = [];\n                    mult = color.length === 4 ? 16 : 1;\n                    for (i = 0; i < 3; i++) {\n                        rgbnew[i] = clipval(Math.round(parseInt(parse[i + 1], 16) * mult * lighten), 0, 255);\n                    }\n                    return 'rgb(' + rgbnew.join(',') + ')';\n                }\n\n            }\n            return color;\n        }\n\n    });\n\n    barHighlightMixin = {\n        changeHighlight: function (highlight) {\n            var currentRegion = this.currentRegion,\n                target = this.target,\n                shapeids = this.regionShapes[currentRegion],\n                newShapes;\n            // will be null if the region value was null\n            if (shapeids) {\n                newShapes = this.renderRegion(currentRegion, highlight);\n                if ($.isArray(newShapes) || $.isArray(shapeids)) {\n                    target.replaceWithShapes(shapeids, newShapes);\n                    this.regionShapes[currentRegion] = $.map(newShapes, function (newShape) {\n                        return newShape.id;\n                    });\n                } else {\n                    target.replaceWithShape(shapeids, newShapes);\n                    this.regionShapes[currentRegion] = newShapes.id;\n                }\n            }\n        },\n\n        render: function () {\n            var values = this.values,\n                target = this.target,\n                regionShapes = this.regionShapes,\n                shapes, ids, i, j;\n\n            if (!this.cls._super.render.call(this)) {\n                return;\n            }\n            for (i = values.length; i--;) {\n                shapes = this.renderRegion(i);\n                if (shapes) {\n                    if ($.isArray(shapes)) {\n                        ids = [];\n                        for (j = shapes.length; j--;) {\n                            shapes[j].append();\n                            ids.push(shapes[j].id);\n                        }\n                        regionShapes[i] = ids;\n                    } else {\n                        shapes.append();\n                        regionShapes[i] = shapes.id; // store just the shapeid\n                    }\n                } else {\n                    // null value\n                    regionShapes[i] = null;\n                }\n            }\n            target.render();\n        }\n    };\n\n\n    /**\n     * Line charts\n     */\n    $.fn.sparkline.line = line = createClass($.fn.sparkline._base, {\n        type: 'line',\n\n        init: function (el, values, options, width, height) {\n            line._super.init.call(this, el, values, options, width, height);\n            this.vertices = [];\n            this.regionMap = [];\n            this.xvalues = [];\n            this.yvalues = [];\n            this.yminmax = [];\n            this.hightlightSpotId = null;\n            this.lastShapeId = null;\n            this.initTarget();\n        },\n\n        getRegion: function (el, x, y) {\n            var i,\n                regionMap = this.regionMap; // maps regions to value positions\n            for (i = regionMap.length; i--;) {\n                if (regionMap[i] !== null && x >= regionMap[i][0] && x <= regionMap[i][1]) {\n                    return regionMap[i][2];\n                }\n            }\n            return undefined;\n        },\n\n        getCurrentRegionFields: function () {\n            var currentRegion = this.currentRegion;\n            return {\n                isNull: this.yvalues[currentRegion] === null,\n                x: this.xvalues[currentRegion],\n                y: this.yvalues[currentRegion],\n                color: this.options.get('lineColor'),\n                fillColor: this.options.get('fillColor'),\n                offset: currentRegion\n            };\n        },\n\n        renderHighlight: function () {\n            var currentRegion = this.currentRegion,\n                target = this.target,\n                vertex = this.vertices[currentRegion],\n                options = this.options,\n                spotRadius = options.get('spotRadius'),\n                highlightSpotColor = options.get('highlightSpotColor'),\n                highlightLineColor = options.get('highlightLineColor'),\n                highlightSpot, highlightLine;\n\n            if (!vertex) {\n                return;\n            }\n            if (spotRadius && highlightSpotColor) {\n                highlightSpot = target.drawCircle(vertex[0], vertex[1],\n                    spotRadius, undefined, highlightSpotColor);\n                this.highlightSpotId = highlightSpot.id;\n                target.insertAfterShape(this.lastShapeId, highlightSpot);\n            }\n            if (highlightLineColor) {\n                highlightLine = target.drawLine(vertex[0], this.canvasTop, vertex[0],\n                    this.canvasTop + this.canvasHeight, highlightLineColor);\n                this.highlightLineId = highlightLine.id;\n                target.insertAfterShape(this.lastShapeId, highlightLine);\n            }\n        },\n\n        removeHighlight: function () {\n            var target = this.target;\n            if (this.highlightSpotId) {\n                target.removeShapeId(this.highlightSpotId);\n                this.highlightSpotId = null;\n            }\n            if (this.highlightLineId) {\n                target.removeShapeId(this.highlightLineId);\n                this.highlightLineId = null;\n            }\n        },\n\n        scanValues: function () {\n            var values = this.values,\n                valcount = values.length,\n                xvalues = this.xvalues,\n                yvalues = this.yvalues,\n                yminmax = this.yminmax,\n                i, val, isStr, isArray, sp;\n            for (i = 0; i < valcount; i++) {\n                val = values[i];\n                isStr = typeof(values[i]) === 'string';\n                isArray = typeof(values[i]) === 'object' && values[i] instanceof Array;\n                sp = isStr && values[i].split(':');\n                if (isStr && sp.length === 2) { // x:y\n                    xvalues.push(Number(sp[0]));\n                    yvalues.push(Number(sp[1]));\n                    yminmax.push(Number(sp[1]));\n                } else if (isArray) {\n                    xvalues.push(val[0]);\n                    yvalues.push(val[1]);\n                    yminmax.push(val[1]);\n                } else {\n                    xvalues.push(i);\n                    if (values[i] === null || values[i] === 'null') {\n                        yvalues.push(null);\n                    } else {\n                        yvalues.push(Number(val));\n                        yminmax.push(Number(val));\n                    }\n                }\n            }\n            if (this.options.get('xvalues')) {\n                xvalues = this.options.get('xvalues');\n            }\n\n            this.maxy = this.maxyorg = Math.max.apply(Math, yminmax);\n            this.miny = this.minyorg = Math.min.apply(Math, yminmax);\n\n            this.maxx = Math.max.apply(Math, xvalues);\n            this.minx = Math.min.apply(Math, xvalues);\n\n            this.xvalues = xvalues;\n            this.yvalues = yvalues;\n            this.yminmax = yminmax;\n\n        },\n\n        processRangeOptions: function () {\n            var options = this.options,\n                normalRangeMin = options.get('normalRangeMin'),\n                normalRangeMax = options.get('normalRangeMax');\n\n            if (normalRangeMin !== undefined) {\n                if (normalRangeMin < this.miny) {\n                    this.miny = normalRangeMin;\n                }\n                if (normalRangeMax > this.maxy) {\n                    this.maxy = normalRangeMax;\n                }\n            }\n            if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < this.miny)) {\n                this.miny = options.get('chartRangeMin');\n            }\n            if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > this.maxy)) {\n                this.maxy = options.get('chartRangeMax');\n            }\n            if (options.get('chartRangeMinX') !== undefined && (options.get('chartRangeClipX') || options.get('chartRangeMinX') < this.minx)) {\n                this.minx = options.get('chartRangeMinX');\n            }\n            if (options.get('chartRangeMaxX') !== undefined && (options.get('chartRangeClipX') || options.get('chartRangeMaxX') > this.maxx)) {\n                this.maxx = options.get('chartRangeMaxX');\n            }\n\n        },\n\n        drawNormalRange: function (canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey) {\n            var normalRangeMin = this.options.get('normalRangeMin'),\n                normalRangeMax = this.options.get('normalRangeMax'),\n                ytop = canvasTop + Math.round(canvasHeight - (canvasHeight * ((normalRangeMax - this.miny) / rangey))),\n                height = Math.round((canvasHeight * (normalRangeMax - normalRangeMin)) / rangey);\n            this.target.drawRect(canvasLeft, ytop, canvasWidth, height, undefined, this.options.get('normalRangeColor')).append();\n        },\n\n        render: function () {\n            var options = this.options,\n                target = this.target,\n                canvasWidth = this.canvasWidth,\n                canvasHeight = this.canvasHeight,\n                vertices = this.vertices,\n                spotRadius = options.get('spotRadius'),\n                regionMap = this.regionMap,\n                rangex, rangey, yvallast,\n                canvasTop, canvasLeft,\n                vertex, path, paths, x, y, xnext, xpos, xposnext,\n                last, next, yvalcount, lineShapes, fillShapes, plen,\n                valueSpots, hlSpotsEnabled, color, xvalues, yvalues, i;\n\n            if (!line._super.render.call(this)) {\n                return;\n            }\n\n            this.scanValues();\n            this.processRangeOptions();\n\n            xvalues = this.xvalues;\n            yvalues = this.yvalues;\n\n            if (!this.yminmax.length || this.yvalues.length < 2) {\n                // empty or all null valuess\n                return;\n            }\n\n            canvasTop = canvasLeft = 0;\n\n            rangex = this.maxx - this.minx === 0 ? 1 : this.maxx - this.minx;\n            rangey = this.maxy - this.miny === 0 ? 1 : this.maxy - this.miny;\n            yvallast = this.yvalues.length - 1;\n\n            if (spotRadius && (canvasWidth < (spotRadius * 4) || canvasHeight < (spotRadius * 4))) {\n                spotRadius = 0;\n            }\n            if (spotRadius) {\n                // adjust the canvas size as required so that spots will fit\n                hlSpotsEnabled = options.get('highlightSpotColor') &&  !options.get('disableInteraction');\n                if (hlSpotsEnabled || options.get('minSpotColor') || (options.get('spotColor') && yvalues[yvallast] === this.miny)) {\n                    canvasHeight -= Math.ceil(spotRadius);\n                }\n                if (hlSpotsEnabled || options.get('maxSpotColor') || (options.get('spotColor') && yvalues[yvallast] === this.maxy)) {\n                    canvasHeight -= Math.ceil(spotRadius);\n                    canvasTop += Math.ceil(spotRadius);\n                }\n                if (hlSpotsEnabled ||\n                     ((options.get('minSpotColor') || options.get('maxSpotColor')) && (yvalues[0] === this.miny || yvalues[0] === this.maxy))) {\n                    canvasLeft += Math.ceil(spotRadius);\n                    canvasWidth -= Math.ceil(spotRadius);\n                }\n                if (hlSpotsEnabled || options.get('spotColor') ||\n                    (options.get('minSpotColor') || options.get('maxSpotColor') &&\n                        (yvalues[yvallast] === this.miny || yvalues[yvallast] === this.maxy))) {\n                    canvasWidth -= Math.ceil(spotRadius);\n                }\n            }\n\n\n            canvasHeight--;\n\n            if (options.get('normalRangeMin') !== undefined && !options.get('drawNormalOnTop')) {\n                this.drawNormalRange(canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey);\n            }\n\n            path = [];\n            paths = [path];\n            last = next = null;\n            yvalcount = yvalues.length;\n            for (i = 0; i < yvalcount; i++) {\n                x = xvalues[i];\n                xnext = xvalues[i + 1];\n                y = yvalues[i];\n                xpos = canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex));\n                xposnext = i < yvalcount - 1 ? canvasLeft + Math.round((xnext - this.minx) * (canvasWidth / rangex)) : canvasWidth;\n                next = xpos + ((xposnext - xpos) / 2);\n                regionMap[i] = [last || 0, next, i];\n                last = next;\n                if (y === null) {\n                    if (i) {\n                        if (yvalues[i - 1] !== null) {\n                            path = [];\n                            paths.push(path);\n                        }\n                        vertices.push(null);\n                    }\n                } else {\n                    if (y < this.miny) {\n                        y = this.miny;\n                    }\n                    if (y > this.maxy) {\n                        y = this.maxy;\n                    }\n                    if (!path.length) {\n                        // previous value was null\n                        path.push([xpos, canvasTop + canvasHeight]);\n                    }\n                    vertex = [xpos, canvasTop + Math.round(canvasHeight - (canvasHeight * ((y - this.miny) / rangey)))];\n                    path.push(vertex);\n                    vertices.push(vertex);\n                }\n            }\n\n            lineShapes = [];\n            fillShapes = [];\n            plen = paths.length;\n            for (i = 0; i < plen; i++) {\n                path = paths[i];\n                if (path.length) {\n                    if (options.get('fillColor')) {\n                        path.push([path[path.length - 1][0], (canvasTop + canvasHeight)]);\n                        fillShapes.push(path.slice(0));\n                        path.pop();\n                    }\n                    // if there's only a single point in this path, then we want to display it\n                    // as a vertical line which means we keep path[0]  as is\n                    if (path.length > 2) {\n                        // else we want the first value\n                        path[0] = [path[0][0], path[1][1]];\n                    }\n                    lineShapes.push(path);\n                }\n            }\n\n            // draw the fill first, then optionally the normal range, then the line on top of that\n            plen = fillShapes.length;\n            for (i = 0; i < plen; i++) {\n                target.drawShape(fillShapes[i],\n                    options.get('fillColor'), options.get('fillColor')).append();\n            }\n\n            if (options.get('normalRangeMin') !== undefined && options.get('drawNormalOnTop')) {\n                this.drawNormalRange(canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey);\n            }\n\n            plen = lineShapes.length;\n            for (i = 0; i < plen; i++) {\n                target.drawShape(lineShapes[i], options.get('lineColor'), undefined,\n                    options.get('lineWidth')).append();\n            }\n\n            if (spotRadius && options.get('valueSpots')) {\n                valueSpots = options.get('valueSpots');\n                if (valueSpots.get === undefined) {\n                    valueSpots = new RangeMap(valueSpots);\n                }\n                for (i = 0; i < yvalcount; i++) {\n                    color = valueSpots.get(yvalues[i]);\n                    if (color) {\n                        target.drawCircle(canvasLeft + Math.round((xvalues[i] - this.minx) * (canvasWidth / rangex)),\n                            canvasTop + Math.round(canvasHeight - (canvasHeight * ((yvalues[i] - this.miny) / rangey))),\n                            spotRadius, undefined,\n                            color).append();\n                    }\n                }\n\n            }\n            if (spotRadius && options.get('spotColor') && yvalues[yvallast] !== null) {\n                target.drawCircle(canvasLeft + Math.round((xvalues[xvalues.length - 1] - this.minx) * (canvasWidth / rangex)),\n                    canvasTop + Math.round(canvasHeight - (canvasHeight * ((yvalues[yvallast] - this.miny) / rangey))),\n                    spotRadius, undefined,\n                    options.get('spotColor')).append();\n            }\n            if (this.maxy !== this.minyorg) {\n                if (spotRadius && options.get('minSpotColor')) {\n                    x = xvalues[$.inArray(this.minyorg, yvalues)];\n                    target.drawCircle(canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex)),\n                        canvasTop + Math.round(canvasHeight - (canvasHeight * ((this.minyorg - this.miny) / rangey))),\n                        spotRadius, undefined,\n                        options.get('minSpotColor')).append();\n                }\n                if (spotRadius && options.get('maxSpotColor')) {\n                    x = xvalues[$.inArray(this.maxyorg, yvalues)];\n                    target.drawCircle(canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex)),\n                        canvasTop + Math.round(canvasHeight - (canvasHeight * ((this.maxyorg - this.miny) / rangey))),\n                        spotRadius, undefined,\n                        options.get('maxSpotColor')).append();\n                }\n            }\n\n            this.lastShapeId = target.getLastShapeId();\n            this.canvasTop = canvasTop;\n            target.render();\n        }\n    });\n\n\n    /**\n     * Bar charts\n     */\n    $.fn.sparkline.bar = bar = createClass($.fn.sparkline._base, barHighlightMixin, {\n        type: 'bar',\n\n        init: function (el, values, options, width, height) {\n            var barWidth = parseInt(options.get('barWidth'), 10),\n                barSpacing = parseInt(options.get('barSpacing'), 10),\n                chartRangeMin = options.get('chartRangeMin'),\n                chartRangeMax = options.get('chartRangeMax'),\n                chartRangeClip = options.get('chartRangeClip'),\n                stackMin = Infinity,\n                stackMax = -Infinity,\n                isStackString, groupMin, groupMax, stackRanges,\n                numValues, i, vlen, range, zeroAxis, xaxisOffset, min, max, clipMin, clipMax,\n                stacked, vlist, j, slen, svals, val, yoffset, yMaxCalc, canvasHeightEf;\n            bar._super.init.call(this, el, values, options, width, height);\n\n            // scan values to determine whether to stack bars\n            for (i = 0, vlen = values.length; i < vlen; i++) {\n                val = values[i];\n                isStackString = typeof(val) === 'string' && val.indexOf(':') > -1;\n                if (isStackString || $.isArray(val)) {\n                    stacked = true;\n                    if (isStackString) {\n                        val = values[i] = normalizeValues(val.split(':'));\n                    }\n                    val = remove(val, null); // min/max will treat null as zero\n                    groupMin = Math.min.apply(Math, val);\n                    groupMax = Math.max.apply(Math, val);\n                    if (groupMin < stackMin) {\n                        stackMin = groupMin;\n                    }\n                    if (groupMax > stackMax) {\n                        stackMax = groupMax;\n                    }\n                }\n            }\n\n            this.stacked = stacked;\n            this.regionShapes = {};\n            this.barWidth = barWidth;\n            this.barSpacing = barSpacing;\n            this.totalBarWidth = barWidth + barSpacing;\n            this.width = width = (values.length * barWidth) + ((values.length - 1) * barSpacing);\n\n            this.initTarget();\n\n            if (chartRangeClip) {\n                clipMin = chartRangeMin === undefined ? -Infinity : chartRangeMin;\n                clipMax = chartRangeMax === undefined ? Infinity : chartRangeMax;\n            }\n\n            numValues = [];\n            stackRanges = stacked ? [] : numValues;\n            var stackTotals = [];\n            var stackRangesNeg = [];\n            for (i = 0, vlen = values.length; i < vlen; i++) {\n                if (stacked) {\n                    vlist = values[i];\n                    values[i] = svals = [];\n                    stackTotals[i] = 0;\n                    stackRanges[i] = stackRangesNeg[i] = 0;\n                    for (j = 0, slen = vlist.length; j < slen; j++) {\n                        val = svals[j] = chartRangeClip ? clipval(vlist[j], clipMin, clipMax) : vlist[j];\n                        if (val !== null) {\n                            if (val > 0) {\n                                stackTotals[i] += val;\n                            }\n                            if (stackMin < 0 && stackMax > 0) {\n                                if (val < 0) {\n                                    stackRangesNeg[i] += Math.abs(val);\n                                } else {\n                                    stackRanges[i] += val;\n                                }\n                            } else {\n                                stackRanges[i] += Math.abs(val - (val < 0 ? stackMax : stackMin));\n                            }\n                            numValues.push(val);\n                        }\n                    }\n                } else {\n                    val = chartRangeClip ? clipval(values[i], clipMin, clipMax) : values[i];\n                    val = values[i] = normalizeValue(val);\n                    if (val !== null) {\n                        numValues.push(val);\n                    }\n                }\n            }\n            this.max = max = Math.max.apply(Math, numValues);\n            this.min = min = Math.min.apply(Math, numValues);\n            this.stackMax = stackMax = stacked ? Math.max.apply(Math, stackTotals) : max;\n            this.stackMin = stackMin = stacked ? Math.min.apply(Math, numValues) : min;\n\n            if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < min)) {\n                min = options.get('chartRangeMin');\n            }\n            if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > max)) {\n                max = options.get('chartRangeMax');\n            }\n\n            this.zeroAxis = zeroAxis = options.get('zeroAxis', true);\n            if (min <= 0 && max >= 0 && zeroAxis) {\n                xaxisOffset = 0;\n            } else if (zeroAxis == false) {\n                xaxisOffset = min;\n            } else if (min > 0) {\n                xaxisOffset = min;\n            } else {\n                xaxisOffset = max;\n            }\n            this.xaxisOffset = xaxisOffset;\n\n            range = stacked ? (Math.max.apply(Math, stackRanges) + Math.max.apply(Math, stackRangesNeg)) : max - min;\n\n            // as we plot zero/min values a single pixel line, we add a pixel to all other\n            // values - Reduce the effective canvas size to suit\n            this.canvasHeightEf = (zeroAxis && min < 0) ? this.canvasHeight - 2 : this.canvasHeight - 1;\n\n            if (min < xaxisOffset) {\n                yMaxCalc = (stacked && max >= 0) ? stackMax : max;\n                yoffset = (yMaxCalc - xaxisOffset) / range * this.canvasHeight;\n                if (yoffset !== Math.ceil(yoffset)) {\n                    this.canvasHeightEf -= 2;\n                    yoffset = Math.ceil(yoffset);\n                }\n            } else {\n                yoffset = this.canvasHeight;\n            }\n            this.yoffset = yoffset;\n\n            if ($.isArray(options.get('colorMap'))) {\n                this.colorMapByIndex = options.get('colorMap');\n                this.colorMapByValue = null;\n            } else {\n                this.colorMapByIndex = null;\n                this.colorMapByValue = options.get('colorMap');\n                if (this.colorMapByValue && this.colorMapByValue.get === undefined) {\n                    this.colorMapByValue = new RangeMap(this.colorMapByValue);\n                }\n            }\n\n            this.range = range;\n        },\n\n        getRegion: function (el, x, y) {\n            var result = Math.floor(x / this.totalBarWidth);\n            return (result < 0 || result >= this.values.length) ? undefined : result;\n        },\n\n        getCurrentRegionFields: function () {\n            var currentRegion = this.currentRegion,\n                values = ensureArray(this.values[currentRegion]),\n                result = [],\n                value, i;\n            for (i = values.length; i--;) {\n                value = values[i];\n                result.push({\n                    isNull: value === null,\n                    value: value,\n                    color: this.calcColor(i, value, currentRegion),\n                    offset: currentRegion\n                });\n            }\n            return result;\n        },\n\n        calcColor: function (stacknum, value, valuenum) {\n            var colorMapByIndex = this.colorMapByIndex,\n                colorMapByValue = this.colorMapByValue,\n                options = this.options,\n                color, newColor;\n            if (this.stacked) {\n                color = options.get('stackedBarColor');\n            } else {\n                color = (value < 0) ? options.get('negBarColor') : options.get('barColor');\n            }\n            if (value === 0 && options.get('zeroColor') !== undefined) {\n                color = options.get('zeroColor');\n            }\n            if (colorMapByValue && (newColor = colorMapByValue.get(value))) {\n                color = newColor;\n            } else if (colorMapByIndex && colorMapByIndex.length > valuenum) {\n                color = colorMapByIndex[valuenum];\n            }\n            return $.isArray(color) ? color[stacknum % color.length] : color;\n        },\n\n        /**\n         * Render bar(s) for a region\n         */\n        renderRegion: function (valuenum, highlight) {\n            var vals = this.values[valuenum],\n                options = this.options,\n                xaxisOffset = this.xaxisOffset,\n                result = [],\n                range = this.range,\n                stacked = this.stacked,\n                target = this.target,\n                x = valuenum * this.totalBarWidth,\n                canvasHeightEf = this.canvasHeightEf,\n                yoffset = this.yoffset,\n                y, height, color, isNull, yoffsetNeg, i, valcount, val, minPlotted, allMin;\n\n            vals = $.isArray(vals) ? vals : [vals];\n            valcount = vals.length;\n            val = vals[0];\n            isNull = all(null, vals);\n            allMin = all(xaxisOffset, vals, true);\n\n            if (isNull) {\n                if (options.get('nullColor')) {\n                    color = highlight ? options.get('nullColor') : this.calcHighlightColor(options.get('nullColor'), options);\n                    y = (yoffset > 0) ? yoffset - 1 : yoffset;\n                    return target.drawRect(x, y, this.barWidth - 1, 0, color, color);\n                } else {\n                    return undefined;\n                }\n            }\n            yoffsetNeg = yoffset;\n            for (i = 0; i < valcount; i++) {\n                val = vals[i];\n\n                if (stacked && val === xaxisOffset) {\n                    if (!allMin || minPlotted) {\n                        continue;\n                    }\n                    minPlotted = true;\n                }\n\n                if (range > 0) {\n                    height = Math.floor(canvasHeightEf * ((Math.abs(val - xaxisOffset) / range))) + 1;\n                } else {\n                    height = 1;\n                }\n                if (val < xaxisOffset || (val === xaxisOffset && yoffset === 0)) {\n                    y = yoffsetNeg;\n                    yoffsetNeg += height;\n                } else {\n                    y = yoffset - height;\n                    yoffset -= height;\n                }\n                color = this.calcColor(i, val, valuenum);\n                if (highlight) {\n                    color = this.calcHighlightColor(color, options);\n                }\n                result.push(target.drawRect(x, y, this.barWidth - 1, height - 1, color, color));\n            }\n            if (result.length === 1) {\n                return result[0];\n            }\n            return result;\n        }\n    });\n\n\n    /**\n     * Tristate charts\n     */\n    $.fn.sparkline.tristate = tristate = createClass($.fn.sparkline._base, barHighlightMixin, {\n        type: 'tristate',\n\n        init: function (el, values, options, width, height) {\n            var barWidth = parseInt(options.get('barWidth'), 10),\n                barSpacing = parseInt(options.get('barSpacing'), 10);\n            tristate._super.init.call(this, el, values, options, width, height);\n\n            this.regionShapes = {};\n            this.barWidth = barWidth;\n            this.barSpacing = barSpacing;\n            this.totalBarWidth = barWidth + barSpacing;\n            this.values = $.map(values, Number);\n            this.width = width = (values.length * barWidth) + ((values.length - 1) * barSpacing);\n\n            if ($.isArray(options.get('colorMap'))) {\n                this.colorMapByIndex = options.get('colorMap');\n                this.colorMapByValue = null;\n            } else {\n                this.colorMapByIndex = null;\n                this.colorMapByValue = options.get('colorMap');\n                if (this.colorMapByValue && this.colorMapByValue.get === undefined) {\n                    this.colorMapByValue = new RangeMap(this.colorMapByValue);\n                }\n            }\n            this.initTarget();\n        },\n\n        getRegion: function (el, x, y) {\n            return Math.floor(x / this.totalBarWidth);\n        },\n\n        getCurrentRegionFields: function () {\n            var currentRegion = this.currentRegion;\n            return {\n                isNull: this.values[currentRegion] === undefined,\n                value: this.values[currentRegion],\n                color: this.calcColor(this.values[currentRegion], currentRegion),\n                offset: currentRegion\n            };\n        },\n\n        calcColor: function (value, valuenum) {\n            var values = this.values,\n                options = this.options,\n                colorMapByIndex = this.colorMapByIndex,\n                colorMapByValue = this.colorMapByValue,\n                color, newColor;\n\n            if (colorMapByValue && (newColor = colorMapByValue.get(value))) {\n                color = newColor;\n            } else if (colorMapByIndex && colorMapByIndex.length > valuenum) {\n                color = colorMapByIndex[valuenum];\n            } else if (values[valuenum] < 0) {\n                color = options.get('negBarColor');\n            } else if (values[valuenum] > 0) {\n                color = options.get('posBarColor');\n            } else {\n                color = options.get('zeroBarColor');\n            }\n            return color;\n        },\n\n        renderRegion: function (valuenum, highlight) {\n            var values = this.values,\n                options = this.options,\n                target = this.target,\n                canvasHeight, height, halfHeight,\n                x, y, color;\n\n            canvasHeight = target.pixelHeight;\n            halfHeight = Math.round(canvasHeight / 2);\n\n            x = valuenum * this.totalBarWidth;\n            if (values[valuenum] < 0) {\n                y = halfHeight;\n                height = halfHeight - 1;\n            } else if (values[valuenum] > 0) {\n                y = 0;\n                height = halfHeight - 1;\n            } else {\n                y = halfHeight - 1;\n                height = 2;\n            }\n            color = this.calcColor(values[valuenum], valuenum);\n            if (color === null) {\n                return;\n            }\n            if (highlight) {\n                color = this.calcHighlightColor(color, options);\n            }\n            return target.drawRect(x, y, this.barWidth - 1, height - 1, color, color);\n        }\n    });\n\n\n    /**\n     * Discrete charts\n     */\n    $.fn.sparkline.discrete = discrete = createClass($.fn.sparkline._base, barHighlightMixin, {\n        type: 'discrete',\n\n        init: function (el, values, options, width, height) {\n            discrete._super.init.call(this, el, values, options, width, height);\n\n            this.regionShapes = {};\n            this.values = values = $.map(values, Number);\n            this.min = Math.min.apply(Math, values);\n            this.max = Math.max.apply(Math, values);\n            this.range = this.max - this.min;\n            this.width = width = options.get('width') === 'auto' ? values.length * 2 : this.width;\n            this.interval = Math.floor(width / values.length);\n            this.itemWidth = width / values.length;\n            if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < this.min)) {\n                this.min = options.get('chartRangeMin');\n            }\n            if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > this.max)) {\n                this.max = options.get('chartRangeMax');\n            }\n            this.initTarget();\n            if (this.target) {\n                this.lineHeight = options.get('lineHeight') === 'auto' ? Math.round(this.canvasHeight * 0.3) : options.get('lineHeight');\n            }\n        },\n\n        getRegion: function (el, x, y) {\n            return Math.floor(x / this.itemWidth);\n        },\n\n        getCurrentRegionFields: function () {\n            var currentRegion = this.currentRegion;\n            return {\n                isNull: this.values[currentRegion] === undefined,\n                value: this.values[currentRegion],\n                offset: currentRegion\n            };\n        },\n\n        renderRegion: function (valuenum, highlight) {\n            var values = this.values,\n                options = this.options,\n                min = this.min,\n                max = this.max,\n                range = this.range,\n                interval = this.interval,\n                target = this.target,\n                canvasHeight = this.canvasHeight,\n                lineHeight = this.lineHeight,\n                pheight = canvasHeight - lineHeight,\n                ytop, val, color, x;\n\n            val = clipval(values[valuenum], min, max);\n            x = valuenum * interval;\n            ytop = Math.round(pheight - pheight * ((val - min) / range));\n            color = (options.get('thresholdColor') && val < options.get('thresholdValue')) ? options.get('thresholdColor') : options.get('lineColor');\n            if (highlight) {\n                color = this.calcHighlightColor(color, options);\n            }\n            return target.drawLine(x, ytop, x, ytop + lineHeight, color);\n        }\n    });\n\n\n    /**\n     * Bullet charts\n     */\n    $.fn.sparkline.bullet = bullet = createClass($.fn.sparkline._base, {\n        type: 'bullet',\n\n        init: function (el, values, options, width, height) {\n            var min, max, vals;\n            bullet._super.init.call(this, el, values, options, width, height);\n\n            // values: target, performance, range1, range2, range3\n            this.values = values = normalizeValues(values);\n            // target or performance could be null\n            vals = values.slice();\n            vals[0] = vals[0] === null ? vals[2] : vals[0];\n            vals[1] = values[1] === null ? vals[2] : vals[1];\n            min = Math.min.apply(Math, values);\n            max = Math.max.apply(Math, values);\n            if (options.get('base') === undefined) {\n                min = min < 0 ? min : 0;\n            } else {\n                min = options.get('base');\n            }\n            this.min = min;\n            this.max = max;\n            this.range = max - min;\n            this.shapes = {};\n            this.valueShapes = {};\n            this.regiondata = {};\n            this.width = width = options.get('width') === 'auto' ? '4.0em' : width;\n            this.target = this.$el.simpledraw(width, height, options.get('composite'));\n            if (!values.length) {\n                this.disabled = true;\n            }\n            this.initTarget();\n        },\n\n        getRegion: function (el, x, y) {\n            var shapeid = this.target.getShapeAt(el, x, y);\n            return (shapeid !== undefined && this.shapes[shapeid] !== undefined) ? this.shapes[shapeid] : undefined;\n        },\n\n        getCurrentRegionFields: function () {\n            var currentRegion = this.currentRegion;\n            return {\n                fieldkey: currentRegion.substr(0, 1),\n                value: this.values[currentRegion.substr(1)],\n                region: currentRegion\n            };\n        },\n\n        changeHighlight: function (highlight) {\n            var currentRegion = this.currentRegion,\n                shapeid = this.valueShapes[currentRegion],\n                shape;\n            delete this.shapes[shapeid];\n            switch (currentRegion.substr(0, 1)) {\n                case 'r':\n                    shape = this.renderRange(currentRegion.substr(1), highlight);\n                    break;\n                case 'p':\n                    shape = this.renderPerformance(highlight);\n                    break;\n                case 't':\n                    shape = this.renderTarget(highlight);\n                    break;\n            }\n            this.valueShapes[currentRegion] = shape.id;\n            this.shapes[shape.id] = currentRegion;\n            this.target.replaceWithShape(shapeid, shape);\n        },\n\n        renderRange: function (rn, highlight) {\n            var rangeval = this.values[rn],\n                rangewidth = Math.round(this.canvasWidth * ((rangeval - this.min) / this.range)),\n                color = this.options.get('rangeColors')[rn - 2];\n            if (highlight) {\n                color = this.calcHighlightColor(color, this.options);\n            }\n            return this.target.drawRect(0, 0, rangewidth - 1, this.canvasHeight - 1, color, color);\n        },\n\n        renderPerformance: function (highlight) {\n            var perfval = this.values[1],\n                perfwidth = Math.round(this.canvasWidth * ((perfval - this.min) / this.range)),\n                color = this.options.get('performanceColor');\n            if (highlight) {\n                color = this.calcHighlightColor(color, this.options);\n            }\n            return this.target.drawRect(0, Math.round(this.canvasHeight * 0.3), perfwidth - 1,\n                Math.round(this.canvasHeight * 0.4) - 1, color, color);\n        },\n\n        renderTarget: function (highlight) {\n            var targetval = this.values[0],\n                x = Math.round(this.canvasWidth * ((targetval - this.min) / this.range) - (this.options.get('targetWidth') / 2)),\n                targettop = Math.round(this.canvasHeight * 0.10),\n                targetheight = this.canvasHeight - (targettop * 2),\n                color = this.options.get('targetColor');\n            if (highlight) {\n                color = this.calcHighlightColor(color, this.options);\n            }\n            return this.target.drawRect(x, targettop, this.options.get('targetWidth') - 1, targetheight - 1, color, color);\n        },\n\n        render: function () {\n            var vlen = this.values.length,\n                target = this.target,\n                i, shape;\n            if (!bullet._super.render.call(this)) {\n                return;\n            }\n            for (i = 2; i < vlen; i++) {\n                shape = this.renderRange(i).append();\n                this.shapes[shape.id] = 'r' + i;\n                this.valueShapes['r' + i] = shape.id;\n            }\n            if (this.values[1] !== null) {\n                shape = this.renderPerformance().append();\n                this.shapes[shape.id] = 'p1';\n                this.valueShapes.p1 = shape.id;\n            }\n            if (this.values[0] !== null) {\n                shape = this.renderTarget().append();\n                this.shapes[shape.id] = 't0';\n                this.valueShapes.t0 = shape.id;\n            }\n            target.render();\n        }\n    });\n\n\n    /**\n     * Pie charts\n     */\n    $.fn.sparkline.pie = pie = createClass($.fn.sparkline._base, {\n        type: 'pie',\n\n        init: function (el, values, options, width, height) {\n            var total = 0, i;\n\n            pie._super.init.call(this, el, values, options, width, height);\n\n            this.shapes = {}; // map shape ids to value offsets\n            this.valueShapes = {}; // maps value offsets to shape ids\n            this.values = values = $.map(values, Number);\n\n            if (options.get('width') === 'auto') {\n                this.width = this.height;\n            }\n\n            if (values.length > 0) {\n                for (i = values.length; i--;) {\n                    total += values[i];\n                }\n            }\n            this.total = total;\n            this.initTarget();\n            this.radius = Math.floor(Math.min(this.canvasWidth, this.canvasHeight) / 2);\n        },\n\n        getRegion: function (el, x, y) {\n            var shapeid = this.target.getShapeAt(el, x, y);\n            return (shapeid !== undefined && this.shapes[shapeid] !== undefined) ? this.shapes[shapeid] : undefined;\n        },\n\n        getCurrentRegionFields: function () {\n            var currentRegion = this.currentRegion;\n            return {\n                isNull: this.values[currentRegion] === undefined,\n                value: this.values[currentRegion],\n                percent: this.values[currentRegion] / this.total * 100,\n                color: this.options.get('sliceColors')[currentRegion % this.options.get('sliceColors').length],\n                offset: currentRegion\n            };\n        },\n\n        changeHighlight: function (highlight) {\n            var currentRegion = this.currentRegion,\n                 newslice = this.renderSlice(currentRegion, highlight),\n                 shapeid = this.valueShapes[currentRegion];\n            delete this.shapes[shapeid];\n            this.target.replaceWithShape(shapeid, newslice);\n            this.valueShapes[currentRegion] = newslice.id;\n            this.shapes[newslice.id] = currentRegion;\n        },\n\n        renderSlice: function (valuenum, highlight) {\n            var target = this.target,\n                options = this.options,\n                radius = this.radius,\n                borderWidth = options.get('borderWidth'),\n                offset = options.get('offset'),\n                circle = 2 * Math.PI,\n                values = this.values,\n                total = this.total,\n                next = offset ? (2*Math.PI)*(offset/360) : 0,\n                start, end, i, vlen, color;\n\n            vlen = values.length;\n            for (i = 0; i < vlen; i++) {\n                start = next;\n                end = next;\n                if (total > 0) {  // avoid divide by zero\n                    end = next + (circle * (values[i] / total));\n                }\n                if (valuenum === i) {\n                    color = options.get('sliceColors')[i % options.get('sliceColors').length];\n                    if (highlight) {\n                        color = this.calcHighlightColor(color, options);\n                    }\n\n                    return target.drawPieSlice(radius, radius, radius - borderWidth, start, end, undefined, color);\n                }\n                next = end;\n            }\n        },\n\n        render: function () {\n            var target = this.target,\n                values = this.values,\n                options = this.options,\n                radius = this.radius,\n                borderWidth = options.get('borderWidth'),\n                shape, i;\n\n            if (!pie._super.render.call(this)) {\n                return;\n            }\n            if (borderWidth) {\n                target.drawCircle(radius, radius, Math.floor(radius - (borderWidth / 2)),\n                    options.get('borderColor'), undefined, borderWidth).append();\n            }\n            for (i = values.length; i--;) {\n                if (values[i]) { // don't render zero values\n                    shape = this.renderSlice(i).append();\n                    this.valueShapes[i] = shape.id; // store just the shapeid\n                    this.shapes[shape.id] = i;\n                }\n            }\n            target.render();\n        }\n    });\n\n\n    /**\n     * Box plots\n     */\n    $.fn.sparkline.box = box = createClass($.fn.sparkline._base, {\n        type: 'box',\n\n        init: function (el, values, options, width, height) {\n            box._super.init.call(this, el, values, options, width, height);\n            this.values = $.map(values, Number);\n            this.width = options.get('width') === 'auto' ? '4.0em' : width;\n            this.initTarget();\n            if (!this.values.length) {\n                this.disabled = 1;\n            }\n        },\n\n        /**\n         * Simulate a single region\n         */\n        getRegion: function () {\n            return 1;\n        },\n\n        getCurrentRegionFields: function () {\n            var result = [\n                { field: 'lq', value: this.quartiles[0] },\n                { field: 'med', value: this.quartiles[1] },\n                { field: 'uq', value: this.quartiles[2] }\n            ];\n            if (this.loutlier !== undefined) {\n                result.push({ field: 'lo', value: this.loutlier});\n            }\n            if (this.routlier !== undefined) {\n                result.push({ field: 'ro', value: this.routlier});\n            }\n            if (this.lwhisker !== undefined) {\n                result.push({ field: 'lw', value: this.lwhisker});\n            }\n            if (this.rwhisker !== undefined) {\n                result.push({ field: 'rw', value: this.rwhisker});\n            }\n            return result;\n        },\n\n        render: function () {\n            var target = this.target,\n                values = this.values,\n                vlen = values.length,\n                options = this.options,\n                canvasWidth = this.canvasWidth,\n                canvasHeight = this.canvasHeight,\n                minValue = options.get('chartRangeMin') === undefined ? Math.min.apply(Math, values) : options.get('chartRangeMin'),\n                maxValue = options.get('chartRangeMax') === undefined ? Math.max.apply(Math, values) : options.get('chartRangeMax'),\n                canvasLeft = 0,\n                lwhisker, loutlier, iqr, q1, q2, q3, rwhisker, routlier, i,\n                size, unitSize;\n\n            if (!box._super.render.call(this)) {\n                return;\n            }\n\n            if (options.get('raw')) {\n                if (options.get('showOutliers') && values.length > 5) {\n                    loutlier = values[0];\n                    lwhisker = values[1];\n                    q1 = values[2];\n                    q2 = values[3];\n                    q3 = values[4];\n                    rwhisker = values[5];\n                    routlier = values[6];\n                } else {\n                    lwhisker = values[0];\n                    q1 = values[1];\n                    q2 = values[2];\n                    q3 = values[3];\n                    rwhisker = values[4];\n                }\n            } else {\n                values.sort(function (a, b) { return a - b; });\n                q1 = quartile(values, 1);\n                q2 = quartile(values, 2);\n                q3 = quartile(values, 3);\n                iqr = q3 - q1;\n                if (options.get('showOutliers')) {\n                    lwhisker = rwhisker = undefined;\n                    for (i = 0; i < vlen; i++) {\n                        if (lwhisker === undefined && values[i] > q1 - (iqr * options.get('outlierIQR'))) {\n                            lwhisker = values[i];\n                        }\n                        if (values[i] < q3 + (iqr * options.get('outlierIQR'))) {\n                            rwhisker = values[i];\n                        }\n                    }\n                    loutlier = values[0];\n                    routlier = values[vlen - 1];\n                } else {\n                    lwhisker = values[0];\n                    rwhisker = values[vlen - 1];\n                }\n            }\n            this.quartiles = [q1, q2, q3];\n            this.lwhisker = lwhisker;\n            this.rwhisker = rwhisker;\n            this.loutlier = loutlier;\n            this.routlier = routlier;\n\n            unitSize = canvasWidth / (maxValue - minValue + 1);\n            if (options.get('showOutliers')) {\n                canvasLeft = Math.ceil(options.get('spotRadius'));\n                canvasWidth -= 2 * Math.ceil(options.get('spotRadius'));\n                unitSize = canvasWidth / (maxValue - minValue + 1);\n                if (loutlier < lwhisker) {\n                    target.drawCircle((loutlier - minValue) * unitSize + canvasLeft,\n                        canvasHeight / 2,\n                        options.get('spotRadius'),\n                        options.get('outlierLineColor'),\n                        options.get('outlierFillColor')).append();\n                }\n                if (routlier > rwhisker) {\n                    target.drawCircle((routlier - minValue) * unitSize + canvasLeft,\n                        canvasHeight / 2,\n                        options.get('spotRadius'),\n                        options.get('outlierLineColor'),\n                        options.get('outlierFillColor')).append();\n                }\n            }\n\n            // box\n            target.drawRect(\n                Math.round((q1 - minValue) * unitSize + canvasLeft),\n                Math.round(canvasHeight * 0.1),\n                Math.round((q3 - q1) * unitSize),\n                Math.round(canvasHeight * 0.8),\n                options.get('boxLineColor'),\n                options.get('boxFillColor')).append();\n            // left whisker\n            target.drawLine(\n                Math.round((lwhisker - minValue) * unitSize + canvasLeft),\n                Math.round(canvasHeight / 2),\n                Math.round((q1 - minValue) * unitSize + canvasLeft),\n                Math.round(canvasHeight / 2),\n                options.get('lineColor')).append();\n            target.drawLine(\n                Math.round((lwhisker - minValue) * unitSize + canvasLeft),\n                Math.round(canvasHeight / 4),\n                Math.round((lwhisker - minValue) * unitSize + canvasLeft),\n                Math.round(canvasHeight - canvasHeight / 4),\n                options.get('whiskerColor')).append();\n            // right whisker\n            target.drawLine(Math.round((rwhisker - minValue) * unitSize + canvasLeft),\n                Math.round(canvasHeight / 2),\n                Math.round((q3 - minValue) * unitSize + canvasLeft),\n                Math.round(canvasHeight / 2),\n                options.get('lineColor')).append();\n            target.drawLine(\n                Math.round((rwhisker - minValue) * unitSize + canvasLeft),\n                Math.round(canvasHeight / 4),\n                Math.round((rwhisker - minValue) * unitSize + canvasLeft),\n                Math.round(canvasHeight - canvasHeight / 4),\n                options.get('whiskerColor')).append();\n            // median line\n            target.drawLine(\n                Math.round((q2 - minValue) * unitSize + canvasLeft),\n                Math.round(canvasHeight * 0.1),\n                Math.round((q2 - minValue) * unitSize + canvasLeft),\n                Math.round(canvasHeight * 0.9),\n                options.get('medianColor')).append();\n            if (options.get('target')) {\n                size = Math.ceil(options.get('spotRadius'));\n                target.drawLine(\n                    Math.round((options.get('target') - minValue) * unitSize + canvasLeft),\n                    Math.round((canvasHeight / 2) - size),\n                    Math.round((options.get('target') - minValue) * unitSize + canvasLeft),\n                    Math.round((canvasHeight / 2) + size),\n                    options.get('targetColor')).append();\n                target.drawLine(\n                    Math.round((options.get('target') - minValue) * unitSize + canvasLeft - size),\n                    Math.round(canvasHeight / 2),\n                    Math.round((options.get('target') - minValue) * unitSize + canvasLeft + size),\n                    Math.round(canvasHeight / 2),\n                    options.get('targetColor')).append();\n            }\n            target.render();\n        }\n    });\n\n\n    // Setup a very simple \"virtual canvas\" to make drawing the few shapes we need easier\n    // This is accessible as $(foo).simpledraw()\n\n    VShape = createClass({\n        init: function (target, id, type, args) {\n            this.target = target;\n            this.id = id;\n            this.type = type;\n            this.args = args;\n        },\n        append: function () {\n            this.target.appendShape(this);\n            return this;\n        }\n    });\n\n    VCanvas_base = createClass({\n        _pxregex: /(\\d+)(px)?\\s*$/i,\n\n        init: function (width, height, target) {\n            if (!width) {\n                return;\n            }\n            this.width = width;\n            this.height = height;\n            this.target = target;\n            this.lastShapeId = null;\n            if (target[0]) {\n                target = target[0];\n            }\n            $.data(target, '_jqs_vcanvas', this);\n        },\n\n        drawLine: function (x1, y1, x2, y2, lineColor, lineWidth) {\n            return this.drawShape([[x1, y1], [x2, y2]], lineColor, lineWidth);\n        },\n\n        drawShape: function (path, lineColor, fillColor, lineWidth) {\n            return this._genShape('Shape', [path, lineColor, fillColor, lineWidth]);\n        },\n\n        drawCircle: function (x, y, radius, lineColor, fillColor, lineWidth) {\n            return this._genShape('Circle', [x, y, radius, lineColor, fillColor, lineWidth]);\n        },\n\n        drawPieSlice: function (x, y, radius, startAngle, endAngle, lineColor, fillColor) {\n            return this._genShape('PieSlice', [x, y, radius, startAngle, endAngle, lineColor, fillColor]);\n        },\n\n        drawRect: function (x, y, width, height, lineColor, fillColor) {\n            return this._genShape('Rect', [x, y, width, height, lineColor, fillColor]);\n        },\n\n        getElement: function () {\n            return this.canvas;\n        },\n\n        /**\n         * Return the most recently inserted shape id\n         */\n        getLastShapeId: function () {\n            return this.lastShapeId;\n        },\n\n        /**\n         * Clear and reset the canvas\n         */\n        reset: function () {\n            alert('reset not implemented');\n        },\n\n        _insert: function (el, target) {\n            $(target).html(el);\n        },\n\n        /**\n         * Calculate the pixel dimensions of the canvas\n         */\n        _calculatePixelDims: function (width, height, canvas) {\n            // XXX This should probably be a configurable option\n            var match;\n            match = this._pxregex.exec(height);\n            if (match) {\n                this.pixelHeight = match[1];\n            } else {\n                this.pixelHeight = $(canvas).height();\n            }\n            match = this._pxregex.exec(width);\n            if (match) {\n                this.pixelWidth = match[1];\n            } else {\n                this.pixelWidth = $(canvas).width();\n            }\n        },\n\n        /**\n         * Generate a shape object and id for later rendering\n         */\n        _genShape: function (shapetype, shapeargs) {\n            var id = shapeCount++;\n            shapeargs.unshift(id);\n            return new VShape(this, id, shapetype, shapeargs);\n        },\n\n        /**\n         * Add a shape to the end of the render queue\n         */\n        appendShape: function (shape) {\n            alert('appendShape not implemented');\n        },\n\n        /**\n         * Replace one shape with another\n         */\n        replaceWithShape: function (shapeid, shape) {\n            alert('replaceWithShape not implemented');\n        },\n\n        /**\n         * Insert one shape after another in the render queue\n         */\n        insertAfterShape: function (shapeid, shape) {\n            alert('insertAfterShape not implemented');\n        },\n\n        /**\n         * Remove a shape from the queue\n         */\n        removeShapeId: function (shapeid) {\n            alert('removeShapeId not implemented');\n        },\n\n        /**\n         * Find a shape at the specified x/y co-ordinates\n         */\n        getShapeAt: function (el, x, y) {\n            alert('getShapeAt not implemented');\n        },\n\n        /**\n         * Render all queued shapes onto the canvas\n         */\n        render: function () {\n            alert('render not implemented');\n        }\n    });\n\n\n    VCanvas_canvas = createClass(VCanvas_base, {\n        init: function (width, height, target, interact) {\n            VCanvas_canvas._super.init.call(this, width, height, target);\n            this.canvas = document.createElement('canvas');\n            if (target[0]) {\n                target = target[0];\n            }\n            $.data(target, '_jqs_vcanvas', this);\n            $(this.canvas).css({ display: 'inline-block', width: width, height: height, verticalAlign: 'top' });\n            this._insert(this.canvas, target);\n            this._calculatePixelDims(width, height, this.canvas);\n            this.canvas.width = this.pixelWidth;\n            this.canvas.height = this.pixelHeight;\n            this.interact = interact;\n            this.shapes = {};\n            this.shapeseq = [];\n            this.currentTargetShapeId = undefined;\n            $(this.canvas).css({width: this.pixelWidth, height: this.pixelHeight});\n        },\n\n        _getContext: function (lineColor, fillColor, lineWidth) {\n            var context = this.canvas.getContext('2d');\n            if (lineColor !== undefined) {\n                context.strokeStyle = lineColor;\n            }\n            context.lineWidth = lineWidth === undefined ? 1 : lineWidth;\n            if (fillColor !== undefined) {\n                context.fillStyle = fillColor;\n            }\n            return context;\n        },\n\n        reset: function () {\n            var context = this._getContext();\n            context.clearRect(0, 0, this.pixelWidth, this.pixelHeight);\n            this.shapes = {};\n            this.shapeseq = [];\n            this.currentTargetShapeId = undefined;\n        },\n\n        _drawShape: function (shapeid, path, lineColor, fillColor, lineWidth) {\n            var context = this._getContext(lineColor, fillColor, lineWidth),\n                i, plen;\n            context.beginPath();\n            context.moveTo(path[0][0] + 0.5, path[0][1] + 0.5);\n            for (i = 1, plen = path.length; i < plen; i++) {\n                context.lineTo(path[i][0] + 0.5, path[i][1] + 0.5); // the 0.5 offset gives us crisp pixel-width lines\n            }\n            if (lineColor !== undefined) {\n                context.stroke();\n            }\n            if (fillColor !== undefined) {\n                context.fill();\n            }\n            if (this.targetX !== undefined && this.targetY !== undefined &&\n                context.isPointInPath(this.targetX, this.targetY)) {\n                this.currentTargetShapeId = shapeid;\n            }\n        },\n\n        _drawCircle: function (shapeid, x, y, radius, lineColor, fillColor, lineWidth) {\n            var context = this._getContext(lineColor, fillColor, lineWidth);\n            context.beginPath();\n            context.arc(x, y, radius, 0, 2 * Math.PI, false);\n            if (this.targetX !== undefined && this.targetY !== undefined &&\n                context.isPointInPath(this.targetX, this.targetY)) {\n                this.currentTargetShapeId = shapeid;\n            }\n            if (lineColor !== undefined) {\n                context.stroke();\n            }\n            if (fillColor !== undefined) {\n                context.fill();\n            }\n        },\n\n        _drawPieSlice: function (shapeid, x, y, radius, startAngle, endAngle, lineColor, fillColor) {\n            var context = this._getContext(lineColor, fillColor);\n            context.beginPath();\n            context.moveTo(x, y);\n            context.arc(x, y, radius, startAngle, endAngle, false);\n            context.lineTo(x, y);\n            context.closePath();\n            if (lineColor !== undefined) {\n                context.stroke();\n            }\n            if (fillColor) {\n                context.fill();\n            }\n            if (this.targetX !== undefined && this.targetY !== undefined &&\n                context.isPointInPath(this.targetX, this.targetY)) {\n                this.currentTargetShapeId = shapeid;\n            }\n        },\n\n        _drawRect: function (shapeid, x, y, width, height, lineColor, fillColor) {\n            return this._drawShape(shapeid, [[x, y], [x + width, y], [x + width, y + height], [x, y + height], [x, y]], lineColor, fillColor);\n        },\n\n        appendShape: function (shape) {\n            this.shapes[shape.id] = shape;\n            this.shapeseq.push(shape.id);\n            this.lastShapeId = shape.id;\n            return shape.id;\n        },\n\n        replaceWithShape: function (shapeid, shape) {\n            var shapeseq = this.shapeseq,\n                i;\n            this.shapes[shape.id] = shape;\n            for (i = shapeseq.length; i--;) {\n                if (shapeseq[i] == shapeid) {\n                    shapeseq[i] = shape.id;\n                }\n            }\n            delete this.shapes[shapeid];\n        },\n\n        replaceWithShapes: function (shapeids, shapes) {\n            var shapeseq = this.shapeseq,\n                shapemap = {},\n                sid, i, first;\n\n            for (i = shapeids.length; i--;) {\n                shapemap[shapeids[i]] = true;\n            }\n            for (i = shapeseq.length; i--;) {\n                sid = shapeseq[i];\n                if (shapemap[sid]) {\n                    shapeseq.splice(i, 1);\n                    delete this.shapes[sid];\n                    first = i;\n                }\n            }\n            for (i = shapes.length; i--;) {\n                shapeseq.splice(first, 0, shapes[i].id);\n                this.shapes[shapes[i].id] = shapes[i];\n            }\n\n        },\n\n        insertAfterShape: function (shapeid, shape) {\n            var shapeseq = this.shapeseq,\n                i;\n            for (i = shapeseq.length; i--;) {\n                if (shapeseq[i] === shapeid) {\n                    shapeseq.splice(i + 1, 0, shape.id);\n                    this.shapes[shape.id] = shape;\n                    return;\n                }\n            }\n        },\n\n        removeShapeId: function (shapeid) {\n            var shapeseq = this.shapeseq,\n                i;\n            for (i = shapeseq.length; i--;) {\n                if (shapeseq[i] === shapeid) {\n                    shapeseq.splice(i, 1);\n                    break;\n                }\n            }\n            delete this.shapes[shapeid];\n        },\n\n        getShapeAt: function (el, x, y) {\n            this.targetX = x;\n            this.targetY = y;\n            this.render();\n            return this.currentTargetShapeId;\n        },\n\n        render: function () {\n            var shapeseq = this.shapeseq,\n                shapes = this.shapes,\n                shapeCount = shapeseq.length,\n                context = this._getContext(),\n                shapeid, shape, i;\n            context.clearRect(0, 0, this.pixelWidth, this.pixelHeight);\n            for (i = 0; i < shapeCount; i++) {\n                shapeid = shapeseq[i];\n                shape = shapes[shapeid];\n                this['_draw' + shape.type].apply(this, shape.args);\n            }\n            if (!this.interact) {\n                // not interactive so no need to keep the shapes array\n                this.shapes = {};\n                this.shapeseq = [];\n            }\n        }\n\n    });\n\n\n    VCanvas_vml = createClass(VCanvas_base, {\n        init: function (width, height, target) {\n            var groupel;\n            VCanvas_vml._super.init.call(this, width, height, target);\n            if (target[0]) {\n                target = target[0];\n            }\n            $.data(target, '_jqs_vcanvas', this);\n            this.canvas = document.createElement('span');\n            $(this.canvas).css({ display: 'inline-block', position: 'relative', overflow: 'hidden', width: width, height: height, margin: '0px', padding: '0px', verticalAlign: 'top'});\n            this._insert(this.canvas, target);\n            this._calculatePixelDims(width, height, this.canvas);\n            this.canvas.width = this.pixelWidth;\n            this.canvas.height = this.pixelHeight;\n            groupel = '<v:group coordorigin=\"0 0\" coordsize=\"' + this.pixelWidth + ' ' + this.pixelHeight + '\"' +\n                    ' style=\"position:absolute;top:0;left:0;width:' + this.pixelWidth + 'px;height=' + this.pixelHeight + 'px;\"></v:group>';\n            this.canvas.insertAdjacentHTML('beforeEnd', groupel);\n            this.group = $(this.canvas).children()[0];\n            this.rendered = false;\n            this.prerender = '';\n        },\n\n        _drawShape: function (shapeid, path, lineColor, fillColor, lineWidth) {\n            var vpath = [],\n                initial, stroke, fill, closed, vel, plen, i;\n            for (i = 0, plen = path.length; i < plen; i++) {\n                vpath[i] = '' + (path[i][0]) + ',' + (path[i][1]);\n            }\n            initial = vpath.splice(0, 1);\n            lineWidth = lineWidth === undefined ? 1 : lineWidth;\n            stroke = lineColor === undefined ? ' stroked=\"false\" ' : ' strokeWeight=\"' + lineWidth + 'px\" strokeColor=\"' + lineColor + '\" ';\n            fill = fillColor === undefined ? ' filled=\"false\"' : ' fillColor=\"' + fillColor + '\" filled=\"true\" ';\n            closed = vpath[0] === vpath[vpath.length - 1] ? 'x ' : '';\n            vel = '<v:shape coordorigin=\"0 0\" coordsize=\"' + this.pixelWidth + ' ' + this.pixelHeight + '\" ' +\n                 ' id=\"jqsshape' + shapeid + '\" ' +\n                 stroke +\n                 fill +\n                ' style=\"position:absolute;left:0px;top:0px;height:' + this.pixelHeight + 'px;width:' + this.pixelWidth + 'px;padding:0px;margin:0px;\" ' +\n                ' path=\"m ' + initial + ' l ' + vpath.join(', ') + ' ' + closed + 'e\">' +\n                ' </v:shape>';\n            return vel;\n        },\n\n        _drawCircle: function (shapeid, x, y, radius, lineColor, fillColor, lineWidth) {\n            var stroke, fill, vel;\n            x -= radius;\n            y -= radius;\n            stroke = lineColor === undefined ? ' stroked=\"false\" ' : ' strokeWeight=\"' + lineWidth + 'px\" strokeColor=\"' + lineColor + '\" ';\n            fill = fillColor === undefined ? ' filled=\"false\"' : ' fillColor=\"' + fillColor + '\" filled=\"true\" ';\n            vel = '<v:oval ' +\n                 ' id=\"jqsshape' + shapeid + '\" ' +\n                stroke +\n                fill +\n                ' style=\"position:absolute;top:' + y + 'px; left:' + x + 'px; width:' + (radius * 2) + 'px; height:' + (radius * 2) + 'px\"></v:oval>';\n            return vel;\n\n        },\n\n        _drawPieSlice: function (shapeid, x, y, radius, startAngle, endAngle, lineColor, fillColor) {\n            var vpath, startx, starty, endx, endy, stroke, fill, vel;\n            if (startAngle === endAngle) {\n                return '';  // VML seems to have problem when start angle equals end angle.\n            }\n            if ((endAngle - startAngle) === (2 * Math.PI)) {\n                startAngle = 0.0;  // VML seems to have a problem when drawing a full circle that doesn't start 0\n                endAngle = (2 * Math.PI);\n            }\n\n            startx = x + Math.round(Math.cos(startAngle) * radius);\n            starty = y + Math.round(Math.sin(startAngle) * radius);\n            endx = x + Math.round(Math.cos(endAngle) * radius);\n            endy = y + Math.round(Math.sin(endAngle) * radius);\n\n            if (startx === endx && starty === endy) {\n                if ((endAngle - startAngle) < Math.PI) {\n                    // Prevent very small slices from being mistaken as a whole pie\n                    return '';\n                }\n                // essentially going to be the entire circle, so ignore startAngle\n                startx = endx = x + radius;\n                starty = endy = y;\n            }\n\n            if (startx === endx && starty === endy && (endAngle - startAngle) < Math.PI) {\n                return '';\n            }\n\n            vpath = [x - radius, y - radius, x + radius, y + radius, startx, starty, endx, endy];\n            stroke = lineColor === undefined ? ' stroked=\"false\" ' : ' strokeWeight=\"1px\" strokeColor=\"' + lineColor + '\" ';\n            fill = fillColor === undefined ? ' filled=\"false\"' : ' fillColor=\"' + fillColor + '\" filled=\"true\" ';\n            vel = '<v:shape coordorigin=\"0 0\" coordsize=\"' + this.pixelWidth + ' ' + this.pixelHeight + '\" ' +\n                 ' id=\"jqsshape' + shapeid + '\" ' +\n                 stroke +\n                 fill +\n                ' style=\"position:absolute;left:0px;top:0px;height:' + this.pixelHeight + 'px;width:' + this.pixelWidth + 'px;padding:0px;margin:0px;\" ' +\n                ' path=\"m ' + x + ',' + y + ' wa ' + vpath.join(', ') + ' x e\">' +\n                ' </v:shape>';\n            return vel;\n        },\n\n        _drawRect: function (shapeid, x, y, width, height, lineColor, fillColor) {\n            return this._drawShape(shapeid, [[x, y], [x, y + height], [x + width, y + height], [x + width, y], [x, y]], lineColor, fillColor);\n        },\n\n        reset: function () {\n            this.group.innerHTML = '';\n        },\n\n        appendShape: function (shape) {\n            var vel = this['_draw' + shape.type].apply(this, shape.args);\n            if (this.rendered) {\n                this.group.insertAdjacentHTML('beforeEnd', vel);\n            } else {\n                this.prerender += vel;\n            }\n            this.lastShapeId = shape.id;\n            return shape.id;\n        },\n\n        replaceWithShape: function (shapeid, shape) {\n            var existing = $('#jqsshape' + shapeid),\n                vel = this['_draw' + shape.type].apply(this, shape.args);\n            existing[0].outerHTML = vel;\n        },\n\n        replaceWithShapes: function (shapeids, shapes) {\n            // replace the first shapeid with all the new shapes then toast the remaining old shapes\n            var existing = $('#jqsshape' + shapeids[0]),\n                replace = '',\n                slen = shapes.length,\n                i;\n            for (i = 0; i < slen; i++) {\n                replace += this['_draw' + shapes[i].type].apply(this, shapes[i].args);\n            }\n            existing[0].outerHTML = replace;\n            for (i = 1; i < shapeids.length; i++) {\n                $('#jqsshape' + shapeids[i]).remove();\n            }\n        },\n\n        insertAfterShape: function (shapeid, shape) {\n            var existing = $('#jqsshape' + shapeid),\n                 vel = this['_draw' + shape.type].apply(this, shape.args);\n            existing[0].insertAdjacentHTML('afterEnd', vel);\n        },\n\n        removeShapeId: function (shapeid) {\n            var existing = $('#jqsshape' + shapeid);\n            this.group.removeChild(existing[0]);\n        },\n\n        getShapeAt: function (el, x, y) {\n            var shapeid = el.id.substr(8);\n            return shapeid;\n        },\n\n        render: function () {\n            if (!this.rendered) {\n                // batch the intial render into a single repaint\n                this.group.innerHTML = this.prerender;\n                this.rendered = true;\n            }\n        }\n    });\n\n\n}))}(document, Math));\n"},519:function(e,t,n){n(511)(n(518))},520:function(e,t){!function(e,t,n,a){function i(t,n){this.obj=e(t),this.o=e.extend({},e.fn[l].defaults,n),this.objId=this.obj.attr("id"),this.pwCtrls=".jarviswidget-ctrls",this.widget=this.obj.find(this.o.widgets),this.toggleClass=this.o.toggleClass.split("|"),this.editClass=this.o.editClass.split("|"),this.fullscreenClass=this.o.fullscreenClass.split("|"),this.customClass=this.o.customClass.split("|"),this.storage={enabled:this.o.localStorage},this.initialized=!1,this.init()}var l="jarvisWidgets",s=("ontouchstart"in t||t.DocumentTouch&&n instanceof DocumentTouch?"touchstart":"click")+"."+l;i.prototype={_runLoaderWidget:function(e){var t=this;!0===t.o.indicator&&e.parents(t.o.widgets).find(".jarviswidget-loader:first").stop(!0,!0).fadeIn(100).delay(t.o.indicatorTime).fadeOut(100)},_getPastTimestamp:function(e){var t=this,n=new Date(e),a=n.getMonth()+1,i=n.getDate(),l=n.getFullYear(),s=n.getHours(),o=n.getMinutes(),r=n.getUTCSeconds();return a<10&&(a="0"+a),i<10&&(i="0"+i),s<10&&(s="0"+s),o<10&&(o="0"+o),r<10&&(r="0"+r),t.o.timestampFormat.replace(/%d%/g,i).replace(/%m%/g,a).replace(/%y%/g,l).replace(/%h%/g,s).replace(/%i%/g,o).replace(/%s%/g,r)},_loadAjaxFile:function(t,n,a){var i=this;t.find(".widget-body").load(n,function(n,a,l){var s=e(this);if("error"==a&&s.html('<h4 class="alert alert-danger">'+i.o.labelError+"<b> "+l.status+" "+l.statusText+"</b></h4>"),"success"==a){var o=t.find(i.o.timestampPlaceholder);o.length&&o.html(i._getPastTimestamp(new Date)),"function"==typeof i.o.afterLoad&&i.o.afterLoad.call(this,t)}i=null}),this._runLoaderWidget(a)},_loadKeys:function(){var e=this;if(!0===e.o.ajaxnav){var t=location.hash.replace(/^#/,"");e.storage.keySettings="Plugin_settings_"+t+"_"+e.objId,e.storage.keyPosition="Plugin_position_"+t+"_"+e.objId}else if(!1===e.initialized){var t=e.o.pageKey||location.pathname;e.storage.keySettings="jarvisWidgets_settings_"+t+"_"+e.objId,e.storage.keyPosition="jarvisWidgets_position_"+t+"_"+e.objId}},_saveSettingsWidget:function(){var t=this,n=t.storage;t._loadKeys();var a=t.obj.find(t.o.widgets).map(function(){var t={};return t.id=e(this).attr("id"),t.style=e(this).attr("data-widget-attstyle"),t.title=e(this).children("header").children("h2").text(),t.hidden="none"==e(this).css("display")?1:0,t.collapsed=e(this).hasClass("jarviswidget-collapsed")?1:0,t}).get(),i=JSON.stringify({widget:a});n.enabled&&n.getKeySettings!=i&&(localStorage.setItem(n.keySettings,i),n.getKeySettings=i),"function"==typeof t.o.onSave&&t.o.onSave.call(this,null,i,n.keySettings)},_savePositionWidget:function(){var t=this,n=t.storage;t._loadKeys();var a=t.obj.find(t.o.grid+".sortable-grid").map(function(){return{section:e(this).find(t.o.widgets).map(function(){return{id:e(this).attr("id")}}).get()}}).get(),i=JSON.stringify({grid:a});n.enabled&&n.getKeyPosition!=i&&(localStorage.setItem(n.keyPosition,i),n.getKeyPosition=i),"function"==typeof t.o.onSave&&t.o.onSave.call(this,i,n.keyPosition)},init:function(){var t=this;if(!t.initialized){if(t._initStorage(t.storage),e("#"+t.objId).length||alert("It looks like your using a class instead of an ID, dont do that!"),!0===t.o.rtl&&e("body").addClass("rtl"),e(t.o.grid).each(function(){e(this).find(t.o.widgets).length&&e(this).addClass("sortable-grid")}),t.storage.enabled&&t.storage.getKeyPosition){var n=JSON.parse(t.storage.getKeyPosition);for(var a in n.grid){var i=t.obj.find(t.o.grid+".sortable-grid").eq(a);for(var o in n.grid[a].section)i.append(e("#"+n.grid[a].section[o].id))}}if(t.storage.enabled&&t.storage.getKeySettings){var r=JSON.parse(t.storage.getKeySettings);for(var a in r.widget){var h=e("#"+r.widget[a].id);r.widget[a].style&&h.removeClassPrefix("jarviswidget-color-").addClass(r.widget[a].style).attr("data-widget-attstyle",""+r.widget[a].style),1==r.widget[a].hidden?h.hide(1):h.show(1).removeAttr("data-widget-hidden"),1==r.widget[a].collapsed&&h.addClass("jarviswidget-collapsed").children("div").hide(1),h.children("header").children("h2").text()!=r.widget[a].title&&h.children("header").children("h2").text(r.widget[a].title)}}if(t.widget.each(function(){var n,a,i,l,s,o,r,h,c=e(this),d=e(this).children("header");if(!d.parent().attr("role")){!0===c.data("widget-hidden")&&c.hide(),!0===c.data("widget-collapsed")&&c.addClass("jarviswidget-collapsed").children("div").hide(),n=!0===t.o.customButton&&void 0===c.data("widget-custombutton")&&0!==t.customClass[0].length?'<a href="javascript:void(0);" class="button-icon jarviswidget-custom-btn"><i class="'+t.customClass[0]+'"></i></a>':"",a=!0===t.o.deleteButton&&void 0===c.data("widget-deletebutton")?'<a href="javascript:void(0);" class="button-icon jarviswidget-delete-btn" rel="tooltip" title="Delete" data-placement="bottom"><i class="'+t.o.deleteClass+'"></i></a>':"",i=!0===t.o.editButton&&void 0===c.data("widget-editbutton")?'<a href="javascript:void(0);" class="button-icon jarviswidget-edit-btn" rel="tooltip" title="Edit" data-placement="bottom"><i class="'+t.editClass[0]+'"></i></a>':"",l=!0===t.o.fullscreenButton&&void 0===c.data("widget-fullscreenbutton")?'<a href="javascript:void(0);" class="button-icon jarviswidget-fullscreen-btn" rel="tooltip" title="Fullscreen" data-placement="bottom"><i class="'+t.fullscreenClass[0]+'"></i></a>':"",!0===t.o.colorButton&&void 0===c.data("widget-colorbutton")?(s='<a data-toggle="dropdown" class="dropdown-toggle color-box selector" href="javascript:void(0);"></a><ul class="dropdown-menu arrow-box-up-right color-select pull-right"><li><span class="bg-color-green" data-widget-setstyle="jarviswidget-color-green" rel="tooltip" data-placement="left" data-original-title="Green Grass"></span></li><li><span class="bg-color-greenDark" data-widget-setstyle="jarviswidget-color-greenDark" rel="tooltip" data-placement="top" data-original-title="Dark Green"></span></li><li><span class="bg-color-greenLight" data-widget-setstyle="jarviswidget-color-greenLight" rel="tooltip" data-placement="top" data-original-title="Light Green"></span></li><li><span class="bg-color-purple" data-widget-setstyle="jarviswidget-color-purple" rel="tooltip" data-placement="top" data-original-title="Purple"></span></li><li><span class="bg-color-magenta" data-widget-setstyle="jarviswidget-color-magenta" rel="tooltip" data-placement="top" data-original-title="Magenta"></span></li><li><span class="bg-color-pink" data-widget-setstyle="jarviswidget-color-pink" rel="tooltip" data-placement="right" data-original-title="Pink"></span></li><li><span class="bg-color-pinkDark" data-widget-setstyle="jarviswidget-color-pinkDark" rel="tooltip" data-placement="left" data-original-title="Fade Pink"></span></li><li><span class="bg-color-blueLight" data-widget-setstyle="jarviswidget-color-blueLight" rel="tooltip" data-placement="top" data-original-title="Light Blue"></span></li><li><span class="bg-color-teal" data-widget-setstyle="jarviswidget-color-teal" rel="tooltip" data-placement="top" data-original-title="Teal"></span></li><li><span class="bg-color-blue" data-widget-setstyle="jarviswidget-color-blue" rel="tooltip" data-placement="top" data-original-title="Ocean Blue"></span></li><li><span class="bg-color-blueDark" data-widget-setstyle="jarviswidget-color-blueDark" rel="tooltip" data-placement="top" data-original-title="Night Sky"></span></li><li><span class="bg-color-darken" data-widget-setstyle="jarviswidget-color-darken" rel="tooltip" data-placement="right" data-original-title="Night"></span></li><li><span class="bg-color-yellow" data-widget-setstyle="jarviswidget-color-yellow" rel="tooltip" data-placement="left" data-original-title="Day Light"></span></li><li><span class="bg-color-orange" data-widget-setstyle="jarviswidget-color-orange" rel="tooltip" data-placement="bottom" data-original-title="Orange"></span></li><li><span class="bg-color-orangeDark" data-widget-setstyle="jarviswidget-color-orangeDark" rel="tooltip" data-placement="bottom" data-original-title="Dark Orange"></span></li><li><span class="bg-color-red" data-widget-setstyle="jarviswidget-color-red" rel="tooltip" data-placement="bottom" data-original-title="Red Rose"></span></li><li><span class="bg-color-redLight" data-widget-setstyle="jarviswidget-color-redLight" rel="tooltip" data-placement="bottom" data-original-title="Light Red"></span></li><li><span class="bg-color-white" data-widget-setstyle="jarviswidget-color-white" rel="tooltip" data-placement="right" data-original-title="Purity"></span></li><li><a href="javascript:void(0);" class="jarviswidget-remove-colors" data-widget-setstyle="" rel="tooltip" data-placement="bottom" data-original-title="Reset widget color to default">Remove</a></li></ul>',d.prepend('<div class="widget-toolbar">'+s+"</div>")):s="",!0===t.o.toggleButton&&void 0===c.data("widget-togglebutton")?(r=!0===c.data("widget-collapsed")||c.hasClass("jarviswidget-collapsed")?t.toggleClass[1]:t.toggleClass[0],o='<a href="javascript:void(0);" class="button-icon jarviswidget-toggle-btn" rel="tooltip" title="Collapse" data-placement="bottom"><i class="'+r+'"></i></a>'):o="",h=!0===t.o.refreshButton&&!1!==c.data("widget-refreshbutton")&&c.data("widget-load")?'<a href="javascript:void(0);" class="button-icon jarviswidget-refresh-btn" data-loading-text="&nbsp;&nbsp;Loading...&nbsp;" rel="tooltip" title="Refresh" data-placement="bottom"><i class="'+t.o.refreshButtonClass+'"></i></a>':"";var u=t.o.buttonOrder.replace(/%refresh%/g,h).replace(/%delete%/g,a).replace(/%custom%/g,n).replace(/%fullscreen%/g,l).replace(/%edit%/g,i).replace(/%toggle%/g,o);""===h&&""===a&&""===n&&""===l&&""===i&&""===o||d.prepend('<div class="jarviswidget-ctrls">'+u+"</div>"),!0===t.o.sortable&&void 0===c.data("widget-sortable")&&c.addClass("jarviswidget-sortable"),c.find(t.o.editPlaceholder).length&&c.find(t.o.editPlaceholder).find("input").val(e.trim(d.children("h2").text())),d.append('<span class="jarviswidget-loader"><i class="fa fa-refresh fa-spin"></i></span>'),c.attr("role","widget").children("div").attr("role","content").prev("header").attr("role","heading").children("div").attr("role","menu")}}),!0===t.o.buttonsHidden&&e(t.o.pwCtrls).hide(),t.obj.find("[data-widget-load]").each(function(){var n=e(this),a=n.children(),i=n.data("widget-load"),l=1e3*n.data("widget-refresh");n.children();n.find(".jarviswidget-ajax-placeholder").length||(n.children("widget-body").append('<div class="jarviswidget-ajax-placeholder">'+t.o.loadingLabel+"</div>"),n.data("widget-refresh")>0?(t._loadAjaxFile(n,i,a),e.intervalArr.push(setInterval(function(){t._loadAjaxFile(n,i,a)},l))):t._loadAjaxFile(n,i,a))}),!0===t.o.sortable&&jQuery.ui){var c=t.obj.find(t.o.grid+".sortable-grid").not("[data-widget-excludegrid]");c.sortable({items:c.find(t.o.widgets+".jarviswidget-sortable"),connectWith:c,placeholder:t.o.placeholderClass,cursor:"move",revert:!0,opacity:t.o.opacity,delay:200,cancel:".button-icon, #jarviswidget-fullscreen-mode > div",zIndex:1e4,handle:t.o.dragHandle,forcePlaceholderSize:!0,forceHelperSize:!0,update:function(e,n){t._runLoaderWidget(n.item.children()),t._savePositionWidget(),"function"==typeof t.o.onChange&&t.o.onChange.call(this,n.item)}})}!0===t.o.buttonsHidden&&t.widget.children("header").on("mouseenter."+l,function(){e(this).children(t.o.pwCtrls).stop(!0,!0).fadeTo(100,1)}).on("mouseleave."+l,function(){e(this).children(t.o.pwCtrls).stop(!0,!0).fadeTo(100,0)}),t._clickEvents(),t.storage.enabled&&(e(t.o.deleteSettingsKey).on(s,this,function(e){confirm(t.o.settingsKeyLabel)&&localStorage.removeItem(keySettings),e.preventDefault()}),e(t.o.deletePositionKey).on(s,this,function(e){confirm(t.o.positionKeyLabel)&&localStorage.removeItem(keyPosition),e.preventDefault()})),initialized=!0}},_initStorage:function(e){e.enabled=e.enabled&&!!function(){var e,t=+new Date;try{return localStorage.setItem(t,t),e=localStorage.getItem(t)==t,localStorage.removeItem(t),e}catch(e){}}(),this._loadKeys(),e.enabled&&(e.getKeySettings=localStorage.getItem(e.keySettings),e.getKeyPosition=localStorage.getItem(e.keyPosition))},_clickEvents:function(){function n(){if(e("#jarviswidget-fullscreen-mode").length){var n=e(t).height(),i=e("#jarviswidget-fullscreen-mode").children(a.o.widgets).children("header").height();e("#jarviswidget-fullscreen-mode").children(a.o.widgets).children("div").height(n-i-15)}}var a=this,i=a.widget.children("header");i.on(s,".jarviswidget-toggle-btn",function(t){var n=e(this),i=n.parents(a.o.widgets);a._runLoaderWidget(n),i.hasClass("jarviswidget-collapsed")?n.children().removeClass(a.toggleClass[1]).addClass(a.toggleClass[0]).parents(a.o.widgets).removeClass("jarviswidget-collapsed").children("[role=content]").slideDown(a.o.toggleSpeed,function(){a._saveSettingsWidget()}):n.children().removeClass(a.toggleClass[0]).addClass(a.toggleClass[1]).parents(a.o.widgets).addClass("jarviswidget-collapsed").children("[role=content]").slideUp(a.o.toggleSpeed,function(){a._saveSettingsWidget()}),"function"==typeof a.o.onToggle&&a.o.onToggle.call(this,i),t.preventDefault()}),i.on(s,".jarviswidget-fullscreen-btn",function(t){var i=e(this).parents(a.o.widgets),l=i.children("div");a._runLoaderWidget(e(this)),e("#jarviswidget-fullscreen-mode").length?(e(".nooverflow").removeClass("nooverflow"),i.unwrap("div").children("div").removeAttr("style").end().find(".jarviswidget-fullscreen-btn:first").children().removeClass(a.fullscreenClass[1]).addClass(a.fullscreenClass[0]).parents(a.pwCtrls).children("a").show(),l.hasClass("jarviswidget-visible")&&l.hide().removeClass("jarviswidget-visible")):(e("body").addClass("nooverflow"),i.wrap('<div id="jarviswidget-fullscreen-mode"/>').parent().find(".jarviswidget-fullscreen-btn:first").children().removeClass(a.fullscreenClass[0]).addClass(a.fullscreenClass[1]).parents(a.pwCtrls).children("a:not(.jarviswidget-fullscreen-btn)").hide(),l.is(":hidden")&&l.show().addClass("jarviswidget-visible")),n(),"function"==typeof a.o.onFullscreen&&a.o.onFullscreen.call(this,i),t.preventDefault()}),e(t).on("resize."+l,function(){n()}),i.on(s,".jarviswidget-edit-btn",function(t){var n=e(this).parents(a.o.widgets);a._runLoaderWidget(e(this)),n.find(a.o.editPlaceholder).is(":visible")?e(this).children().removeClass(a.editClass[1]).addClass(a.editClass[0]).parents(a.o.widgets).find(a.o.editPlaceholder).slideUp(a.o.editSpeed,function(){a._saveSettingsWidget()}):e(this).children().removeClass(a.editClass[0]).addClass(a.editClass[1]).parents(a.o.widgets).find(a.o.editPlaceholder).slideDown(a.o.editSpeed),"function"==typeof a.o.onEdit&&a.o.onEdit.call(this,n),t.preventDefault()}),e(a.o.editPlaceholder).find("input").keyup(function(){e(this).parents(a.o.widgets).children("header").children("h2").text(e(this).val())}),i.on(s,"[data-widget-setstyle]",function(t){var n=e(this).data("widget-setstyle"),i="";e(this).parents(a.o.editPlaceholder).find("[data-widget-setstyle]").each(function(){i+=e(this).data("widget-setstyle")+" "}),e(this).parents(a.o.widgets).attr("data-widget-attstyle",""+n).removeClassPrefix("jarviswidget-color-").addClass(n),a._runLoaderWidget(e(this)),a._saveSettingsWidget(),t.preventDefault()}),i.on(s,".jarviswidget-custom-btn",function(t){var n=e(this).parents(a.o.widgets);a._runLoaderWidget(e(this)),e(this).children("."+a.customClass[0]).length?(e(this).children().removeClass(a.customClass[0]).addClass(a.customClass[1]),"function"==typeof a.o.customStart&&a.o.customStart.call(this,n)):(e(this).children().removeClass(a.customClass[1]).addClass(a.customClass[0]),"function"==typeof a.o.customEnd&&a.o.customEnd.call(this,n)),a._saveSettingsWidget(),t.preventDefault()}),i.on(s,".jarviswidget-delete-btn",function(t){var n=e(this).parents(a.o.widgets),i=n.attr("id"),l=n.children("header").children("h2").text();e.SmartMessageBox?e.SmartMessageBox({title:"<i class='fa fa-times' style='color:#ed1c24'></i> "+a.o.labelDelete+' "'+l+'"',content:a.o.deleteMsg,buttons:"[No][Yes]"},function(t){"Yes"==t&&(a._runLoaderWidget(e(this)),e("#"+i).fadeOut(a.o.deleteSpeed,function(){e(this).remove(),"function"==typeof a.o.onDelete&&a.o.onDelete.call(this,n)}))}):e("#"+i).fadeOut(a.o.deleteSpeed,function(){e(this).remove(),"function"==typeof a.o.onDelete&&a.o.onDelete.call(this,n)}),t.preventDefault()}),i.on(s,".jarviswidget-refresh-btn",function(t){var n=e(this).parents(a.o.widgets),i=n.data("widget-load"),l=n.children(),s=e(this);s.button("loading"),l.addClass("widget-body-ajax-loading"),setTimeout(function(){s.button("reset"),l.removeClass("widget-body-ajax-loading"),a._loadAjaxFile(n,i,l)},1e3),t.preventDefault()}),i=null},destroy:function(){var n=this,a="."+l;n.obj.find(n.o.grid+".sortable-grid").not("[data-widget-excludegrid]").sortable("destroy"),n.widget.children("header").off(a),e(n.o.deleteSettingsKey).off(a),e(n.o.deletePositionKey).off(a),e(t).off(a),n.obj.removeData(l)}},e.fn[l]=function(t){return this.each(function(){var n=e(this),a=n.data(l);if(!a){var s="object"==typeof t&&t;n.data(l,a=new i(this,s))}"string"==typeof t&&a[t]()})},e.fn[l].defaults={grid:"section",widgets:".jarviswidget",localStorage:!0,deleteSettingsKey:"",settingsKeyLabel:"Reset settings?",deletePositionKey:"",positionKeyLabel:"Reset position?",sortable:!0,buttonsHidden:!1,toggleButton:!0,toggleClass:"min-10 | plus-10",toggleSpeed:200,onToggle:function(){},deleteButton:!0,deleteMsg:"Warning: This action cannot be undone",deleteClass:"trashcan-10",deleteSpeed:200,onDelete:function(){},editButton:!0,editPlaceholder:".jarviswidget-editbox",editClass:"pencil-10 | delete-10",editSpeed:200,onEdit:function(){},colorButton:!0,fullscreenButton:!0,fullscreenClass:"fullscreen-10 | normalscreen-10",fullscreenDiff:3,onFullscreen:function(){},customButton:!0,customClass:"",customStart:function(){},customEnd:function(){},buttonOrder:"%refresh% %delete% %custom% %edit% %fullscreen% %toggle%",opacity:1,dragHandle:"> header",placeholderClass:"jarviswidget-placeholder",indicator:!0,indicatorTime:600,ajax:!0,loadingLabel:"loading...",timestampPlaceholder:".jarviswidget-timestamp",timestampFormat:"Last update: %m%/%d%/%y% %h%:%i%:%s%",refreshButton:!0,refreshButtonClass:"refresh-10",labelError:"Sorry but there was a error:",labelUpdated:"Last Update:",labelRefresh:"Refresh",labelDelete:"Delete widget:",afterLoad:function(){},rtl:!1,onChange:function(){},onSave:function(){},ajaxnav:!0},e.fn.removeClassPrefix=function(t){return this.each(function(n,a){var i=a.className.split(" ").map(function(e){return 0===e.indexOf(t)?"":e});a.className=e.trim(i.join(" "))}),this}}(jQuery,window,document)},521:function(e,t,n){"use strict";var a=n(514),i=(n(522),n(515)),l=n(517),s=n(512);n.d(t,"b",function(){return a.a}),n.d(t,"a",function(){return i.a}),n.d(t,"c",function(){return l.a}),n.d(t,"d",function(){return s.a})},851:function(e,t,n){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(0),o=n.n(s),r=n(145),h=n(6),c=n.n(h),d=n(512),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),p=function(e){function t(e){a(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={style:"style1"},n}return l(t,e),u(t,[{key:"onStyleChange",value:function(e){this.setState({style:e})}},{key:"render",value:function(){var e=c()("widget-toolbar",{hidden:"style1"==this.state.style}),t=c()("widget-toolbar",{hidden:"style2"==this.state.style});return o.a.createElement(d.a,{editbutton:!1,colorbutton:!1,togglebutton:!1,deletebutton:!1,fullscreenbutton:!1},o.a.createElement("header",null,o.a.createElement("h2",null,o.a.createElement("strong",null,"Widget"),o.a.createElement("i",null," Switch")),o.a.createElement("div",{className:e},o.a.createElement("span",{className:"onoffswitch-title"},o.a.createElement("i",{className:"fa fa-location-arrow"})," Style 1"),o.a.createElement("span",{className:"onoffswitch"},o.a.createElement("input",{type:"checkbox",name:"onoffswitch",className:"onoffswitch-checkbox",id:"myonoffswitch"}),o.a.createElement("label",{className:"onoffswitch-label",htmlFor:"myonoffswitch"},o.a.createElement("span",{className:"onoffswitch-inner","data-swchon-text":"ON","data-swchoff-text":"OFF"}),o.a.createElement("span",{className:"onoffswitch-switch"})," "))),o.a.createElement("div",{className:t},o.a.createElement("div",{className:"smart-form"},o.a.createElement("label",{className:"toggle"},o.a.createElement("input",{type:"checkbox",id:"demo-switch-to-pills",name:"checkbox-toggle"}),o.a.createElement("i",{"data-swchon-text":"ON","data-swchoff-text":"OFF"}),o.a.createElement("em",{className:"fa fa-location-arrow"})," Style 2")))),o.a.createElement("div",null,o.a.createElement("div",{className:"widget-body"},o.a.createElement("h4",{className:"alert alert-info"}," Insert switches to widget header "),o.a.createElement(r.ButtonGroup,{bsSize:"small"},o.a.createElement(r.Button,{onClick:this.onStyleChange.bind(this,"style1"),active:"style1"===this.state.style},o.a.createElement("strong",null,"Switch")," ",o.a.createElement("i",null,"Style 1")),o.a.createElement(r.Button,{onClick:this.onStyleChange.bind(this,"style2"),active:"style2"===this.state.style},o.a.createElement("strong",null,"Switch")," ",o.a.createElement("i",null,"Style 2"))))))}}]),t}(o.a.Component),g=p;t.a=g;!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(p,"SwitchWidgetDemo","/home/this/WebstormProjects/trading-charts-demo/src/app/routes/widgets/components/SwitchWidgetDemo.js"),__REACT_HOT_LOADER__.register(g,"default","/home/this/WebstormProjects/trading-charts-demo/src/app/routes/widgets/components/SwitchWidgetDemo.js"))}()},852:function(e,t,n){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(0),o=n.n(s),r=n(145),h=n(512),c=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),d=function(e){function t(e){a(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={demoShowTabs:!1},n}return l(t,e),c(t,[{key:"render",value:function(){var e=this.state.demoShowTabs?"tabs":"pills";return o.a.createElement(h.a,{colorbutton:!1,editbutton:!1,togglebutton:!1,deletebutton:!1,fullscreenbutton:!1,custombutton:!1},o.a.createElement("header",null,o.a.createElement("h2",null,o.a.createElement("strong",null,"Tabs / Pills")," ",o.a.createElement("i",null,"Widget"))),o.a.createElement("div",null,o.a.createElement("div",{className:"widget-body no-padding"},o.a.createElement(r.Tabs,{bsStyle:e,className:"padding-10",activeKey:this.state.key,id:"TabbedWidgetDemoTabs",onSelect:this.handleSelect},o.a.createElement(r.Tab,{eventKey:1,title:"Tab 1"},o.a.createElement("h4",{className:"alert alert-danger"}," Insert tabs / pills to widget header "),"I have six locks on my door all in a row. When I go out, I lock every other one. I figure no matter how long somebody stands there picking the locks, they are always locking three."),o.a.createElement(r.Tab,{eventKey:2,title:"Tab 2"},o.a.createElement("h4",{className:"alert alert-warning"}," Checkout the ",o.a.createElement("a",{href:"general-elements.html"},"General Elements")," page for more tab options "),"Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee.")),o.a.createElement("div",{className:"widget-footer text-right"},o.a.createElement("span",{className:"onoffswitch-title"},o.a.createElement("i",{className:"fa fa-check"})," Show Tabs"),o.a.createElement("span",{className:"onoffswitch"},o.a.createElement("input",{type:"checkbox",name:"onoffswitch",className:"onoffswitch-checkbox",id:"show-tabs"}),o.a.createElement("label",{className:"onoffswitch-label",htmlFor:"show-tabs"},o.a.createElement("span",{className:"onoffswitch-inner","data-swchon-text":"True","data-swchoff-text":"NO"}),o.a.createElement("span",{className:"onoffswitch-switch"})))))))}}]),t}(o.a.Component),u=d;t.a=u;!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(d,"TabbedWidgetDemo","/home/this/WebstormProjects/trading-charts-demo/src/app/routes/widgets/components/TabbedWidgetDemo.js"),__REACT_HOT_LOADER__.register(u,"default","/home/this/WebstormProjects/trading-charts-demo/src/app/routes/widgets/components/TabbedWidgetDemo.js"))}()},853:function(e,t,n){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),o=n.n(s),r=n(145),h=n(521),c=n(852),d=n(851),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),p=function(e){function t(){return a(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),u(t,[{key:"render",value:function(){return o.a.createElement("div",{id:"content"},o.a.createElement("div",{className:"row"},o.a.createElement(h.a,{items:["Widgets"],icon:"list-alt",className:"col-xs-12 col-sm-7 col-md-7 col-lg-4"}),o.a.createElement(h.b,null)),o.a.createElement("div",{className:"row"},o.a.createElement("div",{className:"col-sm-12"},o.a.createElement(r.Alert,{bsStyle:"info",className:"fade in"},o.a.createElement("button",{className:"close","data-dismiss":"alert"},"×"),o.a.createElement("i",{className:"fa-fw fa fa-info"}),o.a.createElement("strong",null,"Heads up!")," If the widgets are not reacting to your drag and drop events on chrome, try to turn off chrome touch events by going to, ",o.a.createElement("a",{href:"chrome://flags/#touch-events"},"chrome:\\/\\/flags/#touch-events")," if you do not have a touch screen."),o.a.createElement(r.Alert,{className:"well"},o.a.createElement("button",{className:"close","data-dismiss":"alert"},"×"),o.a.createElement("h1",null,o.a.createElement("span",{className:"semi-bold"},"Smart")," ",o.a.createElement("i",{className:"ultra-light"},"Widgets")," (aka JarvisWidgets) ",o.a.createElement("sup",{className:"badge bg-color-red bounceIn animated"},"v 2.0")," ",o.a.createElement("br",null),o.a.createElement("small",{className:"text-danger slideInRight fast animated"},o.a.createElement("strong",null,"Exclusive to SmartAdmin!"))),o.a.createElement("p",null,"The all new and revolutionary JarvisWidgets v2.0 (",o.a.createElement("strong",null,"$35 value"),") is now only exclusive to SmartAdmin. JarvisWidgets allows you to do more than your normal widgets. You can now use realtime",o.a.createElement(r.OverlayTrigger,{placement:"bottom",overlay:o.a.createElement(r.Popover,{id:"ajax-loading-popover"},o.a.createElement("span",{className:""},"You can load content with ajax. You can even set a 'last updated' timestamp (customizable) a refresh button and set an auto refresh timer."))},o.a.createElement("a",{className:"semi-bold"}," AJAX loading ")),"in a snap with auto refresh. Add",o.a.createElement(r.OverlayTrigger,{placement:"bottom",overlay:o.a.createElement(r.Popover,{id:"action-buttons-popover"},"You can use 5 types of action buttons, toggle, edit, fullscreen, delete and custom button(s) which you can set for a custom action(s). You can even change the order of the action buttons. You can set a custom icon for every button. You can also add your own custom buttons, tabs, progress bars and more.")},o.a.createElement("a",{className:"semi-bold"}," Infinite ")),"buttons and controls to widget header. All widgets are",o.a.createElement(r.OverlayTrigger,{placement:"bottom",overlay:o.a.createElement(r.Popover,{id:"jarvis-sortable-popover"},"The Jarvis Widgets are sortable, on tablet and some phones. Dont want sortable widgets on tables/phones, no problem you can remove this.")},o.a.createElement("a",{className:"semi-bold"}," Sortable ")),"across all bootstrap col-spans and uses",o.a.createElement(r.OverlayTrigger,{placement:"bottom",overlay:o.a.createElement(r.Popover,{id:"jarvis-localStorage-popover"},"This plugin gives you the option to let you save a couple of settings for example the position, color and title of the widget.")},o.a.createElement("a",{className:"semi-bold"}," HTML5 localStorage ")),". Also now supports",o.a.createElement(r.OverlayTrigger,{placement:"bottom",overlay:o.a.createElement(r.Popover,{id:"jarvis-RTL-popover"},"This plugin is by default ltr, but it has a rtl option.")},o.a.createElement("a",{className:"semi-bold"}," RTL Support ")),",",o.a.createElement(r.OverlayTrigger,{placement:"bottom",overlay:o.a.createElement(r.Popover,{id:"jarvis-Crosbrowser-popover"},"The Jarvis Widget works in every modern browser on windows, ios, osx, android, blackberry and windows phone.")},o.a.createElement("a",{className:"semi-bold"}," Crosbrowser Support ")),",",o.a.createElement(r.OverlayTrigger,{placement:"bottom",overlay:o.a.createElement(r.Popover,{id:"jarvis-Callback-popover"},"The Jarvis Widget plugin has a couple of callback function wich you can use for several things, for example, use AJAX to store the data into a database.")},o.a.createElement("a",{className:"semi-bold"}," Callback functions ")),"and",o.a.createElement(r.OverlayTrigger,{placement:"bottom",overlay:o.a.createElement(r.Popover,{id:"jarvis-More-popover"},"To give you more control you can set a lot of options per widget by using a dataset tag which will override the main plugin settings.")},o.a.createElement("a",{className:"semi-bold"}," More ")),"..")))),o.a.createElement(h.c,null,o.a.createElement("div",{className:"row"},o.a.createElement("article",{className:"col-xs-12 col-sm-6 col-md-6 col-lg-6"},o.a.createElement(h.d,null,o.a.createElement("header",null,o.a.createElement("h2",null,o.a.createElement("strong",null,"Default")," ",o.a.createElement("i",null,"Widget"))),o.a.createElement("div",null,o.a.createElement("div",{className:"widget-body"},o.a.createElement("p",null," Widget comes with a default 10 padding to the body which can be removed by adding the class ",o.a.createElement("code",null,".no-padding"),"to the ",o.a.createElement("code",null,".widget-body")," class. The default widget also comes with 5 widget buttons as displayed on top right corner of the widget header. "),o.a.createElement("a",{href:"#",className:"btn btn-default btn-lg"}," ",o.a.createElement("strong",null,"Big"),o.a.createElement("i",null,"Button")," ")))),o.a.createElement(h.d,{colorbutton:!1,togglebutton:!1,deletebutton:!1,fullscreenbutton:!1,color:"blue"},o.a.createElement("header",null,o.a.createElement("h2",null,o.a.createElement("strong",null,"Title")," ",o.a.createElement("i",null,"Change"))),o.a.createElement("div",null,o.a.createElement("div",{className:"widget-body"},o.a.createElement("h3",{className:"alert alert-info"}," Activate Options Button "),o.a.createElement("code",null,"data-widget-editbutton")))),o.a.createElement(h.d,{colorbutton:!1,editbutton:!1,togglebutton:!1,deletebutton:!1,color:"greenLight"},o.a.createElement("header",null,o.a.createElement("h2",null,o.a.createElement("strong",null,"Full")," ",o.a.createElement("i",null,"Screen"))),o.a.createElement("div",null,o.a.createElement("div",{className:"widget-body"},o.a.createElement("h2",{className:"alert alert-success"}," Make any widget full screen"),o.a.createElement("code",null,"data-widget-fullscreenbutton"),o.a.createElement("br",null),o.a.createElement("br",null),o.a.createElement("p",null,"Usefull when viewing images, gallery, tables with large data and maps. There are much useful applications to this method")))),o.a.createElement(h.d,{colorbutton:!1,togglebutton:!1,editbutton:!1,fullscreenbutton:!1,color:"red"},o.a.createElement("header",null,o.a.createElement("h2",null,o.a.createElement("strong",null,"Delete")," ",o.a.createElement("i",null,"Widget "))),o.a.createElement("div",null,o.a.createElement("div",{className:"widget-body"},o.a.createElement("h6",{className:"alert alert-warning semi-bold"},o.a.createElement("i",{className:"fa fa-times"})," By deleting a widget you will",o.a.createElement("strong",null,"remove")," the widget from the page and will need to connect the backend with the onevent handler to delete it from database."),o.a.createElement("code",null,"data-widget-deletebutton")))),o.a.createElement(h.d,{togglebutton:!1,editbutton:!1,deletebutton:!1,fullscreenbutton:!1},o.a.createElement("header",null,o.a.createElement("h2",null,o.a.createElement("strong",null,"Widget")," ",o.a.createElement("i",null,"Colors"))),o.a.createElement("div",null,o.a.createElement("div",{className:"widget-body"},o.a.createElement("div",{className:"row"},o.a.createElement("div",{className:"col-md-6 col-lg-8"},o.a.createElement("h5",null,o.a.createElement("strong",null,"Change")," and ",o.a.createElement("i",null,"save")," widget ",o.a.createElement("u",null,"color")),o.a.createElement("code",null,"colorbutton"),o.a.createElement("br",null),o.a.createElement("br",null),o.a.createElement("p",null,"Change widget color at will and SmartAdmin will permanently remember the color of your chosen widget. Do this to any widget in any page and SmartAdmin will keep track of all your widgets!")),o.a.createElement("div",{className:"col-md-6 col-lg-4"},o.a.createElement("img",{src:"assets/img/demo/widget-colorpicker.png",alt:"widget colorpicker",className:"pull-right hover-transparent img-responsive"})))))),o.a.createElement(h.d,{colorbutton:!1,editbutton:!1,togglebutton:!1,deletebutton:!1,fullscreenbutton:!1,custombutton:!1,color:"pink"},o.a.createElement("header",null,o.a.createElement("span",{className:"widget-icon"}," ",o.a.createElement("i",{className:"fa fa-comments"})," "),o.a.createElement("h2",null,o.a.createElement("strong",null,"Label & Badges")),o.a.createElement("div",{className:"widget-toolbar"},o.a.createElement("div",{className:"label label-success"},o.a.createElement("i",{className:"fa fa-arrow-up"})," 2.35%")),o.a.createElement("div",{className:"widget-toolbar"},o.a.createElement("div",{className:"badge bg-color-blue"},"99"))),o.a.createElement("div",null,o.a.createElement("div",{className:"widget-body"},o.a.createElement("div",{className:"widget-body-toolbar text-center"},o.a.createElement("div",{className:"badge bg-color-purple"},"small badge"),o.a.createElement("div",{className:"label label-warning"},o.a.createElement("i",{className:"fa fa-check"})," I am a big label")),o.a.createElement("p",{className:"alert alert-info"},"Add label inside widget footer / toolbar"),o.a.createElement("div",{className:"widget-footer"},o.a.createElement("div",{className:"badge bg-color-greenLight pull-left"},"13"),o.a.createElement("div",{className:"label label-danger"},o.a.createElement("i",{className:"fa fa-arrow-down"})," -1.75%"))))),o.a.createElement(c.a,null),o.a.createElement(h.d,{load:"assets/api/html/widget-demo.html",colorbutton:!1,editbutton:!1,togglebutton:!1,deletebutton:!1,fullscreenbutton:!1,custombutton:!1},o.a.createElement("header",null,o.a.createElement("h2",null,o.a.createElement("strong",null,"Refresh")," ",o.a.createElement("i",null,"Widget"))),o.a.createElement("div",null,o.a.createElement("div",{className:"widget-body"},o.a.createElement("p",null,"This content will be replaced via ajax loader..."))))),o.a.createElement("article",{className:"col-xs-12 col-sm-6 col-md-6 col-lg-6"},o.a.createElement(h.d,{editbutton:!1,colorbutton:!1,deletebutton:!1,fullscreenbutton:!1,color:"darken"},o.a.createElement("header",null,o.a.createElement("span",{className:"widget-icon"}," ",o.a.createElement("i",{className:"fa fa-arrows-v"})," "),o.a.createElement("h2",{className:"font-md"},o.a.createElement("strong",null,"Collapsable")," ",o.a.createElement("i",null,"Widget"))),o.a.createElement("div",null,o.a.createElement("div",{className:"widget-body"},o.a.createElement("h2",{className:"alert alert-warning"}," This widget is opened by default "),o.a.createElement("code",null,"data-widget-togglebutton"),o.a.createElement("br",null),o.a.createElement("br",null),o.a.createElement("p",null,"Notice the header text size slightly larger than other widget headers")))),o.a.createElement(h.d,{editbutton:!1,colorbutton:!1,deletebutton:!1,fullscreenbutton:!1,collapsed:!0},o.a.createElement("header",null,o.a.createElement("span",{className:"widget-icon"}," ",o.a.createElement("i",{className:"fa fa-arrows-v"})," "),o.a.createElement("h2",null,o.a.createElement("strong",null,o.a.createElement("i",null,"Collapsed ")),o.a.createElement("small",null,"Widget"))),o.a.createElement("div",null,o.a.createElement("div",{className:"widget-body"},o.a.createElement("h2",{className:"alert alert-warning"}," This widget is collapsed by default "),o.a.createElement("code",null,"data-widget-collapsed")))),o.a.createElement(h.d,{colorbutton:!1,togglebutton:!1,editbutton:!1,fullscreenbutton:!1,deletebutton:!1,color:"purple"},o.a.createElement("header",null,o.a.createElement("h2",null,o.a.createElement("strong",null,"Progress")," ",o.a.createElement("i",null,"bars")),o.a.createElement("div",{className:"widget-toolbar"},o.a.createElement("div",{className:"progress progress-striped active","data-tooltip":"55%","data-tooltip-placement":"bottom"},o.a.createElement("div",{className:"progress-bar progress-bar-success",role:"progressbar",style:{width:"55%"}},"55 %")))),o.a.createElement("div",null,o.a.createElement("div",{className:"widget-body no-padding"},o.a.createElement("div",{className:"widget-body-toolbar"},o.a.createElement("div",{className:"btn-group"},o.a.createElement("button",{type:"button",className:"btn btn-default"},o.a.createElement("i",{className:"fa fa-bold"})),o.a.createElement("button",{type:"button",className:"btn btn-default"},o.a.createElement("i",{className:"fa fa-italic"})),o.a.createElement("button",{type:"button",className:"btn btn-default"},o.a.createElement("i",{className:"fa fa-underline"}))),o.a.createElement("div",{className:"btn-group"},o.a.createElement("button",{type:"button",className:"btn btn-default"},o.a.createElement("i",{className:"fa fa-align-left"})),o.a.createElement("button",{type:"button",className:"btn btn-default"},o.a.createElement("i",{className:"fa fa-align-center"})),o.a.createElement("button",{type:"button",className:"btn btn-default"},o.a.createElement("i",{className:"fa fa-align-right"})),o.a.createElement("button",{type:"button",className:"btn btn-default"},o.a.createElement("i",{className:"fa fa-align-justify"})))),o.a.createElement("textarea",{className:"form-control no-border",placeholder:"Textarea",rows:"4",defaultValue:" This is a textarea - below me is widget footer and above is the widget toolbar!"}),o.a.createElement("div",{className:"widget-footer"},o.a.createElement("button",{className:"btn btn-sm btn-primary",type:"button"},"Save"),o.a.createElement("button",{className:"btn btn-sm btn-danger disabled pull-left",type:"button"},"Delete"))))),o.a.createElement(h.d,{editbutton:!1,colorbutton:!1,togglebutton:!1,deletebutton:!1,fullscreenbutton:!1,color:"blueLight"},o.a.createElement("header",null,o.a.createElement("span",{className:"widget-icon"}," ",o.a.createElement("i",{className:"fa fa-hand-o-up"})," "),o.a.createElement("h2",null,o.a.createElement("strong",null,"Widget")," ",o.a.createElement("i",null,"buttons")),o.a.createElement("div",{className:"widget-toolbar"},o.a.createElement("a",{href:"#",className:"btn btn-primary"},"Btn")),o.a.createElement("div",{className:"widget-toolbar"},o.a.createElement("div",{className:"btn-group","data-toggle":"buttons"},o.a.createElement("label",{className:"btn btn-default btn-xs active"},o.a.createElement("input",{type:"radio",name:"style-a1",id:"style-a1"})," ",o.a.createElement("i",{className:"fa fa-play"})),o.a.createElement("label",{className:"btn btn-default btn-xs"},o.a.createElement("input",{type:"radio",name:"style-a2",id:"style-a2"})," ",o.a.createElement("i",{className:"fa fa-pause"})),o.a.createElement("label",{className:"btn btn-default btn-xs"},o.a.createElement("input",{type:"radio",name:"style-a2",id:"style-a3"})," ",o.a.createElement("i",{className:"fa fa-stop"}))))),o.a.createElement("div",null,o.a.createElement("div",{className:"widget-body"},o.a.createElement("h4",{className:"alert alert-info"}," Insert buttons to header manually or dynamically ")))),o.a.createElement(h.d,{colorbutton:!1,togglebutton:!1,editbutton:!1,fullscreenbutton:!1,deletebutton:!1,color:"orange"},o.a.createElement("header",null,o.a.createElement("h2",null,o.a.createElement("strong",null,"With")," ",o.a.createElement("i",null,"Paging")),o.a.createElement("div",{className:"widget-toolbar"},o.a.createElement("ul",{className:"pagination pagination-xs"},o.a.createElement("li",{className:"disabled"},o.a.createElement("a",{href:"#"},"Prev")),o.a.createElement("li",{className:"active"},o.a.createElement("a",{href:"#"},"1")),o.a.createElement("li",null,o.a.createElement("a",{href:"#"},"2")),o.a.createElement("li",null,o.a.createElement("a",{href:"#"},"3")),o.a.createElement("li",null,o.a.createElement("a",{href:"#"},"Next"))))),o.a.createElement("div",null,o.a.createElement("div",{className:"widget-body no-padding"},o.a.createElement("p",{className:"alert alert-success"},o.a.createElement("strong",null,o.a.createElement("i",{className:"fa fa-check"}),"Alert"),"without body padding... "),o.a.createElement("p",{className:"padding-10"}," Notice this widget body has no padding!"),o.a.createElement("div",{className:"widget-footer"},o.a.createElement("button",{className:"btn btn-sm btn-success disabled",type:"button"},"Previous"),o.a.createElement("button",{className:"btn btn-sm btn-success",type:"button"},"Next"))))),o.a.createElement(h.d,{colorbutton:!1,togglebutton:!1,editbutton:!1,fullscreenbutton:!1,deletebutton:!1,color:"blueDark"},o.a.createElement("header",null,o.a.createElement("span",{className:"widget-icon"}," ",o.a.createElement("i",{className:"fa fa-arrow-down"})," "),o.a.createElement("h2",null,o.a.createElement("strong",null,"Widget")," ",o.a.createElement("i",null,o.a.createElement("u",null,"with")," Dropdown")),o.a.createElement("div",{className:"widget-toolbar"},o.a.createElement(r.Dropdown,{className:"btn-group",id:"widget-demo-dropdown"},o.a.createElement(r.Dropdown.Toggle,{className:"btn btn-xs dropdown-toggle btn-warning"},"Dropdown"),o.a.createElement(r.Dropdown.Menu,{className:"dropdown-menu pull-right"},o.a.createElement(r.MenuItem,null,"Option 1"),o.a.createElement(r.MenuItem,null,"Option 2"),o.a.createElement(r.MenuItem,null,"Option 3"),o.a.createElement(r.MenuItem,{divider:!0}),o.a.createElement(r.MenuItem,null,"Option 4"))))),o.a.createElement("div",null,o.a.createElement("div",{className:"widget-body"},"Add dropdowns to header with ease. Making sure to add btn-xs class when using dropdowns on the widget header."))),o.a.createElement(d.a,null),o.a.createElement(h.d,{sortable:!1,colorbutton:!1,togglebutton:!1,editbutton:!1,fullscreenbutton:!1,deletebutton:!1,color:"darken"},o.a.createElement("header",null,o.a.createElement("span",{className:"widget-icon"}," ",o.a.createElement("i",{className:"fa fa-lock"})," "),o.a.createElement("h2",null,o.a.createElement("strong",null,"Locked")," ",o.a.createElement("i",null,"Widget")),o.a.createElement("div",{className:"widget-toolbar smart-form"},o.a.createElement("label",{className:"input"}," ",o.a.createElement("i",{className:"icon-append fa fa-question-circle"}),o.a.createElement("input",{type:"text",placeholder:"Focus to view the tooltip"}),o.a.createElement("b",{className:"tooltip tooltip-top-right"},o.a.createElement("i",{className:"fa fa-warning txt-color-teal"}),"Some helpful information")))),o.a.createElement("div",null,o.a.createElement("div",{className:"widget-body"},o.a.createElement("p",{className:"alert alert-success"},o.a.createElement("i",{className:"fa fa-lock"})," Locked widgets lock the widget to the base grid (",o.a.createElement("i",null,"you will not be able to drag this widget")," ). This also allows you to append and use input text elmenets on the widget header. "),o.a.createElement("code",null,'data-widget-sortable="',o.a.createElement("strong",null,"false"),'"')))),o.a.createElement(h.d,{colorbutton:!1,editbutton:!1,color:"greenDark"},o.a.createElement("header",null,o.a.createElement("h2",null,o.a.createElement("strong",null,"Fixed")," ",o.a.createElement("i",null,"Height"))),o.a.createElement("div",null,o.a.createElement("div",{className:"widget-body no-padding"},o.a.createElement("div",{className:"widget-body-toolbar"},o.a.createElement("div",{className:"row"},o.a.createElement("div",{className:"col-xs-9 col-sm-5 col-md-5 col-lg-5"},o.a.createElement("div",{className:"input-group"},o.a.createElement("span",{className:"input-group-addon"},o.a.createElement("i",{className:"fa fa-search"})),o.a.createElement("input",{className:"form-control",id:"prepend",placeholder:"Filter",type:"text"}))),o.a.createElement("div",{className:"col-xs-3 col-sm-7 col-md-7 col-lg-7 text-right"},o.a.createElement("button",{className:"btn btn-success"},o.a.createElement("i",{className:"fa fa-plus"})," ",o.a.createElement("span",{className:"hidden-mobile"},"Add New Row"))))),o.a.createElement("div",{className:"custom-scroll table-responsive",style:{height:"290px",overflowY:"scroll"}},o.a.createElement("table",{className:"table table-bordered"},o.a.createElement("thead",null,o.a.createElement("tr",null,o.a.createElement("th",null,o.a.createElement("i",{className:"fa fa-key text-warning"})," License Key"),o.a.createElement("th",null,"Username ",o.a.createElement("i",{className:"text-danger"},"!")),o.a.createElement("th",null,"Date"))),o.a.createElement("tbody",null,o.a.createElement("tr",null,o.a.createElement("td",null,"C87E48EF-605A-B4FF"),o.a.createElement("td",null,"erat@montesnasceturridiculus.org"),o.a.createElement("td",null,"10/03/13")),o.a.createElement("tr",null,o.a.createElement("td",null,"5DDA79E7-890F-064D"),o.a.createElement("td",null,"Nunc.lectus@ipsum.co.uk"),o.a.createElement("td",null,"28/12/13")),o.a.createElement("tr",null,o.a.createElement("td",null,"468459AA-7933-C017"),o.a.createElement("td",null,"vitae.mauris.sit@tempordiamdictum.net"),o.a.createElement("td",null,"25/02/14")),o.a.createElement("tr",null,o.a.createElement("td",null,"C3006C18-4677-D2CE"),o.a.createElement("td",null,"nec.urna.suscipit@acrisusMorbi.edu"),o.a.createElement("td",null,"06/07/14")),o.a.createElement("tr",null,o.a.createElement("td",null,"E535C188-FDF4-90CB"),o.a.createElement("td",null,"lobortis@pedeacurna.com"),o.a.createElement("td",null,"28/12/12")),o.a.createElement("tr",null,o.a.createElement("td",null,"95489E95-9602-18B7"),o.a.createElement("td",null,"egestas.lacinia.Sed@In.ca"),o.a.createElement("td",null,"17/07/14")),o.a.createElement("tr",null,o.a.createElement("td",null,"D34E6661-D81A-9328"),o.a.createElement("td",null,"arcu@lectus.ca"),o.a.createElement("td",null,"14/10/14")),o.a.createElement("tr",null,o.a.createElement("td",null,"C72D2C04-458F-EBD0"),o.a.createElement("td",null,"ut.pharetra.sed@vulputatevelit.net"),o.a.createElement("td",null,"30/04/14")),o.a.createElement("tr",null,o.a.createElement("td",null,"10CAFA5C-AB4B-8B45"),o.a.createElement("td",null,"arcu.eu.odio@Duis.co.uk"),o.a.createElement("td",null,"14/02/13")),o.a.createElement("tr",null,o.a.createElement("td",null,"AA4F5CBA-1CE8-85B7"),o.a.createElement("td",null,"nec@rutrum.net"),o.a.createElement("td",null,"06/02/14")),o.a.createElement("tr",null,o.a.createElement("td",null,"2D816071-8F99-B315"),o.a.createElement("td",null,"Praesent.luctus.Curabitur@elementum.ca"),o.a.createElement("td",null,"27/09/13")),o.a.createElement("tr",null,o.a.createElement("td",null,"41BDB60C-C6EA-54EB"),o.a.createElement("td",null,"Nunc.sed.orci@sitamet.org"),o.a.createElement("td",null,"18/11/13")),o.a.createElement("tr",null,o.a.createElement("td",null,"43F3D48B-FEF3-776E"),o.a.createElement("td",null,"eu.erat@nequevitaesemper.com"),o.a.createElement("td",null,"23/04/13")),o.a.createElement("tr",null,o.a.createElement("td",null,"2521899F-79B9-B309"),o.a.createElement("td",null,"mattis.velit@risusQuisque.ca"),o.a.createElement("td",null,"04/07/13")),o.a.createElement("tr",null,o.a.createElement("td",null,"D08994C9-DCB1-948B"),o.a.createElement("td",null,"Proin@metusAliquam.net"),o.a.createElement("td",null,"27/07/13")),o.a.createElement("tr",null,o.a.createElement("td",null,"7AD2C774-36BA-0B2B"),o.a.createElement("td",null,"tincidunt@Lorem.com"),o.a.createElement("td",null,"01/07/14")),o.a.createElement("tr",null,o.a.createElement("td",null,"162C0373-FF3B-2469"),o.a.createElement("td",null,"ante.dictum.cursus@ultrices.org"),o.a.createElement("td",null,"10/02/13")),o.a.createElement("tr",null,o.a.createElement("td",null,"05641987-3D48-DD72"),o.a.createElement("td",null,"lorem.ut.aliquam@Sednecmetus.org"),o.a.createElement("td",null,"16/08/14")),o.a.createElement("tr",null,o.a.createElement("td",null,"3A173E5A-192A-0D5D"),o.a.createElement("td",null,"nunc.risus@vitae.org"),o.a.createElement("td",null,"04/04/13")),o.a.createElement("tr",null,o.a.createElement("td",null,"67081066-E0B5-9E37"),o.a.createElement("td",null,"lectus@sed.org"),o.a.createElement("td",null,"10/12/14")),o.a.createElement("tr",null,o.a.createElement("td",null,"C677C05F-7D98-C3E9"),o.a.createElement("td",null,"auctor.quis@Morbi.org"),o.a.createElement("td",null,"30/03/13")))))))))),o.a.createElement("div",{className:"row"},o.a.createElement("div",{className:"col-sm-12"},o.a.createElement("div",{className:"well"},o.a.createElement("h1",null,"Basic Usage"),o.a.createElement("div",{className:"alert alert-info"},"Note: You must delete the data-attribute* associated in order to act as true. For example ",o.a.createElement("code",null,' data-widget-togglebutton="true"')," will still act as",o.a.createElement("code",null,"false"),", you must remove the ",o.a.createElement("strong",null,"data-attribute")," for the statement to be true."),o.a.createElement("table",{className:"table table-bordered"},o.a.createElement("thead",null,o.a.createElement("tr",null,o.a.createElement("th",{style:{width:"25%"}},"HTML5 data attributes / CSS / HTML"),o.a.createElement("th",{style:{width:"15%"}},"Place after"),o.a.createElement("th",{style:{width:"15%"}},"Example value(s)"),o.a.createElement("th",{style:{width:"45%"}},"Desctription"))),o.a.createElement("tbody",null,o.a.createElement("tr",null,o.a.createElement("td",null,"data-widget-sortable"),o.a.createElement("td",null,o.a.createElement("code",null,"header")),o.a.createElement("td",null,"false"),o.a.createElement("td",null,"Prevent a widget from being sortable ",o.a.createElement("i",null,"(can only be used with the value 'false')"),".")),o.a.createElement("tr",null,o.a.createElement("td",null,"data-widget-icon"),o.a.createElement("td",null,o.a.createElement("code",null,".jarviswidget")),o.a.createElement("td",null,"fa fa-trash"),o.a.createElement("td",null,"Use a icon in the widgets header ",o.a.createElement("i",null,"(see icons section for all list of icons)"),".")),o.a.createElement("tr",null,o.a.createElement("td",null,"data-widget-togglebutton"),o.a.createElement("td",null,o.a.createElement("code",null,".jarviswidget")),o.a.createElement("td",null,"false"),o.a.createElement("td",null,"Prevent a widget from having a toggle button ",o.a.createElement("i",null,"(can only be used with the value 'false')"),".")),o.a.createElement("tr",null,o.a.createElement("td",null,"data-widget-deletebutton"),o.a.createElement("td",null,o.a.createElement("code",null,".jarviswidget")),o.a.createElement("td",null,"false"),o.a.createElement("td",null,"Prevent a widget from having a delete button ",o.a.createElement("i",null,"(can only be used with the value 'false')"),".")),o.a.createElement("tr",null,o.a.createElement("td",null,"data-widget-editbutton"),o.a.createElement("td",null,o.a.createElement("code",null,".jarviswidget")),o.a.createElement("td",null,"false"),o.a.createElement("td",null,"Prevent a widget from having a edit button ",o.a.createElement("i",null,"(can only be used with the value 'false')"),".")),o.a.createElement("tr",null,o.a.createElement("td",null,"data-widget-fullscreenbutton"),o.a.createElement("td",null,o.a.createElement("code",null,".jarviswidget")),o.a.createElement("td",null,"false"),o.a.createElement("td",null,"Prevent a widget from having a fullscreen button ",o.a.createElement("i",null,"(can only be used with the value 'false')"),".")),o.a.createElement("tr",null,o.a.createElement("td",null,"data-widget-load"),o.a.createElement("td",null,o.a.createElement("code",null,".jarviswidget")),o.a.createElement("td",null,"widget-ajax.php"),o.a.createElement("td",null,"The file that is loaded with ajax.")),o.a.createElement("tr",null,o.a.createElement("td",null,"data-widget-refresh"),o.a.createElement("td",null,o.a.createElement("code",null,".jarviswidget")),o.a.createElement("td",null,"10"),o.a.createElement("td",null,"Seconds to refresh a ajax file ",o.a.createElement("i",null,"(see 'data-widget-load')"),".")),o.a.createElement("tr",null,o.a.createElement("td",null,"data-widget-refreshbutton"),o.a.createElement("td",null,o.a.createElement("code",null,".jarviswidget")),o.a.createElement("td",null,"false"),o.a.createElement("td",null,"Prevent a ajax widget from showing a refresh button ",o.a.createElement("i",null,"(can only be used with the value 'false')"),".")),o.a.createElement("tr",null,o.a.createElement("td",null,"data-widget-hidden"),o.a.createElement("td",null,o.a.createElement("code",null,".jarviswidget")),o.a.createElement("td",null,"true"),o.a.createElement("td",null,"Hide a widget at load ",o.a.createElement("i",null,"(can only be used with the value 'true')"),".")),o.a.createElement("tr",null,o.a.createElement("td",null," colorbutton"),o.a.createElement("td",null,o.a.createElement("code",null,".jarviswidget")),o.a.createElement("td",null,"false"),o.a.createElement("td",null,"This is active by default, set it to false to hide.")),o.a.createElement("tr",null,o.a.createElement("td",null,"data-widget-collapsed"),o.a.createElement("td",null,o.a.createElement("code",null,".jarviswidget")),o.a.createElement("td",null,"false"),o.a.createElement("td",null,"Collapse a widget upon load ",o.a.createElement("i",null,"(can only be used with the value 'true')"),". This will allways be collapsed every page load.")),o.a.createElement("tr",null,o.a.createElement("td",null,"data-widget-grid"),o.a.createElement("td",null,o.a.createElement("code",null,"article")),o.a.createElement("td",null,"false"),o.a.createElement("td",null,"You can exclude grids from being a sortable/droppable area, this means that all widgets in this area will work, but cant be sortable/droppable and that all other widgets cant be dropped in this area. Add this attribute ",o.a.createElement("i",null,"(can only be used with the value 'false')")," to a grid element.")),o.a.createElement("tr",null,o.a.createElement("td",null,o.a.createElement("code",null,".no-padding")),o.a.createElement("td",null,o.a.createElement("code",null,".widget-body")),o.a.createElement("td",null,"n/a"),o.a.createElement("td",null,"Removes all padding inside widget body")),o.a.createElement("tr",null,o.a.createElement("td",null,o.a.createElement("code",null,".well")),o.a.createElement("td",null,o.a.createElement("code",null,".jarviswidget")),o.a.createElement("td",null,"n/a"),o.a.createElement("td",null,"Converts a widget to a well"))),o.a.createElement("tfoot",null,o.a.createElement("tr",null,o.a.createElement("td",{colSpan:"4"},"These HTML5 attributes are used as individual widget options. Main options can be changed in the widgets plugin it self. Notice: data attributes can only have 1 boolan value(see above)!")))))))))}}]),t}(o.a.Component),g=p;t.default=g;!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(p,"Widgets","/home/this/WebstormProjects/trading-charts-demo/src/app/routes/widgets/components/Widgets.js"),__REACT_HOT_LOADER__.register(g,"default","/home/this/WebstormProjects/trading-charts-demo/src/app/routes/widgets/components/Widgets.js"))}()}});