uawdijnntqw1x1x1
IP : 216.73.217.145
Hostname : webd002.cluster106.gra.hosting.ovh.net
Kernel : Linux webd002.cluster106.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
OS : Linux
PATH:
/
home
/
photograt
/
www
/
components
/
..
/
modules
/
..
/
Vallouise-1
/
pano2vr_player.js
/
/
////////////////////////////////////////////////////////////////////// // Pano2VR 6.1.10/18007 HTML5/CSS3 & WebGL Panorama Player // // License: BKYM.COM // // (c) 2020, Garden Gnome Software, http://ggnome.com // ////////////////////////////////////////////////////////////////////// var ll="function"==typeof Object.defineProperties?Object.defineProperty:function(x,p,m){x!=Array.prototype&&x!=Object.prototype&&(x[p]=m.value)},nl="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function ol(x,p){if(p){var m=nl;x=x.split(".");for(var d=0;d<x.length-1;d++){var c=x[d];c in m||(m[c]={});m=m[c]}x=x[x.length-1];d=m[x];p=p(d);p!=d&&null!=p&&ll(m,x,{configurable:!0,writable:!0,value:p})}}var pl; if("function"==typeof Object.setPrototypeOf)pl=Object.setPrototypeOf;else{var vl;a:{var wl={a:!0},xl={};try{xl.__proto__=wl;vl=xl.a;break a}catch(x){}vl=!1}pl=vl?function(x,p){x.__proto__=p;if(x.__proto__!==p)throw new TypeError(x+" is not extensible");return x}:null}var yl=pl;ol("Object.setPrototypeOf",function(x){return x||yl}); ol("Array.prototype.fill",function(x){return x?x:function(p,m,d){var c=this.length||0;0>m&&(m=Math.max(0,c+m));if(null==d||d>c)d=c;d=Number(d);0>d&&(d=Math.max(0,c+d));for(m=Number(m||0);m<d;m++)this[m]=p;return this}});function zl(x){var p=0;return function(){return p<x.length?{done:!1,value:x[p++]}:{done:!0}}}function Al(){Al=function(){};nl.Symbol||(nl.Symbol=Bl)}function Cl(x,p){this.Do=x;ll(this,"description",{configurable:!0,writable:!0,value:p})}Cl.prototype.toString=function(){return this.Do}; var Bl=function(){function x(m){if(this instanceof x)throw new TypeError("Symbol is not a constructor");return new Cl("jscomp_symbol_"+(m||"")+"_"+p++,m)}var p=0;return x}();function Dl(){Al();var x=nl.Symbol.iterator;x||(x=nl.Symbol.iterator=nl.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[x]&&ll(Array.prototype,x,{configurable:!0,writable:!0,value:function(){return El(zl(this))}});Dl=function(){}} function El(x){Dl();x={next:x};x[nl.Symbol.iterator]=function(){return this};return x}function Fl(x,p){Dl();x instanceof String&&(x+="");var m=0,d={next:function(){if(m<x.length){var c=m++;return{value:p(c,x[c]),done:!1}}d.next=function(){return{done:!0,value:void 0}};return d.next()}};d[Symbol.iterator]=function(){return d};return d}ol("Array.prototype.keys",function(x){return x?x:function(){return Fl(this,function(p){return p})}}); ol("Object.is",function(x){return x?x:function(p,m){return p===m?0!==p||1/p===1/m:p!==p&&m!==m}});ol("Array.prototype.includes",function(x){return x?x:function(p,m){var d=this;d instanceof String&&(d=String(d));var c=d.length;m=m||0;for(0>m&&(m=Math.max(m+c,0));m<c;m++){var a=d[m];if(a===p||Object.is(a,p))return!0}return!1}}); ol("String.prototype.includes",function(x){return x?x:function(p,m){if(null==this)throw new TypeError("The 'this' value for String.prototype.includes must not be null or undefined");if(p instanceof RegExp)throw new TypeError("First argument to String.prototype.includes must not be a regular expression");return-1!==(this+"").indexOf(p,m||0)}}); var __extends=this&&this.__extends||function(){function x(p,m){x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,c){d.__proto__=c}||function(d,c){for(var a in c)c.hasOwnProperty(a)&&(d[a]=c[a])};return x(p,m)}return function(p,m){function d(){this.constructor=p}x(p,m);p.prototype=null===m?Object.create(m):(d.prototype=m.prototype,new d)}}(); function Gl(){var x="perspective",p=["Webkit","Moz","O","ms","Ms"],m;for(m=0;m<p.length;m++)"undefined"!==typeof document.documentElement.style[p[m]+"Perspective"]&&(x=p[m]+"Perspective");"undefined"!==typeof document.documentElement.style[x]?"webkitPerspective"in document.documentElement.style?(x=document.createElement("style"),p=document.createElement("div"),m=document.head||document.getElementsByTagName("head")[0],x.textContent="@media (-webkit-transform-3d) {#ggswhtml5{height:5px}}",m.appendChild(x), p.id="ggswhtml5",document.documentElement.appendChild(p),m=5===p.offsetHeight,x.parentNode.removeChild(x),p.parentNode.removeChild(p)):m=!0:m=!1;return m}function Hl(){var x;if(x=!!window.WebGLRenderingContext)try{var p=document.createElement("canvas");p.width=100;p.height=100;var m=p.getContext("webgl");m||(m=p.getContext("experimental-webgl"));x=!!m}catch(d){x=!1}return x}var ggP2VR; (function(x){var p=function(){function d(c){this.m=null;this.Sg=this.Im=this.ob=!1;this.pb=!0;this.lb=this.La=this.Fa=0;this.fov=70;this.hb=0;this.autoplay=this.Xg=!1;this.id="";this.v=this.pan=0;this.m=c;this.cd=this.zc=100;this.Ic=1}d.prototype.Zb=function(c){var a;if(a=c.getAttributeNode("id"))this.id=a.nodeValue.toString();if(a=c.getAttributeNode("pan"))this.pan=Number(a.nodeValue);if(a=c.getAttributeNode("tilt"))this.v=Number(a.nodeValue)};d.prototype.qo=function(c){var a="",b=this.m,e=!0;if(b.Fi){var f= new x.Ga(0,0,-100);f.Fa(-this.v*Math.PI/180);f.La(this.pan*Math.PI/180);f.La(-b.pan.j*Math.PI/180);f.Fa(b.v.j*Math.PI/180);f.lb(b.U.j*Math.PI/180);.01<=f.z&&(e=!1)}b.Pc&&(a+="perspective("+c+"px) ");a=a+("translate3d(0px,0px,"+c+"px) ")+("rotateZ("+b.U.j.toFixed(10)+"deg) ");a+="rotateX("+b.v.j.toFixed(10)+"deg) ";a+="rotateY("+(-b.pan.j).toFixed(10)+"deg) ";a+="rotateY("+this.pan.toFixed(10)+"deg) ";a+="rotateX("+(-this.v).toFixed(10)+"deg) ";c=1E4;f=this.f.videoWidth;var g=this.f.videoHeight;if(0== f||0==g)f=640,g=480;0<this.zc&&(f=this.zc);0<this.cd&&(g=this.cd);0<f&&0<g&&(this.f.width=f,this.f.height=g,this.f.style.width=f+"px",this.f.style.height=g+"px");0<this.fov&&(c=f/(2*Math.tan(this.fov/2*Math.PI/180)));a+="translate3d(0px,0px,"+(-c).toFixed(10)+"px) ";a+="rotateZ("+this.lb.toFixed(10)+"deg) ";a+="rotateY("+(-this.La).toFixed(10)+"deg) ";a+="rotateX("+this.Fa.toFixed(10)+"deg) ";this.Ic&&1!=this.Ic&&(a+="scaleY("+this.Ic+") ");a+="translate3d("+-f/2+"px,"+-g/2+"px,0px) ";this.f.style[b.Va+ "Origin"]="0% 0%";this.ob&&(a="",1==this.hb&&(a+="scale("+Math.min(b.C.width/f,b.C.height/g)+") "),a+="translate3d("+-f/2+"px,"+-g/2+"px,0px) ");this.uq!=a&&(this.uq=a,this.f.style[b.Va]=a,this.f.style.visibility=e&&this.pb?"visible":"hidden",this.Sg&&this.Im==this.ob&&(this.f.style[b.$c]="all 0s linear 0s"),this.Im=this.ob)};d.prototype.cg=function(c){this.f&&(this.f.style.visibility=c?"visible":"hidden")};d.prototype.ff=function(){var c=this.m;c.ia?(this.f.style.left=c.C.width/2+"px",this.f.style.top= c.C.height/2+"px"):(this.f.style.left=c.margin.left+c.C.width/2+"px",this.f.style.top=c.margin.top+c.C.height/2+"px")};return d}();x.Us=p;var m=function(d){function c(a){a=d.call(this,a)||this;a.xa=!1;a.Zn=!1;a.kn=!1;a.hg=!1;a.oi=!1;a.Pk=!1;a.Dd=!1;a.vb=null;a.tg=null;a.jj=0;a.Tf=0;a.Oc=!1;a.paused=!0;a.ended=!1;a.Ok=!1;a.stopped=!1;a.lj=!1;a.gc=null;a.uf=-1;a.og=!1;a.url=[];a.loop=0;a.level=1;a.vc=0;a.mode=1;a.pi=10;a.Ab=0;a.gg=0;a.pa=1;a.Tc=0;a.Uc=0;a.Vc=0;a.Wc=0;a.Rf=-1;return a}__extends(c,d); c.prototype.lo=function(){var a=this,b=a.f.play();if(void 0!==b)b.then(function(){a.qg()})["catch"](function(){a.pa=1;a.f.pause();a.Zn&&(a.f.muted=!0,a.f.play())})};c.prototype.Vn=function(){this.xa&&this.lj?(this.lj=!1,clearInterval(this.gc),this.gc=null):0==this.loop?this.xa?(this.vb=null,this.Fd()):this.f.play():0<this.wb?(this.wb--,this.xa||(this.f.currentTime=0),this.oi&&(this.Rb&&0==this.Rb.gain.value||0==this.Jb.gain.value&&0==this.Ub.gain.value&&0==this.Sb.gain.value&&0==this.Tb.gain.value)|| (this.xa?(this.vb=null,this.Fd()):this.f.play())):this.xa&&(this.vb=null,this.Oc=!1,this.ended=this.paused=!0,clearInterval(this.gc),this.gc=null,this.m.K("bufferSoundEnded",{id:this.id}))};c.prototype.qg=function(){this.Dd=!1;var a=this.m.ua;a&&(this.xa||(this.source=a.createMediaElementSource(this.f)),2==this.mode||3==this.mode||5==this.mode?(this.nd=a.createChannelSplitter(2),this.Jb=a.createGain(),this.Sb=a.createGain(),this.Tb=a.createGain(),this.Ub=a.createGain(),this.xg=a.createChannelMerger(2), this.xa?this.vb.connect(this.nd):this.source.connect(this.nd),this.nd.connect(this.Jb,0),this.nd.connect(this.Sb,0),this.nd.connect(this.Tb,1),this.nd.connect(this.Ub,1),this.Jb.connect(this.xg,0,0),this.Sb.connect(this.xg,0,1),this.Tb.connect(this.xg,0,0),this.Ub.connect(this.xg,0,1),this.xg.connect(a.destination),1==this.Rf&&this.hl()):(this.Rb=a.createGain(),this.xa?this.vb.connect(this.Rb):this.source.connect(this.Rb),this.Rb.connect(a.destination)))};c.prototype.hl=function(){1!=this.Rf||this.Dd|| !this.nd||2!=this.mode&&3!=this.mode&&5!=this.mode||(this.nd.connect(this.Tb,0),this.nd.connect(this.Ub,0))};c.prototype.Gh=function(){var a=this.m.ua;this.ob||this.Pk||(this.Jb?(this.Jb.gain.setValueAtTime(this.Tc,a.currentTime),this.Ub.gain.setValueAtTime(this.Wc,a.currentTime),this.Sb.gain.setValueAtTime(this.Uc,a.currentTime),this.Tb.gain.setValueAtTime(this.Vc,a.currentTime)):this.Rb&&this.Rb.gain.setValueAtTime((this.Tc+this.Wc)/2,a.currentTime+1))};c.prototype.wj=function(){if(!this.Dd||4== this.mode||6==this.mode){var a=this.m,b=this.m.ua;if(this.f||this.xa){var e,f=this.pan-a.pan.j;for(e=this.v-a.v.j;-180>f;)f+=360;for(;180<f;)f-=360;var g=this.vc,h=this.pi;0==h&&(h=.01);0>h&&(h=a.fov.j);this.bc||(this.bc=new x.Ga,this.bc.fm(this.pan,this.v));0!=this.mode&&1!=this.mode||!b||this.Rb&&this.Rb.gain.setValueAtTime(this.level*a.ba*this.pa,b.currentTime);if(2==this.mode&&b){var l=.5*Math.cos(f*Math.PI/180)+.5;this.Tc=Math.sqrt(l)*this.pa*this.level*a.ba;this.Wc=Math.sqrt(l)*this.pa*this.level* a.ba;this.Uc=Math.sqrt(1-l)*this.pa*this.level*a.ba;this.Vc=Math.sqrt(1-l)*this.pa*this.level*a.ba;this.Gh()}if(3==this.mode){f=0>f?f<-this.Ab?f+this.Ab:0:f>this.Ab?f-this.Ab:0;var k=this.level;e=Math.abs(e);e=e<this.gg?0:e-this.gg;var w=1-e/h;if(Math.abs(f)>h||0>w)l=k*g*a.ba,b?(this.Tc=l*this.pa,this.Wc=l*this.pa,this.Vc=this.Uc=0,this.Gh()):this.f.volume=k*g*a.ba;else if(l=1-Math.abs(f/h),b){var r=k*(g+(1-g)*w*l)*a.ba;l=k*g*a.ba;0<=f?(this.Tc=r*this.pa,this.Wc=l*this.pa):(this.Tc=l*this.pa,this.Wc= r*this.pa);2*Math.abs(f)<h?(l=1-Math.abs(2*f)/h,r=k*(g+(1-g)*w*l)*a.ba,l=.5*k*(1-g)*w*(1-l)*a.ba,0<=f?(this.Wc=r*this.pa,this.Vc=l*this.pa,this.Uc=0):(this.Tc=r*this.pa,this.Uc=l*this.pa,this.Vc=0)):(l=1-(Math.abs(2*f)-h)/h,r=.5*k*(1-g)*w*l*a.ba,0<=f?(this.Vc=r*this.pa,this.Uc=0):(this.Uc=r*this.pa,this.Vc=0));this.Gh()}else this.f.volume=k*(g+(1-g)*w*l)*a.ba}4==this.mode&&(Math.abs(f)<this.Ab&&Math.abs(e)<this.gg?this.hg||(this.hg=!0,this.wb=this.loop-1,this.xa?this.Oc||this.Fd():this.f.play()): this.hg=!1);5==this.mode&&(e=180*Math.acos(a.Xj.Wi(this.bc))/Math.PI,e<this.Ab?b?(this.Tc=this.level*a.ba*this.pa,this.Wc=this.level*a.ba*this.pa,this.Vc=this.Uc=0,this.Gh()):this.f.volume=this.level*a.ba:b?(e<this.Ab+h?(f=0>f?f>-this.Ab?0:f+this.Ab:f<this.Ab?0:f-this.Ab,r=1-Math.max(e-this.Ab,0)/h,l=Math.max(1-Math.abs(f)*Math.cos(this.v*Math.PI/180)/h,0),0<f?(this.Tc=this.level*(r*(1-this.vc)+this.vc)*a.ba*this.pa,this.Wc=this.level*(r*l*(1-this.vc)+this.vc)*a.ba*this.pa,this.Uc=0,this.Vc=this.level* r*(1-l)*a.ba*this.pa):(this.Tc=this.level*(r*l*(1-this.vc)+this.vc)*a.ba*this.pa,this.Wc=this.level*(r*(1-this.vc)+this.vc)*a.ba*this.pa,this.Uc=this.level*r*(1-l)*a.ba*this.pa,this.Vc=0)):(r=this.level*this.vc*a.ba,this.Tc=r*this.pa,this.Wc=r*this.pa,this.Vc=this.Uc=0),this.Gh()):(e-=this.Ab,e<h&&0<h?(l=1-Math.abs(e/h),this.f.volume=this.level*(g+(1-g)*l)*a.ba):this.f.volume=g*a.ba));6==this.mode&&(e=180*Math.acos(a.Xj.Wi(this.bc))/Math.PI,Math.abs(e)<this.Ab?this.hg||(this.hg=!0,this.wb=this.loop- 1,this.xa?this.Oc||this.Fd():this.f.play()):this.hg=!1)}}};c.prototype.Ql=function(){var a=this;a.vb=this.m.ua.createBufferSource();a.vb.addEventListener("ended",function(){a.Vn()},!1);a.Dd||(2==a.mode||3==a.mode||5==a.mode?a.vb.connect(a.nd):a.vb.connect(a.Rb))};c.prototype.rr=function(a){var b=this,e=this.m.ua;b.Ql();this.m.N("createBufferSoundSource()");e.decodeAudioData(a,function(f){b.Rf=f.numberOfChannels;1==b.Rf&&b.hl();b.tg=f;b.vb.buffer=f;b.m.N("audio Data decoded");b.Ok&&(b.Fd(),b.Ok=!1)})}; c.prototype.Fd=function(){var a=this.m.ua,b=this.Tf;if(this.tg){null==this.vb&&(this.Ql(),this.vb.buffer=this.tg);this.jj=a.currentTime-b;this.Tf=0;this.uf=-1;this.Oc=!0;this.ended=this.lj=this.stopped=this.paused=!1;this.Dd&&this.qg();try{this.vb.start(0,b),this.m.K("bufferSoundPlay",{id:this.id}),this.gc&&(clearInterval(this.gc),this.gc=null),this.gc=setInterval(function(e){return function(){e.m.K("bufferSoundTimeupdate",{id:e.id,time:e.pf()})}}(this),50)}catch(e){this.m.N(e),clearInterval(this.gc), this.gc=null}this.m.N("buffer Source started")}else this.m.N("bufferSoundPlay() -> no audio buffer -> playWhenReady"),this.Ok=!0};c.prototype.Kj=function(){var a=this.m.ua.currentTime-this.jj;this.qf();this.stopped=!1;this.Tf=a;this.paused=!0;this.m.K("bufferSoundPause",{id:this.id});this.m.K("bufferSoundTimeupdate",{id:this.id,time:this.pf()})};c.prototype.qf=function(){this.vb&&this.Oc&&(this.lj=!0,this.vb.disconnect(),this.vb.stop(0),this.vb=null);this.jj=this.Tf=0;this.uf=-1;this.ended=this.paused= this.Oc=!1;this.stopped=!0;clearInterval(this.gc);this.gc=null;this.m.K("bufferSoundStop",{id:this.id});this.m.K("bufferSoundTimeupdate",{id:this.id,time:this.pf()})};c.prototype.pf=function(){var a=this.m.ua;if(-1<this.uf)return this.uf;if(this.ended)return this.fi();if(!this.stopped){if(this.paused)return this.Tf;if(this.Oc)return a.currentTime-this.jj}return 0};c.prototype.fi=function(){return this.tg?this.tg.duration:1};c.prototype.Il=function(a){var b=this.Oc;this.og=this.og||this.Oc;b&&this.qf(); this.Tf=a;this.paused=!0;this.ended=this.stopped=this.Oc=!1;this.uf=-1;this.og?(this.Fd(),this.og=!1):this.m.K("bufferSoundTimeupdate",{id:this.id,time:a});this.og=!1};c.prototype.ap=function(a){this.Oc&&(this.og=!0,this.qf());this.uf=a;this.m.K("bufferSoundTimeupdate",{id:this.id,time:this.pf()})};c.prototype.addElement=function(){var a=-1,b=this,e=this.m,f=this.m.ua;try{for(var g=!1,h=0;h<e.X.length;h++)e.X[h].id==b.id&&(a=h,null==e.X[h].f&&!e.X[h].xa||e.X[h].url.join()!=b.url.join()||e.X[h].loop!= b.loop||e.X[h].mode!=b.mode||(g=!0,e.X[h].pan=b.pan,e.X[h].v=b.v,e.X[h].level=b.level,e.X[h].vc=b.vc,e.X[h].pi=b.pi,e.X[h].Ab=b.Ab,e.X[h].gg=b.gg));if(g)e.N("Keep playing "+b.id);else{if(0<=a){var l=e.X[a];if(null!=l.f||l.xa)if(f&&e.Ia.enabled)e.Ia.Oh.push(l),1!=e.J.sa&&2!=e.J.sa&&6!=e.J.sa&&e.Ia.bm(l);else{try{l.xa?l.Kj():l.f.pause()}catch(r){e.N(r)}try{l.Te()}catch(r){e.N(r)}}}f&&(this.Dd=!0);if(f&&(e.xd||e.kc)){if(0<b.url.length){b.xa=!0;var k=new XMLHttpRequest;k.open("GET",e.Hb(b.url[0]),!0); k.responseType="arraybuffer";k.onload=function(){b.rr(k.response)};k.send();b.oi=!1}}else{b.f=document.createElement("audio");b.f.crossOrigin=e.crossOrigin;b.f.setAttribute("class","ggmedia");e.Gf&&b.f.setAttribute("id",e.Gf+b.id);for(h=0;h<b.url.length;h++)g=void 0,g=document.createElement("source"),""!=b.url[h]&&"#"!=b.url[h]&&(g.crossOrigin=e.crossOrigin,g.setAttribute("src",e.Hb(b.url[h])),b.f.appendChild(g));b.f.volume=b.level*e.ba;if(0<b.f.childNodes.length&&(e.$.appendChild(b.f),b.f.addEventListener("ended", function(){b.Vn()},!1),f)){b.oi=!1;0==b.loop&&b.source&&b.source.mediaElement&&(b.source.mediaElement.loop=!0);var w=new XMLHttpRequest;w.open("GET",e.Hb(b.url[0]),!0);w.responseType="arraybuffer";w.onload=function(){f.decodeAudioData(w.response,function(r){b.Rf=r.numberOfChannels;1==b.Rf&&b.hl()})};w.send()}}1<=b.loop&&(b.wb=b.loop-1);0<=a?e.X[a]=b:e.X.push(b);b.wj()}}catch(r){this.m.N(r)}};c.prototype.Te=function(){try{this.m.N("Remove Snd:"+this.id),this.xa?(clearInterval(this.gc),this.gc=null): (this.m.$.removeChild(this.f),this.f=null)}catch(a){this.m.N(a)}};c.prototype.Zb=function(a){d.prototype.Zb.call(this,a);var b;(b=a.getAttributeNode("url"))&&this.url.push(b.nodeValue.toString());if(b=a.getAttributeNode("level"))this.level=Number(b.nodeValue);if(b=a.getAttributeNode("loop"))this.loop=Number(b.nodeValue);if(b=a.getAttributeNode("mode"))this.mode=Number(b.nodeValue);if(b=a.getAttributeNode("nodechangekeep"))this.kn=1==Number(b.nodeValue);if(b=a.getAttributeNode("field"))this.pi=Number(b.nodeValue); if(b=a.getAttributeNode("ambientlevel"))this.vc=Number(b.nodeValue);if(b=a.getAttributeNode("pansize"))this.Ab=Number(b.nodeValue);if(b=a.getAttributeNode("tiltsize"))this.gg=Number(b.nodeValue);for(a=a.firstChild;a;)"source"==a.nodeName&&(b=a.getAttributeNode("url"))&&this.url.push(b.nodeValue.toString()),a=a.nextSibling};return c}(p);x.yl=m;m=function(d){function c(a){a=d.call(this,a)||this;a.poster="";a.Fa=0;a.La=0;a.lb=0;a.fov=50;a.hb=0;a.Xg=!1;a.fd=!1;return a}__extends(c,d);c.prototype.Ke=function(){1!= this.hb&&4!=this.hb||this.Ug(!this.ob);2==this.hb&&this.m.tn(this.id)};c.prototype.Ug=function(a){var b=this.m,e=b.ua;if(1==this.hb||4==this.hb)if(this.ob=a,this.m.Pb)(b=b.ra)&&b.activateSound(this.id,this.ob?1:0);else{if(this.ob)this.f.style.pointerEvents="auto",this.f.style.cursor="pointer",this.f.style.zIndex=(b.Xh+8E4).toString(),this.f.style[this.m.$c]="all 1s ease 0s",this.m.isPlaying(this.id)||b.Re(this.id);else{this.f.style.pointerEvents="none";this.f.style.cursor="default";this.f.style.zIndex= b.Xh.toString();this.f.style[this.m.$c]="all 1s ease 0s";this.m.isPlaying(this.id)&&b.kj(this.id);this.Pk=!0;var f=this;setTimeout(function(){f.Pk=!1},1E3)}if(e&&(2==this.mode||3==this.mode||5==this.mode)&&(e=e.currentTime,this.Jb&&this.Ub&&this.Sb.gain&&this.Sb&&this.Tb)){var g=this.Jb.gain.value,h=this.Ub.gain.value,l=this.Sb.gain.value,k=this.Tb.gain.value;this.ob?(this.Jb.gain.linearRampToValueAtTime(g,e),this.Jb.gain.linearRampToValueAtTime(this.level*b.ba,e+1),this.Ub.gain.linearRampToValueAtTime(h, e),this.Ub.gain.linearRampToValueAtTime(this.level*b.ba,e+1),this.Sb.gain.linearRampToValueAtTime(l,e),this.Sb.gain.linearRampToValueAtTime(0,e+1),this.Tb.gain.linearRampToValueAtTime(k,e),this.Tb.gain.linearRampToValueAtTime(0,e+1)):(this.Jb.gain.linearRampToValueAtTime(g,e),this.Jb.gain.linearRampToValueAtTime(this.Tc,e+1),this.Ub.gain.linearRampToValueAtTime(h,e),this.Ub.gain.linearRampToValueAtTime(this.Wc,e+1),this.Sb.gain.linearRampToValueAtTime(l,e),this.Sb.gain.linearRampToValueAtTime(this.Uc, e+1),this.Tb.gain.linearRampToValueAtTime(k,e),this.Tb.gain.linearRampToValueAtTime(this.Vc,e+1))}this.Sg=!0;this.m.ro()}2==this.hb&&(a?this.m.Re(this.id):this.m.Nk(this.id))};c.prototype.Vg=function(){this.Sg=!1;this.f.style[this.m.$c]="none"};c.prototype.Ls=function(){0==this.loop?this.f.play():0<this.wb?(this.wb--,this.f.currentTime=0,this.f.play()):this.isRunning=!1};c.prototype.Zb=function(a){d.prototype.Zb.call(this,a);var b;if(b=a.getAttributeNode("poster"))this.poster=String(b.nodeValue); if(b=a.getAttributeNode("rotx"))this.Fa=Number(b.nodeValue);if(b=a.getAttributeNode("roty"))this.La=Number(b.nodeValue);if(b=a.getAttributeNode("rotz"))this.lb=Number(b.nodeValue);if(b=a.getAttributeNode("fov"))this.fov=Number(b.nodeValue);if(b=a.getAttributeNode("width"))this.zc=Number(b.nodeValue);if(b=a.getAttributeNode("height"))this.cd=Number(b.nodeValue);this.Ic=(b=a.getAttributeNode("stretch"))?Number(b.nodeValue):1;if(b=a.getAttributeNode("clickmode"))this.hb=Number(b.nodeValue);if(b=a.getAttributeNode("handcursor"))this.Xg= 1==Number(b.nodeValue);if(b=a.getAttributeNode("startmutedmobile"))this.Zn=1==Number(b.nodeValue)};c.prototype.addElement=function(){var a=this,b=this.m,e=this.m.ua;try{a.f=document.createElement("video");a.f.setAttribute("class","ggmedia");a.f.crossOrigin=b.crossOrigin;a.f.hidden=!0;a.f.addEventListener("click",function(h){h.stopPropagation()});b.Gf&&a.f.setAttribute("id",b.Gf+a.id);if(b.Th)a.f.setAttribute("playsinline","playsinline"),a.f.setAttribute("style","display: none; max-width:none;");else if(a.f.setAttribute("style", "max-width:none;pointer-events:none;"),a.f.setAttribute("playsinline","playsinline"),1==a.hb||4==a.hb)a.f.addEventListener(b.Ao(),function(){a.Vg()},!1),a.f.addEventListener("transitionend",function(){a.Vg()},!1);var f=void 0;for(f=0;f<a.url.length;f++){var g=void 0;g=document.createElement("source");g.crossOrigin=b.crossOrigin;g.setAttribute("src",b.Hb(a.url[f]));a.f.appendChild(g)}""!=a.poster&&(a.f.poster=b.Hb(a.poster),0>a.loop&&(a.f.preload="none"));a.f.volume=a.level*b.ba;1<=a.loop&&(a.wb=a.loop- 1);e&&(this.Dd=!0);(1==a.mode||2==a.mode||3==a.mode||5==a.mode)&&0<=a.loop&&(a.f.autoplay=!0,a.isRunning=!0,a.autoplay=!0,a.lo());b.S.push(this);b.Th?b.$.appendChild(a.f):(a.f.style.position="absolute",a.zc&&(a.f.width=a.zc),a.cd&&(a.f.height=a.cd),b.L.appendChild(a.f));a.f.addEventListener("ended",function(){a.Ls()},!1)}catch(h){b.N(h)}};c.prototype.registerElement=function(a,b){this.fd=!0;this.f=b;this.id=a;this.level=1;this.m.S.push(this)};c.prototype.Te=function(){var a=this.m;a.Th&&(a.R.deleteTexture(this.texture), this.texture=0,a.$.removeChild(this.f));a.so&&a.L.removeChild(this.f);this.f=null};return c}(m);x.zl=m;m=function(d){function c(a){a=d.call(this,a)||this;a.url="";a.Fa=0;a.La=0;a.lb=0;a.fov=50;a.hb=0;a.Xg=!1;a.zc=100;a.cd=100;a.Ic=1;return a}__extends(c,d);c.prototype.Zb=function(a){d.prototype.Zb.call(this,a);var b;if(b=a.getAttributeNode("url"))this.url=b.nodeValue.toString();if(b=a.getAttributeNode("rotx"))this.Fa=Number(b.nodeValue);if(b=a.getAttributeNode("roty"))this.La=Number(b.nodeValue); if(b=a.getAttributeNode("rotz"))this.lb=Number(b.nodeValue);if(b=a.getAttributeNode("fov"))this.fov=Number(b.nodeValue);if(b=a.getAttributeNode("width"))this.zc=Number(b.nodeValue);if(b=a.getAttributeNode("height"))this.cd=Number(b.nodeValue);this.Ic=(b=a.getAttributeNode("stretch"))?Number(b.nodeValue):1;if(b=a.getAttributeNode("clickmode"))this.hb=Number(b.nodeValue);if(b=a.getAttributeNode("handcursor"))this.Xg=1==Number(b.nodeValue);for(a=a.firstChild;a;)"source"==a.nodeName&&(b=a.getAttributeNode("url"))&& (this.url=b.nodeValue.toString()),a=a.nextSibling};c.prototype.Vg=function(){this.Sg=!1;this.f.style[this.m.$c]="none"};c.prototype.Ke=function(){1!==this.hb&&4!==this.hb||this.Ug(!this.ob)};c.prototype.Ug=function(a){var b=this.m;if(1===this.hb||4===this.hb)this.ob=a,this.m.Pb?(a=this.m.ra)&&a.activateSound(this.id,this.ob?1:0):(this.ob?(this.f.style.pointerEvents="auto",this.f.style.cursor="pointer",this.f.style.zIndex=(b.Xh+8E4).toString()):(this.f.style.pointerEvents="none",this.f.style.cursor= "default",this.f.style.zIndex=b.Xh.toString()),this.f.style[b.$c]="all 1s ease 0s",this.Sg=!0,b.no())};c.prototype.addElement=function(){var a=this,b=this.m;try{a.f=document.createElement("img");a.f.setAttribute("style","-webkit-user-drag:none; max-width:none; pointer-events:none;");a.f.setAttribute("class","ggmedia");a.f.hidden=!0;a.f.addEventListener("click",function(e){e.stopPropagation()});b.Gf&&a.f.setAttribute("id",b.Gf+a.id);a.f.ondragstart=function(){return!1};if(1===a.hb||4===a.hb)a.f.addEventListener(b.Ao(), function(){a.Vg()},!1),a.f.addEventListener("transitionend",function(){a.Vg()},!1);a.f.setAttribute("src",b.Hb(a.url));a.zc&&(a.f.width=a.zc);a.cd&&(a.f.height=a.cd);b.eb.push(a);a.f.style.position="absolute";b.L.appendChild(a.f)}catch(e){b.N("Error addimage:"+e)}};c.prototype.Te=function(){this.m.L.removeChild(this.f);this.f=null};return c}(p);x.Ko=m;p=function(d){function c(a){a=d.call(this,a)||this;a.Hl=50;a.alpha=50;a.type=0;a.color=16777215;return a}__extends(c,d);c.prototype.Zb=function(a){d.prototype.Zb.call(this, a);var b;if(b=a.getAttributeNode("blinding"))this.Hl=Number(b.nodeValue);if(b=a.getAttributeNode("alpha"))this.alpha=Number(b.nodeValue);if(b=a.getAttributeNode("type"))this.type=Number(b.nodeValue);if(b=a.getAttributeNode("color"))this.color=1*Number(b.nodeValue)};return c}(p);x.Lo=p;p=function(){function d(c){this.m=c;this.type="empty";this.bl=this.id=this.target=this.description=this.title=this.url="";this.w=100;this.h=20;this.Aj=!1;this.f=null;this.Bb=this.Yb=this.gb=this.va=this.distance=this.v= this.pan=0;this.visible=!0;this.fc=c.H.fc;this.dc=c.H.dc;this.ec=c.H.ec;this.cc=c.H.cc;this.Df=c.H.Df;this.Zc="";this.Gd=this.Be=0;this.jg=!1;this.mi=0;this.vertices=[]}d.prototype.xf=function(){this.id=this.id;this.pan=this.pan;this.tilt=this.v;this.url=this.url;this.target=this.target;this.title=this.title;this.distance=this.distance;this.description=this.description;this.skinid=this.bl;this.obj=this.f;this.customimage=this.Zc;this.customimagewidth=this.Be;this.customimageheight=this.Gd;this.use3D= this.jg;this.distance3D=this.mi;this.f&&this.f.__div&&(this.div=this.f.__div)};d.prototype.qs=function(){var c=this.url;return"{"==c.charAt(0)?c.substr(1,c.length-2):!1};d.prototype.Zb=function(c){var a;if(a=c.getAttributeNode("url"))this.url=a.nodeValue.toString();if(a=c.getAttributeNode("target"))this.target=a.nodeValue.toString();if(a=c.getAttributeNode("title"))this.title=a.nodeValue.toString();if(a=c.getAttributeNode("description"))this.description=a.nodeValue.toString();if(a=c.getAttributeNode("id"))this.id= a.nodeValue.toString();if(a=c.getAttributeNode("skinid"))this.bl=a.nodeValue.toString();if(a=c.getAttributeNode("width"))this.w=Number(a.nodeValue);if(a=c.getAttributeNode("height"))this.h=Number(a.nodeValue);if(a=c.getAttributeNode("wordwrap"))this.Aj=1==Number(a.nodeValue);a=c.getAttributeNode("pan");this.pan=1*(a?Number(a.nodeValue):0);a=c.getAttributeNode("tilt");this.v=1*(a?Number(a.nodeValue):0);a=c.getAttributeNode("fov");this.fov=1*(a?Number(a.nodeValue):0);a=c.getAttributeNode("distance"); this.distance=1*(a?Number(a.nodeValue):0);if(a=c.getAttributeNode("bordercolor"))this.fc=1*Number(a.nodeValue);if(a=c.getAttributeNode("backgroundcolor"))this.dc=1*Number(a.nodeValue);if(a=c.getAttributeNode("borderalpha"))this.ec=1*Number(a.nodeValue);if(a=c.getAttributeNode("backgroundalpha"))this.cc=1*Number(a.nodeValue);if(a=c.getAttributeNode("handcursor"))this.Df=1==Number(a.nodeValue);if(a=c.getAttributeNode("customimage"))this.Zc=this.m.pm()+a.nodeValue;if(a=c.getAttributeNode("customimagewidth"))this.Be= Number(a.nodeValue);if(a=c.getAttributeNode("customimageheight"))this.Gd=Number(a.nodeValue);if(a=c.getAttributeNode("use3D"))this.jg=1==Number(a.nodeValue);if(a=c.getAttributeNode("distance3D"))this.mi=Number(a.nodeValue);for(c=c.firstChild;c;){if("polystring"==c.nodeName){a=c.textContent.toString().split("|");for(var b=0;b<a.length;b++){var e=a[b].split("/");if(2==e.length){var f={pan:0,v:0};f.pan=Number(e[0]);f.v=Number(e[1]);this.vertices.push(f)}}}"vertex"==c.nodeName&&(f={pan:0,v:0},a=c.getAttributeNode("pan"), f.pan=1*(a?Number(a.nodeValue):0),a=c.getAttributeNode("tilt"),f.v=1*(a?Number(a.nodeValue):0),this.vertices.push(f));c=c.nextSibling}this.xf()};return d}();x.$h=p})(ggP2VR||(ggP2VR={})); (function(x){var p=function(){function m(d,c){this.x=d;this.y=c}m.prototype.init=function(d,c){this.x=d;this.y=c};m.prototype.Kd=function(d,c,a){var b=c.y-d.y;this.x=d.x+(c.x-d.x)*a;this.y=d.y+b*a};m.prototype.$o=function(d,c,a,b,e){var f=new m;f.Kd(d,a,e);d=new m;d.Kd(a,b,e);a=new m;a.Kd(b,c,e);c=new m;c.Kd(f,d,e);f=new m;f.Kd(d,a,e);d=new m;d.Kd(c,f,e);this.x=d.x;this.y=d.y};m.prototype.Ij=function(d,c,a,b,e){var f=new m,g=.5,h=.25;do{f.$o(d,c,a,b,g);var l=f.x-e;g=0<l?g-h:g+h;h/=2}while(.01<Math.abs(l)); this.x=f.x;this.y=f.y};return m}();x.Gc=p})(ggP2VR||(ggP2VR={})); (function(x){var p=function(){function m(d,c,a,b,e){this.x=d;this.y=c;this.z=a;this.Cd=b;this.bc=e}m.prototype.init=function(d,c,a,b,e){this.x=d;this.y=c;this.z=a;this.Cd=b;this.bc=e};m.prototype.toString=function(){return"("+this.x+","+this.y+","+this.z+") - ("+this.Cd+","+this.bc+")"};m.prototype.Fa=function(d){var c=Math.sin(d);d=Math.cos(d);var a=this.y,b=this.z;this.y=d*a-c*b;this.z=c*a+d*b};m.prototype.Ar=function(){var d=this.y;this.y=-this.z;this.z=d};m.prototype.zr=function(){var d=this.y; this.y=this.z;this.z=-d};m.prototype.La=function(d){var c=Math.sin(d);d=Math.cos(d);var a=this.x,b=this.z;this.x=d*a+c*b;this.z=-c*a+d*b};m.prototype.Br=function(){var d=this.x;this.x=-this.z;this.z=d};m.prototype.lb=function(d){var c=Math.sin(d);d=Math.cos(d);var a=this.x,b=this.y;this.x=d*a-c*b;this.y=c*a+d*b};m.prototype.Gn=function(){var d=this.x;this.x=-this.y;this.y=d};m.prototype.Rd=function(d){this.Fa(d*Math.PI/180)};m.prototype.Ve=function(d){this.La(d*Math.PI/180)};m.prototype.We=function(d){this.lb(d* Math.PI/180)};m.prototype.clone=function(){return new m(this.x,this.y,this.z,this.Cd,this.bc)};m.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)};m.prototype.normalize=function(){var d=this.length();0<d&&(d=1/d,this.x*=d,this.y*=d,this.z*=d)};m.prototype.Wi=function(d){return this.x*d.x+this.y*d.y+this.z*d.z};m.prototype.fm=function(d,c){var a=Math.cos(c*Math.PI/180);this.x=a*Math.sin(d*Math.PI/180);this.y=Math.sin(c*Math.PI/180);this.z=a*Math.cos(d*Math.PI/ 180)};m.prototype.Wo=function(){return 180*Math.atan2(-this.x,-this.z)/Math.PI};m.prototype.Xo=function(){return 180*Math.asin(this.y/this.length())/Math.PI};m.prototype.Kd=function(d,c,a){this.x=d.x*a+c.x*(1-a);this.y=d.y*a+c.y*(1-a);this.z=d.z*a+c.z*(1-a);this.Cd=d.Cd*a+c.Cd*(1-a);this.bc=d.bc*a+c.bc*(1-a)};return m}();x.Ga=p})(ggP2VR||(ggP2VR={})); (function(x){var p=function(){function m(){this.Ln()}m.prototype.Ln=function(){this.mc=1;this.Ac=this.nc=this.Mb=0;this.oc=1;this.pc=this.Vb=this.Bc=0;this.Wb=1};m.prototype.clone=function(d){this.mc=d.mc;this.Mb=d.Mb;this.nc=d.nc;this.Ac=d.Ac;this.oc=d.oc;this.Bc=d.Bc;this.Vb=d.Vb;this.pc=d.pc;this.Wb=d.Wb};m.prototype.Qr=function(d){var c=Math.cos(d);d=Math.sin(d);this.mc=1;this.Ac=this.nc=this.Mb=0;this.oc=c;this.Bc=-d;this.Vb=0;this.pc=d;this.Wb=c};m.prototype.Rr=function(d){var c=Math.cos(d); d=Math.sin(d);this.mc=c;this.Mb=0;this.nc=d;this.Ac=0;this.oc=1;this.Bc=0;this.Vb=-d;this.pc=0;this.Wb=c};m.prototype.Sr=function(d){var c=Math.cos(d);d=Math.sin(d);this.mc=c;this.Mb=-d;this.nc=0;this.Ac=d;this.oc=c;this.pc=this.Vb=this.Bc=0;this.Wb=1};m.prototype.Nr=function(d){this.Qr(d*Math.PI/180)};m.prototype.Or=function(d){this.Rr(d*Math.PI/180)};m.prototype.Pr=function(d){this.Sr(d*Math.PI/180)};m.prototype.Rd=function(d){this.ed||(this.ed=new m,this.fe=new m);this.ed.Nr(d);this.fe.clone(this); this.multiply(this.ed,this.fe)};m.prototype.Ve=function(d){this.ed||(this.ed=new m,this.fe=new m);this.ed.Or(d);this.fe.clone(this);this.multiply(this.ed,this.fe)};m.prototype.We=function(d){this.ed||(this.ed=new m,this.fe=new m);this.ed.Pr(d);this.fe.clone(this);this.multiply(this.ed,this.fe)};m.prototype.multiply=function(d,c){this.mc=d.mc*c.mc+d.Mb*c.Ac+d.nc*c.Vb;this.Mb=d.mc*c.Mb+d.Mb*c.oc+d.nc*c.pc;this.nc=d.mc*c.nc+d.Mb*c.Bc+d.nc*c.Wb;this.Ac=d.Ac*c.mc+d.oc*c.Ac+d.Bc*c.Vb;this.oc=d.Ac*c.Mb+ d.oc*c.oc+d.Bc*c.pc;this.Bc=d.Ac*c.nc+d.oc*c.Bc+d.Bc*c.Wb;this.Vb=d.Vb*c.mc+d.pc*c.Ac+d.Wb*c.Vb;this.pc=d.Vb*c.Mb+d.pc*c.oc+d.Wb*c.pc;this.Wb=d.Vb*c.nc+d.pc*c.Bc+d.Wb*c.Wb};m.prototype.Rq=function(d){var c=d.x;var a=d.y;var b=d.z;d.x=c*this.mc+a*this.Mb+b*this.nc;d.y=c*this.Ac+a*this.oc+b*this.Bc;d.z=c*this.Vb+a*this.pc+b*this.Wb};return m}();x.ul=p})(ggP2VR||(ggP2VR={})); (function(x){x.ka={create:function(p){var m="undefined"!=typeof Float32Array?new Float32Array(16):Array(16);p&&(m[0]=p[0],m[1]=p[1],m[2]=p[2],m[3]=p[3],m[4]=p[4],m[5]=p[5],m[6]=p[6],m[7]=p[7],m[8]=p[8],m[9]=p[9],m[10]=p[10],m[11]=p[11],m[12]=p[12],m[13]=p[13],m[14]=p[14],m[15]=p[15]);return m},set:function(p,m){m[0]=p[0];m[1]=p[1];m[2]=p[2];m[3]=p[3];m[4]=p[4];m[5]=p[5];m[6]=p[6];m[7]=p[7];m[8]=p[8];m[9]=p[9];m[10]=p[10];m[11]=p[11];m[12]=p[12];m[13]=p[13];m[14]=p[14];m[15]=p[15];return m},identity:function(p){p[0]= 1;p[1]=0;p[2]=0;p[3]=0;p[4]=0;p[5]=1;p[6]=0;p[7]=0;p[8]=0;p[9]=0;p[10]=1;p[11]=0;p[12]=0;p[13]=0;p[14]=0;p[15]=1;return p},multiply:function(p,m,d){d||(d=p);var c=p[0],a=p[1],b=p[2],e=p[3],f=p[4],g=p[5],h=p[6],l=p[7],k=p[8],w=p[9],r=p[10],y=p[11],z=p[12],ha=p[13],ua=p[14];p=p[15];var id=m[0],sh=m[1],db=m[2],gl=m[3],tf=m[4],hl=m[5],il=m[6],kl=m[7],jl=m[8],ml=m[9],ql=m[10],rl=m[11],sl=m[12],tl=m[13],ul=m[14];m=m[15];d[0]=id*c+sh*f+db*k+gl*z;d[1]=id*a+sh*g+db*w+gl*ha;d[2]=id*b+sh*h+db*r+gl*ua;d[3]=id* e+sh*l+db*y+gl*p;d[4]=tf*c+hl*f+il*k+kl*z;d[5]=tf*a+hl*g+il*w+kl*ha;d[6]=tf*b+hl*h+il*r+kl*ua;d[7]=tf*e+hl*l+il*y+kl*p;d[8]=jl*c+ml*f+ql*k+rl*z;d[9]=jl*a+ml*g+ql*w+rl*ha;d[10]=jl*b+ml*h+ql*r+rl*ua;d[11]=jl*e+ml*l+ql*y+rl*p;d[12]=sl*c+tl*f+ul*k+m*z;d[13]=sl*a+tl*g+ul*w+m*ha;d[14]=sl*b+tl*h+ul*r+m*ua;d[15]=sl*e+tl*l+ul*y+m*p;return d},translate:function(p,m,d){var c=m[0],a=m[1];m=m[2];if(!d||p==d)return p[12]=p[0]*c+p[4]*a+p[8]*m+p[12],p[13]=p[1]*c+p[5]*a+p[9]*m+p[13],p[14]=p[2]*c+p[6]*a+p[10]*m+p[14], p[15]=p[3]*c+p[7]*a+p[11]*m+p[15],p;var b=p[0],e=p[1],f=p[2],g=p[3],h=p[4],l=p[5],k=p[6],w=p[7],r=p[8],y=p[9],z=p[10],ha=p[11];d[0]=b;d[1]=e;d[2]=f;d[3]=g;d[4]=h;d[5]=l;d[6]=k;d[7]=w;d[8]=r;d[9]=y;d[10]=z;d[11]=ha;d[12]=b*c+h*a+r*m+p[12];d[13]=e*c+l*a+y*m+p[13];d[14]=f*c+k*a+z*m+p[14];d[15]=g*c+w*a+ha*m+p[15];return d},scale:function(p,m,d){var c=m[0],a=m[1];m=m[2];if(!d||p==d)return p[0]*=c,p[1]*=c,p[2]*=c,p[3]*=c,p[4]*=a,p[5]*=a,p[6]*=a,p[7]*=a,p[8]*=m,p[9]*=m,p[10]*=m,p[11]*=m,p;d[0]=p[0]*c;d[1]= p[1]*c;d[2]=p[2]*c;d[3]=p[3]*c;d[4]=p[4]*a;d[5]=p[5]*a;d[6]=p[6]*a;d[7]=p[7]*a;d[8]=p[8]*m;d[9]=p[9]*m;d[10]=p[10]*m;d[11]=p[11]*m;d[12]=p[12];d[13]=p[13];d[14]=p[14];d[15]=p[15];return d},rotate:function(p,m,d,c){var a=d[0],b=d[1];d=d[2];var e=Math.sqrt(a*a+b*b+d*d);if(!e)return null;1!=e&&(e=1/e,a*=e,b*=e,d*=e);var f=Math.sin(m),g=Math.cos(m),h=1-g;m=p[0];e=p[1];var l=p[2],k=p[3],w=p[4],r=p[5],y=p[6],z=p[7],ha=p[8],ua=p[9],id=p[10],sh=p[11],db=a*a*h+g,gl=b*a*h+d*f,tf=d*a*h-b*f,hl=a*b*h-d*f,il=b* b*h+g,kl=d*b*h+a*f,jl=a*d*h+b*f;a=b*d*h-a*f;b=d*d*h+g;c?p!=c&&(c[12]=p[12],c[13]=p[13],c[14]=p[14],c[15]=p[15]):c=p;c[0]=m*db+w*gl+ha*tf;c[1]=e*db+r*gl+ua*tf;c[2]=l*db+y*gl+id*tf;c[3]=k*db+z*gl+sh*tf;c[4]=m*hl+w*il+ha*kl;c[5]=e*hl+r*il+ua*kl;c[6]=l*hl+y*il+id*kl;c[7]=k*hl+z*il+sh*kl;c[8]=m*jl+w*a+ha*b;c[9]=e*jl+r*a+ua*b;c[10]=l*jl+y*a+id*b;c[11]=k*jl+z*a+sh*b;return c},yp:function(p,m,d,c,a,b,e){e||(e=x.ka.create());var f=m-p,g=c-d,h=b-a;e[0]=2*a/f;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=2*a/g;e[6]=0;e[7]= 0;e[8]=(m+p)/f;e[9]=(c+d)/g;e[10]=-(b+a)/h;e[11]=-1;e[12]=0;e[13]=0;e[14]=-(b*a*2)/h;e[15]=0;return e},perspective:function(p,m,d,c,a){p=d*Math.tan(p*Math.PI/360);m*=p;return x.ka.yp(-m,m,-p,p,d,c,a)},Ys:function(p,m,d,c,a,b,e){e||(e=x.ka.create());var f=m-p,g=c-d,h=b-a;e[0]=2/f;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=2/g;e[6]=0;e[7]=0;e[8]=0;e[9]=0;e[10]=-2/h;e[11]=0;e[12]=-(p+m)/f;e[13]=-(c+d)/g;e[14]=-(b+a)/h;e[15]=1;return e}}})(ggP2VR||(ggP2VR={})); (function(x){var p=function(){function m(d){this.ya=x.ka.create();this.zb=x.ka.create();this.td=0;this.ib=[];this.eh=!1;this.fl=this.gk=this.Tk=1;this.sf=1E6;this.ji=[!1,!1,!1,!1,!1,!1];this.ij=!1;this.ak=[];this.vl=8;this.Jq=new x.ul;this.ae=[];this.m=d;if(d.xd||d.If)d.Lh=2}m.prototype.$g=function(){var d=this.m.R;if(d){var c=d.createShader(d.FRAGMENT_SHADER);d.shaderSource(c,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\n\t\t\t\t\tuniform sampler2D uSampler;\n\t\t\t\t\tvoid main(void) {\n\t\t\t\t\t\tgl_FragColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n\t\t\t\t\t}"); d.compileShader(c);d.getShaderParameter(c,d.COMPILE_STATUS)||(console&&console.log(d.getShaderInfoLog(c)),alert(d.getShaderInfoLog(c)),c=null);var a=d.createShader(d.VERTEX_SHADER);this.bd(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\n\t\t\t\tattribute vec2 aTextureCoord;\n\t\t\t\tuniform mat4 uMVMatrix;\n\t\t\t\tuniform mat4 uPMatrix;\n\t\t\t\tuniform float uZoffset;\n\t\t\t\tvarying vec2 vTextureCoord;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tgl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);\n\t\t\t\t\tgl_Position.z += uZoffset;\n\t\t\t\t\tvTextureCoord = aTextureCoord;\n\t\t\t\t}"); this.P=d.createProgram();this.Of(this.P,a,c);this.P.ja=d.getAttribLocation(this.P,"aVertexPosition");d.enableVertexAttribArray(this.P.ja);this.P.Ma=d.getAttribLocation(this.P,"aTextureCoord");d.enableVertexAttribArray(this.P.Ma);this.P.he=d.getUniformLocation(this.P,"uPMatrix");this.P.vh=d.getUniformLocation(this.P,"uMVMatrix");this.P.$f=d.getUniformLocation(this.P,"uSampler");this.P.Ej=d.getUniformLocation(this.P,"uZoffset");c=d.createShader(d.VERTEX_SHADER);this.bd(c,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\n\t\t\t\tuniform vec2 uCanvasDimensions;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tvec2 pointNorm = (aVertexPosition.xy / uCanvasDimensions) * 2.0 - vec2(1.0, 1.0);\n\t\t\t\t\tgl_Position = vec4(pointNorm.x, pointNorm.y * -1.0, 0.0, 1.0);\n\t\t\t\t}"); a=d.createShader(d.FRAGMENT_SHADER);this.bd(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nuniform vec3 uColor;\n\t\t\t\tuniform float uAlpha;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tgl_FragColor = vec4(uColor, uAlpha);\n\t\t\t\t}");this.Pd=d.createProgram();this.Of(this.Pd,c,a);this.Pd.ja=d.getAttribLocation(this.Pd,"aVertexPosition");d.enableVertexAttribArray(this.Pd.ja);a=d.createShader(d.VERTEX_SHADER);this.bd(a,"precision highp float;\n\t\t\t\tattribute vec3 aVertexPosition;\n\t\t\t\tvarying vec2 vTextureCoord;\n\t\t\t\tuniform vec2 uCanvasDimensions;\n\t\t\t\tuniform vec4 uRect;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tvec2 pos = vec2(uRect.x + uRect.z*aVertexPosition.x,uRect.y + uRect.w*aVertexPosition.y);\n\t\t\t\t\tvec2 pointNorm = (pos / uCanvasDimensions) * 2.0 - vec2(1.0, 1.0);\n\t\t\t\t\tgl_Position = vec4(pointNorm.x, pointNorm.y * -1.0, 1.0, 1.0);\n\t\t\t\t\tvTextureCoord.s=aVertexPosition.x;\n\t\t\t\t\tvTextureCoord.t=1.0-aVertexPosition.y;\n\t\t\t\t}"); c=d.createShader(d.FRAGMENT_SHADER);this.bd(c,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\n\t\t\t\tuniform sampler2D uSampler;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tgl_FragColor = texture2D(uSampler,vTextureCoord);\n\t\t\t\t}");this.Jg=d.createProgram();this.Of(this.Jg,a,c)}};m.prototype.Ci=function(){var d=this.m,c=d.R;if(c){var a=c.createShader(c.FRAGMENT_SHADER);var b=this.mk(13);this.bd(a,b);b=c.createShader(c.VERTEX_SHADER); this.bd(b,"precision highp float;\nattribute vec3 aVertexPosition;\nuniform vec2 uCanvasDimensions;\nvarying vec2 dst;\nuniform vec2 dstSize;\nuniform float zOffset;\nvoid main(void) {\n vec2 pointNorm = (aVertexPosition.xy / uCanvasDimensions) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(pointNorm.x, pointNorm.y * -1.0, zOffset, 1.0);\n dst.x= -1.0 + 2.0*((aVertexPosition.x + 0.5) / uCanvasDimensions.x);\n dst.y= (-1.0 * uCanvasDimensions.y + 2.0*(aVertexPosition.y + 0.5)) / uCanvasDimensions.x;\n}\n"); this.zn=c.createProgram();this.Of(this.zn,b,a);a=c.createShader(c.FRAGMENT_SHADER);b=this.mk(4);this.bd(a,b);b=c.createShader(c.VERTEX_SHADER);this.bd(b,"precision highp float;\nattribute vec3 aVertexPosition;\nuniform vec2 uCanvasDimensions;\nvarying vec2 dst;\nuniform vec2 dstSize;\nuniform float zOffset;\nvoid main(void) {\n vec2 pointNorm = (aVertexPosition.xy / uCanvasDimensions) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(pointNorm.x, pointNorm.y * -1.0, zOffset, 1.0);\n dst.x= -1.0 + 2.0*((aVertexPosition.x + 0.5) / uCanvasDimensions.x);\n dst.y= (-1.0 * uCanvasDimensions.y + 2.0*(aVertexPosition.y + 0.5)) / uCanvasDimensions.x;\n}\n"); this.An=c.createProgram();this.Of(this.An,b,a);a=c.createShader(c.FRAGMENT_SHADER);b=this.mk(d.D.format);this.bd(a,b);b=c.createShader(c.VERTEX_SHADER);this.bd(b,"precision highp float;\nattribute vec3 aVertexPosition;\nuniform vec2 uCanvasDimensions;\nvarying vec2 dst;\nuniform vec2 dstSize;\nvoid main(void) {\n vec2 pointNorm = (aVertexPosition.xy / uCanvasDimensions) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(pointNorm.x, pointNorm.y * -1.0, 0.0, 1.0);\n dst.x= -1.0 + 2.0*((aVertexPosition.x + 0.5) / uCanvasDimensions.x);\n dst.y= (-1.0 * uCanvasDimensions.y + 2.0*(aVertexPosition.y + 0.5)) / uCanvasDimensions.x;\n}\n"); this.Bn=c.createProgram();this.Of(this.Bn,b,a);this.Yi||(this.Yi=c.createBuffer())}else this.m.N("No WebGL to initRemapShader!")};m.prototype.bd=function(d,c){var a=this.m.R;a.shaderSource(d,c);a.compileShader(d);a.getShaderParameter(d,a.COMPILE_STATUS)||(console&&console.log(a.getShaderInfoLog(d)),Il&&alert(a.getShaderInfoLog(d)))};m.prototype.Of=function(d,c,a){var b=this.m.R;b.attachShader(d,c);b.attachShader(d,a);b.linkProgram(d);b.getProgramParameter(d,b.LINK_STATUS)||(alert("Could not initialise shader program"), console&&console.log(b.getError()));b.useProgram(d)};m.prototype.mk=function(d){var c=this.m;var a="#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#define M_PI 3.14159265358979323846\nvarying vec2 dst;\nuniform vec2 srcScale;\nuniform vec2 srcOffset;\nuniform float rectDstDistance;\nuniform float fisheyeDistance;\nuniform float stereoDistance;\nuniform float directionBlend;\nuniform mat4 matRotate; // = mat4( 1.0,0.0,0.0,0.0, 0.0,1.0,0.0,0.0, 0.0,0.0,1.0,0.0, 0.0,0.0,0.0,1.0 );\nconst float rectSrcDistance = 1.0;\nuniform vec2 tonemap;\n"; a=(13==d?a+"uniform samplerCube cubeTexture;":a+"uniform sampler2D tileTexture;\n")+"void main()\n{\n";a+="vec4 direction;\n";a+="vec2 src;\n";a+="vec2 srcCord;\n";a+="vec2 texc;\n";var b=this.Em(c.Sa());c.Sa()!=c.Cc&&0!=c.Cc?(c=this.Em(c.Cc),a+="vec4 direction1,direction2;\n",a+=b.replace("direction=","direction1="),a+=c.replace("direction=","direction2="),a+="direction=normalize(mix(direction1, direction2,1.0-directionBlend));\n"):a+=b;a+="direction=direction*matRotate;\n";13==d&&(a+="direction.z=-direction.z;", a+="gl_FragColor = textureCube(cubeTexture, direction.xyz);");4==d&&(a+="float iz=1.0/(direction.z * rectSrcDistance);\n",a+="src.x=-direction.x*iz;\n",a+="src.y= direction.y*iz;\n",a+="texc=src * srcScale + srcOffset;\n",a+="if (",a+="(direction.z<0.0) && ",a+="(texc.x>=0.0) && (texc.x<=1.0) && (texc.y>=0.0) && (texc.y<=1.0)) {\n",a+=" gl_FragColor = texture2D(tileTexture, texc);\n",a+="} else {\n",a+=" discard;\n",a+="}\n");1==d&&(a+="src.x=atan(float(-direction.x), float(-direction.z));",a+= "src.y=asin(direction.y);\n",a+="texc=src * srcScale + srcOffset;\n",a+="gl_FragColor = texture2D(tileTexture, texc);\n");14==d&&(a+="vec2 cf;\n",a+="if ((direction.z<0.0) && (direction.z<=-abs(direction.x)) && (direction.z<=-abs(direction.y))) {\n",a+=" src.x=-direction.x/direction.z;\n",a+=" src.y=+direction.y/direction.z;\n",a+=" cf.x=1.0;cf.y=3.0;\n",a+="}\n",a+="if ((direction.x>=0.0) && (direction.x>=abs(direction.y)) && (direction.x>=abs(direction.z))) {\n",a+=" src.x=+direction.z/direction.x;\n", a+=" src.y=-direction.y/direction.x;\n",a+=" cf.x=3.0;cf.y=3.0;\n",a+="}\n",a+="if ((direction.z>=0.0) && (direction.z>=abs(direction.x)) && (direction.z>=abs(direction.y))) {\n",a+=" src.x=-direction.x/direction.z;\n",a+=" src.y=-direction.y/direction.z;\n",a+=" cf.x=5.0;cf.y=3.0;\n",a+="}\n",a+="if ((direction.x<=0.0) && (direction.x<=-abs(direction.y)) && (direction.x<=-abs(direction.z))) {\n",a+=" src.x=+direction.z/direction.x;\n",a+=" src.y=+direction.y/direction.x;\n",a+=" cf.x=1.0;cf.y=1.0;\n", a+="}\n",a+="if ((direction.y>=0.0) && (direction.y>=abs(direction.x)) && (direction.y>=abs(direction.z))) {\n",a+=" src.x=+direction.x/direction.y;\n",a+=" src.y=-direction.z/direction.y;\n",a+=" cf.x=5.0;cf.y=1.0;\n",a+="}\n",a+="if ((direction.y<=0.0) && (direction.y<=-abs(direction.x)) && (direction.y<=-abs(direction.z))) {\n",a+=" src.x=-direction.x/direction.y;\n",a+=" src.y=-direction.z/direction.y;\n",a+=" cf.x=3.0;cf.y=1.0;\n",a+="}\n",a+="texc.x=(cf.x+src.x*srcScale.x) / 6.0;\n",a+= "texc.y=(cf.y+src.y*srcScale.y) / 4.0;\n",a+="gl_FragColor = texture2D(tileTexture, texc);\n");return a+="}\n"};m.prototype.Em=function(d){var c="";switch(d){case 4:c+="direction.x=dst.x*rectDstDistance;\ndirection.y=dst.y*rectDstDistance;\ndirection.z=-1.0;\n";break;case 12:c+="float r,ph,ro;\nr=length(dst.xy)*0.5;\nro=atan(float(dst.x),float(-dst.y));\nph=r / fisheyeDistance;\ndirection.x= sin(ph) * sin(ro);\ndirection.y=-sin(ph) * cos(ro);\ndirection.z=-cos(ph);\n";break;case 9:c+="float n;\nvec2 ind;\nind=dst*stereoDistance;\nn=1.0 + ind.x*ind.x + ind.y*ind.y;\ndirection.x=2.0*ind.x/n;\ndirection.y=2.0*ind.y/n;\ndirection.z=(n-2.0)/n;\n"}return c+ "direction.w=0.0;\ndirection=normalize(direction);\n"};m.prototype.Om=function(d){var c,a,b=this.m,e=this.m.R;this.Wj=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,this.Wj);var f=[-1,-1,1,1,-1,1,1,1,1,-1,1,1];for(c=0;12>c;c++)2>c%3&&(f[c]*=d);e.bufferData(e.ARRAY_BUFFER,new Float32Array(f),e.STATIC_DRAW);this.Ae=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,this.Ae);var g=[1,0,0,0,0,1,1,1];e.bufferData(e.ARRAY_BUFFER,new Float32Array(g),e.STATIC_DRAW);this.pd=e.createBuffer();e.bindBuffer(e.ELEMENT_ARRAY_BUFFER, this.pd);var h=[0,1,2,0,2,3];e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array(h),e.STATIC_DRAW);f=[];h=[];g=[];var l=new x.Ga;for(d=0;6>d;d++){var k=d%3;var w=3>d?1:0;for(a=0;4>a;a++){l.x=-1;l.y=-1;l.z=1;for(c=0;c<a;c++)l.Gn();g.push((0>l.x?.33:0)+.33*k,(0>l.y?0:.5)+.5*w);if(4>d)for(c=0;c<d;c++)l.Br();else 5==d?l.Ar():l.zr();f.push(l.x,l.y,l.z)}c=4*d;h.push(0+c,1+c,2+c,0+c,2+c,3+c)}b.D.ql=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,b.D.ql);e.bufferData(e.ARRAY_BUFFER,new Float32Array(f),e.STATIC_DRAW); b.D.mj=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,b.D.mj);e.bufferData(e.ARRAY_BUFFER,new Float32Array(g),e.STATIC_DRAW);b.D.xk=e.createBuffer();e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,b.D.xk);e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array(h),e.STATIC_DRAW);this.xq=e.createBuffer();this.wq=e.createBuffer()};m.prototype.qk=function(d){var c=this;return function(){try{if(d.Vq)return;var a=c.m.R;a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,1);var b=!1;null!=d.Ne&&d.Ne.complete?d.Km||(a.bindTexture(a.TEXTURE_2D, d),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,d.Ne),b=d.Km=!0):null!=d.Vf&&d.Vf.complete&&(a.bindTexture(a.TEXTURE_2D,d),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,d.Vf),b=!0);b&&(d.loaded=!0);a.bindTexture(a.TEXTURE_2D,null);a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,0)}catch(e){c.m.N(e)}c.m.update(2)}};m.prototype.Pm=function(){var d=this.m,c=d.R;if(this.ib)for(;0<this.ib.length;)c.deleteTexture(this.ib.pop());this.ib=[];for(var a=0;6>a;a++){var b=c.createTexture();this.td++; b.Vf=null;b.Ne=null;b.Km=!1;c.bindTexture(c.TEXTURE_2D,b);c.texImage2D(c.TEXTURE_2D,0,c.RGB,1,1,0,c.RGB,c.UNSIGNED_BYTE,null);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);if(d.tf[a]){var e=new Image;e.crossOrigin=d.crossOrigin;e.src=d.Hb(d.tf[a]);b.Vf=e;e.addEventListener&&e.addEventListener("load",this.qk(b),!1);d.hc.push(e)}this.ib.push(b)}for(a=0;6>a;a++)d.Cg[a]&& (e=new Image,e.crossOrigin=d.crossOrigin,e.src=d.Hb(d.Cg[a]),e.addEventListener?e.addEventListener("load",this.qk(this.ib[a]),!1):e.onload=this.qk(this.ib[a]),this.ib[a].Ne=e,d.hc.push(e));for(a=0;a<d.S.length;a++)d.S[a].fd||(d.S[a].texture=c.createTexture(),d.td++,c.bindTexture(c.TEXTURE_2D,d.S[a].texture),c.texImage2D(c.TEXTURE_2D,0,c.RGB,1,1,0,c.RGB,c.UNSIGNED_BYTE,null),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));d.D.texture=c.createTexture();d.td++;c.bindTexture(c.TEXTURE_2D,d.D.texture);c.texImage2D(c.TEXTURE_2D,0,c.RGB,1,1,0,c.RGB,c.UNSIGNED_BYTE,null);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)};m.prototype.Ss=function(){var d=this.m;if(d.C.width!=d.L.offsetWidth||d.C.height!=d.L.offsetHeight)d.C.width= d.L.offsetWidth,d.C.height=d.L.offsetHeight;d.Ge&&(d.dd(0),d.Sc());if(d.R){var c=d.R;this.uj();c.clear(c.DEPTH_BUFFER_BIT);c.useProgram(this.P);this.dg(0);c.uniform1i(this.P.$f,0);c.enableVertexAttribArray(this.P.ja);c.enableVertexAttribArray(this.P.Ma);c.bindBuffer(c.ARRAY_BUFFER,this.Ae);c.vertexAttribPointer(this.P.Ma,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.pd);c.uniform1f(this.P.Ej,1E-4);c.vertexAttribPointer(this.P.ja,3,c.FLOAT,!1,0,0);x.ka.identity(this.zb); x.ka.perspective(d.jc(),d.yb.width/d.yb.height,.1,100,this.zb);c.uniformMatrix4fv(this.P.he,!1,this.zb);for(d=0;6>d;d++)this.dg(d),c.bindBuffer(c.ARRAY_BUFFER,this.Wj),c.vertexAttribPointer(this.P.ja,3,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.Ae),c.vertexAttribPointer(this.P.Ma,2,c.FLOAT,!1,0,0),6<=this.ib.length&&this.ib[d].loaded&&(c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,this.ib[d]),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.pd),c.uniform1i(this.P.$f,0),c.uniformMatrix4fv(this.P.vh, !1,this.ya),c.uniformMatrix4fv(this.P.he,!1,this.zb),c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT,0))}};m.prototype.uj=function(){var d=this.m;if(d.u.Wf&&6<d.u.Wf.length){var c=parseInt(d.u.Wf);d.R.clearColor((c>>16&255)/255,(c>>8&255)/255,(c>>0&255)/255,1)}};m.prototype.dg=function(d,c){void 0===c&&(c=1);var a=this.m;x.ka.identity(this.ya);x.ka.rotate(this.ya,c*-a.U.j*Math.PI/180,[0,0,1]);x.ka.rotate(this.ya,c*-a.v.j*Math.PI/180,[1,0,0]);-1==c?x.ka.rotate(this.ya,-a.pan.j*Math.PI/180,[0,1,0]):x.ka.rotate(this.ya, (180-a.pan.j)*Math.PI/180,[0,1,0]);a.Oa&&(x.ka.rotate(this.ya,-a.Oa.pitch*Math.PI/180,[1,0,0]),x.ka.rotate(this.ya,a.Oa.U*Math.PI/180,[0,0,1]));4>d?x.ka.rotate(this.ya,-Math.PI/2*d,[0,1,0]):x.ka.rotate(this.ya,Math.PI/2*(5==d?1:-1),[1,0,0])};m.prototype.ts=function(d){var c=this;return function(){c.ak.push(d)}};m.prototype.rp=function(d){this.m.Na=!0;this.m.qd=!0;d.loaded=!0;d.Uk=0;d.ke=0;var c=this.m.R;this.Xl();c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL,1);if(null!=d.u&&d.u.complete){d.qb=c.createTexture(); this.m.td++;c.bindTexture(c.TEXTURE_2D,d.qb);try{c.texImage2D(c.TEXTURE_2D,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,d.u)}catch(a){c.texImage2D(c.TEXTURE_2D,0,c.RGBA,1,1,0,c.RGBA,c.UNSIGNED_BYTE,new Uint8Array([128,128,128,250])),this.m.N(a)}}this.m.update(2)};m.prototype.Xl=function(){this.m.ac&&this.m.ac--};m.prototype.sp=function(){if(0<this.ak.length){var d=this.ak.shift();this.rp(d)}};m.prototype.Sq=function(d){var c=this;return function(){c.m.Na=!0;c.m.qd=!0;var a=c.m.u;try{if(null!=d&&d.complete){var b= a.levels[a.levels.length-1],e=a.Da;b.height=b.width=d.width-2*e;b.T=b.ea=1;for(var f=0;6>f;f++){var g=new x.Wd;g.V=document.createElement("canvas");c.m.ia?(g.V.width=b.width+2*e,g.V.height=b.height+2*e):(g.V.width=a.O+2*e,g.V.height=a.O+2*e);g.bb=g.V.getContext("2d");g.V.style[c.m.Va+"Origin"]="0% 0%";g.V.style.overflow="hidden";g.V.style.position="absolute";g.u=d;var h=b.width+2*e,l=b.height+2*e;g.bb&&g.bb.drawImage(d,0,f*l,h,l,0,0,h,l);if(c.m.ia&&c.m.R){var k=c.m.R;k.pixelStorei(k.UNPACK_FLIP_Y_WEBGL, 1);g.qb=k.createTexture();c.m.td++;k.bindTexture(k.TEXTURE_2D,g.qb);try{k.texImage2D(k.TEXTURE_2D,0,k.RGBA,k.RGBA,k.UNSIGNED_BYTE,g.V)}catch(w){c.m.N(w)}k.bindTexture(k.TEXTURE_2D,null);k.pixelStorei(k.UNPACK_FLIP_Y_WEBGL,0)}c.m.kd&&(g.V.ce=-1,c.m.L.insertBefore(g.V,c.m.L.firstChild));b.aa[f]=g}b.loaded=!0}}catch(w){c.m.N(w)}c.m.update(2)}};m.prototype.ho=function(d){var c=this;return function(){c.m.Na=!0;c.m.qd=!0;c.Xl();d.u=null}};m.prototype.Qs=function(){var d=this.m,c=d.u,a=d.u.levels;d.Ge&& (d.dd(0),d.Sc());if(d.R){var b=d.R;b.useProgram(this.P);this.uj();b.clear(b.DEPTH_BUFFER_BIT);b.enable(b.DEPTH_TEST);x.ka.identity(this.zb);x.ka.perspective(d.jc(),d.yb.width/d.yb.height,.1,100,this.zb);b.uniformMatrix4fv(this.P.he,!1,this.zb);d.po();d.Hk();var e=d.ek();var f=a.length-1;for(d.Ec=0;f>=e;){var g=a[f],h=1;f==a.length-1&&0==c.Da&&(h=c.O/(c.O-.5));for(var l=0;6>l;l++){var k=d.cube.faces[l];var w=k.Uf;if(k.pb&&0<w.ng&&0<w.Wh&&0<w.scale||g.cache){k.Na=!1;k.nf[f]||(k.nf[f]={jb:0,Ib:0,Kb:0, Lb:0});var r=k.nf[f];g.cache?(r.jb=0,r.Ib=0,r.Kb=g.T-1,r.Lb=g.ea-1):d.Fm(g,w,r);w=!0;for(var y=r.Ib;y<=r.Lb;y++)for(var z=r.jb;z<=r.Kb;z++){var ha=z+y*g.T+l*g.T*g.ea,ua=g.aa[ha];ua||(ua=g.aa[ha]=new x.Wd);this.ni()?ua.u||(ua.ke?ua.ke--:(this.Mi(ua,g,d.pe(l,f,z,y)),d.Na=!0)):d.Ec++;if(ua.qb){if(!ua.Cf){ha=.5*f+1;ua.Cf=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,ua.Cf);var id=[-1,-1,1,1,-1,1,1,1,1,-1,1,1];id[3]=z*c.O-c.Da;id[0]=Math.min((z+1)*c.O,g.width)+c.Da;id[7]=y*c.O-c.Da;id[1]=Math.min((y+1)* c.O,g.height)+c.Da;id[4]=id[1];id[6]=id[3];id[9]=id[0];id[10]=id[7];for(var sh=0;12>sh;sh++)id[sh]=0==sh%3?h*ha*(-2*id[sh]/g.width+1):1==sh%3?h*ha*(-2*id[sh]/g.height+1):ha;b.bufferData(b.ARRAY_BUFFER,new Float32Array(id),b.STATIC_DRAW)}}else w=!1;ua.visible=k.pb}r.Ek=w}}f--}for(l=0;6>l;l++)if(k=d.cube.faces[l],k.pb)for(w=k.Uf,this.dg(l),b.uniform1i(this.P.$f,0),b.uniformMatrix4fv(this.P.he,!1,this.zb),b.uniformMatrix4fv(this.P.vh,!1,this.ya),b.enableVertexAttribArray(this.P.ja),b.enableVertexAttribArray(this.P.Ma), b.bindBuffer(b.ARRAY_BUFFER,this.Ae),b.vertexAttribPointer(this.P.Ma,2,b.FLOAT,!1,0,0),b.activeTexture(b.TEXTURE0),b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.pd),b.useProgram(this.P),f=e;f<=a.length-1;){g=a[f];if(k.pb&&0<w.ng&&k.nf[f]&&0<=k.nf[f].jb){r=k.nf[f];for(y=r.Ib;y<=r.Lb;y++)for(z=r.jb;z<=r.Kb;z++)ha=z+y*g.T+l*g.T*g.ea,(ua=g.aa[ha])&&ua.qb&&(b.uniform1f(this.P.Ej,1E-4*(z%2+y%2*2)),b.bindBuffer(b.ARRAY_BUFFER,ua.Cf),b.vertexAttribPointer(this.P.ja,3,b.FLOAT,!1,0,0),b.bindTexture(b.TEXTURE_2D, ua.qb),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)),ua.visible=k.pb;r.Ek&&(f=a.length)}f++}this.Vk();d.qd=!1}};m.prototype.ni=function(){return this.m.ac<this.m.Lh};m.prototype.Mi=function(d,c,a){var b=this.m;b.wk++;d.u=new Image;d.Uk++;d.ke=1<<d.Uk; d.u.onload=this.ts(d);d.u.onerror=this.ho(d);d.u.onabort=this.ho(d);d.u.crossOrigin=b.crossOrigin;d.u.setAttribute("src",a);b.N("load "+a);c.cache&&b.hc.push(d.u);b.ac++};m.prototype.zo=function(){var d=this.m,c=d.u;d.Ge&&(d.dd(0),d.Sc());if(d.R){var a=d.R;this.uj();Il&&a.clearColor(.2,0,0,1);a.clear(a.DEPTH_BUFFER_BIT);a.disable(a.DEPTH_TEST);a.disable(a.CULL_FACE);a.bindBuffer(a.ARRAY_BUFFER,this.Yi);var b=[0,0];b[2]=d.C.width;b[3]=0;b[4]=d.C.width;b[5]=d.C.height;b[6]=0;b[7]=d.C.height;a.bufferData(a.ARRAY_BUFFER, new Float32Array(b),a.STATIC_DRAW);this.m.Ec=0;if(!this.Jc||this.eh)0<c.levels.length?this.pp():this.qp();d.D.yd?this.ir():(a.enable(a.DEPTH_TEST),a.depthRange(0,1),a.depthFunc(a.LESS),this.ij=!1,0<c.levels.length&&this.Rs(),this.Jc&&!this.ij&&this.hr())}};m.prototype.bs=function(d,c,a,b,e,f,g){var h=this.m,l=h.u,k=h.C,w=a*l.O/c.width,r=(a+1)*l.O/c.width;a=b*l.O/c.height;c=(b+1)*l.O/c.height;1<r&&(e*=2,r=1);1<c&&(e*=2,c=1);e=Math.min(this.vl,e);r=(r-w)/e;var y=(c-a)/e;b=c=0;l={x:0,y:0};var z={x:0, y:0},ha=0;d.yi=0;var ua=h.xh,id=new x.Ga,sh=this.Jq;sh.Ln();4>f?sh.Ve(-90*f):sh.Rd(5==f?90:-90);h.Oa&&(sh.We(h.Oa.U),sh.Rd(-h.Oa.pitch));sh.Ve(-h.pan.j);sh.Rd(h.v.j);sh.We(h.U.j);for(f=0;f<=e;f++)for(var db=0;db<=e;db++){var gl=2*(w+db*r)-1;var tf=2*(a+f*y)-1;id.x=1*gl;id.y=1*tf;id.z=-1;id.normalize();sh.Rq(id);gl=this.Bm(id,l,h.Sa());0!=h.Cc&&1>ua&&(gl=gl&&this.Bm(id,z,h.Cc),l.x=l.x*ua+z.x*(1-ua),l.y=l.y*ua+z.y*(1-ua));gl?-1E10<l.x&&1E10>l.x&&-1E10<l.y&&1E10>l.y?-2<l.x&&2>l.x&&-2<l.y&&2>l.y&&(c+= l.x,b+=l.y,ha++):l.x=NaN:l.x=NaN;d.ud[d.yi++]=l.x;d.ud[d.yi++]=l.y}0<ha?(c/=ha,b/=ha):g=0;for(a=0;a<d.yi;a+=2)l.x=d.ud[a],l.y=d.ud[a+1],h=l.x-c,w=l.y-b,l.x+=h*g,l.y+=w*g,d.ud[a]=k.width/2+l.x*k.width/2,d.ud[a+1]=k.height/2-l.y*k.width/2;this.cs(d,e)};m.prototype.Bm=function(d,c,a){var b=!0;switch(a){case 0:case 4:a=1/(d.z*this.Tk);c.x=-d.x*a;c.y=d.y*a;0<d.z&&(b=!1);break;case 9:1==d.z&&(b=!1);a=1/((1-d.z)*this.fl);c.x=d.x*a;c.y=-d.y*a;break;case 12:if(a=Math.sqrt(d.x*d.x+d.y*d.y),0==a)c.x=0,c.y=0; else{var e=2*this.gk*Math.acos(-d.z)/a;if(2<a)return!1;c.x=e*d.x;c.y=-e*d.y}}return b};m.prototype.cs=function(d,c){for(var a=this.m,b=[],e,f=d.Jd=0;f<c;f++)for(var g=0;g<c;g++){b[0]=f+g*(c+1);b[1]=f+1+g*(c+1);b[2]=f+(g+1)*(c+1);b[3]=f+1+(g+1)*(c+1);e=!0;for(var h=0;4>h;h++)isNaN(d.ud[2*b[0]])&&(e=!1);if(e){var l=!1,k=!1,w=!1,r=!1;for(h=0;4>h;h++){var y=d.ud[2*b[h]];y<a.C.width&&(k=!0);0<=y&&(l=!0);y=d.ud[2*b[h]+1];y<a.C.height&&(w=!0);0<=y&&(r=!0)}if(e=e&&k&&l&&w&&r)d.Le[d.Jd++]=b[0],d.Le[d.Jd++]= b[3],d.Le[d.Jd++]=b[2],d.Le[d.Jd++]=b[0],d.Le[d.Jd++]=b[1],d.Le[d.Jd++]=b[3]}}};m.prototype.Rs=function(){var d=this.m,c=d.u,a=d.u.levels;d.Ge&&(d.dd(0),d.Sc());if(d.R){var b=d.R,e=this.An;b.useProgram(e);this.ml(e);b.enable(b.CULL_FACE);b.cullFace(b.FRONT);b.enable(b.DEPTH_TEST);x.ka.identity(this.zb);x.ka.perspective(d.jc(),d.yb.width/d.yb.height,.1,100,this.zb);b.uniformMatrix4fv(b.getUniformLocation(e,"uPMatrix"),!1,this.zb);this.m.Ec=0;d.Hk();var f=d.ek(),g=0;var h=a.length-1;for(var l={},k= a[h];k.Se&&0<h;)h--,k=a[h];for(var w=h,r=w,y=0;6>y;y++)for(var z=0;z<k.ea;z++)for(var ha=0;ha<k.T;ha++){var ua=ha+z*k.T+y*k.T*k.ea;l[ua]=1}for(;h>=f;){var id={};k=a[h];var sh=null;0<h&&(sh=a[h-1]);var db=!0;for(var gl in l)if(l.hasOwnProperty(gl)){ua=Number(gl);var tf=k.aa[ua];y=Number(Math.floor(ua/(k.T*k.ea)));z=Math.floor((ua-y*k.T*k.ea)/k.T);ha=Math.floor(ua-(z*k.T+y*k.T*k.ea));if(6<=y)console.log("Grrr...");else{var hl=this.m.cube.faces[y];hl.Na=!1;tf||(tf=k.aa[ua]=new x.Wd,d.N("create "+ua)); this.bs(tf,k,ha,z,Math.max(1,this.vl>>w-h),y,-(0!=d.Cc)?.3:.1);tf.visible=0<tf.Jd||k.cache;tf.Hi=3;tf.ih=Date.now();tf.visible&&!tf.qb&&(db=!1,this.ni()?tf.u||(tf.ke?tf.ke--:(this.Mi(tf,k,d.pe(y,h,ha,z)),d.Na=!0)):this.m.Ec++);if(sh&&(tf.visible||sh.cache)){tf=(ha*c.O+1)/k.width;ha=Math.min(1,((ha+1)*c.O-1)/k.width);var il=(z*c.O+1)/k.height;z=Math.min(1,((z+1)*c.O-1)/k.height);ua=c.O/sh.width;hl=c.O/sh.height;var kl=il;il=Math.floor(il*sh.height/c.O);do{var jl=tf,ml=Math.floor(tf*sh.width/c.O);do{var ql= ml+il*sh.T+y*sh.T*sh.ea;ml<sh.T&&il<sh.ea?id[ql]=1:d.N("Grrrr");ml++;jl+=ua}while(jl<ha);il++;kl+=hl}while(kl<z)}}}db&&(r=h,20>d.fov.j&&h<this.sf&&(this.ij=!0));l=id;h--}this.Vk();b.uniform1i(b.getUniformLocation(e,"tileTexture"),0);b.activeTexture(b.TEXTURE0);h=f;for(f=-1;h<=Math.min(r,this.sf-1);){k=a[h];for(gl in k.aa)if(k.aa.hasOwnProperty(gl)){l=Number(gl);tf=k.aa[l];y=Math.floor(l/(k.T*k.ea));z=Math.floor((l-y*k.T*k.ea)/k.T);ha=Math.floor(l-(z*k.T+y*k.T*k.ea));f!=y&&(f=y,this.vj(y,e));if(g> d.Oe){d.N("Excided painted tiles");this.ij=!1;break}tf.qb&&(l=y=c.O,ha==k.T-1&&(y=k.width-c.O*ha),z==k.ea-1&&(l=k.height-c.O*z),y=(y+2*c.Da)/c.O,l=(l+2*c.Da)/c.O,b.bindTexture(b.TEXTURE_2D,tf.qb),b.uniform2f(b.getUniformLocation(e,"uCanvasDimensions"),d.C.width,d.C.height),w=b.getUniformLocation(e,"srcScale"),b.uniform2f(w,.5*k.width/c.O/y,.5*k.height/c.O/l),w=b.getUniformLocation(e,"srcOffset"),b.uniform2f(w,(.5*k.width+c.Da-c.O*ha)/c.O/y,-(.5*k.height+c.Da-c.O*z)/c.O/l+1),w=b.getUniformLocation(e, "zOffset"),b.uniform1f(w,(h+1)/(a.length+5)),y=b.getAttribLocation(e,"aVertexPosition"),b.disableVertexAttribArray(0),b.disableVertexAttribArray(1),b.disableVertexAttribArray(2),b.enableVertexAttribArray(y),b.activeTexture(b.TEXTURE0),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.bindBuffer(b.ARRAY_BUFFER, this.xq),b.vertexAttribPointer(y,2,b.FLOAT,!1,0,0),b.bufferData(b.ARRAY_BUFFER,new Float32Array(tf.ud),b.DYNAMIC_DRAW),b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.wq),b.bufferData(b.ELEMENT_ARRAY_BUFFER,new Uint16Array(tf.Le),b.DYNAMIC_DRAW),b.drawElements(b.TRIANGLES,tf.Jd,b.UNSIGNED_SHORT,0),g++)}h++}b.disable(b.CULL_FACE);b.cullFace(b.FRONT_AND_BACK);d.qd=!1}};m.prototype.vj=function(d,c){var a=this.m.R;x.ka.identity(this.ya);this.dg(d,-1);a.uniformMatrix4fv(a.getUniformLocation(c,"matRotate"),!1, this.ya)};m.prototype.ir=function(){var d=this.m;if(d.R){var c=d.R,a=this.Bn;c.useProgram(a);this.vj(0,a);c.uniform2f(c.getUniformLocation(a,"uCanvasDimensions"),d.C.width,d.C.height);var b=c.getUniformLocation(a,"srcOffset");c.uniform2f(b,.5,.5);1==d.D.format&&(b=c.getUniformLocation(a,"srcScale"),d.Md?(c.uniform2f(b,-.5/Math.PI,(d.D.flipY?-.5:.5)/Math.PI),b=c.getUniformLocation(a,"srcOffset"),d.Kh?c.uniform2f(b,.5,.75):c.uniform2f(b,.5,.25)):c.uniform2f(b,-.5/Math.PI,(d.D.flipY?-1:1)/Math.PI)); 14==d.D.format&&(b=c.getUniformLocation(a,"srcScale"),c.uniform2f(b,1-2*d.D.lf/(d.D.width/3),1-2*d.D.lf/(d.D.height/2)));this.ml(a);b=c.getUniformLocation(a,"cubeTexture");c.uniform1i(b,0);b=c.getAttribLocation(a,"aVertexPosition");c.disableVertexAttribArray(0);c.disableVertexAttribArray(1);c.disableVertexAttribArray(2);c.enableVertexAttribArray(b);c.bindBuffer(c.ARRAY_BUFFER,this.Yi);c.vertexAttribPointer(b,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_2D,d.D.texture);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.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.LINEAR);c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.pd);c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT,0)}};m.prototype.ml=function(d){var c=this.m,a=c.R,b=this.m.C,e=b.width/b.height;switch(c.fov.mode){case 1:e=1;break;case 2:e=b.width/Math.sqrt(b.width*b.width+b.height*b.height);break;case 3:4* b.height/3<b.width&&(e=4/3)}b=a.getUniformLocation(d,"rectDstDistance");this.Tk=Math.tan(Math.min(c.fov.j,179)/2*Math.PI/180)*e;a.uniform1f(b,this.Tk);b=a.getUniformLocation(d,"fisheyeDistance");this.gk=180/(c.fov.j*Math.PI*e);a.uniform1f(b,this.gk);b=a.getUniformLocation(d,"stereoDistance");this.fl=Math.tan(Math.min(c.fov.j,359)/4*Math.PI/180)*e;a.uniform1f(b,this.fl);b=a.getUniformLocation(d,"directionBlend");a.uniform1f(b,c.xh)};m.prototype.hr=function(){var d=this.m,c=d.R,a=this.zn;c.useProgram(a); c.enable(c.DEPTH_TEST);this.vj(0,a);c.uniform2f(c.getUniformLocation(a,"uCanvasDimensions"),d.C.width,d.C.height);d=c.getUniformLocation(a,"srcScale");c.uniform2f(d,1,1);d=c.getUniformLocation(a,"srcOffset");c.uniform2f(d,0,0);d=c.getUniformLocation(a,"zOffset");c.uniform1f(d,.9999);this.ml(a);this.vj(0,a);d=c.getUniformLocation(a,"cubeTexture");c.uniform1i(d,0);a=c.getAttribLocation(a,"aVertexPosition");c.disableVertexAttribArray(0);c.disableVertexAttribArray(1);c.disableVertexAttribArray(2);c.enableVertexAttribArray(a); c.bindBuffer(c.ARRAY_BUFFER,this.Yi);c.vertexAttribPointer(a,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_CUBE_MAP,this.Jc);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_MIN_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_MAG_FILTER,c.LINEAR);c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.pd);c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT, 0)};m.prototype.qp=function(){for(var d=this.m,c=d.R,a=[1,3,5,4,0,2],b=!0,e=!0,f=!1,g=0;6>g;g++)this.ib[g].Ne.complete?this.ji[g]||(f=!0):b=!1,this.ib[g].Vf.complete||(e=!1);if(e||b)if(!e||b||!this.Jc||f){g=Math.round(d.Fc/d.cf);e=(d.Fc-g)/2;d.N("paint cube single - isMain: "+b+" overlap: "+e);this.sf=0;this.Jc||(this.Jc=c.createTexture());d.td++;c.bindTexture(c.TEXTURE_CUBE_MAP,this.Jc);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_WRAP_T, c.CLAMP_TO_EDGE);c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL,1);f=document.createElement("canvas");f.width=g;f.height=g;var h=f.getContext("2d");for(g=0;6>g;g++){var l=a[g];this.ib[l].Ne.complete?this.ji[l]||(h.drawImage(this.ib[l].Ne,-e,-e),c.texImage2D(c.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,f),this.ji[l]=!0):(h.drawImage(this.ib[l].Vf,-e,-e,d.Fc,d.Fc),c.texImage2D(c.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,f))}this.eh=!b}};m.prototype.pp=function(){var d=this.m, c=this.m.u,a=d.u.levels,b=d.R,e;var f=a.length-1;if(!(0>f)){a[f].Se&&f--;var g=512;d.dh&&(g=256);!d.Zf&&2<=d.devicePixelRatio&&(g=512);for((e=b.getParameter(b.MAX_CUBE_MAP_TEXTURE_SIZE))&&e<g&&(g=e);0<f&&a[f-1].width<=g;)f--;g=a[f];if(0!=g.T){e=f;var h=this.jp(f);this.eh&&h&&(this.eh=!1);h||(f=a.length-1,g=a[f],h||(g.Se?(h=g.loaded,this.Gk(f-1)&&(--f,h=!0)):h=this.Gk(f)),this.eh=!0);this.Gk(e);if(h&&this.sf>f){g=a[f];d.N("paint cube level "+f);this.sf=f;a=d.u.Da;f=0<a||1<g.T||1<g.ea;h=e=void 0;f&& (h=document.createElement("canvas"),h.width=g.width,h.height=g.height,2048>g.width&&(1500<g.width?(h.width=2048,h.height=2048):700<g.width?(h.width=1024,h.height=1024):(h.width=512,h.height=512)),e=h.getContext("2d"));this.Jc=b.createTexture();d.td++;b.bindTexture(b.TEXTURE_CUBE_MAP,this.Jc);b.texParameteri(b.TEXTURE_CUBE_MAP,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE);b.texParameteri(b.TEXTURE_CUBE_MAP,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE);b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL,1);var l=[1,3,5,4,0,2];c=c.O;for(var k= 0;6>k;k++){for(var w=0;w<g.ea;w++)for(var r=0;r<g.T;r++){var y=r+w*g.T+l[k]*g.T*g.ea,z=g.aa[y],ha=z.u;z.V&&(ha=z.V);ha?f?(y=h.width/g.width,e.drawImage(ha,y*(r*c-a),y*(w*c-a),y*ha.width,y*ha.height)):b.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+k,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,ha):(d.N("WTF?!"),d.N(y),d.N(z))}f&&b.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+k,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,h)}}}}};m.prototype.Gk=function(d){var c=this.m,a=c.u.levels[d];if(0==a.T)return!1;var b=!0;a.cache=!0;for(var e= 0;6>e;e++)for(var f=0;f<a.ea;f++)for(var g=0;g<a.T;g++){var h=g+f*a.T+e*a.T*a.ea,l=a.aa[h];l||(l=a.aa[h]=new x.Wd);this.ni()?l.u||(l.ke?l.ke--:(this.Mi(l,a,c.pe(e,d,g,f)),c.Na=!0)):this.m.Ec++;l.qb||(b=!1,c.Na=!0)}b&&(a.loaded=!0);return b};m.prototype.jp=function(d){d=this.m.u.levels[d];if(0==d.T)return!1;for(var c=0;6>c;c++)for(var a=0;a<d.ea;a++)for(var b=0;b<d.T;b++){var e=d.aa[b+a*d.T+c*d.T*d.ea];if(!e||!e.qb)return!1}return d.loaded=!0};m.prototype.ready=function(){return null!=this.Jc};m.prototype.Vk= function(){for(var d=this.m,c=d.u.levels,a=d.R,b=Date.now(),e=c.length-1;0<=e;e--){var f=c[e];if(!f.cache)for(var g in f.aa)if(f.aa.hasOwnProperty(g)){var h=f.aa[g];0<h.Hi&&h.Hi--;h.visible||0<h.Hi?(h.visible&&(h.ih=b),h=this.ae.indexOf(h),-1!==h&&this.ae.splice(h,1)):-1===this.ae.indexOf(h)&&(h.level=f,this.ae.push(h))}}if(this.ae.length>1.1*d.eo)for(this.ae.sort(function(l,k){return k.ih-l.ih});this.ae.length>d.eo;)h=this.ae.pop(),h.qb&&(a.deleteTexture(h.qb),d.td--,h.qb=0),h.u=null,h.Cf&&(a.deleteBuffer(h.Cf), h.Cf=0),g=h.level.aa.indexOf(h),d.N("delete "+g+" "+(b-h.ih)),delete h.level.aa[g]};m.prototype.Js=function(){var d=this.m;if(d.R){var c=this.m.R;c.disable(c.DEPTH_TEST);var a;for(a=0;a<d.S.length;a++){var b=d.S[a];if(!b.fd){x.ka.identity(this.ya);x.ka.rotate(this.ya,-d.U.j*Math.PI/180,[0,0,1]);x.ka.rotate(this.ya,-d.v.j*Math.PI/180,[1,0,0]);x.ka.rotate(this.ya,(180-d.pan.j)*Math.PI/180,[0,1,0]);x.ka.rotate(this.ya,b.pan*Math.PI/180,[0,1,0]);x.ka.rotate(this.ya,-b.v*Math.PI/180,[1,0,0]);x.ka.translate(this.ya, [0,0,1]);x.ka.rotate(this.ya,b.lb*Math.PI/180,[0,0,1]);x.ka.rotate(this.ya,-b.La*Math.PI/180,[0,1,0]);x.ka.rotate(this.ya,b.Fa*Math.PI/180,[1,0,0]);var e=Math.tan(b.fov/2*Math.PI/180),f=b.aspect;f||(f=16/9);x.ka.scale(this.ya,[e,e/f,1]);x.ka.translate(this.ya,[0,0,-1]);c.bindBuffer(c.ARRAY_BUFFER,this.Wj);c.vertexAttribPointer(this.P.ja,3,c.FLOAT,!1,0,0);c.bindBuffer(c.ARRAY_BUFFER,this.Ae);c.vertexAttribPointer(this.P.Ma,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_2D,b.texture); 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.ELEMENT_ARRAY_BUFFER,this.pd);c.uniform1i(this.P.$f,0);c.uniformMatrix4fv(this.P.vh,!1,this.ya);c.uniformMatrix4fv(this.P.he,!1,this.zb);c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT,0)}}c.enable(c.DEPTH_TEST)}};m.prototype.Is=function(){var d= this.m,c;if(d.C.width!=d.L.offsetWidth||d.C.height!=d.L.offsetHeight)d.C.width=d.L.offsetWidth,d.C.height=d.L.offsetHeight;d.Ge&&(d.dd(0),d.Sc());if(d.R){var a=d.R;a.useProgram(this.P);x.ka.identity(this.zb);x.ka.perspective(d.jc(),d.yb.width/d.yb.height,.1,100,this.zb);a.uniformMatrix4fv(this.P.he,!1,this.zb);this.dg(0);a.uniform1i(this.P.$f,0);a.uniformMatrix4fv(this.P.he,!1,this.zb);a.uniformMatrix4fv(this.P.vh,!1,this.ya);a.enableVertexAttribArray(this.P.ja);a.enableVertexAttribArray(this.P.Ma); a.bindBuffer(a.ARRAY_BUFFER,this.Ae);a.vertexAttribPointer(this.P.Ma,2,a.FLOAT,!1,0,0);a.activeTexture(a.TEXTURE0);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.pd);a.uniform1f(this.P.Ej,1E-4);a.vertexAttribPointer(this.P.ja,3,a.FLOAT,!1,0,0);a.bindTexture(a.TEXTURE_2D,d.D.texture);for(c=0;1>c;c++)this.dg(0),a.bindBuffer(a.ARRAY_BUFFER,d.D.ql),a.vertexAttribPointer(this.P.ja,3,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,d.D.mj),a.vertexAttribPointer(this.P.Ma,2,a.FLOAT,!1,0,0),a.activeTexture(a.TEXTURE0), a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,d.D.xk),a.uniform1i(this.P.$f,0),a.uniformMatrix4fv(this.P.vh,!1,this.ya),a.uniformMatrix4fv(this.P.he,!1,this.zb),a.drawElements(a.TRIANGLES,36,a.UNSIGNED_SHORT,0)}};m.prototype.Hs=function(){var d=this.m,c=d.R,a=d.D;if(0<d.S.length)for(var b=0;b<d.S.length;b++){var e=d.S[b];if(!e.fd&&e.isRunning&&e.xi!=e.f.currentTime&&(e.xi=e.f.currentTime,!e.aspect&&0<e.f.videoHeight&&(e.aspect=e.f.videoWidth/e.f.videoHeight),d.Th))try{e.texture&&(c.bindTexture(c.TEXTURE_2D, e.texture),c.texImage2D(c.TEXTURE_2D,0,c.RGB,c.RGB,c.UNSIGNED_BYTE,e.f),d.update())}catch(g){d.N(g)}}if(a.f&&(b=Number(a.f.currentTime),a.xi!=b)){a.xi=b;try{var f=0<a.f.readyState;d.Fi&&a.yd&&(f=f&&0<a.f.currentTime);a.texture&&a.Gi&&f&&(a.yd=!0,a.width=a.f.videoWidth,a.height=a.f.videoHeight,c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL,d.D.flipY),c.bindTexture(c.TEXTURE_2D,a.texture),c.texImage2D(c.TEXTURE_2D,0,c.RGB,c.RGB,c.UNSIGNED_BYTE,a.f),a.co=!0,d.update())}catch(g){d.N(g)}}};m.prototype.qn=function(){var d, c,a=this.m,b=this.m.R;a.Ja.style.visibility="hidden";a.H.gh!=a.H.mode&&(a.H.gh=a.H.mode);if((0<=a.H.mode||0<a.H.tb.length)&&!a.J.Nh){var e=1;0>=a.H.mode&&(e=0);3==a.H.mode&&(e=a.H.va);for(d=0;d<a.W.length;d++){var f=a.W[d];if("poly"==f.type){var g=f.ie,h=e;2==a.H.mode&&(h=f.va);var l=a.H.tb.indexOf(f.id);-1!=l&&(h=a.H.$b[l]);if(0<g.length){l=[];for(c=0;c<g.length;c++)l.push(g[c].Yb),l.push(g[c].Bb),l.push(0);b.useProgram(this.Pd);b.enable(b.BLEND);b.blendFuncSeparate(b.SRC_ALPHA,b.ONE_MINUS_SRC_ALPHA, b.SRC_ALPHA,b.ONE);b.disable(b.DEPTH_TEST);g=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,g);b.bufferData(b.ARRAY_BUFFER,new Float32Array(l),b.STATIC_DRAW);b.uniform2f(b.getUniformLocation(this.Pd,"uCanvasDimensions"),a.C.width,a.C.height);g=b.getUniformLocation(this.Pd,"uColor");c=f.fc;b.uniform3f(g,(c>>16&255)/255,(c>>8&255)/255,(c&255)/255);var k=b.getUniformLocation(this.Pd,"uAlpha");b.uniform1f(k,f.ec*h);b.vertexAttribPointer(this.Pd.ja,3,b.FLOAT,!1,0,0);b.drawArrays(b.LINE_LOOP,0,l.length/3); c=f.dc;b.uniform3f(g,(c>>16&255)/255,(c>>8&255)/255,(c&255)/255);b.uniform1f(k,f.cc*h);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,l.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,l.length/3);b.disable(b.BLEND);b.enable(b.DEPTH_TEST);b.disable(b.STENCIL_TEST);b.useProgram(this.P)}}}}}; m.prototype.ll=function(){var d=this.m,c=d.u;if(d.C.width!=d.L.offsetWidth||d.C.height!=d.L.offsetHeight)d.C.width=d.L.offsetWidth,d.C.height=d.L.offsetHeight;d.Ge&&(d.dd(0),d.Sc());if(d.R){var a=d.R;this.uj();a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT);a.disable(a.DEPTH_TEST);a.disable(a.CULL_FACE);a.useProgram(this.Jg);var b=a.getUniformLocation(this.Jg,"uRect");a.uniform2f(a.getUniformLocation(this.Jg,"uCanvasDimensions"),d.C.width,d.C.height);a.activeTexture(a.TEXTURE0);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER, this.pd);var e=a.getAttribLocation(this.Jg,"aVertexPosition");a.disableVertexAttribArray(0);a.disableVertexAttribArray(1);a.disableVertexAttribArray(2);a.enableVertexAttribArray(e);a.bindBuffer(a.ARRAY_BUFFER,this.Ae);a.vertexAttribPointer(e,2,a.FLOAT,!1,0,0);d.Ec=0;var f=100/d.fov.j;var g=c.width/c.height;e=d.C.height*f*g;f*=d.C.height;g=(d.pan.j/100/g-.5)*e+d.C.width/2;for(var h=(d.v.j/100-.5)*f+d.C.height/2,l,k,w,r=0;c.levels.length>=r+2&&c.levels[r+1].width>e;)r++;var y;var z=[];for(y=c.levels.length- 1;y>=r;){var ha=c.levels[y];if(ha.cache){var ua={jb:0,Ib:0};ua.Kb=ha.T-1;ua.Lb=ha.ea-1}else{ua={};l=-h/f*(ha.height/d.u.O);k=(-g+d.C.width)/e*(ha.width/d.u.O);var id=(-h+d.C.height)/f*(ha.height/d.u.O);ua.jb=Math.min(Math.max(0,Math.floor(-g/e*(ha.width/d.u.O))),ha.T-1);ua.Ib=Math.min(Math.max(0,Math.floor(l)),ha.ea-1);ua.Kb=Math.min(Math.max(0,Math.floor(k)),ha.T-1);ua.Lb=Math.min(Math.max(0,Math.floor(id)),ha.ea-1)}z[y]=ua;var sh=!0;for(k=ua.Ib;k<=ua.Lb;k++)for(l=ua.jb;l<=ua.Kb;l++)w=l+k*ha.T,id= ha.aa[w],id||(id=new x.Wd,ha.aa[w]=id),this.ni()?id.u||(this.Mi(id,ha,d.pe(0,y,l,k)),d.Na=!0):this.m.Ec++,id.u&&id.u.complete||(sh=!1),id.visible=!0;ua.Ek=sh;y--}for(y=c.levels.length-1;y>=r;){ha=c.levels[y];if(z[y]&&0<=z[y].jb)for(ua=z[y],k=ua.Ib;k<=ua.Lb;k++)for(l=ua.jb;l<=ua.Kb;l++)w=l+k*ha.T,(id=ha.aa[w])&&id.u&&id.u.complete&&(d=g+(-c.Da+c.O*l)*e/ha.width,a.uniform4f(b,d,h+(-c.Da+c.O*k)*f/ha.height,id.u.width*e/ha.width,id.u.height*f/ha.height),id&&id.qb&&(a.bindBuffer(a.ELEMENT_ARRAY_BUFFER, this.pd),a.bindTexture(a.TEXTURE_2D,id.qb),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_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),a.drawElements(a.TRIANGLES,6,a.UNSIGNED_SHORT,0)));y--}this.Vk()}};m.prototype.Ue=function(){var d=this.m.R;if(d&&this.ib)for(;0<this.ib.length;){var c=this.ib.pop();c.Vq=!0;d.deleteTexture(c)}this.Jc&&(d.deleteTexture(this.Jc), this.Jc=null);this.sf=1E6;this.ji=[!1,!1,!1,!1,!1,!1]};return m}();x.Mo=p})(ggP2VR||(ggP2VR={})); (function(x){var p=function(){return function(){this.Uf={Lg:1,Mg:1,oh:0,ph:0,ng:0,Wh:0,scale:1};this.pb=!0;this.nf=[]}}(),m=function(){function d(){var c;this.faces=Array(6);for(c=0;6>c;c++)this.faces[c]=new p}d.prototype.kp=function(c,a,b,e){for(var f=0;6>f;f++){var g;if(g=this.faces[f]){var h=[];h.push(new x.Ga(-1,-1,-1,0,0));h.push(new x.Ga(1,-1,-1,1,0));h.push(new x.Ga(1,1,-1,1,1));h.push(new x.Ga(-1,1,-1,0,1));for(var l=0;l<h.length;l++)4>f?h[l].La(-Math.PI/2*f):h[l].Fa(Math.PI/2*(4===f?-1:1)), e&&(h[l].lb(e.U*Math.PI/180),h[l].Fa(-e.pitch*Math.PI/180)),h[l].La(-c*Math.PI/180),h[l].Fa(a*Math.PI/180),h[l].lb(b*Math.PI/180);g.pb=0<h.length}}};return d}();x.Jo=m})(ggP2VR||(ggP2VR={})); (function(x){x.Io=function(){return function(){this.levels=[];this.Wf="0x000000";this.un=!1;this.en=this.dn=.4;this.O=512;this.Da=1;this.Dk=0;this.Fk="";this.Dn=this.height=this.width=0}}();x.wl=function(){return function(){this.height=this.width=0;this.Se=this.cache=!1;this.ea=this.T=0;this.loaded=!1;this.aa=[]}}();x.Wd=function(){return function(){this.loaded=this.visible=!1;this.ke=this.Uk=0;this.ud=[];this.yi=0;this.Le=[];this.Hi=this.ih=this.Jd=0}}()})(ggP2VR||(ggP2VR={})); (function(x){x.Eo=function(){return function(p,m){this.m=p;this.Ca=m;var d=this.__div=document.createElement("div");d.ggVisible=!0;var c=document.createElement("img");if(m.Zc){var a=m.Zc;c.setAttribute("style","position: absolute;width: "+m.Be+"px; height: "+m.Gd+"px;top: -"+m.Gd/2+"px;left: -"+m.Be/2+"px; "+p.Pa+"user-select: none; max-width: none;")}else a="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", c.setAttribute("style","position: absolute;width: 28px; height: 28px;top: -14px;left: -14px; "+p.Pa+"user-select: none; max-width: none;");c.setAttribute("src",a);c.ondragstart=function(){return!1};d.appendChild(c);a="position:absolute;"+(p.Pa+"user-select: none;");a+=p.Pa+"touch-callout: none;";a+=p.Pa+"tap-highlight-color: rgba(0,0,0,0);";p.kc&&!p.ia&&(a+=p.Pa+"transform: translateZ(9999999px);");d.setAttribute("style",a);d.onclick=function(){p.ag(m);p.Mk(m.url,m.target);p.la&&p.la.hotspotProxyClick&& p.la.hotspotProxyClick(m.id,m.url)};d.ondblclick=function(){p.la&&p.la.hotspotProxyDoubleClick&&p.la.hotspotProxyDoubleClick(m.id,m.url)};var b=p.H.oj;if(b.enabled&&""!=m.title){var e=document.createElement("div");a="position:absolute;";a=m.Zc?a+("top:\t "+m.Gd/2+"px;"):a+"top:\t 20px;";a=b.Aj?a+"white-space: pre-wrap;":a+"white-space: nowrap;";a+=p.Pa+"transform-origin: 50% 50%;";e.setAttribute("style",a+"visibility: hidden;overflow: hidden;padding: 0px 1px 0px 1px;");e.style.color=this.m.fa(b.pj, b.nj);e.style.backgroundColor=b.background?this.m.fa(b.dc,b.cc):"transparent";e.style.border="solid "+this.m.fa(b.fc,b.ec)+" "+b.ei+"px";e.style.borderRadius=b.Jj+"px";e.style.textAlign="center";0<b.width?(e.style.left=-b.width/2+"px",e.style.width=b.width+"px"):e.style.width="auto";e.style.height=0<b.height?b.height+"px":"auto";e.style.overflow="hidden";e.innerHTML=m.title;e.classList.add("ggskin");e.classList.add("ggdefaulthotspot");d.onmouseover=function(){0==b.width&&(e.style.left=-e.offsetWidth/ 2+"px");e.style.visibility="inherit";p.la&&p.la.hotspotProxyOver&&p.la.hotspotProxyOver(m.id,m.url)};d.onmouseout=function(){e.style.visibility="hidden";p.la&&p.la.hotspotProxyOut&&p.la.hotspotProxyOut(m.id,m.url)};d.appendChild(e)}}}()})(ggP2VR||(ggP2VR={})); (function(x){x.Xc=function(){return function(){this.value=this.time=0;this.pl="";this.ze=this.ye=this.xe=this.we=this.sb=this.type=this.Eb=0;this.bi=""}}();x.tl=function(){return function(){this.As=this.Vo=this.length=0}}();x.sl=function(){return function(){}}()})(ggP2VR||(ggP2VR={})); (function(x){var p=function(){function m(d){this.m=d;this.enabled=!1;this.ug=1;this.mf=0;this.type="crossdissolve";this.uc=this.sa=this.Rc=0;this.Dj=20;this.Bj=90;this.Cj=20;this.ue=1;this.pg=!1;this.bf=this.af=this.el=0;this.Vd=70;this.Co=0;this.Gb=this.Bo=1;this.Zh=this.Yh=.5;this.ve=!1;this.Zj=1}m.prototype.$g=function(){var d=this.m.R,c=d.createShader(d.VERTEX_SHADER);d.shaderSource(c,"attribute vec3 aVertexPosition;\nattribute vec2 aTextureCoord;\nvarying vec2 vTextureCoord;\nuniform bool uZoomIn;\nuniform float uZoomFactor;\nuniform vec2 uZoomCenter;\nvoid main(void) {\n\t gl_Position = vec4(aVertexPosition, 1.0);\n\t if(!uZoomIn) {\n\t \n\t vTextureCoord = aTextureCoord;\n\t }\n\t else {\n\t vTextureCoord = (aTextureCoord - vec2(0.5, 0.5)) * (1.0/uZoomFactor) + uZoomCenter;\n\t }\n}\n"); d.compileShader(c);d.getShaderParameter(c,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(c)),c=null);var a=d.createShader(d.FRAGMENT_SHADER);d.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\nuniform float uAlpha;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, uAlpha);\n}\n"); d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.Aa=d.createProgram();d.attachShader(this.Aa,c);d.attachShader(this.Aa,a);d.linkProgram(this.Aa);d.getProgramParameter(this.Aa,d.LINK_STATUS)||alert("Could not initialise shaders");this.Aa.ja=d.getAttribLocation(this.Aa,"aVertexPosition");d.enableVertexAttribArray(this.Aa.ja);this.Aa.Ma=d.getAttribLocation(this.Aa,"aTextureCoord");d.enableVertexAttribArray(this.Aa.Ma);a=d.createShader(d.FRAGMENT_SHADER); d.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\nuniform float uColorPercent;\nuniform float uAlpha;\nuniform vec3 uDipColor;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n gl_FragColor = vec4(textureColor.x * (1.0 - uColorPercent) + uDipColor.x * uColorPercent, textureColor.y * (1.0 - uColorPercent) + uDipColor.y * uColorPercent, textureColor.z * (1.0 - uColorPercent) + uDipColor.z * uColorPercent, uAlpha);\n}\n"); d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.fb=d.createProgram();d.attachShader(this.fb,c);d.attachShader(this.fb,a);d.linkProgram(this.fb);d.getProgramParameter(this.fb,d.LINK_STATUS)||alert("Could not initialise shaders");this.fb.ja=d.getAttribLocation(this.fb,"aVertexPosition");d.enableVertexAttribArray(this.fb.ja);this.fb.Ma=d.getAttribLocation(this.fb,"aTextureCoord");d.enableVertexAttribArray(this.fb.Ma);a=d.createShader(d.FRAGMENT_SHADER); d.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\nuniform bool uRound;\nuniform float uRadius;\nuniform vec2 uRectDim;\nuniform vec2 uIrisCenter;\nuniform float uSoftEdge;\nuniform sampler2D uSampler;\nvoid main(void) {\n float alpha = 0.0;\n vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n if (uRound) {\n\t vec2 diff = uIrisCenter - gl_FragCoord.xy;\n\t float distFromCenter = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n\t if (distFromCenter > 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"); d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.Ua=d.createProgram();d.attachShader(this.Ua,c);d.attachShader(this.Ua,a);d.linkProgram(this.Ua);d.getProgramParameter(this.Ua,d.LINK_STATUS)||alert("Could not initialise shaders");this.Ua.ja=d.getAttribLocation(this.Ua,"aVertexPosition");d.enableVertexAttribArray(this.Ua.ja);this.Ua.Ma=d.getAttribLocation(this.Ua,"aTextureCoord");d.enableVertexAttribArray(this.Ua.Ma);a=d.createShader(d.FRAGMENT_SHADER); d.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"); d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.Za=d.createProgram();d.attachShader(this.Za,c);d.attachShader(this.Za,a);d.linkProgram(this.Za);d.getProgramParameter(this.Za,d.LINK_STATUS)||alert("Could not initialise shaders");this.Za.ja=d.getAttribLocation(this.Za,"aVertexPosition");d.enableVertexAttribArray(this.Za.ja);this.Za.Ma=d.getAttribLocation(this.Za,"aTextureCoord");d.enableVertexAttribArray(this.Za.Ma)};m.prototype.dd=function(){var d= this.m.R;if(!d)return!1;if(this.tc=d.createFramebuffer()){d.bindFramebuffer(d.FRAMEBUFFER,this.tc);this.tc.width=1024;this.tc.height=1024;this.df=d.createTexture();d.bindTexture(d.TEXTURE_2D,this.df);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.LINEAR);d.texImage2D(d.TEXTURE_2D,0,d.RGBA,this.tc.width,this.tc.height,0,d.RGBA,d.UNSIGNED_BYTE,null);var c=d.createRenderbuffer();d.bindRenderbuffer(d.RENDERBUFFER,c);d.renderbufferStorage(d.RENDERBUFFER, d.DEPTH_COMPONENT16,this.tc.width,this.tc.height);d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_2D,this.df,0);d.framebufferRenderbuffer(d.FRAMEBUFFER,d.DEPTH_ATTACHMENT,d.RENDERBUFFER,c);d.bindTexture(d.TEXTURE_2D,null);d.bindRenderbuffer(d.RENDERBUFFER,null);d.bindFramebuffer(d.FRAMEBUFFER,null);this.rb=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,this.rb);d.bufferData(d.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,-1,0,-1,1,0,1,1,0]),d.STATIC_DRAW);this.rb.itemSize=3;this.rb.ge= 4;this.Xf=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,this.Xf);d.bufferData(d.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),d.STATIC_DRAW);return!0}return!1};m.prototype.rn=function(d){var c=this.m.R,a=this.m.yb;if(this.Bd){c.useProgram(this.Aa);c.bindBuffer(c.ARRAY_BUFFER,this.rb);c.vertexAttribPointer(this.Aa.ja,this.rb.itemSize,c.FLOAT,!1,0,0);c.bindBuffer(c.ARRAY_BUFFER,this.Xf);c.vertexAttribPointer(this.Aa.Ma,2,c.FLOAT,!1,0,0);c.enableVertexAttribArray(this.Aa.ja);c.enableVertexAttribArray(this.Aa.Ma); c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_2D,this.df);a=1+(this.Gb-1)*d;var b=c.getUniformLocation(this.Aa,"uAlpha");c.uniform1f(b,1);b=c.getUniformLocation(this.Aa,"uZoomIn");c.uniform1i(b,1);b=c.getUniformLocation(this.Aa,"uZoomCenter");var e=.5+(this.Yh-.5)*Math.sqrt(d),f=.5+(this.Zh-.5)*Math.sqrt(d);0>e-.5/a&&(e=.5/a);0>f-.5/a&&(f=.5/a);1<e+.5/a&&(e=1-.5/a);1<f+.5/a&&(f=1-.5/a);c.uniform2f(b,e,f);e=c.getUniformLocation(this.Aa,"uZoomFactor");c.uniform1f(e,a);c.uniform1i(c.getUniformLocation(this.Aa, "uSampler"),0);c.drawArrays(c.TRIANGLE_STRIP,0,this.rb.ge);c.useProgram(this.m.za.P)}else{this.m.Qh();c.blendFuncSeparate(c.SRC_ALPHA,c.ONE_MINUS_SRC_ALPHA,c.SRC_ALPHA,c.ONE);c.enable(c.BLEND);c.disable(c.DEPTH_TEST);e=.5+(this.Yh-.5);f=.5+(this.Zh-.5);0>e-.5/this.Gb&&(e=.5/this.Gb);0>f-.5/this.Gb&&(f=.5/this.Gb);1<e+.5/this.Gb&&(e=1-.5/this.Gb);1<f+.5/this.Gb&&(f=1-.5/this.Gb);if("crossdissolve"==this.type)c.useProgram(this.Aa),c.bindBuffer(c.ARRAY_BUFFER,this.rb),c.vertexAttribPointer(this.Aa.ja, this.rb.itemSize,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.Xf),c.vertexAttribPointer(this.Aa.Ma,2,c.FLOAT,!1,0,0),c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,this.df),b=c.getUniformLocation(this.Aa,"uAlpha"),c.uniform1f(b,1-d),b=c.getUniformLocation(this.Aa,"uZoomIn"),c.uniform1i(b,1==this.sa||2==this.sa||6==this.sa?1:0),b=c.getUniformLocation(this.Aa,"uZoomCenter"),c.uniform2f(b,e,f),e=c.getUniformLocation(this.Aa,"uZoomFactor"),c.uniform1f(e,this.Gb),c.uniform1i(c.getUniformLocation(this.Aa, "uSampler"),0);else if("diptocolor"==this.type)c.useProgram(this.fb),c.bindBuffer(c.ARRAY_BUFFER,this.rb),c.vertexAttribPointer(this.fb.ja,this.rb.itemSize,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.Xf),c.vertexAttribPointer(this.fb.Ma,2,c.FLOAT,!1,0,0),c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,this.df),c.uniform1f(c.getUniformLocation(this.fb,"uColorPercent"),Math.min(2*d,1)),b=c.getUniformLocation(this.fb,"uAlpha"),c.uniform1f(b,1-Math.max(2*(d-.5),0)),c.uniform3f(c.getUniformLocation(this.fb, "uDipColor"),(this.mf>>16&255)/255,(this.mf>>8&255)/255,(this.mf&255)/255),b=c.getUniformLocation(this.fb,"uZoomIn"),c.uniform1i(b,1==this.sa||2==this.sa||6==this.sa?1:0),b=c.getUniformLocation(this.fb,"uZoomCenter"),c.uniform2f(b,e,f),e=c.getUniformLocation(this.fb,"uZoomFactor"),c.uniform1f(e,this.Gb),c.uniform1i(c.getUniformLocation(this.fb,"uSampler"),0);else if("irisround"==this.type||"irisroundcenter"==this.type||"irisrectangular"==this.type||"irisrectangularcenter"==this.type){c.useProgram(this.Ua); c.bindBuffer(c.ARRAY_BUFFER,this.rb);c.vertexAttribPointer(this.Ua.ja,this.rb.itemSize,c.FLOAT,!1,0,0);c.bindBuffer(c.ARRAY_BUFFER,this.Xf);c.vertexAttribPointer(this.Ua.Ma,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_2D,this.df);if(1==this.sa||2==this.sa||6==this.sa||"irisroundcenter"==this.type||"irisrectangularcenter"==this.type)var g=b=.5;else b=this.Yh,g=this.Zh;var h=b*a.width,l=g*a.height;h=Math.max(h,a.width-h);l=Math.max(l,a.height-l);"irisround"==this.type||"irisroundcenter"== this.type?c.uniform1f(c.getUniformLocation(this.Ua,"uRadius"),(Math.sqrt(h*h+l*l)+this.Rc)*d):(h>l?(l=a.height/a.width*h+this.Rc,h+=this.Rc):(h=a.width/a.height*l+this.Rc,l+=this.Rc),c.uniform2f(c.getUniformLocation(this.Ua,"uRectDim"),h*d,l*d));d=c.getUniformLocation(this.Ua,"uSoftEdge");c.uniform1f(d,this.Rc);c.uniform1i(c.getUniformLocation(this.Ua,"uRound"),"irisround"==this.type||"irisroundcenter"==this.type?1:0);c.uniform2f(c.getUniformLocation(this.Ua,"uIrisCenter"),b*a.width,g*a.height);b= c.getUniformLocation(this.Ua,"uZoomIn");c.uniform1i(b,1==this.sa||2==this.sa||6==this.sa?1:0);b=c.getUniformLocation(this.Ua,"uZoomCenter");c.uniform2f(b,e,f);e=c.getUniformLocation(this.Ua,"uZoomFactor");c.uniform1f(e,this.Gb);c.uniform1i(c.getUniformLocation(this.Ua,"uSampler"),0)}else if("wipeleftright"==this.type||"wiperightleft"==this.type||"wipetopbottom"==this.type||"wipebottomtop"==this.type||"wiperandom"==this.type)c.useProgram(this.Za),c.bindBuffer(c.ARRAY_BUFFER,this.rb),c.vertexAttribPointer(this.Za.ja, this.rb.itemSize,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.Xf),c.vertexAttribPointer(this.Za.Ma,2,c.FLOAT,!1,0,0),c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,this.df),c.uniform1f(c.getUniformLocation(this.Za,"uPercent"),3>this.Zj?d*(a.width+this.Rc):d*(a.height+this.Rc)),d=c.getUniformLocation(this.Za,"uSoftEdge"),c.uniform1f(d,this.Rc),c.uniform1i(c.getUniformLocation(this.Za,"uDirection"),this.Zj),c.uniform2f(c.getUniformLocation(this.Za,"uCanvasDimensions"),a.width,a.height), b=c.getUniformLocation(this.Za,"uZoomIn"),c.uniform1i(b,1==this.sa||2==this.sa||6==this.sa?1:0),b=c.getUniformLocation(this.Za,"uZoomCenter"),c.uniform2f(b,e,f),e=c.getUniformLocation(this.Za,"uZoomFactor"),c.uniform1f(e,this.Gb),c.uniform1i(c.getUniformLocation(this.Za,"uSampler"),0);c.drawArrays(c.TRIANGLE_STRIP,0,this.rb.ge);c.useProgram(this.m.za.P);c.disable(c.BLEND);c.enable(c.DEPTH_TEST)}};return m}();x.Go=p})(ggP2VR||(ggP2VR={})); (function(x){var p=function(){function m(d){this.Oh=[];this.m=d;this.enabled=!1;this.Eb=2;this.ii=!1}m.prototype.bm=function(d){if(2==d.mode||3==d.mode||5==d.mode){var c=this.m.ua.currentTime;if(d.Jb&&d.Jb.gain&&d.Ub&&d.Sb&&d.Tb){var a=d.Ub.gain.value,b=d.Sb.gain.value,e=d.Tb.gain.value;d.Jb.gain.linearRampToValueAtTime(d.Jb.gain.value,c);d.Jb.gain.linearRampToValueAtTime(0,c+this.Eb);d.Ub.gain.linearRampToValueAtTime(a,c);d.Ub.gain.linearRampToValueAtTime(0,c+this.Eb);d.Sb.gain.linearRampToValueAtTime(b, c);d.Sb.gain.linearRampToValueAtTime(0,c+this.Eb);d.Tb.gain.linearRampToValueAtTime(e,c);d.Tb.gain.linearRampToValueAtTime(0,c+this.Eb)}}else c=this.m.ua.currentTime,d.Rb&&d.Rb.gain&&(d.Rb.gain.linearRampToValueAtTime(d.Rb.gain.value,c),d.Rb.gain.linearRampToValueAtTime(0,c+this.Eb));d.oi=!0;setTimeout(function(){d.Te()},1E3*this.Eb+5)};m.prototype.ns=function(){for(var d=0;d<this.m.X.length;d++){var c=this.m.X[d];-1==this.m.Td.indexOf(c.id)&&(-1==this.m.Td.indexOf("_main")||-1!=this.m.ef.indexOf(c.id))&& !this.m.isPlaying(c.id)&&-1<c.loop&&4!=c.mode&&6!=c.mode&&(c.xa?c.Fd():(c.Dd&&c.qg(),c.f.play(),c.f.currentTime=0))}};m.prototype.wp=function(){var d=(this.m.ua.currentTime-this.js)/this.Eb;d=Math.min(1,d);for(var c=0;c<this.m.X.length;c++){var a=this.m.X[c];this.m.isPlaying(a.id)&&1>a.pa&&(a.pa=d)}1==d&&clearInterval(this.hs)};return m}();x.Ho=p})(ggP2VR||(ggP2VR={})); (function(x){var p=function(){function m(d){this.mh=[];this.md=null;this.rc=[];this.ic=[];this.sc=[];this.al=!0;this.m=d;this.np()}m.prototype.$g=function(){var d=this.m.R,c=d.createShader(d.VERTEX_SHADER);d.shaderSource(c,"attribute vec3 aVertexPosition;\nvoid main(void) {\n gl_Position = vec4(aVertexPosition, 1.0);\n}\n");d.compileShader(c);d.getShaderParameter(c,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(c)),c=null);var a=d.createShader(d.FRAGMENT_SHADER);d.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"); d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.wc=d.createProgram();d.attachShader(this.wc,c);d.attachShader(this.wc,a);d.linkProgram(this.wc);d.getProgramParameter(this.wc,d.LINK_STATUS)||alert("Could not initialise shaders");this.wc.ja=d.getAttribLocation(this.wc,"aVertexPosition");d.enableVertexAttribArray(this.wc.ja);a=d.createShader(d.VERTEX_SHADER);c=d.createShader(d.VERTEX_SHADER);d.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"); d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);d.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"); d.compileShader(c);d.getShaderParameter(c,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(c)),a=null);var b=d.createShader(d.FRAGMENT_SHADER);d.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"); d.compileShader(b);d.getShaderParameter(b,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(b)),b=null);this.Ba=d.createProgram();d.attachShader(this.Ba,a);d.attachShader(this.Ba,b);d.linkProgram(this.Ba);d.getProgramParameter(this.Ba,d.LINK_STATUS)||alert("Could not initialise shaders");this.Ba.ja=d.getAttribLocation(this.Ba,"aVertexPosition");d.enableVertexAttribArray(this.Ba.ja);a=d.createShader(d.FRAGMENT_SHADER);d.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"); d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.Db=d.createProgram();d.attachShader(this.Db,c);d.attachShader(this.Db,a);d.linkProgram(this.Db);d.getProgramParameter(this.Db,d.LINK_STATUS)||alert("Could not initialise shaders");this.Db.ja=d.getAttribLocation(this.Db,"aVertexPosition")};m.prototype.dd=function(){var d=this.m.R;this.Id=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,this.Id);d.bufferData(d.ARRAY_BUFFER,new Float32Array([-1,-1,0,1, -1,0,1,1,0,-1,1,0]),d.STATIC_DRAW);this.Id.itemSize=3;this.Id.ge=4;this.zf=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,this.zf);for(var c=[0,0,0],a=2*Math.PI/6,b=Math.PI/180*35,e=1,f=b;f<=b+2*Math.PI;f+=a)c.push(Math.sin(f)),c.push(-Math.cos(f)),c.push(0),e++;d.bufferData(d.ARRAY_BUFFER,new Float32Array(c),d.STATIC_DRAW);this.zf.itemSize=3;this.zf.ge=e;this.Fn=d.createTexture();d.bindTexture(d.TEXTURE_2D,this.Fn);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR);d.texParameteri(d.TEXTURE_2D, d.TEXTURE_MAG_FILTER,d.LINEAR);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE);c=document.createElement("canvas");c.width=100;c.height=1;a=c.getContext("2d");a.width=100;a.height=1;b=a.createLinearGradient(0,0,100,0);b.addColorStop(0,this.m.fa(0,0));b.addColorStop(.88,this.m.fa(0,0));b.addColorStop(.9,this.m.fa(16654848,1));b.addColorStop(.92,this.m.fa(16776448,1));b.addColorStop(.94,this.m.fa(4849466,1));b.addColorStop(.96, this.m.fa(131071,1));b.addColorStop(.98,this.m.fa(8190,1));b.addColorStop(1,this.m.fa(0,0));a.fillStyle=b;a.fillRect(0,0,100,1);d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,d.UNSIGNED_BYTE,c)};m.prototype.ur=function(){for(;0<this.mh.length;)this.mh.pop()};m.prototype.np=function(){var d=[],c=[],a=[];var b={radius:14,alpha:.2,color:11390415,A:.27};d.push(b);b={radius:20,alpha:.25,color:11390415,A:.4};d.push(b);b={radius:10,alpha:.2,color:12442332,A:.6};d.push(b);b={radius:15,alpha:.2,color:11390415, A:.8};d.push(b);b={radius:10,alpha:.2,color:12442332,A:1.5};d.push(b);b={radius:15,alpha:.2,color:11390415,A:1.8};d.push(b);b={radius:8,alpha:.2,color:12575203,G:.8,A:.7};c.push(b);b={radius:7,alpha:.4,color:12575203,G:.5,A:1.6};c.push(b);b={radius:5,alpha:.4,color:12575203,G:.6,A:.9};c.push(b);b={radius:8,alpha:.3,color:12575203,G:.4,A:1.1};c.push(b);this.rc.push(d);this.ic.push(c);this.sc.push(a);d=[];c=[];a=[];b={radius:30,alpha:.3,color:11390415,A:.5};d.push(b);b={radius:10,alpha:.3,color:11390415, A:1};d.push(b);b={radius:20,alpha:.3,color:11390415,A:1.3};d.push(b);b={radius:10,alpha:.3,color:11390415,A:1.5};d.push(b);b={radius:15,alpha:.3,color:11390415,A:1.8};d.push(b);b={radius:10,alpha:.3,color:15506856,G:.8,A:.7};c.push(b);b={radius:20,alpha:.5,color:15506856,G:.5,A:1.6};c.push(b);b={radius:5,alpha:.5,color:15506856,G:.6,A:.9};c.push(b);b={radius:60,alpha:.4,color:15506856,G:.2,A:1.1};c.push(b);a.push({radius:220,alpha:.035,A:2});this.rc.push(d);this.ic.push(c);this.sc.push(a);d=[];c= [];a=[];b={radius:30,alpha:.5,color:15465727,A:.5};d.push(b);b={radius:40,alpha:.28,color:15726842,A:.8};d.push(b);b={radius:25,alpha:.32,color:15726842,A:1.1};d.push(b);b={radius:15,alpha:.25,color:15726842,A:1.35};d.push(b);b={radius:10,alpha:.28,color:15465727,A:1.65};d.push(b);b={radius:10,alpha:.45,color:15465727,G:.8,A:.7};c.push(b);b={radius:7,alpha:.5,color:15465727,G:.4,A:.9};c.push(b);b={radius:40,alpha:.4,color:15465727,G:.3,A:.38};c.push(b);b={radius:50,alpha:.4,color:15465727,G:.5,A:1.25}; c.push(b);b={radius:18,alpha:.2,color:15465727,G:.5,A:1.25};c.push(b);b={radius:10,alpha:.34,color:15726842,G:.8,A:1.5};c.push(b);b={radius:38,alpha:.37,color:15465727,G:.3,A:-.5};c.push(b);this.rc.push(d);this.ic.push(c);this.sc.push(a);d=[];c=[];a=[];b={radius:16,alpha:.5,color:16363159,A:.1};d.push(b);b={radius:26,alpha:.3,color:16091819,A:.32};d.push(b);b={radius:29,alpha:.2,color:16091819,A:1.32};d.push(b);b={radius:20,alpha:.18,color:16363159,A:1.53};d.push(b);b={radius:27,alpha:.13,color:16425092, A:1.6};d.push(b);b={radius:20,alpha:.1,color:16091819,A:1.75};d.push(b);b={radius:12,alpha:.45,color:16312238,G:.45,A:.2};c.push(b);b={radius:8,alpha:.25,color:16434209,G:.7,A:.33};c.push(b);b={radius:9,alpha:.25,color:16091819,G:.4,A:.7};c.push(b);b={radius:7,alpha:.2,color:16091819,G:.4,A:.85};c.push(b);b={radius:60,alpha:.23,color:16091819,G:.55,A:1.05};c.push(b);b={radius:37,alpha:.1,color:16091819,G:.55,A:1.22};c.push(b);b={radius:10,alpha:.25,color:16363159,G:.65,A:1.38};c.push(b);b={radius:7, alpha:.2,color:16434209,G:.5,A:1.45};c.push(b);b={radius:3,alpha:.2,color:16416033,G:.5,A:1.78};c.push(b);b={radius:6,alpha:.18,color:16434209,G:.45,A:1.9};c.push(b);b={radius:4,alpha:.14,color:16766514,G:.45,A:2.04};c.push(b);b={radius:30,alpha:.14,color:16766514,G:.8,A:.04};c.push(b);this.rc.push(d);this.ic.push(c);this.sc.push(a);d=[];c=[];a=[];b={radius:9,alpha:.3,color:14346999,G:.3,A:.3};c.push(b);b={radius:5,alpha:.5,color:14148072,G:.8,A:.6};c.push(b);b={radius:3,alpha:.37,color:14346999, G:.66,A:.8};c.push(b);b={radius:45,alpha:.2,color:14346999,G:.36,A:1.2};c.push(b);b={radius:13,alpha:.2,color:14346999,G:.36,A:1.23};c.push(b);b={radius:11,alpha:.2,color:14148072,G:.36,A:1.28};c.push(b);b={radius:27,alpha:.16,color:14346999,G:.36,A:1.55};c.push(b);b={radius:6,alpha:.36,color:14148072,G:.8,A:1.7};c.push(b);this.rc.push(d);this.ic.push(c);this.sc.push(a);d=[];c=[];a=[];b={radius:24,alpha:.2,color:15186464,A:.2};d.push(b);b={radius:7,alpha:.26,color:15186464,A:.35};d.push(b);b={radius:23, alpha:.18,color:15186464,A:.65};d.push(b);b={radius:13,alpha:.2,color:15186464,A:.8};d.push(b);b={radius:11,alpha:.15,color:15186464,A:1.4};d.push(b);b={radius:15,alpha:.11,color:15451904,A:1.6};d.push(b);b={radius:6,alpha:.45,color:15579138,G:.45,A:.22};c.push(b);b={radius:3,alpha:.3,color:15451904,G:.25,A:.4};c.push(b);b={radius:4,alpha:.2,color:15451904,G:.25,A:.45};c.push(b);b={radius:65,alpha:.17,color:15186464,G:.25,A:.5};c.push(b);b={radius:5,alpha:.45,color:15579138,G:.45,A:.88};c.push(b); b={radius:140,alpha:.18,color:15579138,G:.32,A:.95};c.push(b);b={radius:12,alpha:.22,color:15579138,G:.32,A:1.1};c.push(b);b={radius:8,alpha:.32,color:15451904,G:.72,A:1.2};c.push(b);b={radius:55,alpha:.2,color:15451904,G:.45,A:1.33};c.push(b);b={radius:4,alpha:.3,color:15451904,G:.25,A:1.42};c.push(b);this.rc.push(d);this.ic.push(c);this.sc.push(a);d=[];c=[];a=[];b={radius:16,alpha:.4,color:10933495,A:.32};d.push(b);b={radius:14,alpha:.3,color:11007484,A:.36};d.push(b);b={radius:10,alpha:.3,color:4037331, A:.58};d.push(b);b={radius:14,alpha:.22,color:8835068,A:.68};d.push(b);b={radius:10,alpha:.27,color:11007484,A:.82};d.push(b);b={radius:11,alpha:.27,color:10867450,A:1};d.push(b);b={radius:9,alpha:.2,color:6158332,A:1.05};d.push(b);b={radius:10,alpha:.17,color:10867450,A:1.78};d.push(b);b={radius:10,alpha:.3,color:4037331,A:-.23};d.push(b);b={radius:8,alpha:.45,color:8835068,G:.45,A:.175};c.push(b);b={radius:7,alpha:.4,color:12574715,G:.55,A:.46};c.push(b);b={radius:3,alpha:.3,color:10867450,G:.35, A:.5};c.push(b);b={radius:60,alpha:.37,color:4031699,G:.75,A:.75};c.push(b);b={radius:3,alpha:.25,color:4031699,G:.25,A:.75};c.push(b);b={radius:3,alpha:.2,color:6158332,G:.25,A:.9};c.push(b);b={radius:7,alpha:.45,color:8835068,G:.45,A:1.3};c.push(b);b={radius:32,alpha:.22,color:8835068,G:.75,A:1.62};c.push(b);b={radius:9,alpha:.45,color:4031699,G:.65,A:1.6};c.push(b);b={radius:8,alpha:.25,color:4031699,G:.65,A:1.83};c.push(b);b={radius:7,alpha:.4,color:12574715,G:.55,A:-.18};c.push(b);this.rc.push(d); this.ic.push(c);this.sc.push(a);d=[];c=[];a=[];b={radius:16,alpha:.4,color:16389120,A:.32};d.push(b);b={radius:26,alpha:.22,color:16389120,A:.4};d.push(b);b={radius:26,alpha:.25,color:16389120,A:.65};d.push(b);b={radius:18,alpha:.3,color:16389120,A:1.23};d.push(b);b={radius:14,alpha:.26,color:16389120,A:1.33};d.push(b);b={radius:17,alpha:.18,color:16389120,A:1.7};d.push(b);b={radius:30,alpha:.16,color:16389120,A:2.15};d.push(b);b={radius:100,alpha:.25,color:16389120,G:.22,A:1.45};c.push(b);b={radius:7, alpha:.5,color:15628151,G:.3,A:1.5};c.push(b);b={radius:3,alpha:.5,color:15628151,G:.3,A:1.52};c.push(b);b={radius:4,alpha:.5,color:16389120,G:.3,A:1.745};c.push(b);b={radius:9,alpha:.22,color:16389120,G:.3,A:1.8};c.push(b);this.rc.push(d);this.ic.push(c);this.sc.push(a);d=[];c=[];a=[];b={radius:16,alpha:.4,color:10933495,A:.32};d.push(b);b={radius:14,alpha:.3,color:11007484,A:.36};d.push(b);b={radius:10,alpha:.3,color:4037331,A:.58};d.push(b);b={radius:14,alpha:.22,color:8835068,A:.68};d.push(b); b={radius:10,alpha:.27,color:11007484,A:.82};d.push(b);b={radius:11,alpha:.27,color:10867450,A:1};d.push(b);b={radius:9,alpha:.2,color:6158332,A:1.05};d.push(b);b={radius:10,alpha:.17,color:10867450,A:1.78};d.push(b);b={radius:10,alpha:.3,color:4037331,A:-.23};d.push(b);b={radius:8,alpha:.45,color:8835068,G:.45,A:.175};c.push(b);b={radius:7,alpha:.4,color:12574715,G:.55,A:.46};c.push(b);b={radius:3,alpha:.3,color:10867450,G:.35,A:.5};c.push(b);b={radius:60,alpha:.37,color:4031699,G:.75,A:.75};c.push(b); b={radius:3,alpha:.25,color:4031699,G:.25,A:.75};c.push(b);b={radius:3,alpha:.2,color:6158332,G:.25,A:.9};c.push(b);b={radius:7,alpha:.45,color:8835068,G:.45,A:1.3};c.push(b);b={radius:32,alpha:.22,color:8835068,G:.75,A:1.62};c.push(b);b={radius:9,alpha:.45,color:4031699,G:.65,A:1.6};c.push(b);b={radius:8,alpha:.25,color:4031699,G:.65,A:1.83};c.push(b);b={radius:7,alpha:.4,color:12574715,G:.55,A:-.18};c.push(b);this.rc.push(d);this.ic.push(c);this.sc.push(a);d=[];c=[];a=[];b={radius:16,alpha:.4,color:16389120, A:.32};d.push(b);b={radius:26,alpha:.22,color:16389120,A:.4};d.push(b);b={radius:26,alpha:.25,color:16389120,A:.65};d.push(b);b={radius:18,alpha:.3,color:16389120,A:1.23};d.push(b);b={radius:14,alpha:.26,color:16389120,A:1.33};d.push(b);b={radius:17,alpha:.18,color:16389120,A:1.7};d.push(b);b={radius:30,alpha:.16,color:16389120,A:2.15};d.push(b);b={radius:100,alpha:.25,color:16389120,G:.22,A:1.45};c.push(b);b={radius:7,alpha:.5,color:15628151,G:.3,A:1.5};c.push(b);b={radius:3,alpha:.5,color:15628151, G:.3,A:1.52};c.push(b);b={radius:4,alpha:.5,color:16389120,G:.3,A:1.745};c.push(b);b={radius:9,alpha:.22,color:16389120,G:.3,A:1.8};c.push(b);this.rc.push(d);this.ic.push(c);this.sc.push(a);d=[];c=[];a=[];b={radius:24,alpha:.2,color:15186464,A:.2};d.push(b);b={radius:7,alpha:.26,color:15186464,A:.35};d.push(b);b={radius:23,alpha:.18,color:15186464,A:.65};d.push(b);b={radius:13,alpha:.2,color:15186464,A:.8};d.push(b);b={radius:11,alpha:.15,color:15186464,A:1.4};d.push(b);b={radius:15,alpha:.11,color:15451904, A:1.6};d.push(b);b={radius:6,alpha:.45,color:15579138,G:.45,A:.22};c.push(b);b={radius:3,alpha:.3,color:15451904,G:.25,A:.4};c.push(b);b={radius:4,alpha:.2,color:15451904,G:.25,A:.45};c.push(b);b={radius:65,alpha:.17,color:15186464,G:.25,A:.5};c.push(b);b={radius:5,alpha:.45,color:15579138,G:.45,A:.88};c.push(b);b={radius:140,alpha:.18,color:15579138,G:.32,A:.95};c.push(b);b={radius:12,alpha:.22,color:15579138,G:.32,A:1.1};c.push(b);b={radius:8,alpha:.32,color:15451904,G:.72,A:1.2};c.push(b);b={radius:55, alpha:.2,color:15451904,G:.45,A:1.33};c.push(b);b={radius:4,alpha:.3,color:15451904,G:.25,A:1.42};c.push(b);this.rc.push(d);this.ic.push(c);this.sc.push(a)};m.prototype.fr=function(){if(this.al){var d=this.m.R,c,a=new x.Ga(0,0,-100),b=this.m.sd(),e=0,f=0,g=!1;if(this.m.ia){var h=this.m.yb.width;var l=this.m.yb.height;this.m.J.Nh&&(h=this.m.J.tc.width,l=this.m.J.tc.height)}else{this.Z||(this.Z=this.md.getContext("2d"));if(this.Z.width!==this.m.C.width||this.Z.height!==this.m.C.height)this.Z.width= this.m.C.width,this.Z.height=this.m.C.height;this.Z.clear?this.Z.clear():this.Z.clearRect(0,0,this.md.width,this.md.height);h=this.Z.width;l=this.Z.height}var k=Math.sqrt(h*h+l*l),w=k/800;for(c=0;c<this.mh.length;c++){var r=this.mh[c];a.init(0,0,-100);a.Fa(-r.v*Math.PI/180);a.La(r.pan*Math.PI/180);a.La(-this.m.pan.j*Math.PI/180);a.Fa(this.m.v.j*Math.PI/180);a.lb(this.m.U.j*Math.PI/180);if(-.01>a.z){f=-b/a.z;e=a.x*f;f*=a.y;var y=Math.max(h,l);Math.abs(e)<y/2+100&&Math.abs(f)<y/2+100&&(g=!0,e+=h/2, f+=l/2)}if(g){this.m.ia&&(d.blendFunc(d.SRC_ALPHA,d.ONE),d.enable(d.BLEND),d.disable(d.DEPTH_TEST));y=h/2;var z=l/2;var ha=Math.sqrt((y-e)*(y-e)+(z-f)*(z-f));var ua=k/2;z=h>l?h:l;y=r.Hl/100*((ua-ha)/ua);0>y&&(y=0);if(this.m.ia){d.useProgram(this.wc);d.bindBuffer(d.ARRAY_BUFFER,this.m.J.rb);d.vertexAttribPointer(this.wc.ja,this.m.J.rb.itemSize,d.FLOAT,!1,0,0);var id=d.getUniformLocation(this.wc,"uCanvasDimensions");d.uniform2f(id,d.drawingBufferWidth,d.drawingBufferHeight);d.uniform2f(d.getUniformLocation(this.wc, "uFlareCenterPosition"),d.drawingBufferWidth/h*e,l-d.drawingBufferHeight/l*f);d.uniform1f(d.getUniformLocation(this.wc,"uBlindingValue"),y);id=d.getUniformLocation(this.wc,"uAspectRatio");d.uniform1f(id,this.m.J.Nh?d.drawingBufferWidth/d.drawingBufferHeight:d.drawingBufferWidth/d.drawingBufferHeight/(h/l));d.drawArrays(d.TRIANGLE_STRIP,0,this.m.J.rb.ge)}else id=this.Z.createRadialGradient(e,f,1,e,f,z),id.addColorStop(0,"rgba(255, 255, 255, "+y+")"),id.addColorStop(.5,"rgba(255, 255, 255, "+.8*y+")"), id.addColorStop(1,"rgba(255, 255, 255, "+.6*y+")"),this.Z.fillStyle=id,this.Z.fillRect(0,0,this.Z.width,this.Z.height);if(0!=Number(r.type)&&!this.m.J.Nh){y=h/2-e;z=l/2-f;var sh=1,db=Number(r.type)-1;ha<.35*ua&&(sh=ha/(.35*ua),sh*=sh);ha>.7*ua&&(sh=(ua-ha)/(.3*ua));sh*=r.alpha/100;if(0<this.rc[db].length)for(ha=0;ha<this.rc[db].length;ha++){var gl=this.rc[db][ha];ua=gl.radius*w;var tf=gl.alpha*sh;0>tf&&(tf=0);var hl=gl.color;if(8==db||9==db||10==db)hl=r.color;if(this.m.ia)d.useProgram(this.Ba),d.bindBuffer(d.ARRAY_BUFFER, this.zf),d.vertexAttribPointer(this.Ba.ja,this.zf.itemSize,d.FLOAT,!1,0,0),id=d.getUniformLocation(this.Ba,"uCanvasDimensions2"),d.uniform2f(id,d.drawingBufferWidth,d.drawingBufferHeight),d.uniform2f(d.getUniformLocation(this.Ba,"uCirclePosition"),d.drawingBufferWidth/h*(e+y*gl.A),d.drawingBufferWidth/h*(l-(f+z*gl.A))),d.uniform2f(d.getUniformLocation(this.Ba,"uCircleTexturePosition"),d.drawingBufferWidth/h*(e+y*gl.A),l-(f+z*gl.A)),d.uniform1f(d.getUniformLocation(this.Ba,"uCircleRadius"),ua),d.uniform3f(d.getUniformLocation(this.Ba, "uCircleColor"),(hl>>16&255)/255,(hl>>8&255)/255,(hl&255)/255),d.uniform1f(d.getUniformLocation(this.Ba,"uCircleAlpha"),tf),d.uniform1f(d.getUniformLocation(this.Ba,"uCircleSoftness"),.1),id=d.getUniformLocation(this.Ba,"uAspectRatio"),d.uniform1f(id,d.drawingBufferWidth/d.drawingBufferHeight/(h/l)),d.drawArrays(d.TRIANGLE_FAN,0,this.zf.ge);else{this.Z.save();this.Z.translate(e+y*gl.A,f+z*gl.A);id=this.Z.createRadialGradient(0,0,1,0,0,1.1*ua);id.addColorStop(0,this.m.fa(hl,tf));id.addColorStop(.65, this.m.fa(hl,.9*tf));id.addColorStop(.8,this.m.fa(hl,.7*tf));id.addColorStop(1,this.m.fa(hl,.2*tf));this.Z.beginPath();hl=2*Math.PI/6;gl=Math.PI/180*35;var il=!0;for(tf=gl;tf<=gl+2*Math.PI;tf+=hl)il?(this.Z.moveTo(ua*Math.sin(tf),ua*Math.cos(tf)),il=!1):this.Z.lineTo(ua*Math.sin(tf),ua*Math.cos(tf));this.Z.closePath();this.Z.fillStyle=id;this.Z.fill();this.Z.restore()}}if(0<this.ic[db].length)for(ha=0;ha<this.ic[db].length;ha++){gl=this.ic[db][ha];ua=gl.radius*w;tf=gl.alpha*sh;0>tf&&(tf=0);hl=gl.color; if(8==db||9==db||10==db)hl=r.color;this.m.ia?(d.useProgram(this.Ba),d.bindBuffer(d.ARRAY_BUFFER,this.Id),d.vertexAttribPointer(this.Ba.ja,this.Id.itemSize,d.FLOAT,!1,0,0),id=d.getUniformLocation(this.Ba,"uCanvasDimensions2"),d.uniform2f(id,d.drawingBufferWidth,d.drawingBufferHeight),id=d.getUniformLocation(this.Ba,"uCirclePosition"),d.uniform2f(id,d.drawingBufferWidth/h*(e+y*gl.A),d.drawingBufferWidth/h*(l-(f+z*gl.A))),id=d.getUniformLocation(this.Ba,"uCircleTexturePosition"),d.uniform2f(id,d.drawingBufferWidth/ h*(e+y*gl.A),l-(f+z*gl.A)),id=d.getUniformLocation(this.Ba,"uCircleRadius"),d.uniform1f(id,ua),d.uniform3f(d.getUniformLocation(this.Ba,"uCircleColor"),(hl>>16&255)/255,(hl>>8&255)/255,(hl&255)/255),d.uniform1f(d.getUniformLocation(this.Ba,"uCircleAlpha"),tf),d.uniform1f(d.getUniformLocation(this.Ba,"uCircleSoftness"),gl.G),id=d.getUniformLocation(this.Ba,"uAspectRatio"),d.uniform1f(id,d.drawingBufferWidth/d.drawingBufferHeight/(h/l)),d.drawArrays(d.TRIANGLE_FAN,0,this.Id.ge)):(this.Z.save(),this.Z.translate(e+ y*gl.A,f+z*gl.A),id=this.Z.createRadialGradient(0,0,1,0,0,ua),id.addColorStop(0,this.m.fa(hl,tf)),id.addColorStop(1-gl.G,this.m.fa(hl,.8*tf)),id.addColorStop(1,this.m.fa(hl,0)),this.Z.beginPath(),this.Z.arc(0,0,ua,0,2*Math.PI,!1),this.Z.closePath(),this.Z.fillStyle=id,this.Z.fill(),this.Z.restore())}if(0<this.sc[db].length)for(ha=0;ha<this.sc[db].length;ha++)r=this.sc[db][ha],ua=r.radius*w,tf=r.alpha*sh,0>tf&&(tf=0),this.m.ia?(d.useProgram(this.Db),d.activeTexture(d.TEXTURE0),d.bindTexture(d.TEXTURE_2D, this.Fn),d.bindBuffer(d.ARRAY_BUFFER,this.Id),d.vertexAttribPointer(this.Db.ja,this.Id.itemSize,d.FLOAT,!1,0,0),id=d.getUniformLocation(this.Db,"uCanvasDimensions2"),d.uniform2f(id,h,l),id=d.getUniformLocation(this.Db,"uCirclePosition"),d.uniform2f(id,e+y*r.A,l-(f+z*r.A)),id=d.getUniformLocation(this.Db,"uRingTexturePosition"),d.uniform2f(id,d.drawingBufferWidth/h*(e+y*r.A),l-(f+z*r.A)),id=d.getUniformLocation(this.Db,"uCircleRadius"),d.uniform1f(id,ua),d.uniform2f(d.getUniformLocation(this.Db,"uRingPosition"), e+y*r.A,l-(f+z*r.A)),d.uniform1f(d.getUniformLocation(this.Db,"uRingRadius"),ua),d.uniform1f(d.getUniformLocation(this.Db,"uRingAlpha"),tf),id=d.getUniformLocation(this.Db,"uAspectRatio"),d.uniform1f(id,d.drawingBufferWidth/d.drawingBufferHeight/(h/l)),d.uniform1i(d.getUniformLocation(this.Db,"uSampler"),0),d.drawArrays(d.TRIANGLE_FAN,0,this.Id.ge)):(this.Z.save(),this.Z.translate(e+y*r.A,f+z*r.A),id=this.Z.createRadialGradient(0,0,0,0,0,ua),id.addColorStop(0,this.m.fa(16777215,0)),id.addColorStop(.88, this.m.fa(0,0)),id.addColorStop(.9,this.m.fa(16654848,tf)),id.addColorStop(.92,this.m.fa(16776448,tf)),id.addColorStop(.94,this.m.fa(4849466,tf)),id.addColorStop(.96,this.m.fa(131071,tf)),id.addColorStop(.98,this.m.fa(8190,tf)),id.addColorStop(1,this.m.fa(0,0)),this.Z.beginPath(),this.Z.arc(0,0,ua,0,2*Math.PI,!1),this.Z.closePath(),this.Z.fillStyle=id,this.Z.fill(),this.Z.restore())}this.m.ia&&(d.useProgram(this.m.za.P),d.disable(d.BLEND),d.enable(d.DEPTH_TEST))}}}};return m}();x.Fo=p})(ggP2VR||(ggP2VR= {}));var THREE; (function(x){var p=function(){function m(d){this.wd=[];this.qa={x:0,y:0};this.Nc={x:0,y:0};this.th=0;this.le=null;this.hk=!1;this.rl=this.Qe=0;this.vk=this.yj=!1;this.m=null;this.Wk=!0;this.Af=1;this.Ai=[];this.frustumCulled=!1;this.Yg=0;this.Lj=this.xo=!1;this.Nf=[-1,-1,-1,-1];this.Ji=[];this.Me=[];this.m=d;var c=this;setTimeout(function(){if(window.WebXRPolyfill&&window.Promise){var a={cardboardConfig:{BUFFER_SCALE:1}};Il&&(a.allowCardboardOnDesktop=!0);try{new window.WebXRPolyfill(a),d.N("WebXR Polyfill loaded!")}catch(b){}}c.zq()}, 0);THREE?this.Gl():console.log("Three.js not available!")}m.prototype.op=function(){this.init();this.animate()};m.prototype.Gl=function(){this.kl=new THREE.Matrix4;this.nn=new THREE.Euler};m.prototype.init=function(){"xr"in navigator||console.log("no WebXR support");if(THREE)if(this.Cb)console.log("already set up!");else{this.kl||this.Gl();var d=this,c=this.od=this.m.od,a=this.Cr=new THREE.Scene,b=this.camera=new THREE.PerspectiveCamera(100,window.innerWidth/window.innerHeight,.001,2E4);108>THREE.REVISION&& (this.frustumCulled=!0);b.position.z=-.01;b.position.y=0;b.position.x=0;this.Cb=b=new THREE.WebGLRenderer({depth:!0,logarithmicDepthBuffer:!0,alpha:!0,antialias:!0,stencil:!0});b.setClearColor(new THREE.Color(0),1);b.setPixelRatio(window.devicePixelRatio);b.setSize(window.innerWidth,window.innerHeight);b.outputEncoding=THREE.GammaEncoding;b.shadowMap.enabled=!1;c.appendChild(b.domElement);"xr"in navigator&&(b.xr.enabled=!0,b.xr.setReferenceSpaceType("local"));var e=this.Bg=new THREE.Group;c=this.Tj= b.xr.getController(0);c.addEventListener("selectstart",function(g){d.pn(g)});c.addEventListener("selectend",function(){});c.visible=!0;e.add(c);b=this.Uj=b.xr.getController(1);b.addEventListener("selectstart",function(g){d.pn(g)});b.addEventListener("selectend",function(){});b.visible=!0;e.add(b);e.visible=!1;a.add(e);e=(new THREE.BufferGeometry).setFromPoints([new THREE.Vector3(0,0,0),new THREE.Vector3(0,0,-1)]);var f=new THREE.LineBasicMaterial({color:14737632});e=new THREE.Line(e,f);e.name="line"; e.scale.z=5;c.add(e.clone());b.add(e.clone());this.Dh=new THREE.Raycaster;this.qa=new THREE.Vector2;this.Sf=new THREE.Group;this.Hf=new THREE.Group;this.vd=new THREE.Group;this.dk=new THREE.Group;this.Mj=new THREE.Group;this.Sf.add(this.vd);this.Sf.add(this.dk);this.Sf.add(this.Hf);a.add(this.Sf);a.add(this.Mj);a=document.createElement("canvas");a.width=64;a.height=64;c=a.getContext("2d");c.fillStyle="black";c.lineWidth=3;c.beginPath();c.arc(32,32,10,0,2*Math.PI);c.stroke();a=new THREE.Texture(a); a.needsUpdate=!0;a.encoding=THREE.sRGBEncoding;e=new THREE.PlaneBufferGeometry(2,2,8);a=new THREE.MeshBasicMaterial({map:a});a.transparent=!0;a=new THREE.Mesh(e,a);a.position.z=-50;this.Mj.add(a);window.addEventListener("resize",function(){d.cr()},!1);document.addEventListener("mouseup",function(){d.Zq()},!1);document.addEventListener("mousedown",function(g){d.Xq(g)},!1);document.addEventListener("mousemove",function(g){d.Yq(g)},!1)}else console.log("Three.js not available!")};m.prototype.Un=function(){var d= this.m;d.N("VR not found");d.K("vrchanged",{});d.K("playerstatechanged",{})};m.prototype.es=function(){this.vk=!0;var d=this.m;d.N("XR found");d.K("vrchanged",{});d.K("playerstatechanged",{})};m.prototype.zq=function(){if(!this.xo){this.xo=!0;var d=this;if("xr"in navigator)navigator.xr.isSessionSupported("immersive-vr").then(function(c){c?d.es():d.Un()})["catch"](d.Un)}};m.prototype.bh=function(){return null!=this.le?this.Cb.xr.isPresenting:!1};m.prototype.uk=function(){return this.vk&&THREE};m.prototype.ar= function(d){var c=this;this.ai();d.addEventListener("end",function(){c.$q()});console.log("XR Session started.");this.Cb.xr.setSession(d);this.hk=!0;this.le=d};m.prototype.$q=function(){console.log("XR Session ended.");this.hk=!1;this.le=null;this.Sj()};m.prototype.Gg=function(){var d=this.m;if(this.vk){if(null===this.le){var c=this;navigator.xr.requestSession("immersive-vr",{optionalFeatures:["local-floor","bounded-floor"]}).then(function(b){c.ar(b)})["catch"](function(b){console.log(b);console.warn("'immersive-vr' isn't supported, or an error occurred activating VR!"); c.Sj()})}this.vd&&this.vd.translateY(-this.Yg);this.Yg=0;if(1==this.Af){var a=navigator.userAgent;0<=a.indexOf("OculusBrowser")&&(0<=a.indexOf("Pacific")&&(this.Af=1.7),0<=a.indexOf("Quest")&&(this.Af=1.5))}this.Cb.xr.setFramebufferScaleFactor(this.Af);d.Lc("Enter VR - scaled "+this.Af)}else this.ai()};m.prototype.dr=function(){if(THREE&&this.Cb){var d=this.m;d.te=!0;d.$.style.display="none";d.$a.style.display="none";this.Cb.domElement.style.display="inline";d.K("vrchanged",{});d.K("playerstatechanged", {})}};m.prototype.Sj=function(){if(THREE&&this.Cb){var d=this.m;d.te=!1;d.$.style.display="inline";d.$a.style.display="inline";this.Cb.domElement.style.display="none";d.dj(0);d.Sc();d.update();d.K("vrchanged",{});d.K("playerstatechanged",{})}};m.prototype.wf=function(){null!=this.le&&this.le.end()};m.prototype.io=function(){this.bh()?this.wf():this.Gg()};m.prototype.dm=function(){var d=0,c=this.m;var a=1536;this.Cb&&c.N("Canvas: "+a);a*=Math.pow(2,0);if(0<c.u.levels.length){for(;c.u.levels.length>= d+2&&!c.u.levels[d+1].Se&&c.u.levels[d+1].width>a;)d++;c.N("Level "+d+" - width: "+c.u.levels[d].width);c.N(c.u.levels)}return d};m.prototype.Am=function(d){var c=this.m,a=c.re[d];d="";if(a){a=a.firstChild;for(var b;a;)"input"==a.nodeName&&(b=a)&&(b=0<c.u.levels.length?b.getAttributeNode("leveltileurl"):b.getAttributeNode("tilevrurl"))&&(d=b.nodeValue),a=a.nextSibling}else d=0<c.u.levels.length?c.u.Fk:c.Tl;for(a=0;3>a;a++)d=c.Ob(d,"c","vr"),d=c.Ob(d,"s","vr"),d=c.Ob(d,"r",0),d=c.Ob(d,"l",0),d=c.Ob(d, "x",0),d=c.Ob(d,"y",0),d=c.Ob(d,"v",0),d=c.Ob(d,"h",0);return c.Hb(d)};m.prototype.ceilPowerOfTwo=function(d){return Math.pow(2,Math.ceil(Math.log(d)/Math.LN2))};m.prototype.loadTexture=function(d,c,a){var b=new THREE.ImageLoader;b.setCrossOrigin(this.m.crossOrigin);var e=this;b.load(c,function(f){var g=e.ceilPowerOfTwo(f.width),h=e.ceilPowerOfTwo(f.height);d.format=THREE.RGBFormat;d.encoding=THREE.sRGBEncoding;d.needsUpdate=!0;if(g==f.width&&h==f.height||!a)d.image=f;else{e.m.N("resizing "+f.width+ "/"+f.height+" -> "+g+"/"+h);var l=document.createElement("canvas");l.width=g;l.height=h;l.getContext("2d").drawImage(f,0,0,g,h);d.image=l}d.Jm=!0;d.de&&d.de.Jm&&(d.Tg.visible=!0,d.de.Tg.visible=!0)});this.Ai.push(d)};m.prototype.ai=function(){if(THREE){var d=this.m;if(this.Lj)d.N("vr panorama aleady added!");else{this.dm();var c=this.Hf,a=this;d.N("add vr panorama");this.Ue();this.camera.layers.enable(1);c.setRotationFromEuler(this.nn);c.rotateX(d.Oa.pitch*Math.PI/180);c.rotateZ(-d.Oa.U*Math.PI/ 180);var b=new THREE.SphereBufferGeometry(2E4/3*1.5,16,16),e=(new THREE.TextureLoader).load(this.Am(d.jk()));e.encoding=THREE.sRGBEncoding;e=new THREE.MeshBasicMaterial({map:e,side:THREE.DoubleSide});b=new THREE.Mesh(b,e);b.scale.x=-1;b.rotateZ(d.Oa.U*Math.PI/180);b.rotateX(-d.Oa.pitch*Math.PI/180);b.rotateY(-90*Math.PI/180);c.add(b);a.Vi=b;a.Lj=!0;setTimeout(function(){d.N("Adding Main Pano");a.Lj=!1;a.Ro();d.D.f?a.Uo():a.So();a.Po()});this.yr();this.Wk=!0}}};m.prototype.Uo=function(){var d=this.m, c=this.Hf,a=2E4/3;if(d.Md){var b=new THREE.VideoTexture(d.D.f);b.wrapS=THREE.ClampToEdgeWrapping;b.wrapT=THREE.ClampToEdgeWrapping;b.minFilter=THREE.LinearFilter;b.encoding=THREE.sRGBEncoding;var e=new THREE.SphereBufferGeometry(a,60,40);e.scale(-1,1,1);for(var f=e.attributes.uv.array,g=1;g<f.length;g+=2)f[g]*=.5;f=new THREE.MeshBasicMaterial({map:b});e=new THREE.Mesh(e,f);e.rotateY(-90*Math.PI/180);e.layers.set(d.Kh?1:2);c.add(e);e=new THREE.SphereBufferGeometry(a,60,40);e.scale(-1,1,1);f=e.attributes.uv.array; for(g=1;g<f.length;g+=2)f[g]*=.5,f[g]+=.5;f=new THREE.MeshBasicMaterial({map:b});e=new THREE.Mesh(e,f);e.rotateY(-90*Math.PI/180);e.layers.set(d.Kh?2:1)}else e=new THREE.SphereBufferGeometry(a,60,40),e.scale(-1,1,1),b=new THREE.VideoTexture(d.D.f),b.encoding=THREE.sRGBEncoding,b.wrapS=THREE.ClampToEdgeWrapping,b.wrapT=THREE.ClampToEdgeWrapping,b.minFilter=THREE.LinearFilter,f=new THREE.MeshBasicMaterial({map:b}),e=new THREE.Mesh(e,f),e.rotateY(-90*Math.PI/180);c.add(e);try{d.D.f.play()}catch(h){d.Lc(h)}}; m.prototype.So=function(){var d=this.m,c=[],a=this.dm(),b=this.Hf,e=2E4/3,f=d.Md?2:1;if(d.u.levels.length>a)for(var g=d.u.levels[a],h=0;6>h;h++){c[h]=new THREE.Group;for(var l=0;l<g.ea;l++)for(var k=0;k<g.T;k++)for(var w=0;w<f;w++){var r=new THREE.Texture;r.encoding=THREE.sRGBEncoding;this.loadTexture(r,d.pe(h,a,k,l,1==w),!0);r.wrapS=THREE.ClampToEdgeWrapping;r.wrapT=THREE.ClampToEdgeWrapping;r.minFilter=THREE.LinearMipMapLinearFilter;r.anisotropy=1;var y=d.u.O+2*d.u.Da,z=d.u.O+2*d.u.Da;k==g.T-1&& (y=g.width-d.u.O*(g.T-1)+2*d.u.Da);l==g.ea-1&&(z=g.width-d.u.O*(g.ea-1)+2*d.u.Da);var ha=new THREE.PlaneBufferGeometry(e*y/g.width,e*z/g.width,8),ua=new THREE.MeshBasicMaterial({map:r});ha=new THREE.Mesh(ha,ua);ua.transparent=!0;ua.side=THREE.FrontSide;ua=1*d.u.O;ha.position.x=e*(k*ua+y/2-d.u.Da-g.width/2)/g.width;ha.position.y=e*-(l*ua+z/2-d.u.Da-g.width/2)/g.width;ha.position.z=-.5*e;if(d.Md)if(ha.visible=!1,ha.layers.set(1==w?1:2),r.Tg=ha,0==w)var id=ha;else y=id.material.map,r.de=y,y.de=r;c[h].add(ha); ha.frustumCulled=this.frustumCulled}4>h?c[h].rotation.y=-h*Math.PI/2:c[h].rotation.x=(4==h?1:-1)*Math.PI/2;b.add(c[h])}else for(a=d.cf,h=0;6>h;h++)for(c[h]=new THREE.Group,w=0;w<f;w++)g=h,d.Md&&(g=h+(1==w?6:0)),r=new THREE.Texture,r.encoding=THREE.sRGBEncoding,this.loadTexture(r,d.Hb(d.Cg[g]),!1),r.wrapS=THREE.ClampToEdgeWrapping,r.wrapT=THREE.ClampToEdgeWrapping,r.minFilter=THREE.LinearFilter,ha=new THREE.PlaneBufferGeometry(a*e/2,a*e/2,64),ua=new THREE.MeshBasicMaterial({map:r}),ha=new THREE.Mesh(ha, ua),ua.transparent=!0,ua.side=THREE.FrontSide,ha.position.x=0,ha.position.y=0,ha.position.z=-.25*e,d.Md&&(ha.layers.set(1==w?1:2),ha.visible=!1,r.Tg=ha,0==w?id=ha:(y=id.material.map,r.de=y,y.de=r)),c[h].add(ha),4>h?c[h].rotation.y=-h*Math.PI/2:c[h].rotation.x=(4==h?1:-1)*Math.PI/2,b.add(c[h])};m.prototype.Ro=function(){var d=this.m,c=this.vd;new x.Ga(0,0,-100);for(var a=d.H.oj,b=0;b<d.W.length;b++){var e=d.W[b],f=e.qs(),g=.2;if(!1!==f){var h=!e.distance||0>=e.distance?5:1>e.distance?1:5>e.distance? e.distance:5;if(e.Zc){var l=.005,k=(new THREE.TextureLoader).load(e.Zc);k.encoding=THREE.sRGBEncoding;var w=new THREE.MeshBasicMaterial({map:k});if(e.jg){h=100;g=2*h*Math.tan(e.fov/2*Math.PI/180);var r=new THREE.PlaneBufferGeometry(g,g*e.Gd/e.Be,1,1);w.transparent=!0;w.opacity=1}else r=new THREE.PlaneBufferGeometry(l*e.Be,l*e.Gd,1,1),w.transparent=!0,w.opacity=.25;g=l*e.Gd/2;w.side=THREE.DoubleSide}else r=new THREE.SphereBufferGeometry(.2,16,16),k=(new THREE.TextureLoader).load(this.Am(f)),k.encoding= THREE.sRGBEncoding,w=new THREE.MeshBasicMaterial({map:k}),w.transparent=!0,w.opacity=.25;f=new THREE.Mesh(r,w);l=e.title;if(a.enabled&&""!=l){r=document.createElement("canvas");r.width=256;r.height=32;k=r.getContext("2d");this.Mh||(this.Mh=document.createElement("canvas"),this.Mh.width=r.width,this.Mh.height=r.height);var y=this.Mh.getContext("2d");y.clearRect(0,0,r.width,r.height);y.font="16px Helvetica";y.textAlign="center";y.textBaseline="top";w=y.measureText(l);var z=w.width;0<a.height&&(z=Math.min(a.width, r.width-6),z=Math.max(z,w.width));w=z+6;a.background&&(y.fillStyle=this.m.fa(a.dc,a.cc),y.fillRect((r.width-z)/2-3,2,z+6,24));0<a.ei&&(y.strokeStyle=this.m.fa(a.fc,a.ec),y.strokeRect((r.width-z)/2-3,2,z+6,24));y.fillStyle=this.m.fa(a.pj,a.nj);y.fillText(l,r.width/2,5,r.width-6);k.drawImage(this.Mh,(r.width-w)/2,2,w,24,0,0,r.width,r.height);k=new THREE.Texture(r);k.encoding=THREE.sRGBEncoding;k.needsUpdate=!0;l=1.5;r=new THREE.PlaneBufferGeometry(1*l*w/r.width,3*l/r.height,1,1);w=new THREE.MeshBasicMaterial({map:k, side:THREE.DoubleSide});r=new THREE.Mesh(r,w);r.translateY(-g-.125*l/2);r.frustumCulled=this.frustumCulled;f.add(r);w.transparent=!0;w.opacity=.5}f.rotateY(e.pan*Math.PI/180);f.rotateX(e.v*Math.PI/180);f.translateZ(-h);f.userData=e;f.castShadow=!1;f.receiveShadow=!1;f.frustumCulled=this.frustumCulled;c.add(f)}}};m.prototype.Po=function(){for(var d=this.m,c=this.dk,a=0;a<d.S.length;a++){var b=d.S[a];if(b.f&&"_videopanorama"!=b.id&&!b.fd){b.f.play();var e=new THREE.VideoTexture(b.f);e.encoding=THREE.sRGBEncoding; e.wrapS=THREE.ClampToEdgeWrapping;e.wrapT=THREE.ClampToEdgeWrapping;e.minFilter=THREE.LinearFilter;var f=5E3*Math.tan(b.fov*Math.PI/360);var g=0<b.zc?f*b.cd/b.zc:f;b.Ic&&1!=b.Ic&&(g*=b.Ic);f=new THREE.PlaneBufferGeometry(f,g,5,5);e=new THREE.MeshBasicMaterial({map:e,side:THREE.DoubleSide});e=new THREE.Mesh(f,e);e.rotateY(b.pan*Math.PI/180);e.rotateX(b.v*Math.PI/180);e.translateY(-0);e.translateZ(-2500);e.rotateZ(-b.lb*Math.PI/180);e.rotateY(-b.La*Math.PI/180);e.rotateX(-b.Fa*Math.PI/180);e.userData= b;e.castShadow=!1;e.receiveShadow=!1;c.add(e)}}};m.prototype.Fg=function(d){for(var c=d.children.length-1;0<=c;c--){var a=d.children[c];this.Fg(a);d.remove(a)}d.geometry&&d.geometry.dispose();d.material&&(d.material.texture&&(d.material.texture.dispose(),d.material.texture.de=null,d.material.texture.Tg=null),d.material.map&&(d.material.map.dispose(),d.material.map.de=null,d.material.map.Tg=null),d.material.dispose())};m.prototype.Ue=function(){THREE&&(this.Ai=[],this.Fg(this.Hf),this.Fg(this.vd), this.Fg(this.dk),10<this.Cb.info.memory.textures&&this.m.Ps(this.Cb.info.memory))};m.prototype.cr=function(){if(THREE){var d=this.camera;d.aspect=window.innerWidth/window.innerHeight;d.updateProjectionMatrix();this.Cb.setSize(window.innerWidth,window.innerHeight)}};m.prototype.pn=function(d){THREE&&(d=this.sm(d.target),0<d.length&&(d=d[0].object.userData,this.m.gd(d.url,d.target)))};m.prototype.sm=function(d){this.kl.identity().extractRotation(d.matrixWorld);this.Dh.ray.origin.setFromMatrixPosition(d.matrixWorld); this.Dh.ray.direction.set(0,0,-1).applyMatrix4(this.kl);return this.Dh.intersectObjects(this.vd.children)};m.prototype.intersectObjects=function(d){var c=d.getObjectByName("line");d=this.sm(d);if(0<d.length){d=d[0];var a=d.object;a.selected=!0;this.wd.push(a);c.scale.z=d.distance}else c.scale.z=5};m.prototype.lp=function(){for(;this.wd.length;)this.wd.pop().selected=!1};m.prototype.Yq=function(d){d.preventDefault();var c=this.qa,a=this.Cb;c.x=d.clientX/a.domElement.clientWidth*2-1;c.y=2*-(d.clientY/ a.domElement.clientHeight)+1;1==d.buttons&&(this.th=this.Nc.x-c.x)};m.prototype.Aq=function(){var d=this.Dh;d.setFromCamera(this.qa,this.camera);d=d.intersectObjects(this.vd.children);0<d.length&&(d=d[0].object,d.selected=!0,this.wd.push(d))};m.prototype.Bq=function(){var d=this.Dh;d.setFromCamera({x:0,y:0},this.camera);d=d.intersectObjects(this.vd.children);0<d.length&&(d=d[0].object,d.selected=!0,this.wd.push(d))};m.prototype.Zq=function(){this.th=0};m.prototype.Xq=function(d){50>d.clientX&&50> d.clientY&&this.m.wf();0<this.wd.length?this.m.gd(this.wd[0].userData.url):(this.Nc.x=this.qa.x,this.Nc.y=this.qa.y)};m.prototype.animate=function(){var d=this.Kq=this;this.Cb&&this.Cb.setAnimationLoop(function(){d.render()})};m.prototype.render=function(){if(THREE){var d=null;try{d=this.Cb.xr.getCamera(this.camera)}catch(y){console.log(y)}0==this.Yg&&d&&(this.Yg=d.position.y,this.vd.translateY(this.Yg));var c=this.Kq,a=c.m;c.lp();if(a.te){c.yj=c.Tj.visible||c.Uj.visible?!1:!0;c.Tj.visible&&c.intersectObjects(c.Tj); c.Uj.visible&&c.intersectObjects(c.Uj);c.hk||c.Aq();var b=[],e=!0;this.le?this.le.inputSources.forEach(function(y){var z=y.profiles;"gaze"==y.targetRayMode?c.yj=!0:(b.push(y.gamepad),0<=z.indexOf("oculus-go")&&(e=!1),0<=z.indexOf("generic-trigger-squeeze-thumbstick")&&(e=!0),0<=z.indexOf("oculus-touch")&&(e=!0))}):b=navigator.getGamepads&&navigator.getGamepads();var f=!1;!c.Bg.visible&&0<b.length&&(c.Bg.visible=!0);c.Bg.visible==(0==b.length)&&(c.Bg.visible=!c.Bg.visible);if(c.yj)if(c.Bq(),0<this.wd.length)if(this.Bk!= this.wd[0])this.Bk=this.wd[0],this.Fq=Date.now();else{if(Date.now()>this.Fq+1E3){var g=this.Bk.userData;g&&g.url&&this.m.gd(g.url,g.target)}}else this.Bk=null;for(g=0;g<b.length;g++){var h=b[g];if(h&&0<h.buttons.length)if(2<h.buttons.length&&h.buttons[2].touched&&2<=h.axes.length&&!e)if(f=!0,h=h.axes[0],-1==this.Nf[g])this.Nf[g]=h;else{var l=this.Nf[g]-h;-.3>l&&(this.Fh(20),this.Nf[g]=h);.3<l&&(this.Fh(-20),this.Nf[g]=h)}else this.Nf[g]=-1,4<=h.axes.length&&(h=h.axes[2],.8<h?(f=!0,1!=this.Me[g]&& (this.Me[g]=1,this.Ji[g]=Date.now()-1E4)):-.8>h?(f=!0,-1!=this.Me[g]&&(this.Me[g]=-1,this.Ji[g]=Date.now()-1E4)):this.Me[g]=0,0!=this.Me[g]&&400<Date.now()-this.Ji[g]&&(this.Ji[g]=Date.now(),this.Fh(20*this.Me[g])))}this.Vi&&0<this.Ai.length&&this.Ai.every(function(y){return y.Jm})&&(this.Fg(this.Vi),this.Hf.remove(this.Vi),this.Vi=null,a.N("unload Preview Sphere"));g=this.vd;for(h=g.children.length-1;0<=h;h--){l=g.children[h];var k=1,w=1;l.selected?(k=1.5,w=1):f?(k=.6,w=.7):(k=.4,w=.5);var r=l.scale.x; r+=.1*(k-r);l.material.opacity+=.1*(w-l.material.opacity);l.userData&&l.userData.Zc?(l.userData.jg&&(r=1,l.material.opacity=1),0<l.children.length&&(l.children[0].material.opacity=l.material.opacity)):(l.rotateY(1*Math.PI/180),0<l.children.length&&(l.children[0].rotateY(-1*Math.PI/180),l.children[0].material.opacity=l.material.opacity));l.scale.x=l.scale.y=l.scale.z=r}f=c.camera.rotation.clone();f.reorder("YXZ");this.rl=180*f.y/Math.PI;this.Wk&&(this.Fh(this.rl-a.pan.j),this.Wk=!1);a.Lr(this.rl-this.Qe, 180*f.x/Math.PI,180*f.z/Math.PI);a=this.Mj;c.yj?d&&(a.setRotationFromEuler(d.rotation),a.visible=!0):a.visible=!1;c.Cb.render(c.Cr,c.camera);0==this.th||isNaN(this.th)||this.Fh(this.th)}}};m.prototype.yr=function(){this.Qe=0;this.Sf.setRotationFromEuler(this.nn)};m.prototype.Fh=function(d){this.Qe+=d;this.Sf.rotateY(d*Math.PI/180)};return m}();x.No=p})(ggP2VR||(ggP2VR={}));var Il=!1; (function(x){var p=function(){return function(){this.fov=this.v=this.pan=0}}(),m=function(){return function(){this.Ol=-1E7}}(),d=function(){function c(a,b){this.Hq="TGljZW5zZTogQktZTS5DT00=";this.pan={j:0,cb:0,min:0,max:360,d:0,Lk:0,Yc:0,open:0};this.v={j:0,cb:0,min:-90,max:90,d:0,Yc:0,open:0};this.U={j:0,cb:0,min:-180,max:180,d:0,open:0};this.Hc={pan:0,v:-90,U:0,fov:170,Nb:9};this.fov={j:70,cb:70,min:1,rh:0,max:170,Ik:360,Jk:270,prev:0,d:0,mode:0,Xn:0,Vl:0,open:0};this.Oa={U:0,pitch:0};this.C={width:10,height:10}; this.Xa=0;this.Xj=new x.Ga;this.crossOrigin="anonymous";this.Wa=this.Ui=4;this.td=this.Xh=this.xh=this.Cc=0;this.yo={};this.Kh=this.Md=!1;this.ga={start:{x:0,y:0},oa:{x:0,y:0},Od:{x:0,y:0},j:{x:0,y:0},na:{x:0,y:0}};this.Y={Nc:!1,ad:!1,Ei:function(){return this.ad||this.Nc},em:0,startTime:0,start:{x:0,y:0},oa:{x:0,y:0},Od:{x:0,y:0},j:{x:0,y:0},na:{x:0,y:0},Ah:!1};this.yf=this.Fe=!0;this.Ka={enabled:!0,oa:{x:0,y:0},na:{x:0,y:0},Xk:0,fov:{active:!1,yc:0}};this.kb={alpha:0,beta:0,gamma:0,orientation:0, Qe:0,Eh:!0,fadeIn:0};this.Wg={alpha:0,beta:0,gamma:0,orientation:0};this.D={src:[],lf:4,width:640,height:480,yd:!1,Gi:!1,dl:!0,Yn:!1,Ee:"loop",jl:"",f:HTMLVideoElement=null,co:!1,texture:WebGLTexture=null,ql:WebGLBuffer=null,mj:WebGLBuffer=null,xk:WebGLBuffer=null,format:1,xi:0,flipY:1,wb:function(){return 0},Jn:function(){},loop:function(){return!1}};this.Ii=0;this.ra=this.Ja=this.Ra=this.$=this.xc=this.$a=this.L=null;this.He="pano";this.ik="flashcontainer";this.Yj="";this.control=null;this.hc=[]; this.Na=!1;this.Eg=1;this.ta=null;this.Xd=this.hf=this.Ef=!1;this.rg=0;this.Ed=.02;this.Gj=0;this.Hj=!1;this.Fj=this.ci=this.sg=this.gf=this.El=0;this.Dl=-1;this.Xb="";this.Yf=this.Pc=!1;this.zh=0;this.Cg=[];this.Tl="";this.tf=[];this.cf=this.Fc=1;this.vg=1024;this.Zf=!1;this.Oe=200;this.ac=0;this.Lh=5;this.Ec=0;this.eo=50;this.wk=this.fo=0;this.B={enabled:!1,timeout:5,active:!1,Jh:!1,speed:.4,rj:0,Ti:0,mn:!0,Qf:"",ln:!1,Uh:!1,lg:!1,di:"",Yd:"Animation01",kf:!1,Pi:!1,il:!1,startTime:0,zd:0,Kg:!1, ki:!1,Li:0,Nd:0,kh:0,lh:0,jh:0,bn:0};this.F={active:!1,aborted:!1,speed:.1,pan:0,v:0,U:0,fov:70,Vd:70,kh:0,lh:0,cn:0,jh:0,Nb:0,Ch:0,Ck:0,ol:!1,uh:!1,Cl:0,Bl:0,Bi:!1};this.Mf={pan:-1,v:-1,fov:-1};this.$m=0;this.la=null;this.mg={};this.Vh={};this.$d=[];this.Oi={};this.Mc={};this.Pf={};this.H={mode:1,gh:-1,va:0,gb:0,ld:.05,fc:255,ec:1,dc:255,cc:.3,Df:!0,oj:{enabled:!0,width:180,height:20,pj:0,nj:1,background:!0,dc:16777215,cc:1,fc:0,ec:1,Jj:3,ei:1,Aj:!0},tb:[],$b:[],jd:[],hj:[]};this.Ha=null;this.W= [];this.X=[];this.S=[];this.eb=[];this.re={};this.Ya=[];this.wa=[];this.Td=[];this.ef=[];this.$e=[];this.ba=1;this.za=this.je=this.Qb=this.od=null;this.Hg={};this.Dc={};this.bo=this.eg="";this.ao=-1;this.u=new x.Io;this.er={target:0,current:0,ld:.01,delay:2,bk:0,li:!1,Zo:!1};this.margin={left:0,top:0,right:0,bottom:0};this.M={nh:!1,Iq:!1,lc:!1,ee:!1,Ld:!0,Qm:!1,Wn:1,Hn:!1,$j:!0,Ag:!0,hi:!1,Ff:!1,In:!0,sensitivity:8};this.qh=[];this.qd=!0;this.qa={x:0,y:0};this.Th=this.Pb=this.Rh=this.kd=this.te=this.ia= !1;this.xj=this.so=!0;this.sk=!1;this.Ge=!0;this.kg=this.pk=this.rk=!1;this.to=!0;this.zi=!1;this.Pa=this.Zd="";this.$c="transition";this.Va="transform";this.Hd="perspective";this.Zl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYBgeACDAAADIAAE3iTbkAAAAAElFTkSuQmCC";this.yb={width:0,height:0};this.im=new x.Ga;this.hm=new x.Ga;this.jm=new x.Ga;this.km=new x.Ga;this.gm=new x.Ga;this.Kf=!1;this.an=this.Qa="";this.zj= [];this.Kk=[];this.nk=!1;this.tj=[];this.dh=this.Rm=this.If=this.Sm=this.xd=this.Vm=this.yk=this.Yk=this.kc=this.Fi=this.Jf=this.zk=this.Tm=this.Um=this.Xm=!1;this.Sh=!0;this.Zi=this.Di=!1;this.Zg=[];this.devicePixelRatio=1;this.da=this.J=null;this.wg=!1;this.Ia=null;this.xb={enabled:!1,speed:1,running:!1,fk:!0};this.jn=!1;this.Ni="<<LOG>>";this.cube=new x.Jo;this.nl=!1;this.zg=function(f,g){if(0==f.length)return f;var h;var l=[];var k=g.Wi(f[0])-0;for(h=0;h<f.length;h++){var w=h;var r=h+1;r==f.length&& (r=0);var y=g.Wi(f[r])-0;if(0<=k&&0<=y)l.push(f[w]);else if(0<=k||0<=y){var z=y/(y-k);0>z&&(z=0);1<z&&(z=1);var ha=new x.Ga;ha.Kd(f[w],f[r],z);0>k||l.push(f[w]);l.push(ha)}k=y}return l};this.vn=new p;this.cl=0;this.qc=!1;this.Ki=-1;this.Pg=function(f){return f?this.ah()&&(f.clientX||f.clientY)?{x:f.clientX,y:f.clientY}:f.pageX||f.pageY?{x:f.pageX,y:f.pageY}:f.clientX||f.clientY?{x:f.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,y:f.clientY+document.body.scrollTop+document.documentElement.scrollTop}: f.touches&&f.touches[0]?{x:f.touches[0].pageX,y:f.touches[0].pageY}:{x:0,y:0}:{x:0,y:0}};this.Ri=1;this.xp=this.ti=this.Ym=this.ck=this.Sk=this.Xi=0;this.Zm=!1;this.be=!0;this.mb=new x.$h(this);this.mb.Df=!1;this.Yl();if(7<this.Ni.length){var e=c.Dg("bG9n");window[c.Dg("Y29uc29sZQ==")][e](c.Wl(this.Ni))}this.ag(this.mb);this.checkLoaded=this.hc;this.isLoaded=!1;b&&b.hasOwnProperty("useFlash")&&b.useFlash&&(this.Pb=!0,this.ia=this.kd=!1,b.hasOwnProperty("flashPlayerId")?this.He=b.flashPlayerId:this.He= "pano",b.hasOwnProperty("flashContainerId")?this.ik=b.flashContainerId:this.ik=a+"flash");b&&b.hasOwnProperty("webGLFlags")&&b.webGLFlags&&(this.yo=b.webGLFlags);this.Ea();this.Pb||(this.Ta=new x.Fo(this));this.Sl(a);this.Yo();this.userdata=this.mg=this.Ig();this.emptyHotspot=this.mb;this.mouse=this.qa;this.J=new x.Go(this);this.Ia=new x.Ho(this);this.za=new x.Mo(this);this.Fb=new x.No(this);this.Sc()}c.prototype.Gm=function(a){return-99991===a?this.Hq:"6.1.10/18007"};c.prototype.Vj=function(){this.J.enabled= this.da.enabled;this.J.type=this.da.type;this.J.sa=this.da.zoomin;this.J.uc=this.da.zoomout;this.J.ug=this.da.blendtime;this.J.pg=this.da.zoomoutpause;this.J.Dj=this.da.zoomfov;this.J.Bj=this.da.zoomafterinfov;this.J.Cj=this.da.zoomafteroutfov;this.J.ue=this.da.zoomspeed;this.J.mf=this.da.blendcolor;this.J.Rc=this.da.softedge;this.da=null};c.prototype.Wr=function(a){this.da={};this.da.enabled=!0;this.da.type=this.J.type;this.da.zoomin=this.J.sa;this.da.zoomout=this.J.uc;this.da.blendtime=this.J.ug; this.da.zoomoutpause=this.J.pg;this.da.zoomfov=this.J.Dj;this.da.zoomafterinfov=this.J.Bj;this.da.zoomafteroutfov=this.J.Cj;this.da.zoomspeed=this.J.ue;this.da.blendcolor=this.J.mf;this.da.softedge=this.J.Rc;if(a.hasOwnProperty("type")){var b=a.type;if("cut"==b||"crossdissolve"==b||"diptocolor"==b||"irisround"==b||"irisrectangular"==b||"wipeleftright"==b||"wiperightleft"==b||"wipetopbottom"==b||"wipebottomtop"==b||"wiperandom"==b)this.da.type=b}a.hasOwnProperty("before")&&(b=Number(a.before),0==b|| 2==b)&&(this.da.zoomin=b);a.hasOwnProperty("after")&&(b=Number(a.after),0==b||2==b||3==b||4==b)&&(this.da.zoomout=b);a.hasOwnProperty("transitiontime")&&(b=Number(a.transitiontime),0<=b&&50>=b&&(this.da.blendtime=b));a.hasOwnProperty("waitfortransition")&&(this.da.zoomoutpause=1==a.waitfortransition);a.hasOwnProperty("zoomedfov")&&(b=Number(a.zoomedfov),.01<=b&&50>=b&&(this.da.zoomfov=b));a.hasOwnProperty("zoomafterinfov")&&(b=Number(a.zoomafterinfov),70<=b&&120>=b&&(this.da.zoomafterinfov=b));a.hasOwnProperty("zoomafteroutoutfov")&& (b=Number(a.zoomafteroutfov),.01<=b&&70>=b&&(this.da.zoomafteroutfov=b));a.hasOwnProperty("zoomspeed")&&(b=Number(a.zoomspeed),.01<=b&&99>=b&&(this.da.zoomspeed=b));a.hasOwnProperty("dipcolor")&&(this.da.blendcolor=a.dipcolor);a.hasOwnProperty("softedge")&&(a=Number(a.softedge),0<=a&&1E3>=a&&(this.da.softedge=a));this.wg||this.Vj()};c.prototype.Qc=function(a,b,e){var f=b?Number(b):0;if(0!=a&&4!=a&&12!=a&&9!=a)this.Lc("Unsupported projection type: "+a);else if(b&&0!==f&&4!==f&&12!==f&&9!==f)this.Lc("Unsupported projection2 type: "+ f);else if(a==f&&(f=0),this.xh=e?Number(e):1,this.Wa!=a||this.Cc!=f)this.Wa=a,this.Cc=f,this.za.Ci()};c.prototype.Sa=function(){return 0==this.Wa?4:this.Wa};c.prototype.Pj=function(a,b){if(0!=a&&4!=a&&12!=a&&9!=a)this.Lc("Unsupported projection type: "+a);else if(this.ia||0==a||4==a||this.Lc("Projection changes require WebGL!"),this.Sa()!=a){var e={};e.pan=this.pan.j;e.tilt=this.v.j;e.fov=this.fov.j;e.projection=a;e.timingFunction=3;e.speed=b;a=this.Og(a);e.fov=Math.min(a,e.fov);this.Qi(e)}};c.prototype.addListener= function(a,b){(this.Hg[a]=this.Hg[a]||[]).push(b)};c.prototype.K=function(a,b){if(a=this.Hg[a])for(var e=a.length,f=0;f<e;f++)try{a[f].apply(null,[b])}catch(g){this.Lc(g)}};c.prototype.removeEventListener=function(a,b){var e=this.Hg[a];if(e){var f;var g=0;for(f=e.length;g<f;g++)if(e[g]===b){1===f?delete this.Hg[a]:e.splice(g,1);break}}};c.prototype.wr=function(){this.Na=!0};c.prototype.tq=function(){return this.R};c.prototype.To=function(a,b,e,f){if(!this.Dc.hasOwnProperty(a)){var g=new m;this.Dc[a]= g;g.type=b;"undefined"!==typeof e&&this.me(a,e);"object"===typeof f&&this.Qn(a,f);return!0}return!1};c.prototype.qm=function(a){var b=document.cookie.indexOf(a+"="),e="";-1!=b&&(b=b+a.length+1,a=document.cookie.indexOf(";",b),-1==a&&(a=document.cookie.length),e=decodeURIComponent(document.cookie.substring(b,a)));return e};c.prototype.Rn=function(a,b,e){0==b&&this.me(a,e,!1);1==b&&this.me(a,parseFloat(e),!1);2==b&&this.me(a,"true"==e,!1)};c.prototype.Qn=function(a,b){if(this.Dc.hasOwnProperty(a)&& "object"===typeof b){var e=this.Dc[a];b.hasOwnProperty("cookiePath")&&(e.Pl=String(b.cookiePath));b.hasOwnProperty("cookieExpireDays")&&(e.Ol=parseFloat(b.cookieExpireDays));b.hasOwnProperty("keep")&&(e.Ak=!!b.keep,e.Ak&&0<document.cookie.length&&(""!=this.eg?-1!=document.cookie.indexOf(this.eg+"=")&&(b=JSON.parse(this.qm(this.eg)),b.hasOwnProperty(a)&&this.Rn(a,e.type,b[a])):(b="ggvar_"+a,-1!=document.cookie.indexOf(b+"=")&&(b=this.qm(b),this.Rn(a,e.type,b)))));return!0}return!1};c.prototype.Vr= function(a,b){this.eg=a;b&&"object"===typeof b&&(b.hasOwnProperty("cookiePath")&&(this.bo=String(b.cookiePath)),b.hasOwnProperty("cookieExpireDays")&&(this.ao=parseFloat(b.cookieExpireDays)))};c.prototype.Fl=function(a,b,e){-1<=b&&(a+="; max-age="+86400*b);""!=e&&(a+="; path="+e);return a};c.prototype.me=function(a,b,e){void 0===e&&(e=!0);if(this.Dc.hasOwnProperty(a)){var f=this.Dc[a];if(0==f.type&&"string"===typeof b||1==f.type&&"number"===typeof b||2==f.type&&"boolean"===typeof b){if(f.value!=b){f.value= b;if(f.Ak&&e){if(""!=this.eg){f={};for(var g=0,h=Object.keys(this.Dc);g<h.length;g++)e=h[g],this.Dc[e].Ak&&(f[e]=encodeURIComponent(this.Dc[e].value.toString()));e=this.eg+"="+JSON.stringify(f);e=this.Fl(e,this.ao,this.bo)}else e="ggvar_"+a+"="+encodeURIComponent(b.toString()),e=this.Fl(e,f.Ol,f.Pl?f.Pl:"");document.cookie=e}this.K("varchanged_"+a,{value:b})}return!0}}return!1};c.prototype.nq=function(a){if(this.Dc.hasOwnProperty(a))return this.Dc[a].value};c.Dg=function(a){var b="",e=0;a=a.replace(/[^A-Za-z0-9\+\/=]/g, "");do{var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(e++));var g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(e++));var h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(e++));var l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(e++));f=f<<2|g>>4;g=(g&15)<<4|h>>2;var k=(h&3)<<6|l;b+=String.fromCharCode(f);64!=h&&(b+=String.fromCharCode(g)); 64!=l&&(b+=String.fromCharCode(k))}while(e<a.length);return b};c.ps=function(a){for(var b=[1,1,1,1,2,2,3,0],e=a.length,f="",g=0;g<e;){var h=a.charCodeAt(g++);if(h&128){var l=b[h>>3&7];if(!(h&64&&l)||g+l>e)return null;for(h&=63>>l;0<l;--l){var k=a.charCodeAt(g++);if(128!=(k&192))return null;h=h<<6|k&63}}f+=String.fromCharCode(h)}return f};c.Wl=function(a){return c.ps(c.Dg(a))};c.prototype.Yl=function(){this.devicePixelRatio=window.devicePixelRatio||1;this.Xm=!!navigator.userAgent.match(/(Windows|Win)/g); this.Um=!!navigator.userAgent.match(/(Mac|Macintosh|Mac_powerpc)/g);this.Tm=!!navigator.userAgent.match(/(Linux|Ubuntu)/g);this.zk=!!navigator.userAgent.match(/(MSIE)/g);this.Jf=!!navigator.userAgent.match(/(Edge|EdgA)/g);this.Fi=!!navigator.userAgent.match(/(Firefox)/g);if(this.kc=!!navigator.userAgent.match(/(Safari)/g)){var a=navigator.userAgent.indexOf("Safari");this.hd=navigator.userAgent.substring(a+7);a=navigator.userAgent.indexOf("Version");-1!=a&&(this.hd=navigator.userAgent.substring(a+ 8));this.hd=this.hd.substring(0,this.hd.indexOf(" "));this.hd=this.hd.substring(0,this.hd.indexOf("."));this.Yk=!0}this.Vm=!!navigator.userAgent.match(/(SamsungBrowser)/g);if(this.yk=!!navigator.userAgent.match(/(Chrome)/g)||!!navigator.userAgent.match(/(CriOS)/g))this.kc=!1;this.xd=!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g);this.Sm=!!navigator.userAgent.match(/(iPhone|iPod)/g);this.If=!!navigator.userAgent.match(/(android)/i);this.Rm=!!navigator.userAgent.match(/(IEMobile)/i);this.dh=this.xd|| this.If||this.Rm;/iP(hone|od|ad)/.test(navigator.platform)&&(a=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),this.Zg=[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3]||"0",10)]);this.Di=!window.requestAnimationFrame;a=["Webkit","Moz","O","ms","Ms"];this.Pa="";this.$c="transition";this.Va="transform";this.Hd="perspective";for(var b=0;b<a.length;b++)"undefined"!==typeof document.documentElement.style[a[b]+"Transform"]&&(this.Pa="-"+a[b].toLowerCase()+"-",this.$c=a[b]+"Transition",this.Va=a[b]+ "Transform",this.Hd=a[b]+"Perspective");this.sk=Gl();this.ia=Hl();this.kd=this.sk;this.ia&&(this.kd=!1);this.Pc=!0;this.Yf=!1;if(this.xd||this.If)this.Pn(80),this.Lh=2;this.Lc("Pano2VR player "+this.Gm()+" - Prefix:"+this.Pa+", "+(this.sk?"CSS 3D available":"CSS 3D not available")+", "+(this.ia?"WebGL available":"WebGL not available"));Il&&this.N("Pano2VR Debug version!");try{window.AudioContext=window.AudioContext||window.webkitAudioContext,this.ua=new AudioContext}catch(e){this.ua=null}this.kc&& (!this.Yk||9>Number(this.hd))&&(this.ua=null);this.kc&&!this.xd&&12<=Number(this.hd)&&13>Number(this.hd)&&(this.ua=null);this.kc&&this.xd&&13==Number(this.Zg[0])&&(1==Number(this.Zg[1])||2<=Number(this.Zg[1]))&&(this.ua=null);this.Sh=this.Sm?this.kc&&this.Yk&&10<=Number(this.hd)?!0:!1:!0};c.prototype.N=function(a){if(Il){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a.toString()+"<br />");window.console&&window.console.log(a)}};c.prototype.Ps=function(a){if(Il){var b=document.getElementById("gg_debug"); b&&(b.innerHTML=a.toString()+"<br />");window.console&&window.console.warn(a)}};c.prototype.Lc=function(a){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a+"<br />");window.console&&window.console.log(a)};c.prototype.Pn=function(a){this.Oe=a};c.prototype.setCrossOrigin=function(a){this.crossOrigin=a};c.prototype.Gr=function(a){this.Gf=a};c.prototype.eq=function(){return this.zh};c.prototype.Er=function(a){this.Zd=a};c.prototype.pm=function(){return this.Zd};c.prototype.Lp=function(){return this.dh}; c.prototype.Gp=function(){return this.zi};c.prototype.Mp=function(){return this.Kf};c.prototype.Ip=function(){return this.B.active};c.prototype.Hr=function(a){this.dh=!!a};c.prototype.ui=function(){return this.isLoaded};c.prototype.Kp=function(){return!this.isLoaded};c.prototype.sd=function(){return Number(this.C.height)/(2*Math.tan(Math.PI/180*(this.jc()/2)))};c.prototype.Sn=function(a,b){this.isFullscreen&&(a=window.innerWidth,b=window.innerHeight);var e=a-this.margin.left-this.margin.right,f=b- this.margin.top-this.margin.bottom;if(!(10>e||10>f)){var g=window.devicePixelRatio||1;this.Zf&&(g=1);this.L.style.width=e+"px";this.L.style.height=f+"px";this.L.style.left=this.margin.left+"px";this.L.style.top=this.margin.top+"px";if(this.ia)try{this.$a&&(this.$a.style.position="absolute",this.$a.style.display="inline",this.$a.style.width=e+"px",this.$a.style.height=f+"px",this.$a.width=e*g,this.$a.height=f*g),this.R&&(this.yb.width=e*g,this.yb.height=f*g,this.R.viewport(0,0,this.R.drawingBufferWidth, this.R.drawingBufferHeight))}catch(h){alert(h)}this.xc&&(this.xc.style.width=a+"px",this.xc.style.height=b+"px",this.xc.width=a,this.xc.height=b);this.Ra&&(this.Ra.style.width=a+"px",this.Ra.style.height=b+"px",this.Ja.style.width=a+"px",this.Ja.style.height=b+"px",this.Ja.width=a,this.Ja.height=b,this.Ja.style.left=this.margin.left+"px",this.Ja.style.top=this.margin.top+"px",this.ta&&this.ta!=this.Ra&&(this.ta.style.width=a+"px",this.ta.style.height=b+"px"));this.Ta&&(e=this.Ta.md,e.style.width= a+"px",e.style.height=b+"px",e.width=a,e.height=b,e.style.left=this.margin.left+"px",e.style.top=this.margin.top+"px");this.Ef&&(this.Na=!0);e=this.L.offsetWidth;f=this.L.offsetHeight;if(this.C.width!=e||this.C.height!=f)this.C.width=e,this.C.height=f;this.Ks();this.ta&&this.ta.ggUpdateSize&&this.ta.ggUpdateSize(a,b);this.K("sizechanged",{w:a,h:b});this.K("playerstatechanged",{})}};c.prototype.ff=function(){this.nl=!0};c.prototype.Sc=function(){this.Sn(this.od.offsetWidth,this.od.offsetHeight)};c.prototype.sq= function(){var a={width:0,height:0};a.width=this.C.width;a.height=this.C.height;return a};c.prototype.Je=function(){var a={x:0,y:0},b=this.L;if(b.offsetParent){do a.x+=b.offsetLeft,a.y+=b.offsetTop,b=b.offsetParent;while(b)}return a};c.prototype.Tr=function(a){this.la=a};c.prototype.Ir=function(a,b,e,f){this.margin.left=a;this.margin.top=b;this.margin.right=e;this.margin.bottom=f;this.la=this.skinObj;this.ff()};c.prototype.gp=function(a){0==a&&(this.M.Ld=!1);1==a&&(this.M.Ld=!0);2==a&&(this.M.Ld= !this.M.Ld);this.K("viewmodechanged",{});this.K("playerstatechanged",{})};c.prototype.qq=function(){return 1==this.M.Ld?1:0};c.prototype.Ml=function(a,b){this.H.mode=1==b&&0<this.H.mode?0:Math.round(a);this.update();this.ra&&(this.ra.changePolygonMode(a,b),this.ra.update());this.K("polymodechanged",{})};c.prototype.Tn=function(a){var b=this.H.tb.indexOf(a);-1==b?(this.H.tb.push(a),this.H.$b.push(0),this.H.jd.push(1)):this.H.jd[b]=1;this.update()};c.prototype.Lm=function(a){var b=this.H.tb.indexOf(a); -1!=b&&(this.H.jd[b]=0,this.H.hj.push(a),this.update())};c.prototype.vs=function(a){var b=this.H.tb.indexOf(a);-1==b||-1!=b&&0==this.H.jd[b]?this.Tn(a):this.Lm(a);this.update()};c.prototype.ep=function(a,b,e,f,g){for(var h=0;h<this.W.length;h++){var l=this.W[h];"poly"!=l.type||l.id!=a&&""!=a||(l.dc=b,l.cc=e,l.fc=f,l.ec=g)}""==a&&(this.H.dc=b,this.H.cc=e,this.H.fc=f,this.H.ec=g);this.update()};c.prototype.bp=function(a){this.Ta&&(this.Ta.al=0==a?!0:1==a?!1:!this.Ta.al,this.update())};c.prototype.gq= function(){return this.H.mode};c.prototype.hp=function(){this.K("viewstatechanged",{})};c.prototype.rq=function(){return 0};c.prototype.Sp=function(a){return(a=this.Oi[a])?a.type:"web"};c.prototype.Rp=function(a){return(a=this.Oi[a])?a:{}};c.prototype.Zp=function(a,b){var e=[];a||(a=this.Qa);var f=this.$d[a];f&&(a=f);""===a&&0<Object.keys(this.Mc).length&&(a=Object.keys(this.Mc)[0]);this.Mc[a]&&this.Mc[a][b]&&(e.push(this.Mc[a][b].y),e.push(this.Mc[a][b].x));return e};c.prototype.$p=function(a,b){var e= [];a||(a=this.Qa);var f=this.$d[a];f&&(a=f);""===a&&0<Object.keys(this.Mc).length&&(a=Object.keys(this.Mc)[0]);this.Pf[a]&&this.Pf[a][b]&&(e.push(this.Pf[a][b].x),e.push(this.Pf[a][b].y));return e};c.prototype.vm=function(a){var b=this.$d[a];b&&(a=b);b=this.um();for(var e=[],f=0;f<b.length;f++)this.Mc[a][b[f]]&&e.push(b[f]);return e};c.prototype.Qp=function(a){a=this.vm(a);return 0<a.length?a[0]:""};c.prototype.um=function(){var a=[],b;for(b in this.Oi)a.push(b);return a};c.prototype.Nm=function(a, b,e){a=Math.atan2(a+1,e);var f=Math.atan2(b+1,e);b=Math.sin(a);e=Math.sin(f);a=Math.cos(a);f=Math.cos(f);this.im.init(0,0,-1);this.hm.init(a,0,-b);this.jm.init(-a,0,-b);this.km.init(0,f,-e);this.gm.init(0,-f,-e)};c.prototype.Rj=function(a){a=this.zg(a,this.im);a=this.zg(a,this.hm);a=this.zg(a,this.jm);a=this.zg(a,this.km);return a=this.zg(a,this.gm)};c.prototype.mo=function(a){if(!this.Pc&&this.Gq!=a){this.Gq=a;var b=this.margin.left+this.C.width/2+"px ";b+=this.margin.top+this.C.height/2+"px ";this.Ra.style[this.Hd]= a+"px";this.Ra.style[this.Hd+"Origin"]=b;this.L.style[this.Hd]=a+"px";this.L.style[this.Hd+"Origin"]=b}};c.prototype.rm=function(){return this.J.se||this.J.Bd||this.ia&&(4!=this.Wa||0!=this.Cc)?!1:!0};c.prototype.Ph=function(){var a=new x.Ga(0,0,-100),b=this.sd();var e=100/this.fov.j;var f=this.u.width/this.u.height;var g=this.C.height*e*f;e*=this.C.height;for(var h=this.rm(),l=0;l<this.W.length;l++){var k=this.W[l];if("point"==k.type){var w=!1;if(2==this.Xa){var r=(this.pan.j-k.pan)/100/f*g;var y= (this.v.j-k.v)/100*e;Math.abs(r)<this.C.width/2+500&&Math.abs(y)<this.C.height/2+500&&(w=!0)}else a.init(0,0,-100),a.Fa(-k.v*Math.PI/180),a.La(k.pan*Math.PI/180),a.La(-this.pan.j*Math.PI/180),a.Fa(this.v.j*Math.PI/180),a.lb(this.U.j*Math.PI/180),.01>a.z?(y=-b/a.z,r=a.x*y,y*=a.y,Math.abs(r)<this.C.width/2+5E3&&Math.abs(y)<this.C.height/2+5E3&&(w=!0)):y=r=0;k.Yb=r+this.C.width/2;k.Bb=y+this.C.height/2;k.visible=w;k.px=k.Yb;k.py=k.Bb;k.visible=k.visible;if(k.f&&k.f.onUpdatePosition)k.f.onUpdatePosition(this, k);else k.f&&k.f.__div&&("none"!=k.f.__div.style[this.$c]&&(k.f.__div.style[this.$c]="none"),w&&h?(k.f.ggUse3d?(this.Pc||this.mo(b),2==this.Xa?(k.f.__div.style[this.Va]="scale("+(100/this.fov.j*500/k.f.gg3dDistance).toFixed(10)+")",k.f.__div.style.left=this.margin.left+r+this.C.width/2+"px",k.f.__div.style.top=this.margin.top+y+this.C.height/2+"px"):(k.f.__div.style.width="1px",k.f.__div.style.height="1px",r="",this.Pc&&(r+="translate3d(0px,0px,-1000px) perspective("+b+"px) "),r+="translate3d(0px,0px,"+ b+"px) ",r+="rotateZ("+this.U.j.toFixed(10)+"deg) ",r+="rotateX("+this.v.j.toFixed(10)+"deg) ",r+="rotateY("+(-this.pan.j).toFixed(10)+"deg) ",r+="rotateY("+k.pan.toFixed(10)+"deg) ",r+="rotateX("+(-k.v).toFixed(10)+"deg) ",r+="translate3d(0px,0px,"+(-1*k.f.gg3dDistance).toFixed(10)+"px) ",k.f.__div.style[this.Va+"Origin"]="0% 0%",k.f.__div.style[this.Va]=r,k.f.__div.style.left=this.margin.left+this.C.width/2+"px",k.f.__div.style.top=this.margin.top+this.C.height/2+"px")):(k.f.__div.style.left=this.margin.left+ r+this.C.width/2+"px",k.f.__div.style.top=this.margin.top+y+this.C.height/2+"px"),k.f.__div.ggVisible&&(k.f.__div.style.visibility="visible")):(k.f.ggUse3d&&(k.f.__div.style[this.Va]=""),k.f.__div.style.left="-1000px",k.f.__div.style.top="-1000px",k.f.__div.style.visibility="hidden"))}if("poly"==k.type){var z=[];if(2==this.Xa)for(k.ie=[],w=0;w<k.vertices.length;w++)y=k.vertices[w],r=(this.pan.j-y.pan)/100/f*g,y=(this.v.j-y.v)/100*e,r+=this.margin.left+this.C.width/2,y+=this.margin.top+this.C.height/ 2,k.ie.push({Yb:r,Bb:y});else{for(w=0;w<k.vertices.length;w++)y=k.vertices[w],a.init(0,0,-100),a.Fa(-y.v*Math.PI/180),a.La(y.pan*Math.PI/180),a.La(-this.pan.j*Math.PI/180),a.Fa(this.v.j*Math.PI/180),a.lb(this.U.j*Math.PI/180),z.push(a.clone());z=this.Rj(z);if(0<z.length)for(w=0;w<z.length;w++)a=z[w],.1>a.z?(y=-b/a.z,r=this.C.width/2+a.x*y,y=this.C.height/2+a.y*y):y=r=0,a.Yb=r,a.Bb=y;k.ie=z}}}};c.prototype.Cp=function(){for(var a=[],b=0;b<this.W.length;b++){var e=this.W[b];"point"==e.type&&e.f&&e.f.__div&& a.push(e.f.__div)}return a};c.prototype.fa=function(a,b){a=Number(a);isNaN(b)&&(b=0);0>b&&(b=0);1<b&&(b=1);return"rgba("+(a>>16&255)+","+(a>>8&255)+","+(a&255)+","+b+")"};c.prototype.gr=function(){var a;if(this.Ja&&(this.H.gh!=this.H.mode&&(this.H.gh=this.H.mode,this.Ja.style.visibility=0<this.H.mode?"inherit":"hidden"),0<=this.H.mode||0<this.H.tb.length)){this.ma||(this.ma=this.Ja.getContext("2d"));if(this.ma.width!=this.C.width||this.ma.height!=this.C.height)this.ma.width=this.C.width,this.ma.height= this.C.height;this.ma.clear?this.ma.clear():this.ma.clearRect(0,0,this.Ja.width,this.Ja.height);var b=1;0>=this.H.mode&&(b=0);3==this.H.mode&&(b=this.H.va);for(a=0;a<this.W.length;a++){var e=this.W[a];var f=b;if("poly"==e.type){var g=e.ie;2==this.H.mode&&(f=e.va);var h=this.H.tb.indexOf(e.id);-1!=h&&(f=this.H.$b[h]);this.ma.fillStyle=this.fa(e.dc,e.cc*f);this.ma.strokeStyle=this.fa(e.fc,e.ec*f);if(0<g.length){this.ma.beginPath();for(e=0;e<g.length;e++)f=g[e],0==e?this.ma.moveTo(f.Yb,f.Bb):this.ma.lineTo(f.Yb, f.Bb);this.ma.closePath();this.ma.stroke();this.ma.fill()}}}}};c.prototype.Mm=function(a,b,e){var f,g=!1;var h=0;for(f=a.length-1;h<a.length;f=h++){var l=a[h];f=a[f];l.Bb>e!=f.Bb>e&&b<(f.Yb-l.Yb)*(e-l.Bb)/(f.Bb-l.Bb)+l.Yb&&(g=!g)}return g};c.prototype.gi=function(a,b){var e=-1;if((0<=this.H.mode||0<this.H.tb.length)&&this.Cq())for(var f=0;f<this.W.length;f++){var g=this.W[f];"poly"==g.type&&g.ie&&0<g.ie.length&&(-1!=this.H.mode||-1!=this.H.tb.indexOf(g.id))&&this.Mm(g.ie,a,b)&&(e=f,g.Yb=a,g.Bb=b)}return 0<= e?this.W[e]:!1};c.prototype.Cq=function(){return 4==this.Sa()&&0==this.Cc};c.prototype.jc=function(){var a=0,b=this.Sa(),e=this.C;switch(this.fov.mode){case 0:a=this.fov.j/2;break;case 1:a=4==b?180*Math.atan(e.height/e.width*Math.tan(this.fov.j/2*Math.PI/180))/Math.PI:e.height/e.width*this.fov.j/2;break;case 2:a=Math.sqrt(e.width*e.width+e.height*e.height);a=4==b?180*Math.atan(e.height/a*Math.tan(this.fov.j/2*Math.PI/180))/Math.PI:e.height/a*this.fov.j/2;break;case 3:a=4*e.height/3>e.width?this.fov.j/ 2:4==b?180*Math.atan(4*e.height/(3*e.width)*Math.tan(this.fov.j/2*Math.PI/180))/Math.PI:4*e.height/(3*e.width)*(this.fov.j/2)}return 2*a};c.prototype.Fp=function(a,b){a||(a=this.jc());b||(b=this.Sa());return 4==b?180*Math.atan(this.aspect()*Math.tan(a/2*Math.PI/180))/Math.PI:a*this.aspect()};c.prototype.aspect=function(){return this.C.width/this.C.height};c.prototype.Jl=function(a){var b=this.fov.j;a/=2;var e=this.Sa();switch(this.fov.mode){case 0:b=2*a;break;case 1:a=4==e?180*Math.atan(this.C.width/ this.C.height*Math.tan(a*Math.PI/180))/Math.PI:this.C.width/this.C.height*a;b=2*a;break;case 2:b=Math.sqrt(this.C.width*this.C.width+this.C.height*this.C.height);a=4==e?180*Math.atan(b/this.C.height*Math.tan(a*Math.PI/180))/Math.PI:b/this.C.height*a;b=2*a;break;case 3:4*this.C.height/3>this.C.width?b=2*a:(b=3*this.C.width/(4*this.C.height),a=4==e?180*Math.atan(b*Math.tan(a*Math.PI/180))/Math.PI:b*a,b=2*a)}return b};c.prototype.fj=function(a){this.fov.j=this.Jl(a)};c.prototype.yg=function(){if(!this.te){var a= this.vn;a.pan=this.pan.j;a.v=this.v.j;a.fov=this.fov.j;this.rf(a);this.rf(a);this.rf(a);this.pan.j=a.pan;this.v.j=a.v;this.fov.j=a.fov}};c.prototype.rf=function(a){var b=this.C.width/this.C.height;if(2==this.Xa){if(0<this.fov.rh){var e=this.Fc;this.u.levels&&0<this.u.levels.length&&(e=this.u.levels[0].height);this.fov.min=100*this.C.height/(e*this.fov.rh)}var f=a.fov/2;e=f*b;var g=this.u.width/this.u.height*50;b=this.M.In?2*Math.min(50,g/b):2*Math.max(50,g/b);a.fov<this.fov.min&&(a.fov=this.fov.min); a.fov>b&&(a.fov=b);50<f?a.v=0:(50<a.v+f&&(a.v=50-f),-50>a.v-f&&(a.v=-50+f));e>g?a.pan=0:(a.pan+e>g&&(a.pan=g-e,this.B.active&&(this.B.speed=-this.B.speed,this.pan.d=0)),a.pan-e<-g&&(a.pan=-g+e,this.B.active&&(this.B.speed=-this.B.speed,this.pan.d=0)))}else{0<this.fov.rh&&(e=this.Fc,this.u.levels&&0<this.u.levels.length&&(e=this.u.levels[0].height),this.fov.min=360*Math.atan2(this.C.height/2,e/2*this.fov.rh)/Math.PI);a.fov<this.fov.min&&(a.fov=this.fov.min);g=this.fov.max;var h=179;f=this.jc()/2;e= b*f;4==this.Sa()?e=180*Math.atan(b*Math.tan(f*Math.PI/180))/Math.PI:9==this.Sa()?(g=this.fov.Jk,h=355):12==this.Sa()&&(g=this.fov.Ik,h=360);this.ia||(g=Math.max(160,g));a.fov>g&&(a.fov=g);12==this.Sa()&&(2*e>h&&(a.fov=h/b),f=this.jc()/2,2*f>h&&(a.fov=h),f=this.jc()/2,e=b*f);2*f>this.v.max-this.v.min&&180>this.v.max-this.v.min&&(f=(this.v.max-this.v.min)/2,a.fov=this.Jl(2*f));90>this.v.max?a.v+f>this.v.max&&(a.v=this.v.max-f):a.v>this.v.max&&(a.v=this.v.max);-90<this.v.min?a.v-f<this.v.min&&(a.v=this.v.min+ f):a.v<this.v.min&&(a.v=this.v.min);b=this.pan.max-this.pan.min;if(359.99>b){g=90;h=Math.tan(f*Math.PI/180);var l=Math.tan((Math.abs(a.v)+f)*Math.PI/180);l=Math.sqrt(l*l+1)/Math.sqrt(h*h+1);f=180*Math.atan(l*Math.tan(e*Math.PI/180))/Math.PI;2*f>b&&(l=Math.tan(b*Math.PI/360)/Math.tan(e*Math.PI/180),b=l*Math.sqrt(h*h+1),l=Math.sqrt(b*b-1),g=180/Math.PI*Math.atan(l));a.pan+f>this.pan.max&&(a.pan=this.pan.max-f,this.B.active&&(this.B.speed=-this.B.speed,this.pan.d=0));a.pan-f<this.pan.min&&(a.pan=this.pan.min+ f,this.B.active&&(this.B.speed=-this.B.speed,this.pan.d=0));a.v+e>g&&(a.v=g-e);a.v-e<-g&&(a.v=-g+e)}}};c.prototype.update=function(a){void 0===a&&(a=0);this.Na=!0;a&&(this.Eg=Math.max(1*a,this.Eg))};c.prototype.tm=function(){return this.ra?!!this.ra.isTileLoading:0<this.ac||0<this.Ec};c.prototype.Qh=function(){var a=Date.now();if(this.Pb){if(this.ra)if(this.Cs(),2===this.Xa)this.yg(),this.Ph();else if(0===this.Xa){var b=this.sd();this.Nm(this.C.width/2,this.C.height/2,b);this.Ph()}}else 2===this.Xa? (this.Ph(),this.ia?(this.za.ll(),this.za.qn()):this.ll()):0===this.Xa&&(!this.ia||4==this.Wa&&0==this.Cc?(b=this.sd(),this.Nm(this.C.width/2,this.C.height/2,b),this.Ph(),this.Th?this.za.Js():this.so&&this.ro(),this.no(),this.ia?(this.D.yd?14==this.D.format?this.za.Is():this.za.zo():0<this.u.levels.length?this.za.Qs():this.za.Ss(),this.za.qn()):(this.kd?0<this.u.levels.length?this.Gs():this.Fs():this.Rh&&this.Bs(),this.gr()),this.Ta&&this.Ta.fr()):(this.za.zo(),this.Ph(),this.yq()));b=Date.now();50< b-a?(this.N("Time between frames: "+(b-a)),this.Zf||(2<this.cl?(this.Zf=!0,this.N("disabling HighDPI rendering"),this.Sc()):this.cl++)):this.cl=0;this.Ef&&this.u.Dn++};c.prototype.Fs=function(){var a=!1;if(this.C.width!=this.L.offsetWidth||this.C.height!=this.L.offsetHeight)this.C.width=this.L.offsetWidth,this.C.height=this.L.offsetHeight,this.L.style[this.Va+"OriginX"]=this.C.width/2+"px",this.L.style[this.Va+"OriginY"]=this.C.height/2+"px",a=!0;var b=Math.round(this.sd());this.hh==b&&!a||this.Pc|| (this.hh=b,this.L.style[this.Hd]=b+"px");this.cube.kp(this.pan.j,this.v.j,this.U.j,this.Oa);for(a=0;6>a;a++){var e;if(e=this.cube.faces[a]){var f="";this.Pc?(f+="translate3d("+this.C.width/2+"px,"+this.C.height/2+"px,0px) ",f+="perspective("+b+"px) ",f+="translate3d(0px,0px,"+b+"px) "):f+="translate3d("+this.C.width/2+"px,"+this.C.height/2+"px,"+b+"px) ";f+="rotateZ("+Number(this.U.j).toFixed(10)+"deg) ";f+="rotateX("+Number(this.v.j).toFixed(10)+"deg) ";f+="rotateY("+Number(-this.pan.j).toFixed(10)+ "deg) ";e.Hm&&(f+=e.Hm,e.pb||(f="translate3d(-10px,-10px,0px) scale(0.001,0.001)"),e.V.style[this.Va]=f)}}};c.prototype.Bs=function(){this.yg();var a;this.xc&&(a=this.xc.getContext("2d"));if(this.C.width!==this.L.offsetWidth||this.C.height!==this.L.offsetHeight)this.C.width=this.L.offsetWidth,this.C.height=this.L.offsetHeight;if(a){var b=a.canvas.width/2,e=a.canvas.height/2,f=a.createRadialGradient(b,e,5,b,e,Math.max(b,e));f.addColorStop(0,"#333");f.addColorStop(1,"#fff");a.rect(0,0,a.canvas.width, a.canvas.height);a.fillStyle=f;a.fill();a.fillStyle="#f00";a.font="20px Helvetica";a.textAlign="center";a.fillText("Pan: "+this.pan.j.toFixed(1),b,e-60);a.fillText("Tilt: "+this.v.j.toFixed(1),b,e-30);a.fillText("Fov: "+this.fov.j.toFixed(1),b,e+0);a.fillText("Node: "+this.jk(),b,e+30);a.fillText("Title: "+this.mg.title,b,e+60)}};c.prototype.Cs=function(){this.yg();if(this.C.width!==this.L.offsetWidth||this.C.height!==this.L.offsetHeight)this.C.width=this.L.offsetWidth,this.C.height=this.L.offsetHeight; this.ra&&this.ra.setPan&&(this.ra.setPan(this.pan.j),this.ra.setTilt(this.v.j),this.ra.setFov(this.fov.j))};c.prototype.ll=function(){this.Ja.style.visibility="inherit";this.ma||(this.ma=this.Ja.getContext("2d"));if(this.ma.width!=this.C.width||this.ma.height!=this.C.height)this.ma.width=this.C.width,this.ma.height=this.C.height;this.ma.clear?this.ma.clear():this.ma.clearRect(0,0,this.Ja.width,this.Ja.height);this.Ec=0;var a=100/this.fov.j;var b=this.u.width/this.u.height;var e=this.C.height*a*b; a*=this.C.height;var f=(this.pan.j/100/b-.5)*e+this.C.width/2;for(var g=(this.v.j/100-.5)*a+this.C.height/2,h,l,k,w,r=0;this.u.levels.length>=r+2&&this.u.levels[r+1].width>e;)r++;var y;var z=[];for(y=this.u.levels.length-1;y>=r;){b=this.u.levels[y];if(b.cache){var ha={jb:0,Ib:0};ha.Kb=b.T-1;ha.Lb=b.ea-1}else{ha={};var ua=-g/a*(b.height/this.u.O);h=(-f+this.C.width)/e*(b.width/this.u.O);l=(-g+this.C.height)/a*(b.height/this.u.O);ha.jb=Math.min(Math.max(0,Math.floor(-f/e*(b.width/this.u.O))),b.T-1); ha.Ib=Math.min(Math.max(0,Math.floor(ua)),b.ea-1);ha.Kb=Math.min(Math.max(0,Math.floor(h)),b.T-1);ha.Lb=Math.min(Math.max(0,Math.floor(l)),b.ea-1)}z[y]=ha;var id=!0;for(l=ha.Ib;l<=ha.Lb;l++)for(h=ha.jb;h<=ha.Kb;h++)w=h+l*b.T,ua=b.aa[w],ua||(ua=new x.Wd,b.aa[w]=ua),this.ac<this.Lh?ua.u||(this.wk++,ua.u=new Image,ua.u.onload=this.ss(),ua.u.onerror=this.qj(ua),ua.u.onabort=this.qj(ua),ua.u.crossOrigin=this.crossOrigin,ua.u.setAttribute("src",this.pe(0,y,h,l)),b.cache&&this.hc.push(ua.u),this.ac++,this.Na= !0):this.Ec++,ua.u&&ua.u.complete||(id=!1),ua.visible=!0;ha.Ek=id;y--}for(y=this.u.levels.length-1;y>=r;){b=this.u.levels[y];if(z[y]&&0<=z[y].jb)for(ha=z[y],l=ha.Ib;l<=ha.Lb;l++)for(h=ha.jb;h<=ha.Kb;h++)w=h+l*b.T,(ua=b.aa[w])||(ua=b.aa[w]=new x.Wd),ua.u&&ua.u.complete&&(w=f+(-this.u.Da+this.u.O*h)*e/b.width,this.ma.drawImage(ua.u,w,g+(-this.u.Da+this.u.O*l)*a/b.height,ua.u.width*e/b.width,ua.u.height*a/b.height)),ua.visible=!0;y--}for(e=0;e<this.u.levels.length;e++)if(b=this.u.levels[e],!b.cache)for(k in b.aa)b.aa.hasOwnProperty(k)&& (ua=b.aa[k],ua.visible||(ua.u=null,delete b.aa[k]));if(0<=this.H.mode||0<this.H.tb.length)for(e=1,0>=this.H.mode&&(e=0),3==this.H.mode&&(e=this.H.va),k=0;k<this.W.length;k++)if(b=this.W[k],f=e,"poly"==b.type&&(a=b.ie,2==this.H.mode&&(f=b.va),g=this.H.tb.indexOf(b.id),-1!=g&&(f=this.H.$b[g]),0<a.length)){this.ma.fillStyle=this.fa(b.dc,b.cc*f);this.ma.strokeStyle=this.fa(b.fc,b.ec*f);this.ma.beginPath();for(b=0;b<a.length;b++)f=a[b],0==b?this.ma.moveTo(f.Yb,f.Bb):this.ma.lineTo(f.Yb,f.Bb);this.ma.closePath(); this.ma.stroke();this.ma.fill()}this.qd=!1};c.prototype.rs=function(a){var b=this;return function(){b.update();b.qd=!0;a.loaded=!0;a.u&&!a.V&&b.L.appendChild(a.u);b.ac&&b.ac--;a.u&&a.bb&&(a.bb.drawImage(a.u,0,0),a.u=null)}};c.prototype.ss=function(){var a=this;return function(){a.Na=!0;a.qd=!0;a.ac&&a.ac--}};c.prototype.qj=function(a){var b=this;return function(){b.Na=!0;b.qd=!0;b.ac&&b.ac--;a.u=null}};c.prototype.Fm=function(a,b,e){e.jb=a.width/this.u.O*b.Lg;e.Ib=a.height/this.u.O*b.Mg;e.Kb=a.width/ this.u.O*b.oh;e.Lb=a.height/this.u.O*b.ph;e.jb=Math.min(Math.max(0,Math.floor(e.jb)),a.T-1);e.Ib=Math.min(Math.max(0,Math.floor(e.Ib)),a.ea-1);e.Kb=Math.min(Math.max(0,Math.floor(e.Kb)),a.T-1);e.Lb=Math.min(Math.max(0,Math.floor(e.Lb)),a.ea-1)};c.prototype.Mr=function(a){a=Math.round(a);this.Pc=0<(a&1);this.Yf=0<(a&2);this.xj=0<(a&4);this.Zf=0<(a&8);4096<=a&&(this.kd=0<(a&4096),this.ia=0<(a&8192),this.Rh=0<(a&32768))};c.prototype.jq=function(){var a=0;this.Pc&&(a|=1);this.Yf&&(a|=2);this.xj&&(a|= 4);this.kd&&(a|=4096);this.ia&&(a|=8192);this.Rh&&(a|=32768);return a};c.prototype.po=function(){if(!(6>this.cube.faces.length))for(var a=0;6>a;a++){var b=this.cube.faces[a];var e=[];e.push(new x.Ga(-1,-1,-1,0,0));e.push(new x.Ga(1,-1,-1,1,0));e.push(new x.Ga(1,1,-1,1,1));e.push(new x.Ga(-1,1,-1,0,1));for(var f=0;4>f;f++)4>a?e[f].La(-Math.PI/2*a):e[f].Fa(Math.PI/2*(4==a?-1:1)),this.Oa&&(e[f].lb(this.Oa.U*Math.PI/180),e[f].Fa(-this.Oa.pitch*Math.PI/180)),e[f].Ve(-this.pan.j),e[f].Rd(this.v.j),e[f].We(this.U.j); e=this.Rj(e);b.pb=0<e.length;if(b.pb){b=b.Uf;b.Lg=e[0].Cd;b.oh=e[0].Cd;b.Mg=e[0].bc;b.ph=e[0].bc;for(f=1;f<e.length;f++)b.Lg=Math.min(b.Lg,e[f].Cd),b.oh=Math.max(b.oh,e[f].Cd),b.Mg=Math.min(b.Mg,e[f].bc),b.ph=Math.max(b.ph,e[f].bc);b.ng=b.oh-b.Lg;b.Wh=b.ph-b.Mg;b.scale=Math.max(b.ng,b.Wh)}else b.Uf.ng=-1,b.Uf.Wh=-1}};c.prototype.Hk=function(){for(var a=0;a<this.u.levels.length;a++){var b=this.u.levels[a],e;for(e in b.aa)b.aa.hasOwnProperty(e)&&(b.aa[e].visible=!1)}};c.prototype.ek=function(){var a= 0,b=Math.tan(Math.min(this.jc(),175)*Math.PI/360),e=this.C.height/(2*b);e*=1+this.C.width/this.C.height*b/2;for(e*=Math.pow(2,1<this.devicePixelRatio?this.u.en:this.u.dn);this.u.levels.length>=a+2&&!this.u.levels[a+1].Se&&this.u.levels[a+1].width>e;)a++;return a};c.prototype.Gs=function(){var a=!1,b,e,f;if(this.C.width!==this.L.offsetWidth||this.C.height!==this.L.offsetHeight)this.C.width=this.L.offsetWidth,this.C.height=this.L.offsetHeight,this.L.style[this.Va+"OriginX"]=this.C.width/2+"px",this.L.style[this.Va+ "OriginY"]=this.C.height/2+"px",a=!0;var g=Math.round(this.sd());if(this.hh!=g||a)this.hh=g,this.Pc||(this.L.style[this.Hd]=g+"px",this.L.style[this.Hd+"Origin"]="50% 50%");this.Ec=0;if(0<this.u.levels.length){this.po();this.Hk();var h="";for(b=0;6>b;b++){var l=this.cube.faces[b];l.pb&&(h=h+b+",")}h=this.ek();var k;for(k=this.u.levels.length-1;k>=h;){a=this.u.levels[k];var w=1;k==this.u.levels.length-1&&0==this.u.Da&&(w=this.u.O/(this.u.O-2));for(b=0;6>b;b++){l=this.cube.faces[b];var r=l.Uf;if(l.pb&& 0<r.ng&&0<r.Wh&&0<r.scale||a.cache){l.Na=!1;var y={};a.cache?(y.jb=0,y.Ib=0,y.Kb=a.T-1,y.Lb=a.ea-1):this.Fm(a,r,y);for(f=y.Ib;f<=y.Lb;f++)for(e=y.jb;e<=y.Kb;e++){var z=e+f*a.T+b*a.T*a.ea;(r=a.aa[z])||(r=a.aa[z]=new x.Wd);if(!r.V&&this.ac<this.Lh){if(0<this.tj.length){r.V=this.tj.shift();for(z=this.L.firstChild;z&&z.ce&&(-1==z.ce||z.ce>=k);)z=z.nextSibling;this.L.insertBefore(r.V,z);r.bb=r.V.getContext("2d")}else if(this.fo<this.Oe){this.fo++;r.V=document.createElement("canvas");r.V.width=this.u.O+ 2*this.u.Da;r.V.height=this.u.O+2*this.u.Da;r.bb=r.V.getContext("2d");r.V.style[this.Va+"Origin"]="0% 0%";r.V.style.overflow="hidden";r.V.style.position="absolute";for(z=this.L.firstChild;z&&z.ce&&(-1==z.ce||z.ce>=k);)z=z.nextSibling;this.L.insertBefore(r.V,z)}r.V&&(this.wk++,r.u=new Image,r.u.crossOrigin=this.crossOrigin,r.u.style[this.Va+"Origin"]="0% 0%",r.u.style.position="absolute",r.u.style.overflow="hidden",r.V.ce=k,r.u.onload=this.rs(r),r.u.onerror=this.qj(r),r.u.onabort=this.qj(r),r.u.setAttribute("src", this.pe(b,k,e,f)),a.cache&&this.hc.push(r.u),this.ac++,this.Na=!0)}else this.Ec++;if(r.V){z="";this.Pc?(z+="translate3d("+this.C.width/2+"px,"+this.C.height/2+"px,0px) ",z+=" perspective("+g+"px) ",z+="translate3d(0px,0px,"+g+"px) "):z+="translate3d("+this.C.width/2+"px,"+this.C.height/2+"px,"+g+"px) ";z+="rotateZ("+Number(this.U.j).toFixed(10)+"deg) ";z+="rotateX("+Number(this.v.j).toFixed(10)+"deg) ";z+="rotateY("+Number(-this.pan.j).toFixed(10)+"deg) ";this.Oa&&(z+="rotateX("+Number(-this.Oa.pitch).toFixed(10)+ "deg) ",z+="rotateZ("+Number(this.Oa.U).toFixed(10)+"deg) ");z=4>b?z+("rotateY("+-90*b+"deg) "):z+("rotateX("+(4==b?-90:90)+"deg) ");if(this.Yf){var ha=this.u.O/a.width*(2*k+1)*(this.vg/this.u.O);ha=this.kc?2/Math.tan(this.fov.j*Math.PI/360)*ha:2*ha;z+=" scale("+ha*w*w+")"}else ha=1/(w*w);z+=" translate3d("+(1/w*e*this.u.O-this.u.Da-a.width/2)+"px,";z+=1/w*f*this.u.O-this.u.Da-a.width/2+"px,";z+=-a.width*ha/2+"px)";l.pb&&(r.visible=!0,r.V?r.V.style[this.Va]=z:r.u&&(r.u.style[this.Va]=z))}}}}k--}for(g= 0;g<this.u.levels.length;g++){a=this.u.levels[g];for(var ua in a.aa)a.aa.hasOwnProperty(ua)&&(r=a.aa[ua],!r.visible&&r.V&&(a.cache?r.V?r.V.style[this.Va]="translate3d(-10px,-10px,0px) scale(0.001,0.001)":r.u&&(r.u.style[this.Va]=""):(r.bb&&r.bb.clearRect(0,0,r.bb.canvas.width,r.bb.canvas.height),this.tj.push(r.V),r.V?(h="translate3d(-10px,-10px,0px) scale(0.001,0.001)",r.V.style[this.Va]=h,r.V.ce=-1):r.loaded&&this.L.removeChild(r.u),r.V=null,r.u=null,r.bb=null,delete a.aa[ua])))}this.qd=!1}};c.prototype.no= function(){var a=Math.round(this.sd());this.Pc||this.mo(a);for(var b=0;b<this.eb.length;b++){var e=this.eb[b];e.qo(a);e.f.hidden=!1}};c.prototype.ro=function(){for(var a=Math.round(this.sd()),b=0;b<this.S.length;b++){var e=this.S[b];e.fd||(e.qo(a),e.f.hidden=!1)}};c.prototype.yq=function(){for(var a=0;a<this.eb.length;a++){var b=this.eb[a];b.cg(!1)}for(a=0;a<this.S.length;a++)b=this.S[a],b.fd||b.cg(!1)};c.prototype.Ks=function(){for(var a=0;a<this.S.length;a++){var b=this.S[a];b.fd||b.ff()}for(a= 0;a<this.eb.length;a++)b=this.eb[a],b.ff()};c.prototype.dd=function(a){this.Ge=!1;try{this.$a=a?a:document.createElement("canvas");var b=this.od.offsetWidth-this.margin.left-this.margin.right,e=this.od.offsetHeight-this.margin.top-this.margin.bottom;if(100>b||100>e)e=b=100;var f=window.devicePixelRatio||1;this.Zf&&(f=1);this.L.style.width=b+"px";this.L.style.height=e+"px";this.$a.style.width=b+"px";this.$a.style.height=e+"px";this.$a.width=b*f;this.$a.height=e*f;this.$a.style.display="none";this.$a.style.touchAction= "none";this.L.insertBefore(this.$a,this.L.firstChild);var g=this.yo;g.stencil=!0;g.depth=!0;g.powerPreference="high-performance";g.alpha=this.kc?!0:!1;this.xd&&10<=this.Zg[0]&&(g.antialias=!1,g.alpha=!1);a={};a.flags=g;a.canvas=this.$a;this.K("beforewebglcontext",a);this.R=this.$a.getContext("webgl",g);this.R||(this.R=this.$a.getContext("experimental-webgl",g));if(this.R){var h=this.R;this.yb.width=b*f;this.yb.height=e*f;h.clearColor(0,0,0,0);h.enable(this.R.DEPTH_TEST);h.viewport(0,0,500,500);h.clear(h.COLOR_BUFFER_BIT| h.DEPTH_BUFFER_BIT);4096<=h.getParameter(h.MAX_TEXTURE_SIZE)&&!this.dh&&(this.Oe=1<f?4*this.Oe:2*this.Oe);this.N("Max tile cnt: "+this.Oe);this.za.$g();this.za.Ci();this.za.Om(this.cf);this.za.Pm();this.J&&(this.J.$g(),this.J.dd());this.Ta&&(this.Ta.$g(),this.Ta.dd())}}catch(l){this.N(l)}this.R?(this.ia=!0,this.K("webglready",{gl:this.R})):alert("Could not initialise WebGL!")};c.prototype.Hb=function(a){return a?"{"==a.charAt(0)||"/"==a.charAt(0)||0<a.indexOf("://")||0==a.indexOf("javascript:")?a: this.Zd+a:this.Zd};c.prototype.Ob=function(a,b,e){var f=(new RegExp("%0*"+b,"i")).exec(a.toString());if(f){f=f.toString();var g=e.toString();f.charAt(f.length-1)!=b&&(g=(1+e).toString());if(!isNaN(parseFloat(e)))for(;g.length<f.length-1;)g="0"+g;a=a.replace(f,g)}return a};c.prototype.pe=function(a,b,e,f,g){var h=this.u.Dk-1-b,l=this.u.Fk,k="x";switch(a){case 0:k="f";break;case 1:k="r";break;case 2:k="b";break;case 3:k="l";break;case 4:k="u";break;case 5:k="d";break;case "vr":k="vr"}g&&(a+="l",k+= "l");for(g=0;3>g;g++)l=this.Ob(l,"c",a),l=this.Ob(l,"s",k),l=this.Ob(l,"r",b),l=this.Ob(l,"l",h),l=this.Ob(l,"x",e),l=this.Ob(l,"y",f),l=this.Ob(l,"v",f),l=this.Ob(l,"h",e);return this.Hb(l)};c.prototype.Rg=function(){return this.pan.j};c.prototype.cq=function(){return this.F.pan};c.prototype.ym=function(){for(var a=this.pan.j;-180>a;)a+=360;for(;180<a;)a-=360;return a};c.prototype.Ie=function(){for(var a=this.pan.j-this.pan.Lk;-180>a;)a+=360;for(;180<a;)a-=360;return a};c.prototype.Ye=function(a){this.Ea(); isNaN(a)||(this.pan.j=Number(a));this.update()};c.prototype.Zk=function(a){this.Ea();isNaN(a)||(this.pan.j=Number(a)+this.pan.Lk);this.update()};c.prototype.Ll=function(a,b){isNaN(a)||(this.Ye(this.Rg()+a),b&&(this.pan.d=a))};c.prototype.cp=function(a,b){this.Ll(a*this.si(),b)};c.prototype.wi=function(){return this.v.j};c.prototype.kq=function(){return this.F.v};c.prototype.Ze=function(a){this.Ea();isNaN(a)||(this.v.j=Number(a));this.update()};c.prototype.Nl=function(a,b){this.Ze(this.wi()+a);b&& (this.v.d=a)};c.prototype.fp=function(a,b){this.Nl(a*this.si(),b)};c.prototype.dj=function(a){this.Ea();isNaN(a)||(this.U.j=Number(a));this.update()};c.prototype.Cm=function(){return this.U.j};c.prototype.kk=function(){return this.fov.j};c.prototype.Dp=function(){return this.F.Vd};c.prototype.Xe=function(a){this.Ea();switch(this.Sa()){case 4:var b=170;break;case 12:b=360;break;case 9:b=355;break;default:b=170}2==this.Xa&&(b=9999999999);!isNaN(a)&&0<a&&a<b&&(b=this.fov.j,this.fov.j=1*a,b!=this.fov.j&& this.update())};c.prototype.Kl=function(a,b){this.Xe(this.kk()+a);b&&(this.fov.d=a)};c.prototype.Oj=function(a,b){if(!isNaN(a)){var e=a/90*Math.cos(Math.min(this.fov.j,90)*Math.PI/360);e=this.fov.j*Math.exp(e);this.Xe(e);b&&(this.fov.d=a)}};c.prototype.Kr=function(a,b){this.Ea();isNaN(a)||(this.pan.j=a);isNaN(b)||(this.v.j=b);this.update()};c.prototype.Lr=function(a,b,e){this.Ea();!isNaN(a)&&1E7>a&&-1E7<a&&(this.pan.j=a);!isNaN(b)&&1E7>b&&-1E7<b&&(this.v.j=b);!isNaN(e)&&1E7>e&&-1E7<e&&(this.U.j=e); this.update()};c.prototype.cj=function(a,b,e){this.Ea();isNaN(a)||(this.pan.j=a);isNaN(b)||(this.v.j=b);isNaN(e)||this.Xe(e);this.update()};c.prototype.Fr=function(){this.cj(this.pan.cb,this.v.cb,this.fov.cb)};c.prototype.setLocked=function(a){this.Nn(a);this.On(a);this.Mn(a)};c.prototype.Nn=function(a){this.M.lc=a};c.prototype.Mn=function(a){this.M.nh=a};c.prototype.Pp=function(){return this.M.nh};c.prototype.On=function(a){this.M.ee=a};c.prototype.aj=function(a){this.qc=a};c.prototype.Ep=function(){return this.tk()? !0:this.pk};c.prototype.Xr=function(a,b){void 0===b&&(b=!0);this.to=b;this.kg==!a&&(a&&this.tk()?this.En():((this.kg=!!a)?this.kb.Eh=!0:this.U.j=0,this.K("gyrochanged",{}),this.K("playerstatechanged",{})))};c.prototype.tk=function(){return window.hasOwnProperty("DeviceOrientationEvent")&&DeviceOrientationEvent.hasOwnProperty("requestPermission")&&"function"===typeof DeviceOrientationEvent.requestPermission?!0:!1};c.prototype.En=function(){var a=this;if(this.tk())try{DeviceOrientationEvent.requestPermission().then(function(b){"granted"=== b&&(a.kb.Eh=!0,a.kg=!0,a.K("gyrochanged",{}),a.K("playerstatechanged",{}))})["catch"](console.error)}catch(b){console.log(b)}};c.prototype.lq=function(){return this.kg};c.prototype.bq=function(){return this.If?5:this.xd?4:this.Xm?1:this.Um?2:this.Tm?3:0};c.prototype.Bp=function(){return this.zk?5:this.Jf?4:this.Fi?2:this.kc?3:this.yk?1:0};c.prototype.moveTo=function(a,b,e,f,g,h){this.Ea();if("_blank"!==a&&""!==a){this.F.active=!0;this.F.aborted=!1;this.F.ol=!1;var l=a.toString().split("/");1<l.length&& (a=Number(l[0]),f=Number(b),b=Number(l[1]),2<l.length&&(e=Number(l[2])));this.F.pan=isNaN(a)?this.pan.j:Number(a);this.F.v=isNaN(b)?this.v.j:Number(b);this.F.fov=!isNaN(e)&&0<e&&180>e?Number(e):this.fov.j;this.F.speed=!isNaN(f)&&0<f?Number(f):1;this.F.U=isNaN(g)?this.U.j:Number(g);void 0!==h?!a||4!=h&&12!=h&&9!=h||(this.F.Nb=h):this.F.Nb=this.Wa}};c.prototype.Qi=function(a){this.Ea();var b=0,e=0,f=70,g=4,h=0,l=1;a.hasOwnProperty("pan")&&(b=Number(a.pan),this.F.pan=b);a.hasOwnProperty("tilt")&&(e= Number(a.tilt),this.F.v=e);a.hasOwnProperty("fov")&&(f=Number(a.fov),this.F.fov=f);a.hasOwnProperty("projection")&&(g=Number(a.projection),this.F.Nb=g);a.hasOwnProperty("timingFunction")&&(h=Number(a.timingFunction));a.hasOwnProperty("speed")&&(l=Number(a.speed));0>=l?(this.cj(b,e,f),this.Qc(g)):(a=new x.sl,a.ab="__AutoMove",a.ne=this.ym(),a.Ih=this.v.j,a.Sd=this.fov.j,a.Hh=this.Wa,a.Ud=b,a.oe=e,a.fg=f,a.Ad=g,a.vf=!1,a.Ce=!1,a.De=!1,0==h&&(a.Ce=!0),1==h&&(a.vf=!0,a.Ce=!0),2==h&&(a.De=!0),a.speed= l,this.F.Bl=this.I,this.I=this.lm(a),this.F.Cl=(new Date).getTime(),this.F.ol=!0,this.F.active=!0,this.F.aborted=!1,this.F.pan=b,this.F.v=e,this.F.fov=f,this.Xd=!1)};c.prototype.Oq=function(a){this.moveTo(this.pan.cb,this.v.cb,this.fov.cb,a)};c.prototype.Pq=function(a,b){var e={};e.pan=this.pan.cb;e.tilt=this.v.cb;e.fov=this.fov.cb;e.projection=this.Ui;e.timingFunction=b;e.speed=a;this.Qi(e)};c.prototype.Qo=function(a,b,e,f){var g=new x.$h(this);g.type="point";g.pan=b;g.v=e;g.id=a;g.f={};g.f.player= this;g.xf();g.f.hotspot=g;g.f.__div=document.createElement("div");g.f.__div.appendChild(f);this.W.push(g);g.f.__div.style.position="absolute";g.f.__div.style.left="-1000px";g.f.__div.style.top="-1000px";this.Ra.insertBefore(g.f.__div,this.Ra.firstChild);this.Na=!0};c.prototype.Ds=function(a,b,e){for(var f=0;f<this.W.length;f++){var g=this.W[f];g.id==a&&(g.pan=b,g.v=e,g.xf())}this.Na=!0};c.prototype.tr=function(a){for(var b=-1,e,f=0;f<this.W.length;f++)e=this.W[f],e.id==a&&(b=f);-1<b&&(e=this.W.splice(b, 1).pop(),e.f&&e.f.__div&&this.Ra.removeChild(e.f.__div))};c.prototype.fq=function(){for(var a=[],b=0;b<this.W.length;b++){var e=this.W[b];"point"==e.type&&a.push(String(e.id))}return a};c.prototype.Hp=function(a){for(var b=0;b<this.W.length;b++){var e=this.W[b];if(e.id==a)return b={},b.id=a,b.pan=e.pan,b.tilt=e.v,b.url=e.url,b.target=e.target,b.distance=e.distance,b.title=e.title,b.description=e.description,b.skinid=e.bl,e.Zc&&(b.customimage=e.Zc,b.customimagewidth=e.Be,b.customimageheight=e.Gd,b.use3D= e.jg,b.distance3D=e.mi),e.f&&e.f.__div&&(b.div=e.f.__div),b}};c.prototype.wo=function(a,b){this.ga.start.x=a;this.ga.start.y=b;this.ga.oa.x=a;this.ga.oa.y=b;this.Ka.oa.x=a;this.Ka.oa.y=b;this.Sk++;this.pan.Yc=this.pan.j;this.v.Yc=this.v.j};c.prototype.uo=function(a,b){var e=this.jc();this.pan.Yc+=a*e/this.C.height;this.v.Yc+=b*e/this.C.height;this.pan.j=this.pan.Yc;this.v.j=this.v.Yc};c.prototype.vo=function(a,b){this.ga.j.x=a;this.ga.j.y=b;this.ga.na.x=this.ga.j.x-this.ga.oa.x;this.ga.na.y=this.ga.j.y- this.ga.oa.y;this.M.Ld&&(this.ga.oa.x=this.ga.j.x,this.ga.oa.y=this.ga.j.y,this.update())};c.prototype.Ea=function(){this.B.active&&(this.B.active=!1,this.K("autorotatechanged",{}),this.pan.d=0,this.v.d=0,this.fov.d=0);this.F.active&&(this.F.active=!1,this.pan.d=0,this.v.d=0,this.fov.d=0);this.hf=this.F.aborted=!1;this.B.Pi=!1;this.Ed=.02;this.rg=0;this.B.lg&&(this.B.enabled=this.B.kf);this.Lf=(new Date).getTime()};c.prototype.Np=function(){return this.Lf};c.prototype.zm=function(a,b){a||(a=this.qa.x, b=this.qa.y);var e=this.C.height/(2*Math.tan(this.fov.j*Math.PI/360));a-=this.C.width/2;b-=this.C.height/2;var f={};f.pan=180*Math.atan(a/e)/Math.PI;f.tilt=180*Math.atan(-b/Math.sqrt(a*a+e*e))/Math.PI;return f};c.prototype.hq=function(a,b){a||(a=this.qa.x,b=this.qa.y);if(2===this.Xa){var e=this.fov.j/this.C.height;a=-(a-this.C.width/2)*e+this.pan.j;b=-(b-this.C.height/2)*e+this.v.j}else{e=new x.Ga(0,0,1);a=this.zm(a,b);e.Rd(-a.tilt);e.Ve(a.pan);e.Rd(-this.v.j);e.Ve(-this.pan.j);e.Rd(-this.Oa.pitch); e.We(this.Oa.U);for(a=e.Wo()-180;-180>a;)a+=360;b=e.Xo()}e={};e.pan=a;e.tilt=b;return e};c.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};c.prototype.Qj=function(a,b){var e=this.sd(),f,g;for(f=0;f<this.S.length+this.eb.length;f++){var h=f<this.S.length?this.S[f]:this.eb[f-this.S.length];if(h.ob)return h}for(f=0;f<this.S.length+ this.eb.length;f++)if(h=f<this.S.length?this.S[f]:this.eb[f-this.S.length],!h.fd){var l=[],k=new x.Ga,w;var r=g=void 0;0<h.fov&&(g=Math.tan(h.fov/2*Math.PI/180),r=0<h.zc?g*h.cd/h.zc:g,h.Ic&&1!=h.Ic&&(r*=h.Ic));for(w=0;4>w;w++){switch(w){case 0:k.init(-g,-r,0);break;case 1:k.init(g,-r,0);break;case 2:k.init(g,r,0);break;case 3:k.init(-g,r,0)}k.Fa(h.Fa*Math.PI/180);k.La(-h.La*Math.PI/180);k.lb(h.lb*Math.PI/180);--k.z;k.Fa(-h.v*Math.PI/180);k.La(h.pan*Math.PI/180);k.La(-this.pan.j*Math.PI/180);k.Fa(this.v.j* Math.PI/180);k.lb(this.U.j*Math.PI/180);l.push(k.clone())}l=this.Rj(l);if(0<l.length){for(w=0;w<l.length;w++)k=l[w],.1>k.z?(r=-e/k.z,g=this.C.width/2+k.x*r,r=this.C.height/2+k.y*r):r=g=0,k.Yb=g,k.Bb=r;if(this.Mm(l,a,b))return h}}return null};c.prototype.ah=function(){return document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement&&null!=document.msFullscreenElement||document.fullScreen};c.prototype.Nq=function(a){this.oo(a);window.focus();if(this.rd)this.rd.onclick();(this.Fe|| this.yf&&this.Jf)&&this.ri();this.Qb=null;if(!this.M.lc&&!this.qc){a=a?a:window.event;if(a.which||0==a.which||1==a.which){var b=(new Date).getTime();if(this.je){this.Qb=this.je;this.Y.Nc=!0;this.Y.startTime=b;a.stopPropagation();return}if(this.Kc(a.target)){var e;(e=this.Qj(this.qa.x,this.qa.y))&&e.Ke&&(this.Qb=e);this.wo(a.pageX,a.pageY);this.Y.Nc=!0;this.Y.startTime=b;a.preventDefault();this.Ea()}}this.ga.na.x=0;this.ga.na.y=0}};c.prototype.ig=function(a,b){var e=this.H.oj;e.enabled&&(this.Ca!= this.mb&&0<=a&&0<=b&&""!=this.Ca.title?(this.Ha.innerHTML=this.Ca.title,this.Ha.style.color=this.fa(e.pj,e.nj),this.Ha.style.backgroundColor=e.background?this.fa(e.dc,e.cc):"transparent",this.Ha.style.border="solid "+this.fa(e.fc,e.ec)+" "+e.ei+"px",this.Ha.style.borderRadius=e.Jj+"px",this.Ha.style.textAlign="center",0<e.width?(this.Ha.style.left=a-e.width/2+this.margin.left+"px",this.Ha.style.width=e.width+"px"):(this.Ha.style.width="auto",this.Ha.style.left=a-this.Ha.offsetWidth/2+this.margin.left+ "px"),this.Ha.style.height=0<e.height?e.height+"px":"auto",this.Ha.style.top=b+25+ +this.margin.top+"px",this.Ha.style.visibility="inherit",this.Ha.style.overflow="hidden"):(this.Ha.style.visibility="hidden",this.Ha.innerHTML=""))};c.prototype.oo=function(a){var b=this.Je();this.ah()?(this.qa.x=a.clientX-this.margin.left,this.qa.y=a.clientY-this.margin.top):(this.qa.x=a.pageX-b.x,this.qa.y=a.pageY-b.y);return b};c.prototype.ag=function(a){this.Ca=a&&null!==a&&"object"==typeof a?a:this.mb;this.Ca== this.mb&&(a=this.gi(this.qa.x,this.qa.y))&&(a.gb=0);this.Ca.xf&&this.Ca.xf();this.hotspot=this.Ca;this.K("activehotspotchanged",{hotspot:this.Ca})};c.prototype.Mq=function(a){a=a?a:window.event;var b=this.oo(a);if(!this.M.lc&&!this.qc&&!this.je){this.B.active&&(this.B.Li=(new Date).getTime());0==a.buttons&&(this.Y.Nc=!1);this.Y.Nc&&(a.preventDefault(),(a.which||0==a.which||1==a.which)&&this.vo(a.pageX,a.pageY),this.Ea());var e=!1;if(this.Ca==this.mb||"poly"==this.Ca.type){var f=this.mb;0<this.W.length&& this.Kc(a.target)&&(f=this.gi(this.qa.x,this.qa.y));this.$i(f);this.ig(a.pageX-b.x,a.pageY-b.y);0!=f&&f!=this.mb&&(e=!0)}b=null;!e&&this.Kc(a.target)&&(b=this.Qj(this.qa.x,this.qa.y));this.B.ki&&(this.B.ki=!1);this.Ra.style.cursor=this.Ca!=this.mb&&this.Ca.Df&&e||b&&b.Xg?"pointer":"default"}};c.prototype.$i=function(a){!1===a&&(a=this.mb);this.Ca!=a&&(this.Ca!=this.mb&&(0<this.H.mode&&(this.Ca.gb=0),this.la&&this.la.hotspotProxyOut&&this.la.hotspotProxyOut(this.Ca.id,this.Ca.url)),a!=this.mb?(this.ag(a), this.la&&this.la.hotspotProxyOver&&this.la.hotspotProxyOver(this.Ca.id,this.Ca.url),0<this.H.mode&&(this.H.gb=1,this.Ca.gb=1)):(this.ag(this.mb),0<this.H.mode&&(this.H.gb=0)),this.ra&&this.ra.changeCurrentHotspot(this.Ca.id))};c.prototype.Lq=function(a){a=a?a:window.event;this.Ki=-1;(this.Fe||this.yf&&this.Jf)&&this.ri();if(!this.M.lc&&!this.qc&&(this.Qb&&(this.Qb.Ke(),this.je=this.Qb.ob?this.Qb:null),this.Y.Nc)){this.Ea();a.preventDefault();this.Y.Nc=!1;a=(new Date).getTime();var b=Math.abs(this.ga.start.x- this.ga.oa.x)+Math.abs(this.ga.start.y-this.ga.oa.y);if(400>a-this.Y.startTime&&0<=b&&20>b){var e=this.gi(this.qa.x,this.qa.y);e&&this.jo(e);b=Math.abs(this.ga.Od.x-this.ga.oa.x)+Math.abs(this.ga.Od.y-this.ga.oa.y);700>a-this.fh&&0<=b&&20>b?(e?this.ko(e):this.M.$j&&this.sj(),this.fh=0):this.fh=a;this.ga.Od.x=this.ga.oa.x;this.ga.Od.y=this.ga.oa.y}}};c.prototype.fn=function(a){if(!this.M.ee&&!this.qc&&(a=a?a:window.event,this.Kc(a.target))){var b=a.detail?-1*a.detail:a.wheelDelta/40;this.M.Qm&&(b= -b);a.axis&&(-1==this.Ki?this.Ki=a.axis:this.Ki!=a.axis&&(b=0));var e=0<b?1:-1;a.wheelDeltaX&&a.wheelDeltaY&&Math.abs(a.wheelDeltaX)>Math.abs(a.wheelDeltaY)&&(b=0);0!=b&&(this.Oj(e*this.M.Wn,!0),this.update());a.preventDefault();this.Ea()}};c.prototype.zs=function(a){a||(a=window.event);var b=a.touches,e=this.Je();this.qa.x=b[0].pageX-e.x;this.qa.y=b[0].pageY-e.y;this.qe=this.Qb=null;window.focus();this.zi||(this.zi=!0,this.K("hastouch",{}),this.K("playerstatechanged",{}));this.Vm||this.If||!(this.Fe|| this.yf&&this.Jf)||this.ri();if(!this.M.lc&&!this.qc){var f=(new Date).getTime();if(this.je)this.Qb=this.je,this.Y.ad=!0,this.Y.startTime=f,a.preventDefault(),this.Y.Ah=!0;else{if(!this.Y.ad&&b[0]){this.Y.startTime=f;this.Y.start.x=b[0].pageX;this.Y.start.y=b[0].pageY;this.Y.oa.x=b[0].pageX;this.Y.oa.y=b[0].pageY;this.ub=b[0].target;if(this.Kc(this.ub)){(f=this.Qj(this.qa.x,this.qa.y))&&f.Ke&&(this.Qb=f);if(f=this.gi(this.qa.x,this.qa.y))this.N(f),this.qe=f,this.$i(f),f=this.Pg(a),this.ig(f.x-e.x, f.y-e.y);this.wo(b[0].pageX,b[0].pageY);this.Y.em=b[0].identifier;this.Y.ad=!0;a.preventDefault();this.Y.Ah=!0;this.Ea()}if(this.ub){e=this.ub;for(f=!1;e&&e!=this.control;){if(e.onmouseover)e.onmouseover();e.onmousedown&&!f&&(e.onmousedown(),f=!0);e=e.parentNode}f&&(a.preventDefault(),this.Y.Ah=!0)}}1<b.length&&(this.Y.ad=!1);!this.rk&&2==b.length&&b[0]&&b[1]&&this.Kc(this.ub)&&(a=b[0].pageX-b[1].pageX,b=b[0].pageY-b[1].pageY,this.fov.Xn=Math.sqrt(a*a+b*b),this.fov.prev=this.fov.j);this.ga.na.x=0; this.ga.na.y=0}}};c.prototype.ri=function(){this.yf=this.Fe=!1;try{this.Sh&&this.D.f&&(!this.D.yd&&this.D.dl&&this.D.f.play(),this.D.f.muted=!1);if(this.ua&&(this.ua.resume(),"suspended"==this.ua.state)){this.Fe=!0;return}if(this.xd&&this.ua&&this.ua.createOscillator){var a=this.ua.createOscillator(),b=this.ua.createGain();a.frequency.value=30;a.type="sine";a.connect(b);b.connect(this.ua.destination);b.gain.value=.01;a.start(0);setTimeout(function(){a.stop()},1E4)}for(b=0;b<this.X.length;b++){var e= this.X[b];!this.isPlaying(e.id)&&0<=e.loop&&e.autoplay&&this.Re(e.id,e.loop)}for(b=0;b<this.S.length;b++){var f=this.S[b];!this.isPlaying(f.id)&&f.autoplay&&this.Sh&&this.Re(f.id,f.loop);this.isPlaying(f.id)&&f.autoplay&&this.Sh&&(f.Dd&&f.qg(),f.f.muted=!1)}}catch(g){this.N(g)}};c.prototype.ys=function(a){a||(a=window.event);var b=a.touches,e=this.Je();this.qa.x=b[0].pageX-e.x;this.qa.y=b[0].pageY-e.y;if(this.M.lc||this.qc)(this.J.Bd||this.J.se)&&a.preventDefault();else{b[0]&&(this.Y.oa.x=b[0].pageX, this.Y.oa.y=b[0].pageY);if(this.ub){for(var f=this.ub,g=!1;f&&f!=this.control&&!g;)"scrollarea"==f.ggType&&(g=!0),"map"==f.ggType&&(g=!0),"text"==f.ggType&&(g=!0),f=f.parentNode;g||a.preventDefault()}if(this.Y.ad){a.preventDefault();for(f=0;f<b.length;f++)if(b[f].identifier==this.Y.em){this.vo(b[f].pageX,b[f].pageY);break}this.qe&&(f=this.Pg(a),this.ig(f.x-e.x,f.y-e.y));this.Ea()}2==b.length&&b[0]&&b[1]&&(this.Y.ad=!1,!this.rk&&this.Kc(this.ub)&&(this.M.ee||(e=b[0].pageX-b[1].pageX,b=b[0].pageY-b[1].pageY, this.fov.Vl=Math.sqrt(e*e+b*b),this.Ka.fov.active=!0,this.Ka.fov.yc=this.fov.prev*Math.sqrt(this.fov.Xn/this.fov.Vl),4==this.Sa()&&2!=this.Xa&&this.Ka.fov.yc>this.fov.max&&(this.Ka.fov.yc=this.fov.max),this.Ka.fov.yc<this.fov.min&&(this.Ka.fov.yc=this.fov.min)),this.Ea(),a.preventDefault()))}};c.prototype.xs=function(a){this.Y.Ah&&(this.Y.Ah=!1,a.preventDefault());var b=this.Je(),e=!1;(this.Fe||this.yf&&this.Jf)&&this.ri();if(!this.M.lc&&!this.qc){this.Y.ad&&(a.preventDefault(),this.Ea());var f=(new Date).getTime(); var g=void 0;var h=!1;g=Math.abs(this.Y.start.x-this.Y.oa.x)+Math.abs(this.Y.start.y-this.Y.oa.y);if(0<=g&&20>g){e=!0;this.Kc(this.ub)&&(a.preventDefault(),this.Qb&&(this.Qb.Ke(),this.je=this.Qb.ob?this.Qb:null));if(this.ub){for(g=this.ub;g&&g!=this.control;)g.onclick&&(g.onclick(),"hotspot"!=g.Ws&&(h=!0),e=!1),g=g.parentNode;h&&a.preventDefault()}g=Math.abs(this.Y.Od.x-this.Y.oa.x)+Math.abs(this.Y.Od.y-this.Y.oa.y);if(700>f-this.fh&&0<=g&&20>g){if(this.Kc(this.ub))if(a.preventDefault(),this.qe)this.ko(this.qe); else if(this.M.$j){var l=this;setTimeout(function(){l.sj()},1)}if(this.ub){for(g=this.ub;g&&g!=this.control;)g.ondblclick&&(g.ondblclick(),h=!0,e=!1),g=g.parentNode;h&&a.preventDefault()}this.fh=0}else this.fh=f;this.Y.Od.x=this.Y.oa.x;this.Y.Od.y=this.Y.oa.y}if(this.ub)for(g=this.ub;g&&g!=this.control;){if(g.onmouseout)g.onmouseout();if(g.onmouseup)g.onmouseup();g=g.parentNode}a=this.Pg(a);this.ig(a.x-b.x,a.y-b.y);this.qe&&e&&this.jo(this.qe);this.ub=null;this.Y.ad=!1;this.$i(this.mb);this.qe=null}}; c.prototype.ws=function(a){var b=this.Je();this.M.lc||this.qc||(this.Y.ad=!1);this.qe=null;this.$i(this.mb);a=this.Pg(a);this.ig(a.x-b.x,a.y-b.y)};c.prototype.Wm=function(){return null!=this.ub||this.Y.ad||this.Y.Nc};c.prototype.gn=function(a){!this.Pe&&window.MSGesture&&(this.N("setup gesture"),this.Pe=new MSGesture,this.Pe.target=this.control);this.Pe&&this.Pe.addPointer(a.pointerId)};c.prototype.nm=function(a){this.rk=!0;this.Ri=1;this.M.lc||this.M.ee||this.qc||(a.touches?(this.ub=a.touches.target, this.Kc(a.target)&&(a.preventDefault(),this.fov.prev=this.fov.j,this.Ea())):(a.preventDefault(),this.fov.prev=this.fov.j,this.Ea()))};c.prototype.zp=function(a){this.M.lc||this.M.ee||this.qc||!this.Kc(a.target)||(a.preventDefault(),this.Ka.fov.active=!0,this.Ka.fov.yc=this.fov.prev/Math.sqrt(a.scale),4==this.Sa()&&2!=this.Xa&&this.Ka.fov.yc>this.fov.max&&(this.Ka.fov.yc=this.fov.max),this.update(),this.Ea())};c.prototype.Qq=function(a){this.M.lc||this.M.ee||this.qc||(a.preventDefault(),1!=a.scale&& (this.Ka.fov.active=!0,this.Ri*=a.scale,this.Ka.fov.yc=this.fov.prev/Math.sqrt(this.Ri),4==this.Sa()&&2!=this.Xa&&this.Ka.fov.yc>this.fov.max&&(this.Ka.fov.yc=this.fov.max),this.update(),this.Ea()))};c.prototype.mm=function(a){this.M.lc||this.M.ee||this.qc||(this.Ka.fov.active=!1,a.preventDefault(),this.Ea(),this.Pe&&this.Pe.reset&&this.Pe.reset())};c.prototype.Dq=function(a){this.M.nh||this.qc||(this.isFullscreen&&a.preventDefault(),this.Ii=a.keyCode,this.Ea())};c.prototype.Eq=function(a){this.Ii&& (this.Ii=0,a.preventDefault())};c.prototype.Wq=function(){this.Ii=0};c.prototype.wh=function(){this.isFullscreen&&(this.ah()||this.exitFullscreen(),this.ah()&&(this.$.style.left="0px",this.$.style.top="0px"))};c.prototype.br=function(a,b,e,f){f?(this.Wg.alpha=a,this.Wg.beta=b,this.Wg.gamma=e,this.Wg.gamma+=90):(this.kb.alpha=a,this.kb.beta=b,this.kb.gamma=e,this.kb.gamma+=90);this.kb.orientation=window.orientation?1*parseInt(""+window.orientation,10):0;e=new x.ul;a=this.kb;e.Ve(-a.alpha);e.We(-a.beta); e.Rd(-a.gamma);e.We(90-a.orientation);1>e.Mb?-1<e.Mb?(b=180/Math.PI*Math.asin(-e.Mb),a=180/Math.PI*Math.atan2(e.pc,e.oc),e=180/Math.PI*Math.atan2(e.nc,e.mc)):(b=0,a=90,e=-180/Math.PI*Math.atan2(-e.Vb,e.Wb)):(b=0,a=-90,e=180/Math.PI*Math.atan2(-e.Vb,e.Wb));if(this.kg)if(this.Wm()||this.F.Bi||this.kb.Eh)this.kb.Qe=this.Rg()+e,this.kb.fadeIn=0,this.kb.Eh=!1;else{f=this.F.active;var g=1;10>this.kb.fadeIn&&(this.kb.fadeIn+=1,g=.1*this.kb.fadeIn);e=-e+this.kb.Qe;this.Ye(g*e+(1-g)*this.Rg());this.Ze(g*a+ (1-g)*this.wi());this.to?this.dj(g*b+(1-g)*this.Cm()):this.dj(0);this.yg();this.F.active=f}};c.prototype.jo=function(a){this.la&&this.la.hotspotProxyClick&&this.la.hotspotProxyClick(a.id,a.url);""!=a.url&&(this.Mk(a.url,a.target),this.ig(-1,-1))};c.prototype.ko=function(a){this.la&&this.la.hotspotProxyDoubleClick&&this.la.hotspotProxyDoubleClick(a.id,a.url)};c.prototype.si=function(){return Math.min(1,2*Math.tan(Math.PI*Math.min(this.fov.j,90)/360))};c.prototype.sn=function(){var a=this;setTimeout(function(){a.sn()}, 100);9!=a.Xi||a.Di||window.requestAnimationFrame(function(){a.yh();a.N("restart recover timer")});10<a.Xi&&1<a.Sk&&(a.Lc("recover timer - disabling requestAnimationFrame"),a.Di=!0,a.yh());a.Xi++};c.prototype.gj=function(a){var b={PAN:{value:0,name:"pan"},Vs:{value:1,name:"tilt"},Ts:{value:2,name:"fov"}},e=0,f=0,g=0,h;for(h in b){for(var l=b[h],k,w=Math.floor(a);!this.Bf(w,l.value)&&0<w;)w--;w=this.Bf(w,l.value);var r=this.Vp(w);if(r){k=new x.Gc(w.time,w.value);var y=new x.Gc(r.time,r.value),z=(a- w.time)/(r.time-w.time);if(0!=w.type||0!=r.type&&3!=r.type)if(3==w.type)k=w.value;else{z=new x.Gc;var ha=new x.Gc,ua=r.time-w.time;0==w.type?ha.init(w.time+.3*ua,w.value):ha.init(w.ye,w.ze);0==r.type||3==r.type?z.init(r.time-.3*ua,r.value):z.init(r.we,r.xe);r=new x.Gc;r.Ij(k,y,ha,z,a);k=r.y}else r=new x.Gc,r.Kd(k,y,z),k=r.y}else k=w.value;switch(l.value){case 0:l=this.pan.j;if(this.Xd&&3!=w.type){if(2!=this.Xa){for(;360<k;)k-=360;for(;-360>k;)k+=360}e=k-l;2!=this.Xa&&(180<e&&(e-=360),-180>e&&(e+= 360));this.pan.j+=e*this.Ed}else this.pan.j=k;this.B.kh=this.pan.j;break;case 1:l=this.v.j;this.Xd&&3!=w.type?(f=k-l,this.v.j+=f*this.Ed):this.v.j=k;this.B.lh=this.v.j;break;case 2:l=this.fov.j,this.Xd&&3!=w.type?(g=k-l,this.fov.j+=g*this.Ed):this.fov.j=k,this.B.jh=this.fov.j}}b=this.Sa();for(h=Math.floor(a);!this.Bf(h,3)&&0<h;)h--;h=this.Bf(h,3);w=a-h.time;this.Xd&&-1!=this.sg&&this.ci+this.Fj>a?(b=this.Og(this.sg),this.fov.j>b?this.ci=a:(w=(a-this.ci)/this.Fj,w=Math.min(1,w),this.Qc(this.Wa,this.sg, 1-w))):(0==h.Eb||w>h.Eb-.3?this.Qc(h.value):(w/=h.Eb,this.Qc(b,h.value,1-w)),this.B.bn=h.value);this.Xd&&(e=Math.sqrt(e*e+f*f+g*g),.3>e&&(this.Xd=!1,this.Ed=.02,this.rg=0),0<this.rg&&e>this.rg&&(this.Ed+=.01,this.Ed=Math.min(this.Ed,1)),this.rg=e);h=Math.floor(a);if(h!=this.Dl)for(this.Dl=h,a=this.Ap(h),e=0;e<a.length;e++)f=a[e],g=f.bi,this.Dc.hasOwnProperty(g)&&(b=this.Dc[g].type,0==b?this.me(g,f.pl):1==b?this.me(g,f.value):2==b&&this.me(g,"true"==f.pl));this.update()};c.prototype.om=function(){if(""!= this.B.Qf){var a=this.xm(this.B.Qf);if(0==a.length||1==a.length&&a[0]==this.Qa)return this.Qa}a=this.Qa;do if(this.B.mn){var b=1E3;do a=this.Ya[Math.floor(Math.random()*this.Ya.length)];while(b--&&a==this.Qa)}else b=this.Ya.indexOf(a),b++,b>=this.Ya.length&&(b=0),a=this.Ya[b];while(""!=this.B.Qf&&!this.Qg(a).tags.includes(this.B.Qf)&&a!=this.Qa);return a};c.prototype.jr=function(a){var b=this.F.speed;this.F.Ck&&(b=b*(a.getTime()-this.F.Ck)/60,5<b&&(b=5),.2>b&&(b=.2));this.F.Ck=a.getTime();this.B.Kg&& (this.za.ready()||4==this.Wa)&&this.ui()&&(this.B.Kg=!1,this.B.active=!0,this.xb.running=!0,this.xb.fk=!1);if(this.F.active||0!=this.F.Nb&&this.za.ready()){if(this.F.ol&&"__AutoMove"==this.I.ab){var e=a.getTime()-this.F.Cl;b=e/100;if(b>=this.I.length){if(this.gj(this.I.length),this.wa.splice(this.wa.indexOf(this.I),1),this.F.active=!1,this.I=this.F.Bl,this.F.Nb=0,this.cj(this.F.pan,this.F.v,this.F.fov),this.pan.Yc=this.F.pan,this.v.Yc=this.F.v,this.F.uh&&(this.F.uh=!1,this.B.Pi=!0,this.B.active=!0, this.K("autorotatechanged",{})),this.onMoveComplete)this.onMoveComplete()}else this.gj(b)}else{this.pan.d=this.F.pan-this.pan.j;if(360==this.pan.max-this.pan.min){for(;-180>this.pan.d;)this.pan.d+=360;for(;180<this.pan.d;)this.pan.d-=360}this.v.d=this.F.v-this.v.j;this.U.d=this.F.U-this.U.j;this.fov.d=this.F.fov-this.fov.j;e=b*this.si();var f=Math.sqrt(this.pan.d*this.pan.d+this.v.d*this.v.d+this.U.d*this.U.d+this.fov.d*this.fov.d),g=this.pan.j-this.F.kh,h=this.v.j-this.F.lh,l=this.U.j-this.F.cn, k=this.fov.j-this.F.jh;100*Math.sqrt(g*g+h*h+l*l+k*k)<e&&0==this.F.Nb&&(this.F.aborted=!0);this.F.kh=this.pan.j;this.F.lh=this.v.j;this.F.cn=this.U.j;this.F.jh=this.fov.j;if(100*f<e||this.F.aborted){if(this.pan.d=0,this.v.d=0,this.U.d=0,this.fov.d=0,this.F.active&&(this.F.active=!1,this.pan.j=this.F.pan,this.v.j=this.F.v,this.U.j=this.F.U,this.fov.j=this.F.fov,this.onMoveComplete))this.onMoveComplete()}else f=f>5*e?e/f:.2,this.pan.d*=f,this.v.d*=f,this.fov.d*=f;this.pan.j+=this.pan.d;this.v.j+=this.v.d; this.U.j+=this.U.d;this.fov.j+=this.fov.d;0!=this.F.Nb&&(this.F.Nb!=this.Wa?(b=this.Og(this.F.Nb),this.kk()>b?(this.fov.j+=-Math.max((2.5-1.7*Math.min(Math.sqrt(this.pan.d*this.pan.d+this.v.d*this.v.d+this.U.d*this.U.d)/e,1))*e,this.fov.d)-this.fov.d,this.F.fov=this.fov.j):(this.Cc=this.Wa,this.Wa=this.F.Nb,this.N("New projection from Target:"+this.Wa),this.xh=this.F.Ch=0,this.za.Ci())):1>this.F.Ch?(this.F.Ch=Math.min(1,this.F.Ch+.05*b),this.xh=this.F.Ch):(this.Cc=0,this.F.Nb=0,this.za.Ci()))}this.Lf= a.getTime();this.update()}else if(this.B.active){e=a.getTime()-this.B.startTime;this.B.Li<this.B.startTime&&(this.B.Li=this.B.startTime);if((this.B.lg||this.xb.running)&&0<this.wa.length){b=e/100;f=!1;if(this.Xb!=this.I.ab||""!=this.I.jf&&this.B.Yd!=this.I.jf){for(e=0;e<this.wa.length;e++)if(""==this.Xb&&this.wa[e].jf==this.B.Yd||""!=this.Xb&&this.wa[e].ab==this.Xb&&this.wa[e].jf==this.B.Yd){f=!0;this.I=this.wa[e];this.Xb=this.I.ab;break}!f&&0<this.wa.length&&this.wa[0].jf==this.B.Yd&&(f=!0,this.I= this.wa[0],this.Xb=this.I.ab)}else f=!0;if(f)if(e=(g=this.D.f&&this.D.yd)&&this.B.il&&!this.xb.running,this.hf){f=b;if(e)for(this.D.f.currentTime<this.El&&this.Hj&&(this.Gj++,this.Hj=!1),f=10*(this.Gj*this.D.f.duration+this.D.f.currentTime),this.El=this.D.f.currentTime,.05>this.D.f.duration-this.D.f.currentTime&&(this.Hj=!0);f>=10*this.gf;)f-=10*this.gf;if(!g&&b>=this.I.length||g&&!e&&b>=this.I.length||g&&e&&(this.I.ab!=this.I.hn||this.I.Si!=this.Qa)&&b>=this.I.length){this.gj(this.I.length);this.B.Nd= 0;this.hf=!1;if(this.xb.running){this.Kn();return}this.Xb=this.I.hn;this.Xb==this.I.ab&&this.Qa==this.I.Si?1<this.Ya.length&&0<this.B.Ti&&(e=this.om())&&(this.gd("{"+e+"}"),this.B.startTime=a.getTime(),this.hf=!1,this.B.active=!0,this.J.ve=!0):(this.Kf&&this.I.Si!=this.Qa&&(this.gd("{"+this.I.Si+"}",this.I.Tq),this.J.enabled?(this.B.active=!1,this.J.ve=!0):this.B.active=!0),this.B.startTime=a.getTime())}else this.gj(f),this.B.Nd=f}else if(b=this.I.ca[0],f=this.I.ca[1],g=this.I.ca[2],h=this.I.ca[3], 3!=h.sb&&(h=0),this.B.Pi||this.F.aborted||this.xb.running||e){if(this.hf=!0,this.B.startTime=0<this.B.Nd?a.getTime()-100*this.B.Nd:a.getTime(),this.Xd=e){for(this.gf=this.Gj=0;this.gf<this.I.length/10;)this.gf+=this.D.f.duration;f=10*this.D.f.currentTime;for(e=Math.floor(f);!this.Bf(e,3)&&0<e;)e--;e=this.Bf(e,3);e.value==this.Wa?this.sg=-1:(this.sg=e.value,this.ci=f,this.Fj=Math.max(5,e.time+e.Eb-f))}}else{e={};if(0<this.B.Nd)e.pan=this.B.kh,e.tilt=this.B.lh,e.fov=this.B.jh,e.projection=this.B.bn; else{for(e.pan=b.value;360<e.pan;)e.pan-=360;for(;-360>e.pan;)e.pan+=360;e.tilt=f.value;e.fov=g.value;e.projection=h?h.value:4}e.timingFunction=3;e.speed=1;this.F.uh=!0;this.Qi(e);this.B.active=!0}}else 0<this.B.Ti&&this.Kf&&e>=1E3*this.B.Ti?1<this.Ya.length&&(e=this.om())&&(this.B.startTime=a.getTime(),this.B.zd=a.getTime(),this.B.timeout=0,this.gd("{"+e+"}"),this.B.active=!0,this.J.ve=!0):(e=a.getTime(),f=b=1E3/60,0!=this.B.zd&&(f=e-this.B.zd),this.v.d=this.B.rj*(0-this.v.j)/100,this.fov.d=this.B.rj* (this.fov.cb-this.fov.j)/100,this.pan.d=.95*this.pan.d+-this.B.speed*this.si()*.05,b=f/b,this.pan.j+=this.pan.d*b,this.v.j+=this.v.d*b,this.fov.j+=this.fov.d*b,this.B.zd=e,this.update());3E3<a.getTime()-this.B.Li&&!this.B.ki&&(this.Ra.style.cursor="none",this.B.ki=!0)}else!this.xb.fk&&1E3<a.getTime()-this.Lf&&(this.wa.splice(this.wa.indexOf(this.I),1),this.I=this.Ng(!1),this.Xb=this.I.ab,this.B.active=!1,this.B.Kg=!0),this.B.enabled&&!this.Y.Ei()&&a.getTime()-this.Lf>1E3*this.B.timeout&&!this.B.Kg&& (this.B.Jh&&this.ui()||!this.B.Jh)&&(this.B.active=!0,this.B.startTime=a.getTime(),this.B.zd=0,this.K("autorotatechanged",{}),this.pan.d=0,this.v.d=0,this.fov.d=0),!this.Ka.enabled||this.Y.Ei()||0==this.pan.d&&0==this.v.d&&0==this.fov.d||(this.F.Bi=!0,this.pan.d*=.9,this.v.d*=.9,this.fov.d*=.9,this.pan.j+=this.pan.d,this.v.j+=this.v.d,this.Oj(this.fov.d),1E-4>this.pan.d*this.pan.d+this.v.d*this.v.d+this.fov.d*this.fov.d&&(this.pan.d=0,this.v.d=0,this.fov.d=0),this.update())};c.prototype.lr=function(a){var b= this.J;if(b.Bd){var e=a.getTime()-b.Co;e/=1E3*b.Bo;1<=e?(b.Bd=!1,this.cm(),b.el=a.getTime(),this.$n(),b.se=!0,0==b.uc||b.pg||(4==b.uc?(this.I=this.Ng(!0,b.af,b.bf,b.Vd),this.Xb=this.I.ab,this.B.active=!0,this.xb.running=!0):this.moveTo(b.af,b.bf,b.Vd,b.ue,0,b.Ad))):b.rn(e)}else b.se&&(e=a.getTime()-b.el,e/=1E3*b.ug,1<=e?(b.se=!1,this.Lf=a.getTime(),this.update(),0!=b.uc&&b.pg&&(4==b.uc?(this.I=this.Ng(!0,b.af,b.bf,b.Vd),this.Xb=this.I.ab,this.B.active=!0,this.xb.running=!0):this.moveTo(b.af,b.bf, b.Vd,b.ue,0,b.Ad)),4!=b.uc&&(this.aj(!1),this.B.active=b.ve,this.K("autorotatechanged",{}),b.ve=!1),this.B.zd=0,this.da&&this.Vj(),this.wg=!1):b.rn(e));b=this.er;b.Zo&&(b.li?a.getTime()-b.bk>=1E3*b.delay&&(b.li=!1):(b.current+=b.ld,0>b.current&&(b.current=0,b.ld=-b.ld,b.li=!0,b.bk=a.getTime()),1<b.current&&(b.current=1,b.ld=-b.ld,b.li=!0,b.bk=a.getTime())))};c.prototype.pr=function(){var a,b=this.H;if(0<b.tb.length){for(a=0;a<b.tb.length;a++)b.jd[a]!=b.$b[a]&&(b.jd[a]>b.$b[a]?(b.$b[a]+=.05,b.jd[a]< b.$b[a]&&(b.$b[a]=b.jd[a])):(b.$b[a]-=.05,b.jd[a]>b.$b[a]&&(b.$b[a]=b.jd[a],-1!=b.hj.indexOf(b.tb[a])&&(b.hj.splice(b.hj.indexOf(b.tb[a]),1),b.tb.splice(a,1),b.jd.splice(a,1),b.$b.splice(a,1)))));this.update()}if(2==b.mode)for(a=0;a<this.W.length;a++){var e=this.W[a];"poly"==e.type&&e.gb!=e.va&&(e.gb>e.va?(e.va+=b.ld,e.gb<e.va&&(e.va=e.gb)):(e.va-=b.ld,e.gb>e.va&&(e.va=e.gb)),this.update())}3==b.mode&&b.gb!=b.va&&(b.gb>b.va?(b.va+=b.ld,b.gb<b.va&&(b.va=b.gb)):(b.va-=b.ld,b.gb>b.va&&(b.va=b.gb)),this.update())}; c.prototype.nr=function(){var a=this.Ka;this.Y.Ei()&&(this.M.Ld?(a.na.x=.4*(this.ga.oa.x-a.oa.x),a.na.y=.4*(this.ga.oa.y-a.oa.y),a.oa.x+=a.na.x,a.oa.y+=a.na.y):(a.na.x=.1*-this.ga.na.x*this.M.sensitivity/8,a.na.y=.1*-this.ga.na.y*this.M.sensitivity/8),this.uo(a.na.x,a.na.y),this.update());a.fov.active&&(this.Kl(.4*(a.fov.yc-this.fov.j)),.001>Math.abs(a.fov.yc-this.fov.j)/this.fov.j&&(a.fov.active=!1),this.update());if(a.enabled&&(0!=a.na.x||0!=a.na.y)&&!this.Y.Ei()){var b=.9*(1-a.Xk);a.na.x*=b;a.na.y*= b;this.F.Bi=!0;.01>a.na.x*a.na.x+a.na.y*a.na.y?(a.na.x=0,a.na.y=0):(this.uo(a.na.x,a.na.y),this.update())}};c.prototype.kr=function(){if(this.M.Hn&&this.M.Ld){var a=this.vn;a.pan=this.pan.j;a.v=this.v.j;a.fov=this.fov.j;this.rf(a);this.rf(a);this.rf(a);var b=a.pan-this.pan.j,e=a.v-this.v.j;a=a.fov-this.fov.j;if(0!=b||0!=e||0!=a){var f=.2+.9*Math.min((Math.abs(b)+Math.abs(e)+Math.abs(a))/Math.abs(Math.min(this.fov.j,90))*.3,1);this.pan.j+=b*f;this.v.j+=e*f;this.fov.j+=a*f;this.Ka.Xk=.3;this.update()}else this.Ka.Xk= 0}else this.yg();if(isNaN(this.pan.j)||1E7<this.pan.j||-1E7>this.pan.j)this.pan.j=0;if(isNaN(this.v.j)||1E7<this.v.j||-1E7>this.v.j)this.v.j=0;if(isNaN(this.U.j)||1E7<this.U.j||-1E7>this.U.j)this.U.j=0;if(2!=this.Xa){for(;360<this.pan.j;)this.pan.j-=360;for(;-360>this.pan.j;)this.pan.j+=360}};c.prototype.mr=function(){if(!this.ui()&&this.Ef&&5<this.u.Dn){var a,b=0,e=this.hc.length;if(this.Rh)e=50,this.ck<e&&this.ck++,b=this.ck;else for(a=0;a<e;a++)(this.hc[a].complete&&this.hc[a].src!=this.Zl||""== this.hc[a].src)&&b++;b==e?(this.zh=1,this.isLoaded=!0,this.ta&&this.ta.ggLoaded&&this.ta.ggLoaded(),this.K("imagesready",{}),this.B.Jh&&this.B.enabled&&!this.F.active&&!this.J.Bd&&(this.B.active=!0,this.B.startTime=(new Date).getTime(),this.B.zd=0)):this.zh=b/(1*e);this.K("downloadprogress",{percentLoaded:this.zh})}};c.prototype.yh=function(){var a=this;a.Zi||(a.Di?setTimeout(function(){a.Zi=!1;a.yh()},1E3/60):window.requestAnimationFrame(function(){a.Zi=!1;a.yh()}));a.Zi=!0;this.Sk=this.Xi=0;a.F.Bi= !1;var b=new Date;this.ti++;120<=this.ti&&(this.N("F/s: "+Math.round(1E3*this.ti/(b.getTime()-this.Ym))),this.Ym=b.getTime(),this.ti=0);this.K("timer",{});this.ia&&this.za.sp();this.Pb&&""!==this.He&&!this.ra&&document.hasOwnProperty(this.He)&&document[this.He].setPan&&0==this.xp--&&(this.ra=document[this.He],this.kd=this.ia=!1,this.Ja&&(this.Ja.style.visibility="hidden"),this.ra.setLocked(!0),this.ra.setSlaveMode(!0),this.ra.readConfigString(this.Yj),this.Lc("Flash player '"+this.He+"' connected.")); this.nl&&(this.Sc(),this.nl=!1);this.nr();this.mr();this.jr(b);this.kr();this.lr(b);this.za.Hs();(0<=this.H.mode||0<this.H.tb.length)&&this.pr();this.wj();if(this.Mf.pan!=this.pan.j||this.Mf.v!=this.v.j||this.Mf.fov!=this.fov.j)this.Mf.pan=this.pan.j,this.Mf.v=this.v.j,this.Mf.fov=this.fov.j,this.K("positionchanged",{});this.$m!=this.Wa&&(this.$m=this.Wa,this.K("projectionchanged",{}));this.Na&&(0<this.Eg?this.Eg--:(this.Na=!1,this.Eg=0),this.J.se||this.J.Bd||this.te||(this.Qh(),this.K("renderframe", {})),this.K("repaint",{}));b=this.tm();b!=this.Zm&&(b?(this.ta&&this.ta.ggReLoadedLevels&&this.ta.ggReLoadedLevels(),this.K("tilesrequested",{})):(a.ta&&a.ta.ggLoadedLevels&&a.ta.ggLoadedLevels(),this.K("tilesready",{})),this.Zm=b)};c.prototype.Og=function(a){switch(a){case 4:a=Math.min(110,this.fov.max);break;case 12:a=Math.min(270,this.fov.Ik);a=Math.min(360*this.aspect(),a);a=Math.min(360/this.aspect(),a);break;case 9:a=Math.min(270,this.fov.Jk);break;default:a=90}return a};c.prototype.Es=function(){var a= this;setTimeout(function(){a.bg(!1)},10);setTimeout(function(){a.bg(!1)},100)};c.prototype.wj=function(){this.Xj.fm(this.pan.j,this.v.j);for(var a=0;a<this.X.length+this.S.length;a++){if(a<this.X.length)var b=this.X[a];else if(b=this.S[a-this.X.length],b.fd)continue;b.wj()}};c.prototype.ds=function(a,b){var e=this;var f="<<U>>"+String(e.Pa);f=f.toUpperCase();"U"!=f.charAt(2)&&(e.M.Ff=!1);if(0!=e.qh.length||!e.M.Ff||e.M.Ag||e.M.hi)if(e.rd)e.$.removeChild(e.rd),e.rd=null;else{e.rd=document.createElement("div"); var g=e.rd;f="left: "+a+"px;"+("top:\t "+b+"px;")+"z-index: 32000;";f+="position:relative;";f+="display: table;";f+="color: black;";f+="background-color: white;";f+="border: 1px solid lightgray;";f+="box-shadow: 1px 1px 3px #333;";f+="font-family: Verdana, Arial, Helvetica, sans-serif;";f+="font-size: 9pt;";f+="opacity : 0.95;";g.setAttribute("style",f);g.setAttribute("class","gg_contextmenu");f=document.createElement("style");a=document.createTextNode(".gg_context_row:hover { background-color: #3399FF }"); f.type="text/css";f.styleSheet?f.styleSheet.cssText=a.nodeValue:f.appendChild(a);g.appendChild(f);for(a=0;a<e.qh.length;a++){b=e.qh[a];var h=document.createElement("div");f="text-align: left;";f+="margin: 0;";f+="padding: 5px 20px;";f+="vertical-align: left;";h.setAttribute("style",f);h.setAttribute("class","gg_context_row");f=document.createElement("a");f.href=b.url;f.target="_blank";f.innerHTML=b.text;f.setAttribute("style","color: black; text-decoration: none;");h.appendChild(f);g.appendChild(h)}0< e.qh.length&&(!e.M.Ff||e.M.Ag||e.M.hi)&&g.appendChild(document.createElement("hr"));if(e.M.hi&&e.ia){b=[];b.push({text:"Rectilinear Projection",Bh:4});b.push({text:"Stereographic Projection",Bh:9});b.push({text:"Fisheye Projection",Bh:12});for(a=0;a<b.length;a++){h=b[a];var l=document.createElement("div");l.setAttribute("class","gg_context_row");f="text-align: left;";f+="margin: 0;";f=e.Wa==h.Bh?f+"padding: 5px 20px 5px 7px;":f+"padding: 5px 20px;";f+="vertical-align: left;";f+="cursor: pointer;"; l.setAttribute("style",f);l.onclick=function(k){return function(){e.Pj(k,1);e.update()}}(h.Bh);l.innerHTML=e.Wa==h.Bh?"⦿ "+h.text:h.text;g.appendChild(l)}e.M.Ff&&!e.M.Ag||g.appendChild(document.createElement("hr"))}e.M.Ag&&(a=document.createElement("div"),a.setAttribute("class","gg_context_row"),f="text-align: left;margin: 0;padding: 5px 20px;",f+="vertical-align: left;",f+="cursor: pointer;",a.setAttribute("style",f),a.onclick=function(){e.sj()},a.innerHTML=e.ah()?"Exit Fullscreen":"Enter Fullscreen", g.appendChild(a));e.M.Ff||(a=document.createElement("div"),f="text-align: left;margin: 0;padding: 5px 20px;",f+="vertical-align: left;",a.setAttribute("style",f),a.setAttribute("class","gg_context_row"),f=document.createElement("a"),f.href=c.Dg("aHR0cDovL3Bhbm8ydnIuY29tLw=="),f.target="_blank",f.innerHTML=c.Dg("Q3JlYXRlZCB3aXRoIFBhbm8yVlI="),7<this.Ni.length&&(f.innerHTML+="<br/>"+c.Wl(this.Ni).replace(/./gm,function(k){return"&#"+k.charCodeAt(0)+";"})),f.setAttribute("style","color: black; text-decoration: none;"), a.appendChild(f),g.appendChild(a));e.$.insertBefore(e.rd,e.$.firstChild);g.onclick=function(){e.rd&&(e.$.removeChild(e.rd),e.rd=null)};g.oncontextmenu=g.onclick}};c.prototype.Yo=function(){var a=this;var b=a.Ra;a.control=b;a.control=b;a.Es();setTimeout(function(){a.yh()},10);setTimeout(function(){a.sn()},200);setTimeout(function(){a.ff();a.Qh()},10);b.addEventListener&&(b.addEventListener("touchstart",function(e){a.zs(e)},!1),b.addEventListener("touchmove",function(e){a.ys(e)},!1),b.addEventListener("touchend", function(e){a.xs(e)},!1),b.addEventListener("touchcancel",function(e){a.ws(e)},!1),b.addEventListener("pointerdown",function(e){a.gn(e)},!1),b.addEventListener("MSPointerDown",function(e){a.gn(e)},!1),b.addEventListener("MSGestureStart",function(e){a.nm(e)},!1),b.addEventListener("MSGestureEnd",function(e){a.mm(e)},!1),b.addEventListener("MSGestureChange",function(e){a.Qq(e)},!1),b.addEventListener("gesturestart",function(e){a.nm(e)},!1),b.addEventListener("gesturechange",function(e){a.zp(e)},!1), b.addEventListener("gestureend",function(e){a.mm(e)},!1),b.addEventListener("mousedown",function(e){a.Nq(e)},!1),b.addEventListener("mousemove",function(e){a.Mq(e)},!1),document.addEventListener("mouseup",function(e){a.Lq(e)},!1),b.addEventListener("mousewheel",function(e){a.fn(e)},!1),b.addEventListener("DOMMouseScroll",function(e){a.fn(e)},!1),document.addEventListener("keydown",function(e){a.Dq(e)},!1),document.addEventListener("keyup",function(e){a.Eq(e)},!1),window.addEventListener("resize", function(){a.ff()},!1),window.addEventListener("blur",function(){a.Wq()},!1),a.$.addEventListener("webkitfullscreenchange",function(){a.wh()},!1),document.addEventListener("mozfullscreenchange",function(){a.wh()},!1),window.addEventListener("webkitfullscreenchange",function(){a.wh()},!1),document.addEventListener("MSFullscreenChange",function(){a.wh()},!1),document.addEventListener("fullscreenchange",function(){a.wh()},!1));b.oncontextmenu=function(e){void 0===e&&(e=window.event);if(e.target&&!a.Kc(e.target))return!0; if(!e.ctrlKey){e=a.Pg(e);var f=a.Je();a.ds(e.x-f.x,e.y-f.y);return!1}return!0};window.addEventListener("deviceorientation",function(e){a.br(e.alpha,e.beta,e.gamma,e.absolute);null!=e.alpha&&null!=e.beta&&null!=e.gamma&&0==a.pk&&(a.pk=!0,a.K("gyroavailable",{available:!0}),a.K("playerstatechanged",{}))})};c.prototype.Al=function(){for(var a=0;a<this.W.length;a++)if("point"==this.W[a].type&&(this.la&&this.la.addSkinHotspot?(this.W[a].xf(),this.W[a].f=this.la.addSkinHotspot(this.W[a])):(this.W[a].f= new x.Eo(this,this.W[a]),this.W[a].Zc&&this.W[a].jg&&(this.W[a].f.ggUse3d=!0,this.W[a].f.gg3dDistance=this.W[a].mi)),this.W[a].f.__div.style.left="-1000px",this.W[a].f.__div.style.top="-1000px",this.W[a].f&&this.W[a].f.__div)){var b=this.Ra.firstChild;b?this.Ra.insertBefore(this.W[a].f.__div,b):this.Ra.appendChild(this.W[a].f.__div)}};c.prototype.Ao=function(){var a,b=document.createElement("fakeelement"),e={OTransition:"oTransitionEnd",MSTransition:"msTransitionEnd",MozTransition:"transitionend", WebkitTransition:"webkitTransitionEnd",transition:"transitionEnd"};for(a in e)if(void 0!==b.style[a])return e[a]};c.prototype.nb=function(a){var b=[];a="#"==a.substr(0,1)?a.substr(1):"^"+a+"$";a=new RegExp(a,"");for(var e=0;e<this.X.length;e++)a.test(this.X[e].id)&&b.push(this.X[e]);for(e=0;e<this.S.length;e++)a.test(this.S[e].id)&&b.push(this.S[e]);for(e=0;e<this.eb.length;e++)a.test(this.eb[e].id)&&b.push(this.eb[e]);return b};c.prototype.Up=function(a){if("_videopanorama"==a)return this.D.f;a= this.nb(a);return 0<a.length?a[0].f:null};c.prototype.Tp=function(a){a=this.nb(a);return 0<a.length&&a[0].xa?a[0]:null};c.prototype.yn=function(a,b){var e=this;b.addEventListener("ended",function(g){e.K("videoended",{video:g.target})});b.addEventListener("pause",function(g){e.K("videopaused",{video:g.target})});b.addEventListener("play",function(g){e.K("videostarted",{video:g.target})});for(var f=0;f<this.S.length;f++)if(this.S[f].id==a)return this.S[f].f=b,this.S[f];f=new x.zl(this);f.registerElement(a, b);return f};c.prototype.isPlaying=function(a){if(this.Pb){var b=this.ra;if(b)return b.isPlaying(a)}else{if("_main"===a)return!0;a=this.nb(a);if(0<a.length)return a[0].xa?a[0].Oc:!a[0].f.ended&&!a[0].f.paused}return!1};c.prototype.Re=function(a,b){if(this.Pb){var e=this.ra;e&&e.playSound(a,b)}else try{e=this.nb(a);for(var f=0;f<e.length;f++){var g=e[f];g.wb=b&&!isNaN(Number(b))?Number(b)-1:g.loop-1;-1==g.wb&&(g.wb=1E7);this.N(g.f);this.isPlaying(a)&&this.kj(a);g.xa?g.Fd():(g.f.play(),!g.Dd||this.kc&& this.zi||g.qg());this.Ur(g.id)}}catch(h){this.N(h)}};c.prototype.tn=function(a,b){a=this.nb(a);for(var e=0;e<a.length;e++){var f=a[e];this.isPlaying(f.id)?this.Nk(f.id):this.Re(f.id,b)}};c.prototype.qr=function(a,b){a=this.nb(a);for(var e=0;e<a.length;e++){var f=a[e];this.isPlaying(f.id)?this.kj(f.id):this.Re(f.id,b)}};c.prototype.Nk=function(a){if(this.Pb){var b=this.ra;b&&b.pauseSound(a)}else try{if(b=void 0,"_main"==a){this.ej(a);for(b=0;b<this.X.length;b++)this.X[b].xa?this.X[b].Kj():this.X[b].f.pause(); for(b=0;b<this.S.length;b++)this.S[b].f.pause()}else{var e=this.nb(a);for(b=0;b<e.length;b++){var f=e[b];this.ej(f.id);f.xa?f.Kj():f.f.pause()}}}catch(g){this.N(g)}};c.prototype.Oo=function(a,b){a=this.nb(a);for(var e=0;e<a.length;e++){var f=a[e];0==b||1==b?f.Ug&&f.Ug(1==b):2==b&&f.Ke&&f.Ke();!f.ob||-1==this.eb.indexOf(f)&&-1==this.S.indexOf(f)||(this.Qb=this.je=f)}};c.prototype.kj=function(a){var b;if(this.Pb)(b=this.ra)&&b.stopSound(a);else try{if("_main"===a){this.ej(a);for(b=0;b<this.X.length;b++)this.X[b].xa? this.X[b].qf():(this.X[b].f.pause(),this.X[b].f.currentTime=0);for(b=0;b<this.S.length;b++)this.S[b].f.pause(),this.S[b].f.currentTime=0}else{var e=this.nb(a);for(b=0;b<e.length;b++){var f=e[b];this.ej(f.id);f.xa?f.qf():f.f&&f.f.pause&&(f.f.pause(),f.f.currentTime=0)}}}catch(g){this.N(g)}};c.prototype.ej=function(a){-1==this.Td.indexOf(a)&&this.Td.push(a);var b=this.ef.indexOf(a);-1!=b&&this.ef.splice(b,1);"_main"==a&&(this.ef=[])};c.prototype.Ur=function(a){-1!=this.Td.indexOf("_main")&&-1==this.ef.indexOf(a)&& this.ef.push(a);a=this.Td.indexOf(a);-1!=a&&this.Td.splice(a,1)};c.prototype.fs=function(a){a=this.nb(a);return 0<a.length?(a=a[0],a.xa?a.pf():a.f?a.f.currentTime:0):0};c.prototype.gs=function(a,b){a=this.nb(a);0<a.length&&(a=a[0],a.xa?(0>b&&(b=0),b>a.fi()&&(b=a.fi()-.1),a.Il(b)):a.f&&(0>b&&(b=0),b>a.f.duration&&(b=a.f.duration-.1),a.f.currentTime=b))};c.prototype.setVolume=function(a,b){if(this.Pb){var e=this.ra;e&&e.setVolume(a,b)}else try{e=void 0;var f=Number(b);1<f&&(f=1);0>f&&(f=0);"_videopanorama"=== a&&this.D.f&&(this.D.f.volume=f);if("_main"===a){this.ba=f;for(e=0;e<this.X.length;e++)this.X[e].f.volume=this.X[e].level*this.ba;for(e=0;e<this.S.length;e++)this.S[e].f.volume=this.S[e].level*this.ba;this.D.f&&(this.D.f.volume=this.ba)}else{var g=this.nb(a);this.N(g);for(e=0;e<g.length;e++){var h=g[e];h.f&&null!=h.f.volume&&(h.f.volume=f*this.ba);h.level=f}}}catch(l){this.N(l)}};c.prototype.ip=function(a,b){if(this.Pb){var e=this.ra;e&&e.changeVolume(a,b)}else try{var f=e=void 0;"_videopanorama"=== a&&this.D.f&&(this.D.f.volume+=Number(b));if("_main"===a){e=this.ba;e+=Number(b);1<e&&(e=1);0>e&&(e=0);this.ba=e;for(f=0;f<this.X.length;f++)this.X[f].f.volume=this.X[f].level*this.ba;for(f=0;f<this.S.length;f++)this.S[f].f.volume=this.S[f].level*this.ba;this.D.f&&(this.D.f.volume=this.ba)}else{var g=this.nb(a);for(f=0;f<g.length;f++){var h=g[f];e=h.level;e+=Number(b);1<e&&(e=1);0>e&&(e=0);h.level=e;h.f&&null!=h.f.volume&&(h.f.volume=e*this.ba)}}}catch(l){this.N(l)}};c.prototype.bj=function(a,b,e){a.f.style.opacity= 0==b?1:0;a.f.style[this.$c]="opacity "+e+"ms";a.f.style.opacity=0==b?0:1};c.prototype.Jr=function(a,b,e){function f(){var k=g[l];if(!k.f)return"continue";0==b?(h.bj(k,b,e),setTimeout(function(){0==k.f.style.opacity&&k.cg(!1)},e+10),k.pb=!1):1==b?(h.bj(k,b,e),k.cg(!0),k.pb=!0):2==b&&("visible"==k.f.style.visibility?(h.bj(k,0,e),setTimeout(function(){0==k.f.style.opacity&&k.cg(!1)},e+10),k.pb=!1):(h.bj(k,1,e),k.cg(!0),k.pb=!0))}for(var g=this.nb(a),h=this,l=0;l<g.length;l++)f()};c.prototype.$n=function(){try{var a= this,b=!1,e=!1;this.Ia.enabled&&(this.Ia.ii?e=!0:b=!0);for(var f=0;f<this.X.length;f++){var g=this.X[f];this.isPlaying(g.id)?e&&(g.pa=0):-1==g.loop||-1!=this.Td.indexOf(g.id)||-1!=this.Td.indexOf("_main")&&-1==this.ef.indexOf(g.id)||4==g.mode||6==g.mode||!this.ua||!(this.Ia.enabled&&this.Ia.ii||!this.Ia.enabled)||"_background"==g.id&&this.isPlaying(g.id)||(g.autoplay=!0,this.Ia.enabled&&this.Ia.ii&&(g.pa=0),g.xa?this.Fe?g.pa=1:g.Fd():(g.lo(),g.f.currentTime&&(g.f.currentTime=0)))}b&&setTimeout(function(){a.Ia.ns()}, 1E3*this.Ia.Eb);e&&(this.Ia.js=this.ua.currentTime,this.Ia.hs=setInterval(function(){a.Ia.wp()},30))}catch(h){this.N(h)}};c.prototype.cm=function(){for(var a=0;a<this.Ia.Oh.length;a++)this.Ia.bm(this.Ia.Oh[a])};c.prototype.Cn=function(){for(var a;0<this.W.length;)a=this.W.pop(),a.f&&(this.Ra.removeChild(a.f.__div),delete a.f),a.f=null;this.H.va=0;this.H.gb=0;this.K("hotspotsremoved",{})};c.prototype.$k=function(a){this.Xh=a;this.$.style.zIndex=0!=a?a.toString():"auto";this.Ta&&this.Ta.md&&(this.Ta.md.zIndex= (a+4).toString());this.Ra.style.zIndex=(a+4).toString();this.Ja.style.zIndex=(a+3).toString();this.Ha.style.zIndex=(a+5).toString();for(var b=0;b<this.S.length+this.eb.length;b++){var e=b<this.S.length?this.S[b]:this.eb[b-this.S.length];e.f&&(e.f.style.zIndex=(a+(e.ob?8E4:0)).toString())}};c.prototype.bg=function(a){var b=this.isFullscreen!==a;this.isFullscreen!==a&&(this.isFullscreen=a,this.update(100));if(this.isFullscreen){if(this.xj)try{this.$.webkitRequestFullScreen?this.$.webkitRequestFullScreen(): this.$.mozRequestFullScreen?this.$.mozRequestFullScreen():this.$.msRequestFullscreen?this.$.msRequestFullscreen():this.$.requestFullScreen?this.$.requestFullScreen():this.$.requestFullscreen&&this.$.requestFullscreen()}catch(e){this.N(e)}this.$.style.position="absolute";a=this.Je();this.$.style.left=window.pageXOffset-a.x+this.margin.left+"px";this.$.style.top=window.pageYOffset-a.y+this.margin.top+"px";this.$k(10);document.body.style.overflow="hidden";b&&(this.ta&&this.ta.ggEnterFullscreen&&this.ta.ggEnterFullscreen(), this.K("fullscreenenter",{}),this.K("playerstatechanged",{}))}else{if(this.xj)try{document.webkitIsFullScreen?document.webkitCancelFullScreen():document.mozFullScreen?document.mozCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():document.fullScreen&&(document.cancelFullScreen?document.cancelFullScreen():document.exitFullscreen&&document.exitFullscreen())}catch(e){this.N(e)}this.$.style.position="relative";this.$.style.left="0px";this.$.style.top="0px";this.$k(0);document.body.style.overflow= "";b&&(this.ta&&this.ta.ggExitFullscreen&&this.ta.ggExitFullscreen(),this.K("fullscreenexit",{}),this.K("playerstatechanged",{}))}this.ff()};c.prototype.sj=function(){this.bg(!this.isFullscreen)};c.prototype.vp=function(){this.bg(!0)};c.prototype.exitFullscreen=function(){this.bg(!1)};c.prototype.Jp=function(){return this.isFullscreen};c.prototype.Gg=function(){this.Fb.op();this.En();this.Fb.Gg();this.Fb.dr();return!0};c.prototype.mq=function(){return"N/A"};c.prototype.Yr=function(a){this.Fb&&(this.Fb.Af= a)};c.prototype.wf=function(){this.Fb&&(this.Fb.wf(),this.Fb.Ue(),this.Fb.Sj());return!0};c.prototype.io=function(){this.Fb&&(this.Fb.bh()?this.wf():this.Gg());return!0};c.prototype.bh=function(){return this.Fb&&this.Fb.bh()?!0:!1};c.prototype.uk=function(){return this.Fb&&this.Fb.uk()?!0:!1};c.prototype.ls=function(a,b,e){this.B.Yd=this.B.di;this.B.lg=this.B.Uh;this.B.enabled=!0;this.B.kf=this.B.enabled;this.B.active=!0;this.B.zd=0;var f=new Date;this.B.Nd=0;this.B.startTime=f.getTime();a&&0!=a&& (this.B.speed=a);b&&(this.B.timeout=b);e&&(this.B.rj=e);this.K("autorotatechanged",{})};c.prototype.os=function(){this.B.active=!1;this.B.enabled=!1;this.B.kf=this.B.enabled;this.hf=this.B.Pi=!1;this.F.active&&this.F.uh&&(this.F.active=!1,this.F.uh=!1,this.F.Nb=0);this.K("autorotatechanged",{})};c.prototype.us=function(){this.B.enabled=!this.B.active;this.B.kf=this.B.enabled;this.B.active=this.B.enabled;this.B.zd=0;if(this.B.enabled){var a=new Date;this.B.Nd=0;this.B.startTime=a.getTime();this.B.Yd= this.B.di;this.B.lg=this.B.Uh}this.K("autorotatechanged",{})};c.prototype.Dr=function(a){this.B.Qf=a;this.B.ln=!0};c.prototype.ks=function(a){this.xb.running&&this.Kn();this.Xb="";a&&""!=a&&(this.B.Yd=a);this.B.kf=this.B.enabled;this.B.lg=!0;this.B.enabled=!0;this.B.active=!0;this.B.zd=0;a=new Date;this.B.Nd=0;this.B.startTime=a.getTime();this.K("autorotatechanged",{})};c.prototype.Kn=function(){this.xb.running=!1;this.xb.fk=!0;this.B.active=this.J.ve;this.wa.splice(this.wa.indexOf(this.I),1);0<this.wa.length&& (this.I=this.wa[0]);this.Xb="";this.aj(!1);this.J.ve=!1;this.Lf=(new Date).getTime()};c.prototype.Sl=function(a){if(this.od=document.getElementById(a)){this.od.innerHTML="";this.$=document.createElement("div");this.$.onselectstart=function(){return!1};Il&&this.$.setAttribute("id","viewport");a="top:\t0px;left: 0px;position:relative;-ms-touch-action: none;touch-action: none;text-align: left;"+(this.Pa+"user-select: none;");this.$.setAttribute("style",a);this.od.appendChild(this.$);this.L=document.createElement("div"); a="top:\t0px;left: 0px;width: 100px;height: 100px;overflow: hidden;position:absolute;-ms-touch-action: none;touch-action: none;"+(this.Pa+"user-select: none;");Il&&this.L.setAttribute("id","viewer");this.L.setAttribute("style",a);this.$.appendChild(this.L);if(this.Pb){var b=document.createElement("div");a="top:\t0px;left: 0px;width: 100%;height: 100%;overflow: hidden;position:absolute;-ms-touch-action: none;touch-action: none;"+(this.Pa+"user-select: none;");b.setAttribute("id",this.ik);b.setAttribute("style", a);this.L.appendChild(b)}this.Ta&&(this.Ta.md=document.createElement("canvas"),Il&&this.Ta.md.setAttribute("id","lensflarecanvas"),a="top:\t0px;left: 0px;width: 100px;height: 100px;overflow: hidden;position:absolute;"+(this.Pa+"user-select: none;"),a+=this.Pa+"pointer-events: none;",this.Ta.md.setAttribute("style",a),this.$.appendChild(this.Ta.md));this.Ra=document.createElement("div");Il&&this.Ra.setAttribute("id","hotspots");a="top:\t0px;left: 0px;width: 100px;height: 100px;overflow: hidden;position:absolute;"; this.zk&&(a+="background-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);");this.kc&&!this.ia&&(a+=this.Pa+"transform: translateZ(9999999px);");a+=this.Pa+"user-select: none;";this.Ra.setAttribute("style",a);this.$.appendChild(this.Ra);this.Ja=document.createElement("canvas");Il&&this.Ja.setAttribute("id","hotspotcanvas");a="top:\t0px;left: 0px;width: 100px;height: 100px;overflow: hidden;position:absolute;"+(this.Pa+"user-select: none;");a+=this.Pa+"pointer-events: none;"; this.Ja.setAttribute("style",a);this.$.appendChild(this.Ja);this.Ha=document.createElement("div");Il&&this.Ha.setAttribute("id","hotspottext");this.Ha.setAttribute("style","top:\t0px;left: 0px;position:absolute;padding: 3px;visibility: hidden;");this.Ha.classList.add("ggskin");this.Ha.classList.add("ggdefaulthotspot");this.Ha.innerHTML=" Hotspot text!";this.$.appendChild(this.Ha);this.divSkin=this.ta=this.Ra;this.$k(0)}else alert("container not found!")};c.prototype.Ul=function(a){this.Na=!0;return function(){a.bb&& (a.u&&a.u.complete?(a.loaded=!0,a.bb.drawImage(a.u,0,0,a.width,a.height),a.u=null,a.Qd=null):a.Qd&&a.Qd.complete&&!a.loaded&&(a.bb.drawImage(a.Qd,0,0,a.width,a.height),a.Qd=null))}};c.prototype.Rl=function(a){var b,e=128;this.u.Wf&&(this.L.style.backgroundColor=this.u.Wf.replace("0x","#"));a?(e=this.vg,this.cf=1):this.Fc>e&&(e=this.Fc);for(b=0;6>b;b++){var f=this.cube.faces[b];a?(f.width=this.vg,f.height=this.vg):(f.V=document.createElement("canvas"),f.V.width=this.Fc,f.V.height=this.Fc,f.width=this.Fc, f.height=this.Fc,f.bb=f.V.getContext("2d"));var g="position:absolute;";g+="left: 0px;";g+="top: 0px;";g+="width: "+e+"px;";g+="height: "+e+"px;";a&&(g+="outline: 1px solid transparent;");g+=this.Pa+"transform-origin: 0% 0%;";g+="-webkit-user-select: none;";g+=this.Pa+"transform: ";var h="";var l=1;this.Yf&&(l=100);h=4>b?h+("rotateY("+-90*b+"deg)"):h+("rotateX("+(4==b?-90:90)+"deg)");this.Yf&&(h+=" scale("+l+")");h+=" translate3d("+-e/2+"px,"+-e/2+"px,"+-e*l/(2*this.cf)+"px)";g+=h+";";f.Hm=h;a||(f.V.setAttribute("style", g),this.L.insertBefore(f.V,this.L.firstChild))}if(!a){for(b=0;6>b;b++)f=this.cube.faces[b],""!=this.tf[b]&&(f.Qd=new Image,f.Qd.crossOrigin=this.crossOrigin,f.Qd.onload=this.Ul(f),f.Qd.setAttribute("src",this.Hb(this.tf[b])),this.hc.push(f.Qd));for(b=0;6>b;b++)f=this.cube.faces[b],f.loaded=!1,f.u=new Image,f.u.crossOrigin=this.crossOrigin,f.u.onload=this.Ul(f),f.u.setAttribute("src",this.Hb(this.Cg[b])),this.hc.push(f.u)}};c.prototype.Ue=function(){var a;this.Ka.na.x=0;this.Ka.na.y=0;if(this.kd){for(a= 0;a<this.cube.faces.length;a++)this.cube.faces[a].V&&this.cube.faces[a].V.setAttribute&&(this.cube.faces[a].V.setAttribute("src",this.Zl),this.L.removeChild(this.cube.faces[a].V));if(this.u.levels){for(a=0;a<this.u.levels.length;a++){var b=this.u.levels[a];for(f in b.aa)if(b.aa.hasOwnProperty(f)){var e=b.aa[f];e.visible=!1;e.V&&(e.bb&&e.bb.clearRect(0,0,e.bb.canvas.width,e.bb.canvas.height),this.tj.push(e.V));e.u&&delete e.u;e.qb&&(this.R.deleteTexture(e.qb),this.td--);e.bb=null;e.V=null;e.u=null}delete b.aa}delete this.u.levels; this.u.levels=null}}this.za.Ue();var f=[];for(a=0;a<this.S.length;a++)b=this.S[a],b.fd?f.push(b):b.Te();for(a=0;a<this.eb.length;a++)this.eb[a].Te();this.H.gh=-1;this.Ja.style.visibility="hidden";this.Xa=0;this.$e=[];this.Ia.Oh=[];for(a=0;a<this.X.length;a++)b=this.X[a],0==b.mode||b.kn||this.$e.push(b);this.S=f;this.eb=[];this.D.f&&(this.$.removeChild(this.D.f),this.D.f=null,a=this.nb("_videopanorama"),0<a.length&&(a[0].f=null));this.D.yd=!1;this.D.Gi=!1};c.prototype.Dm=function(){var a=1,b=-1!=navigator.userAgent.indexOf("Mac"); window.devicePixelRatio&&b&&(a=window.devicePixelRatio);return{w:screen.width*a,h:screen.height*a}};c.prototype.wm=function(){var a=this.Dm();return a.w>a.h?a.w:a.h};c.prototype.Rk=function(a,b){var e=(new DOMParser).parseFromString(a,"text/xml");this.Yj=a;this.xn(e,b);this.ra&&(this.N("Apply to Flash player"),this.ra.readConfigString(this.Yj),this.ra.setLocked(!0),this.ra.setSlaveMode(!0))};c.prototype.wn=function(a,b,e){try{var f=void 0;f=new XMLHttpRequest;f.open("GET",a,!1);f.send(null);if(f.responseXML){var g= a.lastIndexOf("/");0<=g&&(this.Zd=a.substr(0,g+1));2<=arguments.length&&null!=b&&(this.Zd=b);this.Rk(f.responseText,e)}else alert("Error loading panorama XML")}catch(h){alert("Error:"+h)}};c.prototype.sr=function(a,b,e,f){var g=new XMLHttpRequest;var h=this;g.onload=function(l){if(4<=g.readyState)if(g.responseXML){var k=a.lastIndexOf("/");0<=k&&(h.Zd=a.substr(0,k+1));3<=arguments.length&&null!=e&&(h.Zd=e);h.Rk(g.responseText,f);b&&b()}else alert("Error loading panorama XML");else console.error("Wrong state loading XML:"+ g.statusText)};g.onerror=function(){console.error("Error loading XML:"+g.statusText)};g.open("GET",a,!0);g.send(null)};c.prototype.Nj=function(a){var b="";"{"==a.charAt(0)&&(b=a.substr(1,a.length-2));(a=this.$d[b])&&(b=a);a={oldNodeId:this.Qa,nodeId:b};this.K("beforechangenodeid",a);this.nk?this.nk=!1:this.Kk.push(this.Qa);""!=this.Qa&&-1==this.zj.indexOf(this.Qa)&&(this.zj.push(this.Qa),this.K("changevisitednodes",{}));this.an=this.Qa;this.Qa=b;this.N("change active node: "+b);this.la&&this.la.changeActiveNode&& this.la.changeActiveNode("{"+b+"}");this.K("changenodeid",a);this.yf=!0};c.prototype.jk=function(){return this.Qa};c.prototype.Wp=function(){if(0<this.Ya.length){var a=this.Ya.indexOf(this.Qa);a++;a>=this.Ya.length&&(a=0);return this.Ya[a]}return""};c.prototype.iq=function(){if(0<this.Ya.length){var a=this.Ya.indexOf(this.Qa);a--;0>a&&(a=this.Ya.length-1);return this.Ya[a]}return""};c.prototype.Op=function(){return this.an};c.prototype.Uq=function(a){return-1!=this.zj.indexOf(a)};c.prototype.mp=function(){this.zj= [];this.K("changevisitednodes",{})};c.prototype.xn=function(a,b){var e=a.firstChild;this.re=[];this.Ya=[];this.$d=[];for(a=e.firstChild;a;){if("map"==a.nodeName){var f={},g=a.getAttributeNode("title");g&&(f.title=g.nodeValue.toString());g=a.getAttributeNode("type");f.type=g.nodeValue.toString();"web"==f.type?(g=a.getAttributeNode("mapprovider"),f.mapprovider=g.nodeValue.toString(),(g=a.getAttributeNode("mapstyle"))&&(f.mapstyle=g.nodeValue.toString()),(g=a.getAttributeNode("googlecustomstylecode"))&& (f.googlecustomstylecode=g.nodeValue.toString()),(g=a.getAttributeNode("mapurltemplate"))&&(f.mapurltemplate=g.nodeValue.toString()),(g=a.getAttributeNode("mapmaxzoom"))&&(f.mapmaxzoom=Number(g.nodeValue)),(g=a.getAttributeNode("mapkey"))&&(f.mapkey=g.nodeValue.toString()),(g=a.getAttributeNode("styleurl"))&&(f.styleurl=g.nodeValue.toString())):(g=a.getAttributeNode("width"),f.width=Number(g.nodeValue),g=a.getAttributeNode("height"),f.height=Number(g.nodeValue),g=a.getAttributeNode("zoomlevels"), f.zoomlevels=Number(g.nodeValue),g=a.getAttributeNode("tileformat"),f.tileformat=g.nodeValue.toString(),g=a.getAttributeNode("bgcolor"),f.bgcolor=g.nodeValue.toString(),g=a.getAttributeNode("transparent"),f.transparent=1==g.nodeValue,g=a.getAttributeNode("floorplannorth"),f.floorplannorth=Number(g.nodeValue));g=a.getAttributeNode("id");this.Oi[g.nodeValue.toString()]=f}a=a.nextSibling}if("tour"==e.nodeName){this.Kf=!0;a="";(g=e.getAttributeNode("start"))&&(a=g.nodeValue.toString());this.hasOwnProperty("startNode")&& this.startNode&&(a=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="");f=e.firstChild;var h="";for(e="";f;){if("panorama"==f.nodeName){if(g=f.getAttributeNode("id"))h=g.nodeValue.toString(),""==a&&(a=h),""==e&&(e=h),this.re[h]=f,this.Ya.push(h);for(g=f.firstChild;g;){if("userdata"==g.nodeName){var l=this.Ig(g);this.Vh[h]= l;h==a&&(this.Vh._first=l);l.customnodeid&&(this.$d[l.customnodeid]=h);this.Mc[h]=this.$l(g);this.Pf[h]=this.am(g)}g=g.nextSibling}}if("masternode"==f.nodeName)for(g=f.firstChild;g;)"userdata"==g.nodeName&&(l=this.Ig(g),this.Vh._master=l),g=g.nextSibling;f=f.nextSibling}this.re.hasOwnProperty(a)||(g=this.$d[a])&&(a=g);this.re.hasOwnProperty(a)||(this.Lc("Start node "+a+" not found!"),a=e);this.Qk(this.re[a],b);this.Nj("{"+a+"}");this.Qa=a}else this.Kf=!1,this.Qk(e,b),this.Nj(""),this.Ya.push(""); this.te&&(this.N("add pano vr config"),this.Fb.ai());this.K("configloaded",{});this.K("changenode",{});this.K("playerstatechanged",{})};c.prototype.Qk=function(a,b){var e=this;this.Cn();this.Ta&&this.Ta.ur();this.ag(this.mb);this.Ue();this.hh=0;for(var f=a.firstChild,g,h,l=0;f;){if("view"==f.nodeName){if(g=f.getAttributeNode("fovmode"))this.fov.mode=Number(g.nodeValue);g=f.getAttributeNode("pannorth");this.pan.Lk=1*(g?g.nodeValue:0);for(var k=f.firstChild;k;){"start"==k.nodeName&&(g=k.getAttributeNode("pan"), this.pan.j=Number(g?g.nodeValue:0),this.pan.cb=this.pan.j,g=k.getAttributeNode("tilt"),this.v.j=Number(g?g.nodeValue:0),this.v.cb=this.v.j,g=k.getAttributeNode("roll"),this.U.j=Number(g?g.nodeValue:0),this.U.cb=this.U.j,g=k.getAttributeNode("fov"),this.fov.j=Number(g?g.nodeValue:70),this.fov.cb=this.fov.j,g=k.getAttributeNode("projection"),this.Ui=Number(g?g.nodeValue:4),this.Qc(this.Ui));"min"==k.nodeName&&(g=k.getAttributeNode("pan"),this.pan.min=1*(g?g.nodeValue:0),g=k.getAttributeNode("tilt"), this.v.min=1*(g?g.nodeValue:-90),g=k.getAttributeNode("fov"),this.fov.min=1*(g?g.nodeValue:5),1E-20>this.fov.min&&(this.fov.min=1E-20),g=k.getAttributeNode("fovpixel"),this.fov.rh=1*(g?g.nodeValue:0));if("max"==k.nodeName){g=k.getAttributeNode("pan");this.pan.max=1*(g?g.nodeValue:0);g=k.getAttributeNode("tilt");this.v.max=1*(g?g.nodeValue:90);g=k.getAttributeNode("fov");this.fov.max=1*(g?g.nodeValue:120);180<=this.fov.max&&(this.fov.max=179.9);if(g=k.getAttributeNode("fovstereographic"))this.fov.Jk= 1*g.nodeValue;if(g=k.getAttributeNode("fovfisheye"))this.fov.Ik=1*g.nodeValue;if(g=k.getAttributeNode("scaletofit"))this.M.In=1==g.nodeValue}if("flyin"==k.nodeName){if(g=k.getAttributeNode("projection"))this.Hc.Nb=Number(g.nodeValue);if(g=k.getAttributeNode("pan"))this.Hc.pan=parseFloat(g.nodeValue);if(g=k.getAttributeNode("tilt"))this.Hc.v=parseFloat(g.nodeValue);if(g=k.getAttributeNode("fov"))this.Hc.fov=parseFloat(g.nodeValue)}k=k.nextSibling}}if("autorotate"==f.nodeName){if(g=f.getAttributeNode("speed"))this.B.speed= 1*g.nodeValue;if(g=f.getAttributeNode("delay"))this.B.timeout=1*g.nodeValue;if(g=f.getAttributeNode("returntohorizon"))this.B.rj=1*g.nodeValue;if(g=f.getAttributeNode("nodedelay"))this.B.Ti=1*g.nodeValue;if(g=f.getAttributeNode("noderandom"))this.B.mn=1==g.nodeValue;(g=f.getAttributeNode("nodefilter"))&&!this.B.ln&&(this.B.Qf=g.nodeValue);this.be&&(this.B.enabled=!0,this.B.kf=!0,this.B.active=!1);this.B.Nd=0;if(g=f.getAttributeNode("startloaded"))this.B.Jh=1==g.nodeValue,this.B.Jh&&(this.B.active= !1);if(g=f.getAttributeNode("useanimation"))this.B.Uh=1==g.nodeValue,this.B.lg=this.B.Uh;if(g=f.getAttributeNode("syncanimationwithvideo"))this.B.il=1==g.nodeValue}if("animation"==f.nodeName){if(g=f.getAttributeNode("syncanimationwithvideo"))this.B.il=1==g.nodeValue;if(g=f.getAttributeNode("useinautorotation"))this.B.Uh=1==g.nodeValue;if(g=f.getAttributeNode("animsequence"))this.B.di=g.nodeValue,this.be&&(this.B.Yd=this.B.di);this.wa=[];for(k=f.firstChild;k;){if("clip"==k.nodeName){this.I=new x.tl; if(g=k.getAttributeNode("animtitle"))this.I.jf=g.nodeValue.toString();if(g=k.getAttributeNode("cliptitle"))this.I.ab=g.nodeValue.toString();if(g=k.getAttributeNode("nodeid"))this.I.Xs=g.nodeValue.toString();if(g=k.getAttributeNode("length"))this.I.length=Number(g.nodeValue);if(g=k.getAttributeNode("animtype"))this.I.Vo=Number(g.nodeValue);if(g=k.getAttributeNode("nextcliptitle"))this.I.hn=g.nodeValue.toString();if(g=k.getAttributeNode("nextclipnodeid"))this.I.Si=g.nodeValue.toString();if(g=k.getAttributeNode("nextclipstartview"))this.I.Tq= g.nodeValue.toString();if(g=k.getAttributeNode("transitiontype"))this.I.As=Number(g.nodeValue);var w=k.firstChild;for(this.I.ca=[];w;){if("keyframe"==w.nodeName){var r=new x.Xc;if(g=w.getAttributeNode("time"))r.time=Number(g.nodeValue);if(g=w.getAttributeNode("value"))r.value=Number(g.nodeValue);if(g=w.getAttributeNode("valuestring"))r.pl=g.nodeValue.toString();if(g=w.getAttributeNode("transitiontime"))r.Eb=Number(g.nodeValue);g=w.getAttributeNode("type");var y=0;g&&(r.type=Number(g.nodeValue),y= Number(g.nodeValue));if(g=w.getAttributeNode("property"))r.sb=Number(g.nodeValue);if(g=w.getAttributeNode("additionaltrackid"))r.bi=g.nodeValue.toString();if(1==y||2==y){if(g=w.getAttributeNode("bezierintime"))r.we=Number(g.nodeValue);if(g=w.getAttributeNode("bezierinvalue"))r.xe=Number(g.nodeValue);if(g=w.getAttributeNode("bezierouttime"))r.ye=Number(g.nodeValue);if(g=w.getAttributeNode("bezieroutvalue"))r.ze=Number(g.nodeValue)}this.I.ca.push(r)}w=w.nextSibling}this.wa.push(this.I)}k=k.nextSibling}}"input"== f.nodeName&&(h||(h=f));if(h)for(w=0;6>w;w++)g=h.getAttributeNode("prev"+w+"url"),this.tf[w]=g?String(g.nodeValue):"";"altinput"==f.nodeName&&(k=0,(g=f.getAttributeNode("screensize"))&&(k=1*g.nodeValue),0<k&&k<=this.wm()&&k>l&&(l=k,h=f));if("control"==f.nodeName&&this.be){if(g=f.getAttributeNode("simulatemass"))this.Ka.enabled=1==g.nodeValue;if(g=f.getAttributeNode("rubberband"))this.M.Hn=1==g.nodeValue;if(g=f.getAttributeNode("locked"))this.M.lc=1==g.nodeValue;g&&(this.M.nh=1==g.nodeValue);if(g=f.getAttributeNode("lockedmouse"))this.M.lc= 1==g.nodeValue;if(g=f.getAttributeNode("lockedkeyboard"))this.M.nh=1==g.nodeValue;if(g=f.getAttributeNode("lockedkeyboardzoom"))this.M.Iq=1==g.nodeValue;if(g=f.getAttributeNode("lockedwheel"))this.M.ee=1==g.nodeValue;if(g=f.getAttributeNode("invertwheel"))this.M.Qm=1==g.nodeValue;if(g=f.getAttributeNode("speedwheel"))this.M.Wn=1*g.nodeValue;if(g=f.getAttributeNode("invertcontrol"))this.M.Ld=1==g.nodeValue;if(g=f.getAttributeNode("sensitivity"))this.M.sensitivity=1*g.nodeValue,1>this.M.sensitivity&& (this.M.sensitivity=1);if(g=f.getAttributeNode("dblclickfullscreen"))this.M.$j=1==g.nodeValue;if(g=f.getAttributeNode("contextfullscreen"))this.M.Ag=1==g.nodeValue;if(g=f.getAttributeNode("contextprojections"))this.M.hi=1==g.nodeValue;if(g=f.getAttributeNode("hideabout"))this.M.Ff=1==g.nodeValue;for(k=f.firstChild;k;)"menulink"==k.nodeName&&(w={text:"",url:""},g=k.getAttributeNode("text"),w.text=g.nodeValue,g=k.getAttributeNode("url"),w.url=g.nodeValue,this.qh.push(w)),k=k.nextSibling}if("transition"== f.nodeName&&this.be){if(g=f.getAttributeNode("enabled"))this.J.enabled=1==g.nodeValue;if(g=f.getAttributeNode("blendtime"))this.J.ug=1*g.nodeValue;if(g=f.getAttributeNode("blendcolor"))this.J.mf=g.nodeValue.toString();if(g=f.getAttributeNode("type"))this.J.type=g.nodeValue.toString();if(g=f.getAttributeNode("softedge"))this.J.Rc=1*g.nodeValue;if(g=f.getAttributeNode("zoomin"))this.J.sa=1*g.nodeValue;if(g=f.getAttributeNode("zoomout"))this.J.uc=1*g.nodeValue;if(g=f.getAttributeNode("zoomfov"))this.J.Dj= 1*g.nodeValue;if(g=f.getAttributeNode("zoomafterinfov"))this.J.Bj=1*g.nodeValue;if(g=f.getAttributeNode("zoomafteroutfov"))this.J.Cj=1*g.nodeValue;if(g=f.getAttributeNode("zoomspeed"))this.J.ue=1*g.nodeValue;if(g=f.getAttributeNode("zoomoutpause"))this.J.pg=1==g.nodeValue;"cut"==this.J.type&&(this.J.ug=0)}if("soundstransition"==f.nodeName){if(g=f.getAttributeNode("enabled"))this.Ia.enabled=1==g.nodeValue;if(g=f.getAttributeNode("transitiontime"))this.Ia.Eb=1*g.nodeValue;if(g=f.getAttributeNode("crossfade"))this.Ia.ii= 1==g.nodeValue}if("flyintransition"==f.nodeName){if(g=f.getAttributeNode("enabled"))this.xb.enabled=1==g.nodeValue&&this.ia;if(g=f.getAttributeNode("speed"))this.xb.speed=1*g.nodeValue}"userdata"==f.nodeName&&(this.userdata=this.mg=this.Ig(f),this.Mc[a.id]||(this.Mc[a.id]=this.$l(f),this.Pf[a.id]=this.am(f)));if("hotspots"==f.nodeName)for(k=f.firstChild;k;){if("label"==k.nodeName&&this.be){w=this.H.oj;if(g=k.getAttributeNode("enabled"))w.enabled=1==g.nodeValue;if(g=k.getAttributeNode("width"))w.width= 1*g.nodeValue;if(g=k.getAttributeNode("height"))w.height=1*g.nodeValue;if(g=k.getAttributeNode("textcolor"))w.pj=1*g.nodeValue;if(g=k.getAttributeNode("textalpha"))w.nj=1*g.nodeValue;if(g=k.getAttributeNode("background"))w.background=1==g.nodeValue;if(g=k.getAttributeNode("backgroundalpha"))w.cc=1*g.nodeValue;if(g=k.getAttributeNode("backgroundcolor"))w.dc=1*g.nodeValue;if(g=k.getAttributeNode("border"))w.ei=1*g.nodeValue;if(g=k.getAttributeNode("bordercolor"))w.fc=1*g.nodeValue;if(g=k.getAttributeNode("borderalpha"))w.ec= 1*g.nodeValue;if(g=k.getAttributeNode("borderradius"))w.Jj=1*g.nodeValue;if(g=k.getAttributeNode("wordwrap"))w.Aj=1==g.nodeValue}if("polystyle"==k.nodeName&&this.be){if(g=k.getAttributeNode("mode"))this.H.mode=1*g.nodeValue;if(g=k.getAttributeNode("bordercolor"))this.H.fc=1*g.nodeValue;if(g=k.getAttributeNode("backgroundcolor"))this.H.dc=1*g.nodeValue;if(g=k.getAttributeNode("borderalpha"))this.H.ec=1*g.nodeValue;if(g=k.getAttributeNode("backgroundalpha"))this.H.cc=1*g.nodeValue;if(g=k.getAttributeNode("handcursor"))this.H.Df= 1==g.nodeValue}g=void 0;"hotspot"==k.nodeName&&(g=new x.$h(this),g.type="point",g.Zb(k),this.W.push(g));"polyhotspot"==k.nodeName&&(g=new x.$h(this),g.type="poly",g.Zb(k),this.W.push(g));k=k.nextSibling}if("sounds"==f.nodeName||"media"==f.nodeName)for(k=f.firstChild;k;){if("sound"==k.nodeName&&!this.jn)for(g=new x.yl(this),g.Zb(k),this.Pb||g.addElement(),w=0;w<this.$e.length;w++)g.id==this.$e[w].id&&(this.$e.splice(w,1),w--);"video"==k.nodeName&&(g=new x.zl(this),g.Zb(k),this.Pb||g.addElement()); "image"==k.nodeName&&(g=new x.Ko(this),g.Zb(k),this.Pb||g.addElement());"lensflare"==k.nodeName&&this.Ta&&(g=new x.Lo(this),g.Zb(k),this.Ta.mh.push(g));k=k.nextSibling}f=f.nextSibling}for(w=0;w<this.$e.length;w++){a=this.$e[w];if(this.ua&&this.Ia.enabled&&this.isPlaying(a.id))this.Ia.Oh.push(a);else{try{a.xa?a.qf():a.f.pause()}catch(ha){this.N(ha)}a.Te()}this.X.splice(this.X.indexOf(a),1)}1!=this.J.sa&&2!=this.J.sa&&6!=this.J.sa&&this.cm();this.te||(this.kb.Eh=!0);b&&("object"===typeof b&&null!== b?(b.hasOwnProperty("pan")&&this.Ye(Number(b.pan)),b.hasOwnProperty("tilt")&&this.Ze(Number(b.tilt)),b.hasOwnProperty("projection")&&this.Qc(Number(b.projection)),b.hasOwnProperty("fov")&&this.Xe(Number(b.fov))):""!=b&&(b=b.toString().split("/"),4<b.length&&this.Qc(Number(b[4])),0<b.length&&(g=String(b[0]),"N"==g.charAt(0)?this.Zk(Number(g.substr(1))):"S"==g.charAt(0)?this.Zk(-180+Number(g.substr(1))):this.Ye(Number(g))),1<b.length&&this.Ze(Number(b[1])),2<b.length&&this.Xe(Number(b[2]))),this.pan.open= this.pan.j);if(h){g=h.getAttributeNode("stereo");this.Md=!1;g&&1==g.nodeValue&&(this.Md=!0);g=h.getAttributeNode("fliplr");this.Kh=!1;g&&1==g.nodeValue&&(this.Kh=!0);for(w=0;w<(this.Md?12:6);w++)(g=h.getAttributeNode("tile"+w+"url"))&&(this.Cg[w]=String(g.nodeValue));for(w=0;6>w;w++)(g=h.getAttributeNode("prev"+w+"url"))&&(this.tf[w]=String(g.nodeValue));if(g=h.getAttributeNode("tilevrurl"))this.Tl=String(g.nodeValue);if(g=h.getAttributeNode("tilesize"))this.Fc=1*g.nodeValue;if(g=h.getAttributeNode("canvassize"))this.vg= Number(g.nodeValue);if(g=h.getAttributeNode("tilescale"))this.cf=1*g.nodeValue;if(g=h.getAttributeNode("leveltileurl"))this.u.Fk=g.nodeValue;if(g=h.getAttributeNode("leveltilesize"))this.u.O=Number(g.nodeValue);if(g=h.getAttributeNode("levelbias"))this.u.dn=Number(g.nodeValue);if(g=h.getAttributeNode("levelbiashidpi"))this.u.en=Number(g.nodeValue);g=h.getAttributeNode("overlap");this.Oa.U=0;this.Oa.pitch=0;g&&(this.u.Da=Number(g.nodeValue));if(g=h.getAttributeNode("levelingroll"))this.Oa.U=Number(g.nodeValue); if(g=h.getAttributeNode("levelingpitch"))this.Oa.pitch=Number(g.nodeValue);this.Xa=0;(g=h.getAttributeNode("flat"))&&1==g.nodeValue&&(this.Xa=2);g=h.getAttributeNode("width");this.u.width=1*(g?g.nodeValue:1);g=h.getAttributeNode("height");this.u.height=1*(g?g.nodeValue:this.u.width);this.D.src=[];this.u.levels=[];for(k=h.firstChild;k;){if("preview"==k.nodeName){if(g=k.getAttributeNode("color"))this.u.Wf=g.nodeValue;if(g=k.getAttributeNode("strip"))this.u.un=1==g.nodeValue}if("video"==k.nodeName){if(g= k.getAttributeNode("format"))"3x2"==g.nodeValue&&(this.D.format=14),"equirectangular"==g.nodeValue&&(this.D.format=1);if(g=k.getAttributeNode("flipy"))this.D.flipY=Number(g.nodeValue);if(g=k.getAttributeNode("startonload"))this.D.dl=1==g.nodeValue;if(g=k.getAttributeNode("startmutedmobile"))this.D.Yn=1==g.nodeValue;if(g=k.getAttributeNode("bleed"))this.D.lf=Number(g.nodeValue);if(g=k.getAttributeNode("endaction"))this.D.Ee=String(g.nodeValue);if(g=k.getAttributeNode("targetview"))this.D.jl=String(g.nodeValue); if(g=k.getAttributeNode("width"))this.D.width=Number(g.nodeValue);if(g=k.getAttributeNode("height"))this.D.height=Number(g.nodeValue);for(w=k.firstChild;w;)"source"==w.nodeName&&(g=w.getAttributeNode("url"))&&this.D.src.push(g.nodeValue.toString()),w=w.nextSibling}if("level"==k.nodeName){h=new x.wl;g=k.getAttributeNode("width");h.width=1*(g?g.nodeValue:1);g=k.getAttributeNode("height");h.height=1*(g?g.nodeValue:h.width);if(g=k.getAttributeNode("preload"))h.cache=1==g.nodeValue;if(g=k.getAttributeNode("preview"))h.Se= 1==g.nodeValue;h.T=Math.floor((h.width+this.u.O-1)/this.u.O);h.ea=Math.floor((h.height+this.u.O-1)/this.u.O);this.u.levels.push(h)}k=k.nextSibling}this.u.Dk=this.u.levels.length}this.Ef=!0;this.Rh&&(this.ia=this.kd=!1,this.xc||(this.N("dummy rendering"),this.xc=document.createElement("canvas"),this.xc.width=100,this.xc.height=100,this.xc.id="dummycanvas",this.L.appendChild(this.xc)),this.Sc());this.ia&&this.R&&(this.za.Om(this.cf),this.za.Pm());this.kd&&(0<this.u.levels.length?this.Rl(!0):this.Rl(!1), this.hh=0);var z=this;0<this.u.levels.length&&this.u.un&&0==this.Xa&&(b=new Image,h=new x.wl,h.Se=!0,h.cache=!0,h.T=h.ea=0,h.height=h.width=0,this.u.levels.push(h),b.crossOrigin=this.crossOrigin,b.onload=this.za.Sq(b),b.setAttribute("src",this.pe(6,this.u.Dk-1,0,0)));if(0<this.D.src.length&&this.ia)if(this.Sh){this.D.f=document.createElement("video");this.D.f.crossOrigin=this.crossOrigin;this.D.f.setAttribute("style","display:none; max-width:none;");this.D.f.setAttribute("playsinline","playsinline"); this.D.f.preload=!0;this.D.f.volume=this.ba;this.$.appendChild(this.D.f);this.D.yd=!1;this.D.co=!1;this.D.f.oncanplay=function(){if(!z.D.yd){z.D.Gi=!0;var ha,ua,id=[],sh=new x.Ga,db=z.R,gl=z.D.f.videoWidth/3;z.D.width=z.D.f.videoWidth;z.D.height=z.D.f.videoHeight;for(ha=0;6>ha;ha++){var tf=ha%3*gl+z.D.lf;var hl=tf+gl-2*z.D.lf;var il=4;3>ha&&(il+=gl);var kl=il+gl-2*z.D.lf;for(ua=0;4>ua;ua++){sh.x=-1;sh.y=-1;sh.z=1;for(var jl=0;jl<ua;jl++)sh.Gn();id.push((0<sh.x?tf:hl)/(3*gl),(0<sh.y?kl:il)/(2*gl))}}db.bindBuffer(db.ARRAY_BUFFER, z.D.mj);db.bufferData(db.ARRAY_BUFFER,new Float32Array(id),db.STATIC_DRAW)}};this.D.wb=function(){var ha=z.nb("_videopanorama");return 0<ha.length&&ha[0].wb?ha[0].wb:0};this.D.Jn=function(ha){var ua=z.nb("_videopanorama");0<ua.length&&(ua[0].wb=ha)};this.D.loop=function(){return 0<z.D.wb()?(z.D.Jn(z.D.wb()-1),z.D.f.play(),!0):!1};"exit"==this.D.Ee?this.D.f.onended=function(){z.D.Gi=!1;z.D.yd=!1;z.$.removeChild(z.D.f);z.D.f=null;z.update()}:"stop"==this.D.Ee?z.D.f.onended=function(){z.D.loop()||z.update()}: "{"==this.D.Ee.charAt(0)?this.D.f.onended=function(){z.gd(z.D.Ee,z.D.jl)}:this.D.f.loop=!0;for(w=0;w<this.D.src.length;w++)h=document.createElement("source"),h.setAttribute("src",this.Hb(this.D.src[w])),this.D.f.appendChild(h);h=this.nb("_videopanorama");0<h.length?h[0].f=this.D.f:this.yn("_videopanorama",this.D.f);if(this.D.dl&&(h=this.D.f.play(),void 0!==h))h.then(function(){})["catch"](function(){e.D.Yn&&(e.D.f.muted=!0,e.D.f.play())})}else"{"==this.D.Ee.charAt(0)&&z.gd(z.D.Ee,z.D.jl);this.Al(); this.J.Bd||this.$n();this.update();this.be&&(this.be=!1,this.ta&&this.ta.ggViewerInit&&(this.ta.ggViewerInit(),this.K("viewerinit",{})),this.xb.enabled&&0==this.Xa&&this.ia&&(this.Qc(9),this.pan.j=this.Hc.pan,this.v.j=this.Hc.v,this.fov.j=this.Hc.fov,this.Wa=this.Hc.Nb,this.I=this.Ng(!1),this.pan.j=this.I.ca[0].value,this.v.j=this.I.ca[1].value,this.fov.j=this.I.ca[2].value,3==this.I.ca[3].sb&&this.Qc(this.I.ca[3].value),this.Xb=this.I.ab,this.aj(!0),this.B.active=!1,this.B.Kg=!0));this.Sc()};c.prototype.Mk= function(a,b){0<a.length&&(".xml"==a.substr(a.length-4)||".swf"==a.substr(a.length-4)||"{"==a.charAt(0)?this.gd(this.Hb(a),b):window.open(this.Hb(a),b))};c.prototype.ms=function(){this.Ef=this.isLoaded=!1;this.checkLoaded=this.hc=[];this.zh=0;this.ta&&this.ta.ggReLoaded&&this.ta.ggReLoaded();this.K("beforechangenode",{})};c.prototype.vq=function(a){var b="";0<this.Kk.length&&(b=this.Kk.pop());""!=b&&(this.nk=!0);this.gd("{"+b+"}",a)};c.prototype.gd=function(a,b){if(""!=a&&"{}"!=a){this.ms();this.la&& this.la.hotspotProxyOut&&this.la.hotspotProxyOut(this.Ca.id,this.Ca.url);".swf"==a.substr(a.length-4)&&(a=a.substr(0,a.length-4)+".xml");var e="",f=null;"object"===typeof b&&null!==b?f=b:b&&(e=b.toString());b="/"+this.v.j+"/"+this.fov.j+"//"+this.Sa();e=e.replace("$cur",this.pan.j+b);e=e.replace("$(cur)",this.pan.j+b);e=e.replace("$fwd","N"+this.Ie()+b);e=e.replace("$(fwd)","N"+this.Ie()+b);e=e.replace("$bwd","S"+this.Ie()+b);e=e.replace("$(bwd)","S"+this.Ie()+b);e=e.replace("$ap",String(this.pan.j)); e=e.replace("$(ap)",String(this.pan.j));e=e.replace("$an",String(this.Ie()));e=e.replace("$(an)",String(this.Ie()));e=e.replace("$at",String(this.v.j));e=e.replace("$(at)",String(this.v.j));e=e.replace("$af",String(this.fov.j));e=e.replace("$(af)",String(this.fov.j));e=e.replace("$ar",String(this.Sa()));e=e.replace("$(ar)",String(this.Sa()));""!=e&&(b=e.split("/"),3<b.length&&""!=b[3]&&(this.startNode=b[3]));b=null!==f?f:e;this.Ea();if("{"==a.charAt(0)){var g=a.substr(1,a.length-2);if(this.Qa==g&& this.wg)return;(f=this.$d[g])&&(g=f);f=this.J;var h=this.R;if(this.re[g]){this.wg=!0;if(this.J.enabled&&this.ia&&this.J.tc){f.se||f.Bd||this.aj(!0);var l=void 0;"wipeleftright"==f.type?l=1:"wiperightleft"==f.type?l=2:"wipetopbottom"==f.type?l=3:"wipebottomtop"==f.type?l=4:"wiperandom"==f.type&&(l=Math.ceil(4*Math.random()));f.Zj=l;h.bindFramebuffer(h.FRAMEBUFFER,f.tc);h.viewport(0,0,f.tc.width,f.tc.height);h.clear(h.COLOR_BUFFER_BIT|h.DEPTH_BUFFER_BIT);f.Nh=!0;this.Qh();f.Nh=!1;h.bindFramebuffer(h.FRAMEBUFFER, null);h.viewport(0,0,this.yb.width,this.yb.height);h=new Date;this.Ca!=this.mb&&6!=f.sa?(f.Yh=this.Ca.Yb/this.C.width,f.Zh=1-this.Ca.Bb/this.C.height):(f.Yh=.5,f.Zh=.5);1!=f.sa&&2!=f.sa&&6!=f.sa?(f.el=h.getTime(),f.se=!0):(f.Co=h.getTime(),f.Bd=!0,f.Gb=Math.sin(this.jc()/2*Math.PI/180)/Math.sin(f.Dj/2*Math.PI/180),f.Gb=Math.max(f.Gb,1),f.Bo=1/f.ue*f.Gb*.3)}this.Qk(this.re[g],b);this.Nj(a);if(f.enabled&&this.ia&&0!=f.uc){f.af=this.Rg();f.bf=this.wi();f.Vd=this.jc();f.Ad=this.Sa();if(1==f.uc||3==f.uc)this.fj(f.Cj); else if(2==f.uc)this.fj(f.Bj);else if(4==f.uc){for(g=b=0;g<this.wa.length;g++)this.wa[g].ab&&0==this.wa[g].ab.indexOf("__FlyIn")&&(b=this.wa[g]);0!=b?(this.Qc(this.vi(3,b).value),this.Ye(this.vi(0,b).value),this.Ze(this.vi(1,b).value),this.Xe(this.vi(2,b).value)):(this.Qc(this.Hc.Nb),this.Ye(this.Hc.pan),this.Ze(this.Hc.v),this.fj(this.Hc.fov))}f.pg||1==f.sa||2==f.sa||6==f.sa||(4==f.uc?(this.I=this.Ng(!0,f.af,f.bf,f.Vd),this.Xb=this.I.ab,this.B.active=!0,this.xb.running=!0):this.moveTo(f.af,f.bf, f.Vd,f.ue,0,f.Ad))}this.ra&&this.ra.openNext(a,e);this.te&&(this.N("add pano opennext"),this.Fb.ai());this.J.Bd||this.J.se||(this.da&&this.Vj(),this.wg=!1)}else{this.Lc("invalid node id: "+g);return}}else this.wn(a,null,b);this.K("changenode",{});this.update(5)}};c.prototype.Yp=function(){return this.Ef?this.Kf?this.Ya.slice(0):[""]:[]};c.prototype.Ig=function(a){var b;var e={title:"",description:"",author:"",datetime:"",copyright:"",source:"",information:"",comment:"",latitude:0,longitude:0,altitude:-1E4, heading:0,customnodeid:"",streetviewlink:"",tags:[]};if(a&&((b=a.getAttributeNode("title"))&&(e.title=b.nodeValue.toString()),(b=a.getAttributeNode("description"))&&(e.description=b.nodeValue.toString()),(b=a.getAttributeNode("author"))&&(e.author=b.nodeValue.toString()),(b=a.getAttributeNode("datetime"))&&(e.datetime=b.nodeValue.toString()),(b=a.getAttributeNode("copyright"))&&(e.copyright=b.nodeValue.toString()),(b=a.getAttributeNode("source"))&&(e.source=b.nodeValue.toString()),(b=a.getAttributeNode("info"))&& (e.information=b.nodeValue.toString()),(b=a.getAttributeNode("comment"))&&(e.comment=b.nodeValue.toString()),(b=a.getAttributeNode("latitude"))&&(e.latitude=Number(b.nodeValue)),(b=a.getAttributeNode("longitude"))&&(e.longitude=Number(b.nodeValue)),(b=a.getAttributeNode("nodeid"))&&(e.nodeid=b.nodeValue.toString()),(b=a.getAttributeNode("altitude"))&&(e.altitude=Number(b.nodeValue)),(b=a.getAttributeNode("heading"))&&(e.heading=Number(b.nodeValue)),(b=a.getAttributeNode("customnodeid"))&&(e.customnodeid= b.nodeValue.toString()),(b=a.getAttributeNode("streetviewlink"))&&(e.streetviewlink=b.nodeValue.toString()),b=a.getAttributeNode("tags"))){a=b.nodeValue.toString().split("|");for(b=0;b<a.length;b++)""==a[b]&&(a.splice(b,1),b--);e.tags=a}return e};c.prototype.$l=function(a){for(var b={},e=a.firstChild;e;){if("mapcoords"==e.nodeName){var f={x:0,y:0};a=e.getAttributeNode("x");f.x=Number(a.nodeValue);a=e.getAttributeNode("y");f.y=Number(a.nodeValue);a=e.getAttributeNode("mapid");b[a.nodeValue.toString()]= f}e=e.nextSibling}return b};c.prototype.am=function(a){for(var b={},e=a.firstChild;e;){if("mapcoords"==e.nodeName){var f={x:0,y:0};a=e.getAttributeNode("x_floorplan_percent");f.x=Number(a.nodeValue);a=e.getAttributeNode("y_floorplan_percent");f.y=Number(a.nodeValue);a=e.getAttributeNode("mapid");b[a.nodeValue.toString()]=f}e=e.nextSibling}return b};c.prototype.Qg=function(a){return a?this.Vh[a]?this.Vh[a]:this.Ig():this.mg};c.prototype.lk=function(a){a=this.Qg(a);var b=[];""!=a.latitude&&0!=a.latitude&& 0!=a.longitude&&(b.push(a.latitude),b.push(a.longitude));return b};c.prototype.xm=function(a){for(var b=[],e=0;e<this.Ya.length;e++){var f=this.Ya[e],g=this.Qg(f);g&&g.tags.includes(a)&&b.push(f)}return b};c.prototype.aq=function(a){return this.Qg(a).title};c.prototype.Xp=function(a,b){var e=-1;a=this.lk(a);b=this.lk(b);if(2==a.length&&2==b.length){e=Math.PI/180*(b[0]-a[0]);var f=Math.PI/180*(b[1]-a[1]);a=Math.sin(e/2)*Math.sin(e/2)+Math.sin(f/2)*Math.sin(f/2)*Math.cos(Math.PI/180*a[0])*Math.cos(Math.PI/ 180*b[0]);e=12742E3*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}return e};c.prototype.Bf=function(a,b){var e;for(e=0;e<this.I.ca.length;e++)if(this.I.ca[e].time==a&&this.I.ca[e].sb==b)return this.I.ca[e];return!1};c.prototype.vi=function(a,b){var e;for(e=0;e<b.ca.length;e++)if(0==b.ca[e].time&&b.ca[e].sb==a)return b.ca[e];return!1};c.prototype.Vp=function(a){var b,e=1E5,f=a,g=!1;for(b=0;b<this.I.ca.length;b++)this.I.ca[b].sb==a.sb&&this.I.ca[b].time>a.time&&this.I.ca[b].time<e&&(f=this.I.ca[b],e=f.time, g=!0);return g?f:!1};c.prototype.Ap=function(a){for(var b=[],e=0;e<this.I.ca.length;e++)if(this.I.ca[e].time<=a&&4==this.I.ca[e].sb){for(var f=!1,g=0;g<b.length;g++)if(b[g].bi==this.I.ca[e].bi){b[g].time<this.I.ca[e].time?b.splice(g,1):f=!0;break}f||b.push(this.I.ca[e])}return b};c.prototype.Ng=function(a,b,e,f){for(var g=0;g<this.wa.length;g++)if(this.wa[g].ab&&0==this.wa[g].ab.indexOf("__FlyIn"))return this.wa[g];g=new x.sl;g.ab="__FlyIn";g.ne=this.pan.j;g.Ih=this.v.j;g.Sd=this.fov.j;g.Hh=this.Wa; g.Ad=this.Ui;a?(g.vf=!1,g.Ce=!1,g.speed=this.J.ue,g.Ud=b,g.oe=e,g.fg=f):(g.vf=!0,g.Ce=!0,g.speed=this.xb.speed,g.Ud=this.pan.cb,g.oe=this.v.cb,g.fg=this.fov.cb);return this.lm(g)};c.prototype.lm=function(a){var b=new x.tl;b.ab=a.ab;b.jf="";b.ca=[];for(var e=a.Hh!=a.Ad&&-1!=a.Ad;-180>a.Ud;)a.Ud+=360;for(;180<a.Ud;)a.Ud-=360;var f=a.Ud-a.ne;if(360==this.pan.max-this.pan.min){for(;-180>f;)f+=360;for(;180<f;)f-=360}var g=a.oe-a.Ih,h=a.fg-a.Sd,l=Math.round(Math.sqrt(f*f+g*g+h*h)/a.speed*.33);e&&(l=Math.max(10, l));b.length=l;if(a.De){var k=Math.ceil(.7*l);k=Math.min(15,k);k=Math.max(5,k);b.length=l+k;var w=.33*k}var r=a.fg,y=l,z=0,ha=l-1;if(e){var ua=a.Sd;var id=4==a.Ad?120:this.Og(a.Ad);var sh=a.fg;h=sh-a.Sd;var db=new x.Gc(0,a.Sd),gl=new x.Gc(l,sh),tf=new x.Gc,hl=new x.Gc;hl.init(l/3,a.Sd+h/3);tf.init(2*l/3,sh-h/3);if(ua>id)for(;z<=l&&ua>id;)ua=new x.Gc,ua.Ij(db,gl,hl,tf,z),ua=ua.y,z++;else z=1;z>=.8*l&&(y=z=Math.round(.8*l));0==z&&(z=1);id=4==a.Hh?120:this.Og(a.Hh);ua=a.fg;if(ua>id)for(;ha>z&&ua>id;)ua= new x.Gc,ua.Ij(db,gl,hl,tf,ha),ua=ua.y,ha--}db=new x.Xc;db.time=0;db.sb=0;db.value=a.ne;db.type=1;db.ye=l/3;db.ze=a.vf?a.ne:a.ne+f/3;b.ca.push(db);db=new x.Xc;db.time=0;db.sb=1;db.value=a.Ih;db.type=1;db.ye=l/3;db.ze=a.vf?a.Ih:a.Ih+g/3;b.ca.push(db);db=new x.Xc;db.time=0;db.sb=2;db.value=a.Sd;db.type=1;db.ye=l/3;db.ze=a.vf?a.Sd:a.Sd+h/3;b.ca.push(db);db=new x.Xc;db.time=0;db.sb=3;db.value=a.Hh;db.type=0;db.Eb=0;b.ca.push(db);e&&(db=new x.Xc,db.time=z,db.sb=3,db.value=a.Ad,db.type=0,db.Eb=ha-z,b.ca.push(db)); db=new x.Xc;db.time=l;db.sb=0;db.value=a.ne+f;db.type=1;db.we=2*l/3;db.xe=a.Ce&&!a.De?db.value:db.value-f/3;a.De&&(db.ye=l+w,db.ze=db.value+w/l*f);b.ca.push(db);db=new x.Xc;db.time=l;db.sb=1;db.value=a.oe;db.type=1;db.we=2*l/3;db.xe=a.Ce&&!a.De?a.oe:a.oe-g/3;a.De&&(db.ye=l+w,db.ze=db.value+w/l*g);b.ca.push(db);db=new x.Xc;db.time=y;db.sb=2;db.value=r;db.type=1;db.we=2*y/3;db.xe=a.Ce?r:r-h/3;b.ca.push(db);a.De&&(db=new x.Xc,db.time=l+k,db.sb=0,db.value=a.ne+f,db.type=1,db.we=l+k-w,db.xe=a.ne+f,b.ca.push(db), db=new x.Xc,db.time=l+k,db.sb=1,db.value=a.oe,db.type=1,db.we=l+k-w,db.xe=a.oe,b.ca.push(db));this.wa.push(b);return b};c.prototype.Ns=function(){this.D.f&&this.D.f.play()};c.prototype.Os=function(){this.D.f&&(this.D.f.pause(),this.D.f.currentTime=0)};c.prototype.Ms=function(){this.D.f&&this.D.f.pause()};c.prototype.$r=function(a){this.D.f&&(0>a&&(a=0),a>this.D.f.duration&&(a=this.D.f.duration-.1),this.D.f.currentTime=a,this.update())};c.prototype.pq=function(){return this.D.f?this.D.f.currentTime: 0};c.prototype.oq=function(){if(this.D.f)return this.D.f};c.prototype.Zr=function(a){if(this.D.f){var b=!this.D.f.paused&&!this.D.f.ended,e=this.D.f.currentTime;this.D.f.pause();this.D.f.src=isNaN(parseInt(a,10))?String(a):this.D.src[parseInt(a,10)];b&&(this.D.f.onloadedmetadata=function(){this.currentTime=e;this.play();this.onloadedmetadata=null});this.D.f.currentTime=e}};c.prototype.tp=function(){this.jn=!0};return c}();x.xl=d})(ggP2VR||(ggP2VR={}));window.ggHasHtml5Css3D=Gl;window.ggHasWebGL=Hl; window.pano2vrPlayer=ggP2VR.xl;var n=ggP2VR.xl.prototype;n.getVersion=n.Gm;n.readConfigString=n.Rk;n.readConfigUrl=n.wn;n.readConfigUrlAsync=n.sr;n.readConfigXml=n.xn;n.openUrl=n.Mk;n.openNext=n.gd;n.goBack=n.vq;n.setMargins=n.Ir;n.addListener=n.addListener;n.on=n.addListener;n.removeEventListener=n.removeEventListener;n.off=n.removeEventListener;n.detectBrowser=n.Yl;n.initWebGL=n.dd;n.getPercentLoaded=n.eq;n.setBasePath=n.Er;n.getBasePath=n.pm;n.setViewerSize=n.Sn;n.getViewerSize=n.sq; n.setSkinObject=n.Tr;n.changeViewMode=n.gp;n.getViewMode=n.qq;n.changePolygonMode=n.Ml;n.setPolygonMode=n.Ml;n.getPolygonMode=n.gq;n.showOnePolyHotspot=n.Tn;n.hideOnePolyHotspot=n.Lm;n.changePolyHotspotColor=n.ep;n.toggleOnePolyHotspot=n.vs;n.changeViewState=n.hp;n.getViewState=n.rq;n.setRenderFlags=n.Mr;n.getRenderFlags=n.jq;n.setMaxTileCount=n.Pn;n.getVFov=n.jc;n.setVFov=n.fj;n.getHFov=n.Fp;n.updatePanorama=n.Qh;n.isTouching=n.Wm;n.getIsMobile=n.Lp;n.setIsMobile=n.Hr;n.getIsTour=n.Mp; n.getIsAutorotating=n.Ip;n.getIsLoading=n.Kp;n.getIsLoaded=n.ui;n.getIsTileLoading=n.tm;n.getLastActivity=n.Np;n.getPan=n.Rg;n.getPanNorth=n.Ie;n.getPanDest=n.cq;n.getPanN=n.ym;n.setPan=n.Ye;n.setPanNorth=n.Zk;n.changePan=n.Ll;n.changePanLog=n.cp;n.getTilt=n.wi;n.getTiltDest=n.kq;n.setTilt=n.Ze;n.changeTilt=n.Nl;n.changeTiltLog=n.fp;n.getFov=n.kk;n.getFovDest=n.Dp;n.setFov=n.Xe;n.changeFov=n.Kl;n.changeFovLog=n.Oj;n.getRoll=n.Cm;n.setRoll=n.dj;n.setPanTilt=n.Kr;n.setPanTiltFov=n.cj; n.setDefaultView=n.Fr;n.setLocked=n.setLocked;n.setLockedMouse=n.Nn;n.setLockedKeyboard=n.Mn;n.getLockedKeyboard=n.Pp;n.setLockedWheel=n.On;n.moveTo=n.moveTo;n.moveToEx=n.Qi;n.moveToDefaultView=n.Oq;n.moveToDefaultViewEx=n.Pq;n.addHotspotElements=n.Al;n.playSound=n.Re;n.playPauseSound=n.tn;n.playStopSound=n.qr;n.pauseSound=n.Nk;n.activateSound=n.Oo;n.soundGetTime=n.fs;n.soundSetTime=n.gs;n.setMediaVisibility=n.Jr;n.isPlaying=n.isPlaying;n.stopSound=n.kj;n.setVolume=n.setVolume;n.changeVolume=n.ip; n.removeHotspots=n.Cn;n.getHotspotsVisible=n.rm;n.getCurrentPerspective=n.sd;n.addHotspot=n.Qo;n.updateHotspot=n.Ds;n.removeHotspot=n.tr;n.setActiveHotspot=n.ag;n.getPointHotspotIds=n.fq;n.getHotspot=n.Hp;n.setFullscreen=n.bg;n.toggleFullscreen=n.sj;n.enterFullscreen=n.vp;n.exitFullscreen=n.exitFullscreen;n.getIsFullscreen=n.Jp;n.startAutorotate=n.ls;n.stopAutorotate=n.os;n.toggleAutorotate=n.us;n.setAutorotateNodeFilter=n.Dr;n.startAnimation=n.ks;n.createLayers=n.Sl;n.removePanorama=n.Ue; n.getScreenResolution=n.Dm;n.getMaxScreenResolution=n.wm;n.getNodeIds=n.Yp;n.getNodeUserdata=n.Qg;n.getNodeLatLng=n.lk;n.getNodeTitle=n.aq;n.getNodeDistance=n.Xp;n.getCurrentNode=n.jk;n.getNextNode=n.Wp;n.getPrevNode=n.iq;n.getLastVisitedNode=n.Op;n.getNodesWithTag=n.xm;n.getCurrentPointHotspots=n.Cp;n.getPositionAngles=n.hq;n.getPositionRawAngles=n.zm;n.nodeVisited=n.Uq;n.clearVisitedNodes=n.mp;n.setElementIdPrefix=n.Gr;n.videoPanoPlay=n.Ns;n.videoPanoStop=n.Os;n.videoPanoPause=n.Ms; n.getVideoPanoTime=n.pq;n.setVideoPanoTime=n.$r;n.getVideoPanoObject=n.oq;n.setVideoPanoSource=n.Zr;n.getMediaObject=n.Up;n.getMediaBufferSourceObject=n.Tp;n.registerVideoElement=n.yn;n.disableSoundLoading=n.tp;n.setCrossOrigin=n.setCrossOrigin;n.setProjection=n.Qc;n.getProjection=n.Sa;n.changeProjection=n.Pj;n.changeProjectionEx=n.Pj;n.changeLensflares=n.bp;n.setTransition=n.Wr;n.getMapType=n.Sp;n.getMapDetails=n.Rp;n.getNodeMapCoords=n.Zp;n.getNodeMapCoordsInPercent=n.$p; n.getMapContainingNode=n.Qp;n.getMapsContainingNode=n.vm;n.getMapIDs=n.um;n.addVariable=n.To;n.setVariableOptions=n.Qn;n.setVariableValue=n.me;n.getVariableValue=n.nq;n.setSuperCookie=n.Vr;n.getGyroAvailable=n.Ep;n.setUseGyro=n.Xr;n.getUseGyro=n.lq;n.getOS=n.bq;n.getBrowser=n.Bp;n.triggerEvent=n.K;n.requestRedraw=n.wr;n.getWebGlContext=n.tq;n.getHasTouch=n.Gp;n.enterVR=n.Gg;n.exitVR=n.wf;n.toggleVR=n.io;n.isInVR=n.bh;n.hasVR=n.uk;n.getVRDisplayName=n.mq;n.setVRFrameBufferScaleFactor=n.Yr;var Jl=ggP2VR.yl.prototype; Jl.bufferSoundCurrentTime=Jl.pf;Jl.bufferSoundSetTime=Jl.Il;Jl.bufferSoundSetDragTime=Jl.ap;Jl.bufferSoundDuration=Jl.fi;
/home/photograt/www/components/../modules/../Vallouise-1/pano2vr_player.js