////////////////////////////////////////////////////////////////////// // Pano2VR 7.0.8/20017 HTML5/CSS3 & WebGL Panorama Player // // License: Ruud van Reenen // // (c) 2023, Garden Gnome Software, https://ggnome.com // ////////////////////////////////////////////////////////////////////// var p="function"==typeof Object.defineProperties?Object.defineProperty:function(y,x,v){if(y==Array.prototype||y==Object.prototype)return y;y[x]=v.value;return y};function aa(y){y=["object"==typeof globalThis&&globalThis,y,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var x=0;xv&&(v=Math.max(v+e,0));vn;)n+=360;for(;180r&&(r=c.fov.m);this.jc||(this.jc=new y.Ua,this.jc.Pn(this.pan,this.u));0!=this.mode&&1!=this.mode||!h||this.Jb&&this.Jb.gain.setValueAtTime(this.level* c.ba*this.wa,h.currentTime);if(2==this.mode&&h){var t=.5*Math.cos(n*Math.PI/180)+.5;this.ad=Math.sqrt(t)*this.wa*this.level*c.ba;this.dd=Math.sqrt(t)*this.wa*this.level*c.ba;this.bd=Math.sqrt(1-t)*this.wa*this.level*c.ba;this.cd=Math.sqrt(1-t)*this.wa*this.level*c.ba;this.si()}if(3==this.mode){n=0>n?n<-this.Eb?n+this.Eb:0:n>this.Eb?n-this.Eb:0;var w=this.level;m=Math.abs(m);m=mr||0>z)t=w*q*c.ba,h?(this.ad=t*this.wa,this.dd=t*this.wa,this.cd=this.bd= 0,this.si()):this.j.volume=w*q*c.ba;else if(t=1-Math.abs(n/r),h){var A=w*(q+(1-q)*z*t)*c.ba;t=w*q*c.ba;0<=n?(this.ad=A*this.wa,this.dd=t*this.wa):(this.ad=t*this.wa,this.dd=A*this.wa);2*Math.abs(n)n?n>-this.Eb?0:n+this.Eb:n no audio buffer -> playWhenReady"),this.Pl=!0)};b.prototype.Ak= function(){var c=this.o.ga.currentTime-this.Ai;this.Rf();this.Af=c};b.prototype.Rf=function(){this.Zb&&this.vg&&(this.stopped=!0,this.Zb.disconnect(),this.Zb.stop(0),this.Zb=null);this.Ai=this.Af=0;this.vg=!1};b.prototype.Yq=function(){var c=this.o.ga;return this.Af?this.Af:this.Ai?c.currentTime-this.Ai:0};b.prototype.Zq=function(c){this.Rf();this.Af=c;this.Sd()};b.prototype.addElement=function(){var c=-1,h=this,m=this.o,n=this.o.ga;try{for(var q=!1,r=0;rc.loop&&(c.j.preload="none"));c.od&&""!=c.od&&(c.j.style.od="url('"+h.gb(c.od)+"')",c.j.style.webkitMaskImage="url('"+h.gb(c.od)+"')",c.j.style.maskSize="100% 100%",c.j.style.webkitMaskSize="100% 100%");c.j.volume=c.level*h.ba;1<=c.loop&&(c.tb=c.loop-1);m&&(this.Pd=!0);(1==c.mode||2==c.mode||3==c.mode||5==c.mode)&&0<=c.loop&&(c.j.autoplay=!0,c.isRunning=!0,c.autoplay=!0,this.o.Xc&&(c.j.muted=!0),c.Fm());h.U.push(this);h.Ji?h.$.appendChild(c.j):(c.j.style.position="absolute", c.qc&&(c.j.width=c.qc),c.Pc&&(c.j.height=c.Pc),h.ea.appendChild(c.j));c.j.addEventListener("ended",function(){c.mv()},!1)}catch(t){h.G(t)}};b.prototype.Td=function(){this.j.poster=this.o.gb(this.o.Va(this.poster));a.prototype.Td.call(this)};b.prototype.registerElement=function(c,h){this.pd=!0;this.j=h;this.id=c;this.level=1;this.o.U.push(this)};b.prototype.Me=function(){var c=this.o;c.Ji&&(c.S.deleteTexture(this.texture),this.texture=0);this.j.parentNode&&this.j.parentNode.removeChild(this.j);this.j= null};return b}(f);y.Ym=e;f=function(a){function b(c){c=a.call(this,c)||this;c.url="";c.Ka=0;c.Oa=0;c.zb=0;c.fov=50;c.Ba=0;c.jg=!1;c.qc=100;c.Pc=100;c.Jc=1;return c}__extends(b,a);b.prototype.yb=function(c){a.prototype.yb.call(this,c);var h;if(h=c.getAttributeNode("url"))this.url=h.nodeValue.toString();if(h=c.getAttributeNode("maskimage"))this.od=String(h.nodeValue);if(h=c.getAttributeNode("rotx"))this.Ka=Number(h.nodeValue);if(h=c.getAttributeNode("roty"))this.Oa=Number(h.nodeValue);if(h=c.getAttributeNode("rotz"))this.zb= Number(h.nodeValue);if(h=c.getAttributeNode("fov"))this.fov=Number(h.nodeValue);if(h=c.getAttributeNode("width"))this.qc=Number(h.nodeValue);if(h=c.getAttributeNode("height"))this.Pc=Number(h.nodeValue);this.Jc=(h=c.getAttributeNode("stretch"))?Number(h.nodeValue):1;if(h=c.getAttributeNode("clickmode"))this.Ba=Number(h.nodeValue);if(h=c.getAttributeNode("hidepinned"))this.sf=1==Number(h.nodeValue);if(h=c.getAttributeNode("handcursor"))this.jg=1==Number(h.nodeValue);for(c=c.firstChild;c;)"source"== c.nodeName&&(h=c.getAttributeNode("url"))&&(this.url=h.nodeValue.toString()),c=c.nextSibling};b.prototype.Be=function(){this.ye=!1;this.j.style[this.o.bc]="none";this.sf&&!this.Na&&(this.j.style.visibility="hidden")};b.prototype.Ae=function(){1!==this.Ba&&4!==this.Ba||this.pf(!this.Na)};b.prototype.pf=function(c){var h=this.o;if(1===this.Ba||4===this.Ba)this.Na=c,this.sf&&(this.j.style.visibility="visible",this.j.style.opacity=this.Na?"0.0":"1.0"),this.Na?(this.j.style.pointerEvents="auto",this.j.style.cursor= "pointer",this.j.style.zIndex=(h.Mf+8E4).toString(),this.j.style[h.bc]="all 1s ease 0s",this.j.style.opacity="1.0"):(this.j.style.pointerEvents="none",this.j.style.cursor="default",this.j.style.zIndex=h.Mf.toString(),this.j.style[h.bc]="all 1s ease 0s",this.sf&&(this.j.style.opacity="0.0")),this.ye=!0,h.Hm()};b.prototype.addElement=function(){var c=this,h=this.o;try{c.j=document.createElement("img");c.j.setAttribute("style","-webkit-user-drag:none; max-width:none; pointer-events:none;");c.j.setAttribute("class", "ggmedia");c.j.hidden=!0;c.j.addEventListener("click",function(m){m.stopPropagation()});h.De&&c.j.setAttribute("id",h.De+c.id);c.j.ondragstart=function(){return!1};if(1===c.Ba||4===c.Ba)c.j.addEventListener(h.Sm(),function(){c.Be()},!1),c.j.addEventListener("transitionend",function(){c.Be()},!1);c.j.setAttribute("src",h.gb(h.Va(c.url)));c.qc&&(c.j.width=c.qc);c.Pc&&(c.j.height=c.Pc);h.Xa.push(c);c.j.style.position="absolute";c.od&&""!=c.od&&(c.j.style.od="url('"+h.gb(c.od)+"')",c.j.style.webkitMaskImage= "url('"+h.gb(c.od)+"')",c.j.style.maskSize="100% 100%",c.j.style.webkitMaskSize="100% 100%");h.ea.appendChild(c.j)}catch(m){h.G("Error addimage:"+m)}};b.prototype.Td=function(){this.j.setAttribute("src",this.o.gb(this.o.Va(this.url)))};return b}(x);y.Gq=f;f=function(a){function b(c){c=a.call(this,c)||this;c.code="";return c}__extends(b,a);b.prototype.yb=function(c){a.prototype.yb.call(this,c);var h;if(h=c.getAttributeNode("rotx"))this.Ka=Number(h.nodeValue);if(h=c.getAttributeNode("roty"))this.Oa= Number(h.nodeValue);if(h=c.getAttributeNode("rotz"))this.zb=Number(h.nodeValue);if(h=c.getAttributeNode("fov"))this.fov=Number(h.nodeValue);if(h=c.getAttributeNode("width"))this.qc=Number(h.nodeValue);if(h=c.getAttributeNode("height"))this.Pc=Number(h.nodeValue);this.Jc=(h=c.getAttributeNode("stretch"))?Number(h.nodeValue):1;if(h=c.getAttributeNode("clickmode"))this.Ba=Number(h.nodeValue);if(h=c.getAttributeNode("handcursor"))this.jg=1==Number(h.nodeValue);if(h=c.getAttributeNode("code"))this.code= h.nodeValue.toString()};b.prototype.Be=function(){this.ye=!1;this.j.style[this.o.bc]="none"};b.prototype.Ae=function(){1!==this.Ba&&4!==this.Ba||this.pf(!this.Na)};b.prototype.pf=function(c){var h=this.o;if(1===this.Ba||4===this.Ba)this.Na=c,this.sf&&(this.j.style.visibility="visible",this.j.style.opacity=this.Na?"0.0":"1.0"),this.Na?(this.j.style.cursor="pointer",this.j.style.zIndex=(h.Mf+8E4).toString(),this.j.style[h.bc]="all 1s ease 0s",this.j.style.opacity="1.0"):(this.j.style.cursor="default", this.j.style.zIndex=h.Mf.toString(),this.j.style[h.bc]="all 1s ease 0s"),this.ye=!0,h.Hm()};b.prototype.addElement=function(){var c=this,h=this.o;try{c.j=document.createElement("div");this.lq();c.j.setAttribute("style","max-width:none;");c.j.setAttribute("class","ggmedia");h.De&&c.j.setAttribute("id",h.De+c.id);if(1===c.Ba||4===c.Ba)c.j.addEventListener(h.Sm(),function(){c.Be()},!1),c.j.addEventListener("transitionend",function(){c.Be()},!1);h.Ub.push(c);c.j.style.position="absolute";c.j.style.visibility= "hidden";0==c.Ba?h.Ia.insertBefore(c.j,h.Ia.firstChild):h.ea.appendChild(c.j)}catch(m){h.G("Error addwebelement:"+m)}};b.prototype.lq=function(){var c=this.j.innerHTML,h=this.o.Va(this.code);h!=c&&(this.j.innerHTML=h)};b.prototype.Td=function(){this.lq()};return b}(x);y.Iq=f;x=function(a){function b(c){c=a.call(this,c)||this;c.jn=50;c.alpha=50;c.type=0;c.color=16777215;return c}__extends(b,a);b.prototype.yb=function(c){a.prototype.yb.call(this,c);var h;if(h=c.getAttributeNode("blinding"))this.jn= Number(h.nodeValue);if(h=c.getAttributeNode("alpha"))this.alpha=Number(h.nodeValue);if(h=c.getAttributeNode("type"))this.type=Number(h.nodeValue);if(h=c.getAttributeNode("color"))this.color=1*Number(h.nodeValue)};return b}(x);y.Hq=x;x=function(){function a(b){this.o=b;this.type="empty";this.qm=this.id=this.target=this.description=this.title=this.url="";this.w=100;this.h=20;this.qk=!1;this.j=null;this.Ul=this.Tl=this.Qb=this.fc=this.kb=this.Ca=this.distance=this.u=this.pan=0;this.visible=!0;this.Yb= b.L.Yb;this.Wb=b.L.Wb;this.Xb=b.L.Xb;this.Vb=b.L.Vb;this.Ce=b.L.Ce;this.hd="";this.yd=this.gf=0;this.Kf=!1;this.Zi=0;this.vertices=[]}a.prototype.$f=function(){this.id=this.id;this.pan=this.pan;this.tilt=this.u;this.url=this.url;this.target=this.target;this.title=this.title;this.distance=this.distance;this.description=this.description;this.skinid=this.qm;this.obj=this.j;this.customimage=this.hd;this.customimagewidth=this.gf;this.customimageheight=this.yd;this.use3D=this.Kf;this.distance3D=this.Zi; this.j&&this.j.__div&&(this.div=this.j.__div)};a.prototype.Ru=function(){var b=this.url;return"{"==b.charAt(0)?b.substr(1,b.length-2):!1};a.prototype.yb=function(b){var c;if(c=b.getAttributeNode("url"))this.url=c.nodeValue.toString();if(c=b.getAttributeNode("target"))this.target=c.nodeValue.toString();if(c=b.getAttributeNode("title"))this.title=c.nodeValue.toString();if(c=b.getAttributeNode("description"))this.description=c.nodeValue.toString();if(c=b.getAttributeNode("id"))this.id=c.nodeValue.toString(); if(c=b.getAttributeNode("skinid"))this.qm=c.nodeValue.toString();if(c=b.getAttributeNode("width"))this.w=Number(c.nodeValue);if(c=b.getAttributeNode("height"))this.h=Number(c.nodeValue);if(c=b.getAttributeNode("wordwrap"))this.qk=1==Number(c.nodeValue);c=b.getAttributeNode("pan");this.pan=1*(c?Number(c.nodeValue):0);c=b.getAttributeNode("tilt");this.u=1*(c?Number(c.nodeValue):0);c=b.getAttributeNode("fov");this.fov=1*(c?Number(c.nodeValue):0);c=b.getAttributeNode("distance");this.distance=1*(c?Number(c.nodeValue): 0);if(c=b.getAttributeNode("bordercolor"))this.Yb=1*Number(c.nodeValue);if(c=b.getAttributeNode("backgroundcolor"))this.Wb=1*Number(c.nodeValue);if(c=b.getAttributeNode("borderalpha"))this.Xb=1*Number(c.nodeValue);if(c=b.getAttributeNode("backgroundalpha"))this.Vb=1*Number(c.nodeValue);if(c=b.getAttributeNode("handcursor"))this.Ce=1==Number(c.nodeValue);if(c=b.getAttributeNode("customimage"))this.hd=this.o.$n()+c.nodeValue;if(c=b.getAttributeNode("customimagewidth"))this.gf=Number(c.nodeValue);if(c= b.getAttributeNode("customimageheight"))this.yd=Number(c.nodeValue);if(c=b.getAttributeNode("use3D"))this.Kf=1==Number(c.nodeValue);if(c=b.getAttributeNode("distance3D"))this.Zi=Number(c.nodeValue);for(b=b.firstChild;b;){if("polystring"==b.nodeName){c=b.textContent.toString().split("|");for(var h=0;he;e++)2>e%3&&(h[e]*=f);c.bufferData(c.ARRAY_BUFFER,new Float32Array(h),c.STATIC_DRAW);this.ff=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,this.ff);var m=[1,0,0,0,0,1,1,1];c.bufferData(c.ARRAY_BUFFER,new Float32Array(m),c.STATIC_DRAW);this.xd=c.createBuffer();c.bindBuffer(c.ELEMENT_ARRAY_BUFFER, this.xd);var n=[0,1,2,0,2,3];c.bufferData(c.ELEMENT_ARRAY_BUFFER,new Uint16Array(n),c.STATIC_DRAW);h=[];n=[];m=[];var q=new y.Ua;for(f=0;6>f;f++){var r=f%3;var t=3>f?1:0;for(a=0;4>a;a++){q.x=-1;q.y=-1;q.z=1;for(e=0;eq.x?.33:0)+.33*r,(0>q.y?0:.5)+.5*t);if(4>f)for(e=0;ea;a++){var b=e.createTexture();this.Xd++;b.Cf=null;b.xf=null;b.yo=!1;e.bindTexture(e.TEXTURE_2D,b);e.texImage2D(e.TEXTURE_2D,0,e.RGB,1,1,0,e.RGB,e.UNSIGNED_BYTE,null);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);if(f.nh[a]){var c=new Image;c.crossOrigin=f.crossOrigin;c.src=f.gb(f.nh[a]);b.Cf=c;c.addEventListener&&c.addEventListener("load", this.ql(b),!1);f.wd.push(c)}this.eb.push(b)}for(a=0;6>a;a++)f.mh[a]&&(c=new Image,c.crossOrigin=f.crossOrigin,c.src=f.gb(f.mh[a]),c.addEventListener?c.addEventListener("load",this.ql(this.eb[a]),!1):c.onload=this.ql(this.eb[a]),this.eb[a].xf=c,f.wd.push(c));for(a=0;af;f++)this.Cg(f),e.bindBuffer(e.ARRAY_BUFFER,this.Ok),e.vertexAttribPointer(this.O.ka,3,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,this.ff),e.vertexAttribPointer(this.O.La,2,e.FLOAT,!1,0,0),6<=this.eb.length&&this.eb[f].loaded&&(e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D, this.eb[f]),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.xd),e.uniform1i(this.O.yg,0),e.uniformMatrix4fv(this.O.bi,!1,this.ya),e.uniformMatrix4fv(this.O.Ie,!1,this.Db),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0))}};v.prototype.gk=function(){var f=this.o,e=this.M;e.N.Lj&&6>16&255)/255,(e>>8&255)/255,(e>>0&255)/255,1))};v.prototype.Cg=function(f,e){void 0===e&&(e=1);var a=this.o;y.ma.identity(this.ya);y.ma.rotate(this.ya,e*-a.W.m*Math.PI/180,[0, 0,1]);y.ma.rotate(this.ya,e*-a.u.m*Math.PI/180,[1,0,0]);-1==e?y.ma.rotate(this.ya,-a.pan.m*Math.PI/180,[0,1,0]):y.ma.rotate(this.ya,(180-a.pan.m)*Math.PI/180,[0,1,0]);a.Ya&&(y.ma.rotate(this.ya,-a.Ya.pitch*Math.PI/180,[1,0,0]),y.ma.rotate(this.ya,a.Ya.W*Math.PI/180,[0,0,1]));4>f?y.ma.rotate(this.ya,-Math.PI/2*f,[0,1,0]):y.ma.rotate(this.ya,Math.PI/2*(5==f?1:-1),[1,0,0])};v.prototype.Su=function(f){var e=this;return function(){e.Sk.push(f)}};v.prototype.pr=function(f){this.o.ub=!0;this.o.rh=!0;f.loaded= !0;f.Zl=0;f.Le=0;var e=this.o.S;this.Dn();e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,1);if(null!=f.N&&f.N.complete){f.Ob=e.createTexture();this.o.Xd++;e.bindTexture(e.TEXTURE_2D,f.Ob);try{e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,f.N)}catch(a){e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array([128,128,128,250])),this.o.G(a)}}this.o.update(2)};v.prototype.Dn=function(){this.o.M.Di&&this.o.M.Di--};v.prototype.qr=function(){if(0h;h++){var m=new y.Zg;m.Fc=document.createElement("canvas");e.o.oa?(m.Fc.width=b.width+2*c,m.Fc.height=b.height+2*c):(m.Fc.width=a.V+2*c,m.Fc.height=a.V+2*c);m.An=m.Fc.getContext("2d");m.Fc.style[e.o.Bd+"Origin"]="0% 0%";m.Fc.style.overflow="hidden";m.Fc.style.position="absolute"; m.N=f;var n=b.width+2*c,q=b.height+2*c;m.An&&m.An.drawImage(f,0,h*q,n,q,0,0,n,q);if(e.o.oa&&e.o.S){var r=e.o.S;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,1);m.Ob=r.createTexture();e.o.Xd++;r.bindTexture(r.TEXTURE_2D,m.Ob);try{r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,m.Fc)}catch(t){e.o.G(t)}r.bindTexture(r.TEXTURE_2D,null);r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,0)}e.o.Og&&(m.Fc.Bv=-1,e.o.ea.insertBefore(m.Fc,e.o.ea.firstChild));b.Ma[h]=m}b.loaded=!0;e.o.D.$c&&("previewtrack"==e.o.D.delay||"videopano"== e.o.D.delay&&!e.o.A.j)&&e.o.Zj(null)}}catch(t){e.o.G(t)}e.o.update(2)}};v.prototype.fq=function(f){var e=this;return function(){e.o.ub=!0;e.o.rh=!0;e.Dn();f.N=null}};v.prototype.qv=function(){var f=this.o,e=this.M,a=e.N,b=a.levels;f.we&&(f.Rc(0),f.ic());if(f.S){var c=f.S;c.useProgram(this.O);this.gk();c.clear(c.DEPTH_BUFFER_BIT);c.enable(c.DEPTH_TEST);y.ma.identity(this.Db);y.ma.perspective(f.Nb(),f.Cb.width/f.Cb.height,.1,100,this.Db);c.uniformMatrix4fv(this.O.Ie,!1,this.Db);e.dv();e.Vo();var h= e.Mn();var m=b.length-1;for(e.je=0;m>=h;){var n=b[m],q=1;m==b.length-1&&0==a.ib&&(q=a.V/(a.V-.5));for(var r=0;6>r;r++){var t=e.cube.bg[r];var w=t.gi;if(t.pc&&0"));this.$i()?D.N||(D.Le?D.Le--:(this.Aj(D, n,e.Jg(r,m,F,A)),f.ub=!0)):e.je++;if(D.Ob){if(!D.hg){E=.5*m+1;D.hg=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,D.hg);var C=[-1,-1,1,1,-1,1,1,1,1,-1,1,1];C[3]=F*a.V-a.ib;C[0]=Math.min((F+1)*a.V,n.width)+a.ib;C[7]=A*a.V-a.ib;C[1]=Math.min((A+1)*a.V,n.height)+a.ib;C[4]=C[1];C[6]=C[3];C[9]=C[0];C[10]=C[7];for(var G=0;12>G;G++)C[G]=0==G%3?q*E*(-2*C[G]/n.width+1):1==G%3?q*E*(-2*C[G]/n.height+1):E;c.bufferData(c.ARRAY_BUFFER,new Float32Array(C),c.STATIC_DRAW)}}else w=!1;D.visible=t.pc}z.So=w}}m--}for(r= 0;6>r;r++)if(t=e.cube.bg[r],t.pc)for(w=t.gi,this.Cg(r),c.uniform1i(this.O.yg,0),c.uniformMatrix4fv(this.O.Ie,!1,this.Db),c.uniformMatrix4fv(this.O.bi,!1,this.ya),c.enableVertexAttribArray(this.O.ka),c.enableVertexAttribArray(this.O.La),c.bindBuffer(c.ARRAY_BUFFER,this.ff),c.vertexAttribPointer(this.O.La,2,c.FLOAT,!1,0,0),c.activeTexture(c.TEXTURE0),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.xd),c.useProgram(this.O),m=h;m<=b.length-1;){n=b[m];if(t.pc&&0h?A.Ff(-90*h):A.de(5==h?90:-90);n.Ya&&(A.Gf(n.Ya.W),A.de(-n.Ya.pitch));A.Ff(-n.pan.m);A.de(n.u.m);A.Gf(n.W.m);for(h=0;h<=c;h++)for(var F=0;F<=c;F++){var E=2*(r+F*m)-1;var D=2*(a+h*t)-1;z.x=1*E;z.y=1*D;z.z=-1;z.normalize(); A.lt(z);E=this.so(z,e,n.Z());0!=n.Ic()&&1>w&&(D=this.so(z,b,n.Ic()),E&&D?(e.x=e.x*w+b.x*(1-w),e.y=e.y*w+b.y*(1-w)):!E&&D&&(E=!0,e.x=b.x,e.y=b.y));E||(e.x=NaN);f.ig[f.ol++]=q.width/2+e.x*q.width/2;f.ig[f.ol++]=q.height/2-e.y*q.width/2}this.Bu(f,c)};v.prototype.so=function(f,e,a){var b=!0;switch(a){case 0:case 4:a=1/(f.z*this.Yl);e.x=-f.x*a;e.y=f.y*a;0n;n++)isNaN(f.ig[2*b[0]])&&(c=!1);if(c){var q=!1,r=!1,t=!1,w=!1;for(n=0;4>n;n++){var z=f.ig[2*b[n]];zA;A++)for(var F=0;F=m;){var C={};t=b[q];var G=null;0"));this.Au(I,t,E,F,Math.max(1,this.Wm>>w-q),A,0!=f.Ic());I.visible=0f.fov.m&&qe.rg){f.G("Exceeded painted tiles");this.Xj=!1;break}I.Ob&&(w=r=a.V,E==t.Y-1&&(r=t.width-a.V*E),F==t.ta-1&&(w=t.height-a.V*F),r=(r+2*a.ib)/a.V,w=(w+2*a.ib)/a.V,c.bindTexture(c.TEXTURE_2D,I.Ob),c.uniform2f(c.getUniformLocation(h,"uCanvasDimensions"),f.C.width,f.C.height),C=c.getUniformLocation(h,"srcScale"),c.uniform2f(C,.5*t.width/a.V/r,.5*t.height/a.V/w), C=c.getUniformLocation(h,"srcOffset"),c.uniform2f(C,(.5*t.width+a.ib-a.V*E)/a.V/r,-(.5*t.height+a.ib-a.V*F)/a.V/w+1),C=c.getUniformLocation(h,"zOffset"),c.uniform1f(C,(q+1)/(b.length+5)),r=c.getAttribLocation(h,"aVertexPosition"),c.disableVertexAttribArray(0),c.disableVertexAttribArray(1),c.disableVertexAttribArray(2),c.enableVertexAttribArray(r),c.activeTexture(c.TEXTURE0),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D, c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE),c.bindBuffer(c.ARRAY_BUFFER,this.Ks),c.vertexAttribPointer(r,2,c.FLOAT,!1,0,0),c.bufferData(c.ARRAY_BUFFER,new Float32Array(I.ig),c.DYNAMIC_DRAW),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.Js),c.bufferData(c.ELEMENT_ARRAY_BUFFER,new Uint16Array(I.mb),c.DYNAMIC_DRAW),this.uh?0==q&&0==A&&c.drawElements(c.LINES,I.Pa,c.UNSIGNED_SHORT,0):c.drawElements(c.TRIANGLES,I.Pa,c.UNSIGNED_SHORT,0),n++)}q++}c.disable(c.CULL_FACE); c.cullFace(c.FRONT_AND_BACK);f.rh=!1;c.disable(c.STENCIL_TEST)}};v.prototype.hk=function(f,e){var a=this.o.S;y.ma.identity(this.ya);this.Cg(f,-1);a.uniformMatrix4fv(a.getUniformLocation(e,"matRotate"),!1,this.ya)};v.prototype.Et=function(){var f=this.o;if(f.S){var e=f.S,a=this.vp;e.useProgram(a);this.hk(0,a);e.uniform2f(e.getUniformLocation(a,"uCanvasDimensions"),f.C.width,f.C.height);var b=e.getUniformLocation(a,"srcOffset");e.uniform2f(b,.5,.5);1==f.A.format&&(b=e.getUniformLocation(a,"srcScale"), f.Fd?(e.uniform2f(b,-.5/Math.PI,(f.A.flipY?-.5:.5)/Math.PI),b=e.getUniformLocation(a,"srcOffset"),f.Fg?e.uniform2f(b,.5,.75):e.uniform2f(b,.5,.25)):e.uniform2f(b,-.5/Math.PI,(f.A.flipY?-1:1)/Math.PI));14==f.A.format&&(b=e.getUniformLocation(a,"srcScale"),e.uniform2f(b,1-2*f.A.df/(f.A.width/3),1-2*f.A.df/(f.A.height/2)));this.Jm(a);b=e.getUniformLocation(a,"cubeTexture");e.uniform1i(b,0);b=e.getAttribLocation(a,"aVertexPosition");e.disableVertexAttribArray(0);e.disableVertexAttribArray(1);e.disableVertexAttribArray(2); e.enableVertexAttribArray(b);e.bindBuffer(e.ARRAY_BUFFER,this.Pj);e.vertexAttribPointer(b,2,e.FLOAT,!1,0,0);e.activeTexture(e.TEXTURE0);e.bindTexture(e.TEXTURE_2D,f.A.texture);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR);e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.xd);e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT, 0)}};v.prototype.Jm=function(f){var e=this.o,a=e.S,b=this.o.C,c=1;switch(e.fov.mode){case 0:c=b.width/b.height;break;case 1:c=1;break;case 2:c=b.width/Math.sqrt(b.width*b.width+b.height*b.height);break;case 3:4*b.height/3m;m++)this.eb[m].xf.complete? this.Wi[m]||(h=!0):b=!1,this.eb[m].Cf.complete||(c=!1);if(c||b)if(!c||b||!this.Qc||h){m=Math.round(f.Se/f.Kg);c=(f.Se-m)/2;f.G("paint cube single - isMain: "+b+" overlap: "+c);this.Vf=0;this.Qc||(this.Qc=e.createTexture());f.Xd++;e.bindTexture(e.TEXTURE_CUBE_MAP,this.Qc);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,1);h=document.createElement("canvas");h.width=m;h.height= m;var n=h.getContext("2d");for(m=0;6>m;m++){var q=a[m];this.eb[q].xf.complete?this.Wi[q]||(n.drawImage(this.eb[q].xf,-c,-c),e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+m,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,h),this.Wi[q]=!0):(n.drawImage(this.eb[q].Cf,-c,-c,f.Se,f.Se),e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+m,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,h))}this.Oh=!b}};v.prototype.mr=function(){var f=this.o,e=this.M.N,a=e.levels,b=f.S,c;var h=a.length-1;if(!(0>h)){a[h].Df&&h--;var m=512;f.Nh&&(m=256);!f.xg&&2<= f.devicePixelRatio&&(m=512);for((c=b.getParameter(b.MAX_CUBE_MAP_TEXTURE_SIZE))&&ch){m=a[h];f.G("paint cube level "+h);this.Vf=h;a=e.ib;h=0m.width&&(1500r;r++){for(var t=0;th;h++)for(var m=0;me;e++)for(var a=0;af;f++)if(!this.eb[f].Cf.complete)return!1;return!0};v.prototype.$l=function(){for(var f= this.o,e=this.M,a=e.N.levels,b=f.S,c=Date.now(),h=a.length-1;0<=h;h--){var m=a[h];if(!m.cache)for(var n in m.Ma)if(m.Ma.hasOwnProperty(n)){var q=m.Ma[n];01.1*e.eq)for(this.te.sort(function(r,t){return t.Rh-r.Rh});this.te.length>e.eq;)q=this.te.pop(),q.Ob&&(b.deleteTexture(q.Ob),f.Xd--,q.Ob=0),q.N=null,q.hg&&(b.deleteBuffer(q.hg), q.hg=0),n=q.level.Ma.indexOf(q),f.G("delete <"+n+"> "+(c-q.Rh)),delete q.level.Ma[n]};v.prototype.hv=function(){var f=this.o;if(f.S){var e=this.o.S,a;for(a=0;ae;e++)this.Cg(0),a.bindBuffer(a.ARRAY_BUFFER,f.A.lk),a.vertexAttribPointer(this.O.ka,3,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,f.A.Ci),a.vertexAttribPointer(this.O.La,2,a.FLOAT,!1,0,0),a.activeTexture(a.TEXTURE0),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,f.A.qj),a.uniform1i(this.O.yg, 0),a.uniformMatrix4fv(this.O.bi,!1,this.ya),a.uniformMatrix4fv(this.O.Ie,!1,this.Db),a.drawElements(a.TRIANGLES,36,a.UNSIGNED_SHORT,0)}};v.prototype.fv=function(){var f=this.o,e=f.S,a=f.A;if(0=a.L.mode&&(c=0);3==a.L.mode&&(c=a.L.Ca);for(f=0;f>16&255)/255,(e>>8&255)/255,(e&255)/255);var r=b.getUniformLocation(this.ce,"uAlpha");b.uniform1f(r,h.Xb*n);b.vertexAttribPointer(this.ce.ka,3,b.FLOAT,!1,0,0);b.drawArrays(b.LINE_LOOP,0,q.length/3);e=h.Wb;b.uniform3f(m,(e>>16&255)/255, (e>>8&255)/255,(e&255)/255);b.uniform1f(r,h.Vb*n);b.enable(b.STENCIL_TEST);b.clearStencil(0);b.clear(b.STENCIL_BUFFER_BIT);b.colorMask(!1,!1,!1,!1);b.stencilFunc(b.ALWAYS,1,1);b.stencilOp(b.INCR,b.INCR,b.INCR);b.drawArrays(b.TRIANGLE_FAN,0,q.length/3);b.colorMask(!0,!0,!0,!0);b.stencilFunc(b.EQUAL,1,1);b.stencilOp(b.ZERO,b.ZERO,b.ZERO);b.drawArrays(b.TRIANGLE_FAN,0,q.length/3);b.disable(b.BLEND);b.enable(b.DEPTH_TEST);b.disable(b.STENCIL_TEST);b.useProgram(this.O)}}}}};v.prototype.ev=function(){var f= this.o,e=this.M,a=e.N;if(f.C.width!=f.ea.offsetWidth||f.C.height!=f.ea.offsetHeight)f.C.width=f.ea.offsetWidth,f.C.height=f.ea.offsetHeight;f.we&&(f.Rc(0),f.ic());if(f.S){var b=f.S;this.gk();b.clear(b.COLOR_BUFFER_BIT|b.DEPTH_BUFFER_BIT|b.STENCIL_BUFFER_BIT);b.disable(b.DEPTH_TEST);b.disable(b.CULL_FACE);b.useProgram(this.xh);var c=b.getUniformLocation(this.xh,"uRect");b.uniform2f(b.getUniformLocation(this.xh,"uCanvasDimensions"),f.C.width,f.C.height);b.activeTexture(b.TEXTURE0);b.bindBuffer(b.ELEMENT_ARRAY_BUFFER, this.xd);var h=b.getAttribLocation(this.xh,"aVertexPosition");b.disableVertexAttribArray(0);b.disableVertexAttribArray(1);b.disableVertexAttribArray(2);b.enableVertexAttribArray(h);b.bindBuffer(b.ARRAY_BUFFER,this.ff);b.vertexAttribPointer(h,2,b.FLOAT,!1,0,0);e.je=0;var m=100/f.fov.m;var n=a.width/a.height;h=f.C.height*m*n;m*=f.C.height;n=(f.pan.m/100/n-.5)*h+f.C.width/2;for(var q=(f.u.m/100-.5)*m+f.C.height/2,r,t,w,z=0;a.levels.length>=z+2&&a.levels[z+1].width>h;)z++;var A;var F=[];for(A=a.levels.length- 1;A>=z;){var E=a.levels[A];if(E.cache){var D={fx:0,fy:0};D.Id=E.Y-1;D.Jd=E.ta-1}else{D={};r=-q/m*(E.height/a.V);t=(-n+f.C.width)/h*(E.width/a.V);var C=(-q+f.C.height)/m*(E.height/a.V);D.fx=Math.min(Math.max(0,Math.floor(-n/h*(E.width/a.V))),E.Y-1);D.fy=Math.min(Math.max(0,Math.floor(r)),E.ta-1);D.Id=Math.min(Math.max(0,Math.floor(t)),E.Y-1);D.Jd=Math.min(Math.max(0,Math.floor(C)),E.ta-1)}F[A]=D;var G=!0;for(t=D.fy;t<=D.Jd;t++)for(r=D.fx;r<=D.Id;r++)w=r+t*E.Y,C=E.Ma[w],C||(C=new y.Zg,E.Ma[w]=C),this.$i()? C.N||(this.Aj(C,E,e.Jg(0,A,r,t)),f.ub=!0):e.je++,C.N&&C.N.complete||(G=!1),C.visible=!0;D.So=G;A--}for(A=a.levels.length-1;A>=z;){E=a.levels[A];if(F[A]&&0<=F[A].fx)for(D=F[A],t=D.fy;t<=D.Jd;t++)for(r=D.fx;r<=D.Id;r++)w=r+t*E.Y,(C=E.Ma[w])&&C.N&&C.N.complete&&(f=n+(-a.ib+a.V*r)*h/E.width,b.uniform4f(c,f,q+(-a.ib+a.V*t)*m/E.height,C.N.width*h/E.width,C.N.height*m/E.height),C&&C.Ob&&(b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.xd),b.bindTexture(b.TEXTURE_2D,C.Ob),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER, b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE),b.drawElements(b.TRIANGLES,6,b.UNSIGNED_SHORT,0)));A--}this.$l()}};v.prototype.Ef=function(){var f=this.o.S;if(f&&this.eb)for(;0v;v++)this.bg[v]=new x}}()})(ggP2VR||(ggP2VR={})); (function(y){y.Dq=function(){return function(){this.levels=[];this.Lj="0x000000";this.op=!1;this.Uo=this.To=.4;this.V=512;this.ib=1;this.Fl=0;this.Gl="";this.xp=this.height=this.width=0}}();y.Xm=function(){return function(){this.height=this.width=0;this.Df=this.cache=!1;this.ta=this.Y=0;this.loaded=!1;this.Ma=[]}}();y.Zg=function(){return function(){this.loaded=this.visible=!1;this.Le=this.Zl=0;this.ig=[];this.ol=0;this.mb=[];this.vj=this.Rh=this.Pa=0}}()})(ggP2VR||(ggP2VR={})); (function(y){var x=function(){function v(f,e){this.o=f;this.P=e;var a=this.__div=document.createElement("div");a.ggVisible=!0;var b=document.createElement("img");if(e.hd){var c=e.hd;b.setAttribute("style","position: absolute; width: "+e.gf+"px; height: "+e.yd+"px; top: -"+e.yd/2+"px; left: -"+e.gf/2+"px; cursor: pointer; "+f.lb+"user-select: none; max-width: none;")}else c="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA5xJREFUeNqclmlIVFEUx997TjrplFQW2WKBBSYtRFlpWUILSSsRZRQIBdGHCFqIoKIvQRsUFRJC9LEgaSFbMMpcWi1pLzOLsjItKms0U5t5/c/wH7nc5o2jF374xrv87z33nHOPaRsRtbFgDpgJxoD+wATfwDNQDK6CyrCr5OcbhgiGIRsUAZt4QTWoIFXgp9JfAhY7rgdBl8NeBoLDYBloA+dBOagFTcDHcVEgDgwBGWA+OAcugvXgvb5wKMGJoAAMp9BpUA96EBf/Btsf8BI8AWfAErAcpHHDZeriliY2AVwDg8AucAQ0Ag+I4XhTm2Oxz8PT46KMbTx5EZjuJDgAnAVusJUm9DhYwalFcc59sIXXIaceFkowDySBPTRPL20xm+b7zYXa+N3CPrWJ6GuwGySA40HLBHc/GywFhbS5R1lEBrZy7FQwiSaX9pmnqeAYt+KUcew7BVZw/QKTq0ocpYPVvDOXItZCk2xgDIZqL8BR8Ab0VDbr4yZOgLeIwzQx6WiQxcCt1+6sld66L4yYtFSwF4yg2dU7/cEwGW9YVkAwmycp1dzdpvgm0DcCh4kHmxWzBls0uBX4qqmZJ4KzePm1IeJLgjmlC16aDKZpp5Q168B3o6wsSwTHgU+MIUs74RSj6y1d+212HKimJlUE+tFRfJpYtOKNXWmJTASqWf2Bu/R6+4TKHOrOzG4IhptjWgHbGkZvepQ6SQK7oRuCXzjX1DJavBEX1ygfT8FgBqpfm1zRDcEKbR2bsZlkJCdXieB1ZhZ5YtqVgXIPN+m9kbY6hpdb+d9fPncJRmZmqQheZkemJmgxyxykl3XWJEkcAl7N21s7PDcl5ZJ0PAa3wVwmWtVbZafPwQ7wLozYB7ATPNJO56d/LAikP9u+66KNJS1d4IOZp7wU0hfLukUyzgwm70T2N/DOxIy/eFdqawa5DL2NEGwP5k15Ja4woz9glvcomd9NzyvkFcQo5gomaLfm5c0svnKZ2k7q7+FauvR2MJKZR3+sY5WgtvkdG6JyELGhNHMTXyGfLviRJ5Tcd4Dlhle7086Sgp8CqVxDkn4OqHaqacr5ekjy3Q/W0FRNNGmoMtamdzdxsytZC0lqXKhEgWPVVgImg2NgFT1MHOoOk3yLEtgWN5TEOYvoIFI1rGM19//2wpAD7imF7lfwENwAxaASNCj90pcLLKdC2Iyw1M9gnEplMEp5kOU1f8WwKGJm8oUr9f8JMAAVMDM6HSDa9QAAAABJRU5ErkJggg%3D%3D", b.setAttribute("style","position: absolute; width: 28px; height: 28px; top: -14px; left: -14px; cursor: pointer; "+f.lb+"user-select: none; max-width: none;");b.setAttribute("src",c);b.ondragstart=function(){return!1};a.appendChild(b);c="position:absolute;"+(f.lb+"user-select: none;");c+=f.lb+"touch-callout: none;";c+=f.lb+"tap-highlight-color: rgba(0,0,0,0);";f.Sc&&!f.oa&&(c+=f.lb+"transform: translateZ(9999999px);");a.setAttribute("style",c);a.onclick=function(){f.Oe(e);f.Ml(f.Va(e.url),e.target); f.ha&&f.ha.hotspotProxyClick&&f.ha.hotspotProxyClick(e.id,e.url);f.I("hsproxyclick",{id:e.id,url:e.url})};a.ondblclick=function(){f.ha&&f.ha.hotspotProxyDoubleClick&&f.ha.hotspotProxyDoubleClick(e.id,e.url);f.I("hsproxydblclick",{id:e.id,url:e.url})};var h=f.L.ck;if(h.enabled&&""!=e.title){var m=document.createElement("div");c="position:absolute;";c=e.hd?f.hl()?c+("top: -"+(e.yd/2+20)+"px;"):c+("top: "+e.yd/2+"px;"):f.hl()?c+"top:\t -50px;":c+"top:\t 20px;";c=h.qk?c+"white-space: pre-wrap;":c+"white-space: nowrap;"; c+=f.lb+"transform-origin: 50% 50%;";m.setAttribute("style",c+"visibility: hidden;overflow: hidden;padding: 0px 1px 0px 1px;");m.style.color=this.o.pa(h.dk,h.bk);m.style.backgroundColor=h.background?this.o.pa(h.Wb,h.Vb):"transparent";m.style.border="solid "+this.o.pa(h.Yb,h.Xb)+" "+h.Qi+"px";m.style.borderRadius=h.zk+"px";m.style.textAlign="center";0 uRadius) {\n alpha = 1.0;\n } else {\n alpha = 1.0 - ((uRadius - distFromCenter) / uSoftEdge);\n };\n }\n else {\n float alphaFromLeft = 1.0 - ((gl_FragCoord.x -(uIrisCenter.x - uRectDim.x)) / uSoftEdge);\n float alphaFromRight = 1.0 - (((uIrisCenter.x + uRectDim.x) - gl_FragCoord.x) / uSoftEdge);\n float alphaFromTop = 1.0 - ((gl_FragCoord.y -(uIrisCenter.y - uRectDim.y)) / uSoftEdge);\n float alphaFromBottom = 1.0 - (((uIrisCenter.y + uRectDim.y) - gl_FragCoord.y) / uSoftEdge);\n alpha = max(max(alphaFromLeft, alphaFromRight), max(alphaFromTop, alphaFromBottom));\n }\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, alpha);\n}\n"); f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.Ta=f.createProgram();f.attachShader(this.Ta,e);f.attachShader(this.Ta,a);f.linkProgram(this.Ta);f.getProgramParameter(this.Ta,f.LINK_STATUS)||alert("Could not initialise shaders");this.Ta.ka=f.getAttribLocation(this.Ta,"aVertexPosition");f.enableVertexAttribArray(this.Ta.ka);this.Ta.La=f.getAttribLocation(this.Ta,"aTextureCoord");f.enableVertexAttribArray(this.Ta.La);a=f.createShader(f.FRAGMENT_SHADER); f.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\nuniform float uPercent;\nuniform int uDirection;\nuniform vec2 uCanvasDimensions;\nuniform float uSoftEdge;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n float alpha = 0.0;\n if (uDirection == 1) {\n\t if (gl_FragCoord.x > uPercent) {\n alpha = 1.0; \n } else {\n alpha = 1.0 - ((uPercent - gl_FragCoord.x) / uSoftEdge);\n }\n }\n if (uDirection == 2) {\n\t if (gl_FragCoord.x < uCanvasDimensions.x - uPercent) {\n alpha = 1.0; \n } else {\n alpha = 1.0 - ((gl_FragCoord.x - (uCanvasDimensions.x - uPercent)) / uSoftEdge);\n }\n }\n if (uDirection == 3) {\n\t if (gl_FragCoord.y < uCanvasDimensions.y - uPercent) {\n alpha = 1.0; \n } else {\n alpha = 1.0 - ((gl_FragCoord.y - (uCanvasDimensions.y - uPercent)) / uSoftEdge);\n }\n }\n if (uDirection == 4) {\n\t if (gl_FragCoord.y > uPercent) {\n alpha = 1.0; \n } else {\n alpha = 1.0 - ((uPercent - gl_FragCoord.y) / uSoftEdge);\n }\n }\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, alpha);\n}\n"); f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.ab=f.createProgram();f.attachShader(this.ab,e);f.attachShader(this.ab,a);f.linkProgram(this.ab);f.getProgramParameter(this.ab,f.LINK_STATUS)||alert("Could not initialise shaders");this.ab.ka=f.getAttribLocation(this.ab,"aVertexPosition");f.enableVertexAttribArray(this.ab.ka);this.ab.La=f.getAttribLocation(this.ab,"aTextureCoord");f.enableVertexAttribArray(this.ab.La)};v.prototype.Rc=function(){var f= this.o.S;if(!f)return!1;if(this.Cc=f.createFramebuffer()){f.bindFramebuffer(f.FRAMEBUFFER,this.Cc);this.Cc.width=1024;this.Cc.height=1024;this.Jf=f.createTexture();f.bindTexture(f.TEXTURE_2D,this.Jf);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,f.LINEAR);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,f.LINEAR);f.texImage2D(f.TEXTURE_2D,0,f.RGBA,this.Cc.width,this.Cc.height,0,f.RGBA,f.UNSIGNED_BYTE,null);var e=f.createRenderbuffer();f.bindRenderbuffer(f.RENDERBUFFER,e);f.renderbufferStorage(f.RENDERBUFFER, f.DEPTH_COMPONENT16,this.Cc.width,this.Cc.height);f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_2D,this.Jf,0);f.framebufferRenderbuffer(f.FRAMEBUFFER,f.DEPTH_ATTACHMENT,f.RENDERBUFFER,e);f.bindTexture(f.TEXTURE_2D,null);f.bindRenderbuffer(f.RENDERBUFFER,null);f.bindFramebuffer(f.FRAMEBUFFER,null);this.xb=f.createBuffer();f.bindBuffer(f.ARRAY_BUFFER,this.xb);f.bufferData(f.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,-1,0,-1,1,0,1,1,0]),f.STATIC_DRAW);this.xb.itemSize=3;this.xb.numberOfItems= 4;this.wg=f.createBuffer();f.bindBuffer(f.ARRAY_BUFFER,this.wg);f.bufferData(f.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),f.STATIC_DRAW);return!0}return!1};v.prototype.Ol=function(f){var e=this.o.S,a=this.o.Cb;if(this.Md){e.useProgram(this.za);e.bindBuffer(e.ARRAY_BUFFER,this.xb);e.vertexAttribPointer(this.za.ka,this.xb.itemSize,e.FLOAT,!1,0,0);e.bindBuffer(e.ARRAY_BUFFER,this.wg);e.vertexAttribPointer(this.za.La,2,e.FLOAT,!1,0,0);e.enableVertexAttribArray(this.za.ka);e.enableVertexAttribArray(this.za.La); e.activeTexture(e.TEXTURE0);e.bindTexture(e.TEXTURE_2D,this.Jf);a=1+(this.Hb-1)*f;var b=e.getUniformLocation(this.za,"uAlpha");e.uniform1f(b,1);b=e.getUniformLocation(this.za,"uZoomIn");e.uniform1i(b,1);b=e.getUniformLocation(this.za,"uZoomCenter");var c=.5+(this.Vg-.5)*Math.sqrt(f),h=.5+(this.Wg-.5)*Math.sqrt(f);0>c-.5/a&&(c=.5/a);0>h-.5/a&&(h=.5/a);1c-.5/this.Hb&&(c=.5/this.Hb);0>h-.5/this.Hb&&(h=.5/this.Hb);1>16&255)/255,(this.Pf>>8&255)/255,(this.Pf&255)/255),b=e.getUniformLocation(this.jb,"uZoomIn"),e.uniform1i(b,1==this.da||2==this.da||6==this.da||7==this.da?1:0),b=e.getUniformLocation(this.jb,"uZoomCenter"),e.uniform2f(b,c,h),c=e.getUniformLocation(this.jb,"uZoomFactor"),e.uniform1f(c,this.Hb),e.uniform1i(e.getUniformLocation(this.jb,"uSampler"),0);else if("irisround"==this.type||"irisroundcenter"==this.type||"irisrectangular"==this.type||"irisrectangularcenter"==this.type){e.useProgram(this.Ta); e.bindBuffer(e.ARRAY_BUFFER,this.xb);e.vertexAttribPointer(this.Ta.ka,this.xb.itemSize,e.FLOAT,!1,0,0);e.bindBuffer(e.ARRAY_BUFFER,this.wg);e.vertexAttribPointer(this.Ta.La,2,e.FLOAT,!1,0,0);e.activeTexture(e.TEXTURE0);e.bindTexture(e.TEXTURE_2D,this.Jf);if(1==this.da||2==this.da||6==this.da||7==this.da||"irisroundcenter"==this.type||"irisrectangularcenter"==this.type)var m=b=.5;else b=this.Vg,m=this.Wg;var n=b*a.width,q=m*a.height;n=Math.max(n,a.width-n);q=Math.max(q,a.height-q);"irisround"==this.type|| "irisroundcenter"==this.type?e.uniform1f(e.getUniformLocation(this.Ta,"uRadius"),(Math.sqrt(n*n+q*q)+this.Zc)*f):(n>q?(q=a.height/a.width*n+this.Zc,n+=this.Zc):(n=a.width/a.height*q+this.Zc,q+=this.Zc),e.uniform2f(e.getUniformLocation(this.Ta,"uRectDim"),n*f,q*f));f=e.getUniformLocation(this.Ta,"uSoftEdge");e.uniform1f(f,this.Zc);e.uniform1i(e.getUniformLocation(this.Ta,"uRound"),"irisround"==this.type||"irisroundcenter"==this.type?1:0);e.uniform2f(e.getUniformLocation(this.Ta,"uIrisCenter"),b*a.width, m*a.height);b=e.getUniformLocation(this.Ta,"uZoomIn");e.uniform1i(b,1==this.da||2==this.da||6==this.da||7==this.da?1:0);b=e.getUniformLocation(this.Ta,"uZoomCenter");e.uniform2f(b,c,h);c=e.getUniformLocation(this.Ta,"uZoomFactor");e.uniform1f(c,this.Hb);e.uniform1i(e.getUniformLocation(this.Ta,"uSampler"),0)}else if("wipeleftright"==this.type||"wiperightleft"==this.type||"wipetopbottom"==this.type||"wipebottomtop"==this.type||"wiperandom"==this.type)e.useProgram(this.ab),e.bindBuffer(e.ARRAY_BUFFER, this.xb),e.vertexAttribPointer(this.ab.ka,this.xb.itemSize,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,this.wg),e.vertexAttribPointer(this.ab.La,2,e.FLOAT,!1,0,0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.Jf),e.uniform1f(e.getUniformLocation(this.ab,"uPercent"),3>this.Qk?f*(a.width+this.Zc):f*(a.height+this.Zc)),f=e.getUniformLocation(this.ab,"uSoftEdge"),e.uniform1f(f,this.Zc),e.uniform1i(e.getUniformLocation(this.ab,"uDirection"),this.Qk),e.uniform2f(e.getUniformLocation(this.ab, "uCanvasDimensions"),a.width,a.height),b=e.getUniformLocation(this.ab,"uZoomIn"),e.uniform1i(b,1==this.da||2==this.da||6==this.da||7==this.da?1:0),b=e.getUniformLocation(this.ab,"uZoomCenter"),e.uniform2f(b,c,h),c=e.getUniformLocation(this.ab,"uZoomFactor"),e.uniform1f(c,this.Hb),e.uniform1i(e.getUniformLocation(this.ab,"uSampler"),0);e.drawArrays(e.TRIANGLE_STRIP,0,this.xb.numberOfItems);e.useProgram(this.o.sa.O);e.disable(e.BLEND);e.enable(e.DEPTH_TEST)}};return v}();y.Bq=x})(ggP2VR||(ggP2VR={})); (function(y){var x=function(){function v(f){this.Gi=[];this.o=f;this.enabled=!1;this.Gb=2;this.zn=!1}v.prototype.Kn=function(f){if(2==f.mode||3==f.mode||5==f.mode){var e=this.o.ga.currentTime;if(f.vb&&f.vb.gain&&f.Mb&&f.Kb&&f.Lb){var a=f.Mb.gain.value,b=f.Kb.gain.value,c=f.Lb.gain.value;f.vb.gain.linearRampToValueAtTime(f.vb.gain.value,e);f.vb.gain.linearRampToValueAtTime(0,e+this.Gb);f.Mb.gain.linearRampToValueAtTime(a,e);f.Mb.gain.linearRampToValueAtTime(0,e+this.Gb);f.Kb.gain.linearRampToValueAtTime(b, e);f.Kb.gain.linearRampToValueAtTime(0,e+this.Gb);f.Lb.gain.linearRampToValueAtTime(c,e);f.Lb.gain.linearRampToValueAtTime(0,e+this.Gb)}}else e=this.o.ga.currentTime,f.Jb&&f.Jb.gain&&(f.Jb.gain.linearRampToValueAtTime(f.Jb.gain.value,e),f.Jb.gain.linearRampToValueAtTime(0,e+this.Gb));f.Yk=!0;setTimeout(function(){f.Me()},1E3*this.Gb+5)};v.prototype.Ou=function(){for(var f=0;fa.wa&&(a.wa=f)}1==f&&clearInterval(this.Ju)};return v}();y.Cq=x})(ggP2VR||(ggP2VR={})); (function(y){var x=function(){function v(f){this.Vh=[];this.vd=null;this.zc=[];this.lc=[];this.Ac=[];this.om=!0;this.o=f;this.kr()}v.prototype.Kh=function(){var f=this.o.S,e=f.createShader(f.VERTEX_SHADER);f.shaderSource(e,"attribute vec3 aVertexPosition;\nvoid main(void) {\n gl_Position = vec4(aVertexPosition, 1.0);\n}\n");f.compileShader(e);f.getShaderParameter(e,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(e)),e=null);var a=f.createShader(f.FRAGMENT_SHADER);f.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec4 vColor;\nuniform vec2 uCanvasDimensions;\nuniform vec2 uFlareCenterPosition;\nuniform float uBlindingValue;\nuniform float uAspectRatio;\nvoid main(void) {\n float canvasDiag = sqrt( (uCanvasDimensions.x * uCanvasDimensions.x) + (uCanvasDimensions.y * uCanvasDimensions.y) );\n vec2 diff = uFlareCenterPosition - gl_FragCoord.xy;\n diff.y = diff.y * uAspectRatio;\n float distFromFlarePoint = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n float factor = (distFromFlarePoint / canvasDiag) / 10.0;\n gl_FragColor = vec4(1.0, 1.0, 1.0, pow(((1.0 - factor) * 0.8) * uBlindingValue, 2.0));\n}\n"); f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.Ec=f.createProgram();f.attachShader(this.Ec,e);f.attachShader(this.Ec,a);f.linkProgram(this.Ec);f.getProgramParameter(this.Ec,f.LINK_STATUS)||alert("Could not initialise shaders");this.Ec.ka=f.getAttribLocation(this.Ec,"aVertexPosition");f.enableVertexAttribArray(this.Ec.ka);a=f.createShader(f.VERTEX_SHADER);e=f.createShader(f.VERTEX_SHADER);f.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\nvarying vec4 vColor;\nuniform vec2 uCirclePosition;\nuniform float uCircleRadius;\nuniform vec2 uCanvasDimensions2;\nuniform float uAspectRatio;\nvoid main(void) {\n vec2 circleOnScreen = aVertexPosition.xy * uCircleRadius + uCirclePosition;\n circleOnScreen.y = circleOnScreen.y / uAspectRatio;\n vec2 circleNorm = (circleOnScreen / uCanvasDimensions2) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(circleNorm.x, circleNorm.y, 0.0, 1.0);\n}\n"); f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);f.shaderSource(e,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\nvarying vec4 vColor;\nuniform vec2 uCirclePosition;\nuniform float uCircleRadius;\nuniform vec2 uCanvasDimensions2;\nuniform float uAspectRatio;\nvoid main(void) {\n vec2 circleOnScreen = aVertexPosition.xy * uCircleRadius + uCirclePosition;\n circleOnScreen.y = circleOnScreen.y / uAspectRatio;\n vec2 circleNorm = (circleOnScreen / uCanvasDimensions2) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(circleNorm.x, circleNorm.y, 0.0, 1.0);\n}\n"); f.compileShader(e);f.getShaderParameter(e,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(e)),a=null);var b=f.createShader(f.FRAGMENT_SHADER);f.shaderSource(b,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec4 vColor;\nuniform vec2 uCircleTexturePosition;\nuniform vec3 uCircleColor;\nuniform float uCircleRadius;\nuniform float uCircleAlpha;\nuniform float uCircleSoftness;\nuniform float uAspectRatio;\nvoid main(void) {\n vec2 diff = uCircleTexturePosition - gl_FragCoord.xy;\n diff.y = diff.y * uAspectRatio;\n float distFromCircleCenter = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n float softnessDistance = uCircleRadius * (1.0 - uCircleSoftness);\n if (distFromCircleCenter > uCircleRadius)\n {\n\t gl_FragColor = vec4(uCircleColor, 0.0);\n }\n else if (distFromCircleCenter <= (softnessDistance))\n {\n\t float factor = distFromCircleCenter / softnessDistance;\n\t gl_FragColor = vec4(uCircleColor, pow((1.0 - (0.2 * factor)) * uCircleAlpha, 1.8));\n }\n else\n {\n\t float factor = (distFromCircleCenter - softnessDistance) / (uCircleRadius - softnessDistance);\n\t gl_FragColor = vec4(uCircleColor, pow((0.8 - (0.8 * factor)) * uCircleAlpha, 1.8));\n }\n}\n"); f.compileShader(b);f.getShaderParameter(b,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(b)),b=null);this.Aa=f.createProgram();f.attachShader(this.Aa,a);f.attachShader(this.Aa,b);f.linkProgram(this.Aa);f.getProgramParameter(this.Aa,f.LINK_STATUS)||alert("Could not initialise shaders");this.Aa.ka=f.getAttribLocation(this.Aa,"aVertexPosition");f.enableVertexAttribArray(this.Aa.ka);a=f.createShader(f.FRAGMENT_SHADER);f.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec4 vColor;\nuniform vec2 uRingTexturePosition;\nuniform float uRingRadius;\nuniform float uRingAlpha;\nuniform float uAspectRatio;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec2 diff = uRingTexturePosition - gl_FragCoord.xy;\n diff.y = diff.y * uAspectRatio;\n float distFromRingCenter = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n float factor = distFromRingCenter / uRingRadius;\n if (distFromRingCenter > uRingRadius)\n {\n\t gl_FragColor = vec4(1.0, 1.0, 1.0, 0.0);\n }\n else\n {\n vec4 textureColor = texture2D(uSampler, vec2(factor / uAspectRatio, 0.5));\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, uRingAlpha);\n }\n}\n"); f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.Fb=f.createProgram();f.attachShader(this.Fb,e);f.attachShader(this.Fb,a);f.linkProgram(this.Fb);f.getProgramParameter(this.Fb,f.LINK_STATUS)||alert("Could not initialise shaders");this.Fb.ka=f.getAttribLocation(this.Fb,"aVertexPosition")};v.prototype.Rc=function(){var f=this.o.S;this.Vd=f.createBuffer();f.bindBuffer(f.ARRAY_BUFFER,this.Vd);f.bufferData(f.ARRAY_BUFFER,new Float32Array([-1,-1,0,1, -1,0,1,1,0,-1,1,0]),f.STATIC_DRAW);this.Vd.itemSize=3;this.Vd.numberOfItems=4;this.dg=f.createBuffer();f.bindBuffer(f.ARRAY_BUFFER,this.dg);for(var e=[0,0,0],a=2*Math.PI/6,b=Math.PI/180*35,c=1,h=b;h<=b+2*Math.PI;h+=a)e.push(Math.sin(h)),e.push(-Math.cos(h)),e.push(0),c++;f.bufferData(f.ARRAY_BUFFER,new Float32Array(e),f.STATIC_DRAW);this.dg.itemSize=3;this.dg.numberOfItems=c;this.Ap=f.createTexture();f.bindTexture(f.TEXTURE_2D,this.Ap);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,f.LINEAR);f.texParameteri(f.TEXTURE_2D, f.TEXTURE_MAG_FILTER,f.LINEAR);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,f.CLAMP_TO_EDGE);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,f.CLAMP_TO_EDGE);e=document.createElement("canvas");e.width=100;e.height=1;a=e.getContext("2d");a.width=100;a.height=1;b=a.createLinearGradient(0,0,100,0);b.addColorStop(0,this.o.pa(0,0));b.addColorStop(.88,this.o.pa(0,0));b.addColorStop(.9,this.o.pa(16654848,1));b.addColorStop(.92,this.o.pa(16776448,1));b.addColorStop(.94,this.o.pa(4849466,1));b.addColorStop(.96, this.o.pa(131071,1));b.addColorStop(.98,this.o.pa(8190,1));b.addColorStop(1,this.o.pa(0,0));a.fillStyle=b;a.fillRect(0,0,100,1);f.texImage2D(f.TEXTURE_2D,0,f.RGBA,f.RGBA,f.UNSIGNED_BYTE,e)};v.prototype.Qt=function(){for(;0a.z){h=-b/a.z;c=a.x*h;h*=a.y;var z=Math.max(n,q);Math.abs(c)q?n:q;z=w.jn/100*((E-F)/E);0>z&&(z=0);if(this.o.oa){f.useProgram(this.Ec);f.bindBuffer(f.ARRAY_BUFFER,this.o.D.xb);f.vertexAttribPointer(this.Ec.ka,this.o.D.xb.itemSize,f.FLOAT,!1,0,0);var D=f.getUniformLocation(this.Ec,"uCanvasDimensions");f.uniform2f(D,f.drawingBufferWidth,f.drawingBufferHeight);f.uniform2f(f.getUniformLocation(this.Ec, "uFlareCenterPosition"),f.drawingBufferWidth/n*c,q-f.drawingBufferHeight/q*h);f.uniform1f(f.getUniformLocation(this.Ec,"uBlindingValue"),z);D=f.getUniformLocation(this.Ec,"uAspectRatio");f.uniform1f(D,this.o.D.Fi?f.drawingBufferWidth/f.drawingBufferHeight:f.drawingBufferWidth/f.drawingBufferHeight/(n/q));f.drawArrays(f.TRIANGLE_STRIP,0,this.o.D.xb.numberOfItems)}else D=this.aa.createRadialGradient(c,h,1,c,h,A),D.addColorStop(0,"rgba(255, 255, 255, "+z+")"),D.addColorStop(.5,"rgba(255, 255, 255, "+ .8*z+")"),D.addColorStop(1,"rgba(255, 255, 255, "+.6*z+")"),this.aa.fillStyle=D,this.aa.fillRect(0,0,this.aa.width,this.aa.height);if(0!=Number(w.type)&&!this.o.D.Fi){z=n/2-c;A=q/2-h;var C=1,G=Number(w.type)-1;F<.35*E&&(C=F/(.35*E),C*=C);F>.7*E&&(C=(E-F)/(.3*E));C*=w.alpha/100;if(0H&&(H=0);var I=J.color;if(8==G||9==G||10==G)I=w.color;if(this.o.oa)f.useProgram(this.Aa),f.bindBuffer(f.ARRAY_BUFFER, this.dg),f.vertexAttribPointer(this.Aa.ka,this.dg.itemSize,f.FLOAT,!1,0,0),D=f.getUniformLocation(this.Aa,"uCanvasDimensions2"),f.uniform2f(D,f.drawingBufferWidth,f.drawingBufferHeight),f.uniform2f(f.getUniformLocation(this.Aa,"uCirclePosition"),f.drawingBufferWidth/n*(c+z*J.B),f.drawingBufferWidth/n*(q-(h+A*J.B))),f.uniform2f(f.getUniformLocation(this.Aa,"uCircleTexturePosition"),f.drawingBufferWidth/n*(c+z*J.B),q-(h+A*J.B)),f.uniform1f(f.getUniformLocation(this.Aa,"uCircleRadius"),E),f.uniform3f(f.getUniformLocation(this.Aa, "uCircleColor"),(I>>16&255)/255,(I>>8&255)/255,(I&255)/255),f.uniform1f(f.getUniformLocation(this.Aa,"uCircleAlpha"),H),f.uniform1f(f.getUniformLocation(this.Aa,"uCircleSoftness"),.1),D=f.getUniformLocation(this.Aa,"uAspectRatio"),f.uniform1f(D,f.drawingBufferWidth/f.drawingBufferHeight/(n/q)),f.drawArrays(f.TRIANGLE_FAN,0,this.dg.numberOfItems);else{this.aa.save();this.aa.translate(c+z*J.B,h+A*J.B);D=this.aa.createRadialGradient(0,0,1,0,0,1.1*E);D.addColorStop(0,this.o.pa(I,H));D.addColorStop(.65, this.o.pa(I,.9*H));D.addColorStop(.8,this.o.pa(I,.7*H));D.addColorStop(1,this.o.pa(I,.2*H));this.aa.beginPath();I=2*Math.PI/6;J=Math.PI/180*35;var L=!0;for(H=J;H<=J+2*Math.PI;H+=I)L?(this.aa.moveTo(E*Math.sin(H),E*Math.cos(H)),L=!1):this.aa.lineTo(E*Math.sin(H),E*Math.cos(H));this.aa.closePath();this.aa.fillStyle=D;this.aa.fill();this.aa.restore()}}if(0H&&(H=0);I=J.color;if(8==G||9==G||10==G)I=w.color;this.o.oa? (f.useProgram(this.Aa),f.bindBuffer(f.ARRAY_BUFFER,this.Vd),f.vertexAttribPointer(this.Aa.ka,this.Vd.itemSize,f.FLOAT,!1,0,0),D=f.getUniformLocation(this.Aa,"uCanvasDimensions2"),f.uniform2f(D,f.drawingBufferWidth,f.drawingBufferHeight),D=f.getUniformLocation(this.Aa,"uCirclePosition"),f.uniform2f(D,f.drawingBufferWidth/n*(c+z*J.B),f.drawingBufferWidth/n*(q-(h+A*J.B))),D=f.getUniformLocation(this.Aa,"uCircleTexturePosition"),f.uniform2f(D,f.drawingBufferWidth/n*(c+z*J.B),q-(h+A*J.B)),D=f.getUniformLocation(this.Aa, "uCircleRadius"),f.uniform1f(D,E),f.uniform3f(f.getUniformLocation(this.Aa,"uCircleColor"),(I>>16&255)/255,(I>>8&255)/255,(I&255)/255),f.uniform1f(f.getUniformLocation(this.Aa,"uCircleAlpha"),H),f.uniform1f(f.getUniformLocation(this.Aa,"uCircleSoftness"),J.H),D=f.getUniformLocation(this.Aa,"uAspectRatio"),f.uniform1f(D,f.drawingBufferWidth/f.drawingBufferHeight/(n/q)),f.drawArrays(f.TRIANGLE_FAN,0,this.Vd.numberOfItems)):(this.aa.save(),this.aa.translate(c+z*J.B,h+A*J.B),D=this.aa.createRadialGradient(0, 0,1,0,0,E),D.addColorStop(0,this.o.pa(I,H)),D.addColorStop(1-J.H,this.o.pa(I,.8*H)),D.addColorStop(1,this.o.pa(I,0)),this.aa.beginPath(),this.aa.arc(0,0,E,0,2*Math.PI,!1),this.aa.closePath(),this.aa.fillStyle=D,this.aa.fill(),this.aa.restore())}if(0H&&(H=0),this.o.oa?(f.useProgram(this.Fb),f.activeTexture(f.TEXTURE0),f.bindTexture(f.TEXTURE_2D,this.Ap),f.bindBuffer(f.ARRAY_BUFFER,this.Vd),f.vertexAttribPointer(this.Fb.ka, this.Vd.itemSize,f.FLOAT,!1,0,0),D=f.getUniformLocation(this.Fb,"uCanvasDimensions2"),f.uniform2f(D,n,q),D=f.getUniformLocation(this.Fb,"uCirclePosition"),f.uniform2f(D,c+z*w.B,q-(h+A*w.B)),D=f.getUniformLocation(this.Fb,"uRingTexturePosition"),f.uniform2f(D,f.drawingBufferWidth/n*(c+z*w.B),q-(h+A*w.B)),D=f.getUniformLocation(this.Fb,"uCircleRadius"),f.uniform1f(D,E),f.uniform2f(f.getUniformLocation(this.Fb,"uRingPosition"),c+z*w.B,q-(h+A*w.B)),f.uniform1f(f.getUniformLocation(this.Fb,"uRingRadius"), E),f.uniform1f(f.getUniformLocation(this.Fb,"uRingAlpha"),H),D=f.getUniformLocation(this.Fb,"uAspectRatio"),f.uniform1f(D,f.drawingBufferWidth/f.drawingBufferHeight/(n/q)),f.uniform1i(f.getUniformLocation(this.Fb,"uSampler"),0),f.drawArrays(f.TRIANGLE_FAN,0,this.Vd.numberOfItems)):(this.aa.save(),this.aa.translate(c+z*w.B,h+A*w.B),D=this.aa.createRadialGradient(0,0,0,0,0,E),D.addColorStop(0,this.o.pa(16777215,0)),D.addColorStop(.88,this.o.pa(0,0)),D.addColorStop(.9,this.o.pa(16654848,H)),D.addColorStop(.92, this.o.pa(16776448,H)),D.addColorStop(.94,this.o.pa(4849466,H)),D.addColorStop(.96,this.o.pa(131071,H)),D.addColorStop(.98,this.o.pa(8190,H)),D.addColorStop(1,this.o.pa(0,0)),this.aa.beginPath(),this.aa.arc(0,0,E,0,2*Math.PI,!1),this.aa.closePath(),this.aa.fillStyle=D,this.aa.fill(),this.aa.restore())}this.o.oa&&(f.useProgram(this.o.sa.O),f.disable(f.BLEND),f.enable(f.DEPTH_TEST))}}}};return v}();y.Aq=x})(ggP2VR||(ggP2VR={}));var THREE; (function(y){var x=function(){function v(f){this.wb=[];this.Ij=[];this.ca={x:0,y:0};this.Wc={x:0,y:0};this.ai=0;this.session=null;this.$k=!1;this.Qm=this.Pm=this.zf=0;this.vl=this.Rg=!1;this.pm=0;this.Dg=-5;this.Em=0;this.bj=this.cg=this.Cj=!1;this.o=null;this.bm=!0;this.fg=1;this.oj=[];this.frustumCulled=!1;this.Ih=0;this.Om=null;this.Fn=!0;this.Bk=this.uq=!1;this.Ee=[-1,-1,-1,-1];this.Fe=[-1,-1,-1,-1];this.vf=[!1,!1,!1,!1];this.Hc=[];this.xj=[];this.uf=[];this.o=f;var e=this;setTimeout(function(){if(window.WebXRPolyfill&& window.Promise){var a={cardboardConfig:{BUFFER_SCALE:1}};try{new window.WebXRPolyfill(a),f.G("WebXR Polyfill loaded!")}catch(b){f.Uc(b)}}e.Ts()},0);THREE?this.hn():console.log("Three.js not available!")}v.prototype.lr=function(){this.init();this.animate()};v.prototype.hn=function(){this.Am=new THREE.Matrix4;this.ep=new THREE.Euler};v.prototype.init=function(){"xr"in navigator||console.log("no WebXR support");if(THREE)if(this.Sa)console.log("already set up!");else{this.Am||this.hn();var f=this,e=this.o, a=this.mc=e.mc,b=this.Yt=new THREE.Scene,c=this.Eu=new THREE.Scene,h=this.camera=new THREE.PerspectiveCamera(100,window.innerWidth/window.innerHeight,.001,2E4);b.add(h);108>THREE.REVISION&&(this.frustumCulled=!0);h.position.z=-.01;h.position.y=0;h.position.x=0;this.Sa=h=new THREE.WebGLRenderer({depth:!0,logarithmicDepthBuffer:!0,alpha:!0,antialias:!0,stencil:!1});h.setClearColor(new THREE.Color(0),1);h.setPixelRatio(window.devicePixelRatio);h.setSize(window.innerWidth,window.innerHeight);h.outputEncoding= THREE.sRGBEncoding;h.shadowMap.enabled=!1;a.appendChild(h.domElement);"xr"in navigator&&(h.xr.enabled=!0,h.xr.setReferenceSpaceType("local"));var m=this.Lk=new THREE.Group;m.name="controllerGroup";m.renderOrder=3E3;a=this.Jk=h.xr.getController(0);a.addEventListener("selectstart",function(z){f.gp(z)});a.addEventListener("selectend",function(z){f.fp(z)});a.visible=!0;a.userData.Tf=0;m.add(a);var n=this.Kk=h.xr.getController(1);n.addEventListener("selectstart",function(z){f.gp(z)});n.addEventListener("selectend", function(z){f.fp(z)});n.visible=!0;n.userData.Tf=1;m.add(n);m.visible=!1;var q=this.Qe=new THREE.Group;q.name="skinGroup";q.translateZ(this.Dg);q.visible=!1;q.renderOrder=1E3;c.add(q);q=this.Dm=new THREE.Group;q.name="toggleSkinGroup";q.translateZ(this.Dg+.1);q.renderOrder=1100;c.add(q);c.add(m);q=(new THREE.TextureLoader).load("webxr/vrSkinShow.svg");var r=(new THREE.TextureLoader).load("webxr/vrSkinHide.svg");m=new THREE.PlaneBufferGeometry(.3,.3);q=new THREE.MeshBasicMaterial({map:q});q.transparent= !0;r=new THREE.MeshBasicMaterial({map:r});r.transparent=!0;m=new THREE.Mesh(m,q);m.name="SkinToggleButton";m.position.y=3.12;m.Hv=!1;m.userData.et=q;m.userData.dt=r;m.userData.onclick=function(){f.ri()};this.Tb=m;this.Tb.visible=!1;this.Dm.add(m);m=(new THREE.BufferGeometry).setFromPoints([new THREE.Vector3(0,0,0),new THREE.Vector3(0,0,-1)]);q=new THREE.LineBasicMaterial({color:14737632});m=new THREE.Line(m,q);m.name="line";m.scale.z=5;a.add(m.clone());n.add(m.clone());this.ni=new THREE.Raycaster; this.ca=new THREE.Vector2;this.Je=new THREE.Group;this.Je.name="panoGroup";e.ld||(this.Je.renderOrder=1);this.tf=new THREE.Group;this.tf.name="imageGroup";this.Ed=new THREE.Group;this.Ed.name="hotspotGroup";this.aj=new THREE.Group;this.aj.name="elementGroup";this.gh=new THREE.Group;this.gh.name="centerGroup";e.ld||(this.gh.renderOrder=2E3);this.Je.add(this.aj);this.Je.add(this.Ed);this.Je.add(this.tf);b.add(this.Je);b.add(this.gh);m=new THREE.BufferGeometry;e=[];a=[];for(n=0;20>n;n++)q=2*n*Math.PI/ 20,r=Math.cos(q),q=Math.sin(q),a.push(.03*r,.03*q,0),a.push(.05*r,.05*q,0);for(n=0;20>n;n++){q=2*n;r=2*n+1;var t=(n+1)%20*2+1,w=(n+1)%20*2;e.push(q,r,w);e.push(r,t,w)}m.setIndex(e);m.setAttribute("position",new THREE.Float32BufferAttribute(a,3));e=new THREE.MeshBasicMaterial({color:"black",side:THREE.DoubleSide});e=new THREE.Mesh(m,e);e.position.z=-5;this.gh.add(e);window.addEventListener("resize",function(){f.yt()},!1);document.addEventListener("mouseup",function(){f.ut()},!1);document.addEventListener("mousedown", function(z){f.st(z)},!1);document.addEventListener("mousemove",function(z){f.tt(z)},!1);Y&&"undefined"!==typeof __THREE_DEVTOOLS__&&(__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:b})),__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:c})),__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:h})))}else console.log("Three.js not available!")};v.prototype.Sp=function(){var f=this.o;f.G("VR not found");f.I("vrchanged",{});f.I("playerstatechanged",{})}; v.prototype.Du=function(){this.vl=!0;var f=this.o;f.G("XR found");f.I("vrchanged",{});f.I("playerstatechanged",{})};v.prototype.Ts=function(){if(!this.uq){this.uq=!0;var f=this;if("xr"in navigator)navigator.xr.isSessionSupported("immersive-vr").then(function(e){e?f.Du():f.Sp()})["catch"](f.Sp)}};v.prototype.kl=function(){return this.Qe};v.prototype.mg=function(){return null!=this.session?this.Sa.xr.isPresenting:this.o.me?!0:!1};v.prototype.rf=function(){return this.vl&&THREE};v.prototype.wt=function(f){var e= this;this.Ni();f.addEventListener("end",function(){e.vt()});console.log("XR Session started.");this.Sa.xr.setSession(f);this.$k=!0;this.session=f;e.o.I("entervr",{session:f})};v.prototype.vt=function(){console.log("XR Session ended.");this.$k=!1;this.session=null;this.Ik()};v.prototype.Yf=function(){var f=this.o;if(this.vl){if(null===this.session){var e=this;navigator.xr.requestSession("immersive-vr",{optionalFeatures:["local-floor","bounded-floor"]}).then(function(b){e.wt(b)})["catch"](function(b){console.log(b); console.warn("'immersive-vr' isn't supported, or an error occurred activating VR!");e.Ik()})}this.Ed&&this.Ed.translateY(-this.Ih);this.Ih=0;if(1==this.fg){var a=navigator.userAgent;0<=a.indexOf("OculusBrowser")&&(0<=a.indexOf("Pacific")&&(this.fg=1.7),0<=a.indexOf("Quest")&&(this.fg=1.5))}this.Sa.xr.setFramebufferScaleFactor(this.fg);f.Uc("Enter VR - scaled "+this.fg)}else this.Ni(),this.o.I("entervr",{session:null})};v.prototype.zt=function(){if(THREE&&this.Sa){var f=this.o;f.me=!0;f.$.style.display= "none";f.bb.style.display="none";this.Sa.domElement.style.display="inline";f.I("vrchanged",{});f.I("playerstatechanged",{})}};v.prototype.Ik=function(){if(THREE&&this.Sa){var f=this.o;f.me=!1;f.$.style.display="inline";f.bb.style.display="inline";this.Sa.domElement.style.display="none";f.Ag(0);f.ic();f.update();f.I("vrchanged",{});f.I("playerstatechanged",{});this.o.I("exitvr",{session:null});this.Gk()}};v.prototype.Zf=function(){null!=this.session&&this.session.end()};v.prototype.gq=function(){this.mg()? this.Zf():this.Yf()};v.prototype.yr=function(){var f=0,e=this.o,a=e.M.N;var b=1536;this.Sa&&e.G("Canvas: "+b);b*=Math.pow(2,0);if(0=f+2&&!a.levels[f+1].Df&&a.levels[f+1].width>b;)f++;e.G("Level "+f+" - width: "+a.levels[f].width);e.G(a.levels)}return f};v.prototype.ro=function(f){var e=this.o,a=e.M.N,b=e.Ue[f];f="";if(b){b=b.firstChild;for(var c;b;)"input"==b.nodeName&&(c=b)&&(c=0b;b++)a=f(a,"c","vr"),a=f(a,"s","vr"),a=f(a,"r",0),a=f(a,"l",0),a=f(a,"x",0),a=f(a,"y",0),a=f(a,"v",0),a=f(a,"h",0);return e.gb(a)};v.prototype.ceilPowerOfTwo=function(f){return Math.pow(2,Math.ceil(Math.log(f)/Math.LN2))};v.prototype.loadTexture=function(f,e,a){var b=new THREE.ImageLoader;b.setCrossOrigin(this.o.crossOrigin);var c=this;b.load(e,function(h){var m=c.ceilPowerOfTwo(h.width),n=c.ceilPowerOfTwo(h.height); f.encoding=THREE.sRGBEncoding;if(m==h.width&&n==h.height||!a)f.image=h;else{c.o.G("resizing "+h.width+"/"+h.height+" -> "+m+"/"+n);var q=document.createElement("canvas");q.width=m;q.height=n;q.getContext("2d").drawImage(h,0,0,m,n);f.image=q}f.needsUpdate=!0;f.xo=!0;f.ze&&f.ze.xo&&(f.Fh.visible=!0,f.ze.Fh.visible=!0)});this.oj.push(f)};v.prototype.Ni=function(){if(THREE){var f=this.o;if(this.Bk)f.G("vr panorama aleady added!");else{var e=this.tf,a=this;f.G("add vr panorama");this.Ef();this.camera.layers.enable(1); e.setRotationFromEuler(this.ep);e.rotateX(f.Ya.pitch*Math.PI/180);e.rotateZ(-f.Ya.W*Math.PI/180);var b=new THREE.SphereBufferGeometry(2E4/3*1.5,16,16),c=new THREE.Texture,h=new THREE.ImageLoader;h.setCrossOrigin(this.o.crossOrigin);h.load(this.ro(f.ej()),function(m){c.encoding=THREE.sRGBEncoding;c.image=m;c.needsUpdate=!0});h=new THREE.MeshBasicMaterial({map:c,side:THREE.DoubleSide});b=new THREE.Mesh(b,h);b.scale.x=-1;b.rotateZ(f.Ya.W*Math.PI/180);b.rotateX(-f.Ya.pitch*Math.PI/180);b.rotateY(-90* Math.PI/180);e.add(b);a.Mj=b;a.Bk=!0;setTimeout(function(){f.G("Adding Main Pano");a.Bk=!1;a.Oq();f.A.j?a.Rq():a.Pq();a.Mq()});this.St();this.bm=!0}}};v.prototype.Rq=function(){var f=this.o,e=this.tf,a=2E4/3;if(f.Fd){var b=new THREE.VideoTexture(f.A.j);b.wrapS=THREE.ClampToEdgeWrapping;b.wrapT=THREE.ClampToEdgeWrapping;b.minFilter=THREE.LinearFilter;b.encoding=THREE.sRGBEncoding;var c=new THREE.SphereBufferGeometry(a,60,40);c.scale(-1,1,1);for(var h=c.attributes.uv.array,m=1;mb)for(var n=e.levels[b],q=0;6>q;q++){a[q]=new THREE.Group;for(var r=0;rq?a[q].rotation.y=-q*Math.PI/2:a[q].rotation.x=(4==q?1:-1)*Math.PI/2;c.add(a[q])}else for(e=f.Kg,q=0;6>q;q++)for(a[q]=new THREE.Group,w=0;wq?a[q].rotation.y=-q*Math.PI/2:a[q].rotation.x=(4==q?1:-1)*Math.PI/2,c.add(a[q])};v.prototype.Oq=function(){var f=this.o,e=this.Ed;new y.Ua(0, 0,-100);for(var a=f.L.ck,b=0;b=c.distance?5:1>c.distance?1:5>c.distance?c.distance:5;if(c.hd){m=.005;var r=(new THREE.TextureLoader).load(c.hd);r.encoding=THREE.sRGBEncoding;var t=new THREE.MeshBasicMaterial({map:r});if(c.Kf){h=2*n*Math.tan(c.fov/2*Math.PI/180);var w=new THREE.PlaneBufferGeometry(h, h*c.yd/c.gf,1,1);t.transparent=!0;t.opacity=1}else w=new THREE.PlaneBufferGeometry(m*c.gf,m*c.yd,1,1),t.transparent=!0,t.opacity=.25;q=m*c.yd/2;t.side=THREE.DoubleSide}else w=new THREE.SphereBufferGeometry(.2,16,16),r=(new THREE.TextureLoader).load(this.ro(m)),r.encoding=THREE.sRGBEncoding,t=new THREE.MeshBasicMaterial({map:r}),t.transparent=!0,t.opacity=.25;h=new THREE.Mesh(w,t);m=c.title;if(a.enabled&&""!=m){w=document.createElement("canvas");w.width=256;w.height=32;r=w.getContext("2d");this.Ei|| (this.Ei=document.createElement("canvas"),this.Ei.width=w.width,this.Ei.height=w.height);var z=this.Ei.getContext("2d");z.clearRect(0,0,w.width,w.height);z.font="16px Helvetica";z.textAlign="center";z.textBaseline="top";t=z.measureText(m);var A=t.width;0f.userData.xi+1E3&&(f.userData.onclick? (f.userData.onclick(),f.userData.xi=-1):f.userData.P&&f.userData.P.url&&this.o.qd(f.userData.P.url,f.userData.P.target)):f.userData.xi=Date.now();while(!f.userData.stopPropagation&&(f=f.parent))};v.prototype.st=function(f){50>f.clientX&&50>f.clientY&&this.o.Zf();if(0f.position.z&&(f=this.wb[e]);e=f.userData;e.P?(f=e.P,this.o.qd(f.url,f.target)):(this.re(f,"onclick"),this.re(f,"onmousedown"))}else this.Wc.x=this.ca.x, this.Wc.y=this.ca.y};v.prototype.animate=function(){var f=this.Wo=this;this.Sa&&this.Sa.setAnimationLoop(function(){f.render()})};v.prototype.render=function(){if(THREE){var f=null;try{f=this.Sa.xr.getCamera(this.camera)}catch(t){}this.Om=f;0==this.Ih&&f&&(this.Ih=f.position.y,this.Ed.translateY(this.Ih));var e=this.Wo,a=e.o;if(a.me){e.Rg=e.Jk.visible||e.Kk.visible?!1:!0;var b=this.Ls();this.Ms();this.Mj&&0h&&(this.pi(20),this.Ee[c]=m,this.Fe[c]=n),.3h&&(this.ri(!0),this.Fe[c]=n,this.Ee[c]=m),.5m?(b=!0,-1!=this.uf[c]&&(this.uf[c]=-1,this.xj[c]=Date.now()-1E4)):this.uf[c]=0,0!=this.uf[c]&&400< Date.now()-this.xj[c]&&(this.xj[c]=Date.now(),this.pi(20*this.uf[c])),h.buttons[1].pressed?this.vf[c]||(this.vf[c]=!0,this.ri()):this.vf[c]=!1)}e.Lk.visible==(!this.Hc||0==this.Hc.length)&&(e.Lk.visible=!e.Lk.visible);return b};v.prototype.lp=function(f){for(f=f.parent;f;){if(f.selected)return!0;f=f.parent}return!1};v.prototype.Ms=function(){var f=this.Wo;f.Ij=f.wb.slice();f.Gk();f.Jk.visible&&f.intersectObjects(f.Jk);f.Kk.visible&&f.intersectObjects(f.Kk);f.$k||f.Us();f.Rg&&f.Vs();for(var e=0;e< f.wb.length;e++){var a=f.wb[e];f.Rg&&this.kn(a,!1);-1!=f.Ij.indexOf(a)||this.lp(a)||(this.re(a,"onmouseover"),this.Hc&&0e;)e+=360;for(;180e;)e+=360;for(;180e&&(this.fov.mode=Number(e),this.ef(),this.update())};f.prototype.hb=function(){return 2==this.o.Kd};f.prototype.Dk=function(e,a){this.Ab(this.Dd()+ e);a&&(this.fov.d=e)};f.prototype.Ri=function(e,a){if(!isNaN(e)){var b=e/90*Math.cos(Math.min(this.fov.m,90)*Math.PI/360);b=this.fov.m*Math.exp(b);this.Ab(b);a&&(this.fov.d=e)}};f.prototype.mm=function(e,a){this.na();isNaN(e)||(this.pan.m=e);isNaN(a)||(this.u.m=a);this.update()};f.prototype.Np=function(e,a,b){this.na();!isNaN(e)&&1E7>e&&-1E7a&&-1E7b&&-1E7e.width?1:3*e.width/(4*e.height)}return a};f.prototype.ui=function(e){this.Ab(this.ln(e))};f.prototype.im=function(e){var a=this.Z(),b=1/this.aspect();this.ui(this.Uf(a,b,e))};f.prototype.fm=function(e){var a=this.Z(),b=this.aspect();b=1/Math.sqrt(1+b*b);this.ui(this.Uf(a,b,e))};f.prototype.ef=function(){if(!this.o.me){var e=this.Rl;e.pan=this.pan.m;e.u=this.u.m;e.fov=this.fov.m;this.Sf(e);this.Sf(e);this.Sf(e);this.pan.m=e.pan;this.u.m=e.u;this.fov.m!=e.fov&&(this.fov.m= e.fov)}};f.prototype.Sf=function(e){var a=this.aspect();var b=this.o.C;var c=this.o,h=c.v;if(this.hb()){if(0a&&(e.fov=a);50e.u-m&&(e.u=-50+m));b>n?e.pan=0:(e.pan+b>n&&(e.pan=n- b,c.v.active&&(c.v.speed=-c.v.speed,this.pan.d=0)),e.pan-b<-n&&(e.pan=-n+b,h.active&&(h.speed=-h.speed,this.pan.d=0)))}else{0n&&(e.fov=n);12==this.Z()&&(2*b>q&&(e.fov=q/a),m=this.Nb()/2,2*m>q&&(e.fov=q),m=this.Nb()/2,b=a*m);2*m>this.u.max-this.u.min&&180>this.u.max-this.u.min&&(m=(this.u.max-this.u.min)/2,e.fov=this.ln(2*m));90>this.u.max?e.u+m>this.u.max&&(e.u=this.u.max-m):e.u>this.u.max&&(e.u=this.u.max);-90c&&(e.panthis.pan.max&&e.pan-360>this.pan.min&&(e.pan-=360),a=90,n=Math.tan(m*Math.PI/180),q=Math.tan((Math.abs(e.u)+m)*Math.PI/180),q=Math.sqrt(q*q+1)/Math.sqrt(n*n+1),m=180*Math.atan(q*Math.tan(b*Math.PI/180))/Math.PI,2*m>c&&(q=Math.tan(c*Math.PI/360)/Math.tan(b*Math.PI/180),c=q*Math.sqrt(n*n+1),q=Math.sqrt(c*c-1),a=180/Math.PI*Math.atan(q)),e.pan+m>this.pan.max&&(e.pan=this.pan.max-m,h.active&&(h.speed=-h.speed,this.pan.d=0)),e.pan-ma&&(e.u=a-b),e.u-b<-a&&(e.u=-a+b))}};f.prototype.Jg=function(e,a,b,c,h){var m=this.N.Fl-1-a,n=this.N.Gl,q="x";switch(e){case 0:q="f";break;case 1:q="r";break;case 2:q="b";break;case 3:q="l";break;case 4:q="u";break;case 5:q="d";break;case "vr":q="vr"}h&&(e+="l",q+="l");h=this.o.yp;for(var r=0;3>r;r++)n=h(n,"c",e),n=h(n,"s",q),n=h(n,"r",a),n=h(n,"l",m),n=h(n,"x",b),n=h(n,"y",c),n=h(n,"v",c),n=h(n,"h",b);return this.o.gb(n)};f.prototype.ts=function(e,a,b){b.fx=e.width/ this.N.V*a.zh;b.fy=e.height/this.N.V*a.Ah;b.Id=e.width/this.N.V*a.Xh;b.Jd=e.height/this.N.V*a.Yh;b.fx=Math.min(Math.max(0,Math.floor(b.fx)),e.Y-1);b.fy=Math.min(Math.max(0,Math.floor(b.fy)),e.ta-1);b.Id=Math.min(Math.max(0,Math.floor(b.Id)),e.Y-1);b.Jd=Math.min(Math.max(0,Math.floor(b.Jd)),e.ta-1)};f.prototype.dv=function(){if(!(6>this.cube.bg.length))for(var e=0;6>e;e++){var a=this.cube.bg[e];var b=[];b.push(new y.Ua(-1,-1,-1,0,0));b.push(new y.Ua(1,-1,-1,1,0));b.push(new y.Ua(1,1,-1,1,1));b.push(new y.Ua(-1, 1,-1,0,1));for(var c=0;4>c;c++)4>e?b[c].Oa(-Math.PI/2*e):b[c].Ka(Math.PI/2*(4==e?-1:1)),this.Ya&&(b[c].zb(this.Ya.W*Math.PI/180),b[c].Ka(-this.Ya.pitch*Math.PI/180)),b[c].Ff(-this.pan.m),b[c].de(this.u.m),b[c].Gf(this.W.m);b=this.o.Hk(b);a.pc=0=e+2&&!this.N.levels[e+1].Df&&this.N.levels[e+1].width>c;)e++;return e};f.prototype.Gt=function(){if(this.o.J.Cp&& this.o.J.$d){var e=this.Rl;e.pan=this.pan.m;e.u=this.u.m;e.fov=this.fov.m;this.Sf(e);this.Sf(e);this.Sf(e);var a=e.pan-this.pan.m,b=e.u-this.u.m;e=e.fov-this.fov.m;if(0!=a||0!=b||0!=e){var c=.2+.9*Math.min((Math.abs(a)+Math.abs(b)+Math.abs(e))/Math.abs(Math.min(this.fov.m,90))*.3,1);this.pan.m+=a*c;this.u.m+=b*c;this.fov.m+=e*c;this.o.la.cm=.3;this.update()}else this.o.la.cm=0}else this.ef();if(isNaN(this.pan.m)||1E7this.pan.m)this.pan.m=0;if(isNaN(this.u.m)||1E7 this.u.m)this.u.m=0;if(isNaN(this.W.m)||1E7this.W.m)this.W.m=0;if(!this.hb()){for(;360this.pan.m;)this.pan.m+=360}};return f}();y.Eq=v})(ggP2VR||(ggP2VR={}));var Y=!1; (function(y){var x=function(){return function(){this.fov=this.u=this.pan=0}}(),v=function(){return function(){this.un=-1E7;this.Co=!1}}(),f=function(){function e(a,b){this.Zs="TGljZW5zZTogUnV1ZCB2YW4gUmVlbmVu";this.M=new y.Eq(this);this.pan=this.M.pan;this.u=this.M.u;this.W=this.M.W;this.oc=this.M.oc;this.fov=this.M.fov;this.Kd=0;this.Ya=this.M.Ya;this.C={width:10,height:10};this.Pk=new y.Ua;this.crossOrigin="anonymous";this.Xd=this.Mf=0;this.gd=1;this.vq={};this.Fg=this.Fd=!1;this.Ra={};this.ji=this.oh="";this.Sl=[];this.Cl= !1;this.ja={start:{x:0,y:0},qa:{x:0,y:0},ae:{x:0,y:0},m:{x:0,y:0},ia:{x:0,y:0}};this.T={Wc:!1,jd:!1,tj:function(){return this.jd||this.Wc},Nn:0,startTime:0,start:{x:0,y:0},qa:{x:0,y:0},ae:{x:0,y:0},m:{x:0,y:0},ia:{x:0,y:0},hi:!1,Gg:null};this.kf=this.ve=!0;this.la={enabled:!0,qa:{x:0,y:0},ia:{x:0,y:0},cm:0,fov:{active:!1,nc:0,center:{enabled:!1,x:0,y:0}}};this.nb={alpha:0,beta:0,gamma:0,orientation:0,zf:0,oi:!0,fadeIn:0};this.Hh={alpha:0,beta:0,gamma:0,orientation:0};this.A={src:[],df:4,width:640, height:480,Tc:!1,ng:!1,Yj:!0,tm:!1,level:1,ue:"loop",ak:"",j:null,Bm:!1,texture:null,lk:null,Ci:null,qj:null,format:1,Gh:0,flipY:1,tb:function(){return 0},em:function(){},loop:function(){return!1}};this.wj=0;this.control=this.sb=this.Ia=this.$=this.Gc=this.bb=this.ea=null;this.wd=[];this.ub=!1;this.qh=1;this.va=null;this.oe=this.Xe=this.qf=!1;this.bh=0;this.Qd=.02;this.wk=0;this.xk=!1;this.vk=this.Oi=this.dh=this.We=this.en=0;this.cn=-1;this.xc="";this.am=this.Ne=!1;this.fi=0;this.mh=[];this.Nk=""; this.nh=[];this.Kg=this.Se=1;this.xg=!1;this.v={enabled:!1,timeout:5,active:!1,Eg:!1,speed:.4,ek:0,Bo:!1,Gj:0,cp:!0,tg:"",bp:!1,Sg:!1,sd:!1,Pi:"",sn:!1,Rd:"Animation01",Of:!1,Dj:!1,xm:!1,startTime:0,md:0,yh:!1,Xi:!1,zj:0,Hd:0,Th:0,Uh:0,Sh:0,Qo:0};this.F={active:!1,aborted:!1,speed:.1,pan:0,u:0,W:0,fov:70,Bi:70,Th:0,Uh:0,Ro:0,Sh:0,pb:0,ki:0,El:0,Lm:!1,sg:!1,bn:0,an:0,pj:!1};this.mk=null;this.wf={pan:-1,u:-1,fov:-1};this.Dl=0;this.Li=this.ha=null;this.Tg={};this.Ug={};this.Lf={};this.ob={};this.Ga= {};this.se=[];this.dn={};this.sc={};this.Vc={};this.qg={};this.L={mode:1,Qh:-1,Ca:0,kb:0,ud:.05,Yb:255,Xb:1,Wb:255,Vb:.3,Ce:!0,ck:{enabled:!0,width:180,height:20,dk:0,bk:1,background:!0,Wb:16777215,Vb:1,Yb:0,Xb:1,zk:3,Qi:1,qk:!0},Rb:[],Bc:[],rd:[],Wj:[]};this.Fa=null;this.K=[];this.Tp=!1;this.X=[];this.U=[];this.Xa=[];this.Ub=[];this.Ue=[];this.$a=[];this.xa=[];this.If=[];this.Yd=this.Xc=!1;this.wi=-1;this.ba=1;this.sa=this.Ke=this.$b=this.mc=null;this.vh={};this.Sb={};this.cq=this.Hg="";this.bq= -1;this.ga=null;this.At={target:0,current:0,ud:.01,delay:2,Uk:0,Yi:!1,Wq:!1};this.margin={left:0,top:0,right:0,bottom:0};this.J={Wh:!1,$s:!1,rc:!1,Ge:!1,$d:!0,Fo:!1,sm:1,Cp:!1,Nf:!0,Rk:!0,kh:!0,lh:!0,Vi:!1,kg:!1,Dp:!0,sensitivity:8};this.Zh=[];this.rh=!0;this.ca={x:0,y:0};this.Ji=this.Pg=this.Og=this.me=this.oa=!1;this.kk=this.kv=!0;this.sl=this.lv=!1;this.we=!0;this.Qg=this.pl=this.rl=!1;this.qq=!0;this.ul=!1;this.lb=this.qe="";this.bc="transition";this.Bd="transform";this.Wf="perspective";this.sr= "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYBgeACDAAADIAAE3iTbkAAAAAElFTkSuQmCC";this.Cb={width:0,height:0};this.Sn=new y.Ua;this.Rn=new y.Ua;this.Tn=new y.Ua;this.Un=new y.Ua;this.Qn=new y.Ua;this.Gd=!1;this.hc=this.Po=this.ra="";this.nk=[];this.Ll=[];this.Nh=this.Go=this.Lh=this.Ho=this.zl=this.ld=this.Ko=this.xl=this.dm=this.Sc=this.uj=this.lg=this.yl=this.Io=this.Al=this.Mo=this.nl=!1;this.Ii=!0;this.Qj=this.sj= !1;this.Jh=[15,0,0];this.devicePixelRatio=1;this.fa=this.D=null;this.hh=!1;this.Za=null;this.Ea={enabled:!1,speed:1,running:!1,finished:!0,Ad:{pan:0,u:0,fov:0,pb:0,pq:!1}};this.Kl=!1;this.Bj="<>";this.Km=!1;this.jh=function(h,m){if(0==h.length)return h;var n;var q=[];var r=m.Nj(h[0])-0;for(n=0;nA&&(A=0);1r||q.push(h[t]); q.push(F)}r=z}return q};this.Rl=new x;this.rm=0;this.mi="";this.yc=!1;this.yj=-1;this.$r=function(h){return h?this.Mh()&&(h.clientX||h.clientY)?{x:h.clientX,y:h.clientY}:h.pageX||h.pageY?{x:h.pageX,y:h.pageY}:h.clientX||h.clientY?{x:h.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,y:h.clientY+document.body.scrollTop+document.documentElement.scrollTop}:h.touches&&h.touches[0]?{x:h.touches[0].pageX,y:h.touches[0].pageY}:{x:0,y:0}:{x:0,y:0}};this.xe=function(h){h=this.$r(h);var m= this.Eh();return{x:h.x-m.x,y:h.y-m.y}};this.Fj=1;this.dj=this.No=this.Vk=this.Xl=this.Oj=0;this.Oo=!1;this.Cd=!0;this.tn=[5,0,0];this.fb=new y.Mi(this);this.fb.Ce=!1;this.En();if(7h&&""!=a[h]&&(c=a[h]))}if(b&&0=b&&(this.fa.blendtime=b));a.hasOwnProperty("waitfortransition")&&(this.fa.zoomoutpause=1==a.waitfortransition); a.hasOwnProperty("zoomedfov")&&(b=Number(a.zoomedfov),.01<=b&&50>=b&&(this.fa.zoomfov=b));a.hasOwnProperty("zoomafterinfov")&&(b=Number(a.zoomafterinfov),70<=b&&120>=b&&(this.fa.zoomafterinfov=b));a.hasOwnProperty("zoomafteroutoutfov")&&(b=Number(a.zoomafteroutfov),.01<=b&&70>=b&&(this.fa.zoomafteroutfov=b));a.hasOwnProperty("zoomspeed")&&(b=Number(a.zoomspeed),.01<=b&&99>=b&&(this.fa.zoomspeed=b));a.hasOwnProperty("dipcolor")&&(this.fa.blendcolor=a.dipcolor);a.hasOwnProperty("softedge")&&(a=Number(a.softedge), 0<=a&&1E3>=a&&(this.fa.softedge=a));this.hh||this.Mk()};e.prototype.rb=function(a,b,c){this.M.rb(a,b,c)};e.prototype.Z=function(){return this.M.Z()};e.prototype.Dh=function(){return this.M.Dh()};e.prototype.Ic=function(){return this.M.Ic()};e.prototype.kj=function(){return this.M.kj()};e.prototype.Ek=function(a,b){if(0!=a&&4!=a&&12!=a&&9!=a)this.Uc("Unsupported projection type: "+a);else if(this.oa||0==a||4==a||this.Uc("Projection changes require WebGL!"),this.Z()!=a){var c={};c.pan=this.pan.m;c.tilt= this.u.m;c.fov=this.fov.m;c.projection=a;c.timingFunction=3;c.speed=b;a=this.Bh(a);c.fov=Math.min(a,c.fov);this.Ej(c)}};e.prototype.addListener=function(a,b){(this.vh[a]=this.vh[a]||[]).push(b)};e.prototype.I=function(a,b){if(a=this.vh[a])for(var c=a.length,h=0;h>4;m=(m&15)<<4|n>>2;var r=(n&3)<<6|q;b+=String.fromCharCode(h);64!=n&&(b+=String.fromCharCode(m));64!=q&&(b+=String.fromCharCode(r))}while(c>3&7];if(!(n&64&&q)||m+q>c)return null;for(n&=63>>q;0Number(this.Yc))&&(this.ga=null);this.Sc&&!this.ld&&12<=Number(this.Yc)&&13>Number(this.Yc)&&(this.ga=null);this.Sc&&this.ld&&13== Number(this.Jh[0])&&(1==Number(this.Jh[1])||2<=Number(this.Jh[1]))&&(this.ga=null)}};e.prototype.G=function(a){if(Y){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a.toString()+"
");window.console&&window.console.log(a)}};e.prototype.Rm=function(a){if(Y){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a.toString()+"
");window.console&&window.console.warn(a)}};e.prototype.Uc=function(a){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a+"
");window.console&& window.console.log(a)};e.prototype.Kp=function(a){this.M.rg=a};e.prototype.setCrossOrigin=function(a){this.crossOrigin=a};e.prototype.cu=function(a){this.De=a};e.prototype.ks=function(){return this.fi};e.prototype.au=function(a){this.qe=a};e.prototype.$n=function(){return this.qe};e.prototype.hl=function(){return this.Nh};e.prototype.eo=function(){return this.ul};e.prototype.Qr=function(){return this.Gd};e.prototype.gs=function(){return this.Gd?this.mo().length:1};e.prototype.Nr=function(){return this.v.active}; e.prototype.eu=function(a){this.Nh=!!a};e.prototype.gj=function(){return this.isLoaded};e.prototype.Pr=function(){return!this.isLoaded};e.prototype.mf=function(){return Number(this.C.height)/(2*Math.tan(Math.PI/180*(this.Nb()/2)))};e.prototype.Pp=function(a,b){try{this.isFullscreen&&(a=window.innerWidth,b=window.innerHeight);var c=a-this.margin.left-this.margin.right,h=b-this.margin.top-this.margin.bottom;if(!(10>c||10>h)){var m=window.devicePixelRatio||1;this.xg&&(m=1);this.ea.style.width=c+"px"; this.ea.style.height=h+"px";this.ea.style.left=this.margin.left+"px";this.ea.style.top=this.margin.top+"px";if(this.oa)try{this.bb&&(this.bb.style.position="absolute",this.bb.style.display="inline",this.bb.style.width=c+"px",this.bb.style.height=h+"px",this.bb.width=c*m,this.bb.height=h*m),this.S&&(this.Cb.width=c*m,this.Cb.height=h*m,this.S.viewport(0,0,this.S.drawingBufferWidth,this.S.drawingBufferHeight))}catch(t){alert(t)}this.Gc&&(this.Gc.style.width=a+"px",this.Gc.style.height=b+"px",this.Gc.width= a,this.Gc.height=b);this.Ia&&(this.Ia.style.width=a+"px",this.Ia.style.height=b+"px",this.sb.style.width=a+"px",this.sb.style.height=b+"px",this.sb.width=a,this.sb.height=b,this.sb.style.left=this.margin.left+"px",this.sb.style.top=this.margin.top+"px",this.va&&this.va!=this.Ia&&(this.va.style.width=a+"px",this.va.style.height=b+"px"));if(this.Qa){var n=this.Qa.vd;n.style.width=a+"px";n.style.height=b+"px";n.width=a;n.height=b;n.style.left=this.margin.left+"px";n.style.top=this.margin.top+"px"}this.qf&& (this.ub=!0);var q=this.ea.offsetWidth,r=this.ea.offsetHeight;if(this.C.width!=q||this.C.height!=r)this.C.width=q,this.C.height=r;this.jv();this.va&&this.va.ggUpdateSize&&this.va.ggUpdateSize(a,b);this.I("sizechanged",{w:a,h:b});this.I("playerstatechanged",{})}}catch(t){this.Rm(t)}};e.prototype.le=function(){this.Km=!0};e.prototype.ic=function(){this.Pp(this.mc.offsetWidth,this.mc.offsetHeight)};e.prototype.Ds=function(){var a={width:0,height:0};a.width=this.C.width;a.height=this.C.height;return a}; e.prototype.Eh=function(){var a={x:0,y:0},b=this.ea.getBoundingClientRect();a.x=b.left;a.y=b.top;this.Sc&&14>Number(this.Yc)&&(a.x=b.left+window.scrollX,a.y=b.top+window.scrollY);return a};e.prototype.ru=function(a){this.ha=a};e.prototype.fu=function(a,b,c,h){this.margin.left=a;this.margin.top=b;this.margin.right=c;this.margin.bottom=h;this.ha=this.skinObj;this.Li=this.vrSkinObj;this.le()};e.prototype.er=function(a){0==a&&(this.J.$d=!1);1==a&&(this.J.$d=!0);2==a&&(this.J.$d=!this.J.$d);this.I("viewmodechanged", {});this.I("playerstatechanged",{})};e.prototype.Bs=function(){return 1==this.J.$d?1:0};e.prototype.pn=function(a,b){this.L.mode=1==b&&0c.index&&(a=b)}return a};e.prototype.fj=function(){var a="",b;for(b in this.sc){var c=this.sc[b];"file"==c.type&&1E4>c.index&&(a=b)}return a}; e.prototype.ds=function(a,b){"_firstfloorplan"==b&&(b=this.fj());var c=[];a||(a=this.ra);var h=this.se[a];h&&(a=h);""===a&&0a.z?(z=-b/a.z,w=a.x*z,z*=a.y,Math.abs(w)a.z?(z=-b/a.z,w=this.C.width/2+a.x*z,z=this.C.height/2+a.y*z):z=w=0,a.fc=w,a.Qb=z;r.Bf=A}}}this.I("hotspotsupdated",{})};e.prototype.Fr=function(){for(var a=[],b=0;bb&&(b=0);1>16&255)+","+(a>>8&255)+","+(a&255)+","+b+")"};e.prototype.Ct=function(){var a;if(this.sb&&(this.L.Qh!=this.L.mode&&(this.L.Qh=this.L.mode,this.sb.style.visibility=0=this.L.mode&&(b=0);3==this.L.mode&&(b=this.L.Ca);for(a=0;ac!=h.Qb>c&&b<(h.fc-q.fc)*(c-q.Qb)/(h.Qb-q.Qb)+q.fc&&(m=!m)}return m};e.prototype.Ui=function(a,b){var c=-1;if((0<=this.L.mode||0b||100>c)c=b=100;var h= window.devicePixelRatio||1;this.xg&&(h=1);this.ea.style.width=b+"px";this.ea.style.height=c+"px";this.bb.style.width=b+"px";this.bb.style.height=c+"px";this.bb.width=b*h;this.bb.height=c*h;this.bb.style.display="none";this.bb.style.touchAction="none";this.ea.insertBefore(this.bb,this.ea.firstChild);var m=this.vq;m.stencil=!0;m.depth=!0;m.powerPreference="high-performance";m.alpha=this.Sc?!0:!1;this.ld&&10<=this.Jh[0]&&(m.antialias=!1,m.alpha=!1);a={};a.flags=m;a.canvas=this.bb;this.I("beforewebglcontext", a);this.S=this.bb.getContext("webgl",m);this.S||(this.S=this.bb.getContext("experimental-webgl",m));if(this.S){var n=this.S;this.Cb.width=b*h;this.Cb.height=c*h;n.clearColor(0,0,0,0);n.enable(this.S.DEPTH_TEST);n.viewport(0,0,500,500);n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT);4096<=n.getParameter(n.MAX_TEXTURE_SIZE)&&!this.Nh&&(this.M.rg=1a&&-1E7b&&-1E7c&&-1E7c?Number(c):this.fov.m;this.F.speed=!isNaN(h)&&0=q? (this.zg(b,c,h),this.rb(m)):(a=new y.Tm,a.cb="__AutoMove",a.Re=this.ij(),a.zi=this.u.m,a.ge=this.fov.m,a.yi=this.Z(),a.Ld=b,a.ie=c,a.Ig=h,a.he=m,a.Xf=!1,a.hf=!1,a.jf=!1,0==n&&(a.hf=!0),1==n&&(a.Xf=!0,a.hf=!0),2==n&&(a.jf=!0),a.speed=q,this.F.an=this.R,this.R=this.Vn(a),this.F.bn=(new Date).getTime(),this.F.Lm=!0,this.F.active=!0,this.F.aborted=!1,this.F.pan=b,this.F.u=c,this.F.fov=h,this.oe=!1)};e.prototype.it=function(a){this.moveTo(this.pan.Ha,this.u.Ha,this.fov.Ha,a)};e.prototype.jt=function(a, b){var c={};c.pan=this.pan.Ha;c.tilt=this.u.Ha;c.fov=this.fov.Ha;c.projection=this.Dh();c.timingFunction=b;c.speed=a;this.Ej(c)};e.prototype.Nq=function(a,b,c,h){var m=new y.Mi(this);m.type="point";m.pan=b;m.u=c;m.id=a;m.j={};m.j.player=this;m.$f();m.j.hotspot=m;m.j.__div=document.createElement("div");m.j.__div.appendChild(h);this.K.push(m);m.j.__div.style.position="absolute";m.j.__div.style.left="-1000px";m.j.__div.style.top="-1000px";m.j.__div.ggVisible=!0;this.Ia.insertBefore(m.j.__div,this.Ia.firstChild); this.ub=!0};e.prototype.cv=function(a,b,c){for(var h=0;ha;)a+=360;b=h.Uq()}h={};h.pan=a;h.tilt=b;return h};e.prototype.Kc=function(a){return a==this.control||a&&void 0!==a.ggPermeableMap&& 1==a.ggPermeableMap?!0:a&&void 0!==a.ggPermeable&&0==a.ggPermeable?!1:a&&a.ggType&&("container"==a.ggType||"cloner"==a.ggType||"timer"==a.ggType)?!0:!1};e.prototype.Fk=function(a,b){var c=this.mf(),h,m;for(h=0;ht;t++){switch(t){case 0:r.init(-m,-w,0);break;case 1:r.init(m, -w,0);break;case 2:r.init(m,w,0);break;case 3:r.init(-m,w,0)}r.Ka(n.Ka*Math.PI/180);r.Oa(-n.Oa*Math.PI/180);r.zb(n.zb*Math.PI/180);--r.z;r.Ka(-n.u*Math.PI/180);r.Oa(n.pan*Math.PI/180);r.Oa(-this.pan.m*Math.PI/180);r.Ka(this.u.m*Math.PI/180);r.zb(this.W.m*Math.PI/180);q.push(r.clone())}q=this.Hk(q);if(0r.z?(w=-c/r.z,m=this.C.width/2+r.x*w,w=this.C.height/2+r.y*w):w=m=0,r.fc=m,r.Qb=w;if(y.kc.Ao(q,a,b))return n}}return null};e.prototype.nj=function(){return this.U.length+ this.Xa.length+this.Ub.length};e.prototype.ml=function(a){return athis.gd&&this.eg();this.$b= null;if(!this.J.rc&&!this.yc){a=a?a:window.event;if(a.which||0==a.which||1==a.which){var b=(new Date).getTime();if(this.Ke){this.$b=this.Ke;this.T.Wc=!0;this.T.startTime=b;a.stopPropagation();return}if(this.Kc(a.target)){var c;if((c=this.Fk(this.ca.x,this.ca.y))&&c.Ae&&(this.$b=c,void 0!==c.code&&""!==c.code&&c.pc))return;this.tq(a.pageX,a.pageY);this.T.Wc=!0;this.T.startTime=b;a.preventDefault();this.na(!0)}}this.ja.ia.x=0;this.ja.ia.y=0}};e.prototype.Ng=function(a,b,c){var h=this.L.ck;h.enabled&& (this.P!=this.fb&&0<=a&&0<=b&&""!=this.P.title?(this.Fa.innerHTML=this.Va(this.P.title),this.Fa.style.color=this.pa(h.dk,h.bk),this.Fa.style.backgroundColor=h.background?this.pa(h.Wb,h.Vb):"transparent",this.Fa.style.border="solid "+this.pa(h.Yb,h.Xb)+" "+h.Qi+"px",this.Fa.style.borderRadius=h.zk+"px",this.Fa.style.textAlign="center",0a-this.T.startTime&&0<=b&&20>b){var c=this.Ui(this.ca.x,this.ca.y);c&&this.iq(c);b=Math.abs(this.ja.ae.x-this.ja.qa.x)+Math.abs(this.ja.ae.y-this.ja.qa.y);var h=this.jj(this.ca.x,this.ca.y,!0);700>a-this.Ph&&0<=b&&20>b?(c?this.jq(c):this.J.Rk&&this.fk(),this.I("doubleclick",{pan:-Math.round(100*h.pan)/ 100,tilt:Math.round(100*h.tilt)/100}),this.Ph=0):(this.I("panoclick",{pan:-Math.round(100*h.pan)/100,tilt:Math.round(100*h.tilt)/100}),this.Ph=a);this.ja.ae.x=this.ja.qa.x;this.ja.ae.y=this.ja.qa.y}}};e.prototype.Xo=function(a){if(!this.J.Ge&&!this.yc&&(a=a?a:window.event,this.Kc(a.target))){var b=a.detail?-1*a.detail:a.wheelDelta/40;this.J.Fo&&(b=-b);a.axis&&(-1==this.yj?this.yj=a.axis:this.yj!=a.axis&&(b=0));var c=0Math.abs(a.wheelDeltaY)&& (b=0);0!=b&&(this.J.Nf?this.mn(c*this.J.sm,this.xe(a),!0):this.Ri(c*this.J.sm,!0),this.update());a.preventDefault();this.na(!0)}};e.prototype.Zu=function(a){a||(a=window.event);var b=a.touches,c=this.Eh();this.ca.x=b[0].clientX-c.x;this.ca.y=b[0].clientY-c.y;this.Te=this.$b=null;window.focus();this.ul||(this.ul=!0,this.I("hastouch",{}),this.I("playerstatechanged",{}));!this.Ko&&(this.ve||this.kf&&this.lg)&&7>this.gd&&this.eg();if(!this.J.rc&&!this.yc)if(c=(new Date).getTime(),this.Ke)this.$b=this.Ke, this.T.jd=!0,this.T.startTime=c,a.preventDefault(),this.T.hi=!0,b[0]&&(this.Bb=b[0].target);else{if(!this.T.jd&&b[0]){this.T.startTime=c;this.T.start.x=b[0].pageX;this.T.start.y=b[0].pageY;this.T.qa.x=b[0].pageX;this.T.qa.y=b[0].pageY;c=this.Bb=b[0].target;if(this.Kc(c)){var h;(h=this.Fk(this.ca.x,this.ca.y))&&h.Ae&&(this.$b=h);if(h=this.Ui(this.ca.x,this.ca.y))this.G(h),this.Te=h,this.Rj(h),this.xe(a),this.Ng(this.ca.x,this.ca.y,!0);this.tq(b[0].pageX,b[0].pageY);this.T.Nn=b[0].identifier;this.T.jd= !0;a.preventDefault();this.T.hi=!0;this.na(!0)}if(c){h=!1;if(null!=this.T.Gg)for(var m=this.T.Gg;m&&m!=this.control;){if(m.onmouseout)m.onmouseout(a);m=m.parentNode}m=c;for(var n=!0;m&&m!=this.control;)c!=this.T.Gg&&m.onmouseover&&(m.onmouseover(a),7<=this.gd&&this.Kc(a)&&(h=!0)),m.onmousedown&&(m.onmousedown(a),n=!1,h=!0),m.onclick&&(n=!1),m=m.parentNode;this.T.Gg=n&&7<=this.gd&&c!=this.T.Gg?c:null;h&&(a.preventDefault(),this.T.hi=!0)}}1this.fov.max&&(this.la.fov.nc=this.fov.max),this.la.fov.nch){b=!0;if(this.Bb){var n=this.Bb;for(h=function(){if(n.onclick){var r=n;setTimeout(function(){r.onclick(a)},0);"hotspot"!=n.Cv&&(m=!0);b=!1}n=n.parentNode};n&&n!=this.control;)h()}h=Math.abs(this.T.ae.x-this.T.qa.x)+Math.abs(this.T.ae.y-this.T.qa.y);if(700>c-this.Ph&&0<=h&&20>h){if(this.Kc(this.Bb))if(a.preventDefault(), this.Te)this.jq(this.Te);else if(this.J.Rk){var q=this;setTimeout(function(){q.fk()},1)}if(this.Bb)for(n=this.Bb;n&&n!=this.control;)n.ondblclick&&(n.ondblclick(),m=!0,b=!1),n=n.parentNode;this.Ph=0}else this.Ph=c;this.T.ae.x=this.T.qa.x;this.T.ae.y=this.T.qa.y}if(this.Bb)for(n=this.Bb;n&&n!=this.control;)this.T.Gg!=this.Bb&&n.onmouseout&&(n.onmouseout(a),7<=this.gd&&(m=!0)),n.onmouseup&&(n.onmouseup(a),7<=this.gd&&(m=!0)),n=n.parentNode;m&&a.preventDefault();this.xe(a);this.Te&&(this.Ng(-1,-1,!0), b&&this.iq(this.Te));this.Bb=null;this.T.jd=!1;this.Rj(this.fb);this.Te=null}};e.prototype.Wu=function(a){this.J.rc||this.yc||(this.T.jd=!1);this.Te=null;this.Rj(this.fb);this.xe(a);this.Ng(-1,-1,!0)};e.prototype.Lo=function(){return null!=this.Bb||this.T.jd||this.T.Wc};e.prototype.Yo=function(a){if(!this.yf&&window.MSGesture){var b=window.MSGesture;this.G("setup gesture");this.yf=new b;this.yf.target=this.control}this.yf&&this.yf.addPointer(a.pointerId)};e.prototype.Xn=function(a){this.rl=!0;this.Fj= 1;this.J.rc||this.J.Ge||this.yc||(a.touches?(this.Bb=a.touches.target,this.Kc(a.target)&&(a.preventDefault(),this.fov.prev=this.fov.m,this.na(!0))):(a.preventDefault(),this.fov.prev=this.fov.m,this.na(!0)))};e.prototype.Ar=function(a){if(!this.J.rc&&!this.J.Ge&&!this.yc&&this.Kc(a.target)){a.preventDefault();this.la.fov.active=!0;this.la.fov.center.enabled=!0;var b=this.xe(a);this.la.fov.center.x=b.x;this.la.fov.center.y=b.y;this.la.fov.nc=this.fov.prev/Math.sqrt(a.scale);4==this.Z()&&2!=this.Kd&& this.la.fov.nc>this.fov.max&&(this.la.fov.nc=this.fov.max);this.update();this.na(!0)}};e.prototype.kt=function(a){this.J.rc||this.J.Ge||this.yc||(a.preventDefault(),1!=a.scale&&(this.la.fov.active=!0,this.Fj*=a.scale,this.la.fov.center.enabled=!0,a=this.xe(a),this.la.fov.center.x=a.x,this.la.fov.center.y=a.y,this.la.fov.nc=this.fov.prev/Math.sqrt(this.Fj),4==this.Z()&&2!=this.Kd&&this.la.fov.nc>this.fov.max&&(this.la.fov.nc=this.fov.max),this.update(),this.na(!0)))};e.prototype.Wn=function(a){this.J.rc|| this.J.Ge||this.yc||(this.la.fov.active=!1,a.preventDefault(),this.na(!0),this.yf&&this.yf.reset&&this.yf.reset())};e.prototype.Ws=function(a){this.J.Wh||this.yc||(this.isFullscreen&&a.preventDefault(),this.wj=a.keyCode,this.na(!0))};e.prototype.Xs=function(a){this.wj&&(this.wj=0,a.preventDefault())};e.prototype.rt=function(){this.wj=0};e.prototype.ci=function(){this.isFullscreen&&(this.Mh()||this.exitFullscreen(),this.Mh()&&(this.$.style.left="0px",this.$.style.top="0px"))};e.prototype.xt=function(a, b,c,h){h?(this.Hh.alpha=a,this.Hh.beta=b,this.Hh.gamma=c,this.Hh.gamma+=90):(this.nb.alpha=a,this.nb.beta=b,this.nb.gamma=c,this.nb.gamma+=90);this.nb.orientation=window.orientation?1*parseInt(""+window.orientation,10):0;c=new y.Vm;a=this.nb;c.Ff(-a.alpha);c.Gf(-a.beta);c.de(-a.gamma);c.Gf(90-a.orientation);1>c.Pb?-1this.nb.fadeIn&&(this.nb.fadeIn+=1,m=.1*this.nb.fadeIn);c=-c+this.nb.zf;this.ee(m*c+(1-m)*this.nf());this.fe(m*a+(1-m)*this.gg());this.qq?this.Ag(m*b+(1-m)*this.lj()):this.Ag(0);this.ef();this.F.active=h}};e.prototype.iq=function(a){this.ha&&this.ha.hotspotProxyClick&&this.ha.hotspotProxyClick(a.id,a.url);this.I("hsproxyclick",{id:this.P.id,url:this.P.url}); ""!=a.url&&(this.Ml(a.url,a.target),this.Ng(-1,-1,!1))};e.prototype.jq=function(a){this.ha&&this.ha.hotspotProxyDoubleClick&&this.ha.hotspotProxyDoubleClick(a.id,a.url);this.I("hsproxydblclick",{id:this.P.id,url:this.P.url})};e.prototype.lf=function(){return Math.min(1,2*Math.tan(Math.PI*Math.min(this.fov.m,90)/360))};e.prototype.kp=function(){var a=this;setTimeout(function(){a.kp()},100);9!=a.Oj||a.sj||window.requestAnimationFrame(function(){a.di();a.G("restart recover timer")});10t;)t+=360}c=t-q;this.hb()||(180c&&(c+=360));this.pan.m+=c*this.Qd}else this.pan.m=t;this.v.Th=this.pan.m;break;case 1:q=this.u.m;this.oe&&3!=r.type?(h=t-q,this.u.m+=h*this.Qd):this.u.m=t;this.v.Uh=this.u.m;break;case 2:q=this.fov.m,this.oe&&3!=r.type?(m=t-q,this.fov.m+=m*this.Qd):this.fov.m=t,this.v.Sh=this.fov.m}}t=this.Z();for(b=Math.floor(a);!this.cc(b,3)&&0a?(t=this.Bh(this.dh),this.fov.m>t?this.Oi=a:(n=(a-this.Oi)/this.vk,n=Math.min(1,n),this.rb(this.Z(), this.dh,1-n))):(0==b.Gb||n>b.Gb-.3?this.rb(b.value):(n/=b.Gb,this.rb(t,b.value,1-n)),this.v.Qo=b.value);this.oe&&(t=Math.sqrt(c*c+h*h+m*m),.3>t&&(this.oe=!1,this.Qd=.02,this.bh=0),0this.bh&&(this.Qd+=.01,this.Qd=Math.min(this.Qd,1)),this.bh=t)}c=Math.floor(a);h=this.Br(c);for(m=0;mn.$m)c!=this.cn&&(t=n.td,this.Sb.hasOwnProperty(t)&&(b=this.Sb[t].type,0==b?this.Pe(t,n.Mm):1==b?this.Pe(t,n.value):2==b&&this.Pe(t,"true"==n.Mm)));else if(b=this.cc(this.qo(a,n.qb, n.td),n.qb,n.td),t=(t=this.lo(b))?this.Yn(b,t,a):b.value,n=n.td.split("|"),2==n.length)for(b=n[0],n=n[1],r=0;r=this.$a.length&& (b=0),a=this.$a[b];while(""!=this.v.tg&&!this.Ch(a).tags.includes(this.v.tg)&&a!=this.ra);return a};e.prototype.Ft=function(a){var b=this.F.speed;this.F.El&&(b=b*(a.getTime()-this.F.El)/60);this.F.El=a.getTime();this.v.yh&&(this.sa.ready()||4==this.Z())&&this.gj()&&(this.v.yh=!1,this.v.active=!0,this.Ea.running=!0,this.Ea.finished=!1);if(this.F.active||0!=this.F.pb&&this.sa.ready()){if(this.F.Lm&&"__AutoMove"==this.R.cb){var c=a.getTime()-this.F.bn;b=c/100;if(b>=this.R.length){if(this.vi(this.R.length), this.xa.splice(this.xa.indexOf(this.R),1),this.F.active=!1,this.R=this.F.an,this.F.pb=0,this.zg(this.F.pan,this.F.u,this.F.fov),this.pan.ac=this.F.pan,this.u.ac=this.F.u,this.F.sg&&(this.F.sg=!1,this.v.Dj=!0,this.v.sd=!0,this.v.active=!0,this.I("autorotatechanged",{})),this.onMoveComplete)this.onMoveComplete()}else this.vi(b)}else{this.pan.d=this.F.pan-this.pan.m;if(!this.hb()&&360==this.pan.max-this.pan.min){for(;-180>this.pan.d;)this.pan.d+=360;for(;1805*c?c/h:.2,this.pan.d*=h,this.u.d*=h,this.fov.d*=h;this.pan.m+=this.pan.d;this.u.m+=this.u.d;this.W.m+=this.W.d;this.J.Nf&&this.fov.Oc.enabled?this.gm(this.fov.m+this.fov.d,this.fov.Oc):this.fov.m+=this.fov.d;0!=this.F.pb&&(this.F.pb!=this.Z()?(b=this.Bh(this.F.pb),this.Dd()>b?(this.fov.m+=-Math.max((2.5-1.7*Math.min(Math.sqrt(this.pan.d* this.pan.d+this.u.d*this.u.d+this.W.d*this.W.d)/c,1))*c,this.fov.d)-this.fov.d,this.F.fov=this.fov.m):(this.rb(this.F.pb,this.Z(),0),this.G("New projection from Target:"+this.Z()),this.F.ki=0,this.sa.rj())):1>this.F.ki?(this.F.ki=Math.min(1,this.F.ki+.05*b),this.rb(this.Z(),this.Ic(),this.F.ki)):(this.rb(this.Z(),0,0),this.F.pb=0,this.sa.rj()))}this.og=a.getTime();this.update()}else if(this.v.active&&!this.D.ke){c=a.getTime()-this.v.startTime;this.v.zjthis.A.j.duration-this.A.j.currentTime&&(this.xk=!0);for(;h>=10*this.We;)h-=10*this.We}if(!m&&b>=this.R.length||m&&!c&&b>=this.R.length||m&&c&&(this.R.cb!=this.R.$o||this.R.Zo!=this.ra)&&b>=this.R.length){this.vi(this.R.length);this.v.Hd=0;this.Xe=!1;if(this.Ea.running){this.Fp(); return}if(this.v.sn){c=0;do b=this.dn[this.R.Ye],h=Math.floor(Math.random()*Object.keys(b).length),h=b[h],this.xc=h.cliptitle,b=h.nodeid,h=h.startview,c++;while(b==this.ra&&10>c)}else this.xc=this.R.$o,b=this.R.Zo,h=this.R.ot;this.xc==this.R.cb&&this.ra==b?1c.pan;)c.pan+=360}c.tilt=h.value;c.fov=m.value;c.projection=n?n.value:4}c.timingFunction=3;c.speed=1;this.F.sg=!0;this.Ej(c);this.v.active=!0}}else 0=1E3*this.v.Gj?11E3*this.v.timeout&&!this.v.yh&&(this.v.Eg&&this.gj()||!this.v.Eg)&&(this.v.active=!0,this.v.startTime=a.getTime(),this.v.md=0,this.I("autorotatechanged",{}),this.pan.d=0,this.u.d=0,this.fov.d=0,this.fov.Oc.enabled=!1),!this.la.enabled||this.T.tj()||0==this.pan.d&&0==this.u.d&&0==this.fov.d||(this.F.pj=!0,this.pan.d*=.9,this.u.d*=.9,this.fov.d*=.9,this.pan.m+=this.pan.d,this.u.m+= this.u.d,this.J.Nf&&this.fov.Oc.enabled?this.mn(this.fov.d,this.fov.Oc):this.Ri(this.fov.d),1E-4>this.pan.d*this.pan.d+this.u.d*this.u.d+this.fov.d*this.fov.d&&(this.pan.d=0,this.u.d=0,this.fov.d=0,this.fov.Oc.enabled=!1),this.update())};e.prototype.kq=function(a){var b=this.D;b.$c=!1;"previewtrack"==b.delay&&2!=this.Kd||"videopano"==b.delay&&!this.A.j?0=1E3*b.delay&&(b.Yi=!1):(b.current+=b.ud,0>b.current&&(b.current=0,b.ud=-b.ud,b.Yi=!0,b.Uk=a.getTime()),1b.Bc[a]?(b.Bc[a]+=.05,b.rd[a]b.Bc[a]&&(b.Bc[a]=b.rd[a],-1!=b.Wj.indexOf(b.Rb[a])&&(b.Wj.splice(b.Wj.indexOf(b.Rb[a]),1),b.Rb.splice(a,1),b.rd.splice(a,1),b.Bc.splice(a,1)))));this.update()}if(2==b.mode)for(a=0;ac.Ca?(c.Ca+=b.ud,c.kbc.Ca&&(c.Ca=c.kb)),this.update())}3== b.mode&&b.kb!=b.Ca&&(b.kb>b.Ca?(b.Ca+=b.ud,b.kbb.Ca&&(b.Ca=b.kb)),this.update())};e.prototype.Jt=function(){var a=this.la;this.T.tj()&&(this.J.$d?(a.ia.x=.4*(this.ja.qa.x-a.qa.x),a.ia.y=.4*(this.ja.qa.y-a.qa.y),a.qa.x+=a.ia.x,a.qa.y+=a.ia.y):(a.ia.x=.1*-this.ja.ia.x*this.J.sensitivity/8,a.ia.y=.1*-this.ja.ia.y*this.J.sensitivity/8),this.rq(a.ia.x,a.ia.y),this.update());a.fov.active&&(this.J.Nf&&a.fov.center.enabled?this.$q(.4*(a.fov.nc-this.fov.m),a.fov.center): this.Dk(.4*(a.fov.nc-this.fov.m)),.001>Math.abs(a.fov.nc-this.fov.m)/this.fov.m&&(a.fov.active=!1),this.update());if(a.enabled&&(0!=a.ia.x||0!=a.ia.y)&&!this.T.tj()){var b=.9*(1-a.cm);a.ia.x*=b;a.ia.y*=b;this.F.pj=!0;.01>a.ia.x*a.ia.x+a.ia.y*a.ia.y?(a.ia.x=0,a.ia.y=0):(this.rq(a.ia.x,a.ia.y),this.update())}};e.prototype.It=function(){if(!this.gj()&&this.qf&&5"+e.Cn(this.Bj).replace(/./gm,function(r){return"&#"+r.charCodeAt(0)+";"})),h.setAttribute("style","color: black; text-decoration: none;"),a.appendChild(h),m.appendChild(a));c.$.insertBefore(c.zd,c.$.firstChild);m.onclick=function(){c.zd&&(c.$.removeChild(c.zd),c.zd=null)};m.oncontextmenu=m.onclick}};e.prototype.Vq=function(){var a=this;var b=a.Ia;a.control=b;a.control=b;setTimeout(function(){a.di()}, 10);setTimeout(function(){a.kp()},200);setTimeout(function(){a.le();a.Hi()},10);b.addEventListener&&(b.addEventListener("touchstart",function(c){a.Zu(c)},!1),b.addEventListener("touchmove",function(c){a.Yu(c)},!1),b.addEventListener("touchend",function(c){a.Xu(c)},!1),b.addEventListener("touchcancel",function(c){a.Wu(c)},!1),b.addEventListener("pointerdown",function(c){a.Yo(c)},!1),b.addEventListener("MSPointerDown",function(c){a.Yo(c)},!1),b.addEventListener("MSGestureStart",function(c){a.Xn(c)}, !1),b.addEventListener("MSGestureEnd",function(c){a.Wn(c)},!1),b.addEventListener("MSGestureChange",function(c){a.kt(c)},!1),b.addEventListener("gesturestart",function(c){a.Xn(c)},!1),b.addEventListener("gesturechange",function(c){a.Ar(c)},!1),b.addEventListener("gestureend",function(c){a.Wn(c)},!1),b.addEventListener("mousedown",function(c){a.ht(c)},!1),b.addEventListener("mousemove",function(c){a.gt(c)},!1),document.addEventListener("mouseup",function(c){a.ft(c)},!1),b.addEventListener("mousewheel", function(c){a.Xo(c)},!1),b.addEventListener("DOMMouseScroll",function(c){a.Xo(c)},!1),document.addEventListener("keydown",function(c){a.Ws(c)},!1),document.addEventListener("keyup",function(c){a.Xs(c)},!1),window.addEventListener("resize",function(){a.le()},!1),a.mc.addEventListener("resize",function(){a.le()},!1),window.addEventListener("blur",function(){a.rt()},!1),a.$.addEventListener("webkitfullscreenchange",function(){a.ci()},!1),document.addEventListener("mozfullscreenchange",function(){a.ci()}, !1),window.addEventListener("webkitfullscreenchange",function(){a.ci()},!1),document.addEventListener("MSFullscreenChange",function(){a.ci()},!1),document.addEventListener("fullscreenchange",function(){a.ci()},!1));b.oncontextmenu=function(c){void 0===c&&(c=window.event);return c.target&&!a.Kc(c.target)?!0:c.ctrlKey?!0:(c=a.xe(c),a.Cu(c.x,c.y),!1)};window.addEventListener("deviceorientation",function(c){a.xt(c.alpha,c.beta,c.gamma,c.absolute);null!=c.alpha&&null!=c.beta&&null!=c.gamma&&0==a.pl&&(a.pl= !0,a.I("gyroavailable",{available:!0}),a.I("playerstatechanged",{}))})};e.prototype.Zm=function(){for(var a=0;ab&&(b=0),b>h.eh.duration&& (b=h.eh.duration-.1),h.Zq(b)):h.j&&(0>b&&(b=0),b>h.j.duration&&(b=h.j.duration-.1),h.j.currentTime=b))}};e.prototype.Hu=function(a,b){a=this.Wa(a);0h&&(h=0);"_videopanorama"===a&&this.A.j&&(this.A.j.volume=h,this.A.level=h);if("_main"===a){this.ba=h;for(c=0;cc&&(c=0);this.ba=c;for(h=0;hc&&(c=0),n.level=c,n.j&&null!=n.j.volume&&(n.j.volume=c*this.ba))}}}catch(q){this.G(q)}};e.prototype.lm=function(a,b){if("_main"===a||"_all"===a||"_videopanorama"===a)"_all"===a&&(b=(this.Xc=1==b||-1==b&&!this.Xc?!0:!1)?1:0),this.A.j&&(this.A.j.muted=-1==b?!this.A.j.muted:1==b);a=this.Wa("_main"===a||"_all"===a?".*": a);for(var c=0;cthis.gd&&0==c.mode||this.If.push(c);this.U=b;this.Xa=[];this.Ub=[];this.A.j&&(this.$.removeChild(this.A.j),this.A.j=null,a=this.Wa("_videopanorama"), 0a.h?a.w:a.h};e.prototype.Wl=function(a,b){a=(new DOMParser).parseFromString(a,"text/xml");this.qp(a,b)};e.prototype.pp=function(a,b,c){try{var h=void 0;h=new XMLHttpRequest;h.open("GET",a,!1);h.send(null);if(h.responseXML){var m= a.lastIndexOf("/");0<=m&&(this.qe=a.slice(0,m+1));2<=arguments.length&&null!=b&&(this.qe=b);this.Wl(h.responseText,c)}else alert("Error loading panorama XML")}catch(n){alert("Error:"+n)}};e.prototype.Ot=function(a,b,c,h){var m=new XMLHttpRequest;var n=this;m.onload=function(q){if(4<=m.readyState)if(m.responseXML){var r=a.lastIndexOf("/");0<=r&&(n.qe=a.slice(0,r+1));3<=arguments.length&&null!=c&&(n.qe=c);n.Wl(m.responseText,h);b&&b()}else alert("Error loading panorama XML");else console.error("Wrong state loading XML:"+ m.statusText)};m.onerror=function(){console.error("Error loading XML:"+m.statusText)};m.open("GET",a,!0);m.send(null)};e.prototype.Ck=function(a){var b="";"{"==a.charAt(0)&&(b=a.slice(1,a.length-1));(a=this.se[b])&&(b=a);a={oldNodeId:this.ra,nodeId:b};this.I("beforechangenodeid",a);this.nl?this.nl=!1:this.Ll.push(this.ra);""!=this.ra&&-1==this.nk.indexOf(this.ra)&&(this.nk.push(this.ra),this.I("changevisitednodes",{}));this.Po=this.ra;this.ra=b;this.G("change active node: "+b);this.ha&&this.ha.changeActiveNode&& this.ha.changeActiveNode("{"+b+"}");this.I("changenodeid",a);this.kf=!0};e.prototype.ej=function(){return this.ra};e.prototype.bs=function(a){return 0=this.$a.length&&(a=0),this.$a[a]):""};e.prototype.os=function(a){return 0a&&(a=this.$a.length-1),this.$a[a]):""};e.prototype.Tr=function(){return this.Po};e.prototype.ss=function(){return this.hc};e.prototype.pt=function(a){return-1!= this.nk.indexOf(a)};e.prototype.ir=function(){this.nk=[];this.I("changevisitednodes",{})};e.prototype.qp=function(a,b){a=a.firstChild;this.Ue=[];this.$a=[];this.se=[];this.Yd=!1;var c;if(c=a.getAttributeNode("appversion")){if(c=c.nodeValue.toString().match(/(\d+)\.(\d+)\.?(\d+)?/))this.tn=[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3]||"0",10)];this.G(this.tn)}for(var h=a.firstChild;h;){if("map"==h.nodeName){var m={};(c=h.getAttributeNode("index"))&&(m.index=Number(c.nodeValue));(c=h.getAttributeNode("title"))&& (m.title=c.nodeValue.toString());c=h.getAttributeNode("type");m.type=c.nodeValue.toString();"web"==m.type?(c=h.getAttributeNode("mapprovider"),m.mapprovider=c.nodeValue.toString(),(c=h.getAttributeNode("mapstyle"))&&(m.mapstyle=c.nodeValue.toString()),(c=h.getAttributeNode("googlecustomstylecode"))&&(m.googlecustomstylecode=c.nodeValue.toString()),(c=h.getAttributeNode("mapurltemplate"))&&(m.mapurltemplate=c.nodeValue.toString()),(c=h.getAttributeNode("mapmaxzoom"))&&(m.mapmaxzoom=Number(c.nodeValue)), (c=h.getAttributeNode("customlayernames"))&&(m.customlayernames=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("customlayerurltemplates"))&&(m.customlayerurltemplates=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("customlayermaxzooms"))&&(m.customlayermaxzooms=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("mapkey"))&&(m.mapkey=c.nodeValue.toString()),(c=h.getAttributeNode("styleurl"))&&(m.styleurl=c.nodeValue.toString()),(c=h.getAttributeNode("mapboxlayernames"))&& (m.mapboxlayernames=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("mapboxlayerstyleurls"))&&(m.mapboxlayerstyleurls=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("googlelayernames"))&&(m.googlelayernames=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("googlelayerstyles"))&&(m.googlelayerstyles=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("maplimits"))&&(m.maplimits=c.nodeValue.toString().split("|"))):(c=h.getAttributeNode("width"),m.width=Number(c.nodeValue), c=h.getAttributeNode("height"),m.height=Number(c.nodeValue),c=h.getAttributeNode("zoomlevels"),m.zoomlevels=Number(c.nodeValue),c=h.getAttributeNode("tileformat"),m.tileformat=c.nodeValue.toString(),c=h.getAttributeNode("bgcolor"),m.bgcolor=c.nodeValue.toString(),c=h.getAttributeNode("crispedges"),m.crispedges=1==c.nodeValue,c=h.getAttributeNode("transparent"),m.transparent=1==c.nodeValue,c=h.getAttributeNode("floorplannorth"),m.floorplannorth=Number(c.nodeValue));c=h.getAttributeNode("id");this.sc[c.nodeValue.toString()]= m}h=h.nextSibling}if("tour"==a.nodeName){this.Gd=!0;if(c=a.getAttributeNode("start"))this.hc=c.nodeValue.toString();this.hasOwnProperty("startNode")&&this.startNode&&(this.hc=String(this.startNode),this.startNode="");this.hasOwnProperty("startView")&&this.startView&&("object"===typeof this.startView&&null!==this.startView?b=this.startView:""!=this.startView&&(b=String(this.startView)),this.startView="");h=a.firstChild;for(a=m="";h;){if("panorama"==h.nodeName){if(c=h.getAttributeNode("id"))m=c.nodeValue.toString(), ""==this.hc&&(this.hc=m),""==a&&(a=m),this.Ue[m]=h,this.$a.push(m);for(c=h.firstChild;c;){if("userdata"==c.nodeName){var n=this.ag(c);this.Ug[m]=n;m==this.hc&&(this.Ug._first=n);n.customnodeid&&(this.se[n.customnodeid]=m);this.Vc[m]=this.Hn(c);this.qg[m]=this.In(c);this.Lf[m]=this.Jn(c)}if("hotspots"==c.nodeName)for(n=c.firstChild;n;)"hotspot"!=n.nodeName&&"polyhotspot"!=n.nodeName||this.Wk(m,c),n=n.nextSibling;if("sounds"==c.nodeName||"media"==c.nodeName)for(n=c.firstChild;n;){"sound"!=n.nodeName|| this.Kl||(this.Yd=!0);if("video"==n.nodeName){var q;(q=n.getAttributeNode("level"))&&0this.fov.min&&(this.fov.min=1E-20),m=t.getAttributeNode("fovpixel"),this.fov.$h=1*(m?m.nodeValue:0));if("max"==t.nodeName){m=t.getAttributeNode("pan");this.pan.max=1*(m?m.nodeValue:0);m=t.getAttributeNode("tilt");this.u.max=1*(m?m.nodeValue:90);m=t.getAttributeNode("fov");this.fov.max=1*(m?m.nodeValue:120);180<= this.fov.max&&(this.fov.max=179.9);if(m=t.getAttributeNode("fovstereographic"))this.fov.Jl=1*m.nodeValue;if(m=t.getAttributeNode("fovfisheye"))this.fov.Il=1*m.nodeValue;if(m=t.getAttributeNode("scaletofit"))this.J.Dp=1==m.nodeValue}if("flyin"==t.nodeName){if(m=t.getAttributeNode("projection"))this.oc.pb=Number(m.nodeValue);if(m=t.getAttributeNode("pan"))this.oc.pan=parseFloat(m.nodeValue);if(m=t.getAttributeNode("tilt"))this.oc.u=parseFloat(m.nodeValue);if(m=t.getAttributeNode("fov"))this.oc.fov= parseFloat(m.nodeValue)}t=t.nextSibling}}if("autorotate"==h.nodeName){if(m=h.getAttributeNode("speed"))this.v.speed=1*m.nodeValue;if(m=h.getAttributeNode("delay"))this.v.timeout=1*m.nodeValue;if(m=h.getAttributeNode("returntohorizon"))this.v.ek=1*m.nodeValue;if(m=h.getAttributeNode("horizonfromdefview"))this.v.Bo=1==m.nodeValue;if(m=h.getAttributeNode("nodedelay"))this.v.Gj=1*m.nodeValue;if(m=h.getAttributeNode("noderandom"))this.v.cp=1==m.nodeValue;(m=h.getAttributeNode("nodefilter"))&&!this.v.bp&& (this.v.tg=m.nodeValue);this.Cd&&(this.v.enabled=!0,this.v.Of=!0,this.v.active=!1);(m=h.getAttributeNode("startloaded"))&&this.Cd&&(this.v.Eg=1==m.nodeValue,this.v.Eg&&(this.v.active=!1));if(m=h.getAttributeNode("useanimation"))this.v.Sg=1==m.nodeValue,this.v.sd=this.v.Sg;if(m=h.getAttributeNode("syncanimationwithvideo"))this.v.xm=1==m.nodeValue}if("animation"==h.nodeName){if(m=h.getAttributeNode("syncanimationwithvideo"))this.v.xm=1==m.nodeValue;if(m=h.getAttributeNode("useinautorotation"))this.v.Sg= 1==m.nodeValue;if(m=h.getAttributeNode("animsequence"))this.v.Pi=m.nodeValue,this.Cd&&(this.v.Rd=this.v.Pi);if(m=h.getAttributeNode("clipsrandom"))this.v.sn=1==m.nodeValue;this.xa=[];for(t=h.firstChild;t;){if("clip"==t.nodeName){this.R=new y.Um;if(m=t.getAttributeNode("animtitle"))this.R.Ye=m.nodeValue.toString();if(m=t.getAttributeNode("cliptitle"))this.R.cb=m.nodeValue.toString();if(m=t.getAttributeNode("nodeid"))this.R.Ev=m.nodeValue.toString();if(m=t.getAttributeNode("length"))this.R.length=Number(m.nodeValue); if(m=t.getAttributeNode("animtype"))this.R.Sq=Number(m.nodeValue);if(m=t.getAttributeNode("nextcliptitle"))this.R.$o=m.nodeValue.toString();if(m=t.getAttributeNode("nextclipnodeid"))this.R.Zo=m.nodeValue.toString();if(m=t.getAttributeNode("nextclipstartview"))this.R.ot=m.nodeValue.toString();if(m=t.getAttributeNode("transitiontype"))this.R.$u=Number(m.nodeValue);var w=t.firstChild;for(this.R.Ja=[];w;){if("keyframe"==w.nodeName){var z=new y.fd;if(m=w.getAttributeNode("time"))z.time=Number(m.nodeValue); if(m=w.getAttributeNode("value"))z.value=Number(m.nodeValue);if(m=w.getAttributeNode("valuestring"))z.Mm=m.nodeValue.toString();if(m=w.getAttributeNode("transitiontime"))z.Gb=Number(m.nodeValue);m=w.getAttributeNode("type");var A=0;m&&(z.type=Number(m.nodeValue),A=Number(m.nodeValue));if(m=w.getAttributeNode("property"))z.qb=Number(m.nodeValue);if(m=w.getAttributeNode("additionaltrackid"))z.td=m.nodeValue.toString();if(m=w.getAttributeNode("additionaltracktype"))z.$m=Number(m.nodeValue);if(1==A|| 2==A){if(m=w.getAttributeNode("bezierintime"))z.$e=Number(m.nodeValue);if(m=w.getAttributeNode("bezierinvalue"))z.af=Number(m.nodeValue);if(m=w.getAttributeNode("bezierouttime"))z.bf=Number(m.nodeValue);if(m=w.getAttributeNode("bezieroutvalue"))z.cf=Number(m.nodeValue)}this.R.Ja.push(z)}w=w.nextSibling}this.xa.push(this.R);"__VideoPano"==this.R.cb&&(this.mk=this.R)}t=t.nextSibling}}"input"==h.nodeName&&(n||(n=h));if(n)for(w=0;6>w;w++)m=n.getAttributeNode("prev"+w+"url"),this.nh[w]=m?String(m.nodeValue): "";"altinput"==h.nodeName&&(t=0,(m=h.getAttributeNode("screensize"))&&(t=1*m.nodeValue),0q&&(q=t,n=h));if("control"==h.nodeName&&this.Cd){if(m=h.getAttributeNode("simulatemass"))this.la.enabled=1==m.nodeValue;if(m=h.getAttributeNode("rubberband"))this.J.Cp=1==m.nodeValue;if(m=h.getAttributeNode("zoomcentercursor"))this.J.Nf=1==m.nodeValue;if(m=h.getAttributeNode("locked"))this.J.rc=1==m.nodeValue;m&&(this.J.Wh=1==m.nodeValue);if(m=h.getAttributeNode("lockedmouse"))this.J.rc=1== m.nodeValue;if(m=h.getAttributeNode("lockedkeyboard"))this.J.Wh=1==m.nodeValue;if(m=h.getAttributeNode("lockedkeyboardzoom"))this.J.$s=1==m.nodeValue;if(m=h.getAttributeNode("lockedwheel"))this.J.Ge=1==m.nodeValue;if(m=h.getAttributeNode("invertwheel"))this.J.Fo=1==m.nodeValue;if(m=h.getAttributeNode("speedwheel"))this.J.sm=1*m.nodeValue;if(m=h.getAttributeNode("invertcontrol"))this.J.$d=1==m.nodeValue;if(m=h.getAttributeNode("sensitivity"))this.J.sensitivity=1*m.nodeValue,1>this.J.sensitivity&&(this.J.sensitivity= 1);if(m=h.getAttributeNode("dblclickfullscreen"))this.J.Rk=1==m.nodeValue;if(m=h.getAttributeNode("contextfullscreen"))this.J.kh=1==m.nodeValue;if(m=h.getAttributeNode("contextvr"))this.J.lh=1==m.nodeValue;if(m=h.getAttributeNode("contextprojections"))this.J.Vi=1==m.nodeValue;if(m=h.getAttributeNode("hideabout"))this.J.kg=1==m.nodeValue;for(t=h.firstChild;t;)"menulink"==t.nodeName&&(w={text:"",url:""},m=t.getAttributeNode("text"),w.text=m.nodeValue,m=t.getAttributeNode("url"),w.url=m.nodeValue,this.Zh.push(w)), t=t.nextSibling}"vr"==h.nodeName&&this.Cd&&(m=h.getAttributeNode("toggleskinbutton"))&&(this.Da.Fn=1==m.nodeValue);if("transition"==h.nodeName&&this.Cd){if(m=h.getAttributeNode("enabled"))this.D.enabled=1==m.nodeValue;if(m=h.getAttributeNode("blendtime"))this.D.fh=1*m.nodeValue;if(m=h.getAttributeNode("blendcolor"))this.D.Pf=m.nodeValue.toString();if(m=h.getAttributeNode("type"))this.D.type=m.nodeValue.toString();if(m=h.getAttributeNode("delay"))this.D.delay=m.nodeValue.toString();if(m=h.getAttributeNode("softedge"))this.D.Zc= 1*m.nodeValue;if(m=h.getAttributeNode("zoomin"))this.D.da=1*m.nodeValue;if(m=h.getAttributeNode("zoomout"))this.D.ed=1*m.nodeValue;if(m=h.getAttributeNode("zoomfov"))this.D.tk=1*m.nodeValue;if(m=h.getAttributeNode("zoomafterinfov"))this.D.rk=1*m.nodeValue;if(m=h.getAttributeNode("zoomafteroutfov"))this.D.sk=1*m.nodeValue;if(m=h.getAttributeNode("zoomspeed"))this.D.Yg=1*m.nodeValue;if(m=h.getAttributeNode("zoomoutpause"))this.D.Xg=1==m.nodeValue;"cut"==this.D.type&&(this.D.fh=0)}if("soundstransition"== h.nodeName){if(m=h.getAttributeNode("enabled"))this.Za.enabled=1==m.nodeValue;if(m=h.getAttributeNode("transitiontime"))this.Za.Gb=1*m.nodeValue;if(m=h.getAttributeNode("crossfade"))this.Za.zn=1==m.nodeValue}if("flyintransition"==h.nodeName){if(m=h.getAttributeNode("enabled"))this.Ea.enabled=1==m.nodeValue&&this.oa;if(m=h.getAttributeNode("speed"))this.Ea.speed=1*m.nodeValue}"userdata"==h.nodeName&&(this.userdata=this.Tg=this.ag(h),this.Vc[a.id]||(this.Vc[a.id]=this.Hn(h),this.qg[a.id]=this.In(h), this.Lf[a.id]=this.Jn(h)));"projectuserdata"==h.nodeName&&(this.Ug._master=this.ag(h));"customproperty"==h.nodeName&&this.Gn(h);if("translations"==h.nodeName)for((m=h.getAttributeNode("json"))&&this.$g(m.nodeValue.toString()),this.Cl||this.km(window.navigator.language),t=h.firstChild;t;){"json"==t.nodeName&&this.$g(t.textContent);if("projecttranslation"==t.nodeName){w={};if(m=t.getAttributeNode("langcode"))w.langCode=m.nodeValue;if(m=t.getAttributeNode("langname"))w.langName=m.nodeValue;this.Sl.push(w)}t= t.nextSibling}if("hotspots"==h.nodeName){if(m=h.getAttributeNode("smoothmovement"))this.Tp=1==m.nodeValue;for(t=h.firstChild;t;){if("label"==t.nodeName&&this.Cd){w=this.L.ck;if(m=t.getAttributeNode("enabled"))w.enabled=1==m.nodeValue;if(m=t.getAttributeNode("width"))w.width=1*m.nodeValue;if(m=t.getAttributeNode("height"))w.height=1*m.nodeValue;if(m=t.getAttributeNode("textcolor"))w.dk=1*m.nodeValue;if(m=t.getAttributeNode("textalpha"))w.bk=1*m.nodeValue;if(m=t.getAttributeNode("background"))w.background= 1==m.nodeValue;if(m=t.getAttributeNode("backgroundalpha"))w.Vb=1*m.nodeValue;if(m=t.getAttributeNode("backgroundcolor"))w.Wb=1*m.nodeValue;if(m=t.getAttributeNode("border"))w.Qi=1*m.nodeValue;if(m=t.getAttributeNode("bordercolor"))w.Yb=1*m.nodeValue;if(m=t.getAttributeNode("borderalpha"))w.Xb=1*m.nodeValue;if(m=t.getAttributeNode("borderradius"))w.zk=1*m.nodeValue;if(m=t.getAttributeNode("wordwrap"))w.qk=1==m.nodeValue}if("polystyle"==t.nodeName&&this.Cd){if(m=t.getAttributeNode("mode"))this.L.mode= 1*m.nodeValue;if(m=t.getAttributeNode("bordercolor"))this.L.Yb=1*m.nodeValue;if(m=t.getAttributeNode("backgroundcolor"))this.L.Wb=1*m.nodeValue;if(m=t.getAttributeNode("borderalpha"))this.L.Xb=1*m.nodeValue;if(m=t.getAttributeNode("backgroundalpha"))this.L.Vb=1*m.nodeValue;if(m=t.getAttributeNode("handcursor"))this.L.Ce=1==m.nodeValue}m=void 0;"hotspot"==t.nodeName&&(m=new y.Mi(this),m.type="point",m.yb(t),this.K.push(m),this.Wk(a.id,t));"polyhotspot"==t.nodeName&&(m=new y.Mi(this),m.type="poly", m.yb(t),this.K.push(m),this.Wk(a.id,t));t=t.nextSibling}}if("sounds"==h.nodeName||"media"==h.nodeName)for(t=h.firstChild;t;){if("sound"==t.nodeName&&!this.Kl)for(this.Yd=!0,m=new y.ne(this),m.yb(t),m.addElement(),w=0;ww;w++)(m=n.getAttributeNode("prev"+w+"url"))&&(this.nh[w]=String(m.nodeValue));if(m=n.getAttributeNode("tilevrurl"))this.Nk=String(m.nodeValue);if(m=n.getAttributeNode("tilesize"))this.Se= 1*m.nodeValue;m=n.getAttributeNode("canvassize");if(m=n.getAttributeNode("tilescale"))this.Kg=1*m.nodeValue;if(m=n.getAttributeNode("leveltileurl"))r.Gl=m.nodeValue;if(m=n.getAttributeNode("leveltilesize"))r.V=Number(m.nodeValue);if(m=n.getAttributeNode("levelbias"))r.To=Number(m.nodeValue);if(m=n.getAttributeNode("levelbiashidpi"))r.Uo=Number(m.nodeValue);m=n.getAttributeNode("overlap");this.Ya.W=0;this.Ya.pitch=0;m&&(r.ib=Number(m.nodeValue));if(m=n.getAttributeNode("levelingroll"))this.Ya.W=Number(m.nodeValue); if(m=n.getAttributeNode("levelingpitch"))this.Ya.pitch=Number(m.nodeValue);this.Kd=0;(m=n.getAttributeNode("flat"))&&1==m.nodeValue&&(this.Kd=2);m=n.getAttributeNode("width");r.width=1*(m?m.nodeValue:1);m=n.getAttributeNode("height");r.height=1*(m?m.nodeValue:r.width);this.A.src=[];r.levels=[];for(t=n.firstChild;t;){if("preview"==t.nodeName){if(m=t.getAttributeNode("color"))r.Lj=m.nodeValue;if(m=t.getAttributeNode("strip"))r.op=1==m.nodeValue}if("video"==t.nodeName){if(m=t.getAttributeNode("format"))"3x2"== m.nodeValue&&(this.A.format=14),"equirectangular"==m.nodeValue&&(this.A.format=1);if(m=t.getAttributeNode("flipy"))this.A.flipY=Number(m.nodeValue);if(m=t.getAttributeNode("startonload"))this.A.Yj=1==m.nodeValue;if(m=t.getAttributeNode("startmutedmobile"))this.A.tm=1==m.nodeValue;if(m=t.getAttributeNode("level"))this.A.level=Number(m.nodeValue);if(m=t.getAttributeNode("bleed"))this.A.df=Number(m.nodeValue);if(m=t.getAttributeNode("endaction"))this.A.ue=String(m.nodeValue);if(m=t.getAttributeNode("targetview"))this.A.ak= String(m.nodeValue);if(m=t.getAttributeNode("width"))this.A.width=Number(m.nodeValue);if(m=t.getAttributeNode("height"))this.A.height=Number(m.nodeValue);for(w=t.firstChild;w;)"source"==w.nodeName&&(m=w.getAttributeNode("url"))&&this.A.src.push(m.nodeValue.toString()),w=w.nextSibling;0E;E++){var I=E%3*H+F.A.df;var L=I+H-2*F.A.df;var K=4;3>E&&(K+=H);var M=K+H-2*F.A.df;for(D=0;4>D;D++){G.x=-1;G.y=-1;G.z=1;for(var Q=0;Qa.time&&n.timea.Ld;)a.Ld+=360;for(;180h;)h+=360;for(;180D)for(;A<=q&&E>D;)E=new y.Nc,E.yk(C,G,H,J,A),E=E.y,A++;else A=1;A>=.8*q&&(z=A=Math.round(.8*q));0==A&&(A=1);D=4==a.yi?120:this.Bh(a.yi);E=a.Ig;if(E>D)for(;F>A&&E>D;)E=new y.Nc,E.yk(C,G,H,J,F),E=E.y,F--}C=new y.fd;C.time=0;C.qb=0;C.value=a.Re;C.type=1;C.bf=q/3;C.cf=a.Xf?a.Re:a.Re+h/3;b.Ja.push(C);C=new y.fd;C.time=0;C.qb=1;C.value=a.zi;C.type=1;C.bf=q/3;C.cf=a.Xf?a.zi: a.zi+m/3;b.Ja.push(C);C=new y.fd;C.time=0;C.qb=2;C.value=a.ge;C.type=1;C.bf=q/3;C.cf=a.Xf?a.ge:a.ge+n/3;b.Ja.push(C);C=new y.fd;C.time=0;C.qb=3;C.value=a.yi;C.type=0;C.Gb=0;b.Ja.push(C);c&&(C=new y.fd,C.time=A,C.qb=3,C.value=a.he,C.type=0,C.Gb=F-A,b.Ja.push(C));C=new y.fd;C.time=q;C.qb=0;C.value=a.Re+h;C.type=1;C.$e=2*q/3;C.af=a.hf&&!a.jf?C.value:C.value-h/3;a.jf&&(C.bf=q+t,C.cf=C.value+t/q*h);b.Ja.push(C);C=new y.fd;C.time=q;C.qb=1;C.value=a.ie;C.type=1;C.$e=2*q/3;C.af=a.hf&&!a.jf?a.ie:a.ie-m/3; a.jf&&(C.bf=q+t,C.cf=C.value+t/q*m);b.Ja.push(C);C=new y.fd;C.time=z;C.qb=2;C.value=w;C.type=1;C.$e=2*z/3;C.af=a.hf?w:w-n/3;b.Ja.push(C);a.jf&&(C=new y.fd,C.time=q+r,C.qb=0,C.value=a.Re+h,C.type=1,C.$e=q+r-t,C.af=a.Re+h,b.Ja.push(C),C=new y.fd,C.time=q+r,C.qb=1,C.value=a.ie,C.type=1,C.$e=q+r-t,C.af=a.ie,b.Ja.push(C));this.xa.push(b);return b};e.prototype.ov=function(){this.A.j&&this.A.j.play()};e.prototype.pv=function(){this.A.j&&(this.A.j.pause(),this.A.j.currentTime=0)};e.prototype.nv=function(){this.A.j&& this.A.j.pause()};e.prototype.yu=function(a){this.A.j&&(0>a&&(a=0),a>this.A.j.duration&&(a=this.A.j.duration-.1),this.A.j.currentTime=a,this.update())};e.prototype.As=function(){return this.A.j?this.A.j.currentTime:0};e.prototype.zs=function(){if(this.A.j)return this.A.j};e.prototype.xu=function(a){if(this.A.j){var b=!this.A.j.paused&&!this.A.j.ended,c=this.A.j.currentTime;this.A.j.pause();this.A.j.src=isNaN(parseInt(a,10))?String(a):this.A.src[parseInt(a,10)];b&&(this.A.j.onloadedmetadata=function(){this.currentTime= c;this.play();this.onloadedmetadata=null});this.A.j.currentTime=c}};e.prototype.rr=function(){this.Kl=!0};e.prototype.ls=function(){var a={};a.currentNode=this.ej();a.position={pan:this.pan.m,tilt:this.u.m,fov:this.fov.m,projection:this.Z()};for(var b=a.variables={},c=0,h=Object.keys(this.Sb);c