/* Flot plugin for automatically redrawing plots as the placeholder resizes.Copyright (c) 2007-2014 IOLA and Ole Laursen.Licensed under the MIT license.It works by listening for changes on the placeholder div (through the jQueryresize event plugin) - if the size changes, it will redraw the plot.There are no options. If you need to disable the plugin for some plots, youcan just fix the size of their placeholders.*/!function(a,b,c){"$:nomunge";functiond(c){h===!0&&(h=c||1);for(vari=f.length-1;i>=0;i--){varm=a(f[i]);if(m[0]==b||m.is(":visible")){varn=m.width(),o=m.height(),p=m.data(k);!p||n===p.w&&o===p.h||(m.trigger(j,[p.w=n,p.h=o]),h=c||!0)}elsep=m.data(k),p.w=0,p.h=0}null!==e&&(h&&(null==c||1e3>c-h)?e=b.requestAnimationFrame(d):(e=setTimeout(d,g[l]),h=!1))}vare,f=[],g=a.resize=a.extend(a.resize,{}),h=!1,i="setTimeout",j="resize",k=j+"-special-event",l="pendingDelay",m="activeDelay",n="throttleWindow";g[l]=200,g[m]=20,g[n]=!0,a.event.special[j]={setup:function(){if(!g[n]&&this[i])return!1;varb=a(this);f.push(this),b.data(k,{w:b.width(),h:b.height()}),1===f.length&&(e=c,d())},teardown:function(){if(!g[n]&&this[i])return!1;for(varb=a(this),c=f.length-1;c>=0;c--)if(f[c]==this){f.splice(c,1);break}b.removeData(k),f.length||(h?cancelAnimationFrame(e):clearTimeout(e),e=null)},add:function(b){functiond(b,d,f){varg=a(this),h=g.data(k)||{};h.w=d!==c?d:g.width(),h.h=f!==c?f:g.height(),e.apply(this,arguments)}if(!g[n]&&this[i])return!1;vare;returna.isFunction(b)?(e=b,d):(e=b.handler,void(b.handler=d))}},b.requestAnimationFrame||(b.requestAnimationFrame=function(){returnb.webkitRequestAnimationFrame||b.mozRequestAnimationFrame||b.oRequestAnimationFrame||b.msRequestAnimationFrame||function(a,c){returnb.setTimeout(function(){a((newDate).getTime())},g[m])}}()),b.cancelAnimationFrame||(b.cancelAnimationFrame=function(){returnb.webkitCancelRequestAnimationFrame||b.mozCancelRequestAnimationFrame||b.oCancelRequestAnimationFrame||b.msCancelRequestAnimationFrame||clearTimeout}())}(jQuery,this),function(a){functionb(a){functionb(){varb=a.getPlaceholder();0!=b.width()&&0!=b.height()&&(a.resize(),a.setupGrid(),a.draw())}functionc(a,c){a.getPlaceholder().resize(b)}functiond(a,c){a.getPlaceholder().unbind("resize",b)}a.hooks.bindEvents.push(c),a.hooks.shutdown.push(d)}varc={};a.plot.plugins.push({init:b,options:c,name:"resize",version:"1.0"})}(jQuery);