////////////////////////////////////////////////////////////////////// // Pano2VR 5.0.3/15088 HTML5/CSS3 & WebGL Panorama Player // // License: em-studio // // (c) 2016, Garden Gnome Software, http://ggnome.com // ////////////////////////////////////////////////////////////////////// var h=function(){function e(a,b){this.x=a;this.y=b}e.prototype.Ka=function(a,b){this.x=a;this.y=b};e.prototype.hc=function(a,b,c){var d=b.y-a.y;this.x=a.x+(b.x-a.x)*c;this.y=a.y+d*c};e.prototype.ri=function(a,b,c,d,g){var n;n=new e;n.hc(a,c,g);a=new e;a.hc(c,d,g);c=new e;c.hc(d,b,g);b=new e;b.hc(n,a,g);n=new e;n.hc(a,c,g);a=new e;a.hc(b,n,g);this.x=a.x;this.y=a.y};e.prototype.si=function(a,b,c,d,g){var n=new e,f=.5,k=.25;do{n.ri(a,b,c,d,f);var m=n.x-g,f=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"); a.compileShader(c);a.getShaderParameter(c,a.COMPILE_STATUS)||(alert(a.getShaderInfoLog(c)),c=null);this.qa=a.createProgram();a.attachShader(this.qa,b);a.attachShader(this.qa,c);a.linkProgram(this.qa);a.getProgramParameter(this.qa,a.LINK_STATUS)||alert("Could not initialise shaders");this.qa.ca=a.getAttribLocation(this.qa,"aVertexPosition");a.enableVertexAttribArray(this.qa.ca);this.qa.Ga=a.getAttribLocation(this.qa,"aTextureCoord");a.enableVertexAttribArray(this.qa.Ga);c=a.createShader(a.FRAGMENT_SHADER); a.shaderSource(c,"#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"); a.compileShader(c);a.getShaderParameter(c,a.COMPILE_STATUS)||(alert(a.getShaderInfoLog(c)),c=null);this.ta=a.createProgram();a.attachShader(this.ta,b);a.attachShader(this.ta,c);a.linkProgram(this.ta);a.getProgramParameter(this.ta,a.LINK_STATUS)||alert("Could not initialise shaders");this.ta.ca=a.getAttribLocation(this.ta,"aVertexPosition");a.enableVertexAttribArray(this.ta.ca);this.ta.Ga=a.getAttribLocation(this.ta,"aTextureCoord");a.enableVertexAttribArray(this.ta.Ga)};e.prototype.xc=function(){var a= this.m.a;if(!a)return!1;if(this.kb=a.createFramebuffer()){a.bindFramebuffer(a.FRAMEBUFFER,this.kb);this.kb.width=1024;this.kb.height=1024;this.Qc=a.createTexture();a.bindTexture(a.TEXTURE_2D,this.Qc);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,this.kb.width,this.kb.height,0,a.RGBA,a.UNSIGNED_BYTE,null);var b=a.createRenderbuffer();a.bindRenderbuffer(a.RENDERBUFFER,b);a.renderbufferStorage(a.RENDERBUFFER, a.DEPTH_COMPONENT16,this.kb.width,this.kb.height);a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,this.Qc,0);a.framebufferRenderbuffer(a.FRAMEBUFFER,a.DEPTH_ATTACHMENT,a.RENDERBUFFER,b);a.bindTexture(a.TEXTURE_2D,null);a.bindRenderbuffer(a.RENDERBUFFER,null);a.bindFramebuffer(a.FRAMEBUFFER,null);return!0}return!1};e.prototype.wh=function(a){var b=this.m.a,c=this.m.Ta;if(this.Ec){b.useProgram(this.ga);b.bindBuffer(b.ARRAY_BUFFER,this.m.Fa);b.vertexAttribPointer(this.ga.ca,this.m.Fa.Qb, b.FLOAT,!1,0,0);b.bindBuffer(b.ARRAY_BUFFER,this.m.ed);b.vertexAttribPointer(this.ga.Ga,2,b.FLOAT,!1,0,0);b.activeTexture(b.TEXTURE0);b.bindTexture(b.TEXTURE_2D,this.Qc);var c=1+(this.Na-1)*a,d=b.getUniformLocation(this.ga,"uAlpha");b.uniform1f(d,1);d=b.getUniformLocation(this.ga,"uZoomIn");b.uniform1i(d,1);var d=b.getUniformLocation(this.ga,"uZoomCenter"),g=.5+(this.ee-.5)*Math.sqrt(a),e=.5+(this.fe-.5)*Math.sqrt(a);0>g-.5/c&&(g=.5/c);0>e-.5/c&&(e=.5/c);1g-.5/this.Na&&(g=.5/this.Na);0>e-.5/this.Na&&(e=.5/this.Na);1>16&255)/255,(this.ie>>8&255)/255,(this.ie&255)/255),d=b.getUniformLocation(this.ya,"uZoomIn"),b.uniform1i(d,1==this.Ba||2==this.Ba?1:0),d=b.getUniformLocation(this.ya,"uZoomCenter"),b.uniform2f(d,g,e),g=b.getUniformLocation(this.ya,"uZoomFactor"),b.uniform1f(g,this.Na),b.uniform1i(b.getUniformLocation(this.ya,"uSampler"),0);else if("irisround"==this.type|| "irisrectangular"==this.type){b.useProgram(this.qa);b.bindBuffer(b.ARRAY_BUFFER,this.m.Fa);b.vertexAttribPointer(this.qa.ca,this.m.Fa.Qb,b.FLOAT,!1,0,0);b.bindBuffer(b.ARRAY_BUFFER,this.m.ed);b.vertexAttribPointer(this.qa.Ga,2,b.FLOAT,!1,0,0);b.activeTexture(b.TEXTURE0);b.bindTexture(b.TEXTURE_2D,this.Qc);var f;1==this.Ba||2==this.Ba?f=d=.5:(d=this.ee,f=this.fe);var k=d*c.width,m=f*c.height,k=Math.max(k,c.width-k),m=Math.max(m,c.height-m);"irisround"==this.type?b.uniform1f(b.getUniformLocation(this.qa, "uRadius"),(Math.sqrt(k*k+m*m)+this.Zb)*a):(k>m?(m=c.height/c.width*k+this.Zb,k+=this.Zb):(k=c.width/c.height*m+this.Zb,m+=this.Zb),b.uniform2f(b.getUniformLocation(this.qa,"uRectDim"),k*a,m*a));a=b.getUniformLocation(this.qa,"uSoftEdge");b.uniform1f(a,this.Zb);b.uniform1i(b.getUniformLocation(this.qa,"uRound"),"irisround"==this.type?1:0);b.uniform2f(b.getUniformLocation(this.qa,"uIrisCenter"),d*c.width,f*c.height);d=b.getUniformLocation(this.qa,"uZoomIn");b.uniform1i(d,1==this.Ba||2==this.Ba?1:0); d=b.getUniformLocation(this.qa,"uZoomCenter");b.uniform2f(d,g,e);g=b.getUniformLocation(this.qa,"uZoomFactor");b.uniform1f(g,this.Na);b.uniform1i(b.getUniformLocation(this.qa,"uSampler"),0)}else if("wipeleftright"==this.type||"wiperightleft"==this.type||"wipetopbottom"==this.type||"wipebottomtop"==this.type||"wiperandom"==this.type)b.useProgram(this.ta),b.bindBuffer(b.ARRAY_BUFFER,this.m.Fa),b.vertexAttribPointer(this.ta.ca,this.m.Fa.Qb,b.FLOAT,!1,0,0),b.bindBuffer(b.ARRAY_BUFFER,this.m.ed),b.vertexAttribPointer(this.ta.Ga, 2,b.FLOAT,!1,0,0),b.activeTexture(b.TEXTURE0),b.bindTexture(b.TEXTURE_2D,this.Qc),b.uniform1f(b.getUniformLocation(this.ta,"uPercent"),3>this.wf?a*(c.width+this.Zb):a*(c.height+this.Zb)),a=b.getUniformLocation(this.ta,"uSoftEdge"),b.uniform1f(a,this.Zb),b.uniform1i(b.getUniformLocation(this.ta,"uDirection"),this.wf),b.uniform2f(b.getUniformLocation(this.ta,"uCanvasDimensions"),c.width,c.height),d=b.getUniformLocation(this.ta,"uZoomIn"),b.uniform1i(d,1==this.Ba||2==this.Ba?1:0),d=b.getUniformLocation(this.ta, "uZoomCenter"),b.uniform2f(d,g,e),g=b.getUniformLocation(this.ta,"uZoomFactor"),b.uniform1f(g,this.Na),b.uniform1i(b.getUniformLocation(this.ta,"uSampler"),0);b.drawArrays(b.TRIANGLE_STRIP,0,this.m.Fa.Ac);b.useProgram(this.m.F);b.disable(b.BLEND);b.enable(b.DEPTH_TEST)}};return e}(),O=function(){function e(a){this.Zd=[];this.m=a;this.enable=!1;this.pc=2;this.tg=!1}e.prototype.Af=function(a){if(2==a.mode||3==a.mode||5==a.mode){var b=this.m.lb.currentTime,c=a.zb.gain.value,d=a.xb.gain.value,g=a.yb.gain.value; a.wb.gain.linearRampToValueAtTime(a.wb.gain.value,b);a.wb.gain.linearRampToValueAtTime(0,b+this.pc);a.zb.gain.linearRampToValueAtTime(c,b);a.zb.gain.linearRampToValueAtTime(0,b+this.pc);a.xb.gain.linearRampToValueAtTime(d,b);a.xb.gain.linearRampToValueAtTime(0,b+this.pc);a.yb.gain.linearRampToValueAtTime(g,b);a.yb.gain.linearRampToValueAtTime(0,b+this.pc)}else b=this.m.lb.currentTime,a.fc.gain.linearRampToValueAtTime(a.fc.gain.value,b),a.fc.gain.linearRampToValueAtTime(0,b+this.pc);a.Bf=!0;setTimeout(function(){a.Nc()}, 1E3*this.pc+5)};e.prototype.ik=function(){for(var a=0;ac.aa&&(c.aa=a)}1==a&&clearInterval(this.ek)};return e}(),P=function(){function e(a){this.Pd=[];this.ac=null;this.ib=[];this.cb=[];this.jb=[];this.m=a;this.zi()}e.prototype.Jd=function(){var a= this.m.a,b=a.createShader(a.VERTEX_SHADER);a.shaderSource(b,"attribute vec3 aVertexPosition;\nvoid main(void) {\n gl_Position = vec4(aVertexPosition, 1.0);\n}\n");a.compileShader(b);a.getShaderParameter(b,a.COMPILE_STATUS)||(alert(a.getShaderInfoLog(b)),b=null);var c=a.createShader(a.FRAGMENT_SHADER);a.shaderSource(c,"#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"); a.compileShader(c);a.getShaderParameter(c,a.COMPILE_STATUS)||(alert(a.getShaderInfoLog(c)),c=null);this.nb=a.createProgram();a.attachShader(this.nb,b);a.attachShader(this.nb,c);a.linkProgram(this.nb);a.getProgramParameter(this.nb,a.LINK_STATUS)||alert("Could not initialise shaders");this.nb.ca=a.getAttribLocation(this.nb,"aVertexPosition");a.enableVertexAttribArray(this.nb.ca);c=a.createShader(a.VERTEX_SHADER);b=a.createShader(a.VERTEX_SHADER);a.shaderSource(c,"#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"); a.compileShader(c);a.getShaderParameter(c,a.COMPILE_STATUS)||(alert(a.getShaderInfoLog(c)),c=null);a.shaderSource(b,"#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"); a.compileShader(b);a.getShaderParameter(b,a.COMPILE_STATUS)||(alert(a.getShaderInfoLog(b)),c=null);var d=a.createShader(a.FRAGMENT_SHADER);a.shaderSource(d,"#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"); a.compileShader(d);a.getShaderParameter(d,a.COMPILE_STATUS)||(alert(a.getShaderInfoLog(d)),d=null);this.fa=a.createProgram();a.attachShader(this.fa,c);a.attachShader(this.fa,d);a.linkProgram(this.fa);a.getProgramParameter(this.fa,a.LINK_STATUS)||alert("Could not initialise shaders");this.fa.ca=a.getAttribLocation(this.fa,"aVertexPosition");a.enableVertexAttribArray(this.fa.ca);c=a.createShader(a.FRAGMENT_SHADER);a.shaderSource(c,"#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"); a.compileShader(c);a.getShaderParameter(c,a.COMPILE_STATUS)||(alert(a.getShaderInfoLog(c)),c=null);this.La=a.createProgram();a.attachShader(this.La,b);a.attachShader(this.La,c);a.linkProgram(this.La);a.getProgramParameter(this.La,a.LINK_STATUS)||alert("Could not initialise shaders");this.La.ca=a.getAttribLocation(this.La,"aVertexPosition")};e.prototype.xc=function(){var a=this.m.a;this.ec=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,this.ec);a.bufferData(a.ARRAY_BUFFER,new Float32Array([-1,-1,0,1, -1,0,1,1,0,-1,1,0]),a.STATIC_DRAW);this.ec.Qb=3;this.ec.Ac=4;this.Xc=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,this.Xc);for(var b=[0,0,0],c=2*Math.PI/6,d=Math.PI/180*35,g=1,e=d;e<=d+2*Math.PI;e+=c)b.push(Math.sin(e)),b.push(-Math.cos(e)),b.push(0),g++;a.bufferData(a.ARRAY_BUFFER,new Float32Array(b),a.STATIC_DRAW);this.Xc.Qb=3;this.Xc.Ac=g;this.Fh=a.createTexture();a.bindTexture(a.TEXTURE_2D,this.Fh);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER, a.LINEAR);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE);b=document.createElement("canvas");b.width=100;b.height=1;c=b.getContext("2d");c.width=100;c.height=1;d=c.createLinearGradient(0,0,100,0);d.addColorStop(0,this.m.X(16777215,0));d.addColorStop(.88,this.m.X(0,0));d.addColorStop(.9,this.m.X(16654848,1));d.addColorStop(.92,this.m.X(16776448,1));d.addColorStop(.94,this.m.X(4849466,1));d.addColorStop(.96,this.m.X(131071, 1));d.addColorStop(.98,this.m.X(8190,1));d.addColorStop(1,this.m.X(0,0));c.fillStyle=d;c.fillRect(0,0,100,1);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,b)};e.prototype.Jj=function(){for(;0g.z){var q,t;t=-e/g.z;q=g.x*t;t*=g.y;Math.abs(q)k?f:k,r=l.og/100*((w-d)/w);0>r&&(r=0);if(this.m.ka){a.useProgram(this.nb);a.bindBuffer(a.ARRAY_BUFFER,this.m.Fa);a.vertexAttribPointer(this.nb.ca,this.m.Fa.Qb,a.FLOAT,!1,0,0);var u=a.getUniformLocation(this.nb, "uCanvasDimensions");a.uniform2f(u,a.drawingBufferWidth,a.drawingBufferHeight);a.uniform2f(a.getUniformLocation(this.nb,"uFlareCenterPosition"),a.drawingBufferWidth/f*q,k-a.drawingBufferHeight/k*t);a.uniform1f(a.getUniformLocation(this.nb,"uBlindingValue"),r);u=a.getUniformLocation(this.nb,"uAspectRatio");a.uniform1f(u,this.m.S.Yd?a.drawingBufferWidth/a.drawingBufferHeight:a.drawingBufferWidth/a.drawingBufferHeight/(f/k));a.drawArrays(a.TRIANGLE_STRIP,0,this.m.Fa.Ac)}else u=this.H.createRadialGradient(q, t,1,q,t,v),u.addColorStop(0,"rgba(255, 255, 255, "+r+")"),u.addColorStop(.5,"rgba(255, 255, 255, "+.8*r+")"),u.addColorStop(1,"rgba(255, 255, 255, "+.6*r+")"),this.H.fillStyle=u,this.H.fillRect(0,0,this.H.width,this.H.height);if(0!=Number(l.type)&&!this.m.S.Yd){var r=f/2-q,v=k/2-t,C=1,B=Number(l.type)-1;d<.35*w&&(C=d/(.35*w),C*=C);d>.7*w&&(C=(w-d)/(.3*w));C*=l.alpha/100;if(0b&&(b=0);var z=x.color;if(8==B|| 9==B||10==B)z=l.color;if(this.m.ka)a.useProgram(this.fa),a.bindBuffer(a.ARRAY_BUFFER,this.Xc),a.vertexAttribPointer(this.fa.ca,this.Xc.Qb,a.FLOAT,!1,0,0),u=a.getUniformLocation(this.fa,"uCanvasDimensions2"),a.uniform2f(u,a.drawingBufferWidth,a.drawingBufferHeight),a.uniform2f(a.getUniformLocation(this.fa,"uCirclePosition"),a.drawingBufferWidth/f*(q+r*x.h),a.drawingBufferWidth/f*(k-(t+v*x.h))),a.uniform2f(a.getUniformLocation(this.fa,"uCircleTexturePosition"),a.drawingBufferWidth/f*(q+r*x.h),k-(t+ v*x.h)),a.uniform1f(a.getUniformLocation(this.fa,"uCircleRadius"),w),a.uniform3f(a.getUniformLocation(this.fa,"uCircleColor"),(z>>16&255)/255,(z>>8&255)/255,(z&255)/255),a.uniform1f(a.getUniformLocation(this.fa,"uCircleAlpha"),b),a.uniform1f(a.getUniformLocation(this.fa,"uCircleSoftness"),.1),u=a.getUniformLocation(this.fa,"uAspectRatio"),a.uniform1f(u,a.drawingBufferWidth/a.drawingBufferHeight/(f/k)),a.drawArrays(a.TRIANGLE_FAN,0,this.Xc.Ac);else{this.H.save();this.H.translate(q+r*x.h,t+v*x.h);u= this.H.createRadialGradient(0,0,1,0,0,1.1*w);u.addColorStop(0,this.m.X(z,b));u.addColorStop(.65,this.m.X(z,.9*b));u.addColorStop(.8,this.m.X(z,.7*b));u.addColorStop(1,this.m.X(z,.2*b));this.H.beginPath();var z=2*Math.PI/6,x=Math.PI/180*35,E=!0;for(b=x;b<=x+2*Math.PI;b+=z)E?(this.H.moveTo(w*Math.sin(b),w*Math.cos(b)),E=!1):this.H.lineTo(w*Math.sin(b),w*Math.cos(b));this.H.closePath();this.H.fillStyle=u;this.H.fill();this.H.restore()}}if(0b&&(b=0);z=x.color;if(8==B||9==B||10==B)z=l.color;this.m.ka?(a.useProgram(this.fa),a.bindBuffer(a.ARRAY_BUFFER,this.ec),a.vertexAttribPointer(this.fa.ca,this.ec.Qb,a.FLOAT,!1,0,0),u=a.getUniformLocation(this.fa,"uCanvasDimensions2"),a.uniform2f(u,a.drawingBufferWidth,a.drawingBufferHeight),u=a.getUniformLocation(this.fa,"uCirclePosition"),a.uniform2f(u,a.drawingBufferWidth/f*(q+r*x.h),a.drawingBufferWidth/f*(k-(t+v*x.h))),u=a.getUniformLocation(this.fa,"uCircleTexturePosition"), a.uniform2f(u,a.drawingBufferWidth/f*(q+r*x.h),k-(t+v*x.h)),u=a.getUniformLocation(this.fa,"uCircleRadius"),a.uniform1f(u,w),a.uniform3f(a.getUniformLocation(this.fa,"uCircleColor"),(z>>16&255)/255,(z>>8&255)/255,(z&255)/255),a.uniform1f(a.getUniformLocation(this.fa,"uCircleAlpha"),b),a.uniform1f(a.getUniformLocation(this.fa,"uCircleSoftness"),x.s),u=a.getUniformLocation(this.fa,"uAspectRatio"),a.uniform1f(u,a.drawingBufferWidth/a.drawingBufferHeight/(f/k)),a.drawArrays(a.TRIANGLE_FAN,0,this.ec.Ac)): (this.H.save(),this.H.translate(q+r*x.h,t+v*x.h),u=this.H.createRadialGradient(0,0,1,0,0,w),u.addColorStop(0,this.m.X(z,b)),u.addColorStop(1-x.s,this.m.X(z,.8*b)),u.addColorStop(1,this.m.X(z,0)),this.H.beginPath(),this.H.arc(0,0,w,0,2*Math.PI,!1),this.H.closePath(),this.H.fillStyle=u,this.H.fill(),this.H.restore())}if(0b&&(b=0),this.m.ka?(a.useProgram(this.La),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D, this.Fh),a.bindBuffer(a.ARRAY_BUFFER,this.ec),a.vertexAttribPointer(this.La.ca,this.ec.Qb,a.FLOAT,!1,0,0),u=a.getUniformLocation(this.La,"uCanvasDimensions2"),a.uniform2f(u,f,k),u=a.getUniformLocation(this.La,"uCirclePosition"),a.uniform2f(u,q+r*l.h,k-(t+v*l.h)),u=a.getUniformLocation(this.La,"uRingTexturePosition"),a.uniform2f(u,a.drawingBufferWidth/f*(q+r*l.h),k-(t+v*l.h)),u=a.getUniformLocation(this.La,"uCircleRadius"),a.uniform1f(u,w),a.uniform2f(a.getUniformLocation(this.La,"uRingPosition"), q+r*l.h,k-(t+v*l.h)),a.uniform1f(a.getUniformLocation(this.La,"uRingRadius"),w),a.uniform1f(a.getUniformLocation(this.La,"uRingAlpha"),b),u=a.getUniformLocation(this.La,"uAspectRatio"),a.uniform1f(u,a.drawingBufferWidth/a.drawingBufferHeight/(f/k)),a.uniform1i(a.getUniformLocation(this.La,"uSampler"),0),a.drawArrays(a.TRIANGLE_FAN,0,this.ec.Ac)):(this.H.save(),this.H.translate(q+r*l.h,t+v*l.h),u=this.H.createRadialGradient(0,0,0,0,0,w),u.addColorStop(0,this.m.X(16777215,0)),u.addColorStop(.88,this.m.X(0, 0)),u.addColorStop(.9,this.m.X(16654848,b)),u.addColorStop(.92,this.m.X(16776448,b)),u.addColorStop(.94,this.m.X(4849466,b)),u.addColorStop(.96,this.m.X(131071,b)),u.addColorStop(.98,this.m.X(8190,b)),u.addColorStop(1,this.m.X(0,0)),this.H.beginPath(),this.H.arc(0,0,w,0,2*Math.PI,!1),this.H.closePath(),this.H.fillStyle=u,this.H.fill(),this.H.restore())}this.m.ka&&(a.useProgram(this.m.F),a.disable(a.BLEND),a.enable(a.DEPTH_TEST))}}};return e}(); function Q(){var e="perspective",a=["Webkit","Moz","O","ms","Ms"],b;for(b=0;bg;)g+=360;for(;180f&&(f=a.g.b);this.$a||(this.$a=new y,this.$a.Cg(this.pan, this.j));0!=this.mode&&1!=this.mode||!c||this.fc&&this.fc.gain.setValueAtTime(this.level*a.ba*this.aa,c.currentTime);if(2==this.mode&&c){var k=.5*Math.cos(g*Math.PI/180)+.5;this.Rb=Math.sqrt(k)*this.aa;this.Sb=Math.sqrt(k)*this.aa;this.Ib=Math.sqrt(1-k)*this.aa;this.Jb=Math.sqrt(1-k)*this.aa;this.Vd()}if(3==this.mode){0>g?g<-this.Xa?g+=this.Xa:g=0:g=g>this.Xa?g-this.Xa:0;k=this.level;d=Math.abs(d);d=df||0>m){var p=k*e*a.ba;c?(this.Rb=p*this.aa,this.Sb= p*this.aa,this.Jb=this.Ib=0,this.Vd()):this.c.volume=k*e*a.ba}else if(p=1-Math.abs(g/f),c){var l=k*(e+(1-e)*m*p)*a.ba,p=k*e*a.ba;0<=g?(this.Rb=l*this.aa,this.Sb=p*this.aa):(this.Rb=p*this.aa,this.Sb=l*this.aa);2*Math.abs(g)g?g=g>-this.Xa?0:g+this.Xa:g=ga.loop&&(a.c.ji="none"));a.c.volume=a.level*c.ba;1<=a.loop&&(a.tc=a.loop-1);(1==a.mode||2==a.mode||3==a.mode||5==a.mode)&&0<=a.loop&&(a.c.autoplay=!0,a.fh=!0,a.autoplay=!0);c.J.push(this);c.be?c.M.appendChild(a.c):(a.c.style.position="absolute",a.Ob&&(a.c.width=a.Ob),a.Xb&&(a.c.height=a.Xb),c.w.appendChild(a.c),a.lg());a.c.onclick=function(){a.Yb()};a.c.addEventListener("ended",function(){a.Gk()},!1)}catch(e){}};a.prototype.Nc=function(){var a=this.m;a.be&&(a.a.deleteTexture(this.Gb), this.Gb=0,a.M.removeChild(this.c));a.ai&&a.w.removeChild(this.c);this.c=null};return a}(U),W=function(e){function a(a){e.call(this,a);this.url="";this.Ra=this.wa=this.pa=0;this.g=50;this.za=0;this.Hd=!1;this.Xb=this.Ob=100;this.gc=1}S(a,e);a.prototype.Za=function(a){e.prototype.Za.call(this,a);var c;if(c=a.getAttributeNode("url"))this.url=c.nodeValue.toString();if(c=a.getAttributeNode("rotx"))this.pa=Number(c.nodeValue);if(c=a.getAttributeNode("roty"))this.wa=Number(c.nodeValue);if(c=a.getAttributeNode("rotz"))this.Ra= Number(c.nodeValue);if(c=a.getAttributeNode("fov"))this.g=Number(c.nodeValue);if(c=a.getAttributeNode("width"))this.Ob=Number(c.nodeValue);if(c=a.getAttributeNode("height"))this.Xb=Number(c.nodeValue);this.gc=(c=a.getAttributeNode("stretch"))?Number(c.nodeValue):1;if(c=a.getAttributeNode("clickmode"))this.za=Number(c.nodeValue);if(c=a.getAttributeNode("handcursor"))this.Hd=1==Number(c.nodeValue);for(a=a.firstChild;a;)"source"==a.nodeName&&(c=a.getAttributeNode("url"))&&(this.url=c.nodeValue.toString()), a=a.nextSibling};a.prototype.Fd=function(){this.Dd=!1;this.c.style[this.m.Vb]="none"};a.prototype.Yb=function(){1!==this.za&&4!==this.za||this.Ed(!this.hb)};a.prototype.Ed=function(a){var c=this.m;if(1===this.za||4===this.za)this.hb=a,this.m.Sa?(a=this.m.Y)&&a.activateSound(this.id,this.hb?1:0):(this.c.style.zIndex=this.hb?"80000":"0",this.c.style[c.Vb]="all 1s ease 0s",this.Dd=!0,c.Vh())};a.prototype.addElement=function(){var a=this,c=this.m;try{a.c=document.createElement("img");a.c.setAttribute("style", "-webkit-user-drag:none; max-width:none;");a.c.setAttribute("class","ggmedia");a.c.hidden=!0;c.Zc&&a.c.setAttribute("id",c.Zc+a.id);a.c.ondragstart=function(){return!1};if(1===a.za||4===a.za)a.c.addEventListener(c.fi(),function(){a.Fd()},!1),a.c.addEventListener("transitionend",function(){a.Fd()},!1);a.c.setAttribute("src",c.ub(a.url));a.Ob&&(a.c.width=a.Ob);a.Xb&&(a.c.height=a.Xb);c.Ua.push(a);a.c.style.position="absolute";a.Yb&&(a.c.onclick=function(){a.Yb()});c.w.appendChild(a.c)}catch(d){}};a.prototype.Nc= function(){this.m.w.removeChild(this.c);this.c=null};return a}(T),X=function(e){function a(a){e.call(this,a);this.alpha=this.og=50;this.type=0;this.color=16777215}S(a,e);a.prototype.Za=function(a){e.prototype.Za.call(this,a);var c;if(c=a.getAttributeNode("blinding"))this.og=Number(c.nodeValue);if(c=a.getAttributeNode("alpha"))this.alpha=Number(c.nodeValue);if(c=a.getAttributeNode("type"))this.type=Number(c.nodeValue);if(c=a.getAttributeNode("color"))this.color=1*Number(c.nodeValue)};return a}(T), Y=function(){function e(a){this.type="empty";this.Mh=this.id=this.target=this.description=this.title=this.url="";this.hf=100;this.ze=20;this.jf=!1;this.c=null;this.Ha=this.ea=this.j=this.pan=0;this.ob=a.v.ob;this.mb=a.v.mb;this.Nb=a.v.Nb;this.Mb=a.v.Mb;this.Yc=a.v.Yc;this.ce=[]}e.prototype.Wc=function(){this.id=this.id;this.pan=this.pan;this.tilt=this.j;this.url=this.url;this.target=this.target;this.title=this.title;this.description=this.description;this.skinid=this.Mh;this.obj=this.c};e.prototype.Za= function(a){var b;if(b=a.getAttributeNode("url"))this.url=b.nodeValue.toString();if(b=a.getAttributeNode("target"))this.target=b.nodeValue.toString();if(b=a.getAttributeNode("title"))this.title=b.nodeValue.toString();if(b=a.getAttributeNode("description"))this.description=b.nodeValue.toString();if(b=a.getAttributeNode("id"))this.id=b.nodeValue.toString();if(b=a.getAttributeNode("skinid"))this.Mh=b.nodeValue.toString();if(b=a.getAttributeNode("width"))this.hf=Number(b.nodeValue);if(b=a.getAttributeNode("height"))this.ze= Number(b.nodeValue);if(b=a.getAttributeNode("wordwrap"))this.jf=1==Number(b.nodeValue);b=a.getAttributeNode("pan");this.pan=1*(b?Number(b.nodeValue):0);b=a.getAttributeNode("tilt");this.j=1*(b?Number(b.nodeValue):0);if(b=a.getAttributeNode("bordercolor"))this.ob=1*Number(b.nodeValue);if(b=a.getAttributeNode("backgroundcolor"))this.mb=1*Number(b.nodeValue);if(b=a.getAttributeNode("borderalpha"))this.Nb=1*Number(b.nodeValue);if(b=a.getAttributeNode("backgroundalpha"))this.Mb=1*Number(b.nodeValue);if(b= a.getAttributeNode("handcursor"))this.Yc=1==Number(b.nodeValue);for(a=a.firstChild;a;){if("vertex"==a.nodeName){var c={pan:0,j:0};b=a.getAttributeNode("pan");c.pan=1*(b?Number(b.nodeValue):0);b=a.getAttributeNode("tilt");c.j=1*(b?Number(b.nodeValue):0);this.ce.push(c)}a=a.nextSibling}this.Wc()};return e}();function aa(){this.bd={zd:1,Ad:1,Rd:0,Sd:0,pd:0,de:0,scale:1};this.Ab=!0;this.Tc=[]} var ba=function(){function e(){var a;this.Ja=Array(6);for(a=0;6>a;a++)this.Ja[a]=new aa}e.prototype.yi=function(a,b,c,d){for(var g=0;6>g;g++){var e;if(e=this.Ja[g]){var f;f=[];f.push(new y(-1,-1,-1,0,0));f.push(new y(1,-1,-1,1,0));f.push(new y(1,1,-1,1,1));f.push(new y(-1,1,-1,0,1));for(var k=0;kg?f[k].wa(-Math.PI/2*g):f[k].pa(Math.PI/2*(4===g?-1:1)),d&&(f[k].Ra(d.G*Math.PI/180),f[k].pa(-d.pitch*Math.PI/180)),f[k].wa(-a*Math.PI/180),f[k].pa(b*Math.PI/180),f[k].Ra(c*Math.PI/180);e.Ab= 0f&&(f=0), 1g||r.push(a[p]),r.push(m);g=e}return r};this.cg=0;this.eb=[];this.P=A();this.qb=A();this.Ee=-1;this.Cd=function(a){return a?a.pageX||a.pageY?{x:a.pageX,y:a.pageY}:a.clientX||a.clientY?{x:a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,y:a.clientY+document.body.scrollTop+document.documentElement.scrollTop}:a.touches&&a.touches[0]?{x:a.touches[0].pageX,y:a.touches[0].pageY}:{x:0,y:0}:{x:0,y:0}};this.Ge=1;this.Ei=this.Df=this.zf=this.Xf=this.Ne= 0;this.se=!0;this.Qa=new Y(this);this.Qa.Yc=!1;this.xg();this.gd(this.Qa);this.checkLoaded=this.bb;this.isLoaded=!1;b&&b.hasOwnProperty("useFlash")&&b.useFlash&&(this.Sa=!0,this.ka=this.Hb=!1,b.hasOwnProperty("flashPlayerId")?this.Gc=b.flashPlayerId:this.Gc="pano",b.hasOwnProperty("flashContainerId")?this.Cf=b.flashContainerId:this.Cf=a+"flash");this.ia();this.Sa||(this.Ea=new P(this));this.sg(a);this.oi();this.userdata=this.od=this.re();this.emptyHotspot=this.Qa;this.mouse=this.ha;this.Kj();this.S= new N(this);this.ra=new O(this)}e.prototype.xg=function(){var a;this.dh=navigator.userAgent.match(/(MSIE)/g)?!0:!1;if(this.Ic=navigator.userAgent.match(/(Safari)/g)?!0:!1)a=navigator.userAgent.indexOf("Safari"),this.Dc=navigator.userAgent.substring(a+7),a=navigator.userAgent.indexOf("Version"),-1!=a&&(this.Dc=navigator.userAgent.substring(a+8)),this.Dc=this.Dc.substring(0,this.Dc.indexOf(" ")),this.Dc=this.Dc.substring(0,this.Dc.indexOf(".")),this.Ih=!0;if(this.bh=navigator.userAgent.match(/(Chrome)/g)? !0:!1)this.Ic=!1;this.Kd=navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1;this.Kf=navigator.userAgent.match(/(iPhone|iPod)/g)?!0:!1;this.Jf=navigator.userAgent.match(/(android)/i)?!0:!1;this.eh=navigator.userAgent.match(/(IEMobile)/i)?!0:!1;this.Lf=this.Kd||this.Jf||this.eh;/iP(hone|od|ad)/.test(navigator.platform)&&(a=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),this.Wg=[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3]||"0",10)]);a=["Webkit","Moz","O","ms","Ms"];var b;this.ua="";this.Vb= "transition";this.Aa="transform";this.dc="perspective";for(b=0;b");window.console&&window.console.log(a)};e.prototype.Kj=function(){this.requestAnimationFrame=function(){var a=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame|| window.oRequestAnimationFrame||window.msRequestAnimationFrame;return a?a:function(a){window.setTimeout(a,10)}}()};e.prototype.Kh=function(a){this.rh=a};e.prototype.Qj=function(a){this.crossOrigin=a};e.prototype.Sj=function(a){this.Zc=a};e.prototype.Wi=function(){return this.Ke};e.prototype.Pj=function(a){this.qc=a};e.prototype.Gi=function(){return this.qc};e.prototype.Ni=function(){return this.Lf};e.prototype.Ki=function(){return this.u.active};e.prototype.Tj=function(a){this.Lf=!!a};e.prototype.Mi= function(){return this.isLoaded};e.prototype.bc=function(){return 1*this.l.height/(2*Math.tan(Math.PI/180*(this.Wb()/2)))};e.prototype.Lh=function(a,b){this.isFullscreen&&(a=window.innerWidth,b=window.innerHeight);var c=a-this.margin.left-this.margin.right,d=b-this.margin.top-this.margin.bottom;if(!(10>c||10>d)){var g=window.devicePixelRatio||1;this.Oe&&(g=1);this.w.style.width=c+"px";this.w.style.height=d+"px";this.w.style.left=this.margin.left+"px";this.w.style.top=this.margin.top+"px";if(this.ka)try{this.Oa&& (this.Oa.style.position="absolute",this.Oa.style.display="inline",this.Oa.style.width=c+"px",this.Oa.style.height=d+"px",this.Oa.width=c*g,this.Oa.height=d*g),this.a&&(this.Ta.width=c*g,this.Ta.height=d*g,this.a.viewport(0,0,this.a.drawingBufferWidth,this.a.drawingBufferHeight))}catch(e){alert(e)}this.pb&&(this.pb.style.width=a+"px",this.pb.style.height=b+"px",this.pb.width=a,this.pb.height=b);this.va&&(this.va.style.width=a+"px",this.va.style.height=b+"px",this.la.style.width=a+"px",this.la.style.height= b+"px",this.la.width=a,this.la.height=b,this.la.style.left=this.margin.left+"px",this.la.style.top=this.margin.top+"px",this.D&&this.D!=this.va&&(this.D.style.width=a+"px",this.D.style.height=b+"px"));this.Ea&&(c=this.Ea.ac,c.style.width=a+"px",c.style.height=b+"px",c.width=a,c.height=b,c.style.left=this.margin.left+"px",c.style.top=this.margin.top+"px");this.Id&&(this.Ca=!0);c=this.w.offsetWidth;d=this.w.offsetHeight;if(this.l.width!=c||this.l.height!=d)this.l.width=c,this.l.height=d;this.Fk();this.D&& this.D.ggUpdateSize&&this.D.ggUpdateSize(a,b)}};e.prototype.Rc=function(){this.hg=!0};e.prototype.Sc=function(){this.Lh(this.Uc.offsetWidth,this.Uc.offsetHeight)};e.prototype.hj=function(){var a={width:0,height:0};a.width=this.l.width;a.height=this.l.height;return a};e.prototype.Hc=function(){var a={x:0,y:0},b=this.w;if(b.offsetParent){do a.x+=b.offsetLeft,a.y+=b.offsetTop,b=b.offsetParent;while(b)}return a};e.prototype.Zj=function(a){this.xa=a};e.prototype.Vj=function(a,b,c,d){this.margin.left=a; this.margin.top=b;this.margin.right=c;this.margin.bottom=d;this.xa=this.skinObj;this.Rc()};e.prototype.vi=function(a){0==a&&(this.B.yc=!1);1==a&&(this.B.yc=!0);2==a&&(this.B.yc=this.B.yc?!1:!0)};e.prototype.fj=function(){return 1==this.B.yc?1:0};e.prototype.qg=function(a,b){this.v.mode=1==b&&0b.z?(m=-c/b.z,a=b.x*m,m*=b.y,Math.abs(a)b.z?(m=-c/b.z,a=this.l.width/2+b.x*m,m=this.l.height/2+b.y*m):m=a=0,b.sb=a,b.Ya=m;k.Bc=l}}}};e.prototype.Hi=function(){for(var a=[],b=0;b b&&(b=0);1>16&255)+","+(a>>8&255)+","+(a&255)+","+b+")"};e.prototype.zj=function(){var a,b;if(this.la&&(this.v.Nd!=this.v.mode&&(this.v.Nd=this.v.mode,this.la.style.visibility=0>16&255)/255,(d.ob>>8&255)/255,(d.ob&255)/255);g=this.a.getUniformLocation(this.Db,"uAlpha");this.a.uniform1f(g,d.Nb*c);this.a.vertexAttribPointer(this.Db.ca,3,this.a.FLOAT,!1,0,0);this.a.drawArrays(this.a.LINE_LOOP,0,e.length/3);this.a.uniform3f(b,(d.mb>>16&255)/255,(d.mb>>8&255)/255,(d.mb& 255)/255);this.a.uniform1f(g,d.Mb*c);this.a.enable(this.a.STENCIL_TEST);this.a.clearStencil(0);this.a.clear(this.a.STENCIL_BUFFER_BIT);this.a.colorMask(!1,!1,!1,!1);this.a.stencilFunc(this.a.ALWAYS,1,1);this.a.stencilOp(this.a.INCR,this.a.INCR,this.a.INCR);this.a.drawArrays(this.a.TRIANGLE_FAN,0,e.length/3);this.a.colorMask(!0,!0,!0,!0);this.a.stencilFunc(this.a.EQUAL,1,1);this.a.stencilOp(this.a.ZERO,this.a.ZERO,this.a.ZERO);this.a.drawArrays(this.a.TRIANGLE_FAN,0,e.length/3);this.a.disable(this.a.BLEND); this.a.enable(this.a.DEPTH_TEST);this.a.disable(this.a.STENCIL_TEST);this.a.useProgram(this.F)}}}}};e.prototype.Vg=function(a,b,c){var d,g,e=!1;d=0;for(g=a.length-1;dc!=g.Ya>c&&b<(g.sb-f.sb)*(c-f.Ya)/(g.Ya-f.Ya)+f.sb&&(e=!e)}return e};e.prototype.rf=function(a,b){var c=-1;if(0<=this.v.mode)for(var d=0;dthis.l.width?this.g.b/2:180*Math.atan(4*this.l.height/(3*this.l.width)*Math.tan(this.g.b/2*Math.PI/180))/Math.PI}return 2*a};e.prototype.Ue=function(a){a/=2;var b;switch(this.g.mode){case 0:this.g.b= 2*a;break;case 1:a=180*Math.atan(this.l.width/this.l.height*Math.tan(a*Math.PI/180))/Math.PI;this.g.b=2*a;break;case 2:b=Math.sqrt(this.l.width*this.l.width+this.l.height*this.l.height);a=180*Math.atan(b/this.l.height*Math.tan(a*Math.PI/180))/Math.PI;this.g.b=2*a;break;case 3:4*this.l.height/3>this.l.width||(a=180*Math.atan(3*this.l.width/(4*this.l.height)*Math.tan(a*Math.PI/180))/Math.PI),this.g.b=2*a}};e.prototype.ab=function(){var a,b,c=this.l.width/this.l.height;if(2==this.rb){0this.g.max&&(this.g.b=this.g.max);1002*d/c&&(this.g.b=2*d/c);this.g.b>this.j.max-this.j.min&&(this.g.b=this.j.max-this.j.min);this.g.b>this.pan.max-this.pan.min&&(this.g.b=this.pan.max-this.pan.min);50this.j.b-b&&(this.j.b= -50+b);this.pan.b+a>d&&(this.pan.b=d-a,this.u.active&&(this.u.speed=-this.u.speed,this.pan.d=0));this.pan.b-a<-d&&(this.pan.b=-d+a,this.u.active&&(this.u.speed=-this.u.speed,this.pan.d=0));this.j.b+b>this.j.max&&(this.j.b=this.j.max-b);this.j.b-bthis.g.max&&(this.g.b= this.g.max),b=this.Wb()/2,a=180*Math.atan(this.l.width/this.l.height*Math.tan(b*Math.PI/180))/Math.PI,2*b>this.j.max-this.j.min&&(b=(this.j.max-this.j.min)/2,this.Ue(2*b)),90>this.j.max?this.j.b+b>this.j.max&&(this.j.b=this.j.max-b):this.j.b>this.j.max&&(this.j.b=this.j.max),-90c){var d=90,g=Math.tan(b*Math.PI/180),e=Math.tan((Math.abs(this.j.b)+b)*Math.PI/180), e=Math.sqrt(e*e+1)/Math.sqrt(g*g+1);b=180*Math.atan(e*Math.tan(a*Math.PI/180))/Math.PI;2*b>c&&(e=Math.tan(c*Math.PI/360)/Math.tan(a*Math.PI/180),c=e*Math.sqrt(g*g+1),e=Math.sqrt(c*c-1),d=180/Math.PI*Math.atan(e));this.pan.b+b>this.pan.max&&(this.pan.b=this.pan.max-b,this.u.active&&(this.u.speed=-this.u.speed,this.pan.d=0));this.pan.b-bd&&(this.j.b=d-a);this.j.b-a<-d&&(this.j.b=-d+a)}};e.prototype.update= function(a){void 0===a&&(a=0);this.Ca=!0;a&&(this.qe=a)};e.prototype.Oi=function(){return this.Y?!!this.Y.isTileLoading:0>16&255)/255,(a>>8&255)/255,(a>>0&255)/255,1)),this.a.clear(this.a.DEPTH_BUFFER_BIT),D(this.qb),L(this.Wb(),this.Ta.width/this.Ta.height,this.qb),this.a.uniformMatrix4fv(this.F.Mc,!1,this.qb),a=0;6>a;a++)D(this.P),K(this.P,-this.G.b*Math.PI/180,[0,0,1]),K(this.P,-this.j.b*Math.PI/180,[1,0,0]),K(this.P,(180-this.pan.b)*Math.PI/180,[0,1,0]),this.oa&&(K(this.P,-this.oa.pitch*Math.PI/180,[1,0,0]),K(this.P,this.oa.G* Math.PI/180,[0,0,1])),4>a?K(this.P,-Math.PI/2*a,[0,1,0]):K(this.P,Math.PI/2*(5==a?1:-1),[1,0,0]),this.a.bindBuffer(this.a.ARRAY_BUFFER,this.tf),this.a.vertexAttribPointer(this.F.ca,3,this.a.FLOAT,!1,0,0),this.a.bindBuffer(this.a.ARRAY_BUFFER,this.oe),this.a.vertexAttribPointer(this.F.Ga,2,this.a.FLOAT,!1,0,0),6<=this.eb.length&&this.eb[a].loaded&&(this.a.activeTexture(this.a.TEXTURE0),this.a.bindTexture(this.a.TEXTURE_2D,this.eb[a]),this.a.bindBuffer(this.a.ELEMENT_ARRAY_BUFFER,this.ne),this.a.uniform1i(this.F.Pe, 0),this.a.uniformMatrix4fv(this.F.He,!1,this.P),this.a.uniformMatrix4fv(this.F.Mc,!1,this.qb),this.a.drawElements(this.a.TRIANGLES,6,this.a.UNSIGNED_SHORT,0))};e.prototype.nk=function(a){var b=this;return function(){b.Ca=!0;b.cc=!0;a.loaded=!0;var c=b.a;b.ja&&b.ja--;0==b.ja&&b.D&&b.D.ggLoadedLevels&&b.D.ggLoadedLevels();c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL,1);if(null!=a.f&&a.f.complete){a.Pb=c.createTexture();c.bindTexture(c.TEXTURE_2D,a.Pb);try{c.texImage2D(c.TEXTURE_2D,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE, a.f)}catch(d){c.texImage2D(c.TEXTURE_2D,0,c.RGBA,1,1,0,c.RGBA,c.UNSIGNED_BYTE,new Uint8Array([128,128,128,250]))}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.bindTexture(c.TEXTURE_2D,null)}b.update()}};e.prototype.sj=function(a){var b=this;return function(){b.Ca=!0;b.cc=!0;try{if(null!=a&&a.complete){var c= {width:a.width,height:a.width,cache:!0,Uf:!0,Ma:1,Fb:1,$:[]},d;for(d=0;6>d;d++){var g={C:null,da:null,f:null,Pb:null};g.C=document.createElement("canvas");b.ka?(g.C.width=c.width,g.C.height=c.height):(g.C.width=b.f.Z+2*b.f.Va,g.C.height=b.f.Z+2*b.f.Va);g.da=g.C.getContext("2d");g.C.Rg=g.da;g.C.style[b.Aa+"Origin"]="0% 0%";g.C.style.overflow="hidden";g.C.style.position="absolute";g.f=a;g.da&&(b.Hb?g.da.drawImage(a,0,d*c.height,c.width,c.height,0,0,c.width+2,c.height+2):g.da.drawImage(a,0,d*c.height, c.width,c.height,0,0,c.width,c.height));if(b.ka&&b.a){var e=b.a;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,1);g.Pb=e.createTexture();e.bindTexture(e.TEXTURE_2D,g.Pb);try{e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,g.C)}catch(f){}e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR);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);e.bindTexture(e.TEXTURE_2D, null)}b.Hb&&(g.C.wc=-1,b.w.insertBefore(g.C,b.w.firstChild));c.$[d]=g}b.f.L.push(c)}}catch(f){}b.update()}};e.prototype.Rh=function(){var a=this;return function(){a.Ca=!0;a.cc=!0;a.ja&&a.ja--;0==a.ja&&a.D&&a.D.ggLoadedLevels&&a.D.ggLoadedLevels()}};e.prototype.Ck=function(){this.ab();var a,b,c;this.ue&&(this.xc(0),this.Sc());if(this.a){if(this.f.mc&&6>16&255)/255,(d>>8&255)/255,(d>>0&255)/255,1)}this.a.clear(this.a.DEPTH_BUFFER_BIT); this.a.enable(this.a.DEPTH_TEST);D(this.qb);L(this.Wb(),this.Ta.width/this.Ta.height,this.qb);this.a.uniformMatrix4fv(this.F.Mc,!1,this.qb);this.Oc=0;this.Xh();this.qh();var g=this.Ag(),e,d=this.f.L;for(e=d.length-1;e>=g;){var f=d[e],k=1;e==d.length-1&&0==this.f.Va&&(k=this.f.Z/(this.f.Z-.5));for(var m=0;6>m;m++){var p;p=this.Pa.Ja[m];var l=p.bd;if(p.Ab&&0c;c++)v[c]=0==c%3?k*t*(-2*v[c]/f.width+1):1==c%3?k*t*(-2*v[c]/f.height+1):t;this.a.bufferData(this.a.ARRAY_BUFFER,new Float32Array(v),this.a.STATIC_DRAW)}}else l=!1;q.visible=p.Ab}r.mh=l}}e--}for(m=0;6>m;m++)if(p=this.Pa.Ja[m],p.Ab)for(l=p.bd,D(this.P),K(this.P, -this.G.b*Math.PI/180,[0,0,1]),K(this.P,-this.j.b*Math.PI/180,[1,0,0]),K(this.P,(180-this.pan.b)*Math.PI/180,[0,1,0]),this.oa&&(K(this.P,-this.oa.pitch*Math.PI/180,[1,0,0]),K(this.P,this.oa.G*Math.PI/180,[0,0,1])),4>m?K(this.P,-Math.PI/2*m,[0,1,0]):K(this.P,Math.PI/2*(5==m?1:-1),[1,0,0]),this.a.uniform1i(this.F.Pe,0),this.a.uniformMatrix4fv(this.F.Mc,!1,this.qb),this.a.uniformMatrix4fv(this.F.He,!1,this.P),this.a.bindBuffer(this.a.ARRAY_BUFFER,this.oe),this.a.vertexAttribPointer(this.F.Ga,2,this.a.FLOAT, !1,0,0),this.a.activeTexture(this.a.TEXTURE0),this.a.bindBuffer(this.a.ELEMENT_ARRAY_BUFFER,this.ne),this.a.useProgram(this.F),e=g;e<=d.length-1;){f=d[e];if(p.Ab&&0a;a++)D(this.P), K(this.P,-this.G.b*Math.PI/180,[0,0,1]),K(this.P,-this.j.b*Math.PI/180,[1,0,0]),K(this.P,(180-this.pan.b)*Math.PI/180,[0,1,0]),this.oa&&(K(this.P,-this.oa.pitch*Math.PI/180,[1,0,0]),K(this.P,this.oa.G*Math.PI/180,[0,0,1])),this.a.bindBuffer(this.a.ARRAY_BUFFER,this.o.ig),this.a.vertexAttribPointer(this.F.ca,3,this.a.FLOAT,!1,0,0),this.a.bindBuffer(this.a.ARRAY_BUFFER,this.o.Xe),this.a.vertexAttribPointer(this.F.Ga,2,this.a.FLOAT,!1,0,0),this.a.activeTexture(this.a.TEXTURE0),this.a.bindBuffer(this.a.ELEMENT_ARRAY_BUFFER, this.o.If),this.a.uniform1i(this.F.Pe,0),this.a.uniformMatrix4fv(this.F.He,!1,this.P),this.a.uniformMatrix4fv(this.F.Mc,!1,this.qb),this.a.drawElements(this.a.TRIANGLES,36,this.a.UNSIGNED_SHORT,0)};e.prototype.xk=function(){this.ab();var a=!1;if(this.l.width!=this.w.offsetWidth||this.l.height!=this.w.offsetHeight)this.l.width=this.w.offsetWidth,this.l.height=this.w.offsetHeight,this.w.style[this.Aa+"OriginX"]=this.l.width/2+"px",this.w.style[this.Aa+"OriginY"]=this.l.height/2+"px",a=!0;var b=Math.round(this.bc()); this.Od==b&&!a||this.Eb||(this.Od=b,this.w.style[this.dc]=b+"px");this.Pa.yi(this.pan.b,this.j.b,this.G.b,this.oa);for(a=0;6>a;a++){var c,d;if(c=this.Pa.Ja[a])d="",this.Eb?(d+="translate3d("+this.l.width/2+"px,"+this.l.height/2+"px,0px) ",d+="perspective("+b+"px) ",d+="translate3d(0px,0px,"+b+"px) "):d+="translate3d("+this.l.width/2+"px,"+this.l.height/2+"px,"+b+"px) ",d+="rotateZ("+Number(this.G.b).toFixed(10)+"deg) ",d+="rotateX("+Number(this.j.b).toFixed(10)+"deg) ",d+="rotateY("+Number(-this.pan.b).toFixed(10)+ "deg) ",c.Sg&&(d+=c.Sg,c.Ab||(d="translate3d(-10px,-10px,0px) scale(0.001,0.001)"),c.C.style[this.Aa]=d)}};e.prototype.uk=function(){this.ab();var a;this.pb&&(a=this.pb.getContext("2d"));if(this.l.width!==this.w.offsetWidth||this.l.height!==this.w.offsetHeight)this.l.width=this.w.offsetWidth,this.l.height=this.w.offsetHeight;if(a){var b=a.canvas.width/2,c=a.canvas.height/2,d=a.createRadialGradient(b,c,5,b,c,Math.max(b,c));d.addColorStop(0,"#333");d.addColorStop(1,"#fff");a.rect(0,0,a.canvas.width, a.canvas.height);a.fillStyle=d;a.fill();a.fillStyle="#f00";a.font="20px Helvetica";a.textAlign="center";a.fillText("Pan: "+this.pan.b.toFixed(1),b,c-60);a.fillText("Tilt: "+this.j.b.toFixed(1),b,c-30);a.fillText("Fov: "+this.g.b.toFixed(1),b,c+0);a.fillText("Node: "+this.Kg(),b,c+30);a.fillText("Title: "+this.od.title,b,c+60)}};e.prototype.vk=function(){this.ab();if(this.l.width!==this.w.offsetWidth||this.l.height!==this.w.offsetHeight)this.l.width=this.w.offsetWidth,this.l.height=this.w.offsetHeight; this.Y&&this.Y.setPan&&(this.Y.setPan(this.pan.b),this.Y.setTilt(this.j.b),this.Y.setFov(this.g.b))};e.prototype.zk=function(){this.la.style.visibility="inherit";this.U||(this.U=this.la.getContext("2d"));if(this.U.width!=this.l.width||this.U.height!=this.l.height)this.U.width=this.l.width,this.U.height=this.l.height;this.U.clear?this.U.clear():this.U.clearRect(0,0,this.la.width,this.la.height);this.Oc=0;this.ab();var a,b,c;b=100/this.g.b;c=this.f.width/this.f.height;var d=this.l.height*b*c;b*=this.l.height; a=(this.pan.b/100/c-.5)*d+this.l.width/2;for(var g=(this.j.b/100-.5)*b+this.l.height/2,e,f,k,m,p=0;this.f.L.length>=p+2&&this.f.L[p+1].width>d;)p++;var l,r;r=[];for(l=this.f.L.length-1;l>=p;){c=this.f.L[l];var q;if(c.cache)q={gb:0,vb:0},q.Bb=c.Ma-1,q.Cb=c.Fb-1;else{q={};var t=-g/b*(c.height/this.f.Z);e=(-a+this.l.width)/d*(c.width/this.f.Z);f=(-g+this.l.height)/b*(c.height/this.f.Z);q.gb=Math.min(Math.max(0,Math.floor(-a/d*(c.width/this.f.Z))),c.Ma-1);q.vb=Math.min(Math.max(0,Math.floor(t)),c.Fb- 1);q.Bb=Math.min(Math.max(0,Math.floor(e)),c.Ma-1);q.Cb=Math.min(Math.max(0,Math.floor(f)),c.Fb-1)}r[l]=q;var v=!0;for(f=q.vb;f<=q.Cb;f++)for(e=q.gb;e<=q.Bb;e++)m=e+f*c.Ma,(t=c.$[m])||(t=c.$[m]={}),this.ja=p;){c=this.f.L[l];if(r[l]&&0<=r[l].gb)for(q=r[l],f=q.vb;f<=q.Cb;f++)for(e=q.gb;e<=q.Bb;e++)m=e+f*c.Ma,(t=c.$[m])||(t=c.$[m]={}),t.f&&t.f.complete&&this.U.drawImage(t.f,a+(-this.f.Va+this.f.Z*e)*d/c.width,g+(-this.f.Va+this.f.Z*f)*b/c.height,t.f.width*d/c.width,t.f.height*b/c.height),t.visible=!0;l--}for(d=0;dthis.Pa.Ja.length))for(a=0;6>a;a++){var b;b=this.Pa.Ja[a];var c;c=[];c.push(new y(-1,-1,-1,0,0));c.push(new y(1,-1,-1,1,0));c.push(new y(1,1,-1,1,1));c.push(new y(-1,1,-1,0,1));for(var d=0;4>d;d++)4>a?c[d].wa(-Math.PI/2*a):c[d].pa(Math.PI/2*(4==a?-1:1)),this.oa&&(c[d].Ra(this.oa.G*Math.PI/180),c[d].pa(-this.oa.pitch*Math.PI/180)),c[d].wa(-this.pan.b*Math.PI/180), c[d].pa(this.j.b*Math.PI/180),c[d].Ra(this.G.b*Math.PI/180);c=this.sf(c);b.Ab=0=a+2&&!this.f.L[a+1].Uf&&this.f.L[a+1].width>c;)a++;return a};e.prototype.yk=function(){this.ab();var a=!1,b,c,d;if(this.l.width!==this.w.offsetWidth||this.l.height!==this.w.offsetHeight)this.l.width=this.w.offsetWidth,this.l.height=this.w.offsetHeight,this.w.style[this.Aa+"OriginX"]= this.l.width/2+"px",this.w.style[this.Aa+"OriginY"]=this.l.height/2+"px",a=!0;var g=Math.round(this.bc());if(this.Od!=g||a)this.Od=g,this.Eb||(this.w.style[this.dc]=g+"px",this.w.style[this.dc+"Origin"]="50% 50%");this.Oc=0;if(0b;b++){var f;f=this.Pa.Ja[b];f.Ab&&(e=e+b+",")}var k=this.Ag(),m;for(m=this.f.L.length-1;m>=k;){var a=this.f.L[m],p=1;m==this.f.L.length-1&&0==this.f.Va&&(p=this.f.Z/(this.f.Z-2));for(b=0;6>b;b++){f=this.Pa.Ja[b];var l= f.bd;if(f.Ab&&0=m);)e=e.nextSibling;this.w.insertBefore(l.C,e);l.da=l.C.Rg}else if(this.Qh=m);)e=e.nextSibling;this.w.insertBefore(l.C,e)}l.C&&(l.f=new Image,l.f.crossOrigin=this.crossOrigin,l.f.style[this.Aa+"Origin"]="0% 0%",l.f.style.position="absolute",l.f.style.overflow="hidden",l.C.wc=m,l.f.onload=this.lk(l),l.f.onerror=this.Ze(l),l.f.onabort=this.Ze(l),l.f.setAttribute("src", this.$e(b,m,c,d)),a.cache&&this.bb.push(l.f),0==this.ja&&this.D&&this.D.ggReLoadedLevels&&this.D.ggReLoadedLevels(),this.ja++,this.Ca=!0)}else this.Oc++;if(l.C){e="";this.Eb?(e+="translate3d("+this.l.width/2+"px,"+this.l.height/2+"px,0px) ",e+=" perspective("+g+"px) ",e+="translate3d(0px,0px,"+g+"px) "):e+="translate3d("+this.l.width/2+"px,"+this.l.height/2+"px,"+g+"px) ";e+="rotateZ("+Number(this.G.b).toFixed(10)+"deg) rotateX("+Number(this.j.b).toFixed(10)+"deg) rotateY("+Number(-this.pan.b).toFixed(10)+ "deg) ";this.oa&&(e+="rotateX("+Number(-this.oa.pitch).toFixed(10)+"deg) rotateZ("+Number(this.oa.G).toFixed(10)+"deg) ");e=4>b?e+("rotateY("+-90*b+"deg)"):e+("rotateX("+(4==b?-90:90)+"deg)");var q;this.fd?(q=this.td/this.f.Z*(this.f.Z/a.width)*(2*m+1),q=this.Ic?2/Math.tan(this.g.b*Math.PI/360)*q:2*q,e+=" scale("+q*p*p+")"):q=1/(p*p);e+=" translate3d("+(1/p*c*this.f.Z-this.f.Va-a.width/2)+"px,"+(1/p*d*this.f.Z-this.f.Va-a.width/2)+"px,"+-a.width*q/2+"px)";f.Ab&&(l.visible=!0,l.C?l.C.style[this.Aa]= e:l.f&&(l.f.style[this.Aa]=e))}}}}m--}for(g=0;gk;k++)n=this.Cc(n,"c",a),n=this.Cc(n,"s",f),n=this.Cc(n,"r",b),n=this.Cc(n,"l",e),n=this.Cc(n,"x",c),n=this.Cc(n,"y",d),n=this.Cc(n,"v",d),n=this.Cc(n,"h",c);return this.ub(n)};e.prototype.Zg=function(){var a,b;if(this.eb)for(;0c;c++)b=this.a.createTexture(),b.Le=null,b.Fe=null,b.Ug=!1,this.a.bindTexture(this.a.TEXTURE_2D,b),this.a.texImage2D(this.a.TEXTURE_2D, 0,this.a.RGB,1,1,0,this.a.RGB,this.a.UNSIGNED_BYTE,null),this.a.texParameteri(this.a.TEXTURE_2D,this.a.TEXTURE_MIN_FILTER,this.a.LINEAR),this.a.texParameteri(this.a.TEXTURE_2D,this.a.TEXTURE_WRAP_S,this.a.CLAMP_TO_EDGE),this.a.texParameteri(this.a.TEXTURE_2D,this.a.TEXTURE_WRAP_T,this.a.CLAMP_TO_EDGE),this.Vc[c]&&(a=new Image,a.crossOrigin=this.crossOrigin,a.src=this.ub(this.Vc[c]),b.Le=a,a.addEventListener&&a.addEventListener("load",this.Ff(b),!1),this.bb.push(a)),this.eb.push(b);for(c=0;6>c;c++)this.me[c]&& (a=new Image,a.crossOrigin=this.crossOrigin,a.src=this.ub(this.me[c]),a.addEventListener?a.addEventListener("load",this.Ff(this.eb[c]),!1):a.onload=this.Ff(this.eb[c]),this.eb[c].Fe=a,this.bb.push(a));for(c=0;cb;b++)2>b%3&&(n[b]*=a);this.a.bufferData(this.a.ARRAY_BUFFER,new Float32Array(n),this.a.STATIC_DRAW);this.oe=this.a.createBuffer();this.a.bindBuffer(this.a.ARRAY_BUFFER,this.oe);var f=[1,0,0,0,0,1,1,1];this.a.bufferData(this.a.ARRAY_BUFFER,new Float32Array(f), this.a.STATIC_DRAW);this.ne=this.a.createBuffer();this.a.bindBuffer(this.a.ELEMENT_ARRAY_BUFFER,this.ne);var k=[0,1,2,0,2,3];this.a.bufferData(this.a.ELEMENT_ARRAY_BUFFER,new Uint16Array(k),this.a.STATIC_DRAW);var n=[],k=[],f=[],m=new y;for(a=0;6>a;a++){d=a%3;e=3>a?1:0;for(c=0;4>c;c++){m.x=-1;m.y=-1;m.z=1;for(b=0;bm.x?.33:0)+.33*d,(0>m.y?0:.5)+.5*e);if(4>a)for(b=0;ba;)a+=360;for(;180a;)a+=360;for(;180a){var b=this.g.b;this.g.b=Number(a);this.ab(); b!=this.g.b&&this.update()}};e.prototype.pg=function(a,b){this.Re(this.Bd()+a);b&&(this.g.d=a)};e.prototype.ud=function(a,b){if(!isNaN(a)){var c;c=a/90*Math.cos(Math.min(this.g.b,90)*Math.PI/360);c=this.g.b*Math.exp(c);this.Re(c);b&&(this.g.d=a)}};e.prototype.Wj=function(a,b){this.ia();isNaN(a)||(this.pan.b=a);isNaN(b)||(this.j.b=b);this.update()};e.prototype.ag=function(a,b,c){this.ia();isNaN(a)||(this.pan.b=a);isNaN(b)||(this.j.b=b);!isNaN(c)&&0c&&(this.g.b=c);this.update()};e.prototype.Rj= function(){this.ag(this.pan.fb,this.j.fb,this.g.fb)};e.prototype.Uj=function(a){this.Te(a);this.Jh(a);this.Se(a)};e.prototype.Te=function(a){this.B.Wa=a};e.prototype.Se=function(a){this.B.Qd=a};e.prototype.Jh=function(a){this.B.Nf=a};e.prototype.moveTo=function(a,b,c,d,e){this.ia();if("_blank"!==a&&""!==a){this.K.active=!0;this.K.qd=!1;var n=a.toString().split("/");1c?this.K.g=Number(c):this.K.g=this.g.b;this.K.speed=!isNaN(d)&&0c;)c+=360;d=d.ni()}var e= {};e.pan=c;e.tilt=d;return e};e.prototype.ic=function(a){return a==this.control||a&&a.ggType&&("container"==a.ggType||"cloner"==a.ggType||"timer"==a.ggType)?!0:!1};e.prototype.qf=function(a,b){var c=this.bc(),d,e,n;for(d=0;dp;p++){switch(p){case 0:m.Ka(-l,-r,-1);break;case 1:m.Ka(l,-r,-1);break;case 2:m.Ka(l,r,-1);break;case 3:m.Ka(-l,r,-1)}m.pa(-f.j*Math.PI/180);m.wa(f.pan*Math.PI/180);m.wa(-this.pan.b*Math.PI/180);m.pa(this.j.b*Math.PI/180);m.Ra(this.G.b*Math.PI/180);k.push(m.clone())}k=this.sf(k);if(0m.z?(n=-c/m.z,e=this.l.width/2+m.x*n,n=this.l.height/2+m.y*n):n=e=0,m.sb=e,m.Ya=n;if(this.Vg(k,a,b))return f}}return null}; e.prototype.Be=function(){return document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement&&null!=document.msFullscreenElement||document.fullScreen};e.prototype.pj=function(a){this.Wh(a);if(this.Ub)this.Ub.onclick();this.rc=null;if(!this.B.Wa){a=a?a:window.event;if((a.which||0==a.which||1==a.which)&&this.ic(a.target)){var b;(b=this.qf(this.ha.x,this.ha.y))&&b.Yb&&(this.rc=b);this.ei(a.pageX,a.pageY);this.N.Da=1;this.N.startTime=(new Date).getTime();a.preventDefault();this.ia()}this.O.V.x= 0;this.O.V.y=0}};e.prototype.nd=function(a,b){var c=this.v.fg;c.enabled&&(this.ma!=this.Qa&&0<=a&&0<=b&&""!=this.ma.title?(this.na.innerHTML=this.ma.title,this.na.style.color=this.X(c.gg,c.eg),c.background?this.na.style.backgroundColor=this.X(c.mb,c.Mb):this.na.style.backgroundColor="transparent",this.na.style.border="solid "+this.X(c.ob,c.Nb)+" "+c.nf+"px",this.na.style.borderRadius=c.mf+"px",this.na.style.textAlign="center",0a-this.N.startTime&&0<=b&&20>b&&(this.rc&&this.rc.Yb(),(b=this.rf(this.ha.x,this.ha.y))&&this.Th(b),b=Math.abs(this.O.kc.x-this.O.W.x)+Math.abs(this.O.kc.y-this.O.W.y),700>a-this.Md&&0<=b&&20> b?(this.B.xf&&this.cf(),this.Md=0):this.Md=a,this.O.kc.x=this.O.W.x,this.O.kc.y=this.O.W.y)}};e.prototype.sh=function(a){if(!this.B.Nf&&(a=a?a:window.event,this.ic(a.target))){var b=a.detail?-1*a.detail:a.wheelDelta/40;this.B.$g&&(b=-b);a.axis&&(-1==this.Ee?this.Ee=a.axis:this.Ee!=a.axis&&(b=0));var c=0this.N.Da&&b[0]){this.N.startTime=(new Date).getTime();this.N.start.x=b[0].pageX;this.N.start.y=b[0].pageY;this.N.W.x=b[0].pageX;this.N.W.y=b[0].pageY;this.tb=b[0].target;if(this.ic(a.target)){var d;(d=this.qf(this.ha.x,this.ha.y))&&d.Yb&&(this.rc=d);if(d=this.rf(this.ha.x,this.ha.y))this.kd=d,this.Qe(d),d=this.Cd(a),this.nd(d.x-c.x,d.y-c.y);this.ei(b[0].pageX,b[0].pageY);this.N.Da=b[0].identifier;a.preventDefault();this.ia()}if(this.tb){c= this.tb;for(d=!1;c&&c!=this.control;){if(c.onmouseover)c.onmouseover();c.onmousedown&&!d&&(c.onmousedown(),d=!0);c=c.parentNode}d&&a.preventDefault()}}1this.g.max&&(this.A.g.Ia=this.g.max),this.A.g.Iab){a.preventDefault();d=!0;this.ic(this.tb)&&this.rc&&this.rc.Yb();if(this.tb)for(b=this.tb,n=!1;b&&b!=this.control;)b.onclick&&!n&&(b.onclick(),n=!0,d=!1),b=b.parentNode;b=Math.abs(this.N.kc.x-this.N.W.x)+Math.abs(this.N.kc.y-this.N.W.y);if(700>e-this.Md&&0<=b&&20>b){a.preventDefault();if(this.ic(this.tb)&&this.B.xf){var f=this;setTimeout(function(){f.cf()},1)}if(this.tb)for(b=this.tb,n=!1;b&&b!=this.control;)b.ondblclick&&!n&&(b.ondblclick(),n=!0,d=!1),b=b.parentNode;this.Md=0}else this.Md= e;this.N.kc.x=this.N.W.x;this.N.kc.y=this.N.W.y}if(this.tb)for(a.preventDefault(),b=this.tb,n=!1;b&&b!=this.control;){if(b.onmouseout)b.onmouseout();b.onmouseup&&!n&&(b.onmouseup(),n=!0);b=b.parentNode}this.tb=null;this.N.Da=-11;this.Qe(this.Qa);a=this.Cd(a);this.nd(a.x-c.x,a.y-c.y);this.kd&&d&&this.Th(this.kd);this.kd=null}};e.prototype.qk=function(a){var b=this.Hc();this.B.Wa||(this.N.Da=-2);this.kd=null;this.Qe(this.Qa);a=this.Cd(a);this.nd(a.x-b.x,a.y-b.y)};e.prototype.jj=function(){return null!= this.tb||0<=this.N.Da};e.prototype.uh=function(a){!this.Kc&&window.MSGesture&&(this.Kc=new MSGesture,this.Kc.target=this.control);this.Kc&&this.Kc.addPointer(a.pointerId)};e.prototype.Jg=function(a){this.Gf=!0;this.Ge=1;this.B.Wa||(a.touches?(this.tb=a.touches.target,this.ic(a.target)&&(a.preventDefault(),this.g.dd=this.g.b,this.ia())):(a.preventDefault(),this.g.dd=this.g.b,this.ia()))};e.prototype.Fi=function(a){!this.B.Wa&&this.ic(a.target)&&(a.preventDefault(),this.A.g.active=!0,this.A.g.Ia=this.g.dd/ Math.sqrt(a.scale),this.A.g.Ia>this.g.max&&(this.A.g.Ia=this.g.max),this.A.g.Iathis.g.max&&(this.A.g.Ia=this.g.max),this.A.g.Iathis.pan.d;)this.pan.d+=360;for(;1805*c?c/d:.2,this.pan.d*=d,this.j.d*=d,this.g.d*=d;this.pan.b+=this.pan.d;this.j.b+=this.j.d;this.G.b+=this.G.d;this.g.b+=this.g.d;this.De=a.getTime(); this.update()}else if(this.u.active)if(d=a.getTime()-this.u.startTime,this.u.bi&&0=this.T.length)if(this.rd=!1,this.lc=this.T.nextcliptitle,this.lc==this.T.cliptitle){if(1=1E3*this.u.Ie){if(1=this.sa.length&&(b=0),c=this.sa[b];this.u.startTime=a.getTime();this.u.jc=a.getTime();this.u.timeout=0;this.Lc("{"+c+"}");this.u.active=!0;this.S.sd=!0}}else c=a.getTime(),a=d=1E3/60,0!=this.u.jc&&(a=c-this.u.jc),this.j.d=this.u.af*(0-this.j.b)/100,this.g.d=this.u.af*(this.g.fb-this.g.b)/100,this.pan.d=.95*this.pan.d+-this.u.speed*this.vc()*.05,d=a/d,this.pan.b+=this.pan.d* d,this.j.b+=this.j.d*d,this.g.b+=this.g.d*d,this.u.jc=c,this.update();else this.u.enabled&&0>this.N.Da&&a.getTime()-this.De>1E3*this.u.timeout&&(this.u.Wd&&this.isLoaded||!this.u.Wd)&&(this.u.active=!0,this.u.startTime=a.getTime(),this.u.jc=0,this.pan.d=0,this.j.d=0,this.g.d=0),this.A.enabled&&0==this.Jc&&0>this.N.Da&&(0!=this.pan.d||0!=this.j.d||0!=this.g.d)&&(this.pan.d*=.9,this.j.d*=.9,this.g.d*=.9,this.pan.b+=this.pan.d,this.j.b+=this.j.d,this.ud(this.g.d),1E-4>this.pan.d*this.pan.d+this.j.d* this.j.d+this.g.d*this.g.d&&(this.pan.d=0,this.j.d=0,this.g.d=0),this.update())};e.prototype.Cj=function(a){var b=this.S;if(b.Ec){var c=a.getTime()-b.hi,c=c/(1E3*b.gi);if(1<=c){b.Ec=!1;for(c=0;c=1E3*b.Ai&&(b.pe=!1):(b.current+=b.Tb,0>b.current&&(b.current=0,b.Tb=-b.Tb,b.pe=!0,b.yf=a.getTime()),1b.ea?(b.ea+=this.v.Tb,b.Hab.ea&&(b.ea= b.Ha)),this.update())}3==this.v.mode&&this.v.Ha!=this.v.ea&&(this.v.Ha>this.v.ea?(this.v.ea+=this.v.Tb,this.v.Hathis.v.ea&&(this.v.ea=this.v.Ha)),this.update())};e.prototype.Dj=function(){0<=this.N.Da&&(this.B.yc?(this.A.V.x=.4*(this.O.W.x-this.A.W.x),this.A.V.y=.4*(this.O.W.y-this.A.W.y),this.A.W.x+=this.A.V.x,this.A.W.y+=this.A.V.y):(this.A.V.x=.1*-this.O.V.x*this.B.sensitivity/8,this.A.V.y=.1*-this.O.V.y*this.B.sensitivity/8),this.ci(this.A.V.x, this.A.V.y),this.update());this.A.g.active&&(this.pg(.4*(this.A.g.Ia-this.g.b)),.001>Math.abs(this.A.g.Ia-this.g.b)/this.g.b&&(this.A.g.active=!1),this.update());this.A.enabled&&(0!=this.A.V.x||0!=this.A.V.y)&&0>this.N.Da&&(this.A.V.x=.9*this.A.V.x,this.A.V.y=.9*this.A.V.y,.1>this.A.V.x*this.A.V.x+this.A.V.y*this.A.V.y?(this.A.V.x=0,this.A.V.y=0):(this.ci(this.A.V.x,this.A.V.y),this.update()))};e.prototype.Ej=function(){if(0!=this.Jc){var a=this.B.sensitivity/8;switch(this.Jc){case 37:case 65:this.je(a* this.vc(),!0);break;case 38:case 87:this.ke(a*this.vc(),!0);break;case 39:case 68:this.je(-a*this.vc(),!0);break;case 40:case 83:this.ke(-a*this.vc(),!0);break;case 43:case 107:case 16:case 81:this.B.Mf||this.ud(-a,!0);break;case 17:case 18:case 109:case 45:case 91:case 69:this.B.Mf||this.ud(a,!0)}this.update()}};e.prototype.Fj=function(){if(!this.isLoaded&&this.Id&&5this.pan.b;)this.pan.b+=360;this.Bj(a);this.Cj(a);this.Ak();0>4,d=(d&15)<<4|n>>2,e=(n&3)<<6|f,b+=String.fromCharCode(c),64!=n&&(b+=String.fromCharCode(d)),64!=f&&(b+=String.fromCharCode(e));while(kd&&(d=0);"_video"===a&&this.o.c&&(this.o.c.volume=d);if("_main"===a){this.ba=d;for(c=0;cc&&(c=0);this.ba=c;for(d=0;dc&&(c=0);n.level=c;n.c.volume=c*this.ba}}}catch(f){}};e.prototype.Ph=function(){try{for(var a=this,b= !1,c=!1,d=0;de&&(e=this.oc);for(d=0;6>d;d++){c=this.Pa.Ja[d];a?(c.width= this.td,c.height=this.td):(c.C=document.createElement("canvas"),c.C.width=this.oc,c.C.height=this.oc,c.width=this.oc,c.height=this.oc,c.da=c.C.getContext("2d"));b="position:absolute;";b+="left: 0px;";b+="top: 0px;";b+="width: "+e+"px;";b+="height: "+e+"px;";a&&(b+="outline: 1px solid transparent;");b+=this.ua+"transform-origin: 0% 0%;";b+="-webkit-user-select: none;";b+=this.ua+"transform: ";var n;n="";var f=1;this.fd&&(f=100);n=4>d?n+("rotateY("+-90*d+"deg)"):n+("rotateX("+(4==d?-90:90)+"deg)"); this.fd&&(n+=" scale("+f+")");n+=" translate3d("+-e/2+"px,"+-e/2+"px,"+-e*f/(2*this.Xd)+"px)";b+=n+";";c.Sg=n;a||(c.C.setAttribute("style",b),this.w.insertBefore(c.C,this.w.firstChild))}if(!a){for(d=0;6>d;d++)c=this.Pa.Ja[d],""!=this.Vc[d]&&(c.nc=new Image,c.nc.crossOrigin=this.crossOrigin,c.nc.onload=this.ug(c),c.nc.setAttribute("src",this.ub(this.Vc[d])),this.bb.push(c.nc));for(d=0;6>d;d++)c=this.Pa.Ja[d],c.loaded=!1,c.f=new Image,c.f.crossOrigin=this.crossOrigin,c.f.onload=this.ug(c),c.f.setAttribute("src", this.ub(this.me[d])),this.bb.push(c.f)}};e.prototype.Dh=function(){var a;if(this.Hb){for(a=0;aa.ze?a.hf:a.ze};e.prototype.Wf=function(a,b){var c=(new DOMParser).parseFromString(a, "text/xml");this.vf=a;this.Bh(c,b);this.Y&&(this.Y.readConfigString(this.vf),this.Y.setLocked(!0),this.Y.setSlaveMode(!0))};e.prototype.Ah=function(a,b,c){try{var d;d=new XMLHttpRequest;d.open("GET",a,!1);d.send(null);if(d.responseXML){var e=a.lastIndexOf("/");0<=e&&(this.qc=a.substr(0,e+1));2<=arguments.length&&null!=b&&(this.qc=b);this.Wf(d.responseText,c)}else alert("Error loading panorama XML")}catch(n){alert("Error:"+n)}};e.prototype.Hj=function(a,b,c,d){var e;e=new XMLHttpRequest;var n=this; e.onload=function(f){if(4<=e.readyState)if(e.responseXML){var k=a.lastIndexOf("/");0<=k&&(n.qc=a.substr(0,k+1));3<=arguments.length&&null!=c&&(n.qc=c);n.Wf(e.responseText,d);b&&b()}else alert("Error loading panorama XML");else console.error("Wrong state loading XML:"+e.statusText)};e.onerror=function(){console.error("Error loading XML:"+e.statusText)};e.open("GET",a,!0);e.send(null)};e.prototype.pf=function(a){this.Sh("beforechangenode",{vj:this.currentNode,Pk:a});""!=this.currentNode&&-1==this.jg.indexOf(this.currentNode)&& this.jg.push(this.currentNode);"{"==a.charAt(0)?this.currentNode=a.substr(1,a.length-2):this.currentNode="";this.xa&&this.xa.changeActiveNode&&this.xa.changeActiveNode(a);this.Sh("changenode",{vj:this.currentNode,Ok:a})};e.prototype.Kg=function(){return this.currentNode};e.prototype.Ng=function(){if(0=this.sa.length&&(a=0);return this.sa[a]}return""};e.prototype.$i=function(){if(0a&&(a=this.sa.length-1);return this.sa[a]}return""};e.prototype.tj=function(a){return-1!=this.jg.indexOf(a)};e.prototype.Bh=function(a,b){var c=a.firstChild;this.Pc=[];this.sa=[];if("tour"==c.nodeName){this.Ld=!0;var d="",e;(e=c.getAttributeNode("start"))&&(d=e.nodeValue.toString());this.hasOwnProperty("startNode")&&this.startNode&&(d=String(this.startNode),this.startNode="");for(var c=c.firstChild,n="";c;)"panorama"==c.nodeName&&(e=c.getAttributeNode("id"))&&(e=e.nodeValue.toString(),""==d&& (d=e),""==n&&(n=e),this.Pc[e]=c,this.sa.push(e)),c=c.nextSibling;this.Pc.hasOwnProperty(d)||(this.ad("Start node "+d+" not found!"),d=n);this.Vf(this.Pc[d],b);this.pf("{"+d+"}")}else this.Ld=!1,this.Vf(c,b),this.pf(""),this.sa.push("")};e.prototype.Vf=function(a,b){this.Ch();this.Ea&&this.Ea.Jj();this.gd(this.Qa);this.Dh();this.Od=0;for(var c=a.firstChild,d,e,n=0;c;){if("view"==c.nodeName){if(d=c.getAttributeNode("fovmode"))this.g.mode=Number(d.nodeValue);d=c.getAttributeNode("pannorth");this.pan.Pf= 1*(d?d.nodeValue:0);for(var f=c.firstChild;f;)"start"==f.nodeName&&(d=f.getAttributeNode("pan"),this.pan.b=Number(d?d.nodeValue:0),this.pan.fb=this.pan.b,d=f.getAttributeNode("tilt"),this.j.b=Number(d?d.nodeValue:0),this.j.fb=this.j.b,d=f.getAttributeNode("roll"),this.G.b=Number(d?d.nodeValue:0),this.G.fb=this.G.b,d=f.getAttributeNode("fov"),this.g.b=Number(d?d.nodeValue:70),this.g.fb=this.g.b),"min"==f.nodeName&&(d=f.getAttributeNode("pan"),this.pan.min=1*(d?d.nodeValue:0),d=f.getAttributeNode("tilt"), this.j.min=1*(d?d.nodeValue:-90),d=f.getAttributeNode("fov"),this.g.min=1*(d?d.nodeValue:5),1E-20>this.g.min&&(this.g.min=1E-20),d=f.getAttributeNode("fovpixel"),this.g.Ud=1*(d?d.nodeValue:0)),"max"==f.nodeName&&(d=f.getAttributeNode("pan"),this.pan.max=1*(d?d.nodeValue:0),d=f.getAttributeNode("tilt"),this.j.max=1*(d?d.nodeValue:90),d=f.getAttributeNode("fov"),this.g.max=1*(d?d.nodeValue:120),180<=this.g.max&&(this.g.max=179.9)),f=f.nextSibling}if("autorotate"==c.nodeName){if(d=c.getAttributeNode("speed"))this.u.speed= 1*d.nodeValue;if(d=c.getAttributeNode("delay"))this.u.timeout=1*d.nodeValue;if(d=c.getAttributeNode("returntohorizon"))this.u.af=1*d.nodeValue;if(d=c.getAttributeNode("nodedelay"))this.u.Ie=1*d.nodeValue;if(d=c.getAttributeNode("noderandom"))this.u.Of=1==d.nodeValue;this.se&&(this.u.enabled=!0,this.u.active=!1);if(d=c.getAttributeNode("startloaded"))this.u.Wd=1==d.nodeValue,this.u.Wd&&(this.u.active=!1);if(d=c.getAttributeNode("useanimation"))this.u.bi=1==d.nodeValue}if("animation"==c.nodeName)for(this.sc= [],f=c.firstChild;f;){if("clip"==f.nodeName){this.T={};(d=f.getAttributeNode("animtitle"))&&(this.T.animtitle=d.nodeValue.toString());(d=f.getAttributeNode("cliptitle"))&&(this.T.cliptitle=d.nodeValue.toString());(d=f.getAttributeNode("nodeid"))&&(this.T.nodeid=d.nodeValue.toString());(d=f.getAttributeNode("length"))&&(this.T.length=Number(d.nodeValue));(d=f.getAttributeNode("animtype"))&&(this.T.animtype=Number(d.nodeValue));(d=f.getAttributeNode("nextcliptitle"))&&(this.T.nextcliptitle=d.nodeValue.toString()); (d=f.getAttributeNode("nextclipnodeid"))&&(this.T.nextclipnodeid=d.nodeValue.toString());(d=f.getAttributeNode("transitiontype"))&&(this.T.transitiontype=Number(d.nodeValue));var k=f.firstChild;for(this.T.keyframes=[];k;){if("keyframe"==k.nodeName){var m={};(d=k.getAttributeNode("time"))&&(m.time=Number(d.nodeValue));(d=k.getAttributeNode("value"))&&(m.value=Number(d.nodeValue));d=k.getAttributeNode("type");var p=0;d&&(m.type=Number(d.nodeValue),p=Number(d.nodeValue));(d=k.getAttributeNode("property"))&& (m.property=Number(d.nodeValue));if(1==p||2==p)(d=k.getAttributeNode("bezierintime"))&&(m.bezierintime=Number(d.nodeValue)),(d=k.getAttributeNode("bezierinvalue"))&&(m.bezierinvalue=Number(d.nodeValue)),(d=k.getAttributeNode("bezierouttime"))&&(m.bezierouttime=Number(d.nodeValue)),(d=k.getAttributeNode("bezieroutvalue"))&&(m.bezieroutvalue=Number(d.nodeValue));this.T.keyframes.push(m)}k=k.nextSibling}this.lc==this.T.cliptitle&&(d=this.T.keyframes,this.ag(d[0].value,d[1].value,d[2].value));this.sc.push(this.T)}f= f.nextSibling}"input"==c.nodeName&&(e||(e=c));if(e)for(f=0;6>f;f++)d=e.getAttributeNode("prev"+f+"url"),this.Vc[f]=d?String(d.nodeValue):"";"altinput"==c.nodeName&&(f=0,(d=c.getAttributeNode("screensize"))&&(f=1*d.nodeValue),0n&&(n=f,e=c));if("control"==c.nodeName&&this.se){if(d=c.getAttributeNode("simulatemass"))this.A.enabled=1==d.nodeValue;if(d=c.getAttributeNode("locked"))this.B.Wa=1==d.nodeValue;d&&(this.B.Qd=1==d.nodeValue);if(d=c.getAttributeNode("lockedmouse"))this.B.Wa= 1==d.nodeValue;if(d=c.getAttributeNode("lockedkeyboard"))this.B.Qd=1==d.nodeValue;if(d=c.getAttributeNode("lockedkeyboardzoom"))this.B.Mf=1==d.nodeValue;if(d=c.getAttributeNode("lockedwheel"))this.B.Nf=1==d.nodeValue;if(d=c.getAttributeNode("invertwheel"))this.B.$g=1==d.nodeValue;if(d=c.getAttributeNode("speedwheel"))this.B.Nh=1*d.nodeValue;if(d=c.getAttributeNode("invertcontrol"))this.B.yc=1==d.nodeValue;if(d=c.getAttributeNode("sensitivity"))this.B.sensitivity=1*d.nodeValue,1>this.B.sensitivity&& (this.B.sensitivity=1);if(d=c.getAttributeNode("dblclickfullscreen"))this.B.xf=1==d.nodeValue;if(d=c.getAttributeNode("contextfullscreen"))this.B.le=1==d.nodeValue;if(d=c.getAttributeNode("hideabout"))this.B.Ae=1==d.nodeValue;for(f=c.firstChild;f;)"menulink"==f.nodeName&&(k={text:"",url:""},d=f.getAttributeNode("text"),k.text=d.nodeValue,d=f.getAttributeNode("url"),k.url=d.nodeValue,this.Td.push(k)),f=f.nextSibling}if("transition"==c.nodeName){if(d=c.getAttributeNode("enabled"))this.S.enabled=1== d.nodeValue;if(d=c.getAttributeNode("blendtime"))this.S.ng=d.nodeValue;if(d=c.getAttributeNode("blendcolor"))this.S.ie=d.nodeValue.toString();if(d=c.getAttributeNode("type"))this.S.type=d.nodeValue.toString();if(d=c.getAttributeNode("softedge"))this.S.Zb=1*d.nodeValue;if(d=c.getAttributeNode("zoomin"))this.S.Ba=d.nodeValue;if(d=c.getAttributeNode("zoomout"))this.S.Kb=d.nodeValue;if(d=c.getAttributeNode("zoomfov"))this.S.kf=d.nodeValue;if(d=c.getAttributeNode("zoomspeed"))this.S.ge=d.nodeValue;if(d= c.getAttributeNode("zoomoutpause"))this.S.lf=1==d.nodeValue}if("soundstransition"==c.nodeName){if(d=c.getAttributeNode("enabled"))this.ra.enabled=1==d.nodeValue;if(d=c.getAttributeNode("transitiontime"))this.ra.pc=1*d.nodeValue;if(d=c.getAttributeNode("crossfade"))this.ra.tg=1==d.nodeValue}"userdata"==c.nodeName&&(this.userdata=this.od=this.re(c));if("hotspots"==c.nodeName)for(f=c.firstChild;f;){if("label"==f.nodeName){k=this.v.fg;if(d=f.getAttributeNode("enabled"))k.enabled=1==d.nodeValue;if(d=f.getAttributeNode("width"))k.width= 1*d.nodeValue;if(d=f.getAttributeNode("height"))k.height=1*d.nodeValue;if(d=f.getAttributeNode("textcolor"))k.gg=1*d.nodeValue;if(d=f.getAttributeNode("textalpha"))k.eg=1*d.nodeValue;if(d=f.getAttributeNode("background"))k.background=1==d.nodeValue;if(d=f.getAttributeNode("backgroundalpha"))k.Mb=1*d.nodeValue;if(d=f.getAttributeNode("backgroundcolor"))k.mb=1*d.nodeValue;if(d=f.getAttributeNode("border"))k.nf=1*d.nodeValue;if(d=f.getAttributeNode("bordercolor"))k.ob=1*d.nodeValue;if(d=f.getAttributeNode("borderalpha"))k.Nb= 1*d.nodeValue;if(d=f.getAttributeNode("borderradius"))k.mf=1*d.nodeValue;if(d=f.getAttributeNode("wordwrap"))k.jf=1==d.nodeValue}if("polystyle"==f.nodeName){if(d=f.getAttributeNode("mode"))this.v.mode=1*d.nodeValue;if(d=f.getAttributeNode("bordercolor"))this.v.ob=1*d.nodeValue;if(d=f.getAttributeNode("backgroundcolor"))this.v.mb=1*d.nodeValue;if(d=f.getAttributeNode("borderalpha"))this.v.Nb=1*d.nodeValue;if(d=f.getAttributeNode("backgroundalpha"))this.v.Mb=1*d.nodeValue;if(d=f.getAttributeNode("handcursor"))this.v.Yc= 1==d.nodeValue}d=void 0;"hotspot"==f.nodeName&&(d=new Y(this),d.type="point",d.Za(f),this.I.push(d));"polyhotspot"==f.nodeName&&(d=new Y(this),d.type="poly",d.Za(f),this.I.push(d));f=f.nextSibling}if("sounds"==c.nodeName||"media"==c.nodeName)for(f=c.firstChild;f;)"sound"!=f.nodeName||this.vh||(d=new U(this),d.Za(f),this.Sa||d.addElement()),"video"==f.nodeName&&(d=new V(this),d.Za(f),this.Sa||d.addElement()),"image"==f.nodeName&&(d=new W(this),d.Za(f),this.Sa||d.addElement()),"lensflare"==f.nodeName&& this.Ea&&(d=new X(this),d.Za(f),this.Ea.Pd.push(d)),f=f.nextSibling;c=c.nextSibling}b&&""!=b&&(c=b.toString().split("/"),0f;f++)(d=e.getAttributeNode("tile"+f+"url"))&&(this.me[f]=String(d.nodeValue)),d=e.getAttributeNode("tile"+f+"url1");for(f=0;6>f;f++)(d=e.getAttributeNode("prev"+ f+"url"))&&(this.Vc[f]=String(d.nodeValue));if(d=e.getAttributeNode("tilesize"))this.oc=1*d.nodeValue;if(d=e.getAttributeNode("canvassize"))this.td=Number(d.nodeValue);if(d=e.getAttributeNode("tilescale"))this.Xd=1*d.nodeValue;if(d=e.getAttributeNode("leveltileurl"))this.f.ph=d.nodeValue;if(d=e.getAttributeNode("leveltilesize"))this.f.Z=Number(d.nodeValue);if(d=e.getAttributeNode("levelbias"))this.f.nh=Number(d.nodeValue);if(d=e.getAttributeNode("levelbiashidpi"))this.f.oh=Number(d.nodeValue);d=e.getAttributeNode("overlap"); this.oa.G=0;this.oa.pitch=0;d&&(this.f.Va=Number(d.nodeValue));if(d=e.getAttributeNode("levelingroll"))this.oa.G=Number(d.nodeValue);if(d=e.getAttributeNode("levelingpitch"))this.oa.pitch=Number(d.nodeValue);this.rb=0;(d=e.getAttributeNode("flat"))&&1==d.nodeValue&&(this.rb=2);d=e.getAttributeNode("width");this.f.width=1*(d?d.nodeValue:1);d=e.getAttributeNode("height");this.f.height=1*(d?d.nodeValue:this.f.width);this.o.src=[];this.f.L=[];for(f=e.firstChild;f;){if("preview"==f.nodeName){if(d=f.getAttributeNode("color"))this.f.mc= d.nodeValue;if(d=f.getAttributeNode("strip"))this.f.zh=1==d.nodeValue}if("video"==f.nodeName){if(d=f.getAttributeNode("format"))this.o.format=d.nodeValue.toString();if(d=f.getAttributeNode("bleed"))this.o.he=Number(d.nodeValue);if(d=f.getAttributeNode("endaction"))this.o.Fc=String(d.nodeValue);if(d=f.getAttributeNode("width"))this.o.width=Number(d.nodeValue);if(d=f.getAttributeNode("height"))this.o.height=Number(d.nodeValue);for(e=f.firstChild;e;)"source"==e.nodeName&&(d=e.getAttributeNode("url"))&& this.o.src.push(d.nodeValue.toString()),e=e.nextSibling}if("level"==f.nodeName){e={width:0,height:0,cache:!1,Uf:!1,Ma:0,Fb:0,$:[]};d=f.getAttributeNode("width");e.width=1*(d?d.nodeValue:1);d=f.getAttributeNode("height");e.height=1*(d?d.nodeValue:e.width);if(d=f.getAttributeNode("preload"))e.cache=1==d.nodeValue;if(d=f.getAttributeNode("preview"))e.Uf=1==d.nodeValue;e.Ma=Math.floor((e.width+this.f.Z-1)/this.f.Z);e.Fb=Math.floor((e.height+this.f.Z-1)/this.f.Z);this.f.L.push(e)}f=f.nextSibling}this.f.lh= this.f.L.length}this.ae&&(this.ka=this.Hb=!1,this.pb||(this.pb=document.createElement("canvas"),this.pb.width=100,this.pb.height=100,this.pb.id="dummycanvas",this.w.appendChild(this.pb)),this.Sc());this.ka&&this.a&&(this.Yg(this.Xd),this.Zg());this.Hb&&(0a;a++)for(c=a%3*n+l.o.he,e=c+n-2*l.o.he,d=4,3<=a&&(d+=n),f=d+n-2*l.o.he,b=0;4>b;b++){k.x=-1;k.y=-1;k.z=1;for(var p= 0;pa.time&&this.T.keyframes[b].timea&&(a=0),a>this.o.c.duration&&(a=this.o.c.duration-.1),this.o.c.currentTime=a,this.update())};e.prototype.ej=function(){return this.o.c?this.o.c.currentTime: 0};e.prototype.dj=function(){if(this.o.c)return this.o.c};e.prototype.Bi=function(){this.vh=!0};return e}();window.pano2vrPlayer=Z;Z.prototype.readConfigString=Z.prototype.Wf;Z.prototype.readConfigUrl=Z.prototype.Ah;Z.prototype.readConfigUrlAsync=Z.prototype.Hj;Z.prototype.readConfigXml=Z.prototype.Bh;Z.prototype.openUrl=Z.prototype.Qf;Z.prototype.openNext=Z.prototype.Lc;Z.prototype.setMargins=Z.prototype.Vj;Z.prototype.addListener=Z.prototype.addListener;Z.prototype.removeEventListener=Z.prototype.removeEventListener; Z.prototype.detectBrowser=Z.prototype.xg;Z.prototype.initWebGL=Z.prototype.xc;Z.prototype.getPercentLoaded=Z.prototype.Wi;Z.prototype.setBasePath=Z.prototype.Pj;Z.prototype.getBasePath=Z.prototype.Gi;Z.prototype.setViewerSize=Z.prototype.Lh;Z.prototype.getViewerSize=Z.prototype.hj;Z.prototype.setSkinObject=Z.prototype.Zj;Z.prototype.changeViewMode=Z.prototype.vi;Z.prototype.getViewMode=Z.prototype.fj;Z.prototype.changePolygonMode=Z.prototype.qg;Z.prototype.setPolygonMode=Z.prototype.qg; Z.prototype.getPolygonMode=Z.prototype.Yi;Z.prototype.changeViewState=Z.prototype.wi;Z.prototype.getViewState=Z.prototype.gj;Z.prototype.setRenderFlags=Z.prototype.Xj;Z.prototype.getRenderFlags=Z.prototype.aj;Z.prototype.setMaxTileCount=Z.prototype.Kh;Z.prototype.getVFov=Z.prototype.Wb;Z.prototype.setVFov=Z.prototype.Ue;Z.prototype.updatePanorama=Z.prototype.$d;Z.prototype.isTouching=Z.prototype.jj;Z.prototype.getIsMobile=Z.prototype.Ni;Z.prototype.setIsMobile=Z.prototype.Tj; Z.prototype.getIsAutorotating=Z.prototype.Ki;Z.prototype.getIsLoaded=Z.prototype.Mi;Z.prototype.getIsTileLoading=Z.prototype.Oi;Z.prototype.getLastActivity=Z.prototype.Pi;Z.prototype.getPan=Z.prototype.ve;Z.prototype.getPanNorth=Z.prototype.we;Z.prototype.getPanDest=Z.prototype.Ui;Z.prototype.getPanN=Z.prototype.Vi;Z.prototype.setPan=Z.prototype.Zf;Z.prototype.setPanNorth=Z.prototype.$f;Z.prototype.changePan=Z.prototype.je;Z.prototype.changePanLog=Z.prototype.ti;Z.prototype.getTilt=Z.prototype.xe; Z.prototype.getTiltDest=Z.prototype.cj;Z.prototype.setTilt=Z.prototype.bg;Z.prototype.changeTilt=Z.prototype.ke;Z.prototype.changeTiltLog=Z.prototype.ui;Z.prototype.getFov=Z.prototype.Bd;Z.prototype.getFovDest=Z.prototype.Ii;Z.prototype.setFov=Z.prototype.Re;Z.prototype.changeFov=Z.prototype.pg;Z.prototype.changeFovLog=Z.prototype.ud;Z.prototype.getRoll=Z.prototype.bj;Z.prototype.setRoll=Z.prototype.Yj;Z.prototype.setPanTilt=Z.prototype.Wj;Z.prototype.setPanTiltFov=Z.prototype.ag; Z.prototype.setDefaultView=Z.prototype.Rj;Z.prototype.setLocked=Z.prototype.Uj;Z.prototype.setLockedMouse=Z.prototype.Te;Z.prototype.setLockedKeyboard=Z.prototype.Se;Z.prototype.setLockedWheel=Z.prototype.Jh;Z.prototype.moveTo=Z.prototype.moveTo;Z.prototype.moveToDefaultView=Z.prototype.qj;Z.prototype.addHotspotElements=Z.prototype.kg;Z.prototype.playSound=Z.prototype.cd;Z.prototype.playPauseSound=Z.prototype.yh;Z.prototype.pauseSound=Z.prototype.Sf;Z.prototype.activateSound=Z.prototype.ki; Z.prototype.isPlaying=Z.prototype.zc;Z.prototype.stopSound=Z.prototype.kk;Z.prototype.setVolume=Z.prototype.ak;Z.prototype.changeVolume=Z.prototype.xi;Z.prototype.removeHotspots=Z.prototype.Ch;Z.prototype.addHotspot=Z.prototype.li;Z.prototype.updateHotspot=Z.prototype.wk;Z.prototype.removeHotspot=Z.prototype.Ij;Z.prototype.setActiveHotspot=Z.prototype.gd;Z.prototype.getPointHotspotIds=Z.prototype.Xi;Z.prototype.getHotspot=Z.prototype.Ji;Z.prototype.setFullscreen=Z.prototype.hd; Z.prototype.toggleFullscreen=Z.prototype.cf;Z.prototype.enterFullscreen=Z.prototype.Ci;Z.prototype.exitFullscreen=Z.prototype.exitFullscreen;Z.prototype.getIsFullscreen=Z.prototype.Li;Z.prototype.startAutorotate=Z.prototype.gk;Z.prototype.stopAutorotate=Z.prototype.jk;Z.prototype.toggleAutorotate=Z.prototype.pk;Z.prototype.createLayers=Z.prototype.sg;Z.prototype.removePanorama=Z.prototype.Dh;Z.prototype.getScreenResolution=Z.prototype.Pg;Z.prototype.getMaxScreenResolution=Z.prototype.Mg; Z.prototype.getNodeIds=Z.prototype.Ri;Z.prototype.getNodeUserdata=Z.prototype.Ef;Z.prototype.getNodeLatLng=Z.prototype.Si;Z.prototype.getNodeTitle=Z.prototype.Ti;Z.prototype.getCurrentNode=Z.prototype.Kg;Z.prototype.getNextNode=Z.prototype.Ng;Z.prototype.getPrevNode=Z.prototype.$i;Z.prototype.getCurrentPointHotspots=Z.prototype.Hi;Z.prototype.getPositionAngles=Z.prototype.Zi;Z.prototype.getPositionRawAngles=Z.prototype.Og;Z.prototype.nodeVisited=Z.prototype.tj;Z.prototype.setElementIdPrefix=Z.prototype.Sj; Z.prototype.videoPanoPlay=Z.prototype.Ik;Z.prototype.videoPanoStop=Z.prototype.Jk;Z.prototype.videoPanoPause=Z.prototype.Hk;Z.prototype.getVideoPanoTime=Z.prototype.ej;Z.prototype.setVideoPanoTime=Z.prototype.$j;Z.prototype.getVideoPanoObject=Z.prototype.dj;Z.prototype.disableSoundLoading=Z.prototype.Bi;Z.prototype.setCrossOrigin=Z.prototype.Qj;