diff --git a/xtk_edge.js b/xtk_edge.js index 6f740db..493ccdf 100644 --- a/xtk_edge.js +++ b/xtk_edge.js @@ -42,107 +42,107 @@ function ha(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return" else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ia(a){return a!==p}function ka(a){return"array"==ha(a)}function la(a){var b=ha(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ma(a){return"string"==typeof a}function x(a){return"number"==typeof a}function na(a){return"function"==ha(a)}function oa(a){var b=typeof a;return"object"==b&&a!=t||"function"==b}function pa(a){return a[qa]||(a[qa]=++ra)}var qa="closure_uid_"+(1E9*Math.random()>>>0),ra=0; function sa(a,b,c){return a.call.apply(a.bind,arguments)}function ta(a,b,c){a||n(Error());if(2a&&(a=this.byteLength+a);0>c&&(c=this.byteLength+c);ca&&(a=0);0>c&&(c=0);a>this.byteLength&&(a=this.byteLength);c>this.byteLength&&(c=this.byteLength);for(var e=new ArrayBuffer(c-a),d=new Uint8Array(this),f=new Uint8Array(e),g=a,h=0;g")&&(a=a.replace(Ua,">"));-1!=a.indexOf('"')&&(a=a.replace(Va,"""));return a}var Sa=/&/g,Ta=//g,Va=/\"/g,Ra=/[&<>\"]/;var Wa,Xa,Ya,Za,$a,ab,cb;function db(){return fa.navigator?fa.navigator.userAgent:t}function eb(){return fa.navigator}Za=Ya=Xa=Wa=u;var fb;if(fb=db()){var gb=eb();Wa=0==fb.indexOf("Opera");Xa=!Wa&&-1!=fb.indexOf("MSIE");Ya=!Wa&&-1!=fb.indexOf("WebKit");Za=!Wa&&!Ya&&"Gecko"==gb.product}var ib=Wa,I=Xa,jb=Za,kb=Ya,mb,nb=eb();mb=nb&&nb.platform||"";$a=-1!=mb.indexOf("Mac");ab=-1!=mb.indexOf("Win");cb=-1!=mb.indexOf("Linux");var ob=!!eb()&&-1!=(eb().appVersion||"").indexOf("X11"); +B("window.requestAnimationFrame",window.requestAnimationFrame);B("window.cancelAnimationFrame",window.cancelAnimationFrame);var Ja=0;function Ka(){}w=Ka.prototype;w.key=0;w.lc=u;w.Vd=u;w.sa=function(a,b,c,e,d,f){na(a)?this.Jg=q:a&&a.handleEvent&&na(a.handleEvent)?this.Jg=u:n(Error("Invalid listener argument"));this.Yb=a;this.ah=b;this.src=c;this.type=e;this.capture=!!d;this.ff=f;this.Vd=u;this.key=++Ja;this.lc=u};w.handleEvent=function(a){return this.Jg?this.Yb.call(this.ff||this.src,a):this.Yb.handleEvent.call(this.Yb,a)};function La(a,b){for(var c in a)b.call(p,a[c],c,a)}function Ma(a){var b=[],c=0,e;for(e in a)b[c++]=a[e];return b}var Oa="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Pa(a,b){for(var c,e,d=1;d")&&(a=a.replace(Ua,">"));-1!=a.indexOf('"')&&(a=a.replace(Va,"""));return a}var Sa=/&/g,Ta=//g,Va=/\"/g,Ra=/[&<>\"]/;var Wa,Xa,Ya,Za,$a,ab,cb;function db(){return fa.navigator?fa.navigator.userAgent:t}function eb(){return fa.navigator}Za=Ya=Xa=Wa=u;var fb;if(fb=db()){var gb=eb();Wa=0==fb.indexOf("Opera");Xa=!Wa&&-1!=fb.indexOf("MSIE");Ya=!Wa&&-1!=fb.indexOf("WebKit");Za=!Wa&&!Ya&&"Gecko"==gb.product}var ib=Wa,I=Xa,jb=Za,kb=Ya,mb,nb=eb();mb=nb&&nb.platform||"";$a=-1!=mb.indexOf("Mac");ab=-1!=mb.indexOf("Win");cb=-1!=mb.indexOf("Linux");var ob=!!eb()&&-1!=(eb().appVersion||"").indexOf("X11"); function pb(){var a=fa.document;return a?a.documentMode:p}var qb;a:{var rb="",sb;if(ib&&fa.opera)var tb=fa.opera.version,rb="function"==typeof tb?tb():tb;else if(jb?sb=/rv\:([^\);]+)(\)|;)/:I?sb=/MSIE\s+([^\);]+)(\)|;)/:kb&&(sb=/WebKit\/(\S+)/),sb)var ub=sb.exec(db()),rb=ub?ub[1]:"";if(I){var vb=pb();if(vb>parseFloat(rb)){qb=String(vb);break a}}qb=rb}var wb={}; function xb(a){var b;if(!(b=wb[a])){b=0;for(var c=String(qb).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),d=Math.max(c.length,e.length),f=0;0==b&&f(0==m[1].length?0:parseInt(m[1],10))?1:0)||((0==j[2].length)<(0==m[2].length)?-1:(0==j[2].length)>(0==m[2].length)?1:0)||(j[2]m[2]?1:0)}while(0==b)}b=wb[a]=0<=b}return b}var yb=fa.document,zb=!yb||!I?p:pb()||("CSS1Compat"==yb.compatMode?parseInt(qb,10):5);var Ab=!I||I&&9<=zb,Bb=I&&!xb("9");!kb||xb("528");jb&&xb("1.9b")||I&&xb("8")||ib&&xb("9.5")||kb&&xb("528");jb&&!xb("8")||I&&xb("9");var Cb=Array.prototype,Db=Cb.indexOf?function(a,b,c){return Cb.indexOf.call(a,b,c)}:function(a,b,c){c=c==t?0:0>c?Math.max(0,a.length+c):c;if(ma(a))return!ma(b)||1!=b.length?-1:a.indexOf(b,c);for(;c=arguments.length?Cb.slice.call(a,b):Cb.slice.call(a,b,c)};function Kb(){0!=Lb&&(this.Sk=Error().stack,pa(this))}var Lb=0;function Mb(a,b){this.type=a;this.currentTarget=this.target=b}w=Mb.prototype;w.kc=u;w.defaultPrevented=u;w.le=q;w.stopPropagation=function(){this.kc=q};w.preventDefault=function(){this.defaultPrevented=q;this.le=u};function Nb(a){Nb[" "](a);return a}Nb[" "]=ga;function Ob(a,b){a&&this.sa(a,b)}C(Ob,Mb);w=Ob.prototype;w.target=t;w.relatedTarget=t;w.offsetX=0;w.offsetY=0;w.clientX=0;w.clientY=0;w.screenX=0;w.screenY=0;w.button=0;w.keyCode=0;w.charCode=0;w.ctrlKey=u;w.altKey=u;w.shiftKey=u;w.metaKey=u;w.uj=u;w.jb=t; +ma(a)?a.split(""):a,g=0;g=arguments.length?Cb.slice.call(a,b):Cb.slice.call(a,b,c)};function Kb(){0!=Lb&&(this.Sk=Error().stack,pa(this))}var Lb=0;function Mb(a,b){this.type=a;this.currentTarget=this.target=b}w=Mb.prototype;w.kc=u;w.defaultPrevented=u;w.me=q;w.stopPropagation=function(){this.kc=q};w.preventDefault=function(){this.defaultPrevented=q;this.me=u};function Nb(a){Nb[" "](a);return a}Nb[" "]=ga;function Ob(a,b){a&&this.sa(a,b)}C(Ob,Mb);w=Ob.prototype;w.target=t;w.relatedTarget=t;w.offsetX=0;w.offsetY=0;w.clientX=0;w.clientY=0;w.screenX=0;w.screenY=0;w.button=0;w.keyCode=0;w.charCode=0;w.ctrlKey=u;w.altKey=u;w.shiftKey=u;w.metaKey=u;w.vj=u;w.kb=t; w.sa=function(a,b){var c=this.type=a.type;Mb.call(this,c);this.target=a.target||a.srcElement;this.currentTarget=b;var e=a.relatedTarget;if(e){if(jb){var d;a:{try{Nb(e.nodeName);d=q;break a}catch(f){}d=u}d||(e=t)}}else"mouseover"==c?e=a.fromElement:"mouseout"==c&&(e=a.toElement);this.relatedTarget=e;this.offsetX=kb||a.offsetX!==p?a.offsetX:a.layerX;this.offsetY=kb||a.offsetY!==p?a.offsetY:a.layerY;this.clientX=a.clientX!==p?a.clientX:a.pageX;this.clientY=a.clientY!==p?a.clientY:a.pageY;this.screenX= -a.screenX||0;this.screenY=a.screenY||0;this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.uj=$a?a.metaKey:a.ctrlKey;this.state=a.state;this.jb=a;a.defaultPrevented&&this.preventDefault();delete this.kc};w.stopPropagation=function(){Ob.u.stopPropagation.call(this);this.jb.stopPropagation?this.jb.stopPropagation():this.jb.cancelBubble=q}; -w.preventDefault=function(){Ob.u.preventDefault.call(this);var a=this.jb;if(a.preventDefault)a.preventDefault();else if(a.returnValue=u,Bb)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};w.pi=v("jb");var Pb={},Qb={},Rb={},Sb={};function M(a,b,c,e,d){if(ka(b)){for(var f=0;fd.keyCode||d.returnValue!=p)return q;a:{var l=u;if(0==d.keyCode)try{d.keyCode=-1;break a}catch(k){l=q}if(l||d.returnValue==p)d.returnValue=q}}l=new Ob;l.sa(d,this);d=q;try{if(g){for(var j=[],m=l.currentTarget;m;m=m.parentNode)j.push(m);f=e[q];f.Fa=f.fa;for(var r=j.length- -1;!l.kc&&0<=r&&f.Fa;r--)l.currentTarget=j[r],d&=$b(f,j[r],c,q,l);if(h){f=e[u];f.Fa=f.fa;for(r=0;!l.kc&&rk?2:1E-52*this.fa&&uc(this),q):u};function uc(a){if(a.fa!=a.J.length){for(var b=0,c=0;b=a.keyCode)a.keyCode=-1}catch(b){}};w.qi=v("kb");var Pb={},Qb={},Rb={},Sb={};function M(a,b,c,e,d){if(ka(b)){for(var f=0;fd.keyCode||d.returnValue!=p)return q;a:{var l=u;if(0==d.keyCode)try{d.keyCode=-1;break a}catch(k){l=q}if(l||d.returnValue==p)d.returnValue=q}}l=new Ob;l.sa(d,this);d=q;try{if(g){for(var j=[],m=l.currentTarget;m;m=m.parentNode)j.push(m);f=e[q];f.Ga=f.fa;for(var s=j.length- +1;!l.kc&&0<=s&&f.Ga;s--)l.currentTarget=j[s],d&=$b(f,j[s],c,q,l);if(h){f=e[u];f.Ga=f.fa;for(s=0;!l.kc&&sk?2:1E-52*this.fa&&uc(this),q):u};function uc(a){if(a.fa!=a.J.length){for(var b=0,c=0;ba||360a||360a||360a||360a||360a||360a)&&n(Error("Invalid opacity."));for(var b=this.c,c=b.length,e=0,e=0;ea)&&n(Error("Invalid opacity."));for(var b=this.c,c=b.length,e=0,e=0;eb.na?-1:1}B("X.object",V);B("X.object.prototype.modified",V.prototype.p);B("X.object.prototype.remove",V.prototype.remove);function jd(){}function kd(a){for(var b=a.g.count,c=[],e=0,e=0;e +function Y(a,b,c){c!=t||(c=1);var e=1,d=Uint8Array;switch(b){case "schar":d=Int8Array;break;case "ushort":d=Uint16Array;e=2;break;case "sshort":d=Int16Array;e=2;break;case "uint":d=Uint32Array;e=4;break;case "sint":d=Int32Array;e=4;break;case "float":d=Float32Array;e=4;break;case "complex":d=Float64Array;e=8;break;case "double":d=Float64Array,e=8}b=new d(a.I.slice(a.K,a.K+=c*e));if(a.Mh!=a.Kd){a=b;b=new Uint8Array(a.buffer,a.byteOffset,a.byteLength);for(d=0;d g;f--,g++){var h=b[g];b[g]=b[f];b[f]=h}b=a}return 1==c?b[0]:b} function Kd(a,b){var c=[Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE],e=Mc(0,0,0,1),d=Lc();Yc(a,e,d);c[0]=d[0]c[1]?d[0]:c[1];c[2]=d[1]c[3]?d[1]:c[3];c[4]=d[2]c[5]?d[2]:c[5];e=Mc(0,0,b[3],1);Yc(a,e,d);c[0]=d[0]c[1]?d[0]:c[1];c[2]=d[1]c[3]?d[1]:c[3];c[4]=d[2]c[5]?d[2]:c[5];e=Mc(0,b[2],0, 1);Yc(a,e,d);c[0]=d[0]c[1]?d[0]:c[1];c[2]=d[1]c[3]?d[1]:c[3];c[4]=d[2]c[5]?d[2]:c[5];e=Mc(b[1],0,0,1);Yc(a,e,d);c[0]=d[0]c[1]?d[0]:c[1];c[2]=d[1]c[3]?d[1]:c[3];c[4]=d[2]c[5]?d[2]:c[5];e=Mc(b[1],b[2],0,1);Yc(a,e,d);c[0]=d[0]c[1]?d[0]:c[1];c[2]=d[1]c[3]?d[1]:c[3];c[4]=d[2] c[5]?d[2]:c[5];e=Mc(b[1],0,b[3],1);Yc(a,e,d);c[0]=d[0]c[1]?d[0]:c[1];c[2]=d[1]c[3]?d[1]:c[3];c[4]=d[2]c[5]?d[2]:c[5];e=Mc(0,b[2],b[3],1);Yc(a,e,d);c[0]=d[0]c[1]?d[0]:c[1];c[2]=d[1]c[3]?d[1]:c[3];c[4]=d[2]c[5]?d[2]:c[5];e=Mc(b[1],b[2],b[3],1);Yc(a,e,d);c[0]=d[0]c[1]?d[0]:c[1];c[2]=d[1]c[3]?d[1]: c[3];c[4]=d[2]c[5]?d[2]:c[5];return c} function Ld(a,b){var c=Oc();if(!(a.length==b.length&&a[0]==b[0]&&a[1]==b[1]&&a[2]==b[2])){var e=Math.acos(a[2]),d=new Float32Array(3),f=a[0],g=a[1],h=a[2],l=b[0],k=b[1],j=b[2];d[0]=g*j-h*k;d[1]=h*l-f*j;d[2]=f*k-g*l;Kc(d,d);f=Math.cos(e/2);g=Math.sin(e/2)*d[0];h=Math.sin(e/2)*d[1];e=Math.sin(e/2)*d[2];Sc(c,0,f*f+g*g-h*h-e*e,2*(g*h-f*e),2*(g*e+f*h),0);Sc(c,1,2*(g*h+f*e),f*f+h*h-g*g-e*e,2*(h*e-f*g),0);Sc(c,2,2*(g*e-f*h),2*(h*e+f*g),f*f+e*e-h*h-g*g,0)}e=Nc();Wc(c,e);return[c,e]} -function Md(a,b,c,e,d,f,g,h){var l=new Nd;Kc(b,b);for(var k=[],j=[],m=0;6>m;m++)for(var r=Math.floor(m/2),s=(r+1)%3,z=(r+2)%3,y=(4+2*r)%6,D=0;2>D;D++){var F=(2+D+2*r)%6,H=-(b[r]*(e[m]-a[r])+b[s]*(e[F]-a[s]))/b[z]+a[z];if(H>=e[y]&&H<=e[y+1]||H<=e[y]&&H>=e[y+1]){var A=[];A[r]=e[m];A[s]=e[F];A[z]=H;k.push(A)}else A=[],A[r]=e[m],A[s]=e[F],A[z]=H,j.push(A)}a=Jc(0,0,1);a=Ld(b,a);e=a[0];a=a[1];r=[];for(j=0;jm[1]&&(m[1]=r[j][0]),r[j][1]m[3]&&(m[3]=r[j][1]),r[j][2]m[5]&&(m[5]=r[j][2]);j=Mc(m[0]+(m[1]-m[0])/2,m[2]+(m[3]-m[2])/2,m[4]+(m[5]-m[4])/2,0);r=Lc();Vc(a,j,r);var s=Math.floor(m[0]),z=Math.ceil(m[1]), -y=z-s,D=Math.floor(m[2]),F=Math.ceil(m[3]),H=F-D,j=Math.ceil(y/1),G=Math.ceil(H/1),A=new Uint8Array(4*j*G),J=new bd;J.Le=j;J.Ke=G;var G=Lc(),K=Mc(0,0,m[4],1),R=Nc();Vc(f.zh,a,R);for(var N=F-1E-7,W=z-1E-7,aa=0,Z=0,ba=0,L=D,L=D;L<=N;L+=1){ba++;Z=0;K[1]=L;for(j=s;j<=W;j+=1){Z++;K[0]=j;Yc(R,K,G);var O=4*aa;if(0<=G[0]&&G[0]h;h++){var l=Math.floor(h/2),k=(l+1)%3,j=(l+2)%3,m=(2+2*l)%6,r=(4+2*l)%6,s=(d[h]-b[l])*(1/c[l]);if(Infinity!=s&&-Infinity!=s){var z=b[k]+c[k]*s,s=b[j]+c[j]*s;z>=d[m]&&z<=d[m+1]&&s>=d[r]&&s<=d[r+1]?(m=[],m[l]=d[h],m[k]=z,m[j]=s,f.push(m)):(m=[],m[l]=d[h],m[k]=z,m[j]=s,g.push(m))}}b=[f,g];d=b[0];e.b[a].xa=b;e.b[a].He=-(c[0]*d[0][0]+c[1]*d[0][1]+c[2]*d[0][2]);b=zc(new T(d[0][0],d[0][1],d[0][2]),new T(d[1][0],d[1][1],d[1][2]));e.b[a].Hk=b;d=Jc(0,0,1); -c=Ld(c,d);d=c[0];f=c[1];g=Mc(e.ve[0],e.ve[1],e.ve[2],0);c=Lc();Yc(d,g,c);d=Lc();Rc(f,2,d);f=c[2];d[0]*=f;d[1]*=f;d[2]*=f;d[3]*=f;e.b[a].Cc=c[2];e.b[a].wa=d;c=Math.abs(Math.floor(b/c[2]));e.ad[a]=c;e.b[a].n=c} -function Pd(a,b){var c;c=b.I;for(var e=b.L,d=b.ha,f=Array(e[2]),g=Array(e[2]),h=e[1]*e[0],l=0,k=0,j=0,m=0,r=0,m=0;md&&n(Error("Could not find scalar for vertex.")),l=g[l],f[h++]=l,f[h++]=l,f[h++]=l;b.B.A= -g;b.B.Oc=f;b.B.i=q;E.Qa(this.f+".parse");e=new gd;e.R=b;e.w=a;this.dispatchEvent(e)};B("X.parserLBL",Qd);B("X.parserLBL.prototype.parse",Qd.prototype.parse);function Rd(a,b){this.x=ia(a)?a:0;this.y=ia(b)?b:0}w=Rd.prototype;w.k=function(){return new Rd(this.x,this.y)};function Sd(a,b){return new Rd(a.x-b.x,a.y-b.y)}w.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};w.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};w.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this}; +function Md(a,b,c,e,d,f,g,h){var l=new Nd;Kc(b,b);for(var k=[],j=[],m=0;6>m;m++)for(var s=Math.floor(m/2),r=(s+1)%3,z=(s+2)%3,y=(4+2*s)%6,D=0;2>D;D++){var F=(2+D+2*s)%6,H=-(b[s]*(e[m]-a[s])+b[r]*(e[F]-a[r]))/b[z]+a[z];if(H>=e[y]&&H<=e[y+1]||H<=e[y]&&H>=e[y+1]){var A=[];A[s]=e[m];A[r]=e[F];A[z]=H;k.push(A)}else A=[],A[s]=e[m],A[r]=e[F],A[z]=H,j.push(A)}a=Jc(0,0,1);a=Ld(b,a);e=a[0];a=a[1];s=[];for(j=0;jm[1]&&(m[1]=s[j][0]),s[j][1]m[3]&&(m[3]=s[j][1]),s[j][2]m[5]&&(m[5]=s[j][2]);j=Mc(m[0]+(m[1]-m[0])/2,m[2]+(m[3]-m[2])/2,m[4]+(m[5]-m[4])/2,0);s=Lc();Vc(a,j,s);var r=Math.floor(m[0]),z=Math.ceil(m[1]), +y=z-r,D=Math.floor(m[2]),F=Math.ceil(m[3]),H=F-D,j=Math.ceil(y/1),G=Math.ceil(H/1),A=new Uint8Array(4*j*G),J=new bd;J.Me=j;J.Le=G;var G=Lc(),K=Mc(0,0,m[4],1),R=Nc();Vc(f.Ah,a,R);for(var N=F-1E-7,W=z-1E-7,aa=0,Z=0,ba=0,L=D,L=D;L<=N;L+=1){ba++;Z=0;K[1]=L;for(j=r;j<=W;j+=1){Z++;K[0]=j;Yc(R,K,G);var O=4*aa;if(0<=G[0]&&G[0]h;h++){var l=Math.floor(h/2),k=(l+1)%3,j=(l+2)%3,m=(2+2*l)%6,s=(4+2*l)%6,r=(d[h]-b[l])*(1/c[l]);if(Infinity!=r&&-Infinity!=r){var z=b[k]+c[k]*r,r=b[j]+c[j]*r;z>=d[m]&&z<=d[m+1]&&r>=d[s]&&r<=d[s+1]?(m=[],m[l]=d[h],m[k]=z,m[j]=r,f.push(m)):(m=[],m[l]=d[h],m[k]=z,m[j]=r,g.push(m))}}b=[f,g];d=b[0];e.b[a].xa=b;e.b[a].Ie=-(c[0]*d[0][0]+c[1]*d[0][1]+c[2]*d[0][2]);b=zc(new T(d[0][0],d[0][1],d[0][2]),new T(d[1][0],d[1][1],d[1][2]));e.b[a].Hk=b;d=Jc(0,0,1); +c=Ld(c,d);d=c[0];f=c[1];g=Mc(e.we[0],e.we[1],e.we[2],0);c=Lc();Yc(d,g,c);d=Lc();Rc(f,2,d);f=c[2];d[0]*=f;d[1]*=f;d[2]*=f;d[3]*=f;e.b[a].Dc=c[2];e.b[a].wa=d;c=Math.abs(Math.floor(b/c[2]));e.bd[a]=c;e.b[a].n=c} +function Pd(a,b){var c;c=b.I;for(var e=b.L,d=b.ha,f=Array(e[2]),g=Array(e[2]),h=e[1]*e[0],l=0,k=0,j=0,m=0,s=0,m=0;md&&n(Error("Could not find scalar for vertex.")),l=g[l],f[h++]=l,f[h++]=l,f[h++]=l;b.B.A= +g;b.B.Pc=f;b.B.i=q;E.Ra(this.f+".parse");e=new gd;e.R=b;e.w=a;this.dispatchEvent(e)};B("X.parserLBL",Qd);B("X.parserLBL.prototype.parse",Qd.prototype.parse);function Rd(a,b){this.x=ia(a)?a:0;this.y=ia(b)?b:0}w=Rd.prototype;w.k=function(){return new Rd(this.x,this.y)};function Sd(a,b){return new Rd(a.x-b.x,a.y-b.y)}w.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};w.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};w.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this}; w.translate=function(a,b){a instanceof Rd?(this.x+=a.x,this.y+=a.y):(this.x+=a,x(b)&&(this.y+=b));return this};w.scale=function(a,b){var c=x(b)?b:a;this.x*=a;this.y*=c;return this};function Td(a,b,c,e){this.top=a;this.right=b;this.bottom=c;this.left=e}w=Td.prototype;w.k=function(){return new Td(this.top,this.right,this.bottom,this.left)};w.contains=function(a){return!this||!a?u:a instanceof Td?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom}; w.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};w.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};w.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this}; -w.translate=function(a,b){a instanceof Rd?(this.left+=a.x,this.right+=a.x,this.top+=a.y,this.bottom+=a.y):(this.left+=a,this.right+=a,x(b)&&(this.top+=b,this.bottom+=b));return this};w.scale=function(a,b){var c=x(b)?b:a;this.left*=a;this.right*=a;this.top*=c;this.bottom*=c;return this};function Ud(a,b){this.width=a;this.height=b}w=Ud.prototype;w.k=function(){return new Ud(this.width,this.height)};w.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};w.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};w.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};w.scale=function(a,b){var c=x(b)?b:a;this.width*=a;this.height*=c;return this};function Vd(a,b,c,e){this.left=a;this.top=b;this.width=c;this.height=e}w=Vd.prototype;w.k=function(){return new Vd(this.left,this.top,this.width,this.height)};w.Hg=function(a){var b=Math.max(this.left,a.left),c=Math.min(this.left+this.width,a.left+a.width);if(b<=c){var e=Math.max(this.top,a.top);a=Math.min(this.top+this.height,a.top+a.height);if(e<=a)return this.left=b,this.top=e,this.width=c-b,this.height=a-e,q}return u}; -w.contains=function(a){return a instanceof Vd?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height};function Wd(a,b){var c=b.x=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height};function Wd(a,b){var c=b.x");c=c.join("")}var f=a.createElement(c);e&&(ma(e)?f.className=e:ka(e)?Yd.apply(t,[f].concat(e)):La(e,function(a,b){"style"==b?f.style.cssText=a:"class"==b?f.className=a:"for"==b?f.htmlFor=a:b in de?f.setAttribute(de[b],a):0==b.lastIndexOf("aria-",0)||0==b.lastIndexOf("data-",0)?f.setAttribute(b,a): f[b]=a}));if(2a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return t} @@ -151,238 +151,239 @@ h.clientTop);g.x+=h.x;g.y+=h.y;b.top=Math.max(b.top,g.y);b.right=Math.min(b.righ b.bottom>b.top&&b.right>b.left?b:t} function re(a){var b,c=be(a),e=me(a,"position"),d=jb&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==e&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),f=new Rd(0,0),g=ne(c);if(a==g)return f;if(a.getBoundingClientRect)b=oe(a),a=ke($d(c)),f.x=b.left+a.x,f.y=b.top+a.y;else if(c.getBoxObjectFor&&!d)b=c.getBoxObjectFor(a),a=c.getBoxObjectFor(g),f.x=b.screenX-a.screenX,f.y=b.screenY-a.screenY;else{b=a;do{f.x+=b.offsetLeft;f.y+=b.offsetTop;b!=a&&(f.x+=b.clientLeft||0,f.y+=b.clientTop||0); if(kb&&"fixed"==me(b,"position")){f.x+=c.body.scrollLeft;f.y+=c.body.scrollTop;break}b=b.offsetParent}while(b&&b!=a);if(ib||kb&&"absolute"==e)f.y-=c.body.offsetTop;for(b=a;(b=pe(b))&&b!=c.body&&b!=g;)if(f.x-=b.scrollLeft,!ib||"TR"!=b.tagName)f.y-=b.scrollTop}return f} -function te(a){var b=new Rd;if(1==a.nodeType){if(a.getBoundingClientRect){var c=oe(a);b.x=c.left;b.y=c.top}else{var c=ke($d(a)),e=re(a);b.x=e.x-c.x;b.y=e.y-c.y}if(jb&&!xb(12)){var d;I?d="-ms-transform":kb?d="-webkit-transform":ib?d="-o-transform":jb&&(d="-moz-transform");var f;d&&(f=me(a,d));f||(f=me(a,"transform"));f?(a=f.match(ue),a=!a?new Rd(0,0):new Rd(parseFloat(a[1]),parseFloat(a[2]))):a=new Rd(0,0);b=new Rd(b.x+a.x,b.y+a.y)}}else d=na(a.pi),f=a,a.targetTouches?f=a.targetTouches[0]:d&&a.jb.targetTouches&& -(f=a.jb.targetTouches[0]),b.x=f.clientX,b.y=f.clientY;return b}function ve(a,b){"number"==typeof a&&(a=(b?Math.round(a):a)+"px");return a}function we(a){if("none"!=me(a,"display"))return xe(a);var b=a.style,c=b.display,e=b.visibility,d=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=xe(a);b.display=c;b.position=d;b.visibility=e;return a} +function te(a){var b=new Rd;if(1==a.nodeType){if(a.getBoundingClientRect){var c=oe(a);b.x=c.left;b.y=c.top}else{var c=ke($d(a)),e=re(a);b.x=e.x-c.x;b.y=e.y-c.y}if(jb&&!xb(12)){var d;I?d="-ms-transform":kb?d="-webkit-transform":ib?d="-o-transform":jb&&(d="-moz-transform");var f;d&&(f=me(a,d));f||(f=me(a,"transform"));f?(a=f.match(ue),a=!a?new Rd(0,0):new Rd(parseFloat(a[1]),parseFloat(a[2]))):a=new Rd(0,0);b=new Rd(b.x+a.x,b.y+a.y)}}else d=na(a.qi),f=a,a.targetTouches?f=a.targetTouches[0]:d&&a.kb.targetTouches&& +(f=a.kb.targetTouches[0]),b.x=f.clientX,b.y=f.clientY;return b}function ve(a,b){"number"==typeof a&&(a=(b?Math.round(a):a)+"px");return a}function we(a){if("none"!=me(a,"display"))return xe(a);var b=a.style,c=b.display,e=b.visibility,d=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=xe(a);b.display=c;b.position=d;b.visibility=e;return a} function xe(a){var b=a.offsetWidth,c=a.offsetHeight,e=kb&&!b&&!c;return(!ia(b)||e)&&a.getBoundingClientRect?(a=oe(a),new Ud(a.right-a.left,a.bottom-a.top)):new Ud(b,c)}function ye(a,b){a.style.display=b?"":"none"}function se(a){return"rtl"==me(a,"direction")}function ze(a,b){if(/^\d+px?$/.test(b))return parseInt(b,10);var c=a.style.left,e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=b;var d=a.style.pixelLeft;a.style.left=c;a.runtimeStyle.left=e;return d} -function Ae(a,b){var c=a.currentStyle?a.currentStyle[b]:t;return c?ze(a,c):0}var Be={thin:2,medium:4,thick:6};function Ce(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:t))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:t;return c in Be?Be[c]:ze(a,c)}var ue=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function De(a,b){dc.call(this);this.z=a;var c=oa(this.z)&&1==this.z.nodeType?this.z:this.z?this.z.body:t;this.Ii=!!c&&se(c);this.Yk=M(this.z,jb?"DOMMouseScroll":"mousewheel",this,b)}C(De,dc); -De.prototype.handleEvent=function(a){var b=0,c=0,e=0;a=a.jb;if("mousewheel"==a.type){c=1;if(I||kb&&(ab||xb("532.0")))c=40;e=Ee(-a.wheelDelta,c);ia(a.wheelDeltaX)?(b=Ee(-a.wheelDeltaX,c),c=Ee(-a.wheelDeltaY,c)):c=e}else e=a.detail,100e&&(e=-3),ia(a.axis)&&a.axis===a.HORIZONTAL_AXIS?b=e:c=e;x(this.Mg)&&(b=Math.min(Math.max(b,-this.Mg),this.Mg));x(this.Ng)&&(c=Math.min(Math.max(c,-this.Ng),this.Ng));this.Ii&&(b=-b);b=new Fe(e,a,b,c);this.dispatchEvent(b)}; -function Ee(a,b){return kb&&($a||cb)&&0!=a%b?a:a/b}function Fe(a,b,c,e){b&&this.sa(b,p);this.type="mousewheel";this.detail=a;this.Tk=c;this.Ic=e}C(Fe,Ob);I||kb&&xb("525");function Ge(a){P.call(this);this.f="interactor";this.Ga=a;this.Ee=this.cg=this.bg=this.dg=this.ag=this.eg=t;this.Md=q;this.Vb=this.Pb=this.qb=u;this.ka=[0,0];this.ze=new E.l(0,0,0);this.Pc=new E.l(0,0,0);this.Jg=0;this.lg=this.Hd=t;this.kg=u;this.P={MOUSEWHEEL_ENABLED:q,MOUSECLICKS_ENABLED:q,KEYBOARD_ENABLED:q,HOVERING_ENABLED:q,CONTEXTMENU_ENABLED:u,TOUCH_ENABLED:q,TOUCH_BOUNCING_ENABLED:u}}C(Ge,P);Ge.prototype.__defineGetter__("config",v("P"));Ge.prototype.__defineGetter__("leftButtonDown",v("qb")); +function Ae(a,b){var c=a.currentStyle?a.currentStyle[b]:t;return c?ze(a,c):0}var Be={thin:2,medium:4,thick:6};function Ce(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:t))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:t;return c in Be?Be[c]:ze(a,c)}var ue=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function De(a,b){dc.call(this);this.z=a;var c=oa(this.z)&&1==this.z.nodeType?this.z:this.z?this.z.body:t;this.Ji=!!c&&se(c);this.Yk=M(this.z,jb?"DOMMouseScroll":"mousewheel",this,b)}C(De,dc); +De.prototype.handleEvent=function(a){var b=0,c=0,e=0;a=a.kb;if("mousewheel"==a.type){c=1;if(I||kb&&(ab||xb("532.0")))c=40;e=Ee(-a.wheelDelta,c);ia(a.wheelDeltaX)?(b=Ee(-a.wheelDeltaX,c),c=Ee(-a.wheelDeltaY,c)):c=e}else e=a.detail,100e&&(e=-3),ia(a.axis)&&a.axis===a.HORIZONTAL_AXIS?b=e:c=e;x(this.Ng)&&(b=Math.min(Math.max(b,-this.Ng),this.Ng));x(this.Og)&&(c=Math.min(Math.max(c,-this.Og),this.Og));this.Ji&&(b=-b);b=new Fe(e,a,b,c);this.dispatchEvent(b)}; +function Ee(a,b){return kb&&($a||cb)&&0!=a%b?a:a/b}function Fe(a,b,c,e){b&&this.sa(b,p);this.type="mousewheel";this.detail=a;this.Tk=c;this.Jc=e}C(Fe,Ob);I||kb&&xb("525");function Ge(a){P.call(this);this.f="interactor";this.Ha=a;this.Fe=this.dg=this.cg=this.eg=this.bg=this.fg=t;this.Nd=q;this.Vb=this.Pb=this.rb=u;this.ka=[0,0];this.Ae=new E.l(0,0,0);this.Qc=new E.l(0,0,0);this.Kg=0;this.mg=this.Id=t;this.lg=u;this.P={MOUSEWHEEL_ENABLED:q,MOUSECLICKS_ENABLED:q,KEYBOARD_ENABLED:q,HOVERING_ENABLED:q,CONTEXTMENU_ENABLED:u,TOUCH_ENABLED:q,TOUCH_BOUNCING_ENABLED:u}}C(Ge,P);Ge.prototype.__defineGetter__("config",v("P"));Ge.prototype.__defineGetter__("leftButtonDown",v("rb")); Ge.prototype.__defineGetter__("middleButtonDown",v("Pb"));Ge.prototype.__defineGetter__("rightButtonDown",v("Vb")); -Ge.prototype.sa=function(){this.P.MOUSEWHEEL_ENABLED?(this.Ee=new De(this.Ga),this.eg=M(this.Ee,"mousewheel",this.td.bind(this))):(Xb(this.eg),this.Ee=t);this.P.MOUSECLICKS_ENABLED?(this.ag=M(this.Ga,"mousedown",this.Vi.bind(this)),this.dg=M(this.Ga,"mouseup",this.$i.bind(this))):(Xb(this.ag),Xb(this.dg));this.Ga.oncontextmenu=this.P.CONTEXTMENU_ENABLED?t:function(){return u};window.onkeydown=this.P.KEYBOARD_ENABLED?this.Tg.bind(this):t;this.P.TOUCH_ENABLED?(this.P.TOUCH_BOUNCING_ENABLED||document.body.addEventListener("touchmove", -function(a){a.preventDefault()},u),this.Ph=M(this.Ga,"touchstart",this.nj.bind(this)),this.Oh=M(this.Ga,"touchmove",this.lj.bind(this)),this.Nh=M(this.Ga,"touchend",this.hj.bind(this))):(Xb(this.Ph),Xb(this.Oh),Xb(this.Nh));Xb(this.bg);Xb(this.cg);this.bg=M(this.Ga,"mousemove",this.Xi.bind(this));this.cg=M(this.Ga,"mouseout",this.Yi.bind(this))}; -Ge.prototype.Vi=function(a){0==a.button?this.qb=q:1==a.button?this.Pb=q:2==a.button&&(this.Vb=q);eval("this.onMouseDown("+this.qb+","+this.Pb+","+this.Vb+")");Je(this);a.preventDefault()};Ge.prototype.Ui=da();Ge.prototype.$i=function(a){0==a.button?this.qb=u:1==a.button?this.Pb=u:2==a.button&&(this.Vb=u);eval("this.onMouseUp("+this.qb+","+this.Pb+","+this.Vb+")");Je(this);a.preventDefault()};Ge.prototype.__defineGetter__("mousePosition",v("ka"));w=Ge.prototype;w.Zi=da(); -w.Yi=function(a){this.Md=u;this.P.KEYBOARD_ENABLED&&(window.onkeydown=t);this.Vb=this.Pb=this.qb=u;Je(this);this.ze=new E.l(0,0,0);a.preventDefault()};w.Wi=da();w.nj=function(a){a.preventDefault();a.sa(a.jb.targetTouches[0],a.currentTarget);eval("this.onTouchStart("+a.clientX+","+a.clientY+")");this.Pc=new E.l(a.clientX,a.clientY,0);this.lg=setTimeout(this.jj.bind(this,a),500)};w.mj=da(); -w.jj=function(a){eval("this.onTouchHover("+a.clientX+","+a.clientY+")");a=new Bd;a.mb=q;a.Xa=this instanceof Ke;this.dispatchEvent(a);this.Pd=q};w.ij=da();function Le(a){clearTimeout(a.lg);if(a.Pd){var b=new Bd;b.mb=u;b.Xa=a instanceof Ke;a.dispatchEvent(b)}a.Pd=u}w.hj=function(a){a.preventDefault();eval("this.onTouchEnd()");Le(this)};w.gj=da(); -w.lj=function(a){a.preventDefault();this.Pd||Le(this);this.touchmoveEvent=a=a.jb;eval("this.onTouchMove(this['touchmoveEvent'])");var b=a.targetTouches;if(1==b.length){a=b[0];var c=[a.clientX,a.clientY];a=new E.l(c[0],c[1],0);var b=c[0]>3*this.Ga.clientWidth/4,e=c[0]3*this.Ga.clientHeight/4,c=!b&&!e&&!d&&!c,d=this.Pc.za(a);this.Pc=a.k();if(this.Pd)a=new zd,5d.x&&(d.x=-1),5d.y&&(d.y=-1),a.na=d,this.dispatchEvent(a); -else if(this instanceof Me&&(b||e))a=new Cd,a.W=0>d.y,this.dispatchEvent(a);else if(this instanceof Ke||c)d.scale(3),a=new Ad,a.na=d,this.dispatchEvent(a)}else 2==b.length&&(a=b[0],b=b[1],a=[a.clientX,a.clientY],b=[b.clientX,b.clientY],a=new E.l(a[0],a[1],0),b=new E.l(b[0],b[1],0),d=Ac(a,b),b=d-this.Jg,this.Jg=d,this.Pc.za(a),this.Pc=a.k(),10=f&&(a.preventDefault(),d?a=new zd:b?a=new Bd:(a=new Ad,this instanceof Me&&(a=new Cd)),a&&(c=new E.l(0,0,0),37==f?(c.x=5,a.W=u,b&&(a.W=q,a.mb=q,a.Xa=u)):39==f?(c.x=-5,a.W=q,b&&(a.mb=u,a.Xa=u)):38==f?(c.y=5,a.W=q,b&&(a.mb=q,a.Xa=q)):40==f&&(c.y=-5,a.W=u,b&&(a.mb= -u,a.Xa=q)),a.na=c,this.dispatchEvent(a)))}};B("X.interactor",Ge);B("X.interactor.prototype.init",Ge.prototype.sa);B("X.interactor.prototype.onMouseDown",Ge.prototype.Ui);B("X.interactor.prototype.onMouseUp",Ge.prototype.Zi);B("X.interactor.prototype.onMouseMove",Ge.prototype.Wi);B("X.interactor.prototype.onMouseWheel",Ge.prototype.aj);B("X.interactor.prototype.onKey",Ge.prototype.Si);B("X.interactor.prototype.onTouchStart",Ge.prototype.mj);B("X.interactor.prototype.onTouchMove",Ge.prototype.kj); -B("X.interactor.prototype.onTouchEnd",Ge.prototype.gj);B("X.interactor.prototype.onTouchHover",Ge.prototype.ij);function Me(a){Ge.call(this,a);this.f="interactor2D"}C(Me,Ge);Me.prototype.td=function(a){Me.u.td.call(this,a);var b=new Cd;a.Ic==t&&(a.Ic=0);b.W=0>a.Ic;this.dispatchEvent(b)};function Nd(a){V.call(this);this.f="slice";this.v=[0,0,0];this.sc=[0,0,1];this.W=[0,1,0];this.Od=[1,0,0];this.t=this.C=10;this.Ec=[0,1,0,0,1,1,1,1,1,0,0,0];this.j=this.Ab=t;this.yb=q;this.oc=[1,1,1];a!=t&&this.fc(a)}C(Nd,V);Nd.prototype.fc=function(a){this.v=a.v.slice();this.sc=a.sc.slice();this.W=a.W.slice();this.C=a.C;this.t=a.t;this.Ab=a.Ab;this.j=a.j;this.yb=a.yb;this.oc=a.oc;this.Gh=a.Gh;Nd.u.fc.call(this,a)};Nd.prototype.__defineSetter__("height",ea("t")); +Ge.prototype.sa=function(){this.P.MOUSEWHEEL_ENABLED?(this.Fe=new De(this.Ha),this.fg=M(this.Fe,"mousewheel",this.ud.bind(this))):(Xb(this.fg),this.Fe=t);this.P.MOUSECLICKS_ENABLED?(this.bg=M(this.Ha,"mousedown",this.Wi.bind(this)),this.eg=M(this.Ha,"mouseup",this.aj.bind(this))):(Xb(this.bg),Xb(this.eg));this.Ha.oncontextmenu=this.P.CONTEXTMENU_ENABLED?t:function(){return u};window.onkeydown=this.P.KEYBOARD_ENABLED?this.Ug.bind(this):t;this.P.TOUCH_ENABLED?(this.P.TOUCH_BOUNCING_ENABLED||document.body.addEventListener("touchmove", +function(a){a.preventDefault()},u),this.Qh=M(this.Ha,"touchstart",this.oj.bind(this)),this.Ph=M(this.Ha,"touchmove",this.mj.bind(this)),this.Oh=M(this.Ha,"touchend",this.ij.bind(this))):(Xb(this.Qh),Xb(this.Ph),Xb(this.Oh));Xb(this.cg);Xb(this.dg);this.cg=M(this.Ha,"mousemove",this.Yi.bind(this));this.dg=M(this.Ha,"mouseout",this.Zi.bind(this))}; +Ge.prototype.Wi=function(a){0==a.button?this.rb=q:1==a.button?this.Pb=q:2==a.button&&(this.Vb=q);eval("this.onMouseDown("+this.rb+","+this.Pb+","+this.Vb+")");Je(this);a.preventDefault()};Ge.prototype.Vi=da();Ge.prototype.aj=function(a){0==a.button?this.rb=u:1==a.button?this.Pb=u:2==a.button&&(this.Vb=u);eval("this.onMouseUp("+this.rb+","+this.Pb+","+this.Vb+")");Je(this);a.preventDefault()};Ge.prototype.__defineGetter__("mousePosition",v("ka"));w=Ge.prototype;w.$i=da(); +w.Zi=function(a){this.Nd=u;this.P.KEYBOARD_ENABLED&&(window.onkeydown=t);this.Vb=this.Pb=this.rb=u;Je(this);this.Ae=new E.l(0,0,0);a.preventDefault()};w.Xi=da();w.oj=function(a){a.preventDefault();a.sa(a.kb.targetTouches[0],a.currentTarget);eval("this.onTouchStart("+a.clientX+","+a.clientY+")");this.Qc=new E.l(a.clientX,a.clientY,0);this.mg=setTimeout(this.kj.bind(this,a),500)};w.nj=da(); +w.kj=function(a){eval("this.onTouchHover("+a.clientX+","+a.clientY+")");a=new Bd;a.nb=q;a.Ya=this instanceof Ke;this.dispatchEvent(a);this.Qd=q};w.jj=da();function Le(a){clearTimeout(a.mg);if(a.Qd){var b=new Bd;b.nb=u;b.Ya=a instanceof Ke;a.dispatchEvent(b)}a.Qd=u}w.ij=function(a){a.preventDefault();eval("this.onTouchEnd()");Le(this)};w.hj=da(); +w.mj=function(a){a.preventDefault();this.Qd||Le(this);this.touchmoveEvent=a=a.kb;eval("this.onTouchMove(this['touchmoveEvent'])");var b=a.targetTouches;if(1==b.length){a=b[0];var c=[a.clientX,a.clientY];a=new E.l(c[0],c[1],0);var b=c[0]>3*this.Ha.clientWidth/4,e=c[0]3*this.Ha.clientHeight/4,c=!b&&!e&&!d&&!c,d=this.Qc.Aa(a);this.Qc=a.k();if(this.Qd)a=new zd,5d.x&&(d.x=-1),5d.y&&(d.y=-1),a.na=d,this.dispatchEvent(a); +else if(this instanceof Me&&(b||e))a=new Cd,a.W=0>d.y,this.dispatchEvent(a);else if(this instanceof Ke||c)d.scale(3),a=new Ad,a.na=d,this.dispatchEvent(a)}else 2==b.length&&(a=b[0],b=b[1],a=[a.clientX,a.clientY],b=[b.clientX,b.clientY],a=new E.l(a[0],a[1],0),b=new E.l(b[0],b[1],0),d=Ac(a,b),b=d-this.Kg,this.Kg=d,this.Qc.Aa(a),this.Qc=a.k(),10=f&&(a.preventDefault(),d?a=new zd:b?a=new Bd:(a=new Ad,this instanceof Me&&(a=new Cd)),a&&(c=new E.l(0,0,0),37==f?(c.x=5,a.W=u,b&&(a.W=q,a.nb=q,a.Ya=u)):39==f?(c.x=-5,a.W=q,b&&(a.nb=u,a.Ya=u)):38==f?(c.y=5,a.W=q,b&&(a.nb=q,a.Ya=q)):40==f&&(c.y=-5,a.W=u,b&&(a.nb= +u,a.Ya=q)),a.na=c,this.dispatchEvent(a)))}};B("X.interactor",Ge);B("X.interactor.prototype.init",Ge.prototype.sa);B("X.interactor.prototype.onMouseDown",Ge.prototype.Vi);B("X.interactor.prototype.onMouseUp",Ge.prototype.$i);B("X.interactor.prototype.onMouseMove",Ge.prototype.Xi);B("X.interactor.prototype.onMouseWheel",Ge.prototype.bj);B("X.interactor.prototype.onKey",Ge.prototype.Ti);B("X.interactor.prototype.onTouchStart",Ge.prototype.nj);B("X.interactor.prototype.onTouchMove",Ge.prototype.lj); +B("X.interactor.prototype.onTouchEnd",Ge.prototype.hj);B("X.interactor.prototype.onTouchHover",Ge.prototype.jj);function Me(a){Ge.call(this,a);this.f="interactor2D"}C(Me,Ge);Me.prototype.ud=function(a){Me.u.ud.call(this,a);var b=new Cd;a.Jc==t&&(a.Jc=0);b.W=0>a.Jc;this.dispatchEvent(b)};function Nd(a){V.call(this);this.f="slice";this.v=[0,0,0];this.tc=[0,0,1];this.W=[0,1,0];this.Pd=[1,0,0];this.t=this.C=10;this.Fc=[0,1,0,0,1,1,1,1,1,0,0,0];this.j=this.Bb=t;this.zb=q;this.pc=[1,1,1];a!=t&&this.fc(a)}C(Nd,V);Nd.prototype.fc=function(a){this.v=a.v.slice();this.tc=a.tc.slice();this.W=a.W.slice();this.C=a.C;this.t=a.t;this.Bb=a.Bb;this.j=a.j;this.zb=a.zb;this.pc=a.pc;this.Hh=a.Hh;Nd.u.fc.call(this,a)};Nd.prototype.__defineSetter__("height",ea("t")); Nd.prototype.__defineSetter__("width",ea("C"));Nd.prototype.create=function(){this.gc()}; -Nd.prototype.gc=function(){var a=(new T(this.sc[0],this.sc[1],this.sc[2])).normalize(),b=new T(this.W[0],this.W[1],this.W[2]),c=new T(this.Od[0],this.Od[1],this.Od[2]),e=new T(this.v[0],this.v[1],this.v[2]),d=Bc(c.k().N().scale(this.C/2),b.k().N().scale(this.t/2)),f=new T(d.x+e.x,d.y+e.y,d.d+e.d),d=Bc(c.k().N().scale(this.C/2),b.k().scale(this.t/2)),g=new T(d.x+e.x,d.y+e.y,d.d+e.d),d=Bc(c.k().scale(this.C/2),b.k().N().scale(this.t/2)),h=new T(d.x+e.x,d.y+e.y,d.d+e.d),d=Bc(c.k().scale(this.C/2),b.k().scale(this.t/ -2)),b=new T(d.x+e.x,d.y+e.y,d.d+e.d);this.g=new U(18);this.o=new U(18);this.g.add(f.x,f.y,f.d);this.g.add(g.x,g.y,g.d);this.g.add(h.x,h.y,h.d);this.g.add(h.x,h.y,h.d);this.g.add(b.x,b.y,b.d);this.g.add(g.x,g.y,g.d);this.o.add(a.x,a.y,a.d);this.o.add(a.x,a.y,a.d);this.o.add(a.x,a.y,a.d);this.o.add(a.x,a.y,a.d);this.o.add(a.x,a.y,a.d);this.o.add(a.x,a.y,a.d);this.yb&&(a=new V,a.g=new U(24),a.o=new U(24),a.g.add(f.x,f.y,f.d),a.g.add(g.x,g.y,g.d),a.g.add(g.x,g.y,g.d),a.g.add(b.x,b.y,b.d),a.g.add(b.x, -b.y,b.d),a.g.add(h.x,h.y,h.d),a.g.add(h.x,h.y,h.d),a.g.add(f.x,f.y,f.d),a.o.add(0,0,0),a.o.add(0,0,0),a.o.add(0,0,0),a.o.add(0,0,0),a.o.add(0,0,0),a.o.add(0,0,0),a.o.add(0,0,0),a.o.add(0,0,0),a.F=[this.oc[0],this.oc[1],this.oc[2]],a.ya="LINES",a.yc=2,this.c.push(a))};B("X.slice",Nd);B("X.slice.prototype.create",Nd.prototype.create);function S(a){V.call(this);this.f="volume";this.v=[0,0,0];this.L=[10,10,10];this.Ra=[1,1,1];this.ad=[10,10,10];this.hd=[1,1,1];this.Lb=[];this.wc=this.pb=this.vc=this.ob=this.uc=this.nb=0;this.ed=new V;this.fd=new V;this.gd=new V;this.Rd=this.hb=u;this.Bb=0;this.j=t;this.yb=q;this.ea=Infinity;this.da=-Infinity;this.jg=q;this.ha=0;this.I=t;Ea(this,new rc);Ea(this,new ed);a!=t&&this.fc(a)}C(S,V); -S.prototype.fc=function(a){this.v=a.v.slice();this.L=a.L.slice();this.hd=a.hd.slice();this.nb=a.nb;this.uc=a.uc;this.ob=a.ob;this.vc=a.vc;this.pb=a.pb;this.wc=a.wc;this.Jh=a.Jh;this.Kh=a.Kh;this.Ih=a.Ih;this.Sf=a.Sf.slice();this.ed=new V(a.ed);this.fd=new V(a.fd);this.gd=new V(a.gd);this.ha=a.ha;this.I=a.I;this.hb=a.hb;this.Rd=a.Rd;this.Bb=a.Bb;this.j=a.j;this.yb=a.yb;S.u.fc.call(this,a)}; -S.prototype.gc=function(a){this.c.length=0;this.ed.c.length=0;this.fd.c.length=0;this.gd.c.length=0;this.c.push(this.ed);this.c.push(this.fd);this.c.push(this.gd);this.ua=a.Bd;this.ve=a.Cd;this.xb=a.Ad;this.Ek=a.Hb;this.zh=a.Ib;this.Mk=a.kh;this.Nk=a.Ma;this.Ba=a.orientation;this.ha=a.max;this.I=a.data;this.i=q}; -S.prototype.p=function(a){a="undefined"!==typeof a?a:q;if(0b;b++){var c=this.c[b],e=0,d=0;0==b?(e=this.nb,d=this.uc,this.uc=this.nb):1==b?(e=this.ob,d=this.vc,this.vc=this.ob):2==b&&(e=this.pb,d=this.wc, -this.wc=this.pb);if(this.c[b].c[parseInt(e,10)]==t){var f=new Float32Array(3);f[0]=this.b[b].xa[0][0][0]+Math.abs(this.b[b].wa[0])*parseInt(e,10);f[1]=this.b[b].xa[0][0][1]+Math.abs(this.b[b].wa[1])*parseInt(e,10);f[2]=this.b[b].xa[0][0][2]+Math.abs(this.b[b].wa[2])*parseInt(e,10);if(this.ja){var g=Md(f,this.b[b].h,this.b[b].F,this.Ra,this.j.Aa,this.j,this.j.ja,this.j.Sa.Ya);this.j.c[b].c[parseInt(e,10)]=g;this.j.c[b].p(q)}f=Md(f,this.b[b].h,this.b[b].F,this.Ra,this.Aa,this,q,t);this.ja&&(f.j=f.U, -f.j=this.j.c[b].c[parseInt(e,10)].U);c.c[parseInt(e,10)]=f;this.c[b].p(q)}c.c[parseInt(d,10)].visible=u;c=c.c[parseInt(e,10)];c.visible=q;c.pa=1}}a&&S.u.p.call(this)};S.prototype.__defineGetter__("dimensions",v("L"));S.prototype.__defineGetter__("bbox",v("Ra"));S.prototype.__defineGetter__("range",v("ad"));S.prototype.__defineGetter__("dimensionsRAS",v("Sf"));S.prototype.__defineGetter__("volumeRendering",v("hb"));S.prototype.__defineSetter__("volumeRendering",function(a){this.hb=a;this.p(u)}); +Nd.prototype.gc=function(){var a=(new T(this.tc[0],this.tc[1],this.tc[2])).normalize(),b=new T(this.W[0],this.W[1],this.W[2]),c=new T(this.Pd[0],this.Pd[1],this.Pd[2]),e=new T(this.v[0],this.v[1],this.v[2]),d=Bc(c.k().N().scale(this.C/2),b.k().N().scale(this.t/2)),f=new T(d.x+e.x,d.y+e.y,d.d+e.d),d=Bc(c.k().N().scale(this.C/2),b.k().scale(this.t/2)),g=new T(d.x+e.x,d.y+e.y,d.d+e.d),d=Bc(c.k().scale(this.C/2),b.k().N().scale(this.t/2)),h=new T(d.x+e.x,d.y+e.y,d.d+e.d),d=Bc(c.k().scale(this.C/2),b.k().scale(this.t/ +2)),b=new T(d.x+e.x,d.y+e.y,d.d+e.d);this.g=new U(18);this.o=new U(18);this.g.add(f.x,f.y,f.d);this.g.add(g.x,g.y,g.d);this.g.add(h.x,h.y,h.d);this.g.add(h.x,h.y,h.d);this.g.add(b.x,b.y,b.d);this.g.add(g.x,g.y,g.d);this.o.add(a.x,a.y,a.d);this.o.add(a.x,a.y,a.d);this.o.add(a.x,a.y,a.d);this.o.add(a.x,a.y,a.d);this.o.add(a.x,a.y,a.d);this.o.add(a.x,a.y,a.d);this.zb&&(a=new V,a.g=new U(24),a.o=new U(24),a.g.add(f.x,f.y,f.d),a.g.add(g.x,g.y,g.d),a.g.add(g.x,g.y,g.d),a.g.add(b.x,b.y,b.d),a.g.add(b.x, +b.y,b.d),a.g.add(h.x,h.y,h.d),a.g.add(h.x,h.y,h.d),a.g.add(f.x,f.y,f.d),a.o.add(0,0,0),a.o.add(0,0,0),a.o.add(0,0,0),a.o.add(0,0,0),a.o.add(0,0,0),a.o.add(0,0,0),a.o.add(0,0,0),a.o.add(0,0,0),a.F=[this.pc[0],this.pc[1],this.pc[2]],a.ya="LINES",a.zc=2,this.c.push(a))};B("X.slice",Nd);B("X.slice.prototype.create",Nd.prototype.create);function S(a){V.call(this);this.f="volume";this.v=[0,0,0];this.L=[10,10,10];this.Sa=[1,1,1];this.bd=[10,10,10];this.jd=[1,1,1];this.Lb=[];this.xc=this.qb=this.wc=this.pb=this.vc=this.ob=0;this.fd=new V;this.gd=new V;this.hd=new V;this.Sd=this.ib=u;this.za=0;this.j=t;this.zb=q;this.ea=Infinity;this.da=-Infinity;this.kg=q;this.ha=0;this.I=t;Ea(this,new rc);Ea(this,new ed);a!=t&&this.fc(a)}C(S,V); +S.prototype.fc=function(a){this.v=a.v.slice();this.L=a.L.slice();this.jd=a.jd.slice();this.ob=a.ob;this.vc=a.vc;this.pb=a.pb;this.wc=a.wc;this.qb=a.qb;this.xc=a.xc;this.Kh=a.Kh;this.Lh=a.Lh;this.Jh=a.Jh;this.Tf=a.Tf.slice();this.fd=new V(a.fd);this.gd=new V(a.gd);this.hd=new V(a.hd);this.ha=a.ha;this.I=a.I;this.ib=a.ib;this.Sd=a.Sd;this.za=a.za;this.j=a.j;this.zb=a.zb;S.u.fc.call(this,a)}; +S.prototype.gc=function(a){this.c.length=0;this.fd.c.length=0;this.gd.c.length=0;this.hd.c.length=0;this.c.push(this.fd);this.c.push(this.gd);this.c.push(this.hd);this.ua=a.Cd;this.we=a.Dd;this.yb=a.Bd;this.oc=a.Hb;this.Ah=a.Ib;this.Mk=a.lh;this.Nk=a.Na;this.Ca=a.orientation;this.ha=a.max;this.I=a.data;this.i=q}; +S.prototype.p=function(a){a="undefined"!==typeof a?a:q;if(0b;b++){var c=this.c[b],e=0,d=0;0==b?(e=this.ob,d=this.vc,this.vc=this.ob):1==b?(e=this.pb,d=this.wc,this.wc=this.pb):2==b&&(e=this.qb,d=this.xc, +this.xc=this.qb);if(this.c[b].c[parseInt(e,10)]==t){var f=new Float32Array(3);f[0]=this.b[b].xa[0][0][0]+Math.abs(this.b[b].wa[0])*parseInt(e,10);f[1]=this.b[b].xa[0][0][1]+Math.abs(this.b[b].wa[1])*parseInt(e,10);f[2]=this.b[b].xa[0][0][2]+Math.abs(this.b[b].wa[2])*parseInt(e,10);if(this.ja){var g=Md(f,this.b[b].h,this.b[b].F,this.Sa,this.j.Ba,this.j,this.j.ja,this.j.Ta.Za);this.j.c[b].c[parseInt(e,10)]=g;this.j.c[b].p(q)}f=Md(f,this.b[b].h,this.b[b].F,this.Sa,this.Ba,this,q,t);this.ja&&(f.j=f.U, +f.j=this.j.c[b].c[parseInt(e,10)].U);c.c[parseInt(e,10)]=f;this.c[b].p(q)}c.c[parseInt(d,10)].visible=u;c=c.c[parseInt(e,10)];c.visible=q;c.pa=1}}a&&S.u.p.call(this)};S.prototype.__defineGetter__("dimensions",v("L"));S.prototype.__defineGetter__("bbox",v("Sa"));S.prototype.__defineGetter__("range",v("bd"));S.prototype.__defineGetter__("dimensionsRAS",v("Tf"));S.prototype.__defineGetter__("volumeRendering",v("ib"));S.prototype.__defineSetter__("volumeRendering",function(a){this.ib=a;this.p(u)}); S.prototype.__defineGetter__("visible",v("ia"));S.prototype.__defineSetter__("visible",function(a){if(a)this.ia=a,this.p(u);else{for(var b=this.c,c=b.length,e=0,e=0;ef&&(g=d,f=c.wd[d]);f=c.Yg[g].split("\\");g=Cc(new T(c.Ma[0],c.Ma[1],c.Ma[2]),new T(c.Ma[3],c.Ma[4],c.Ma[5]));d=Nc();Sc(d,0,-c.Ma[0],-c.Ma[3],-g.x,-f[0]);Sc(d,1,-c.Ma[1],-c.Ma[4],-g.y,-f[1]);Sc(d,2,c.Ma[2],c.Ma[5],g.d,f[2]);Sc(d,3,0,0,0,1);c.Hb=d;c.Ib=Nc();Wc(c.Hb,c.Ib);g=Mc(0,0,0,1);f=Lc();Yc(d,g,f);g=Mc(e[0],e[1],e[2],1);e=Lc();Yc(d,g,e);d=Kd(d,[0,b.L[0],b.L[1],b.L[2]]);c.Cd=[e[0]-f[0],e[1]-f[1],e[2]-f[2]];c.Ad=[d[1]-d[0],d[3]-d[2],d[5]-d[4]];c.Bd=[d[0],d[2],d[4]];b.gc(c);b.Lb= +S.prototype.Fj=function(a){this.c[a].visible=u;for(var b=0;bf&&(g=d,f=c.xd[d]);f=c.Zg[g].split("\\");g=Cc(new T(c.Na[0],c.Na[1],c.Na[2]),new T(c.Na[3],c.Na[4],c.Na[5]));d=Nc();Sc(d,0,-c.Na[0],-c.Na[3],-g.x,-f[0]);Sc(d,1,-c.Na[1],-c.Na[4],-g.y,-f[1]);Sc(d,2,c.Na[2],c.Na[5],g.d,f[2]);Sc(d,3,0,0,0,1);c.Hb=d;c.Ib=Nc();Wc(c.Hb,c.Ib);g=Mc(0,0,0,1);f=Lc();Yc(d,g,f);g=Mc(e[0],e[1],e[2],1);e=Lc();Yc(d,g,e);d=Kd(d,[0,b.L[0],b.L[1],b.L[2]]);c.Dd=[e[0]-f[0],e[1]-f[1],e[2]-f[2]];c.Bd=[d[1]-d[0],d[3]-d[2],d[5]-d[4]];c.Cd=[d[0],d[2],d[4]];b.gc(c);b.Lb= Pd(this,b)}c=new gd;c.R=b;c.w=a;this.dispatchEvent(c)}; -Qe.prototype.vd=function(a,b){this.I=a;var c=0;if(b.nc!=t){e=b.nc;d=Y(this,"ushort",this.I.byteLength-2*e.wb);f=0;for(l=3;0>8,c+=String.fromCharCode(j),c+=String.fromCharCode(k),c=parseInt(c,10);e.wd.push(c);l--}else if(50==h){f++;g=d[f++];m="";for(h=0;h>8,m+=String.fromCharCode(j),m+=String.fromCharCode(k);e.Yg.push(m);l--}else if(4161==h){f++;g=d[f++];m="";for(h= -0;h>8,m+=String.fromCharCode(j),m+=String.fromCharCode(k);e.location.push(m);l--}e.Da[2]++}else{var e={rows:0,cols:0,T:t,Te:0,Wh:0,sb:1,Qi:1,Xk:t,he:0,wb:0,od:t,wf:0,Df:[],data:t,min:Infinity,max:-Infinity,location:[],Yg:[],wd:[]};e.sb=b.q.length;e.sb==t&&(e.sb=1);for(var d=Y(this,"ushort",this.I.byteLength),f=66,g=t,h=t,g=t,l=9;0>8,m=m+String.fromCharCode(j),m=m+String.fromCharCode(k);m=m.split("\\");e.T=[parseFloat(m[0]),parseFloat(m[1]),Infinity];l--}else if(32==g)switch(h=d[f++],f++,g=d[f++],h){case 19:for(h=0;h>8,c+=String.fromCharCode(j),c+=String.fromCharCode(k),c=parseInt(c,10);l--;break;case 50:for(var m="",h=0;h>8,m+=String.fromCharCode(j),m+=String.fromCharCode(k);m=m.split("\\");e.origin=[parseFloat(m[0]),parseFloat(m[1]),parseFloat(m[2])];l--;break;case 55:m="";for(h=0;h>8,m+=String.fromCharCode(j),m+=String.fromCharCode(k);m=m.split("\\");e.Ma=[parseFloat(m[0]),parseFloat(m[1]),parseFloat(m[2]),parseFloat(m[3]),parseFloat(m[4]),parseFloat(m[5])];l--}else if(16==g)switch(h=d[f++],f++,g=d[f++],h){case 8720:for(h=0;h=j);m++){var r=parseInt(k[m],10),s=c.get(r);e.add(s[0],s[1],s[2]);var z=r,y=s;"LINES"==this.Ha?(z=parseInt(k[m+1],10),y=c.get(z),e.add(y[0],y[1],y[2])):"TRIANGLE_STRIPS"==this.Ha&&(0==m||m==j-1)&&e.add(s[0],s[1],s[2]);rc&&10!=g);Y(this,"uchar");d=Y(this,"uint");c=Y(this,"uint");var h=Y(this,"float",3*d);g=Y(this,"uint",3*c);var l=new Uint32Array(d),k=new Float32Array(9*c);b.g=e=new U(9*c);b.o=d=new U(9*c);var j;for(j=0;j>>8^d[(b^a[c])&255];for(f=e>>3;f--;c+=8)b=b>>>8^d[(b^a[c])&255],b=b>>>8^d[(b^a[c+1])&255],b=b>>>8^d[(b^a[c+2])&255],b=b>>>8^d[(b^a[c+3])&255],b=b>>>8^d[(b^a[c+4])&255],b=b>>>8^d[(b^a[c+5])&255],b=b>>>8^d[(b^a[c+6])&255],b=b>>>8^d[(b^a[c+7])&255];return(b^4294967295)>>>0}}; -Ue.vh=new Uint32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101, +Qe.prototype.wd=function(a,b){this.I=a;var c=0;if(b.nc!=t){e=b.nc;d=Y(this,"ushort",this.I.byteLength-2*e.xb);f=0;for(l=3;0>8,c+=String.fromCharCode(j),c+=String.fromCharCode(k),c=parseInt(c,10);e.xd.push(c);l--}else if(50==h){f++;g=d[f++];m="";for(h=0;h>8,m+=String.fromCharCode(j),m+=String.fromCharCode(k);e.Zg.push(m);l--}else if(4161==h){f++;g=d[f++];m="";for(h= +0;h>8,m+=String.fromCharCode(j),m+=String.fromCharCode(k);e.location.push(m);l--}e.Ea[2]++}else{var e={rows:0,cols:0,T:t,Ue:0,Xh:0,tb:1,Ri:1,Xk:t,ie:0,xb:0,pd:t,xf:0,Ef:[],data:t,min:Infinity,max:-Infinity,location:[],Zg:[],xd:[]};e.tb=b.q.length;e.tb==t&&(e.tb=1);for(var d=Y(this,"ushort",this.I.byteLength),f=66,g=t,h=t,g=t,l=9;0>8,m=m+String.fromCharCode(j),m=m+String.fromCharCode(k);m=m.split("\\");e.T=[parseFloat(m[0]),parseFloat(m[1]),Infinity];l--}else if(32==g)switch(h=d[f++],f++,g=d[f++],h){case 19:for(h=0;h>8,c+=String.fromCharCode(j),c+=String.fromCharCode(k),c=parseInt(c,10);l--;break;case 50:for(var m="",h=0;h>8,m+=String.fromCharCode(j),m+=String.fromCharCode(k);m=m.split("\\");e.origin=[parseFloat(m[0]),parseFloat(m[1]),parseFloat(m[2])];l--;break;case 55:m="";for(h=0;h>8,m+=String.fromCharCode(j),m+=String.fromCharCode(k);m=m.split("\\");e.Na=[parseFloat(m[0]),parseFloat(m[1]),parseFloat(m[2]),parseFloat(m[3]),parseFloat(m[4]),parseFloat(m[5])];l--}else if(16==g)switch(h=d[f++],f++,g=d[f++],h){case 8720:for(h=0;h=j);m++){var s=parseInt(k[m],10),r=c.get(s);e.add(r[0],r[1],r[2]);var z=s,y=r;"LINES"==this.Ia?(z=parseInt(k[m+1],10),y=c.get(z),e.add(y[0],y[1],y[2])):"TRIANGLE_STRIPS"==this.Ia&&(0==m||m==j-1)&&e.add(r[0],r[1],r[2]);sc&&10!=g);Y(this,"uchar");d=Y(this,"uint");c=Y(this,"uint");var h=Y(this,"float",3*d);g=Y(this,"uint",3*c);var l=new Uint32Array(d),k=new Float32Array(9*c);b.g=e=new U(9*c);b.o=d=new U(9*c);var j;for(j=0;j>>8^d[(b^a[c])&255];for(f=e>>3;f--;c+=8)b=b>>>8^d[(b^a[c])&255],b=b>>>8^d[(b^a[c+1])&255],b=b>>>8^d[(b^a[c+2])&255],b=b>>>8^d[(b^a[c+3])&255],b=b>>>8^d[(b^a[c+4])&255],b=b>>>8^d[(b^a[c+5])&255],b=b>>>8^d[(b^a[c+6])&255],b=b>>>8^d[(b^a[c+7])&255];return(b^4294967295)>>>0}}; +Ue.wh=new Uint32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101, 3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271, 366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376, 3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954, 1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836, -1088359270,936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);function Ve(a){var b=a.length,c=0,e=Number.POSITIVE_INFINITY,d,f,g,h,l,k,j,m,r;for(m=0;mc&&(c=a[m]),a[m]>=1;for(r=k;rc&&(c=a[m]),a[m]>=1;for(s=k;s>>=1;switch(a){case 0:var a=this.input,b=this.ta,c=this.Ja,e=this.aa,d=p,f=p,g=p,h=c.length,d=p;this.ib=this.md=0;d=a[b++];d===p&&n(Error("invalid uncompressed block header: LEN (first byte)"));f=d;d=a[b++];d===p&&n(Error("invalid uncompressed block header: LEN (second byte)"));f|=d<<8;d=a[b++];d===p&&n(Error("invalid uncompressed block header: NLEN (first byte)"));g=d;d=a[b++];d===p&&n(Error("invalid uncompressed block header: NLEN (second byte)"));g|= -d<<8;f===~g&&n(Error("invalid uncompressed block header: length verify"));b+f>a.length&&n(Error("input buffer is broken"));switch(this.We){case Ye:for(;e+f>c.length;)d=h-e,f-=d,c.set(a.subarray(b,b+d),e),e+=d,b+=d,this.aa=e,c=this.ic(),e=this.aa;break;case Xe:for(;e+f>c.length;)c=this.ic({xg:2});break;default:n(Error("invalid inflate mode"))}c.set(a.subarray(b,b+f),e);e+=f;this.ta=b+=f;this.aa=e;this.Ja=c;break;case 1:this.cf($e,af);break;case 2:bf(this);break;default:n(Error("unknown BTYPE: "+a))}}return this.rg()}; +We.prototype.qd=function(){for(;!this.pg;){var a=Ze(this,3);a&1&&(this.pg=q);a>>>=1;switch(a){case 0:var a=this.input,b=this.ta,c=this.Ka,e=this.aa,d=p,f=p,g=p,h=c.length,d=p;this.jb=this.nd=0;d=a[b++];d===p&&n(Error("invalid uncompressed block header: LEN (first byte)"));f=d;d=a[b++];d===p&&n(Error("invalid uncompressed block header: LEN (second byte)"));f|=d<<8;d=a[b++];d===p&&n(Error("invalid uncompressed block header: NLEN (first byte)"));g=d;d=a[b++];d===p&&n(Error("invalid uncompressed block header: NLEN (second byte)"));g|= +d<<8;f===~g&&n(Error("invalid uncompressed block header: length verify"));b+f>a.length&&n(Error("input buffer is broken"));switch(this.Xe){case Ye:for(;e+f>c.length;)d=h-e,f-=d,c.set(a.subarray(b,b+d),e),e+=d,b+=d,this.aa=e,c=this.ic(),e=this.aa;break;case Xe:for(;e+f>c.length;)c=this.ic({yg:2});break;default:n(Error("invalid inflate mode"))}c.set(a.subarray(b,b+f),e);e+=f;this.ta=b+=f;this.aa=e;this.Ka=c;break;case 1:this.df($e,af);break;case 2:bf(this);break;default:n(Error("unknown BTYPE: "+a))}}return this.sg()}; var cf=new Uint16Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),df=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258]),ef=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0]),ff=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577]),gf=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),hf=new Uint8Array(288), -jf,kf;jf=0;for(kf=hf.length;jf=jf?8:255>=jf?9:279>=jf?7:8;var $e=Ve(hf),lf=new Uint8Array(30),mf,nf;mf=0;for(nf=lf.length;mf>>b;a.ib=e-b;a.ta=f;return g} -function of(a,b){for(var c=a.md,e=a.ib,d=a.input,f=a.ta,g=b[0],h=b[1],l;e>>16;a.md=c>>g;a.ib=e-g;a.ta=f;return d&65535} -function bf(a){function b(a,b,c){var d,e,f;for(f=0;ff)e>=d&&(this.aa=e,c=this.ic(),e=this.aa),c[e++]=f;else{f-=257;h=df[f];0=d&&(this.aa=e,c=this.ic(),e=this.aa);for(;h--;)c[e]=c[e++-g]}for(;8<=this.ib;)this.ib-=8,this.ta--;this.aa=e}; -w.ci=function(a,b){var c=this.Ja,e=this.aa;this.ug=a;for(var d=c.length,f,g,h;256!==(f=of(this,a));)if(256>f)e>=d&&(c=this.ic(),d=c.length),c[e++]=f;else{f-=257;h=df[f];0d&&(c=this.ic(),d=c.length);for(;h--;)c[e]=c[e++-g]}for(;8<=this.ib;)this.ib-=8,this.ta--;this.aa=e}; -w.ic=function(){var a=new Uint8Array(this.aa-32768),b=this.aa-32768,c=this.Ja;a.set(c.subarray(32768,a.length));this.Ue.push(a);this.Hf+=a.length;c.set(c.subarray(b,b+32768));this.aa=32768;return c};w.ii=function(a){var b=this.input.length/this.ta+1|0,c=this.input,e=this.Ja;a&&("number"===typeof a.xg&&(b=a.xg),"number"===typeof a.Sh&&(b+=a.Sh));2>b?(a=(c.length-this.ta)/this.ug[2],a=258*(a/2)|0,a=apf;++pf)for(var qf=pf,rf=7,qf=qf>>>1;qf;qf>>>=1)--rf;var sf=[],tf;for(tf=0;288>tf;tf++)switch(q){case 143>=tf:sf.push([tf+48,8]);break;case 255>=tf:sf.push([tf-144+400,9]);break;case 279>=tf:sf.push([tf-256+0,7]);break;case 287>=tf:sf.push([tf-280+192,8]);break;default:n("invalid literal: "+tf)} +jf,kf;jf=0;for(kf=hf.length;jf=jf?8:255>=jf?9:279>=jf?7:8;var $e=Ve(hf),lf=new Uint8Array(30),mf,nf;mf=0;for(nf=lf.length;mf>>b;a.jb=e-b;a.ta=f;return g} +function of(a,b){for(var c=a.nd,e=a.jb,d=a.input,f=a.ta,g=b[0],h=b[1],l;e>>16;a.nd=c>>g;a.jb=e-g;a.ta=f;return d&65535} +function bf(a){function b(a,b,c){var d,e,f;for(f=0;ff)e>=d&&(this.aa=e,c=this.ic(),e=this.aa),c[e++]=f;else{f-=257;h=df[f];0=d&&(this.aa=e,c=this.ic(),e=this.aa);for(;h--;)c[e]=c[e++-g]}for(;8<=this.jb;)this.jb-=8,this.ta--;this.aa=e}; +w.di=function(a,b){var c=this.Ka,e=this.aa;this.vg=a;for(var d=c.length,f,g,h;256!==(f=of(this,a));)if(256>f)e>=d&&(c=this.ic(),d=c.length),c[e++]=f;else{f-=257;h=df[f];0d&&(c=this.ic(),d=c.length);for(;h--;)c[e]=c[e++-g]}for(;8<=this.jb;)this.jb-=8,this.ta--;this.aa=e}; +w.ic=function(){var a=new Uint8Array(this.aa-32768),b=this.aa-32768,c=this.Ka;a.set(c.subarray(32768,a.length));this.Ve.push(a);this.If+=a.length;c.set(c.subarray(b,b+32768));this.aa=32768;return c};w.ji=function(a){var b=this.input.length/this.ta+1|0,c=this.input,e=this.Ka;a&&("number"===typeof a.yg&&(b=a.yg),"number"===typeof a.Th&&(b+=a.Th));2>b?(a=(c.length-this.ta)/this.vg[2],a=258*(a/2)|0,a=apf;++pf)for(var qf=pf,rf=7,qf=qf>>>1;qf;qf>>>=1)--rf;var sf=[],tf;for(tf=0;288>tf;tf++)switch(q){case 143>=tf:sf.push([tf+48,8]);break;case 255>=tf:sf.push([tf-144+400,9]);break;case 279>=tf:sf.push([tf-256+0,7]);break;case 287>=tf:sf.push([tf-280+192,8]);break;default:n("invalid literal: "+tf)} function uf(){var a=vf;switch(q){case 3===a:return[257,a-3,0];case 4===a:return[258,a-4,0];case 5===a:return[259,a-5,0];case 6===a:return[260,a-6,0];case 7===a:return[261,a-7,0];case 8===a:return[262,a-8,0];case 9===a:return[263,a-9,0];case 10===a:return[264,a-10,0];case 12>=a:return[265,a-11,1];case 14>=a:return[266,a-13,1];case 16>=a:return[267,a-15,1];case 18>=a:return[268,a-17,1];case 22>=a:return[269,a-19,2];case 26>=a:return[270,a-23,2];case 30>=a:return[271,a-27,2];case 34>=a:return[272,a- 31,2];case 42>=a:return[273,a-35,3];case 50>=a:return[274,a-43,3];case 58>=a:return[275,a-51,3];case 66>=a:return[276,a-59,3];case 82>=a:return[277,a-67,4];case 98>=a:return[278,a-83,4];case 114>=a:return[279,a-99,4];case 130>=a:return[280,a-115,4];case 162>=a:return[281,a-131,5];case 194>=a:return[282,a-163,5];case 226>=a:return[283,a-195,5];case 257>=a:return[284,a-227,5];case 258===a:return[285,a-258,0];default:n("invalid length: "+a)}}var wf=[],vf,xf; for(vf=3;258>=vf;vf++)xf=uf(),wf[vf]=xf[2]<<24|xf[1]<<16|xf[0];new Uint32Array(wf);function yf(){};function zf(a){this.input=a;this.ta=0;this.member=[]} -zf.prototype.pd=function(){for(var a=this.input.length;this.ta>>0;Ue.Xe(d)!==c&&n(Error("invalid CRC-32 checksum: 0x"+Ue.Xe(d).toString(16)+ -" / 0x"+c.toString(16)));b.Wk=c=(h[e++]|h[e++]<<8|h[e++]<<16|h[e++]<<24)>>>0;(d.length&4294967295)!==c&&n(Error("invalid input size: "+(d.length&4294967295)+" / "+c));this.member.push(b);this.ta=e}a=this.member;b=d=e=0;for(h=a.length;bk;++k)d[k]=e.Va[3][k]-(f[k+0]*c[0]*g+ -f[k+4]*c[1]*h+f[k+8]*c[2]*l);g=d[1];h=d[2];f[12]=d[0];f[13]=g;f[14]=h;f[15]=1;e.Hb=f;e.Ib=Nc();Wc(e.Hb,e.Ib);g=Mc(0,0,0,1);d=Lc();Yc(f,g,d);g=Mc(c[0],c[1],c[2],1);c=Lc();Yc(f,g,c);f=Kd(f,[0,b.L[0],b.L[1],b.L[2]]);e.Cd=[c[0]-d[0],c[1]-d[1],c[2]-d[2]];e.Ad=[f[1]-f[0],f[3]-f[2],f[5]-f[4]];e.Bd=[f[0],f[2],f[4]];b.gc(e);E.Qa(this.f+".parse");b.Lb=Pd(this,b);e=new gd;e.R=b;e.w=a;this.dispatchEvent(e)}; -Af.prototype.vd=function(a){this.I=a;a={version:0,yh:0,wh:0,oi:0,xh:0,lf:0,mf:0,nf:0,Pi:0,type:0,gi:0,hh:0,Uj:t,Va:t,rh:t,data:t,min:Infinity,max:-Infinity};a.version=Y(this,"uint");a.lf=Y(this,"uint");a.mf=Y(this,"uint");a.nf=Y(this,"uint");a.Pi=Y(this,"uint");a.type=Y(this,"uint");a.gi=Y(this,"uint");a.hh=Y(this,"ushort");if(0y)y=J;if(!D||WF)F=aa;if(!e||Zd)d=ba;j.push(K);m.push(R)}g=(z+y)/2;D=(D+F)/2;h=(e+d)/2;F=new Float32Array(f);b.g=e=new U(f);b.o=d=new U(f);b.ga=f=new U(f);for(k=z=0;k>>0;Ue.Ye(d)!==c&&n(Error("invalid CRC-32 checksum: 0x"+Ue.Ye(d).toString(16)+ +" / 0x"+c.toString(16)));b.Wk=c=(h[e++]|h[e++]<<8|h[e++]<<16|h[e++]<<24)>>>0;(d.length&4294967295)!==c&&n(Error("invalid input size: "+(d.length&4294967295)+" / "+c));this.member.push(b);this.ta=e}a=this.member;b=d=e=0;for(h=a.length;bk;++k)d[k]=e.Wa[3][k]-(f[k+0]*c[0]*g+ +f[k+4]*c[1]*h+f[k+8]*c[2]*l);g=d[1];h=d[2];f[12]=d[0];f[13]=g;f[14]=h;f[15]=1;e.Hb=f;e.Ib=Nc();Wc(e.Hb,e.Ib);g=Mc(0,0,0,1);d=Lc();Yc(f,g,d);g=Mc(c[0],c[1],c[2],1);c=Lc();Yc(f,g,c);f=Kd(f,[0,b.L[0],b.L[1],b.L[2]]);e.Dd=[c[0]-d[0],c[1]-d[1],c[2]-d[2]];e.Bd=[f[1]-f[0],f[3]-f[2],f[5]-f[4]];e.Cd=[f[0],f[2],f[4]];b.gc(e);E.Ra(this.f+".parse");b.Lb=Pd(this,b);e=new gd;e.R=b;e.w=a;this.dispatchEvent(e)}; +Af.prototype.wd=function(a){this.I=a;a={version:0,zh:0,xh:0,pi:0,yh:0,mf:0,nf:0,of:0,Qi:0,type:0,hi:0,ih:0,Vj:t,Wa:t,sh:t,data:t,min:Infinity,max:-Infinity};a.version=Y(this,"uint");a.mf=Y(this,"uint");a.nf=Y(this,"uint");a.of=Y(this,"uint");a.Qi=Y(this,"uint");a.type=Y(this,"uint");a.hi=Y(this,"uint");a.ih=Y(this,"ushort");if(0y)y=J;if(!D||WF)F=aa;if(!e||Zd)d=ba;j.push(K);m.push(R)}g=(z+y)/2;D=(D+F)/2;h=(e+d)/2;F=new Float32Array(f);b.g=e=new U(f);b.o=d=new U(f);b.ga=f=new U(f);for(k=z=0;k=j;j++)e.push(!isNaN(this.Ff[j])?this.Y[j].scale(this.Ff[j]):p)}f=c.subarray(f);if("gzip"==this.encoding||"gz"==this.encoding)f=(new zf(new Uint8Array(f))).pd();f=f.buffer;c={data:t,min:Infinity,max:-Infinity};c.data=new this.Jb(f);f=Id(c.data);d=c.min=f[0];g=c.max=f[1];b.bb=b.ea=d;b.ha=b.da=g;b.L=[this.Bf[0],this.Bf[1],this.Bf[2]];f=(new T(this.Y[0][0],this.Y[0][1], -this.Y[0][2])).Db();j=(new T(this.Y[1][0],this.Y[1][1],this.Y[1][2])).Db();e=(new T(this.Y[2][0],this.Y[2][1],this.Y[2][2])).Db();b.hd=[f,j,e];-Infinity==b.ba&&(b.ba=d);Infinity==b.ca&&(b.ca=g);h=g=1;"left-posterior-superior"==this.kh&&(h=g=-1);d=Oc();Sc(d,0,g*this.Y[0][0],g*this.Y[1][0],g*this.Y[2][0],g*this.Ef[0]);Sc(d,1,h*this.Y[0][1],h*this.Y[1][1],h*this.Y[2][1],h*this.Ef[1]);Sc(d,2,1*this.Y[0][2],1*this.Y[1][2],1*this.Y[2][2],1*this.Ef[2]);Sc(d,3,0,0,0,1);c.Hb=d;c.Ib=Nc();Wc(c.Hb,c.Ib);h=Mc(0, -0,0,1);g=Lc();Yc(d,h,g);j=Mc(f,j,e,1);f=Lc();Yc(d,j,f);j=Kd(d,[0,b.L[0],b.L[1],b.L[2]]);c.Cd=[f[0]-g[0],f[1]-g[1],f[2]-g[2]];c.Ad=[j[1]-j[0],j[3]-j[2],j[5]-j[4]];c.Bd=[j[0],j[2],j[4]];b.gc(c);E.Qa(this.f+".parse");b.Lb=Pd(this,b);c=new gd;c.R=b;c.w=a;this.dispatchEvent(c)}; -Ff.prototype.ki={type:function(a){switch(a){case "uchar":case "unsigned char":case "uint8":case "uint8_t":this.Jb=Uint8Array;break;case "signed char":case "int8":case "int8_t":this.Jb=Int8Array;break;case "short":case "short int":case "signed short":case "signed short int":case "int16":case "int16_t":this.Jb=Int16Array;break;case "ushort":case "unsigned short":case "unsigned short int":case "uint16":case "uint16_t":this.Jb=Uint16Array;break;case "int":case "signed int":case "int32":case "int32_t":this.Jb= -Int32Array;break;case "uint":case "unsigned int":case "uint32":case "uint32_t":this.Jb=Uint32Array;break;case "float":this.Jb=Float32Array;break;case "double":this.Jb=Float64Array;break;default:n(Error("Unsupported NRRD data type: "+a))}return this.type=a},endian:function(a){return this.Uk=a},encoding:function(a){return this.encoding=a},dimension:function(a){return this.Da=parseInt(a,10)},sizes:function(a){var b,c,e,d;e=a.split(/\s+/);d=[];b=0;for(c=e.length;bd?(d= -1/Math.sqrt(f*f+g*g+h*h),f*=d,g*=d,h*=d,d=0):d=Math.sqrt(d);0c.T[0]&&(j=-j);Sc(e,0,(d*d+f*f-g*g-h*h)*l,2*(f*g-d*h)*k,2*(f*h+d*g)*j,m);Sc(e,1,2*(f*g+d*h)*l,(d*d+g*g-f*f-h*h)*k,2*(g*h-d*f)*j,r);Sc(e,2,2*(f*h-d*g)*l,2*(g*h+d*f)*k,(d*d+h*h-g*g-f*f)*j,s)}else 0a.Ic;b.Xa=q;this.dispatchEvent(b)};function Tf(a){P.call(this);this.f="array";this.A=[];this.Qf=a}C(Tf,P);function Uf(a,b,c){for(var e=0;4>e;e++)if(a[e+0]!==b[e+c])return u;return q}Tf.prototype.add=function(a){this.A.push(a);return q};Tf.prototype.remove=function(a){a=this.A.indexOf(a);-1e)){e=b+Math.floor(e/2);Vf(a,b,e);for(Vf(a,e,c);bf.Qf(f.A[g+1],d);){var l=f,k=g+1,j=l.A[g];l.A[g]=l.A[k];l.A[k]=j;++g}f.A[g]=d}}}Tf.prototype.sort=function(){Vf(this,0,this.A.length)};function Wf(a,b){Mf.call(this,a,b);this.f="camera2D"}C(Wf,Mf);Wf.prototype.rotate=function(a){a=Wf.u.rotate.call(this,a);var b=new yd;0a.x&&b.Re++;0a.y&&b.De--;this.dispatchEvent(b)};Wf.prototype.Mf=function(a){var b=20;a!=t&&!a&&(b=0.02);this.m[14]+=b};Wf.prototype.Nf=function(a){var b=20;a!=t&&!a&&(b=0.02);this.m[14]-=b}; -Wf.prototype.tf=function(a){ka(a)&&2==a.length?a=new E.l(a[0],a[1],0):a instanceof E.l||n(Error("Invalid distance vector for pan operation."));this.m[12]-=a.x/this.m[14];this.m[13]+=a.y/this.m[14]};function Xf(a,b){Mf.call(this,a,b);this.f="camera3D";this.Tf=45;this.Je=E.e.jf(E.e.rd(),this.Tf,a/b,1,1E4)}C(Xf,Mf);Xf.prototype.rotate=function(a){a=Xf.u.rotate.call(this,a);var b=-a.x/5*Math.PI/180;a=-a.y/5*Math.PI/180;var c=new E.l(this.m[1],this.m[5],this.m[9]),e=new E.l(this.m[0],this.m[4],this.m[8]);c.normalize();e.normalize();E.e.rotate(this.m,b,c.x,c.y,c.d);E.e.rotate(this.m,a,e.x,e.y,e.d)};Xf.prototype.je=function(a,b){var c=Xf.u.je.call(this,a,b);E.e.Lg(c,a,b,this.W);return c}; -function Yf(a,b,c,e){var d=new Float32Array(4),f=new Float32Array(4),g=new Float32Array(16),h=new Float32Array(16);new Float32Array(16);E.e.multiply(a.Je,a.m,h);E.e.N(h,g);d[0]=b;d[1]=c;d[2]=2*e-1;d[3]=1;E.e.Pg(g,d,f);f[3]=1/f[3];f[0]*=f[3];f[1]*=f[3];f[2]*=f[3];return f}B("X.camera3D",Xf);function Zf(a){Kb.call(this);this.Cb=a;this.J=[]}C(Zf,Kb);var $f=[];function ag(a,b,c,e,d){ka(c)||($f[0]=c,c=$f);for(var f=0;fthis.kf?this.kf-this.vg:aqb&&M(this.r(),"resize",this.ue,u,this);this.ue();var a=this.r();a.setAttribute("role","progressbar");a.setAttribute("aria-live","polite")};w.Yd=function(){gg.u.Yd.call(this);I&&7>qb&&Wb(this.r(),"resize",this.ue,u,this)};w.de=function(){return this.xd.de()};w.re=function(a){this.xd.re(a);this.r()&&jg(this)};function jg(a){var b=a.de();a.r().setAttribute("aria-valuenow",b)}w.ce=function(){return this.xd.ce()};w.be=function(){return this.xd.be()};w.Xg="horizontal"; -w.ti=function(){this.ue();this.dispatchEvent("change")};w.ue=function(){if(this.ub){var a=this.ce(),b=this.be(),a=(this.de()-a)/(b-a),b=Math.round(100*a);"vertical"==this.Xg?I&&7>qb?(this.ub.style.top=0,this.ub.style.height="100%",b=this.ub.offsetHeight,a=Math.round(a*b),this.ub.style.top=b-a+"px",this.ub.style.height=a+"px"):(this.ub.style.top=100-b+"%",this.ub.style.height=b+"%"):this.ub.style.width=b+"%"}};function kg(a,b){a==t&&n(Error("No valid parent element."));b==t&&n(Error("Invalid initial value."));gg.call(this);this.f="progressbar";this.Ta=a;this.Ie="";this.Ed=this.zb=t;this.$b=[];var c;c=".progress-bar-horizontal {\n position: relative;\n border: 1px solid #949dad;\n";c+=" background: white;\n";c+=" padding: 1px;\n";c+=" overflow: hidden;\n";c+=" margin: 2px;\n";c+=" width: 100px;\n";c+=" height: 5px;\n";c+="}";var e;e=".progress-bar-thumb {\n position: relative;\n background: #F62217;\n"; -e+=" overflow: hidden;\n";e+=" width: 0%;\n";e+=" height: 100%;\n";e+="}";var d;d=".progress-bar-thumb-done {\n background: #57E964;\n}";this.$b=[c,e,d];this.re(b);this.ff()}C(kg,gg); -kg.prototype.ff=function(){var a=le(this.Ta,"position");if("static"==a||""==a)this.Ie=this.Ta.style.position,this.Ta.style.position="relative";var a=document.getElementsByTagName("head")[0],b=ee("style");b.type="text/css";b.media="screen";var c=document.createTextNode(String(this.$b[0])),e=document.createTextNode(String(this.$b[1])),d=document.createTextNode(String(this.$b[2]));a.appendChild(b);b.appendChild(c);b.appendChild(e);b.appendChild(d);this.zb=b;this.mc(this.Ta);a=this.r();a.style.position= -"absolute";a.style.top=(this.Ta.clientHeight-5)/2+"px";a.style.left=(this.Ta.clientWidth-100)/2+"px";a.classList.add("xtk-progress-bar")};function lg(a){var b=a.r().style.top,c=a.r().style.left;ge(a.r());var e=new kg(a.Ta,100),d=e.r();d.style.position="absolute";d.style.top=b;d.style.left=c;d.classList.add("xtk-progress-bar");(d.firstElementChild!=p?d.firstElementChild:he(d.firstChild)).classList.add("progress-bar-thumb-done");a.Ed=e} -kg.prototype.fe=function(){this.zb&&ge(this.zb);this.r()&&ge(this.r());this.Ed&&ge(this.Ed.r());this.Ed=this.zb=t;this.Ie&&(this.Ta.style.position=this.Ie)};function mg(a,b,c){na(a)?c&&(a=ua(a,c)):a&&"function"==typeof a.handleEvent?a=ua(a.handleEvent,a):n(Error("Invalid listener argument"));return 2147483647..) is required."));var b=a;ma(b)&&(b=ce(a));oa(b)&&1==b.nodeType||n(Error("Could not find the given container."));this.w=b});w=ng.prototype; -w.yd=function(){this.D.reset()}; +Ff.prototype.parse=function(a,b,c){E.Xa(this.f+".parse");this.I=c;c=Y(this,"uchar",c.byteLength);var e=c.length,d=t,f=0,g;for(g=1;g=j;j++)e.push(!isNaN(this.Gf[j])?this.Y[j].scale(this.Gf[j]):p)}f=c.subarray(f);if("gzip"==this.encoding||"gz"==this.encoding)f=(new zf(new Uint8Array(f))).qd();f=f.buffer;c={data:t,min:Infinity,max:-Infinity};c.data=new this.Jb(f);f=Id(c.data);d=c.min=f[0];g=c.max=f[1];b.cb=b.ea=d;b.ha=b.da=g;b.L=[this.Cf[0],this.Cf[1],this.Cf[2]];f=(new T(this.Y[0][0],this.Y[0][1], +this.Y[0][2])).Db();j=(new T(this.Y[1][0],this.Y[1][1],this.Y[1][2])).Db();e=(new T(this.Y[2][0],this.Y[2][1],this.Y[2][2])).Db();b.jd=[f,j,e];-Infinity==b.ba&&(b.ba=d);Infinity==b.ca&&(b.ca=g);h=g=1;"left-posterior-superior"==this.lh&&(h=g=-1);d=Oc();Sc(d,0,g*this.Y[0][0],g*this.Y[1][0],g*this.Y[2][0],g*this.Ff[0]);Sc(d,1,h*this.Y[0][1],h*this.Y[1][1],h*this.Y[2][1],h*this.Ff[1]);Sc(d,2,1*this.Y[0][2],1*this.Y[1][2],1*this.Y[2][2],1*this.Ff[2]);Sc(d,3,0,0,0,1);c.Hb=d;c.Ib=Nc();Wc(c.Hb,c.Ib);h=Mc(0, +0,0,1);g=Lc();Yc(d,h,g);j=Mc(f,j,e,1);f=Lc();Yc(d,j,f);j=Kd(d,[0,b.L[0],b.L[1],b.L[2]]);c.Dd=[f[0]-g[0],f[1]-g[1],f[2]-g[2]];c.Bd=[j[1]-j[0],j[3]-j[2],j[5]-j[4]];c.Cd=[j[0],j[2],j[4]];b.gc(c);E.Ra(this.f+".parse");b.Lb=Pd(this,b);c=new gd;c.R=b;c.w=a;this.dispatchEvent(c)}; +Ff.prototype.li={type:function(a){switch(a){case "uchar":case "unsigned char":case "uint8":case "uint8_t":this.Jb=Uint8Array;break;case "signed char":case "int8":case "int8_t":this.Jb=Int8Array;break;case "short":case "short int":case "signed short":case "signed short int":case "int16":case "int16_t":this.Jb=Int16Array;break;case "ushort":case "unsigned short":case "unsigned short int":case "uint16":case "uint16_t":this.Jb=Uint16Array;break;case "int":case "signed int":case "int32":case "int32_t":this.Jb= +Int32Array;break;case "uint":case "unsigned int":case "uint32":case "uint32_t":this.Jb=Uint32Array;break;case "float":this.Jb=Float32Array;break;case "double":this.Jb=Float64Array;break;default:n(Error("Unsupported NRRD data type: "+a))}return this.type=a},endian:function(a){return this.Uk=a},encoding:function(a){return this.encoding=a},dimension:function(a){return this.Ea=parseInt(a,10)},sizes:function(a){var b,c,e,d;e=a.split(/\s+/);d=[];b=0;for(c=e.length;bd?(d= +1/Math.sqrt(f*f+g*g+h*h),f*=d,g*=d,h*=d,d=0):d=Math.sqrt(d);0c.T[0]&&(j=-j);Sc(e,0,(d*d+f*f-g*g-h*h)*l,2*(f*g-d*h)*k,2*(f*h+d*g)*j,m);Sc(e,1,2*(f*g+d*h)*l,(d*d+g*g-f*f-h*h)*k,2*(g*h-d*f)*j,s);Sc(e,2,2*(f*h-d*g)*l,2*(g*h+d*f)*k,(d*d+h*h-g*g-f*f)*j,r)}else 0a.Jc;b.Ya=q;this.dispatchEvent(b)};function Tf(a){P.call(this);this.f="array";this.A=[];this.Rf=a}C(Tf,P);function Uf(a,b,c){for(var e=0;4>e;e++)if(a[e+0]!==b[e+c])return u;return q}Tf.prototype.add=function(a){this.A.push(a);return q};Tf.prototype.remove=function(a){a=this.A.indexOf(a);-1e)){e=b+Math.floor(e/2);Vf(a,b,e);for(Vf(a,e,c);bf.Rf(f.A[g+1],d);){var l=f,k=g+1,j=l.A[g];l.A[g]=l.A[k];l.A[k]=j;++g}f.A[g]=d}}}Tf.prototype.sort=function(){Vf(this,0,this.A.length)};function Wf(a,b){Mf.call(this,a,b);this.f="camera2D"}C(Wf,Mf);Wf.prototype.rotate=function(a){a=Wf.u.rotate.call(this,a);var b=new yd;0a.x&&b.Se++;0a.y&&b.Ee--;this.dispatchEvent(b)};Wf.prototype.Nf=function(a){var b=20;a!=t&&!a&&(b=0.02);this.m[14]+=b};Wf.prototype.Of=function(a){var b=20;a!=t&&!a&&(b=0.02);this.m[14]-=b}; +Wf.prototype.uf=function(a){ka(a)&&2==a.length?a=new E.l(a[0],a[1],0):a instanceof E.l||n(Error("Invalid distance vector for pan operation."));this.m[12]-=a.x/this.m[14];this.m[13]+=a.y/this.m[14]};function Xf(a,b){Mf.call(this,a,b);this.f="camera3D";this.Uf=45;this.Ke=E.e.kf(E.e.sd(),this.Uf,a/b,1,1E4)}C(Xf,Mf);Xf.prototype.rotate=function(a){a=Xf.u.rotate.call(this,a);var b=-a.x/5*Math.PI/180;a=-a.y/5*Math.PI/180;var c=new E.l(this.m[1],this.m[5],this.m[9]),e=new E.l(this.m[0],this.m[4],this.m[8]);c.normalize();e.normalize();E.e.rotate(this.m,b,c.x,c.y,c.d);E.e.rotate(this.m,a,e.x,e.y,e.d)};Xf.prototype.ke=function(a,b){var c=Xf.u.ke.call(this,a,b);E.e.Mg(c,a,b,this.W);return c}; +function Yf(a,b,c,e){var d=new Float32Array(4),f=new Float32Array(4),g=new Float32Array(16),h=new Float32Array(16);new Float32Array(16);E.e.multiply(a.Ke,a.m,h);E.e.N(h,g);d[0]=b;d[1]=c;d[2]=2*e-1;d[3]=1;E.e.Qg(g,d,f);f[3]=1/f[3];f[0]*=f[3];f[1]*=f[3];f[2]*=f[3];return f}B("X.camera3D",Xf);function Zf(a){Kb.call(this);this.Cb=a;this.J=[]}C(Zf,Kb);var $f=[];function ag(a,b,c,e,d){ka(c)||($f[0]=c,c=$f);for(var f=0;fthis.lf?this.lf-this.wg:aqb&&M(this.r(),"resize",this.ve,u,this);this.ve();var a=this.r();a.setAttribute("role","progressbar");a.setAttribute("aria-live","polite")};w.Zd=function(){gg.u.Zd.call(this);I&&7>qb&&Wb(this.r(),"resize",this.ve,u,this)};w.ee=function(){return this.yd.ee()};w.se=function(a){this.yd.se(a);this.r()&&jg(this)};function jg(a){var b=a.ee();a.r().setAttribute("aria-valuenow",b)}w.de=function(){return this.yd.de()};w.ce=function(){return this.yd.ce()};w.Yg="horizontal"; +w.ui=function(){this.ve();this.dispatchEvent("change")};w.ve=function(){if(this.vb){var a=this.de(),b=this.ce(),a=(this.ee()-a)/(b-a),b=Math.round(100*a);"vertical"==this.Yg?I&&7>qb?(this.vb.style.top=0,this.vb.style.height="100%",b=this.vb.offsetHeight,a=Math.round(a*b),this.vb.style.top=b-a+"px",this.vb.style.height=a+"px"):(this.vb.style.top=100-b+"%",this.vb.style.height=b+"%"):this.vb.style.width=b+"%"}};function kg(a,b){a==t&&n(Error("No valid parent element."));b==t&&n(Error("Invalid initial value."));gg.call(this);this.f="progressbar";this.Ua=a;this.Je="";this.Fd=this.Ab=t;this.$b=[];var c;c=".progress-bar-horizontal {\n position: relative;\n border: 1px solid #949dad;\n";c+=" background: white;\n";c+=" padding: 1px;\n";c+=" overflow: hidden;\n";c+=" margin: 2px;\n";c+=" width: 100px;\n";c+=" height: 5px;\n";c+="}";var e;e=".progress-bar-thumb {\n position: relative;\n background: #F62217;\n"; +e+=" overflow: hidden;\n";e+=" width: 0%;\n";e+=" height: 100%;\n";e+="}";var d;d=".progress-bar-thumb-done {\n background: #57E964;\n}";this.$b=[c,e,d];this.se(b);this.gf()}C(kg,gg); +kg.prototype.gf=function(){var a=le(this.Ua,"position");if("static"==a||""==a)this.Je=this.Ua.style.position,this.Ua.style.position="relative";var a=document.getElementsByTagName("head")[0],b=ee("style");b.type="text/css";b.media="screen";var c=document.createTextNode(String(this.$b[0])),e=document.createTextNode(String(this.$b[1])),d=document.createTextNode(String(this.$b[2]));a.appendChild(b);b.appendChild(c);b.appendChild(e);b.appendChild(d);this.Ab=b;this.mc(this.Ua);a=this.r();a.style.position= +"absolute";a.style.top=(this.Ua.clientHeight-5)/2+"px";a.style.left=(this.Ua.clientWidth-100)/2+"px";a.classList.add("xtk-progress-bar")};function lg(a){var b=a.r().style.top,c=a.r().style.left;ge(a.r());var e=new kg(a.Ua,100),d=e.r();d.style.position="absolute";d.style.top=b;d.style.left=c;d.classList.add("xtk-progress-bar");(d.firstElementChild!=p?d.firstElementChild:he(d.firstChild)).classList.add("progress-bar-thumb-done");a.Fd=e} +kg.prototype.ge=function(){this.Ab&&ge(this.Ab);this.r()&&ge(this.r());this.Fd&&ge(this.Fd.r());this.Fd=this.Ab=t;this.Je&&(this.Ua.style.position=this.Je)};function mg(a,b,c){na(a)?c&&(a=ua(a,c)):a&&"function"==typeof a.handleEvent?a=ua(a.handleEvent,a):n(Error("Invalid listener argument"));return 2147483647..) is required."));var b=a;ma(b)&&(b=ce(a));oa(b)&&1==b.nodeType||n(Error("Could not find the given container."));this.w=b});w=ng.prototype; +w.zd=function(){this.D.reset()}; w.sa=function(a){var b=ee("canvas");this.w.appendChild(b);this.C=this.w.clientWidth;this.t=this.w.clientHeight;b.width=this.C;b.height=this.t;try{var c=b.getContext(a);c||n(Error())}catch(e){var d="Sorry, "+a+' context is not supported on this machine! See http://crash.goXTK.com for requirements..';this.w.innerHTML='

Oooops..

'+d+"

"; -n(Error(d))}this.Q=new If;M(this.Q,vd,this.cj.bind(this));this.ma=b;this.a=c;b=new Ke(this.ma);"2d"==a&&(b=new Me(this.ma));b.sa();M(b,rd,this.yd.bind(this));M(b,wd,this.qf.bind(this));M(b,qd,this.sf.bind(this));this.M=b;b=new Xf(this.C,this.t);"2d"==a&&(b=new Wf(this.C,this.t));b.observe(this.M);this.D=b;M(window,"resize",this.rf,u,this)};w.add=function(a){(a instanceof Sf||a instanceof Qf||a instanceof Of)&&a.p();this.gb.push(a);this.vb(a)}; -w.remove=function(a){(!this.ma||!this.a)&&n(Error("The renderer was not initialized properly."));if(a!=t){var b=0;if(a!=t){if(a=pa(a),Rb[a]){a=Rb[a];for(var c=a.length-1;0<=c;c--)Xb(a[c].key),b++}}else La(Pb,function(a,c){Xb(c);b++})}return u};w.vb=function(a){(!this.ma||!this.a)&&n(Error("The renderer was not initialized properly."));a!=t&&(Zb(a,td)||M(a,td,this.Ti.bind(this)),Zb(a,ud)||M(a,ud,this.dj.bind(this)))}; -w.get=function(a){a==t&&n(Error("Invalid object id."));for(var b=this.rb.A,c=b.length,e=0,e=0;e=d.right))f&=-2;if(132==(f&132)&&(h.y=d.bottom))f&=-5;h.xd.right&&f&16)&&(g.width=Math.max(g.width-(h.x+g.width-d.right),0),e|=4);h.x+g.width>d.right&&f&1&&(h.x=Math.max(d.right-g.width, d.left),e|=1);f&2&&(e|=(h.xd.right?32:0));h.y=d.top&&(h.y+g.height>d.bottom&&f&32)&&(g.height=Math.max(g.height-(h.y+g.height-d.bottom),0),e|=8);h.y+g.height>d.bottom&&f&4&&(h.y=Math.max(d.bottom-g.height,d.top),e|=2);f&8&&(e|=(h.yd.bottom?128:0));h=e}else h=256;if(h&496)return h}f=a;d=jb&&($a||ob)&&xb("1.9");f instanceof Rd?(a=f.x,f=f.y):(a=f,f=p);b.style.left=ve(a,d);b.style.top=ve(f,d);if(!(c==g||(!c||!g?0:c.width==g.width&&c.height==g.height)))a=je($d(be(b))),I&&(!a||!xb("8"))?(c=b.style,a?(I?(a=Ae(b,"paddingLeft"),d=Ae(b,"paddingRight"),f=Ae(b,"paddingTop"),e=Ae(b,"paddingBottom"),a=new Td(f,d,e,a)):(a=le(b,"paddingLeft"),d=le(b,"paddingRight"),f=le(b,"paddingTop"),e=le(b,"paddingBottom"),a=new Td(parseFloat(f),parseFloat(d),parseFloat(e),parseFloat(a))),I?(d=Ce(b,"borderLeft"),f=Ce(b,"borderRight"),e=Ce(b,"borderTop"), b=Ce(b,"borderBottom"),b=new Td(e,f,b,d)):(d=le(b,"borderLeftWidth"),f=le(b,"borderRightWidth"),e=le(b,"borderTopWidth"),b=le(b,"borderBottomWidth"),b=new Td(parseFloat(e),parseFloat(f),parseFloat(b),parseFloat(d))),c.pixelWidth=g.width-b.left-a.left-a.right-b.right,c.pixelHeight=g.height-b.top-a.top-a.bottom-b.bottom):(c.pixelWidth=g.width,c.pixelHeight=g.height)):(b=b.style,jb?b.MozBoxSizing="border-box":kb?b.WebkitBoxSizing="border-box":b.boxSizing="border-box",b.width=Math.max(g.width,0)+"px", -b.height=Math.max(g.height,0)+"px");return h};function ug(){}ug.prototype.kb=da();function vg(a,b){this.$e=a instanceof Rd?a:new Rd(a,b)}C(vg,ug);vg.prototype.kb=function(a,b,c,e){sg(ne(a),0,a,b,this.$e,c,t,e)};function wg(a,b,c){this.element=a;this.tg=b;this.rj=c}C(wg,ug);wg.prototype.kb=function(a,b,c){sg(this.element,this.tg,a,b,p,c,this.rj)};function xg(a,b){dc.call(this);this.Cb=new Zf(this);this.zf(a||t);b&&(this.Lc=b)}C(xg,dc);w=xg.prototype;w.z=t;w.Th=q;w.ng=t;w.Ea=u;w.Cj=u;w.hf=-1;w.Kg=-1;w.yi=u;w.hi=q;w.Lc="toggle_display";w.r=v("z");w.zf=function(a){this.Ea&&n(Error("Can not change this state of the popup while showing."));this.z=a}; -function yg(a,b){a.te&&a.te.stop();a.ee&&a.ee.stop();if(b){if(!a.Ea&&a.of()){a.z||n(Error("Caller must call setElement before trying to show the popup"));a.kb();var c=be(a.z);a.yi&&ag(a.Cb,c,"keydown",a.Ri,q);if(a.Th)if(ag(a.Cb,c,"mousedown",a.Sg,q),I){var e;try{e=c.activeElement}catch(d){}for(;e&&"IFRAME"==e.nodeName;){try{var f=e.contentDocument||e.contentWindow.document}catch(g){break}c=f;e=c.activeElement}ag(a.Cb,c,"mousedown",a.Sg,q);ag(a.Cb,c,"deactivate",a.Rg)}else ag(a.Cb,c,"blur",a.Rg);"toggle_display"== -a.Lc?(a.z.style.visibility="visible",ye(a.z,q)):"move_offscreen"==a.Lc&&a.kb();a.Ea=q;a.te?(Vb(a.te,"end",a.Vg,u,a),a.te.play()):a.Vg()}}else zg(a)}w.kb=ga;function zg(a,b){if(!a.Ea||!a.dispatchEvent({type:"beforehide",target:b}))return u;a.Cb&&a.Cb.yf();a.Ea=u;a.Kg=wa();a.ee?(Vb(a.ee,"end",va(a.sg,b),u,a),a.ee.play()):a.sg(b);return q}w.sg=function(a){"toggle_display"==this.Lc?this.Cj?mg(this.Cg,0,this):this.Cg():"move_offscreen"==this.Lc&&(this.z.style.top="-10000px");this.pf(a)}; -w.Cg=function(){this.z.style.visibility="hidden";ye(this.z,u)};w.of=function(){return this.dispatchEvent("beforeshow")};w.Vg=function(){this.hf=wa();this.Kg=-1;this.dispatchEvent("show")};w.pf=function(a){this.dispatchEvent({type:"hide",target:a})};w.Sg=function(a){a=a.target;!ie(this.z,a)&&((!this.ng||ie(this.ng,a))&&!(150>wa()-this.hf))&&zg(this,a)};w.Ri=function(a){27==a.keyCode&&zg(this,a.target)&&(a.preventDefault(),a.stopPropagation())}; -w.Rg=function(a){if(this.hi){var b=be(this.z);if(I||ib){if(a=b.activeElement,!a||ie(this.z,a)||"BODY"==a.tagName)return}else if(a.target!=b)return;150>wa()-this.hf||zg(this)}};function Ag(a,b){this.vj=4;this.ke=b||p;xg.call(this,a)}C(Ag,xg);Ag.prototype.kb=function(){if(this.ke){var a=!this.Ea&&"move_offscreen"!=this.Lc,b=this.r();a&&(b.style.visibility="hidden",ye(b,q));this.ke.kb(b,this.vj,this.Zk);a&&ye(b,u)}};function Bg(a){this.X=new tc;a&&this.Se(a)}function Cg(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+pa(a):b.substr(0,1)+a}w=Bg.prototype;w.$d=function(){return this.X.$d()};w.add=function(a){this.X.set(Cg(a),a)};w.Se=function(a){a=sc(a);for(var b=a.length,c=0;cwa()-this.jf))&&zg(this,a)};w.Si=function(a){27==a.keyCode&&zg(this,a.target)&&(a.preventDefault(),a.stopPropagation())}; +w.Sg=function(a){if(this.ii){var b=be(this.z);if(I||ib){if(a=b.activeElement,!a||ie(this.z,a)||"BODY"==a.tagName)return}else if(a.target!=b)return;150>wa()-this.jf||zg(this)}};function Ag(a,b){this.wj=4;this.le=b||p;xg.call(this,a)}C(Ag,xg);Ag.prototype.lb=function(){if(this.le){var a=!this.Fa&&"move_offscreen"!=this.Mc,b=this.r();a&&(b.style.visibility="hidden",ye(b,q));this.le.lb(b,this.wj,this.Zk);a&&ye(b,u)}};function Bg(a){this.X=new tc;a&&this.Te(a)}function Cg(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+pa(a):b.substr(0,1)+a}w=Bg.prototype;w.ae=function(){return this.X.ae()};w.add=function(a){this.X.set(Cg(a),a)};w.Te=function(a){a=sc(a);for(var b=a.length,c=0;cthis.Rc)this.Rc=k.x;if(this.Vc===t||g.ythis.Sc)this.Sc=k.y;if(this.Wc===t||g.dthis.Tc)this.Tc=k.d;this.v=[(this.Uc+this.Rc)/2, -(this.Vc+this.Sc)/2,(this.Wc+this.Tc)/2];l.i=u}b&&e.i&&(l=this.ec.get(c),l!=t&&this.a.isBuffer(l.G)&&this.a.deleteBuffer(l.G));l=t;!b||e.i?(l=this.a.createBuffer(),e.Eb(),this.a.bindBuffer(this.a.ARRAY_BUFFER,l),this.a.bufferData(this.a.ARRAY_BUFFER,e.V,this.a.STATIC_DRAW),l=new rg(l,e.count,3),e.i=u):l=this.ec.get(c);Jf(this.Q,0.3);b&&d.i&&(g=this.ec.get(c),g!=t&&this.a.isBuffer(g.G)&&this.a.deleteBuffer(g.G));g=t;!b||d.i?(g=this.a.createBuffer(),d.Eb(),this.a.bindBuffer(this.a.ARRAY_BUFFER,g),this.a.bufferData(this.a.ARRAY_BUFFER, -d.V,this.a.STATIC_DRAW),g=new rg(g,d.count,3),d.i=u):g=this.Xc.get(c);Jf(this.Q,0.3);b&&(f&&f.i)&&(d=this.qc.get(c),d!=t&&this.a.isBuffer(d.G)&&this.a.deleteBuffer(d.G));d=t;f&&(!b||f.i?(f.length!=e.length&&n(Error("Mismatch between points and point colors.")),d=this.a.createBuffer(),f.Eb(),this.a.bindBuffer(this.a.ARRAY_BUFFER,d),this.a.bufferData(this.a.ARRAY_BUFFER,f.V,this.a.STATIC_DRAW),d=new rg(d,f.count,3),f.i=u):d=this.qc.get(c));Jf(this.Q,0.2);b&&(m&&m.i)&&(f=this.Ac.get(c),f!=t&&this.a.isBuffer(f.G)&& -this.a.deleteBuffer(f.G));f=t;m&&(f=m.Oc,!b||m.i?(f.length!=e.length&&n(Error("Mismatch between points and scalars.")),e=this.a.createBuffer(),this.a.bindBuffer(this.a.ARRAY_BUFFER,e),this.a.bufferData(this.a.ARRAY_BUFFER,f,this.a.STATIC_DRAW),f=new rg(e,f.length,3),m.i=u):f=this.Ac.get(c));Jf(this.Q,0.1);b||this.rb.add(a);this.ec.set(c,l);this.Xc.set(c,g);this.qc.set(c,d);this.dc.set(c,h);this.Ac.set(c,f);this.Ld=a.i=u}}else a.i=u}}}; -w.vf=function(a,b){if(this.P.PICKING_ENABLED){this.Zb(q,u);var c=new Uint8Array(4);this.a.readPixels(a,this.t-b,1,1,this.a.RGBA,this.a.UNSIGNED_BYTE,c);return c[0]+255*c[1]+65025*c[2]}return-1}; -w.Zb=function(a,b){Qg.u.Zb.call(this,a,b);this.a.viewport(0,0,this.C,this.t);this.a.clear(this.a.COLOR_BUFFER_BIT|this.a.DEPTH_BUFFER_BIT);var c=this.rb.A,e=c.length;if(0!=e){a?this.a.bindFramebuffer(this.a.FRAMEBUFFER,this.fg):this.a.bindFramebuffer(this.a.FRAMEBUFFER,t);var d=this.D.Je,f=this.D.m;this.a.uniformMatrix4fv(this.jd.get("perspective"),u,d);this.a.uniformMatrix4fv(this.jd.get("view"),u,f);d=this.v;this.a.uniform3f(this.jd.get("center"),parseFloat(d[0]),parseFloat(d[1]),parseFloat(d[2])); -f=this.gb.length;for(d=0;dh&&0==j)for(h=h=0;hh;h++){var l= -Math.floor(h/2),k=(l+1)%3,j=(l+2)%3,r=(2+2*l)%6,z=(4+2*l)%6,y=(s[h]-f[l])*(1/a[l]);Infinity!=y&&-Infinity!=y&&(m=f[k]+a[k]*y,y=f[j]+a[j]*y,m>=s[r]&&m<=s[r+1]&&y>=s[z]&&y<=s[z+1]?(r=[],r[l]=s[h],r[k]=m,r[j]=y,b.push(r)):(r=[],r[l]=s[h],r[k]=m,r[j]=y,g.push(r)))}a=[b,g];a=a[0];if(0==a.length)return t;g=Array(2);for(s=0;2>s;s++)b=a[s],g[s]=Math.sqrt((b[0]-f[0])*(b[0]-f[0])+(b[1]-f[1])*(b[1]-f[1])+(b[2]-f[2])*(b[2]-f[2]));f=b=s=t;g[0]=c.b[0].n?d=c.b[0].n-1:0>d&&(d=0);j=Math.round((c.b[1].h[0]*g[0]+c.b[1].h[1]*g[1]+c.b[1].h[2]*g[2]+c.b[1].He)/Math.abs(c.b[1].Cc));j>=c.b[1].n?j=c.b[1].n-1:0>j&&(j=0);m=Math.round((c.b[2].h[0]* -g[0]+c.b[2].h[1]*g[1]+c.b[2].h[2]*g[2]+c.b[2].He)/Math.abs(c.b[2].Cc));m>=c.b[2].n?m=c.b[2].n-1:0>m&&(m=0);return[[d,j,m],[f[0],f[1],f[2]],[g[0],g[1],g[2]]]}; -w.Zb=function(a,b){Rg.u.Zb.call(this,a,b);if(0!=this.rb.A.length){var c=this.gb[0],e=t,e=0==this.va?c.indexX:1==this.va?c.indexY:c.indexZ,d=this.Ua[parseInt(e,10)].Yf,f=this.Ua[parseInt(e,10)].Xf;this.Dc=this.Ua[parseInt(e,10)].Gc;this.Bc=this.Ua[parseInt(e,10)].tc;this.dd=d;this.bd=f;var g=this.C,h=this.t,l=this.D.m;this.a.save();this.a.clearRect(-g,-h,2*g,2*h);this.a.restore();var k=Math.max(l[14],0.1);this.a.setTransform(k,0,0,k,0,0);var j=1*l[12],l=-1*l[13],m=t;c.j&&(m=c.j.Oe);var r=this.Ua[parseInt(e, -10)],s=r.U.Ub,r=r.j,z=t;r&&(z=r.Ub);var y=this.dd,D=this.bd,F=this.Uf,H=this.Zf,A=F.getImageData(0,0,y,D),G=H.getImageData(0,0,y,D),J=A.data,K=G.data,R=J.length,N=c.ha,W=c.ba,aa=c.ca,Z=c.ea/N,ba=c.da/N;if(this.Rf!=e||this.ba!=W||this.ca!=aa||this.ea!=Z||this.da!=ba||m&&!Uf(m,this.$f,0)){var L=this.Gd;L.width=d;L.height=f;L=this.Id;L.width=d;L.height=f;d=0;do{var L=[0,0,0,0],f=[0,0,0,0],O=s[d]/255*N,Q=s[d],Q=(Q/255-Z)/(ba-Z),Q=255*Q;O>=W&&O<=aa&&(L=new T(c.Qb[0],c.Qb[1],c.Qb[2]),L=(new T(c.Ob[0],c.Ob[1], -c.Ob[2])).scale(Q).add(L.scale(255-Q)),L=[Math.floor(L.x),Math.floor(L.y),Math.floor(L.d),255],r&&(-255==m[3]?f=[z[d],z[d+1],z[d+2],z[d+3]]:Uf(m,z,d)&&(f=[z[d],z[d+1],z[d+2],z[d+3]])));"X"==this.Ba?(J[d]=L[0],J[d+1]=L[1],J[d+2]=L[2],J[d+3]=L[3],K[d]=f[0],K[d+1]=f[1],K[d+2]=f[2],K[d+3]=f[3]):"Y"==this.Ba?(Q=4*y*Math.floor(d/(4*y))-d%(4*y),J[Q]=L[0],J[Q+1]=L[1],J[Q+2]=L[2],J[Q+3]=L[3],K[Q]=f[0],K[Q+1]=f[1],K[Q+2]=f[2],K[Q+3]=f[3]):(Q=R-1-d,J[Q-3]=L[0],J[Q-2]=L[1],J[Q-1]=L[2],J[Q]=L[3],K[Q-3]=f[0],K[Q- -2]=f[1],K[Q-1]=f[2],K[Q]=f[3]);d+=4}while(dthis.Sc)this.Sc=k.x;if(this.Wc===t||g.ythis.Tc)this.Tc=k.y;if(this.Xc===t||g.dthis.Uc)this.Uc=k.d;this.v=[(this.Vc+this.Sc)/2, +(this.Wc+this.Tc)/2,(this.Xc+this.Uc)/2];l.i=u}b&&e.i&&(l=this.ec.get(c),l!=t&&this.a.isBuffer(l.G)&&this.a.deleteBuffer(l.G));l=t;!b||e.i?(l=this.a.createBuffer(),e.Eb(),this.a.bindBuffer(this.a.ARRAY_BUFFER,l),this.a.bufferData(this.a.ARRAY_BUFFER,e.V,this.a.STATIC_DRAW),l=new rg(l,e.count,3),e.i=u):l=this.ec.get(c);Jf(this.Q,0.3);b&&d.i&&(g=this.ec.get(c),g!=t&&this.a.isBuffer(g.G)&&this.a.deleteBuffer(g.G));g=t;!b||d.i?(g=this.a.createBuffer(),d.Eb(),this.a.bindBuffer(this.a.ARRAY_BUFFER,g),this.a.bufferData(this.a.ARRAY_BUFFER, +d.V,this.a.STATIC_DRAW),g=new rg(g,d.count,3),d.i=u):g=this.Yc.get(c);Jf(this.Q,0.3);b&&(f&&f.i)&&(d=this.rc.get(c),d!=t&&this.a.isBuffer(d.G)&&this.a.deleteBuffer(d.G));d=t;f&&(!b||f.i?(f.length!=e.length&&n(Error("Mismatch between points and point colors.")),d=this.a.createBuffer(),f.Eb(),this.a.bindBuffer(this.a.ARRAY_BUFFER,d),this.a.bufferData(this.a.ARRAY_BUFFER,f.V,this.a.STATIC_DRAW),d=new rg(d,f.count,3),f.i=u):d=this.rc.get(c));Jf(this.Q,0.2);b&&(m&&m.i)&&(f=this.Bc.get(c),f!=t&&this.a.isBuffer(f.G)&& +this.a.deleteBuffer(f.G));f=t;m&&(f=m.Pc,!b||m.i?(f.length!=e.length&&n(Error("Mismatch between points and scalars.")),e=this.a.createBuffer(),this.a.bindBuffer(this.a.ARRAY_BUFFER,e),this.a.bufferData(this.a.ARRAY_BUFFER,f,this.a.STATIC_DRAW),f=new rg(e,f.length,3),m.i=u):f=this.Bc.get(c));Jf(this.Q,0.1);b||this.sb.add(a);this.ec.set(c,l);this.Yc.set(c,g);this.rc.set(c,d);this.dc.set(c,h);this.Bc.set(c,f);this.Md=a.i=u}}else a.i=u}}}; +w.wf=function(a,b){if(this.P.PICKING_ENABLED){this.Zb(q,u);var c=new Uint8Array(4);this.a.readPixels(a,this.t-b,1,1,this.a.RGBA,this.a.UNSIGNED_BYTE,c);return c[0]+255*c[1]+65025*c[2]}return-1}; +w.Zb=function(a,b){Qg.u.Zb.call(this,a,b);this.a.viewport(0,0,this.C,this.t);this.a.clear(this.a.COLOR_BUFFER_BIT|this.a.DEPTH_BUFFER_BIT);var c=this.sb.A,e=c.length;if(0!=e){a?this.a.bindFramebuffer(this.a.FRAMEBUFFER,this.gg):this.a.bindFramebuffer(this.a.FRAMEBUFFER,t);var d=this.D.Ke,f=this.D.m;this.a.uniformMatrix4fv(this.kd.get("perspective"),u,d);this.a.uniformMatrix4fv(this.kd.get("view"),u,f);d=this.v;this.a.uniform3f(this.kd.get("center"),parseFloat(d[0]),parseFloat(d[1]),parseFloat(d[2])); +f=this.hb.length;for(d=0;dh*(l+m))for(h=h=0;hh;h++){var l= +Math.floor(h/2),k=(l+1)%3,j=(l+2)%3,s=(2+2*l)%6,z=(4+2*l)%6,y=(r[h]-f[l])*(1/a[l]);Infinity!=y&&-Infinity!=y&&(m=f[k]+a[k]*y,y=f[j]+a[j]*y,m>=r[s]&&m<=r[s+1]&&y>=r[z]&&y<=r[z+1]?(s=[],s[l]=r[h],s[k]=m,s[j]=y,b.push(s)):(s=[],s[l]=r[h],s[k]=m,s[j]=y,g.push(s)))}a=[b,g];a=a[0];if(0==a.length)return t;g=Array(2);for(r=0;2>r;r++)b=a[r],g[r]=Math.sqrt((b[0]-f[0])*(b[0]-f[0])+(b[1]-f[1])*(b[1]-f[1])+(b[2]-f[2])*(b[2]-f[2]));f=b=r=t;g[0]=c.b[0].n?d=c.b[0].n-1:0>d&&(d=0);j=Math.round((c.b[1].h[0]*g[0]+c.b[1].h[1]*g[1]+c.b[1].h[2]*g[2]+c.b[1].Ie)/Math.abs(c.b[1].Dc));j>=c.b[1].n?j=c.b[1].n-1:0>j&&(j=0);m=Math.round((c.b[2].h[0]* +g[0]+c.b[2].h[1]*g[1]+c.b[2].h[2]*g[2]+c.b[2].Ie)/Math.abs(c.b[2].Dc));m>=c.b[2].n?m=c.b[2].n-1:0>m&&(m=0);return[[d,j,m],[f[0],f[1],f[2]],[g[0],g[1],g[2]]]}; +w.Zb=function(a,b){Rg.u.Zb.call(this,a,b);if(0!=this.sb.A.length){var c=this.hb[0],e=t,e=0==this.va?c.indexX:1==this.va?c.indexY:c.indexZ,d=this.Va[parseInt(e,10)].Zf,f=this.Va[parseInt(e,10)].Yf;this.Ec=this.Va[parseInt(e,10)].Hc;this.Cc=this.Va[parseInt(e,10)].uc;this.ed=d;this.cd=f;var g=this.C,h=this.t,l=this.D.m;this.a.save();this.a.clearRect(-g,-h,2*g,2*h);this.a.restore();var k=Math.max(l[14],0.1);this.a.setTransform(k,0,0,k,0,0);var j=1*l[12],l=-1*l[13],m=t;c.j&&(m=c.j.Pe);var s=this.Va[parseInt(e, +10)],r=s.U.Ub,s=s.j,z=t;s&&(z=s.Ub);var y=this.ed,D=this.cd,F=this.Vf,H=this.$f,A=F.getImageData(0,0,y,D),G=H.getImageData(0,0,y,D),J=A.data,K=G.data,R=J.length,N=c.ha,W=c.ba,aa=c.ca,Z=c.ea/N,ba=c.da/N;if(this.Sf!=e||this.ba!=W||this.ca!=aa||this.ea!=Z||this.da!=ba||m&&!Uf(m,this.ag,0)){var L=this.Hd;L.width=d;L.height=f;L=this.Jd;L.width=d;L.height=f;d=0;do{var L=[0,0,0,0],f=[0,0,0,0],O=r[d]/255*N,Q=r[d],Q=(Q/255-Z)/(ba-Z),Q=255*Q;O>=W&&O<=aa&&(L=new T(c.Qb[0],c.Qb[1],c.Qb[2]),L=(new T(c.Ob[0],c.Ob[1], +c.Ob[2])).scale(Q).add(L.scale(255-Q)),L=[Math.floor(L.x),Math.floor(L.y),Math.floor(L.d),255],s&&(-255==m[3]?f=[z[d],z[d+1],z[d+2],z[d+3]]:Uf(m,z,d)&&(f=[z[d],z[d+1],z[d+2],z[d+3]])));"X"==this.Ca?(J[d]=L[0],J[d+1]=L[1],J[d+2]=L[2],J[d+3]=L[3],K[d]=f[0],K[d+1]=f[1],K[d+2]=f[2],K[d+3]=f[3]):"Y"==this.Ca?(Q=4*y*Math.floor(d/(4*y))-d%(4*y),J[Q]=L[0],J[Q+1]=L[1],J[Q+2]=L[2],J[Q+3]=L[3],K[Q]=f[0],K[Q+1]=f[1],K[Q+2]=f[2],K[Q+3]=f[3]):(Q=R-1-d,J[Q-3]=L[0],J[Q-2]=L[1],J[Q-1]=L[2],J[Q]=L[3],K[Q-3]=f[0],K[Q- +2]=f[1],K[Q-1]=f[2],K[Q]=f[3]);d+=4}while(d