var TWEEN,vis4,BubbleTree;(function(n){"use strict";var o="cuid",i=0,u=4,r=36,s=Math.pow(r,u),f=function(n,t){var i="000000000"+n;return i.substr(i.length-t)},e=function(){return f((Math.random()*s<<0).toString(r),u)},h=function(){return i=i=1e3&&delete f[e.shift()],e.push(u),f[u]=n[v](t,o),i?i(f[u]):f[u])}return r}function oi(){return this.hex}function br(n,t){for(var f=[],i,r=0,u=n.length;u-2*!t>r;r+=2)i=[{x:+n[r-2],y:+n[r-1]},{x:+n[r],y:+n[r+1]},{x:+n[r+2],y:+n[r+3]},{x:+n[r+4],y:+n[r+5]}],t?r?u-4==r?i[3]={x:+n[0],y:+n[1]}:u-2==r&&(i[2]={x:+n[0],y:+n[1]},i[3]={x:+n[2],y:+n[3]}):i[0]={x:+n[u-2],y:+n[u-1]}:u-4==r?i[3]=i[2]:r||(i[0]={x:+n[r],y:+n[r+1]}),f.push(["C",(-i[0].x+6*i[1].x+i[2].x)/6,(-i[0].y+6*i[1].y+i[2].y)/6,(i[1].x+6*i[2].x-i[3].x)/6,(i[1].y+6*i[2].y-i[3].y)/6,i[2].x,i[2].y]);return f}function kr(n,t,i,r,u){var f=-3*t+9*i-9*r+3*u,e=n*f+6*t-12*i+6*r;return n*e-3*t+3*i}function vt(n,t,i,r,f,e,o,s,h){var c;h==null&&(h=1),h=h>1?1:h<0?0:h;var l=h/2,w=12,b=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],k=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],a=0;for(c=0;cv;)l/=2,h+=(co(u,e))&&!(o(t,r)o(f,s))){var p=(n*r-t*i)*(u-e)-(n-i)*(u*s-f*e),w=(n*r-t*i)*(f-s)-(t-r)*(u*s-f*e),a=(n-i)*(f-s)-(t-r)*(u-e);if(a){var v=p/a,y=w/a,h=+v.toFixed(2),c=+y.toFixed(2);if(!(h<+l(n,i).toFixed(2))&&!(h>+o(n,i).toFixed(2))&&!(h<+l(u,e).toFixed(2))&&!(h>+o(u,e).toFixed(2))&&!(c<+l(t,r).toFixed(2))&&!(c>+o(t,r).toFixed(2))&&!(c<+l(f,s).toFixed(2))&&!(c>+o(f,s).toFixed(2)))return{x:v,y:y}}}}function di(n,t,r){var ut=i.bezierBBox(n),ft=i.bezierBBox(t),u,h,c,d,g;if(!i.isBBoxIntersect(ut,ft))return r?0:[];var et=vt.apply(0,n),ot=vt.apply(0,t),p=o(~~(et/5),1),w=o(~~(ot/5),1),nt=[],tt=[],rt={},it=r?0:[];for(u=0;u=0&&d<=1.001&&g>=0&&g<=1.001&&(r?it++:it.push({x:f.x,y:f.y,t1:l(d,1),t2:l(g,1)}))}}return it}function gi(n,t,r){var e,o,s,h,b,k,d,g,c,l,y,p,nt,a,w,tt,v,u,f,it;for(n=i._path2curve(n),t=i._path2curve(t),y=r?0:[],p=0,nt=n.length;pu)return u;while(rf?r=i:u=i,i=(u-r)/2+r}return i}var e=3*t,o=3*(r-t)-e,h=1-e-o,s=3*i,c=3*(u-i)-s,a=1-s-c;return v(n,1/(200*f))}function ft(n,t){var i=[],u={},r;if(this.ms=t,this.times=1,n){for(r in n)n[a](r)&&(u[c(r)]=n[r],i.push(c(r)));i.sort(tf)}this.anim=u,this.top=i[i.length-1],this.percents=i}function kt(n,r,u,e,o,h){var nt,v,et,l,at,dt,ii,tt,vt,gt,yt,d,rt,st,ct,ni,ft,lt;u=c(u);var it,ot,pt,ri=[],ti,bt,kt,w=n.ms,y={},g={},k={};if(e){for(v=0,et=f.length;ve*n.top){u=n.percents[v],bt=n.percents[v-1]||0,w=w/n.top*(u-bt),ti=n.percents[v+1],it=n.anim[u];break}else e&&r.attr(n.anim[n.percents[v]]);if(it){if(ot)ot.initstatus=e,ot.start=new Date-ot.ms*e;else{for(l in it)if(it[a](l)&&(wi[a](l)||r.paper.customAttributes[a](l))){y[l]=r.attr(l),y[l]==null&&(y[l]=bu[l]),g[l]=it[l];switch(wi[l]){case p:k[l]=(g[l]-y[l])/w;break;case"colour":y[l]=i.getRGB(y[l]),at=i.getRGB(g[l]),k[l]={r:(at.r-y[l].r)/w,g:(at.g-y[l].g)/w,b:(at.b-y[l].b)/w};break;case"path":for(dt=wt(y[l],g[l]),ii=dt[1],y[l]=dt[0],k[l]=[],v=0,et=y[l].length;v',fi=ui.firstChild,fi.style.behavior="url(#default#VML)",!(fi&&typeof fi.adj=="object"))return i.type=d;ui=null}i.svg=!(i.vml=i.type=="VML"),i._Paper=hr,i.fn=h=hr.prototype=i.prototype,i._id=0,i._oid=0,i.is=function(n,t){return(t=ni.call(t),t=="finite")?!pu[a](+n):t=="array"?n instanceof Array:t=="null"&&n===null||t==typeof n&&n!==null||t=="object"&&n===Object(n)||t=="array"&&Array.isArray&&Array.isArray(n)||vu.call(n).slice(8,-1).toLowerCase()==t},i.angle=function(n,t,r,f,e,o){if(e==null){var s=n-r,h=t-f;return!s&&!h?0:(180+u.atan2(-h,-s)*180/k+360)%360}return i.angle(n,t,e,o)-i.angle(r,f,e,o)},i.rad=function(n){return n%360*k/180},i.deg=function(n){return n*180/k%360},i.snapTo=function(n,t,r){var f,u;if(r=i.is(r,"finite")?r:10,i.is(n,tt)){for(f=n.length;f--;)if(y(n[f]-t)<=r)return n[f]}else{if(n=+n,u=t%n,un-r)return t-u+n}return t},ff=i.createUUID=function(n,t){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(n,t).toUpperCase()}}(/[xy]/g,function(n){var t=u.random()*16|0,i=n=="x"?t:t&3|8;return i.toString(16)}),i.setWindow=function(n){t("raphael.setWindow",i,r.win,n),r.win=n,r.doc=r.win.document,i._engine.initWin&&i._engine.initWin(r.win)};var ei=function(n){var e,u,f,o,t;if(i.vml){e=/^\s+|\s+$/g;try{f=new ActiveXObject("htmlfile"),f.write(""),f.close(),u=f.body}catch(s){u=createPopup().document.body}o=u.createTextRange(),ei=it(function(n){try{u.style.color=b(n).replace(e,d);var t=o.queryCommandValue("ForeColor");return t=(t&255)<<16|t&65280|(t&16711680)>>>16,"#"+("000000"+t.toString(16)).slice(-6)}catch(i){return"none"}})}else t=r.doc.createElement("i"),t.title="Raphaël Colour Picker",t.style.display="none",r.doc.body.appendChild(t),ei=it(function(n){return t.style.color=n,r.doc.defaultView.getComputedStyle(t,d).getPropertyValue("color")});return ei(n)},ef=function(){return"hsb("+[this.h,this.s,this.b]+")"},of=function(){return"hsl("+[this.h,this.s,this.l]+")"},yr=function(){return this.hex},pr=function(n,t,r){if(t==null&&i.is(n,"object")&&"r"in n&&"g"in n&&"b"in n&&(r=n.b,t=n.g,n=n.r),t==null&&i.is(n,ti)){var u=i.getRGB(n);n=u.r,t=u.g,r=u.b}return(n>1||t>1||r>1)&&(n/=255,t/=255,r/=255),[n,t,r]},wr=function(n,t,r,u){n*=255,t*=255,r*=255;var f={r:n,g:t,b:r,hex:i.rgb(n,t,r),toString:yr};return i.is(u,"finite")&&(f.opacity=u),f};i.color=function(n){var t;return i.is(n,"object")&&"h"in n&&"s"in n&&"b"in n?(t=i.hsb2rgb(n),n.r=t.r,n.g=t.g,n.b=t.b,n.hex=t.hex):i.is(n,"object")&&"h"in n&&"s"in n&&"l"in n?(t=i.hsl2rgb(n),n.r=t.r,n.g=t.g,n.b=t.b,n.hex=t.hex):(i.is(n,"string")&&(n=i.getRGB(n)),i.is(n,"object")&&"r"in n&&"g"in n&&"b"in n?(t=i.rgb2hsl(n),n.h=t.h,n.s=t.s,n.l=t.l,t=i.rgb2hsb(n),n.v=t.b):(n={hex:"none"},n.r=n.g=n.b=n.h=n.s=n.v=n.l=-1)),n.toString=yr,n},i.hsb2rgb=function(n,t,i,r){this.is(n,"object")&&"h"in n&&"s"in n&&"b"in n&&(i=n.b,t=n.s,n=n.h,r=n.o),n*=360;var e,o,s,f,u;return n=n%360/60,u=i*t,f=u*(1-y(n%2-1)),e=o=s=i-u,n=~~n,e+=[u,f,0,0,f,u][n],o+=[f,u,u,f,0,0][n],s+=[0,0,f,u,u,f][n],wr(e,o,s,r)},i.hsl2rgb=function(n,t,i,r){this.is(n,"object")&&"h"in n&&"s"in n&&"l"in n&&(i=n.l,t=n.s,n=n.h),(n>1||t>1||i>1)&&(n/=360,t/=100,i/=100),n*=360;var e,o,s,f,u;return n=n%360/60,u=2*t*(i<.5?i:1-i),f=u*(1-y(n%2-1)),e=o=s=i-u/2,n=~~n,e+=[u,f,0,0,f,u][n],o+=[f,u,u,f,0,0][n],s+=[0,0,f,u,u,f][n],wr(e,o,s,r)},i.rgb2hsb=function(n,t,i){i=pr(n,t,i),n=i[0],t=i[1],i=i[2];var f,e,u,r;return u=o(n,t,i),r=u-l(n,t,i),f=r==0?null:u==n?(t-i)/r:u==t?(i-n)/r+2:(n-t)/r+4,f=(f+360)%6/6,e=r==0?0:r/u,{h:f,s:e,b:u,toString:ef}},i.rgb2hsl=function(n,t,i){i=pr(n,t,i),n=i[0],t=i[1],i=i[2];var e,h,u,f,s,r;return f=o(n,t,i),s=l(n,t,i),r=f-s,e=r==0?null:f==n?(t-i)/r:f==t?(i-n)/r+2:(n-t)/r+4,e=(e+360)%6/6,u=(f+s)/2,h=r==0?0:u<.5?r/(2*u):r/(2-2*u),{h:e,s:h,l:u,toString:of}},i._path2string=function(){return this.join(",").replace(du,"$1")},hf=i._preload=function(n,t){var i=r.doc.createElement("img");i.style.cssText="position:absolute;left:-9999em;top:-9999em",i.onload=function(){t.call(this),this.onload=null,r.doc.body.removeChild(this)},i.onerror=function(){r.doc.body.removeChild(this)},r.doc.body.appendChild(i),i.src=n},i.getRGB=it(function(n){if(!n||!!((n=b(n)).indexOf("-")+1))return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:oi};if(n=="none")return{r:-1,g:-1,b:-1,hex:"none",toString:oi};ku[a](n.toLowerCase().substring(0,2))||n.charAt()=="#"||(n=ei(n));var h,u,f,e,o,s,t,r=n.match(yu);return r?(r[2]&&(e=st(r[2].substring(5),16),f=st(r[2].substring(3,5),16),u=st(r[2].substring(1,3),16)),r[3]&&(e=st((s=r[3].charAt(3))+s,16),f=st((s=r[3].charAt(2))+s,16),u=st((s=r[3].charAt(1))+s,16)),r[4]&&(t=r[4][ut](bi),u=c(t[0]),t[0].slice(-1)=="%"&&(u*=2.55),f=c(t[1]),t[1].slice(-1)=="%"&&(f*=2.55),e=c(t[2]),t[2].slice(-1)=="%"&&(e*=2.55),r[1].toLowerCase().slice(0,4)=="rgba"&&(o=c(t[3])),t[3]&&t[3].slice(-1)=="%"&&(o/=100)),r[5])?(t=r[5][ut](bi),u=c(t[0]),t[0].slice(-1)=="%"&&(u*=2.55),f=c(t[1]),t[1].slice(-1)=="%"&&(f*=2.55),e=c(t[2]),t[2].slice(-1)=="%"&&(e*=2.55),(t[0].slice(-3)=="deg"||t[0].slice(-1)=="°")&&(u/=360),r[1].toLowerCase().slice(0,4)=="hsba"&&(o=c(t[3])),t[3]&&t[3].slice(-1)=="%"&&(o/=100),i.hsb2rgb(u,f,e,o)):r[6]?(t=r[6][ut](bi),u=c(t[0]),t[0].slice(-1)=="%"&&(u*=2.55),f=c(t[1]),t[1].slice(-1)=="%"&&(f*=2.55),e=c(t[2]),t[2].slice(-1)=="%"&&(e*=2.55),(t[0].slice(-3)=="deg"||t[0].slice(-1)=="°")&&(u/=360),r[1].toLowerCase().slice(0,4)=="hsla"&&(o=c(t[3])),t[3]&&t[3].slice(-1)=="%"&&(o/=100),i.hsl2rgb(u,f,e,o)):(r={r:u,g:f,b:e,toString:oi},r.hex="#"+(16777216|e|f<<8|u<<16).toString(16).slice(1),i.is(o,"finite")&&(r.opacity=o),r):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:oi}},i),i.hsb=it(function(n,t,r){return i.hsb2rgb(n,t,r).hex}),i.hsl=it(function(n,t,r){return i.hsl2rgb(n,t,r).hex}),i.rgb=it(function(n,t,i){return"#"+(16777216|i|t<<8|n<<16).toString(16).slice(1)}),i.getColor=function(n){var t=this.getColor.start=this.getColor.start||{h:0,s:1,b:n||.75},i=this.hsb2rgb(t.h,t.s,t.b);return t.h+=.075,t.h>1&&(t.h=0,t.s-=.2,t.s<=0&&(this.getColor.start={h:0,s:1,b:t.b})),i.hex},i.getColor.reset=function(){delete this.start},i.parsePathString=function(n){var r,u,t;return n?(r=et(n),r.arr)?rt(r.arr):(u={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},t=[],i.is(n,tt)&&i.is(n[0],tt)&&(t=rt(n)),t.length||b(n).replace(gu,function(n,i,r){var f=[],e=i.toLowerCase();if(r.replace(ar,function(n,t){t&&f.push(+t)}),e=="m"&&f.length>2&&(t.push([i][s](f.splice(0,2))),e="l",i=i=="m"?"l":"L"),e=="r")t.push([i][s](f));else while(f.length>=u[e])if(t.push([i][s](f.splice(0,u[e]))),!u[e])break}),t.toString=i._path2string,r.arr=rt(t),t):null},i.parseTransformString=it(function(n){if(!n)return null;var r={r:3,s:4,t:2,m:6},t=[];return i.is(n,tt)&&i.is(n[0],tt)&&(t=rt(n)),t.length||b(n).replace(nf,function(n,i,r){var u=[],f=ni.call(i);r.replace(ar,function(n,t){t&&u.push(+t)}),t.push([i][s](u))}),t.toString=i._path2string,t}),et=function(n){var t=et.ps=et.ps||{};return t[n]?t[n].sleep=100:t[n]={sleep:100},setTimeout(function(){for(var i in t)t[a](i)&&i!=n&&(t[i].sleep--,t[i].sleep||delete t[i])}),t[n]},i.findDotsAtSegment=function(n,t,i,r,f,e,o,s,h){var c=1-h,w=nt(c,3),b=nt(c,2),l=h*h,d=l*h,tt=w*n+b*3*h*i+c*3*h*h*f+d*o,it=w*t+b*3*h*r+c*3*h*h*e+d*s,a=n+2*h*(i-n)+l*(f-2*i+n),v=t+2*h*(r-t)+l*(e-2*r+t),y=i+2*h*(f-i)+l*(o-2*f+i),p=r+2*h*(e-r)+l*(s-2*e+r),rt=c*n+h*i,ut=c*t+h*r,ft=c*f+h*o,et=c*e+h*s,g=90-u.atan2(a-y,v-p)*180/k;return(a>y||v=n.x&&t<=n.x2&&i>=n.y&&i<=n.y2},i.isBBoxIntersect=function(n,t){var r=i.isPointInsideBBox;return r(t,n.x,n.y)||r(t,n.x2,n.y)||r(t,n.x,n.y2)||r(t,n.x2,n.y2)||r(n,t.x,t.y)||r(n,t.x2,t.y)||r(n,t.x,t.y2)||r(n,t.x2,t.y2)||(n.xt.x||t.xn.x)&&(n.yt.y||t.yn.y)},i.pathIntersection=function(n,t){return gi(n,t)},i.pathIntersectionNumber=function(n,t){return gi(n,t,1)},i.isPointInsidePath=function(n,t,r){var u=i.pathBBox(n);return i.isPointInsideBBox(u,t,r)&&gi(n,[["M",t,r],["H",u.x2+10]],1)%2==1},i._removedFactory=function(n){return function(){t("raphael.log",null,"Raphaël: you are calling to method “"+n+"” of removed object",n)}};var nr=i.pathBBox=function(n){var c=et(n),h,p,u;if(c.bbox)return pt(c.bbox);if(!n)return{x:0,y:0,width:0,height:0,x2:0,y2:0};n=wt(n);var f=0,e=0,i=[],r=[],t;for(h=0,p=n.length;h1&&(tt=u.sqrt(tt),i=tt*i,r=tt*r);var ht=i*i,ct=r*r,vt=(e==o?-1:1)*u.sqrt(y((ht*ct-ht*d*d-ct*b*b)/(ht*d*d+ct*b*b))),rt=vt*i*d/r+(n+h)/2,ft=vt*-r*b/i+(t+c)/2,v=u.asin(((t-ft)/r).toFixed(9)),a=u.asin(((c-ft)/r).toFixed(9));v=na&&(v=v-k*2),!o&&a>v&&(a=a-k*2)}if(st=a-v,y(st)>at){var ni=a,ti=h,ii=c;a=v+at*(o&&a>v?1:-1),h=rt+i*u.cos(a),c=ft+r*u.sin(a),p=nu(h,c,i,r,f,0,o,ti,ii,[a,ni,rt,ft])}st=a-v;var ri=u.cos(v),ui=u.sin(v),fi=u.cos(a),ei=u.sin(a),yt=u.tan(st/4),pt=4/3*i*yt,wt=4/3*r*yt,bt=[n,t],nt=[n+pt*ui,t-wt*ri],kt=[h+pt*ei,c-wt*fi],dt=[h,c];if(nt[0]=2*bt[0]-nt[0],nt[1]=2*bt[1]-nt[1],l)return[nt,kt,dt][s](p);for(p=[nt,kt,dt][s](p).join()[ut](","),lt=[],w=0,gt=p.length;w"1e12"&&(p=.5),y(w)>"1e12"&&(w=.5),p>0&&p<1&&(a=hi(n,t,i,r,f,e,s,h,p),d.push(a.x),k.push(a.y)),w>0&&w<1&&(a=hi(n,t,i,r,f,e,s,h,w),d.push(a.x),k.push(a.y)),b=e-2*r+t-(h-2*e+r),c=2*(r-t)-2*(e-r),g=t-r,p=(-c+u.sqrt(c*c-4*b*g))/2/b,w=(-c-u.sqrt(c*c-4*b*g))/2/b,y(p)>"1e12"&&(p=.5),y(w)>"1e12"&&(w=.5),p>0&&p<1&&(a=hi(n,t,i,r,f,e,s,h,p),d.push(a.x),k.push(a.y)),w>0&&w<1&&(a=hi(n,t,i,r,f,e,s,h,w),d.push(a.x),k.push(a.y)),{min:{x:l[v](0,d),y:l[v](0,k)},max:{x:o[v](0,d),y:o[v](0,k)}}}),wt=i._path2curve=it(function(n,t){var w=!t&&et(n),r,a;if(!t&&w.curve)return rt(w.curve);var u=dr(n),i=t&&dr(t),f={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},e={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},b=function(n,t,i){var r,u,f={T:1,Q:1};if(!n)return["C",t.x,t.y,t.x,t.y,t.x,t.y];n[0]in f||(t.qx=t.qy=null);switch(n[0]){case"M":t.X=n[1],t.Y=n[2];break;case"A":n=["C"][s](nu[v](0,[t.x,t.y][s](n.slice(1))));break;case"S":i=="C"||i=="S"?(r=t.x*2-t.bx,u=t.y*2-t.by):(r=t.x,u=t.y),n=["C",r,u][s](n.slice(1));break;case"T":i=="Q"||i=="T"?(t.qx=t.x*2-t.qx,t.qy=t.y*2-t.qy):(t.qx=t.x,t.qy=t.y),n=["C"][s](gr(t.x,t.y,t.qx,t.qy,n[1],n[2]));break;case"Q":t.qx=n[1],t.qy=n[2],n=["C"][s](gr(t.x,t.y,n[1],n[2],n[3],n[4]));break;case"L":n=["C"][s](si(t.x,t.y,n[1],n[2]));break;case"H":n=["C"][s](si(t.x,t.y,n[1],t.y));break;case"V":n=["C"][s](si(t.x,t.y,t.x,n[1]));break;case"Z":n=["C"][s](si(t.x,t.y,t.X,t.Y))}return n},k=function(n,t){if(n[t].length>7){n[t].shift();for(var r=n[t];r.length;)n.splice(t++,0,["C"][s](r.splice(0,6)));n.splice(t,1),a=o(u.length,i&&i.length||0)}},d=function(n,t,r,f,e){n&&t&&n[e][0]=="M"&&t[e][0]!="M"&&(t.splice(e,0,["M",f.x,f.y]),r.bx=0,r.by=0,r.x=n[e][1],r.y=n[e][2],a=o(u.length,i&&i.length||0))};for(r=0,a=o(u.length,i&&i.length||0);ru){if(t&&!v.start){if(o=ur(s,h,e[1],e[2],e[3],e[4],e[5],e[6],u-l),c+=["C"+o.start.x,o.start.y,o.m.x,o.m.y,o.x,o.y],f)return c;v.start=c,c=["M"+o.x,o.y+"C"+o.n.x,o.n.y,o.end.x,o.end.y,e[5],e[6]].join(),l+=a,s=+e[5],h=+e[6];continue}if(!n&&!t)return o=ur(s,h,e[1],e[2],e[3],e[4],e[5],e[6],u-l),{x:o.x,y:o.y,alpha:o.alpha}}l+=a,s=+e[5],h=+e[6]}c+=e.shift()+e}return v.end=c,o=n?l:t?v:i.findDotsAtSegment(s,h,e[0],e[1],e[2],e[3],e[4],e[5],1),o.alpha&&(o={x:o.x,y:o.y,alpha:o.alpha}),o}},ou=fr(1),su=fr(),er=fr(0,1);i.getTotalLength=ou,i.getPointAtLength=su,i.getSubpath=function(n,t,i){if(this.getTotalLength(n)-i<1e-6)return er(n,t).end;var r=er(n,i,1);return t?er(r,t).end:r},e.getTotalLength=function(){var n=this.getPath();if(n)return this.node.getTotalLength?this.node.getTotalLength():ou(n)},e.getPointAtLength=function(n){var t=this.getPath();if(t)return su(t,n)},e.getPath=function(){var n,t=i._getPath[this.type];if(this.type!="text"&&this.type!="set")return t&&(n=t(this)),n},e.getSubpath=function(n,t){var r=this.getPath();if(r)return i.getSubpath(r,n,t)},g=i.easing_formulas={linear:function(n){return n},"<":function(n){return nt(n,1.7)},">":function(n){return nt(n,.48)},"<>":function(n){var i=.48-n/1.04,r=u.sqrt(.1734+i*i),f=r-i,o=nt(y(f),1/3)*(f<0?-1:1),e=-r-i,s=nt(y(e),1/3)*(e<0?-1:1),t=o+s+.5;return(1-t)*3*t*t+t*t*t},backIn:function(n){var t=1.70158;return n*n*((t+1)*n-t)},backOut:function(n){n=n-1;var t=1.70158;return n*n*((t+1)*n+t)+1},elastic:function(n){return n==!!n?n:nt(2,-10*n)*u.sin((n-.075)*2*k/.3)+1},bounce:function(n){var r=7.5625,t=2.75,i;return n<1/t?i=r*n*n:n<2/t?(n-=1.5/t,i=r*n*n+.75):n<2.5/t?(n-=2.25/t,i=r*n*n+.9375):(n-=2.625/t,i=r*n*n+.984375),i}},g.easeIn=g["ease-in"]=g["<"],g.easeOut=g["ease-out"]=g[">"],g.easeInOut=g["ease-in-out"]=g["<>"],g["back-in"]=g.backIn,g["back-out"]=g.backOut;var f=[],hu=n.requestAnimationFrame||n.webkitRequestAnimationFrame||n.mozRequestAnimationFrame||n.oRequestAnimationFrame||n.msRequestAnimationFrame||function(n){setTimeout(n,16)},or=function(){for(var ft=+new Date,b=0,n,v,r,u,g,c,nt,w,ut;b1&&!n.next){for(d in tt)tt[a](d)&&(rt[d]=n.totalOrigin[d]);n.el.attr(rt),kt(n.anim,n.el,n.anim.percents[0],null,n.totalOrigin,n.repeat-1)}n.next&&!n.stop&&kt(n.anim,n.el,n.next,null,n.totalOrigin,n.repeat)}}i.svg&&y&&y.paper&&y.paper.safari(),f.length&&hu(or)},sr=function(n){return n>255?255:n<0?0:n};e.animateWith=function(n,t,r,u,e,o){var s=this,c,a,v,h,l;if(s.removed)return o&&o.call(s),s;for(c=r instanceof ft?r:i.animation(r,u,e,o),kt(c,s,c.percents[0],null,s.attr()),h=0,l=f.length;h.5)*2-1;d(b-.5,2)+d(s-.5,2)>.25&&(s=c.sqrt(.25-d(b-.5,2))*r+.5)&&s!=.5&&(s=s.toFixed(5)-1e-5*r)}return o}),r=r.split(/\s*\-\s*/),w=="linear"){if(v=r.shift(),v=-f(v),isNaN(v))return null;e=[0,0,c.cos(i.rad(v)),c.sin(i.rad(v))],nt=1/(k(y(e[2]),y(e[3]))||1),e[2]*=nt,e[3]*=nt,e[2]<0&&(e[0]=-e[2],e[2]=0),e[3]<0&&(e[1]=-e[3],e[3]=0)}if(p=i._parseDots(r),!p)return null;if(l=l.replace(/[\(\)\s,\xb0#]/g,"_"),t.gradient&&l!=t.gradient.id&&(it.defs.removeChild(t.gradient),delete t.gradient),!t.gradient)for(a=n(w+"Gradient",{id:l}),t.gradient=a,n(a,w=="radial"?{fx:b,fy:s}:{x1:e[0],y1:e[1],x2:e[2],y2:e[3],gradientTransform:t.matrix.invert()}),it.defs.appendChild(a),h=0,rt=p.length;h1?w.opacity/100:w.opacity});case"stroke":w=i.getRGB(e),h.setAttribute(v,w.hex),v=="stroke"&&w[t]("opacity")&&n(h,{"stroke-opacity":w.opacity>1?w.opacity/100:w.opacity}),v=="stroke"&&r._.arrows&&("startString"in r._.arrows&&s(r,r._.arrows.startString),"endString"in r._.arrows&&s(r,r._.arrows.endString,1));break;case"gradient":(r.type=="circle"||r.type=="ellipse"||u(e).charAt()!="r")&&it(r,e);break;case"opacity":c.gradient&&!c[t]("stroke-opacity")&&n(h,{"stroke-opacity":e>1?e/100:e});case"fill-opacity":if(c.gradient){ut=i._g.doc.getElementById(h.getAttribute("fill").replace(/^url\(#|\)$/g,o)),ut&&(ft=ut.getElementsByTagName("stop"),n(ft[ft.length-1],{"stop-opacity":e}));break}default:v=="font-size"&&(e=tt(e,10)+"px"),yt=v.replace(/(\-.)/g,function(n){return n.substring(1).toUpperCase()}),h.style[yt]=e,r._.dirty=1,h.setAttribute(v,e)}}ot(r,f),h.style.visibility=pt},ut=1.2,ot=function(r,f){var y,h,l,e,a,p,v;if(r.type=="text"&&(f[t]("text")||f[t]("font")||f[t]("font-size")||f[t]("x")||f[t]("y"))){var c=r.attrs,s=r.node,w=s.firstChild?tt(i._g.doc.defaultView.getComputedStyle(s.firstChild,o).getPropertyValue("font-size"),10):10;if(f[t]("text")){for(c.text=f.text;s.firstChild;)s.removeChild(s.firstChild);for(y=u(f.text).split("\n"),h=[],e=0,a=y.length;e")),vt=ti.getBoundingClientRect(),p.W=v.w=(vt.right-vt.left)/ii,p.H=v.h=(vt.bottom-vt.top)/ii,p.X=v.x,p.Y=v.y+p.H/2,("x"in c||"y"in c)&&(p.path.v=i.format("m{0},{1}l{2},{1}",e(v.x*n),e(v.y*n),e(v.x*n)+1)),ri=["x","y","text","font","font-family","font-weight","font-style","font-size"],bt=0,hi=ri.length;bt.25&&(i=c.sqrt(.25-v(t-.5,2))*((i>.5)*2-1)+.5),p=t+o+i),u}),r=r.split(/\s*\-\s*/),y=="linear"&&(l=r.shift(),l=-f(l),isNaN(l)))||(s=i._parseDots(r),!s))return null;if(n=n.shape||n.node,s.length){for(n.removeChild(e),e.on=!0,e.method="none",e.color=s[0].color,e.color2=s[s.length-1].color,a=[],h=0,w=s.length;h')}}catch(i){s=function(n){return t.createElement("<"+n+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},i._engine.initWin(i._g.win),i._engine.create=function(){var e=i._getContainer.apply(0,arguments),f=e.container,r=e.height,a,u=e.width,c=e.x,l=e.y;if(!f)throw new Error("VML container not found.");var t=new i._Paper,s=t.canvas=i._g.doc.createElement("div"),h=s.style;return c=c||0,l=l||0,u=u||512,r=r||342,t.width=u,t.height=r,u==+u&&(u+="px"),r==+r&&(r+="px"),t.coordsize=n*1e3+o+n*1e3,t.coordorigin="0 0",t.span=i._g.doc.createElement("span"),t.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",s.appendChild(t.span),h.cssText=i.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",u,r),f==1?(i._g.doc.body.appendChild(s),h.left=c+"px",h.top=l+"px",h.position="absolute"):f.firstChild?f.insertBefore(s,f.firstChild):f.appendChild(s),t.renderfix=function(){},t},i.prototype.clear=function(){i.eve("raphael.clear",this),this.canvas.innerHTML=u,this.span=i._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},i.prototype.remove=function(){i.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var n in this)this[n]=typeof this[n]=="function"?i._removedFactory(n):null;return!0},d=i.st;for(y in r)r[h](y)&&!d[h](y)&&(d[y]=function(n){return function(){var t=arguments;return this.forEach(function(i){i[n].apply(i,t)})}}(y))}}(),yi.was?r.win.Raphael=i:Raphael=i,i}),Date.now===undefined&&(Date.now=function(){return(new Date).valueOf()}),TWEEN=TWEEN||function(){var n=[];return{REVISION:"14",getAll:function(){return n},removeAll:function(){n=[]},add:function(t){n.push(t)},remove:function(t){var i=n.indexOf(t);i!==-1&&n.splice(i,1)},update:function(t){if(n.length===0)return!1;var i=0;for(t=t!==undefined?t:typeof window!="undefined"&&window.performance!==undefined&&window.performance.now!==undefined?window.performance.now():Date.now();i1?1:w,nt=d(w);for(h in t)tt=r[h]||0,p=t[h],p instanceof Array?i[h]=g(p,nt):(typeof p=="string"&&(p=tt+parseFloat(p,10)),typeof p=="number"&&(i[h]=tt+(p-tt)*nt));if(v!==null&&v.call(i,nt),w==1){if(o>0){isFinite(o)&&o--;for(h in u)typeof t[h]=="string"&&(u[h]=u[h]+parseFloat(t[h],10)),s&&(rt=u[h],u[h]=t[h],t[h]=rt),r[h]=u[h];return s&&(k=!k),f=n+c,!0}for(y!==null&&y.call(i),it=0,ut=e.length;it1?f(n[i],n[i-1],i-r):f(n[u],n[u+1>i?i:u+1],r-u)},Bezier:function(n,t){for(var u=0,r=n.length-1,f=Math.pow,e=TWEEN.Interpolation.Utils.Bernstein,i=0;i<=r;i++)u+=f(1-t,r-i)*f(t,i)*n[i]*e(r,i);return u},CatmullRom:function(n,t){var i=n.length-1,u=i*t,r=Math.floor(u),f=TWEEN.Interpolation.Utils.CatmullRom;return n[0]===n[i]?(t<0&&(r=Math.floor(u=i*(1+t))),f(n[(r-1+i)%i],n[r],n[(r+1)%i],n[(r+2)%i],u-r)):t<0?n[0]-(f(n[0],n[0],n[1],n[1],-u)-n[0]):t>1?n[i]-(f(n[i],n[i],n[i-1],n[i-1],u-i)-n[i]):f(n[r?r-1:0],n[r],n[i1;i--)r*=i;return n[t]=r}}(),CatmullRom:function(n,t,i,r,u){var f=(i-n)*.5,e=(r-t)*.5,o=u*u,s=u*o;return(2*t-2*i+f+e)*s+(-3*t+3*i-2*f-e)*o+f*u+t}}},typeof module!="undefined"&&module.exports&&(module.exports=TWEEN),vis4=function(){},vis4.log=function(){try{window.console!==null&&console.log.apply(this,arguments)}catch(n){}},vis4.str2time=function(n){var t=n.split(".");return Math.round(Date.UTC(2e3+t[0],t[1]-1,t[2])*.001)},vis4.round=function(n,t){var i=Math.pow(10,t);return Math.round(n*i)/i},vis4.formatNumber_ksep=".",vis4.formatNumber_dsep=",",vis4.formatNumber=function(n){var i,r,u;for(n=""+n,i="",r=0,u=n.length-1;u>=0;u--)r>0&&r2&&r.push(n[i]);t.func=n[2],t.scope=n[1],t.args=r,t.running=!0,t.timer=window.setTimeout(this.run.bind(t),n[0])},n.run=function(){var n=this;n.func.apply(n.scope,n.args),n.running=!1},n.cancel=function(){vis4.log("canceling timer",this),window.clearTimeout(this.timer),this.running=!1},n.init(arguments)};var vis4loadingItem=function(n,t,i,r){this.url=n,this.id=t,this.type=i,this.loader=r,this.load=function(){$.get(this.url,this.processContent.bind(this))},this.processContent=function(n){this.data=this.type=="tsv"?vis4.parseTSV(n,!0):this.type=="json"?typeof n=="string"?$.parseJSON(n):n:n,this.loader.itemLoaded()}},vis4loader=function(){this.items=[],this.byID={},this.add=function(n,t,i){i===null&&(i="text");var r=new vis4loadingItem(n,t,i,this);this.items.push(r),this.byID[t]=r},this.load=function(n){this.callback=n,this.loaded=0;for(var t=0;t>16,this.g=this.u>>8&255,this.b=this.u&255},this.hex2int=function(){this.u=parseInt(this.x.substr(1),16),this.onChange()},this.int2hex=function(){var n="000000"+this.u.toString(16).toUpperCase();this.x="#"+n.substr(n.length-6),this.onChange()},this.int2rgb=function(){this.r=this.u>>16,this.g=this.u>>8&255,this.b=this.u&255},this.hsx2rgb=function(){switch(this.mode){case"hsv":this.hsv2rgb();break;case"hsi":this.hsi2rgb();break;case"hsl":this.hsl2rgb();break;case"hsb":this.hsb2rgb()}},this.rgb2hsx=function(){switch(this.mode){case"hsv":this.rgb2hsv();break;case"hsi":this.rgb2hsi();break;case"hsl":this.rgb2hsl();break;case"hsb":this.rgb2hsb()}},this.hue=function(n){return this._evaluate(n,"h"),this.hsx2rgb(),this.rgb2int(),this.int2hex(),this},this.saturation=function(n){return this._evaluate(n,"s"),this.hsx2rgb(),this.rgb2int(),this.int2hex(),this},this.lightness=function(n){if(this.mode!="hsl"){this.log("WARNING: lightness property not available in "+this.mode+" mode");return}return this._evaluate(n,"l"),this.hsx2rgb(),this.rgb2int(),this.int2hex(),this},this.brightness=function(n){if(this.mode!="hsb"){this.log("WARNING: brightness property not available in "+this.mode+" mode");return}return this._evaluate(n,"br"),this.hsx2rgb(),this.rgb2int(),this.int2hex(),this},this.value=function(n){if(this.mode!="hsv"){this.log("WARNING: value property not available in "+this.mode+" mode");return}return this._evaluate(n,"v"),this.hsx2rgb(),this.rgb2int(),this.int2hex(),this},this.intensity=function(n){if(this.mode!="hsi"){this.log("WARNING: intensity property not available in "+this.mode+" mode");return}return this._evaluate(n,"i"),this.hsx2rgb(),this.rgb2int(),this.int2hex(),this},this._evaluate=function(n,t){typeof n=="string"?(n.charAt(0)!="+"||isNaN(n.substr(1))?n.charAt(0)!="-"||isNaN(n.substr(1))||(this[t]=this[t]-Number(n.substr(1))):this[t]=Number(this[t])+Number(n.substr(1)),n.charAt(0)!="*"||isNaN(n.substr(1))?n.charAt(0)!="/"||isNaN(n.substr(1))||(this[t]=this[t]/Number(n.substr(1))):this[t]=this[t]*Number(n.substr(1))):isNaN(n)||(this[t]=Number(n))},this.rgb=function(){return[this.r,this.g,this.b]},this.hsl=function(){return[this.h,this.s,this.l]},this.rgb2hsv=function(){var i=Math.min(Math.min(this.r,this.g),this.b),n=Math.max(Math.max(this.r,this.g),this.b),t=n-i;this.v=n/255,this.s=t/n,this.s===0?this.h=undefined:(this.r==n&&(this.h=(this.g-this.b)/t),this.g==n&&(this.h=2+(this.b-this.r)/t),this.b==n&&(this.h=4+(this.r-this.g)/t),this.h*=60,this.h<0&&(this.h+=360))},this.hsv2rgb=function(){var i=this.h,e=this.s,r=this._rgb,n=this.v*255,o,s,t,u,f;if(this.s===0&&isNaN(i))this.r=this.g=this.b=n;else{i==360&&(i=0),i/=60,o=Math.floor(i),s=i-o,t=n*(1-e),u=n*(1-e*s),f=n*(1-e*(1-s));switch(o){case 0:r(n,f,t);break;case 1:r(u,n,t);break;case 2:r(t,n,f);break;case 3:r(t,u,n);break;case 4:r(f,t,n);break;case 5:r(n,t,u)}}},this._rgb=function(n,t,i){this.r=n,this.g=t,this.b=i},this.rgb2hsl=function(){var i=this.r/255,r=this.g/255,u=this.b/255,t=Math.min(Math.min(i,r),u),n=Math.max(Math.max(i,r),u);this.l=(n+t)/2,n==t?(this.s=0,this.h=undefined):this.s=this.l<.5?(n-t)/(n+t):(n-t)/(2-n-t),i==n?this.h=(r-u)/(n-t):r==n?this.h=2+(u-i)/(n-t):u==n&&(this.h=4+(i-r)/(n-t)),this.h*=60,this.h<0&&(this.h+=360)},this.hsl2rgb=function(){var r,u,t,i,f,n;if(this.s===0)this.r=this.g=this.b=this.l*255;else{for(t=[0,0,0],i=[0,0,0],u=this.l<.5?this.l*(1+this.s):this.l+this.s-this.l*this.s,r=2*this.l-u,f=this.h/360,t[0]=f+1/3,t[1]=f,t[2]=f-1/3,n=0;n<3;n++)t[n]<0&&(t[n]+=1),t[n]>1&&(t[n]-=1),i[n]=6*t[n]<1?r+(u-r)*6*t[n]:2*t[n]<1?u:3*t[n]<2?r+(u-r)*(2/3-t[n])*6:r;this.r=i[0]*255,this.g=i[1]*255,this.b=i[2]*255}},this.rgb2hsb=function(){this.rgb2hsl(),this.br=this._rgbLuminance()},this._rgbLuminance=function(){return(.2126*this.r+.7152*this.g+.0722*this.b)/255},this.hsb2rgb=function(){var f=.001,r=0,u=1,n=.5,t,i;for(this.l=n,this.hsl2rgb(),t=this._rgbLuminance(),i=0;Math.abs(t-this.br)>f&&i<100;)t>this.br?u=n:r=n,n=(r+u)/2,this.l=n,this.hsl2rgb(),t=this._rgbLuminance(),i++;this.br=t},this.rgb2hsi=function(){var r,t=this.r,n=this.g,i=this.b,f=Math.max(Math.max(t,n),i),u=t+n+i,e=f-r;t=t/u,n=n/u,i=i/u,r=Math.min(Math.min(t,n),i),this.i=(t+n+i)/765,this.h=this.acos((t-.5*n-.5*i)/Math.sqrt((t-n)*(t-n)+(t-i)*(n-i))),this.s=1-3*r,i>n&&(this.h=360-this.h)},this.hsi2rgb=function(){var n=this.h,e=this.i,u=this.s,t,i,r,f=this.cos;n<=120?(i=(1-u)/3,t=(1+u*f(n)/f(60-n))/3,r=1-(i+t)):n<=240?(n-=120,t=(1-u)/3,r=(1+u*f(n)/f(60-n))/3,i=1-(t+r)):(n-=240,r=(1-u)/3,i=(1+u*f(n)/f(60-n))/3,t=1-(r+i)),t=Math.min(255,t*e*765),r=Math.min(255,r*e*765),i=Math.min(255,i*e*765)}};vis4color.fromHex=function(n,t){t==null&&(t="hsl");var i=new vis4color(t);return i.setHexColor(n),i},vis4color.fromRGB=function(n,t,i,r){r===null&&(r="hsl");var u=new vis4color(r);return u.setRGBolor(n,t,i),u},vis4color.fromHSV=function(n,t,i,r){r===null&&(r="hsl");var u=new vis4color(r);return u.setHSVColor(n,t,i),u},vis4color.fromHSL=function(n,t,i,r){r===null&&(r="hsl");var u=new vis4color(r);return u.setHSLColor(n,t,i),u},vis4color.fromHSB=function(n,t,i,r){r===null&&(r="hsl");var u=new vis4color(r);return u.setHSBColor(n,t,i),u},vis4color.fromHSI=function(n,t,i,r){r===null&&(r="hsl");var u=new vis4color(r);return u.setHSIColor(n,t,i),u}; /*! * BubbleTree 2.0.1 * * Copyright (c) 2011 Gregor Aisch (http://driven-by-data.net) * Licensed under the MIT license * */ BubbleTree=function(n){var r=this;if(r.version="2.0.2",r.$container=$(n.container),r.config=$.extend({rootPath:"",minRadiusLabels:40,minRadiusAmounts:20,minRadiusHideLabels:0,cutLabelsAt:50},n),r.tooltip=n.tooltipCallback?n.tooltipCallback:function(){},n.tooltip&&(r.tooltip=n.tooltip),r.style=n.bubbleStyles,r.ns=BubbleTree,r.nodesByUrlToken={},r.nodeList=[],r.iconsByUrlToken={},r.globalNodeCounter=0,r.displayObjects=[],r.bubbleScale=1,r.globRotation=0,r.currentYear=n.initYear,r.currentCenter=undefined,r.currentTransition=undefined,r.baseUrl="",r.setData=function(n){var t=this;n||(n=t.config.data),t.initData(n),t.initPaper(),t.initBubbles(),t.initTween(),t.navigateTo(t.treeRoot)},r.initData=function(n){var t=this;n.level=0,t.preprocessData(n),t.traverse(n,0),t.treeRoot=n},r.preprocessData=function(n){var r=this,i=r.config.maxNodesPerLevel,u,t;if(i&&i0?n.parent.color:"#999999"),n.level>0&&(u=n.parent.children,u.length>1&&(n.left=u[(t-1+u.length)%u.length],n.right=u[(Number(t)+1)%u.length],n.right==n.left&&(n.right=undefined))),n.urlToken=cuid(),r.globalNodeCounter++,r.nodesByUrlToken[n.urlToken]=n,n.maxChildAmount=0,n.children=r.sortChildren(n.children,!0,r.config.sortBy),$.each(n.children,function(t,i){i.parent=n,n.maxChildAmount=Math.max(n.maxChildAmount,i.amount),r.traverse(i,t)}),n.breakdowns&&(n.breakdownsByName={},$.each(n.breakdowns,function(t,i){i.famount=r.ns.Utils.formatNumber(i.amount),i.name&&(n.breakdownsByName[i.name]=i)}))},r.sortChildren=function(n,t,i){var f=[],u=!0;if(i=="label"?(i=r.compareLabels,t=!1):i=r.compareAmounts,n.sort(i),t){while(n.length>0)f.push(u?n.pop():n.shift()),u=!u;return f}return n},r.compareAmounts=function(n,t){return n.amount>t.amount?1:n.amount==t.amount?0:-1},r.compareLabels=function(n,t){return n.label>t.label?1:n.label==t.label?0:-1},r.initPaper=function(){var n=this,r=n.$container,u=n.treeRoot,t=r.width(),i=r.height(),e=Raphael(r[0],t,i),o=Math.min(t,i)*.5-40,f,s=n.ns.Vector,h=new s(t*.5,i*.5);n.width=t,n.height=i,n.paper=e,f=Math.pow((Math.pow(u.amount,.6)+Math.pow(u.maxChildAmount,.6)*2)/o,1.6666666667),n.a2radBase=n.ns.a2radBase=f,n.origin=h},r.onResize=function(){var n=this,r=n.$container,t=r.width(),i=r.height(),e=Math.min(t,i)*.5-40,u,f=n.treeRoot,o,s;n.paper&&t!==0&&i!==0&&(n.paper.setSize(t,i),n.origin.x=t*.5,n.origin.y=i*.5,n.width=t,n.height=i,u=Math.pow((Math.pow(f.amount,.6)+Math.pow(f.maxChildAmount,.6)*2)/e,1.6666666667),n.a2radBase=n.ns.a2radBase=u,$.each(n.displayObjects,function(t,i){i.className=="bubble"&&(i.bubbleRad=n.ns.Utils.amount2rad(i.node.amount))}),n.currentCenter&&n.changeView(n.currentCenter.urlToken))},r.initTween=function(){this.tweenTimer=setInterval(this.loop,1e3/120)},r.initBubbles=function(){var n=this,t=n.treeRoot,u,r=!1,f=n.ns.Bubbles,e,i;n.bubbleClasses=[],n.config.hasOwnProperty("bubbleType")||(n.config.bubbleType=["plain"]),$.isArray(n.config.bubbleType)||(n.config.bubbleType=[n.config.bubbleType]),$.isArray(n.config.bubbleType)&&$.each(n.config.bubbleType,function(t){n.config.bubbleType[t]=="icon"&&(r=!0),n.bubbleClasses.push(n.getBubbleType(n.config.bubbleType[t]))}),i=n.createBubble(t,n.origin,0,0,t.color),n.traverseBubbles(i)},r.getBubbleType=function(){var t=this,i=t.ns.Bubbles;return i.Plain},r.traverseBubbles=function(n){var t=this,c,o=t.ns.Utils.amount2rad,l,a,i,s,f=0,e=0,r,u,h=Math.PI*2;i=n.node.children,$.each(i,function(n,t){f+=o(t.amount)}),i.length>0&&(c=t.createRing(n.node,n.pos,0,{stroke:"#888","stroke-dasharray":"-"})),$.each(i,function(i,c){r=o(c.amount)/f*h||0,u=e+r*.5,isNaN(u)&&vis4.log(e,r,c.amount,f,h),c.centerAngle=u,s=t.createBubble(c,n.pos,0,u,c.color),e+=r,t.traverseBubbles(s)})},r.createBubble=function(n,t,i,r,u){var f=this,s=f.ns,h,c,o,e=n.level;return isNaN(e)&&(e=0),e=Math.min(e,f.bubbleClasses.length-1),o=new f.bubbleClasses[e](n,f,t,i,r,u),f.displayObjects.push(o),o},r.createRing=function(n,t,i,r){var u=this,e=u.ns,f;return f=new e.Ring(n,u,t,i,r),u.displayObjects.push(f),f},r.changeView=function(n){var i=this,gt=i.paper,pt=Math.min(i.width,i.height)*.35,ft=i.ns,ht=ft.Utils,nt=i.origin,ni={stroke:"#ccc","stroke-dasharray":"- "},ti={stroke:"#ccc","stroke-dasharray":". "},e=ht.amount2rad,h=i.treeRoot,ct=i.nodesByUrlToken,t=ct.hasOwnProperty(n)?ct[n]:null,r=new ft.Layout,u,et,l,wt=Math.PI*2,a=i.getBubble.bind(i),ot=i.getRing.bind(i),bt=i.unifyAngle,c,tt,p,ii,w,v,o,ri,rt,b,k,s,kt,lt,at,it,d,g,ut,dt,vt,st,y,yt,f;if(t!==null){lt=!1,at=!1;for(l in i.displayObjects)i.displayObjects[l].hideFlag=!0;if(t==h||t.parent==h&&t.children.length===0){r.$(i).bubbleScale=1,r.$(nt).x=i.width*.5,r.$(nt).y=i.height*.5,c=a(h),t!=h&&(c.childRotation=-t.centerAngle),v=e(h.amount)+e(h.maxChildAmount)+20,k=ot(h),r.$(k).rad=v;for(l in h.children)w=h.children[l],u=a(w),r.$(u).angle=bt(w.centerAngle+c.childRotation),r.$(u).rad=v}else{for(it=t,t.children.length<1&&(t=t.parent),s=pt/(e(t.amount)+e(t.maxChildAmount)*2),isFinite(s)||(s=0),r.$(i).bubbleScale=s,c=a(t),i.currentCenter&&i.currentCenter==t.left?at=!0:i.currentCenter&&i.currentCenter==t.right&&(lt=!0),d=i.shortestAngleTo,r.$(c).angle=d(c.angle,0),v=(e(t.amount)+e(t.maxChildAmount))*s+20,k=ot(t),r.$(k).rad=v,tt=a(t.parent),tt.childRotation=-t.centerAngle,g=tt;g&&g.node.parent;)g=a(g.node.parent,!0),r.$(g).rad=0;r.$(tt).rad=0,ut=i.width*.5,o=0-Math.max(ut*.8-s*(e(t.parent.amount)+e(t.amount*1.15+t.maxChildAmount*1.15)),s*e(t.parent.amount)*-1+ut*.15)+ut,t.left&&t.right&&(dt=s*e(Math.max(t.left.amount,t.right.amount))),kt=v+o,r.$(nt).x=i.width*.5-o-(t!=it?v*.35:0),r.$(nt).y=i.height*.5,new vis4.DelayedTask(1500,vis4,vis4.log,nt,tt.pos),o+=i.width*.1,k=ot(t.parent),r.$(k).rad=o,r.$(c).rad=o,vt=0-(t!=it?it.centerAngle+c.childRotation:0);for(l in t.children)w=t.children[l],u=a(w),r.$(u).angle=i.shortestAngleTo(u.angle,w.centerAngle+c.childRotation+vt),r.$(u).rad=v;st=i.height*.07,t.left&&(p=t.left,rt=e(p.amount)*s,y=(i.paper.height*.5+rt-st)/o,Math.abs(y)>1&&(y=1),b=wt-Math.asin(y),u=a(p),r.$(u).rad=o,yt=d(u.angle,b),r.$(u).angle=d(u.angle,b)),t.right&&(p=t.right,rt=e(p.amount)*s,y=(i.paper.height*.5+rt-st)/o,Math.abs(y)>1&&(y=1),b=Math.asin(y),u=a(p),r.$(u).rad=o,yt=d(u.angle,b),r.$(u).angle=d(u.angle,b)),t=it}for(l in i.displayObjects)f=i.displayObjects[l],f.hideFlag&&f.visible?(r.$(f).alpha=0,f.className=="bubble"&&f.node.level>1&&(r.$(f).rad=0),r.hide(f)):f.hideFlag||(r.$(f).alpha=1,f.visible||(f.alpha=0,r.show(f)));et=new ft.Transitioner($.browser.msie&&$.browser.version==="8.0"||i.currentCenter==t?0:1e3),et.changeLayout(r),i.currentTransition=et,!i.currentCenter&&$.isFunction(i.config.firstNodeCallback)&&i.config.firstNodeCallback(t),i.currentCenter=t}else ht.log("node "+n+" not found")},r.unifyAngle=function(n){for(var i=Math.PI,t=i*2;n>=t;)n-=t;while(n<0)n+=t;return n},r.shortestAngle=function(n,t){var o=function(n){return Math.round(n/Math.PI*180)+""},u=Math.PI,f=u*2,e=r.unifyAngle,i;return n=e(n),t=e(t),i=t-n,i>u&&(i-=f),i<-u&&(i+=f),i},r.shortestAngleTo=function(n,t){return n+r.shortestAngle(n,t)},r.shortestLeftTurn=function(n,t){var i=r.shortestAngle(n,t);return i>0&&(i=i-Math.PI*2),n+i},r.shortestRightTurn=function(n,t){var i=r.shortestAngle(n,t);return i<0&&(i=Math.PI*2+i),n+i},r.getBubble=function(n,t){return this.getDisplayObject("bubble",n,t)},r.getRing=function(n){return this.getDisplayObject("ring",n)},r.getDisplayObject=function(n,t,i){var u=this,f,r;for(f in u.displayObjects)if((r=u.displayObjects[f],r.className==n)&&r.node==t)return i||(r.hideFlag=!1),r;vis4.log(n+" not found for node",t)},r.freshUrl="",r.navigateTo=function(n){var i=this;i.changeView(n.urlToken),$(".label, .label2",i.$container).removeClass("current"),$(".label2."+n.id,i.$container).addClass("current"),$(".label."+n.id,i.$container).addClass("current")},r.getUrlForNode=function(n){var t=[];for(t.push(n.urlToken);n.parent;)t.push(n.parent.urlToken),n=n.parent;return t.reverse(),r.baseUrl+"/~/"+t.join("/")},r.onNodeClick=function(n){$.isFunction(r.config.nodeClickCallback)&&r.config.nodeClickCallback(n)},r.clean=function(){var n=this,t;$(".label").remove()},this.loop=function(){TWEEN.update()},!r.config.hasOwnProperty("data"))throw new Error("no data");new vis4.DelayedTask(200,r,r.setData,r.config.data)},BubbleTree.Styles={},BubbleTree.Layout=function(){var n=this;n.objects=[],n.props=[],n.toHide=[],n.toShow=[],n.$=function(n){var t=this,i,u,r;for(i in t.objects)if(u=t.objects[i],u==n)return t.props[i];return t.objects.push(n),r={},t.props.push(r),r},n.show=function(n){var t=this;t.toShow.push(n)},n.hide=function(n){var t=this;t.toHide.push(n)}},BubbleTree.Line=function(n,t,i,r,u,f){this.bc=n,this.o=i,this.angle=r,this.fromRad=u,this.attr=t,this.toRad=f,this.getXY=function(){this.x1=this.o.x+Math.cos(this.angle)*this.fromRad,this.y1=this.o.y-Math.sin(this.angle)*this.fromRad,this.x2=this.o.x+Math.cos(this.angle)*this.toRad,this.y2=this.o.y-Math.sin(this.angle)*this.toRad},this.init=function(){this.getXY(),this.path=this.bc.paper.path("M"+this.x1+" "+this.y1+"L"+this.x2+" "+this.y2).attr(this.attr)},this.draw=function(){this.getXY(),this.path.attr({path:"M"+this.x1+" "+this.y1+"L"+this.x2+" "+this.y2})},this.init()},BubbleTree.MouseEventGroup=function(n,t){var i=this;i.target=n,i.members=t,i.click=function(n){var t=this,i=t.members,r,u;t.clickCallback=n;for(r in i)u=i[r],$(u).click(t.handleClick.bind(t))},i.handleClick=function(n){var t=this;t.clickCallback({target:t.target,origEvent:n,mouseEventGroup:t})},i.hover=function(n){var t=this,i=t.members,r,u;t.hoverCallback=n;for(r in i)u=i[r],$(u).hover(t.handleMemberHover.bind(t),t.handleMemberUnHover.bind(t))},i.unhover=function(n){var t=this;t.unhoverCallback=n},i.wasHovering=!1,i.mouseIsOver=!1,i.handleMemberHover=function(n){var t=this;new vis4.DelayedTask(25,t,t.handleMemberHoverDelayed,n)},i.handleMemberHoverDelayed=function(n){var t=this;t.mouseIsOver=!0,t.wasHovering||(t.wasHovering=!0,$.isFunction(t.hoverCallback)&&t.hoverCallback({target:t.target,origEvent:n,mouseEventGroup:t}))},i.handleMemberUnHover=function(n){var t=this;t.mouseIsOver=!1,new vis4.DelayedTask(40,t,t.handleMemberUnHoverDelayed,n)},i.handleMemberUnHoverDelayed=function(n){var t=this;t.mouseIsOver||(t.wasHovering=!1,$.isFunction(t.unhoverCallback)&&t.unhoverCallback({target:t.target,origEvent:n,mouseEventGroup:t}))},i.addMember=function(n){var t=this;t.hoverCallback&&$(n).hover(t.handleMemberHover.bind(t),t.handleMemberUnHover.bind(t)),t.members.push(n)},i.removeMember=function(n){var t=this,i=t.members,r,u=[];t.clickCallback&&$(n).unbind("click"),t.hoverCallback&&$(n).unbind("mouseenter mouseleave");for(r in i)i[r]!=n&&u.push(i[r]);t.members=u}},BubbleTree.Ring=function(n,t,i,r,u){var f=this;f.className="ring",f.rad=r,f.bc=t,f.attr=u,f.origin=i,f.alpha=1,f.visible=!1,f.node=n,f.init=function(){},f.draw=function(){var n=this,t=n.origin;n.visible&&n.circle.attr({cx:t.x,cy:t.y,r:n.rad,"stroke-opacity":n.alpha})},f.hide=function(){var n=this;n.circle.remove(),n.visible=!1},f.show=function(){var n=this;n.circle=n.bc.paper.circle(i.x,i.y,n.rad).attr(n.attr),n.visible=!0,n.circle.toBack()},f.init()},BubbleTree.Transitioner=function(n){var t=this;t.duration=n,t.running=!1,t.completeCallbacks=[],t.changeLayout=function(n){var i,t,e,u,r=this,f,o;r.running=!0,r.layout=n;for(i in n.toShow)t=n.toShow[i],$.isFunction(t.show)&&t.show();for(i in n.objects)if(t=n.objects[i],t!==undefined&&t!==null)if(e=n.props[i],r.duration>0){f=new TWEEN.Tween(t),o={};for(u in e)o[u]=e[u];if(f.to(o,r.duration),f.easing(TWEEN.Easing.Exponential.Out),$.isFunction(t.draw))f.onUpdate(t.draw.bind(t));if(i==n.objects.length-1)f.onComplete(r._completed.bind(r));f.start()}else{for(u in e)t[u]=e[u];t&&$.isFunction(t.draw)&&t.draw()}if(r.duration===0){for(i in n.objects)t=n.objects[i],t&&$.isFunction(t.draw)&&t.draw();r._completed()}},t.onComplete=function(n){var t=this;try{$.isFunction(n)&&t.completeCallbacks.push(n)}catch(i){}},t._completed=function(){var t=this,r=t.completeCallbacks,i,n;t.running=!1;for(i in t.layout.objects)n=t.layout.objects[i],n&&$.isFunction(n.draw)&&n.draw();for(i in t.layout.toHide)n=t.layout.toHide[i],n&&$.isFunction(n.hide)&&n.hide();for(i in r)r[i]()}},BubbleTree.Utils={},BubbleTree.Utils.log=function(){try{window.hasOwnProperty("console")&&console.log.apply(this,arguments)}catch(n){}},BubbleTree.Utils.amount2rad=function(n){var t=Math.pow(Math.max(0,n)/BubbleTree.a2radBase,.6);return isNaN(t)&&(t=0),t},BubbleTree.Utils.formatNumber=function(n){var t="";return(n=n==null?0:parseFloat(n.toFixed(2)),n<0&&(n=n*-1,t="-"),n>=1e12)?t+Math.round(n/1e11)/10+"t":n>=1e9?t+Math.round(n/1e8)/10+"b":n>=1e6?t+Math.round(n/1e5)/10+"m":n>=1e3?t+Math.round(n/100)/10+"k":t+n},BubbleTree.Vector=function(n,t){var i=this;i.x=n,i.y=t,i.length=function(){var n=this;return Math.sqrt(n.x*n.x+n.y*n.y)},i.normalize=function(n){var t=this,i=t.length();n||(n=1),t.x*=n/i,t.y*=n/i},i.clone=function(){var n=this;return new BubbleTree.Vector(n.x,n.y)}},BubbleTree.Bubbles=BubbleTree.Bubbles||{},BubbleTree.Bubbles.Plain=function(n,t,i,r,u,f){var o=BubbleTree,s=o.Utils,e=this;e.className="bubble",e.node=n,e.paper=t.paper,e.origin=i,e.bc=t,e.rad=r,e.angle=u,e.color=f,e.alpha=1,e.visible=!1,e.ns=o,e.pos=o.Vector(0,0),e.bubbleRad=s.amount2rad(this.node.amount),e.container=e.bc.$container,e.childRotation=0,e.getXY=function(){var n=this,t=n.origin,i=n.angle,r=n.rad;n.pos===undefined&&(n.pos=new n.ns.Vector(0,0)),n.pos.x=t.x+Math.cos(i)*r,n.pos.y=t.y-Math.sin(i)*r},e.init=function(){var n=this,t;n.getXY(),t=!1,n.node.shortLabel||(n.node.shortLabel=n.node.label.length>n.bc.config.cutLabelsAt+3?n.node.label.substr(0,n.bc.config.cutLabelsAt)+"...":n.node.label),n.initialized=!0},e.onclick=function(){var t=this;if(t.node.amount==0)return!1;t.bc.onNodeClick(t.node);t.bc.navigateTo(t.node)},e.onhover=function(n){var t=this,i=t.bc.$container[0];n.node=t.node,n.target=t,n.bubblePos={x:t.pos.x,y:t.pos.y},n.type="SHOW",t.bc.tooltip(n)},e.onunhover=function(n){var t=this,i=t.bc.$container[0];n.node=t.node,n.type="HIDE",n.target=t,n.bubblePos={x:t.pos.x,y:t.pos.y},t.bc.tooltip(n)},e.draw=function(){var n=this,t=Math.max(5,n.bubbleRad*n.bc.bubbleScale),f=n.pos.x,e=n.pos.y,o=n.getXY(),r=n.pos.x,u=n.pos.y,i;n.visible&&(n.circle.attr({cx:n.pos.x,cy:n.pos.y,r:t,"fill-opacity":n.alpha}),n.node.children.length>0?n.dashedBorder.attr({cx:n.pos.x,cy:n.pos.y,r:t-4,"stroke-opacity":n.alpha*.9}):n.dashedBorder.attr({"stroke-opacity":0}),n.label.show(),n.label.find("*").show(),n.label2.show(),t>=n.bc.config.minRadiusLabels?n.label2.hide():t>=n.bc.config.minRadiusAmounts?n.label.find(".desc").hide():t>=n.bc.config.minRadiusHideLabels?n.label.hide():(n.label.hide(),n.label2.hide()),n.label.css({width:2*t+"px",opacity:n.alpha}),n.label.css({left:n.pos.x-t+"px",top:n.pos.y-n.label.height()*.5+"px"}),i=Math.max(70,3*t),n.label2.css({width:i+"px",opacity:n.alpha}),n.label2.css({left:r-i*.5+"px",top:u+t+"px"}))},e.hide=function(){var n=this,t;n.circle.remove(),n.dashedBorder.remove(),n.label.remove(),n.label2.remove(),n.visible=!1},e.show=function(){var n=this,h,u=n.pos.x,f=n.pos.y,e=Math.max(5,n.bubbleRad*n.bc.bubbleScale),t=n.node.originalAmount,r,o,i;(t||(t=n.node.amount),t||(t=n.node.value),t)&&(n.circle=n.paper.circle(u,f,e).attr({stroke:!1,fill:n.color}),n.dashedBorder=n.paper.circle(u,f,e-3).attr({stroke:"#ffffff","stroke-dasharray":"- "}),r=s.formatNumber(t),n.node.children&&n.node.children.length>0&&!n.node.originalAmount&&!n.bc.config.displaySum&&(r=""),n.label=$('
'+r+'<\/div>
'+n.node.shortLabel+"<\/div><\/div>"),n.container.append(n.label),n.node.children.length>0&&($(n.circle.node).css({cursor:"pointer"}),$(n.label).css({cursor:"pointer"})),n.label2=$('
'+n.node.shortLabel+"<\/span><\/div>"),n.container.append(n.label2),o=[n.circle.node,n.label,n.dashedBorder.node],i=new n.ns.MouseEventGroup(n,o),i.click(n.onclick.bind(n)),i.hover(n.onhover.bind(n)),i.unhover(n.onunhover.bind(n)),n.visible=!0)},e.addOverlay=function(){var n=this;n.overlay=n.paper.circle(n.circle.attrs.cx,n.circle.attrs.cy,n.circle.attrs.r).attr({stroke:!1,fill:"#fff",opacity:0}),Raphael.svg&&n.overlay.node.setAttribute("class",n.node.id),$(n.overlay.node).css({cursor:"pointer"}),$(n.overlay.node).click(n.onclick.bind(n)),$(n.label).click(n.onclick.bind(n))},e.init()},function(){function d(n,t,i){for(var r=(i||0)-1,u=n?n.length:0;++r-1?0:-1:n?0:-1)}function pi(n){var u=this.cache,t=typeof n,i,r;t=="boolean"||n==null?u[n]=!0:(t!="number"&&t!="string"&&(t="object"),i=t=="number"?n:ht+n,r=u[t]||(u[t]={}),t=="object"?(r[i]||(r[i]=[])).push(n):r[i]=!0)}function ni(n){return n.charCodeAt(0)}function wi(n,t){for(var f=n.criteria,e=t.criteria,u=-1,o=f.length,i,r;++ur||typeof i=="undefined")return 1;if(i=ct&&i===d,s=[],u,f;for(r&&(u=at(t),u?(i=ft,t=u):r=!1);++e-1});return s.pop(),w.pop(),vt&&(i(s),i(w)),b}function ue(n,t,i,r,u){(ot(t)?wr:er)(t,function(t,f){var c,l,o=t,e=n[f],s,h;if(t&&((l=ot(t))||du(t))){for(s=r.length;s--;)if(c=r[s]==t){e=u[s];break}c||(i&&(o=i(e,t),(h=typeof o!="undefined")&&(e=o)),h||(e=l?ot(e)?e:[]:du(e)?e:{}),r.push(t),u.push(e),h||ue(e,t,i,r,u))}else i&&(o=i(e,t),typeof o=="undefined"&&(o=t)),typeof o!="undefined"&&(e=o);n[f]=e})}function hf(n,t){return n+go(te()*(t-n+1))}function cf(n,t,r){var e=-1,c=yu(),a=n?n.length:0,l=[],o=!t&&a>=ct&&c===d,u=r||o?f():l,v,s,h;for(o&&(v=at(u),c=ft,u=v);++e3&&typeof u[r-2]=="function"?e=ur(u[--r-1],u[r--],2):r>2&&typeof u[r-1]=="function"&&(e=u[--r]);for(var c=n(arguments,1,r),o=-1,s=f(),h=f();++o-1:typeof f=="number"?r=(or(n)?n.indexOf(t,i):u(n,t,i))>-1:yi(n,function(n){if(++e>=i)return!(r=n===t)}),r}function ye(n,t,i){var u=!0,r,f;if(t=rt.createCallback(t,i,3),ot(n)){for(r=-1,f=n.length;++rr&&(r=e);else t=t==null&&or(n)?ni:rt.createCallback(t,i,3),yi(n,function(n,i,f){var e=t(n,i,f);e>u&&(u=e,r=n)});return r}function yh(n,t,i){var u=Infinity,r=u,f,o,e;if(typeof t!="function"&&i&&i[t]===n&&(t=null),t==null&&ot(n))for(f=-1,o=n.length;++f=ct&&at(r?e[r]:s)));var c=e[0],l=-1,y=c?c.length:0,a=[];n:while(++l>>1,i(n[f])1?arguments:arguments[0],t=-1,i=n?be(rf(n,"length")):0,r=di(i<0?0:i);++t2?fr(t,17,n(arguments,2),null,i):fr(t,1,null,null,i)}function pc(n){for(var i=arguments.length>1?vr(arguments,!0,!1,1):ou(n),r=-1,u=i.length,t;++r2?fr(i,19,n(arguments,2),null,t):fr(i,3,null,null,t)}function bc(){for(var n=arguments,t=n.length;t--;)if(!st(n[t]))throw new hr;return function(){for(var t=arguments,i=n.length;i--;)t=[n[i].apply(this,t)];return t[0]}}function kc(n,t){return t=typeof t=="number"?t:+t||n.length,fr(n,4,null,null,null,t)}function oo(n,t,i){var f,u,o,h,e,r,y,c=0,l=!1,a=!0,v,p,w;if(!st(n))throw new hr;return t=tr(0,t)||0,i===!0?(v=!0,a=!1):ki(i)&&(v=i.leading,l="maxWait"in i&&(tr(t,i.maxWait)||0),a="trailing"in i?i.trailing:a),p=function(){var i=t-(pr()-h),l;i<=0?(u&&cu(u),l=y,u=r=y=s,l&&(c=pr(),o=n.apply(e,f),r||u||(f=e=null))):r=ru(p,i)},w=function(){r&&cu(r),u=r=y=s,(a||l!==t)&&(c=pr(),o=n.apply(e,f),r||u||(f=e=null))},function(){var b,s,i;return f=arguments,h=pr(),e=this,y=a&&(r||!v),l===!1?b=v&&!r:(u||v||(c=h),s=l-(h-c),i=s<=0,i?(u&&(u=cu(u)),c=h,o=n.apply(e,f)):u||(u=ru(w,s))),i&&r?r=cu(r):r||t===l||(r=ru(p,t)),b&&(i=!0,o=n.apply(e,f)),!i||r||u||(f=e=null),o}}function dc(t){if(!st(t))throw new hr;var i=n(arguments,1);return ru(function(){t.apply(s,i)},1)}function gc(t,i){if(!st(t))throw new hr;var r=n(arguments,2);return ru(function(){t.apply(s,r)},i)}function nl(n,t){if(!st(n))throw new hr;var i=function(){var r=i.cache,u=t?t.apply(this,arguments):ht+arguments[0];return vi.call(r,u)?r[u]:r[u]=n.apply(this,arguments)};return i.cache={},i}function tl(n){var i,t;if(!st(n))throw new hr;return function(){return i?t:(i=!0,t=n.apply(this,arguments),n=null,t)}}function il(t){return fr(t,16,n(arguments,1))}function rl(t){return fr(t,32,null,n(arguments,1))}function ul(n,t,i){var r=!0,u=!0;if(!st(n))throw new hr;return i===!1?r=!1:ki(i)&&(r="leading"in i?i.leading:r,u="trailing"in i?i.trailing:u),it.leading=r,it.maxWait=t,it.trailing=u,oo(n,t,it)}function fl(n,t){return fr(t,16,[n])}function el(n){return function(){return n}}function ol(n,t,i){var f=typeof n;if(n==null||f=="function")return ur(n,t,i);if(f!="object")return co(n);var u=gi(n),e=u[0],r=n[e];return u.length==1&&r===r&&!ki(r)?function(n){var t=n[e];return r===t&&(r!==0||1/r==1/t)}:function(t){for(var i=u.length,r=!1;i--;)if(!(r=kr(t[u[i]],n[u[i]],null,!0)))break;return r}}function sl(n){return n==null?"":sr(n).replace(ss,fs)}function kf(n){return n}function df(n,t,i){var u=!0,f=t&&ou(t),r,e;t&&(i||f.length)||(i==null&&(i=t),r=ar,t=n,n=rt,f=ou(t)),i===!1?u=!1:ki(i)&&"chain"in i&&(u=i.chain),r=n,e=st(r),wr(f,function(i){var f=n[i]=t[i];e&&(r.prototype[i]=function(){var i=this.__chain__,e=this.__wrapped__,o=[e],t;if(iu.apply(o,arguments),t=f.apply(n,o),u||i){if(e===t&&ki(t))return this;t=new r(t),t.__chain__=i}return t})})}function hl(){return b._=wo,this}function so(){}function co(n){return function(t){return t[n]}}function cl(n,t,i){var f=n==null,r=t==null,u;return(i==null&&(typeof n=="boolean"&&r?(i=n,n=1):r||typeof t!="boolean"||(i=t,r=!0)),f&&r&&(t=1),n=+n||0,r?(t=n,n=0):t=+t||0,i||n%1||t%1)?(u=te(),uu(n+u*(t-n+parseFloat("1e-"+((u+"").length-1))),t)):hf(n,t)}function ll(n,t){if(n){var i=n[t];return st(i)?n[t]():i}}function al(n,t,i){var h=rt.templateSettings,u,o,v,f;n=sr(n||""),i=ku({},i,h);var c=ku({},i.imports,h.imports),y=gi(c),p=gu(c),e,l=0,a=i.interpolate||nt,r="__p += '",w=tu((i.escape||nt).source+"|"+a.source+"|"+(a===bt?ei:nt).source+"|"+(i.evaluate||nt).source+"|$","g");n.replace(w,function(t,i,u,f,o,s){return u||(u=f),r+=n.slice(l,s).replace(ci,bi),i&&(r+="' +\n__e("+i+") +\n'"),o&&(e=!0,r+="';\n"+o+";\n__p += '"),u&&(r+="' +\n((__t = ("+u+")) == null ? '' : __t) +\n'"),l=s+t.length,t}),r+="';\n",u=i.variable,o=u,o||(u="obj",r="with ("+u+") {\n"+r+"\n}\n"),r=(e?r.replace(ri,""):r).replace(ui,"$1").replace(fi,"$1;"),r="function("+u+") {\n"+(o?"":u+" || ("+u+" = {});\n")+"var __t, __p = '', __e = _.escape"+(e?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+r+"return __p\n}",v="\n/*\n//# sourceURL="+(i.sourceURL||"/lodash/template/source["+ai+++"]")+"\n*/";try{f=gr(y,"return "+r+v).apply(s,p)}catch(b){b.source=r;throw b;}return t?f(t):(f.source=r,f)}function vl(n,t,i){n=(n=+n)>-1?n:0;var r=-1,u=di(n);for(t=ur(t,i,1);++r/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:bt,variable:"",imports:{_:rt}},ie=function(n){var t="var index, iterable = "+n.firstArg+", result = "+n.init+";\nif (!iterable) return result;\n"+n.top+";",i;if(n.array?(t+="\nvar length = iterable.length; index = -1;\nif ("+n.array+") { ",ut.unindexedChars&&(t+="\n if (isString(iterable)) {\n iterable = iterable.split('')\n } "),t+="\n while (++index < length) {\n "+n.loop+";\n }\n}\nelse { "):ut.nonEnumArgs&&(t+="\n var length = iterable.length; index = -1;\n if (length && isArguments(iterable)) {\n while (++index < length) {\n index += '';\n "+n.loop+";\n }\n } else { "),ut.enumPrototypes&&(t+="\n var skipProto = typeof iterable == 'function';\n "),ut.enumErrorProps&&(t+="\n var skipErrorProps = iterable === errorProto || iterable instanceof Error;\n "),i=[],ut.enumPrototypes&&i.push('!(skipProto && index == "prototype")'),ut.enumErrorProps&&i.push('!(skipErrorProps && (index == "message" || index == "name"))'),n.useHas&&n.keys)t+="\n var ownIndex = -1,\n ownProps = objectTypes[typeof iterable] && keys(iterable),\n length = ownProps ? ownProps.length : 0;\n\n while (++ownIndex < length) {\n index = ownProps[ownIndex];\n",i.length&&(t+=" if ("+i.join(" && ")+") {\n "),t+=n.loop+"; ",i.length&&(t+="\n }"),t+="\n } ";else if(t+="\n for (index in iterable) {\n",n.useHas&&i.push("hasOwnProperty.call(iterable, index)"),i.length&&(t+=" if ("+i.join(" && ")+") {\n "),t+=n.loop+"; ",i.length&&(t+="\n }"),t+="\n } ",ut.nonEnumShadows){for(t+="\n\n if (iterable !== objectProto) {\n var ctor = iterable.constructor,\n isProto = iterable === (ctor && ctor.prototype),\n className = iterable === stringProto ? stringClass : iterable === errorProto ? errorClass : toString.call(iterable),\n nonEnum = nonEnumProps[className];\n ",k=0;k<7;k++)t+="\n index = '"+n.shadowedProps[k]+"';\n if ((!(isProto && nonEnum[index]) && hasOwnProperty.call(iterable, index))",n.useHas||(t+=" || (!nonEnum[index] && iterable[index] !== objectProto[index])"),t+=") {\n "+n.loop+";\n } ";t+="\n } "}return(n.array||ut.nonEnumArgs)&&(t+="\n}"),t+=n.bottom+";\nreturn result"},au||(fu=function(){function n(){}return function(t){if(ki(t)){n.prototype=t;var i={};n.prototype=null}return i||b.Object()}}()),pu=ne?function(n,t){gt.value=t,ne(n,"__bindData__",gt)}:so,ut.argsClass||(nr=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&vi.call(n,"callee")&&!lu.call(n,"callee")||!1});var ot=ef||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&pt.call(n)==l||!1},ee=dr({args:"object",init:"[]",top:"if (!(objectTypes[typeof object])) return result",loop:"result.push(index)"}),gi=vu?function(n){return ki(n)?ut.enumPrototypes&&typeof n=="function"||ut.nonEnumArgs&&n.length&&nr(n)?ee(n):vu(n):[]}:ee,wu={args:"collection, callback, thisArg",top:"callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3)",array:"typeof length == 'number'",keys:gi,loop:"if (callback(iterable[index], index, collection) === false) return result"},af={args:"object, source, guard",top:"var args = arguments,\n argsIndex = 0,\n argsLength = typeof guard == 'number' ? 2 : args.length;\nwhile (++argsIndex < argsLength) {\n iterable = args[argsIndex];\n if (iterable && objectTypes[typeof iterable]) {",keys:gi,loop:"if (typeof result[index] == 'undefined') result[index] = iterable[index]",bottom:" }\n}"},oe={top:"if (!objectTypes[typeof iterable]) return result;\n"+wu.top,array:!1},vf={"&":"&","<":"<",">":">",'"':""","'":"'"},se=ce(vf),os=tu("("+gi(se).join("|")+")","g"),ss=tu("["+gi(vf).join("")+"]","g"),yi=dr(wu),bu=dr(af,{top:af.top.replace(";",";\nif (argsLength > 3 && typeof args[argsLength - 2] == 'function') {\n var callback = baseCreateCallback(args[--argsLength - 1], args[argsLength--], 2);\n} else if (argsLength > 2 && typeof args[argsLength - 1] == 'function') {\n callback = args[--argsLength];\n}"),loop:"result[index] = callback ? callback(result[index], iterable[index]) : iterable[index]"});return ku=dr(af),ir=dr(wu,oe,{useHas:!1}),er=dr(wu,oe),st(/x/)&&(st=function(n){return typeof n=="function"&&pt.call(n)==tt}),du=br?function(n){if(!(n&&pt.call(n)==r)||!ut.argsClass&&nr(n))return!1;var i=n.valueOf,t=yr(i)&&(t=br(i))&&br(t);return t?n==t||br(n)==t:fe(n)}:fe,ve=lf(function(n,t,i){vi.call(n,i)?n[i]++:n[i]=1}),pe=lf(function(n,t,i){(vi.call(n,i)?n[i]:n[i]=[]).push(t)}),we=lf(function(n,t,i){n[i]=t}),rf=su,no=nf,pr=yr(pr=uf.now)&&pr||function(){return(new uf).getTime()},ho=of(wt+"08")==8?of:function(n,t){return of(or(n)?n.replace(hi,""):n,t||0)},rt.after=yc,rt.assign=bu,rt.at=lh,rt.bind=eo,rt.bindAll=pc,rt.bindKey=wc,rt.chain=wl,rt.compact=gh,rt.compose=bc,rt.constant=el,rt.countBy=ve,rt.create=ls,rt.createCallback=ol,rt.curry=kc,rt.debounce=oo,rt.defaults=ku,rt.defer=dc,rt.delay=gc,rt.difference=nc,rt.filter=nf,rt.flatten=rc,rt.forEach=wr,rt.forEachRight=tf,rt.forIn=ir,rt.forInRight=ys,rt.forOwn=er,rt.forOwnRight=he,rt.functions=ou,rt.groupBy=pe,rt.indexBy=we,rt.initial=uc,rt.intersection=fc,rt.invert=ce,rt.invoke=vh,rt.keys=gi,rt.map=su,rt.mapValues=fh,rt.max=be,rt.memoize=nl,rt.merge=eh,rt.min=yh,rt.omit=oh,rt.once=tl,rt.pairs=sh,rt.partial=il,rt.partialRight=rl,rt.pick=hh,rt.pluck=rf,rt.property=co,rt.pull=sc,rt.range=hc,rt.reject=ph,rt.remove=cc,rt.rest=bf,rt.shuffle=de,rt.sortBy=kh,rt.tap=bl,rt.throttle=ul,rt.times=vl,rt.toArray=dh,rt.transform=ch,rt.union=lc,rt.uniq=ro,rt.values=gu,rt.where=no,rt.without=ac,rt.wrap=fl,rt.xor=vc,rt.zip=uo,rt.zipObject=fo,rt.collect=su,rt.drop=bf,rt.each=wr,rt.eachRight=tf,rt.extend=bu,rt.methods=ou,rt.object=fo,rt.select=nf,rt.tail=bf,rt.unique=ro,rt.unzip=uo,df(rt),rt.clone=hs,rt.cloneDeep=cs,rt.contains=ae,rt.escape=sl,rt.every=ye,rt.find=yf,rt.findIndex=tc,rt.findKey=as,rt.findLast=ah,rt.findLastIndex=ic,rt.findLastKey=vs,rt.has=ps,rt.identity=kf,rt.indexOf=to,rt.isArguments=nr,rt.isArray=ot,rt.isBoolean=ws,rt.isDate=bs,rt.isElement=ks,rt.isEmpty=ds,rt.isEqual=gs,rt.isFinite=nh,rt.isFunction=st,rt.isNaN=th,rt.isNull=ih,rt.isNumber=le,rt.isObject=ki,rt.isPlainObject=du,rt.isRegExp=rh,rt.isString=or,rt.isUndefined=uh,rt.lastIndexOf=oc,rt.mixin=df,rt.noConflict=hl,rt.noop=so,rt.now=pr,rt.parseInt=ho,rt.random=cl,rt.reduce=pf,rt.reduceRight=ke,rt.result=ll,rt.runInContext=yt,rt.size=bh,rt.some=ge,rt.sortedIndex=io,rt.template=al,rt.unescape=yl,rt.uniqueId=pl,rt.all=ye,rt.any=ge,rt.detect=yf,rt.findWhere=yf,rt.foldl=pf,rt.foldr=ke,rt.include=ae,rt.inject=pf,df(function(){var n={};return er(rt,function(t,i){rt.prototype[i]||(n[i]=t)}),n}(),!1),rt.first=wf,rt.last=ec,rt.sample=wh,rt.take=wf,rt.head=wf,er(rt,function(n,t){var i=t!=="sample";rt.prototype[t]||(rt.prototype[t]=function(t,r){var u=this.__chain__,f=n(this.__wrapped__,t,r);return!u&&(t==null||r&&!(i&&typeof t=="function"))?f:new ar(f,u)})}),rt.VERSION="2.4.1",rt.prototype.chain=kl,rt.prototype.toString=dl,rt.prototype.value=lo,rt.prototype.valueOf=lo,yi(["join","pop","shift"],function(n){var t=lr[n];rt.prototype[n]=function(){var n=this.__chain__,i=t.apply(this.__wrapped__,arguments);return n?new ar(i,n):i}}),yi(["push","reverse","sort","unshift"],function(n){var t=lr[n];rt.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),yi(["concat","slice","splice"],function(n){var t=lr[n];rt.prototype[n]=function(){return new ar(t.apply(this.__wrapped__,arguments),this.__chain__)}}),ut.spliceObjects||yi(["pop","shift","splice"],function(n){var t=lr[n],i=n=="splice";rt.prototype[n]=function(){var r=this.__chain__,n=this.__wrapped__,u=t.apply(n,arguments);return n.length===0&&delete n[0],r||i?new ar(u,r):u}}),rt}var s,ot=[],st=[],ti=0,ii={},ht=+new Date+"",ct=75,pt=40,wt=" \t\x0b\f \n\r\u2028\u2029 ᠎              ",ri=/\b__p \+= '';/g,ui=/\b(__p \+=) '' \+/g,fi=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ei=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,oi=/\w*$/,si=/^\s*function[ \n\r\t]+\w/,bt=/<%=([\s\S]+?)%>/g,hi=RegExp("^["+wt+"]*0+(?=.$)"),nt=/($^)/,kt=/\bthis\b/,ci=/['\n\r\t\u2028\u2029\\]/g,li=["Array","Boolean","Date","Error","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],lt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ai=0,c="[object Arguments]",l="[object Array]",a="[object Boolean]",v="[object Date]",dt="[object Error]",tt="[object Function]",y="[object Number]",r="[object Object]",p="[object RegExp]",h="[object String]",u={},o;u[tt]=!1,u[c]=u[l]=u[a]=u[v]=u[y]=u[r]=u[p]=u[h]=!0;var it={leading:!1,maxWait:0,trailing:!1},gt={configurable:!1,enumerable:!1,value:null,writable:!1},t={args:"",array:null,bottom:"",firstArg:"",init:"",keys:null,loop:"",shadowedProps:null,support:null,top:"",useHas:!1},e={boolean:!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},vi={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},w=e[typeof window]&&window||this,rt=e[typeof exports]&&exports&&!exports.nodeType&&exports,ut=e[typeof module]&&module&&!module.nodeType&&module,yi=ut&&ut.exports===rt&&rt,b=e[typeof global]&&global;b&&(b.global===b||b.window===b)&&(w=b),o=yt(),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(w._=o,define(function(){return o})):rt&&ut?yi?(ut.exports=o)._=o:rt._=o:w._=o}.call(this)