//////////////////////////////////////////////////////////////////////
// Pano2VR 7.0.1/19894 HTML5/CSS3 & WebGL Panorama Player           //
// License: David G Mehas                                           //
// (c) 2022, Garden Gnome Software, https://ggnome.com              //
//////////////////////////////////////////////////////////////////////

var q="function"==typeof Object.defineProperties?Object.defineProperty:function(x,w,t){if(x==Array.prototype||x==Object.prototype)return x;x[w]=t.value;return x};function aa(x){x=["object"==typeof globalThis&&globalThis,x,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var w=0;w<x.length;++w){var t=x[w];if(t&&t.Math==Math)return t}throw Error("Cannot find global object");}var ba=aa(this);
function L(x,w){if(w)a:{var t=ba;x=x.split(".");for(var f=0;f<x.length-1;f++){var e=x[f];if(!(e in t))break a;t=t[e]}x=x[x.length-1];f=t[x];w=w(f);w!=f&&null!=w&&q(t,x,{configurable:!0,writable:!0,value:w})}}var ca;if("function"==typeof Object.setPrototypeOf)ca=Object.setPrototypeOf;else{var da;a:{var ea={a:!0},fa={};try{fa.__proto__=ea;da=fa.a;break a}catch(x){}da=!1}ca=da?function(x,w){x.__proto__=w;if(x.__proto__!==w)throw new TypeError(x+" is not extensible");return x}:null}var ha=ca;
L("Object.setPrototypeOf",function(x){return x||ha});L("Array.prototype.fill",function(x){return x?x:function(w,t,f){var e=this.length||0;0>t&&(t=Math.max(0,e+t));if(null==f||f>e)f=e;f=Number(f);0>f&&(f=Math.max(0,e+f));for(t=Number(t||0);t<f;t++)this[t]=w;return this}});function Q(x){return x?x:Array.prototype.fill}L("Int8Array.prototype.fill",Q);L("Uint8Array.prototype.fill",Q);L("Uint8ClampedArray.prototype.fill",Q);L("Int16Array.prototype.fill",Q);L("Uint16Array.prototype.fill",Q);
L("Int32Array.prototype.fill",Q);L("Uint32Array.prototype.fill",Q);L("Float32Array.prototype.fill",Q);L("Float64Array.prototype.fill",Q);function ia(x,w,t){if(null==x)throw new TypeError("The 'this' value for String.prototype."+t+" must not be null or undefined");if(w instanceof RegExp)throw new TypeError("First argument to String.prototype."+t+" must not be a regular expression");return x+""}
L("String.prototype.startsWith",function(x){return x?x:function(w,t){var f=ia(this,w,"startsWith");w+="";var e=f.length,a=w.length;t=Math.max(0,Math.min(t|0,f.length));for(var b=0;b<a&&t<e;)if(f[t++]!=w[b++])return!1;return b>=a}});function ja(x){var w=0;return function(){return w<x.length?{done:!1,value:x[w++]}:{done:!0}}}
L("Symbol",function(x){function w(a){if(this instanceof w)throw new TypeError("Symbol is not a constructor");return new t(f+(a||"")+"_"+e++,a)}function t(a,b){this.zq=a;q(this,"description",{configurable:!0,writable:!0,value:b})}if(x)return x;t.prototype.toString=function(){return this.zq};var f="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return w});
L("Symbol.iterator",function(x){if(x)return x;x=Symbol("Symbol.iterator");for(var w="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),t=0;t<w.length;t++){var f=ba[w[t]];"function"===typeof f&&"function"!=typeof f.prototype[x]&&q(f.prototype,x,{configurable:!0,writable:!0,value:function(){return ka(ja(this))}})}return x});function ka(x){x={next:x};x[Symbol.iterator]=function(){return this};return x}
function la(x,w){x instanceof String&&(x+="");var t=0,f=!1,e={next:function(){if(!f&&t<x.length){var a=t++;return{value:w(a,x[a]),done:!1}}f=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}L("Array.prototype.keys",function(x){return x?x:function(){return la(this,function(w){return w})}});L("Object.is",function(x){return x?x:function(w,t){return w===t?0!==w||1/w===1/t:w!==w&&t!==t}});
L("Array.prototype.includes",function(x){return x?x:function(w,t){var f=this;f instanceof String&&(f=String(f));var e=f.length;t=t||0;for(0>t&&(t=Math.max(t+e,0));t<e;t++){var a=f[t];if(a===w||Object.is(a,w))return!0}return!1}});L("String.prototype.includes",function(x){return x?x:function(w,t){return-1!==ia(this,w,"includes").indexOf(w,t||0)}});
var __extends=this&&this.__extends||function(){function x(w,t){x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,e){f.__proto__=e}||function(f,e){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(f[a]=e[a])};return x(w,t)}return function(w,t){function f(){this.constructor=w}if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");x(w,t);w.prototype=null===t?Object.create(t):(f.prototype=t.prototype,new f)}}();
function ma(){var x="perspective",w=["Webkit","Moz","O","ms","Ms"],t;for(t=0;t<w.length;t++)"undefined"!==typeof document.documentElement.style[w[t]+"Perspective"]&&(x=w[t]+"Perspective");"undefined"!==typeof document.documentElement.style[x]?"webkitPerspective"in document.documentElement.style?(x=document.createElement("style"),w=document.createElement("div"),t=document.head||document.getElementsByTagName("head")[0],x.textContent="@media (-webkit-transform-3d) {#ggswhtml5{height:5px}}",t.appendChild(x),
w.id="ggswhtml5",document.documentElement.appendChild(w),t=5===w.offsetHeight,x.parentNode.removeChild(x),w.parentNode.removeChild(w)):t=!0:t=!1;return t}function na(){var x;if(x=!!window.WebGLRenderingContext)try{var w=document.createElement("canvas");w.width=100;w.height=100;var t=w.getContext("webgl");t||(t=w.getContext("experimental-webgl"));x=!!t}catch(f){x=!1}return x}var ggP2VR;
(function(x){var w=function(){function e(a){this.o=null;this.xe=this.vo=this.Na=!1;this.oc=!0;this.od=!1;this.yb=this.Oa=this.Ka=0;this.fov=70;this.Mj=this.Ca=0;this.autoplay=this.mg=this.sf=!1;this.id="";this.u=this.pan=0;this.o=a;this.Pc=this.pc=100;this.Ic=1}e.prototype.xb=function(a){var b;if(b=a.getAttributeNode("id"))this.id=b.nodeValue.toString();if(b=a.getAttributeNode("pan"))this.pan=Number(b.nodeValue);if(b=a.getAttributeNode("tilt"))this.u=Number(b.nodeValue)};e.prototype.Im=function(a){var b=
"",c=this.o,m=!0;if(c.wj){var h=new x.Ua(0,0,-100);h.Ka(-this.u*Math.PI/180);h.Oa(this.pan*Math.PI/180);h.Oa(-c.pan.m*Math.PI/180);h.Ka(c.u.m*Math.PI/180);h.yb(c.W.m*Math.PI/180);.01<=h.z&&(m=!1)}c.Oe&&(b+="perspective("+a+"px) ");b=b+("translate3d(0px,0px,"+a+"px) rotateZ(")+(c.W.m.toFixed(10)+"deg) ");b+="rotateX("+c.u.m.toFixed(10)+"deg) ";b+="rotateY("+(-c.pan.m).toFixed(10)+"deg) ";b+="rotateY("+this.pan.toFixed(10)+"deg) ";b+="rotateX("+(-this.u).toFixed(10)+"deg) ";a=1E4;h=this.j.videoWidth;
var n=this.j.videoHeight;if(0==h||0==n)h=640,n=480;0<this.pc&&(h=this.pc);0<this.Pc&&(n=this.Pc);0<h&&0<n&&(this.j.width=h,this.j.height=n,this.j.style.width=h+"px",this.j.style.height=n+"px");0<this.fov&&(a=h/(2*Math.tan(this.fov/2*Math.PI/180)));b+="translate3d(0px,0px,"+(-a).toFixed(10)+"px) ";b+="rotateZ("+this.yb.toFixed(10)+"deg) ";b+="rotateY("+(-this.Oa).toFixed(10)+"deg) ";b+="rotateX("+this.Ka.toFixed(10)+"deg) ";this.Ic&&1!=this.Ic&&(b+="scaleY("+this.Ic+") ");b+="translate3d("+-h/2+"px,"+
-n/2+"px,0px) ";this.j.style[c.Bd+"Origin"]="0% 0%";this.Na&&(b="",1==this.Ca&&(b+="scale("+Math.min(c.C.width/h,c.C.height/n)+") "),b+="translate3d("+-h/2+"px,"+-n/2+"px,0px) ");this.Hs!=b&&(this.Hs=b,this.j.style[c.Bd]=b,this.j.style.visibility=m&&this.oc&&(!this.sf||this.xe||this.Na)?"visible":"hidden",this.xe&&this.vo==this.Na&&(this.j.style[c.$b]="all 0s linear 0s"),this.vo=this.Na)};e.prototype.If=function(a){this.j&&(this.j.style.visibility=a?"visible":"hidden")};e.prototype.ie=function(){var a=
this.o;a.na?(this.j.style.left=a.C.width/2+"px",this.j.style.top=a.C.height/2+"px"):(this.j.style.left=a.margin.left+a.C.width/2+"px",this.j.style.top=a.margin.top+a.C.height/2+"px")};e.prototype.Ne=function(){this.j.parentNode&&this.j.parentNode.removeChild(this.j);this.j=null};e.prototype.Rd=function(){};return e}();x.vv=w;var t=function(e){function a(b){b=e.call(this,b)||this;b.wa=!1;b.lk=[];b.Yp=!1;b.stopped=!1;b.muted=!1;b.$o=!1;b.Ng=!1;b.Zk=!1;b.Rl=!1;b.Od=!1;b.jc=null;b.Si=null;b.Bi=0;b.Bf=
0;b.wg=!1;b.Ot=!1;b.url=[];b.loop=0;b.level=1;b.Cc=0;b.mode=1;b.fj=10;b.Cb=0;b.Mg=0;b.va=1;b.$c=0;b.ad=0;b.bd=0;b.cd=0;b.Jj=-1;return b}__extends(a,e);a.prototype.Fm=function(){var b=this,c=b.j.play();if(void 0!==c)c.then(function(){b.Pf()})["catch"](function(){b.j.pause();b.Yp&&(b.j.muted=!0,b.j.play())})};a.prototype.Tp=function(){this.wa&&this.stopped?this.stopped=!1:0==this.loop?this.wa?(this.jc=null,this.pe()):this.j.play():0<this.sb?(this.sb--,this.wa||(this.j.currentTime=0),this.Zk&&(this.Ib&&
0==this.Ib.gain.value||0==this.ub.gain.value&&0==this.Lb.gain.value&&0==this.Jb.gain.value&&0==this.Kb.gain.value)||(this.wa?(this.jc=null,this.pe()):this.j.play())):this.wa&&(this.jc=null,this.wg=!1)};a.prototype.Pf=function(){this.Od=!1;var b=this.o.ra;b&&(this.wa||7==this.mode||(this.source=b.createMediaElementSource(this.j)),2==this.mode||3==this.mode||5==this.mode?(this.Sd=b.createChannelSplitter(2),this.ub=b.createGain(),this.Jb=b.createGain(),this.Kb=b.createGain(),this.Lb=b.createGain(),this.hh=
b.createChannelMerger(2),this.wa||this.source.connect(this.Sd),this.Sd.connect(this.ub,0),this.Sd.connect(this.Jb,0),this.Sd.connect(this.Kb,1),this.Sd.connect(this.Lb,1),this.ub.connect(this.hh,0,0),this.Jb.connect(this.hh,0,1),this.Kb.connect(this.hh,0,0),this.Lb.connect(this.hh,0,1),this.hh.connect(b.destination),1==this.Jj&&this.cq()):7!=this.mode&&(this.Ib=b.createGain(),this.wa||this.source.connect(this.Ib),this.Ib.connect(b.destination)))};a.prototype.cq=function(){1!=this.Jj||this.Od||!this.Sd||
2!=this.mode&&3!=this.mode&&5!=this.mode||(this.Sd.connect(this.Kb,0),this.Sd.connect(this.Lb,0))};a.prototype.ti=function(){var b=this.o.ra;this.Na||this.Rl||(this.ub?(this.ub.gain.setValueAtTime(this.$c,b.currentTime),this.Lb.gain.setValueAtTime(this.cd,b.currentTime),this.Jb.gain.setValueAtTime(this.ad,b.currentTime),this.Kb.gain.setValueAtTime(this.bd,b.currentTime)):this.Ib&&this.Ib.gain.setValueAtTime((this.$c+this.cd)/2,b.currentTime+1))};a.prototype.Kp=function(b){var c=this.o.ra;(-1==b?this.muted:
1!=b)?this.muted&&(this.muted=this.j.muted=!1,this instanceof f||this.o.Zd(this.id)):(this.muted=this.j.muted=!0,this.o.isPlaying(this.id)&&(this.ub?(this.ub.gain.setValueAtTime(0,c.currentTime+1),this.Lb.gain.setValueAtTime(0,c.currentTime+1),this.Jb.gain.setValueAtTime(0,c.currentTime+1),this.Kb.gain.setValueAtTime(0,c.currentTime+1)):this.Ib&&this.Ib.gain.setValueAtTime(0,c.currentTime+1),this instanceof f||this.o.fi(this.id)))};a.prototype.kk=function(){if(!this.Od||4==this.mode||6==this.mode){var b=
this.o,c=this.o.ra;if((this.j||this.wa)&&!this.muted){var m,h=this.pan-b.pan.m;for(m=this.u-b.u.m;-180>h;)h+=360;for(;180<h;)h-=360;var n=this.Cc,p=this.fj;0==p&&(p=.01);0>p&&(p=b.fov.m);this.hc||(this.hc=new x.Ua,this.hc.On(this.pan,this.u));0!=this.mode&&1!=this.mode||!c||this.Ib&&this.Ib.gain.setValueAtTime(this.level*b.ba*this.va,c.currentTime);if(2==this.mode&&c){var r=.5*Math.cos(h*Math.PI/180)+.5;this.$c=Math.sqrt(r)*this.va*this.level*b.ba;this.cd=Math.sqrt(r)*this.va*this.level*b.ba;this.ad=
Math.sqrt(1-r)*this.va*this.level*b.ba;this.bd=Math.sqrt(1-r)*this.va*this.level*b.ba;this.ti()}if(3==this.mode){h=0>h?h<-this.Cb?h+this.Cb:0:h>this.Cb?h-this.Cb:0;var v=this.level;m=Math.abs(m);m=m<this.Mg?0:m-this.Mg;var y=1-m/p;if(Math.abs(h)>p||0>y)r=v*n*b.ba,c?(this.$c=r*this.va,this.cd=r*this.va,this.bd=this.ad=0,this.ti()):this.j.volume=v*n*b.ba;else if(r=1-Math.abs(h/p),c){var z=v*(n+(1-n)*y*r)*b.ba;r=v*n*b.ba;0<=h?(this.$c=z*this.va,this.cd=r*this.va):(this.$c=r*this.va,this.cd=z*this.va);
2*Math.abs(h)<p?(r=1-Math.abs(2*h)/p,z=v*(n+(1-n)*y*r)*b.ba,r=.5*v*(1-n)*y*(1-r)*b.ba,0<=h?(this.cd=z*this.va,this.bd=r*this.va,this.ad=0):(this.$c=z*this.va,this.ad=r*this.va,this.bd=0)):(r=1-(Math.abs(2*h)-p)/p,z=.5*v*(1-n)*y*r*b.ba,0<=h?(this.bd=z*this.va,this.ad=0):(this.ad=z*this.va,this.bd=0));this.ti()}else this.j.volume=v*(n+(1-n)*y*r)*b.ba}4==this.mode&&(Math.abs(h)<this.Cb&&Math.abs(m)<this.Mg?this.Ng||(this.Ng=!0,this.sb=this.loop-1,b.te||(this.j.play(),this.Od&&this.Pf())):this.Ng=!1);
5==this.mode&&(m=180*Math.acos(b.Qk.Pj(this.hc))/Math.PI,m<this.Cb?c?(this.$c=this.level*b.ba*this.va,this.cd=this.level*b.ba*this.va,this.bd=this.ad=0,this.ti()):this.j.volume=this.level*b.ba:c?(m<this.Cb+p?(h=0>h?h>-this.Cb?0:h+this.Cb:h<this.Cb?0:h-this.Cb,z=1-Math.max(m-this.Cb,0)/p,r=Math.max(1-Math.abs(h)*Math.cos(this.u*Math.PI/180)/p,0),0<h?(this.$c=this.level*(z*(1-this.Cc)+this.Cc)*b.ba*this.va,this.cd=this.level*(z*r*(1-this.Cc)+this.Cc)*b.ba*this.va,this.ad=0,this.bd=this.level*z*(1-r)*
b.ba*this.va):(this.$c=this.level*(z*r*(1-this.Cc)+this.Cc)*b.ba*this.va,this.cd=this.level*(z*(1-this.Cc)+this.Cc)*b.ba*this.va,this.ad=this.level*z*(1-r)*b.ba*this.va,this.bd=0)):(z=this.level*this.Cc*b.ba,this.$c=z*this.va,this.cd=z*this.va,this.bd=this.ad=0),this.ti()):(m-=this.Cb,m<p&&0<p?(r=1-Math.abs(m/p),this.j.volume=this.level*(n+(1-n)*r)*b.ba):this.j.volume=n*b.ba));6==this.mode&&(m=180*Math.acos(b.Qk.Pj(this.hc))/Math.PI,Math.abs(m)<this.Cb?this.Ng||(this.Ng=!0,this.sb=this.loop-1,this.wa?
this.wg||this.pe():this.j.play()):this.Ng=!1)}}};a.prototype.kr=function(){var b=this;b.jc=this.o.ra.createBufferSource();b.jc.addEventListener("ended",function(){b.Tp()},!1);2==b.mode||3==b.mode||5==b.mode?b.jc.connect(b.Sd):b.jc.connect(b.Ib)};a.prototype.pe=function(){var b=this.o.ra,c=this.Bf;this.Si?(null==this.jc&&(this.kr(),this.jc.buffer=this.Si),this.Bi=b.currentTime-c,this.Bf=0,this.wg=!0,this.stopped=!1,this.jc.start(0,c),this.o.O("buffer Source started")):(this.o.O("bufferSoundPlay() -> no audio buffer -> playWhenReady"),
this.Ot=!0)};a.prototype.Bk=function(){var b=this.o.ra.currentTime-this.Bi;this.Uf();this.Bf=b};a.prototype.Uf=function(){this.jc&&this.wg&&(this.stopped=!0,this.jc.disconnect(),this.jc.stop(0),this.jc=null);this.Bi=this.Bf=0;this.wg=!1};a.prototype.Zq=function(){var b=this.o.ra;return this.Bf?this.Bf:this.Bi?b.currentTime-this.Bi:0};a.prototype.$q=function(b){this.Uf();this.Bf=b;this.pe()};a.prototype.addElement=function(){var b=-1,c=this,m=this.o,h=this.o.ra;try{for(var n=!1,p=0;p<m.X.length;p++)m.X[p].id==
c.id&&(b=p,null==m.X[p].j&&!m.X[p].wa||m.X[p].url.join()!=c.url.join()||m.X[p].loop!=c.loop||m.X[p].mode!=c.mode||(n=!0,m.X[p].pan=c.pan,m.X[p].u=c.u,m.X[p].level=c.level,m.X[p].Cc=c.Cc,m.X[p].fj=c.fj,m.X[p].Cb=c.Cb,m.X[p].Mg=c.Mg));if(n)m.O("Keep playing "+c.id);else{if(0<=b){var r=m.X[b];if(null!=r.j||r.wa)if(h&&m.Za.enabled)m.Za.Hi.push(r),1!=m.D.da&&2!=m.D.da&&6!=m.D.da&&m.Za.Jn(r);else{try{r.wa?r.Bk():r.j.pause()}catch(z){m.O(z)}try{r.Ne()}catch(z){m.O(z)}}}h&&(this.Od=!0);c.j=document.createElement("audio");
c.j.crossOrigin=m.crossOrigin;c.j.setAttribute("class","ggmedia");m.De&&c.j.setAttribute("id",m.De+c.id);for(p=0;p<c.url.length;p++)if(n=void 0,n=document.createElement("source"),""!=c.url[p]&&"#"!=c.url[p]){n.crossOrigin=m.crossOrigin;var v=m.fb(m.Va(c.url[p]));n.setAttribute("src",v);c.j.appendChild(n);c.lk.push(v)}c.j.volume=c.level*m.ba;if(0<c.j.childNodes.length&&(m.$.appendChild(c.j),c.j.addEventListener("ended",function(){c.Tp()},!1),h)){c.Zk=!1;0==c.loop&&c.source&&c.source.mediaElement&&
(c.source.mediaElement.loop=!0);var y=new XMLHttpRequest;y.open("GET",m.fb(c.url[0]),!0);y.responseType="arraybuffer";y.onload=function(){h.decodeAudioData(y.response,function(z){c.Jj=z.numberOfChannels;1==c.Jj&&c.cq()})};y.send()}1<=c.loop&&(c.sb=c.loop-1);0<=b?m.X[b]=c:m.X.push(c);c.kk();this.o.qd||(1!=c.mode&&2!=c.mode&&3!=c.mode&&5!=c.mode||!(0<=c.loop)||h&&m.Za.enabled||(c.wa||(c.j.autoplay=!0,c.Fm()),c.autoplay=!0),0==c.mode&&0<=c.loop&&(c.autoplay=!0,c.Fm()))}}catch(z){this.o.O(z)}};a.prototype.Rd=
function(){for(var b=this.o.isPlaying(this.id),c=0,m=!1,h=0;h<this.j.children.length&&!(this.url.length<=c);h++){var n=this.j.children[h];if("SOURCE"==n.nodeName){var p=this.o.fb(this.o.Va(this.url[c]));this.lk[c]!=p&&(b&&!m&&this.o.fi(this.id),n.setAttribute("src",p),this.lk[c]=p,m=!0);c++}}m&&(this.j.load(),b&&this.o.Zd(this.id))};a.prototype.Ne=function(){try{this.o.O("Remove Snd:"+this.id),this.wa||(this.o.$.removeChild(this.j),this.j=null)}catch(b){this.o.O(b)}};a.prototype.xb=function(b){e.prototype.xb.call(this,
b);var c;(c=b.getAttributeNode("url"))&&this.url.push(c.nodeValue.toString());if(c=b.getAttributeNode("level"))this.level=Number(c.nodeValue);if(c=b.getAttributeNode("loop"))this.loop=Number(c.nodeValue);if(c=b.getAttributeNode("mode"))this.mode=Number(c.nodeValue);if(c=b.getAttributeNode("nodechangekeep"))this.$o=1==Number(c.nodeValue);if(c=b.getAttributeNode("field"))this.fj=Number(c.nodeValue);if(c=b.getAttributeNode("ambientlevel"))this.Cc=Number(c.nodeValue);if(c=b.getAttributeNode("pansize"))this.Cb=
Number(c.nodeValue);if(c=b.getAttributeNode("tiltsize"))this.Mg=Number(c.nodeValue);for(b=b.firstChild;b;)"source"==b.nodeName&&(c=b.getAttributeNode("url"))&&this.url.push(c.nodeValue.toString()),b=b.nextSibling};return a}(w);x.ke=t;var f=function(e){function a(b){b=e.call(this,b)||this;b.poster="";b.Ka=0;b.Oa=0;b.yb=0;b.fov=50;b.Ca=0;b.Mj=0;b.sf=!1;b.mg=!1;return b}__extends(a,e);a.prototype.ze=function(){1!=this.Ca&&4!=this.Ca||this.pf(!this.Na);2==this.Ca&&this.o.lp(this.id)};a.prototype.pf=function(b){var c=
this.o,m=c.ra;if(1==this.Ca||4==this.Ca){if(this.Na=b)this.j.style.pointerEvents="auto",this.j.style.cursor="pointer",this.j.style.zIndex=(c.Nf+8E4).toString(),this.j.style[this.o.$b]="all 1s ease 0s",this.j.muted=!1,this.o.isPlaying(this.id)||c.Zd(this.id);else{this.j.style.pointerEvents="none";this.j.style.cursor="default";this.j.style.zIndex=c.Nf.toString();this.j.style[this.o.$b]="all 1s ease 0s";this.o.isPlaying(this.id)&&(0==this.Mj?c.bk(this.id):2==this.Mj&&(this.j.muted=!0));this.Rl=!0;var h=
this;setTimeout(function(){h.Rl=!1},1E3)}if(m&&(2==this.mode||3==this.mode||5==this.mode)&&(m=m.currentTime,this.ub&&this.Lb&&this.Jb.gain&&this.Jb&&this.Kb)){var n=this.ub.gain.value,p=this.Lb.gain.value,r=this.Jb.gain.value,v=this.Kb.gain.value;this.Na?(this.ub.gain.linearRampToValueAtTime(n,m),this.ub.gain.linearRampToValueAtTime(this.level*c.ba,m+1),this.Lb.gain.linearRampToValueAtTime(p,m),this.Lb.gain.linearRampToValueAtTime(this.level*c.ba,m+1),this.Jb.gain.linearRampToValueAtTime(r,m),this.Jb.gain.linearRampToValueAtTime(0,
m+1),this.Kb.gain.linearRampToValueAtTime(v,m),this.Kb.gain.linearRampToValueAtTime(0,m+1)):(this.ub.gain.linearRampToValueAtTime(n,m),this.ub.gain.linearRampToValueAtTime(this.$c,m+1),this.Lb.gain.linearRampToValueAtTime(p,m),this.Lb.gain.linearRampToValueAtTime(this.cd,m+1),this.Jb.gain.linearRampToValueAtTime(r,m),this.Jb.gain.linearRampToValueAtTime(this.ad,m+1),this.Kb.gain.linearRampToValueAtTime(v,m),this.Kb.gain.linearRampToValueAtTime(this.bd,m+1))}this.xe=!0;this.o.oq()}2==this.Ca&&(b?this.o.Zd(this.id):
this.o.fi(this.id))};a.prototype.Ae=function(){this.xe=!1;this.j.style[this.o.$b]="none"};a.prototype.lv=function(){0==this.loop?this.j.play():0<this.sb?(this.sb--,this.j.currentTime=0,this.j.play()):this.isRunning=!1};a.prototype.xb=function(b){e.prototype.xb.call(this,b);var c;if(c=b.getAttributeNode("poster"))this.poster=String(c.nodeValue);if(c=b.getAttributeNode("maskimage"))this.nd=String(c.nodeValue);if(c=b.getAttributeNode("rotx"))this.Ka=Number(c.nodeValue);if(c=b.getAttributeNode("roty"))this.Oa=
Number(c.nodeValue);if(c=b.getAttributeNode("rotz"))this.yb=Number(c.nodeValue);if(c=b.getAttributeNode("fov"))this.fov=Number(c.nodeValue);if(c=b.getAttributeNode("width"))this.pc=Number(c.nodeValue);if(c=b.getAttributeNode("height"))this.Pc=Number(c.nodeValue);this.Ic=(c=b.getAttributeNode("stretch"))?Number(c.nodeValue):1;if(c=b.getAttributeNode("clickmode"))this.Ca=Number(c.nodeValue);if(c=b.getAttributeNode("popbackmode"))this.Mj=Number(c.nodeValue);if(c=b.getAttributeNode("handcursor"))this.mg=
1==Number(c.nodeValue);if(c=b.getAttributeNode("startmutedmobile"))this.Yp=1==Number(c.nodeValue)};a.prototype.addElement=function(){var b=this,c=this.o,m=this.o.ra;try{b.j=document.createElement("video");b.j.setAttribute("class","ggmedia");b.j.crossOrigin=c.crossOrigin;b.j.hidden=!0;b.j.addEventListener("click",function(r){r.stopPropagation()});c.De&&b.j.setAttribute("id",c.De+b.id);if(c.Ki)b.j.setAttribute("playsinline","playsinline"),b.j.setAttribute("style","display: none; max-width:none;");else if(b.j.setAttribute("style",
"max-width:none;pointer-events:none;"),b.j.setAttribute("playsinline","playsinline"),1==b.Ca||4==b.Ca)b.j.addEventListener(c.Tm(),function(){b.Ae()},!1),b.j.addEventListener("transitionend",function(){b.Ae()},!1);var h=void 0;for(h=0;h<b.url.length;h++){var n=void 0;n=document.createElement("source");n.crossOrigin=c.crossOrigin;var p=c.fb(c.Va(b.url[h]));n.setAttribute("src",p);b.j.appendChild(n);b.lk.push(p)}""!=b.poster&&(b.j.poster=c.fb(c.Va(b.poster)),0>b.loop&&(b.j.preload="none"));b.nd&&""!=
b.nd&&(b.j.style.nd="url('"+c.fb(b.nd)+"')",b.j.style.webkitMaskImage="url('"+c.fb(b.nd)+"')",b.j.style.maskSize="100% 100%",b.j.style.webkitMaskSize="100% 100%");b.j.volume=b.level*c.ba;1<=b.loop&&(b.sb=b.loop-1);m&&(this.Od=!0);(1==b.mode||2==b.mode||3==b.mode||5==b.mode)&&0<=b.loop&&(b.j.autoplay=!0,b.isRunning=!0,b.autoplay=!0,this.o.qd&&(b.j.muted=!0),b.Fm());c.U.push(this);c.Ki?c.$.appendChild(b.j):(b.j.style.position="absolute",b.pc&&(b.j.width=b.pc),b.Pc&&(b.j.height=b.Pc),c.ea.appendChild(b.j));
b.j.addEventListener("ended",function(){b.lv()},!1)}catch(r){c.O(r)}};a.prototype.Rd=function(){this.j.poster=this.o.fb(this.o.Va(this.poster));e.prototype.Rd.call(this)};a.prototype.registerElement=function(b,c){this.od=!0;this.j=c;this.id=b;this.level=1;this.o.U.push(this)};a.prototype.Ne=function(){var b=this.o;b.Ki&&(b.R.deleteTexture(this.texture),this.texture=0);this.j.parentNode&&this.j.parentNode.removeChild(this.j);this.j=null};return a}(t);x.Zm=f;t=function(e){function a(b){b=e.call(this,
b)||this;b.url="";b.Ka=0;b.Oa=0;b.yb=0;b.fov=50;b.Ca=0;b.mg=!1;b.pc=100;b.Pc=100;b.Ic=1;return b}__extends(a,e);a.prototype.xb=function(b){e.prototype.xb.call(this,b);var c;if(c=b.getAttributeNode("url"))this.url=c.nodeValue.toString();if(c=b.getAttributeNode("maskimage"))this.nd=String(c.nodeValue);if(c=b.getAttributeNode("rotx"))this.Ka=Number(c.nodeValue);if(c=b.getAttributeNode("roty"))this.Oa=Number(c.nodeValue);if(c=b.getAttributeNode("rotz"))this.yb=Number(c.nodeValue);if(c=b.getAttributeNode("fov"))this.fov=
Number(c.nodeValue);if(c=b.getAttributeNode("width"))this.pc=Number(c.nodeValue);if(c=b.getAttributeNode("height"))this.Pc=Number(c.nodeValue);this.Ic=(c=b.getAttributeNode("stretch"))?Number(c.nodeValue):1;if(c=b.getAttributeNode("clickmode"))this.Ca=Number(c.nodeValue);if(c=b.getAttributeNode("hidepinned"))this.sf=1==Number(c.nodeValue);if(c=b.getAttributeNode("handcursor"))this.mg=1==Number(c.nodeValue);for(b=b.firstChild;b;)"source"==b.nodeName&&(c=b.getAttributeNode("url"))&&(this.url=c.nodeValue.toString()),
b=b.nextSibling};a.prototype.Ae=function(){this.xe=!1;this.j.style[this.o.$b]="none";this.sf&&!this.Na&&(this.j.style.visibility="hidden")};a.prototype.ze=function(){1!==this.Ca&&4!==this.Ca||this.pf(!this.Na)};a.prototype.pf=function(b){var c=this.o;if(1===this.Ca||4===this.Ca)this.Na=b,this.sf&&(this.j.style.visibility="visible",this.j.style.opacity=this.Na?"0.0":"1.0"),this.Na?(this.j.style.pointerEvents="auto",this.j.style.cursor="pointer",this.j.style.zIndex=(c.Nf+8E4).toString(),this.j.style[c.$b]=
"all 1s ease 0s",this.j.style.opacity="1.0"):(this.j.style.pointerEvents="none",this.j.style.cursor="default",this.j.style.zIndex=c.Nf.toString(),this.j.style[c.$b]="all 1s ease 0s",this.sf&&(this.j.style.opacity="0.0")),this.xe=!0,c.Hm()};a.prototype.addElement=function(){var b=this,c=this.o;try{b.j=document.createElement("img");b.j.setAttribute("style","-webkit-user-drag:none; max-width:none; pointer-events:none;");b.j.setAttribute("class","ggmedia");b.j.hidden=!0;b.j.addEventListener("click",function(m){m.stopPropagation()});
c.De&&b.j.setAttribute("id",c.De+b.id);b.j.ondragstart=function(){return!1};if(1===b.Ca||4===b.Ca)b.j.addEventListener(c.Tm(),function(){b.Ae()},!1),b.j.addEventListener("transitionend",function(){b.Ae()},!1);b.j.setAttribute("src",c.fb(c.Va(b.url)));b.pc&&(b.j.width=b.pc);b.Pc&&(b.j.height=b.Pc);c.Xa.push(b);b.j.style.position="absolute";b.nd&&""!=b.nd&&(b.j.style.nd="url('"+c.fb(b.nd)+"')",b.j.style.webkitMaskImage="url('"+c.fb(b.nd)+"')",b.j.style.maskSize="100% 100%",b.j.style.webkitMaskSize=
"100% 100%");c.ea.appendChild(b.j)}catch(m){c.O("Error addimage:"+m)}};a.prototype.Rd=function(){this.j.setAttribute("src",this.o.fb(this.o.Va(this.url)))};return a}(w);x.Hq=t;t=function(e){function a(b){b=e.call(this,b)||this;b.code="";return b}__extends(a,e);a.prototype.xb=function(b){e.prototype.xb.call(this,b);var c;if(c=b.getAttributeNode("rotx"))this.Ka=Number(c.nodeValue);if(c=b.getAttributeNode("roty"))this.Oa=Number(c.nodeValue);if(c=b.getAttributeNode("rotz"))this.yb=Number(c.nodeValue);
if(c=b.getAttributeNode("fov"))this.fov=Number(c.nodeValue);if(c=b.getAttributeNode("width"))this.pc=Number(c.nodeValue);if(c=b.getAttributeNode("height"))this.Pc=Number(c.nodeValue);this.Ic=(c=b.getAttributeNode("stretch"))?Number(c.nodeValue):1;if(c=b.getAttributeNode("clickmode"))this.Ca=Number(c.nodeValue);if(c=b.getAttributeNode("handcursor"))this.mg=1==Number(c.nodeValue);if(c=b.getAttributeNode("code"))this.code=c.nodeValue.toString()};a.prototype.Ae=function(){this.xe=!1;this.j.style[this.o.$b]=
"none"};a.prototype.ze=function(){1!==this.Ca&&4!==this.Ca||this.pf(!this.Na)};a.prototype.pf=function(b){var c=this.o;if(1===this.Ca||4===this.Ca)this.Na=b,this.sf&&(this.j.style.visibility="visible",this.j.style.opacity=this.Na?"0.0":"1.0"),this.Na?(this.j.style.cursor="pointer",this.j.style.zIndex=(c.Nf+8E4).toString(),this.j.style[c.$b]="all 1s ease 0s",this.j.style.opacity="1.0"):(this.j.style.cursor="default",this.j.style.zIndex=c.Nf.toString(),this.j.style[c.$b]="all 1s ease 0s"),this.xe=!0,
c.Hm()};a.prototype.addElement=function(){var b=this,c=this.o;try{b.j=document.createElement("div");this.lq();b.j.setAttribute("style","max-width:none;");b.j.setAttribute("class","ggmedia");c.De&&b.j.setAttribute("id",c.De+b.id);if(1===b.Ca||4===b.Ca)b.j.addEventListener(c.Tm(),function(){b.Ae()},!1),b.j.addEventListener("transitionend",function(){b.Ae()},!1);c.Tb.push(b);b.j.style.position="absolute";0==b.Ca?c.Ja.insertBefore(b.j,c.Ja.firstChild):c.ea.appendChild(b.j)}catch(m){c.O("Error addwebelement:"+
m)}};a.prototype.lq=function(){var b=this.j.innerHTML,c=this.o.Va(this.code);c!=b&&(this.j.innerHTML=c)};a.prototype.Rd=function(){this.lq()};return a}(w);x.Jq=t;w=function(e){function a(b){b=e.call(this,b)||this;b.kn=50;b.alpha=50;b.type=0;b.color=16777215;return b}__extends(a,e);a.prototype.xb=function(b){e.prototype.xb.call(this,b);var c;if(c=b.getAttributeNode("blinding"))this.kn=Number(c.nodeValue);if(c=b.getAttributeNode("alpha"))this.alpha=Number(c.nodeValue);if(c=b.getAttributeNode("type"))this.type=
Number(c.nodeValue);if(c=b.getAttributeNode("color"))this.color=1*Number(c.nodeValue)};return a}(w);x.Iq=w;w=function(){function e(a){this.o=a;this.type="empty";this.rm=this.id=this.target=this.description=this.title=this.url="";this.w=100;this.h=20;this.rk=!1;this.j=null;this.Vl=this.Ul=this.Pb=this.dc=this.jb=this.Da=this.distance=this.u=this.pan=0;this.visible=!0;this.Xb=a.K.Xb;this.Vb=a.K.Vb;this.Wb=a.K.Wb;this.Ub=a.K.Ub;this.Be=a.K.Be;this.gd="";this.yd=this.ff=0;this.Lf=!1;this.bj=0;this.vertices=
[]}e.prototype.cg=function(){this.id=this.id;this.pan=this.pan;this.tilt=this.u;this.url=this.url;this.target=this.target;this.title=this.title;this.distance=this.distance;this.description=this.description;this.skinid=this.rm;this.obj=this.j;this.customimage=this.gd;this.customimagewidth=this.ff;this.customimageheight=this.yd;this.use3D=this.Lf;this.distance3D=this.bj;this.j&&this.j.__div&&(this.div=this.j.__div)};e.prototype.Ru=function(){var a=this.url;return"{"==a.charAt(0)?a.substr(1,a.length-
2):!1};e.prototype.xb=function(a){var b;if(b=a.getAttributeNode("url"))this.url=b.nodeValue.toString();if(b=a.getAttributeNode("target"))this.target=b.nodeValue.toString();if(b=a.getAttributeNode("title"))this.title=b.nodeValue.toString();if(b=a.getAttributeNode("description"))this.description=b.nodeValue.toString();if(b=a.getAttributeNode("id"))this.id=b.nodeValue.toString();if(b=a.getAttributeNode("skinid"))this.rm=b.nodeValue.toString();if(b=a.getAttributeNode("width"))this.w=Number(b.nodeValue);
if(b=a.getAttributeNode("height"))this.h=Number(b.nodeValue);if(b=a.getAttributeNode("wordwrap"))this.rk=1==Number(b.nodeValue);b=a.getAttributeNode("pan");this.pan=1*(b?Number(b.nodeValue):0);b=a.getAttributeNode("tilt");this.u=1*(b?Number(b.nodeValue):0);b=a.getAttributeNode("fov");this.fov=1*(b?Number(b.nodeValue):0);b=a.getAttributeNode("distance");this.distance=1*(b?Number(b.nodeValue):0);if(b=a.getAttributeNode("bordercolor"))this.Xb=1*Number(b.nodeValue);if(b=a.getAttributeNode("backgroundcolor"))this.Vb=
1*Number(b.nodeValue);if(b=a.getAttributeNode("borderalpha"))this.Wb=1*Number(b.nodeValue);if(b=a.getAttributeNode("backgroundalpha"))this.Ub=1*Number(b.nodeValue);if(b=a.getAttributeNode("handcursor"))this.Be=1==Number(b.nodeValue);if(b=a.getAttributeNode("customimage"))this.gd=this.o.Zn()+b.nodeValue;if(b=a.getAttributeNode("customimagewidth"))this.ff=Number(b.nodeValue);if(b=a.getAttributeNode("customimageheight"))this.yd=Number(b.nodeValue);if(b=a.getAttributeNode("use3D"))this.Lf=1==Number(b.nodeValue);
if(b=a.getAttributeNode("distance3D"))this.bj=Number(b.nodeValue);for(a=a.firstChild;a;){if("polystring"==a.nodeName){b=a.textContent.toString().split("|");for(var c=0;c<b.length;c++){var m=b[c].split("/");if(2==m.length){var h={pan:0,u:0};h.pan=Number(m[0]);h.u=Number(m[1]);this.vertices.push(h)}}}"vertex"==a.nodeName&&(h={pan:0,u:0},b=a.getAttributeNode("pan"),h.pan=1*(b?Number(b.nodeValue):0),b=a.getAttributeNode("tilt"),h.u=1*(b?Number(b.nodeValue):0),this.vertices.push(h));a=a.nextSibling}this.cg()};
return e}();x.Ni=w})(ggP2VR||(ggP2VR={}));
(function(x){var w=function(){function t(f,e){this.x=f;this.y=e}t.prototype.init=function(f,e){this.x=f;this.y=e};t.prototype.Wd=function(f,e,a){var b=e.y-f.y;this.x=f.x+(e.x-f.x)*a;this.y=f.y+b*a};t.prototype.Yq=function(f,e,a,b,c){var m=new t;m.Wd(f,a,c);f=new t;f.Wd(a,b,c);a=new t;a.Wd(b,e,c);e=new t;e.Wd(m,f,c);m=new t;m.Wd(f,a,c);f=new t;f.Wd(e,m,c);this.x=f.x;this.y=f.y};t.prototype.zk=function(f,e,a,b,c){var m=new t,h=.5,n=.25;do{m.Yq(f,e,a,b,h);var p=m.x-c;h=0<p?h-n:h+n;n/=2}while(.01<Math.abs(p));
this.x=m.x;this.y=m.y};return t}();x.Mc=w})(ggP2VR||(ggP2VR={}));
(function(x){var w=function(){function t(f,e,a,b,c){this.x=f;this.y=e;this.z=a;this.Md=b;this.hc=c}t.prototype.init=function(f,e,a,b,c){this.x=f;this.y=e;this.z=a;this.Md=b;this.hc=c};t.prototype.toString=function(){return"("+this.x+","+this.y+","+this.z+") - ("+this.Md+","+this.hc+")"};t.prototype.Ka=function(f){var e=Math.sin(f);f=Math.cos(f);var a=this.y,b=this.z;this.y=f*a-e*b;this.z=e*a+f*b};t.prototype.Xt=function(){var f=this.y;this.y=-this.z;this.z=f};t.prototype.Wt=function(){var f=this.y;
this.y=this.z;this.z=-f};t.prototype.Oa=function(f){var e=Math.sin(f);f=Math.cos(f);var a=this.x,b=this.z;this.x=f*a+e*b;this.z=-e*a+f*b};t.prototype.Yt=function(){var f=this.x;this.x=-this.z;this.z=f};t.prototype.yb=function(f){var e=Math.sin(f);f=Math.cos(f);var a=this.x,b=this.y;this.x=f*a-e*b;this.y=e*a+f*b};t.prototype.Ap=function(){var f=this.x;this.x=-this.y;this.y=f};t.prototype.ae=function(f){this.Ka(f*Math.PI/180)};t.prototype.Gf=function(f){this.Oa(f*Math.PI/180)};t.prototype.Hf=function(f){this.yb(f*
Math.PI/180)};t.prototype.clone=function(){return new t(this.x,this.y,this.z,this.Md,this.hc)};t.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)};t.prototype.normalize=function(){var f=this.length();0<f&&(f=1/f,this.x*=f,this.y*=f,this.z*=f)};t.prototype.Pj=function(f){return this.x*f.x+this.y*f.y+this.z*f.z};t.prototype.On=function(f,e){var a=Math.cos(e*Math.PI/180);this.x=a*Math.sin(f*Math.PI/180);this.y=Math.sin(e*Math.PI/180);this.z=a*Math.cos(f*Math.PI/
180)};t.prototype.Uq=function(){return 180*Math.atan2(-this.x,-this.z)/Math.PI};t.prototype.Vq=function(){return 180*Math.asin(this.y/this.length())/Math.PI};t.prototype.Wd=function(f,e,a){this.x=f.x*a+e.x*(1-a);this.y=f.y*a+e.y*(1-a);this.z=f.z*a+e.z*(1-a);this.Md=f.Md*a+e.Md*(1-a);this.hc=f.hc*a+e.hc*(1-a)};return t}();x.Ua=w})(ggP2VR||(ggP2VR={}));
(function(x){var w=function(){function t(){this.Fp()}t.prototype.Fp=function(){this.sc=1;this.Kc=this.tc=this.Ob=0;this.uc=1;this.vc=this.bc=this.Lc=0;this.cc=1};t.prototype.clone=function(f){this.sc=f.sc;this.Ob=f.Ob;this.tc=f.tc;this.Kc=f.Kc;this.uc=f.uc;this.Lc=f.Lc;this.bc=f.bc;this.vc=f.vc;this.cc=f.cc};t.prototype.pu=function(f){var e=Math.cos(f);f=Math.sin(f);this.sc=1;this.Kc=this.tc=this.Ob=0;this.uc=e;this.Lc=-f;this.bc=0;this.vc=f;this.cc=e};t.prototype.qu=function(f){var e=Math.cos(f);
f=Math.sin(f);this.sc=e;this.Ob=0;this.tc=f;this.Kc=0;this.uc=1;this.Lc=0;this.bc=-f;this.vc=0;this.cc=e};t.prototype.ru=function(f){var e=Math.cos(f);f=Math.sin(f);this.sc=e;this.Ob=-f;this.tc=0;this.Kc=f;this.uc=e;this.vc=this.bc=this.Lc=0;this.cc=1};t.prototype.mu=function(f){this.pu(f*Math.PI/180)};t.prototype.nu=function(f){this.qu(f*Math.PI/180)};t.prototype.ou=function(f){this.ru(f*Math.PI/180)};t.prototype.ae=function(f){this.md||(this.md=new t,this.He=new t);this.md.mu(f);this.He.clone(this);
this.multiply(this.md,this.He)};t.prototype.Gf=function(f){this.md||(this.md=new t,this.He=new t);this.md.nu(f);this.He.clone(this);this.multiply(this.md,this.He)};t.prototype.Hf=function(f){this.md||(this.md=new t,this.He=new t);this.md.ou(f);this.He.clone(this);this.multiply(this.md,this.He)};t.prototype.multiply=function(f,e){this.sc=f.sc*e.sc+f.Ob*e.Kc+f.tc*e.bc;this.Ob=f.sc*e.Ob+f.Ob*e.uc+f.tc*e.vc;this.tc=f.sc*e.tc+f.Ob*e.Lc+f.tc*e.cc;this.Kc=f.Kc*e.sc+f.uc*e.Kc+f.Lc*e.bc;this.uc=f.Kc*e.Ob+
f.uc*e.uc+f.Lc*e.vc;this.Lc=f.Kc*e.tc+f.uc*e.Lc+f.Lc*e.cc;this.bc=f.bc*e.sc+f.vc*e.Kc+f.cc*e.bc;this.vc=f.bc*e.Ob+f.vc*e.uc+f.cc*e.vc;this.cc=f.bc*e.tc+f.vc*e.Lc+f.cc*e.cc};t.prototype.mt=function(f){var e=f.x;var a=f.y;var b=f.z;f.x=e*this.sc+a*this.Ob+b*this.tc;f.y=e*this.Kc+a*this.uc+b*this.Lc;f.z=e*this.bc+a*this.vc+b*this.cc};return t}();x.Wm=w})(ggP2VR||(ggP2VR={}));
(function(x){x.la={create:function(w){var t="undefined"!=typeof Float32Array?new Float32Array(16):Array(16);w&&(t[0]=w[0],t[1]=w[1],t[2]=w[2],t[3]=w[3],t[4]=w[4],t[5]=w[5],t[6]=w[6],t[7]=w[7],t[8]=w[8],t[9]=w[9],t[10]=w[10],t[11]=w[11],t[12]=w[12],t[13]=w[13],t[14]=w[14],t[15]=w[15]);return t},set:function(w,t){t[0]=w[0];t[1]=w[1];t[2]=w[2];t[3]=w[3];t[4]=w[4];t[5]=w[5];t[6]=w[6];t[7]=w[7];t[8]=w[8];t[9]=w[9];t[10]=w[10];t[11]=w[11];t[12]=w[12];t[13]=w[13];t[14]=w[14];t[15]=w[15];return t},identity:function(w){w[0]=
1;w[1]=0;w[2]=0;w[3]=0;w[4]=0;w[5]=1;w[6]=0;w[7]=0;w[8]=0;w[9]=0;w[10]=1;w[11]=0;w[12]=0;w[13]=0;w[14]=0;w[15]=1;return w},multiply:function(w,t,f){f||(f=w);var e=w[0],a=w[1],b=w[2],c=w[3],m=w[4],h=w[5],n=w[6],p=w[7],r=w[8],v=w[9],y=w[10],z=w[11],C=w[12],F=w[13],E=w[14];w=w[15];var D=t[0],A=t[1],G=t[2],J=t[3],H=t[4],I=t[5],M=t[6],K=t[7],O=t[8],R=t[9],U=t[10],V=t[11],W=t[12],X=t[13],Y=t[14];t=t[15];f[0]=D*e+A*m+G*r+J*C;f[1]=D*a+A*h+G*v+J*F;f[2]=D*b+A*n+G*y+J*E;f[3]=D*c+A*p+G*z+J*w;f[4]=H*e+I*m+M*r+
K*C;f[5]=H*a+I*h+M*v+K*F;f[6]=H*b+I*n+M*y+K*E;f[7]=H*c+I*p+M*z+K*w;f[8]=O*e+R*m+U*r+V*C;f[9]=O*a+R*h+U*v+V*F;f[10]=O*b+R*n+U*y+V*E;f[11]=O*c+R*p+U*z+V*w;f[12]=W*e+X*m+Y*r+t*C;f[13]=W*a+X*h+Y*v+t*F;f[14]=W*b+X*n+Y*y+t*E;f[15]=W*c+X*p+Y*z+t*w;return f},translate:function(w,t,f){var e=t[0],a=t[1];t=t[2];if(!f||w==f)return w[12]=w[0]*e+w[4]*a+w[8]*t+w[12],w[13]=w[1]*e+w[5]*a+w[9]*t+w[13],w[14]=w[2]*e+w[6]*a+w[10]*t+w[14],w[15]=w[3]*e+w[7]*a+w[11]*t+w[15],w;var b=w[0],c=w[1],m=w[2],h=w[3],n=w[4],p=w[5],
r=w[6],v=w[7],y=w[8],z=w[9],C=w[10],F=w[11];f[0]=b;f[1]=c;f[2]=m;f[3]=h;f[4]=n;f[5]=p;f[6]=r;f[7]=v;f[8]=y;f[9]=z;f[10]=C;f[11]=F;f[12]=b*e+n*a+y*t+w[12];f[13]=c*e+p*a+z*t+w[13];f[14]=m*e+r*a+C*t+w[14];f[15]=h*e+v*a+F*t+w[15];return f},scale:function(w,t,f){var e=t[0],a=t[1];t=t[2];if(!f||w==f)return w[0]*=e,w[1]*=e,w[2]*=e,w[3]*=e,w[4]*=a,w[5]*=a,w[6]*=a,w[7]*=a,w[8]*=t,w[9]*=t,w[10]*=t,w[11]*=t,w;f[0]=w[0]*e;f[1]=w[1]*e;f[2]=w[2]*e;f[3]=w[3]*e;f[4]=w[4]*a;f[5]=w[5]*a;f[6]=w[6]*a;f[7]=w[7]*a;f[8]=
w[8]*t;f[9]=w[9]*t;f[10]=w[10]*t;f[11]=w[11]*t;f[12]=w[12];f[13]=w[13];f[14]=w[14];f[15]=w[15];return f},rotate:function(w,t,f,e){var a=f[0],b=f[1];f=f[2];var c=Math.sqrt(a*a+b*b+f*f);if(!c)return null;1!=c&&(c=1/c,a*=c,b*=c,f*=c);var m=Math.sin(t),h=Math.cos(t),n=1-h;t=w[0];c=w[1];var p=w[2],r=w[3],v=w[4],y=w[5],z=w[6],C=w[7],F=w[8],E=w[9],D=w[10],A=w[11],G=a*a*n+h,J=b*a*n+f*m,H=f*a*n-b*m,I=a*b*n-f*m,M=b*b*n+h,K=f*b*n+a*m,O=a*f*n+b*m;a=b*f*n-a*m;b=f*f*n+h;e?w!=e&&(e[12]=w[12],e[13]=w[13],e[14]=w[14],
e[15]=w[15]):e=w;e[0]=t*G+v*J+F*H;e[1]=c*G+y*J+E*H;e[2]=p*G+z*J+D*H;e[3]=r*G+C*J+A*H;e[4]=t*I+v*M+F*K;e[5]=c*I+y*M+E*K;e[6]=p*I+z*M+D*K;e[7]=r*I+C*M+A*K;e[8]=t*O+v*a+F*b;e[9]=c*O+y*a+E*b;e[10]=p*O+z*a+D*b;e[11]=r*O+C*a+A*b;return e},Ar:function(w,t,f,e,a,b,c){c||(c=x.la.create());var m=t-w,h=e-f,n=b-a;c[0]=2*a/m;c[1]=0;c[2]=0;c[3]=0;c[4]=0;c[5]=2*a/h;c[6]=0;c[7]=0;c[8]=(t+w)/m;c[9]=(e+f)/h;c[10]=-(b+a)/n;c[11]=-1;c[12]=0;c[13]=0;c[14]=-(b*a*2)/n;c[15]=0;return c},perspective:function(w,t,f,e,a){w=
f*Math.tan(w*Math.PI/360);t*=w;return x.la.Ar(-t,t,-w,w,f,e,a)},Cv:function(w,t,f,e,a,b,c){c||(c=x.la.create());var m=t-w,h=e-f,n=b-a;c[0]=2/m;c[1]=0;c[2]=0;c[3]=0;c[4]=0;c[5]=2/h;c[6]=0;c[7]=0;c[8]=0;c[9]=0;c[10]=-2/n;c[11]=0;c[12]=-(w+t)/m;c[13]=-(e+f)/h;c[14]=-(b+a)/n;c[15]=1;return c}}})(ggP2VR||(ggP2VR={}));
(function(x){var w=function(){function t(f){this.za=x.la.create();this.Bb=x.la.create();this.Vd=0;this.eb=[];this.Nh=!1;this.wm=this.$k=this.Zl=1;this.Yf=1E6;this.Zi=[!1,!1,!1,!1,!1,!1];this.Zj=!1;this.Tk=[];this.th=!1;this.Xm=8;this.dt=new x.Wm;this.re=[];this.Nm=null;this.o=f;this.N=f.N;if(f.kd||f.Kh)f.N.Cm=2}t.prototype.Jh=function(){var f=this.o.R;if(f){var e=f.createShader(f.FRAGMENT_SHADER);f.shaderSource(e,"#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}");
f.compileShader(e);f.getShaderParameter(e,f.COMPILE_STATUS)||(console&&console.log(f.getShaderInfoLog(e)),alert(f.getShaderInfoLog(e)),e=null);var a=f.createShader(f.VERTEX_SHADER);this.jd(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=f.createProgram();this.sg(this.P,a,e);this.P.ja=f.getAttribLocation(this.P,"aVertexPosition");f.enableVertexAttribArray(this.P.ja);this.P.La=f.getAttribLocation(this.P,"aTextureCoord");f.enableVertexAttribArray(this.P.La);this.P.Je=f.getUniformLocation(this.P,"uPMatrix");this.P.bi=f.getUniformLocation(this.P,"uMVMatrix");this.P.zg=f.getUniformLocation(this.P,"uSampler");this.P.vk=f.getUniformLocation(this.P,"uZoffset");e=f.createShader(f.VERTEX_SHADER);this.jd(e,"#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=f.createShader(f.FRAGMENT_SHADER);this.jd(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.$d=f.createProgram();this.sg(this.$d,e,a);this.$d.ja=f.getAttribLocation(this.$d,"aVertexPosition");f.enableVertexAttribArray(this.$d.ja);a=f.createShader(f.VERTEX_SHADER);this.jd(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}");
e=f.createShader(f.FRAGMENT_SHADER);this.jd(e,"#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.wh=f.createProgram();this.sg(this.wh,a,e)}};t.prototype.tj=function(){var f=this.o,e=f.R;if(e){var a=e.createShader(e.FRAGMENT_SHADER);var b=this.ll(13);this.jd(a,b);b=e.createShader(e.VERTEX_SHADER);
this.jd(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.rp=e.createProgram();this.sg(this.rp,b,a);a=e.createShader(e.FRAGMENT_SHADER);b=this.ll(4);this.jd(a,b);b=e.createShader(e.VERTEX_SHADER);this.jd(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.sp=e.createProgram();this.sg(this.sp,b,a);a=e.createShader(e.FRAGMENT_SHADER);b=this.ll(f.B.format);this.jd(a,b);b=e.createShader(e.VERTEX_SHADER);this.jd(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.tp=e.createProgram();this.sg(this.tp,b,a);this.Rj||(this.Rj=e.createBuffer())}else this.o.O("No WebGL to initRemapShader!")};t.prototype.jd=function(f,e){var a=this.o.R;a.shaderSource(f,e);a.compileShader(f);a.getShaderParameter(f,a.COMPILE_STATUS)||(console&&console.log(a.getShaderInfoLog(f)),S&&alert(a.getShaderInfoLog(f)))};t.prototype.sg=function(f,e,a){var b=this.o.R;b.attachShader(f,e);b.attachShader(f,a);b.linkProgram(f);b.getProgramParameter(f,b.LINK_STATUS)||(alert("Could not initialise shader program"),
console&&console.log(b.getError()));b.useProgram(f)};t.prototype.ll=function(f){var e=this.o;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==f?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.to(e.Z());e.Z()!=e.Hc()&&0!=e.Hc()?(e=this.to(e.Hc()),a+="vec4 direction1,direction2;\n",a+=b.replace("direction=","direction1="),a+=e.replace("direction=","direction2="),a+="direction=normalize(mix(direction1, direction2,1.0-directionBlend));\n"):a+=b;a+="direction=direction*matRotate;\n";13==f&&(a+="direction.z=-direction.z;",
a+="gl_FragColor = textureCube(cubeTexture, direction.xyz);");4==f&&(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=this.th?a+" gl_FragColor = vec4(0.5,0.5,0,1);\n":a+"  gl_FragColor = texture2D(tileTexture, texc);\n",a+="} else {\n",a=this.th?a+" gl_FragColor = vec4(0.5,0,0,0.3);\n":
a+"  discard;\n",a+="}\n");1==f&&(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==f&&(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"};t.prototype.to=function(f){var e="";switch(f){case 4:e+="direction.x=dst.x*rectDstDistance;\ndirection.y=dst.y*rectDstDistance;\ndirection.z=-1.0;\n";break;case 12:e+="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:e+="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 e+
"direction.w=0.0;\ndirection=normalize(direction);\n"};t.prototype.Co=function(f){var e,a,b=this.o,c=this.o.R;this.Pk=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,this.Pk);var m=[-1,-1,1,1,-1,1,1,1,1,-1,1,1];for(e=0;12>e;e++)2>e%3&&(m[e]*=f);c.bufferData(c.ARRAY_BUFFER,new Float32Array(m),c.STATIC_DRAW);this.ef=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,this.ef);var h=[1,0,0,0,0,1,1,1];c.bufferData(c.ARRAY_BUFFER,new Float32Array(h),c.STATIC_DRAW);this.xd=c.createBuffer();c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,
this.xd);var n=[0,1,2,0,2,3];c.bufferData(c.ELEMENT_ARRAY_BUFFER,new Uint16Array(n),c.STATIC_DRAW);m=[];n=[];h=[];var p=new x.Ua;for(f=0;6>f;f++){var r=f%3;var v=3>f?1:0;for(a=0;4>a;a++){p.x=-1;p.y=-1;p.z=1;for(e=0;e<a;e++)p.Ap();h.push((0>p.x?.33:0)+.33*r,(0>p.y?0:.5)+.5*v);if(4>f)for(e=0;e<f;e++)p.Yt();else 5==f?p.Xt():p.Wt();m.push(p.x,p.y,p.z)}e=4*f;n.push(0+e,1+e,2+e,0+e,2+e,3+e)}b.B.nk=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,b.B.nk);c.bufferData(c.ARRAY_BUFFER,new Float32Array(m),c.STATIC_DRAW);
b.B.Di=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,b.B.Di);c.bufferData(c.ARRAY_BUFFER,new Float32Array(h),c.STATIC_DRAW);b.B.sj=c.createBuffer();c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,b.B.sj);c.bufferData(c.ELEMENT_ARRAY_BUFFER,new Uint16Array(n),c.STATIC_DRAW);this.Ls=c.createBuffer();this.Ks=c.createBuffer()};t.prototype.sl=function(f){var e=this;return function(){try{if(f.rt)return;var a=e.o.R;a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,1);var b=!1;null!=f.yf&&f.yf.complete?f.xo||(a.bindTexture(a.TEXTURE_2D,
f),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,f.yf),b=f.xo=!0):null!=f.Df&&f.Df.complete&&(a.bindTexture(a.TEXTURE_2D,f),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,f.Df),b=!0);b&&(f.loaded=!0,e.o.D.Zc&&("previewtrack"==e.o.D.delay||"videopano"==e.o.D.delay&&!e.o.B.j)&&e.mp()&&e.o.ak(null));a.bindTexture(a.TEXTURE_2D,null);a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,0)}catch(c){e.o.O(c)}e.o.update(2)}};t.prototype.Do=function(){var f=this.o,e=f.R;if(this.eb)for(;0<this.eb.length;)e.deleteTexture(this.eb.pop());
this.eb=[];for(var a=0;6>a;a++){var b=e.createTexture();this.Vd++;b.Df=null;b.yf=null;b.xo=!1;e.bindTexture(e.TEXTURE_2D,b);e.texImage2D(e.TEXTURE_2D,0,e.RGB,1,1,0,e.RGB,e.UNSIGNED_BYTE,null);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);if(f.mh[a]){var c=new Image;c.crossOrigin=f.crossOrigin;c.src=f.fb(f.mh[a]);b.Df=c;c.addEventListener&&c.addEventListener("load",
this.sl(b),!1);f.wd.push(c)}this.eb.push(b)}for(a=0;6>a;a++)f.lh[a]&&(c=new Image,c.crossOrigin=f.crossOrigin,c.src=f.fb(f.lh[a]),c.addEventListener?c.addEventListener("load",this.sl(this.eb[a]),!1):c.onload=this.sl(this.eb[a]),this.eb[a].yf=c,f.wd.push(c));for(a=0;a<f.U.length;a++)f.U[a].od||(f.U[a].texture=e.createTexture(),f.Vd++,e.bindTexture(e.TEXTURE_2D,f.U[a].texture),e.texImage2D(e.TEXTURE_2D,0,e.RGB,1,1,0,e.RGB,e.UNSIGNED_BYTE,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),
e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE));f.B.texture=e.createTexture();f.Vd++;e.bindTexture(e.TEXTURE_2D,f.B.texture);e.texImage2D(e.TEXTURE_2D,0,e.RGB,1,1,0,e.RGB,e.UNSIGNED_BYTE,null);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);e.bindTexture(e.TEXTURE_2D,null)};t.prototype.rv=
function(){var f=this.o;if(f.C.width!=f.ea.offsetWidth||f.C.height!=f.ea.offsetHeight)f.C.width=f.ea.offsetWidth,f.C.height=f.ea.offsetHeight;f.ue&&(f.Rc(0),f.fc());if(f.R){var e=f.R;this.ik();e.clear(e.DEPTH_BUFFER_BIT);e.useProgram(this.P);this.Dg(0);e.uniform1i(this.P.zg,0);e.enableVertexAttribArray(this.P.ja);e.enableVertexAttribArray(this.P.La);e.bindBuffer(e.ARRAY_BUFFER,this.ef);e.vertexAttribPointer(this.P.La,2,e.FLOAT,!1,0,0);e.activeTexture(e.TEXTURE0);e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,
this.xd);e.uniform1f(this.P.vk,1E-4);e.vertexAttribPointer(this.P.ja,3,e.FLOAT,!1,0,0);x.la.identity(this.Bb);x.la.perspective(f.Mb(),f.Ab.width/f.Ab.height,.1,100,this.Bb);e.uniformMatrix4fv(this.P.Je,!1,this.Bb);for(f=0;6>f;f++)this.Dg(f),e.bindBuffer(e.ARRAY_BUFFER,this.Pk),e.vertexAttribPointer(this.P.ja,3,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,this.ef),e.vertexAttribPointer(this.P.La,2,e.FLOAT,!1,0,0),6<=this.eb.length&&this.eb[f].loaded&&(e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,
this.eb[f]),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.xd),e.uniform1i(this.P.zg,0),e.uniformMatrix4fv(this.P.bi,!1,this.za),e.uniformMatrix4fv(this.P.Je,!1,this.Bb),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0))}};t.prototype.ik=function(){var f=this.o,e=this.N;e.M.Nj&&6<e.M.Nj.length&&(e=parseInt(e.M.Nj),f.R.clearColor((e>>16&255)/255,(e>>8&255)/255,(e>>0&255)/255,1))};t.prototype.Dg=function(f,e){void 0===e&&(e=1);var a=this.o;x.la.identity(this.za);x.la.rotate(this.za,e*-a.W.m*Math.PI/180,[0,
0,1]);x.la.rotate(this.za,e*-a.u.m*Math.PI/180,[1,0,0]);-1==e?x.la.rotate(this.za,-a.pan.m*Math.PI/180,[0,1,0]):x.la.rotate(this.za,(180-a.pan.m)*Math.PI/180,[0,1,0]);a.Ya&&(x.la.rotate(this.za,-a.Ya.pitch*Math.PI/180,[1,0,0]),x.la.rotate(this.za,a.Ya.W*Math.PI/180,[0,0,1]));4>f?x.la.rotate(this.za,-Math.PI/2*f,[0,1,0]):x.la.rotate(this.za,Math.PI/2*(5==f?1:-1),[1,0,0])};t.prototype.Su=function(f){var e=this;return function(){e.Tk.push(f)}};t.prototype.qr=function(f){this.o.tb=!0;this.o.qh=!0;f.loaded=
!0;f.$l=0;f.Me=0;var e=this.o.R;this.Dn();e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,1);if(null!=f.M&&f.M.complete){f.Nb=e.createTexture();this.o.Vd++;e.bindTexture(e.TEXTURE_2D,f.Nb);try{e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,f.M)}catch(a){e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array([128,128,128,250])),this.o.O(a)}}this.o.update(2)};t.prototype.Dn=function(){this.o.N.Ei&&this.o.N.Ei--};t.prototype.rr=function(){if(0<this.Tk.length){var f=this.Tk.shift();
this.qr(f)}};t.prototype.nt=function(f){var e=this;return function(){e.o.tb=!0;e.o.qh=!0;var a=e.N.M;try{if(null!=f&&f.complete){var b=a.levels[a.levels.length-1],c=a.gb;b.height=b.width=f.width-2*c;b.Y=b.ta=1;for(var m=0;6>m;m++){var h=new x.$g;h.Ec=document.createElement("canvas");e.o.na?(h.Ec.width=b.width+2*c,h.Ec.height=b.height+2*c):(h.Ec.width=a.V+2*c,h.Ec.height=a.V+2*c);h.An=h.Ec.getContext("2d");h.Ec.style[e.o.Bd+"Origin"]="0% 0%";h.Ec.style.overflow="hidden";h.Ec.style.position="absolute";
h.M=f;var n=b.width+2*c,p=b.height+2*c;h.An&&h.An.drawImage(f,0,m*p,n,p,0,0,n,p);if(e.o.na&&e.o.R){var r=e.o.R;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,1);h.Nb=r.createTexture();e.o.Vd++;r.bindTexture(r.TEXTURE_2D,h.Nb);try{r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,h.Ec)}catch(v){e.o.O(v)}r.bindTexture(r.TEXTURE_2D,null);r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,0)}e.o.Pg&&(h.Ec.yv=-1,e.o.ea.insertBefore(h.Ec,e.o.ea.firstChild));b.Ma[m]=h}b.loaded=!0;e.o.D.Zc&&("previewtrack"==e.o.D.delay||"videopano"==
e.o.D.delay&&!e.o.B.j)&&e.o.ak(null)}}catch(v){e.o.O(v)}e.o.update(2)}};t.prototype.fq=function(f){var e=this;return function(){e.o.tb=!0;e.o.qh=!0;e.Dn();f.M=null}};t.prototype.pv=function(){var f=this.o,e=this.N,a=e.M,b=a.levels;f.ue&&(f.Rc(0),f.fc());if(f.R){var c=f.R;c.useProgram(this.P);this.ik();c.clear(c.DEPTH_BUFFER_BIT);c.enable(c.DEPTH_TEST);x.la.identity(this.Bb);x.la.perspective(f.Mb(),f.Ab.width/f.Ab.height,.1,100,this.Bb);c.uniformMatrix4fv(this.P.Je,!1,this.Bb);e.dv();e.Uo();var m=
e.Ln();var h=b.length-1;for(e.ge=0;h>=m;){var n=b[h],p=1;h==b.length-1&&0==a.gb&&(p=a.V/(a.V-.5));for(var r=0;6>r;r++){var v=e.cube.eg[r];var y=v.hi;if(v.oc&&0<y.Li&&0<y.qk&&0<y.scale||n.cache){v.tb=!1;v.Tf[h]||(v.Tf[h]={Oc:0,Cd:0,Hd:0,Id:0});var z=v.Tf[h];n.cache?(z.Oc=0,z.Cd=0,z.Hd=n.Y-1,z.Id=n.ta-1):e.us(n,y,z);y=!0;for(var C=z.Cd;C<=z.Id;C++)for(var F=z.Oc;F<=z.Hd;F++){var E=F+C*n.Y+r*n.Y*n.ta,D=n.Ma[E];D||(D=n.Ma[E]=new x.$g,f.O("create simple "+h+", <"+E+">"));this.cj()?D.M||(D.Me?D.Me--:(this.Cj(D,
n,e.Kg(r,h,F,C)),f.tb=!0)):e.ge++;if(D.Nb){if(!D.kg){E=.5*h+1;D.kg=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,D.kg);var A=[-1,-1,1,1,-1,1,1,1,1,-1,1,1];A[3]=F*a.V-a.gb;A[0]=Math.min((F+1)*a.V,n.width)+a.gb;A[7]=C*a.V-a.gb;A[1]=Math.min((C+1)*a.V,n.height)+a.gb;A[4]=A[1];A[6]=A[3];A[9]=A[0];A[10]=A[7];for(var G=0;12>G;G++)A[G]=0==G%3?p*E*(-2*A[G]/n.width+1):1==G%3?p*E*(-2*A[G]/n.height+1):E;c.bufferData(c.ARRAY_BUFFER,new Float32Array(A),c.STATIC_DRAW)}}else y=!1;D.visible=v.oc}z.Ro=y}}h--}for(r=
0;6>r;r++)if(v=e.cube.eg[r],v.oc)for(y=v.hi,this.Dg(r),c.uniform1i(this.P.zg,0),c.uniformMatrix4fv(this.P.Je,!1,this.Bb),c.uniformMatrix4fv(this.P.bi,!1,this.za),c.enableVertexAttribArray(this.P.ja),c.enableVertexAttribArray(this.P.La),c.bindBuffer(c.ARRAY_BUFFER,this.ef),c.vertexAttribPointer(this.P.La,2,c.FLOAT,!1,0,0),c.activeTexture(c.TEXTURE0),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.xd),c.useProgram(this.P),h=m;h<=b.length-1;){n=b[h];if(v.oc&&0<y.Li&&v.Tf[h]&&0<=v.Tf[h].Oc){z=v.Tf[h];for(C=
z.Cd;C<=z.Id;C++)for(F=z.Oc;F<=z.Hd;F++)E=F+C*n.Y+r*n.Y*n.ta,(D=n.Ma[E])&&D.Nb&&(c.uniform1f(this.P.vk,1E-4*(F%2+C%2*2)),c.bindBuffer(c.ARRAY_BUFFER,D.kg),c.vertexAttribPointer(this.P.ja,3,c.FLOAT,!1,0,0),c.bindTexture(c.TEXTURE_2D,D.Nb),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.drawElements(c.TRIANGLES,
6,c.UNSIGNED_SHORT,0)),D.visible=v.oc;z.Ro&&(h=b.length)}h++}this.am();f.qh=!1}};t.prototype.cj=function(){return this.N.Ei<this.N.Cm};t.prototype.Cj=function(f,e,a){var b=this.N,c=this.o;b.Rs++;f.M=new Image;f.$l++;f.Me=1<<f.$l;f.M.onload=this.Su(f);f.M.onerror=this.fq(f);f.M.onabort=this.fq(f);f.M.crossOrigin=c.crossOrigin;f.M.setAttribute("src",a);c.O("load "+a);e.cache&&c.wd.push(f.M);b.Ei++};t.prototype.wq=function(){var f=this.o,e=this.N,a=e.M;f.ue&&(f.Rc(0),f.fc());if(f.R){var b=f.R;this.ik();
b.clear(b.DEPTH_BUFFER_BIT);b.disable(b.CULL_FACE);b.bindBuffer(b.ARRAY_BUFFER,this.Rj);var c=[0,0];c[2]=f.C.width;c[3]=0;c[4]=f.C.width;c[5]=f.C.height;c[6]=0;c[7]=f.C.height;b.bufferData(b.ARRAY_BUFFER,new Float32Array(c),b.STATIC_DRAW);e.ge=0;if(!this.Qc||this.Nh)0<a.levels.length?this.nr():this.pr();f.B.Tc?this.Ft():(b.enable(b.DEPTH_TEST),b.depthRange(0,1),b.depthFunc(b.LESS),this.Zj=!1,0<a.levels.length&&this.qv(),this.Qc&&!this.Zj&&this.Et())}};t.prototype.Bu=function(f,e,a,b,c,m,h){var n=
this.o;c=this.N.M;var p=n.C,r=a*c.V/e.width,v=(a+1)*c.V/e.width;a=b*c.V/e.height;e=(b+1)*c.V/e.height;c=.1;h&&(c=.2);this.th&&(c=0);b=(v-r)*c;1<v&&(v=1);1<e&&(e=1);r-=b;a-=b;c=this.Xm;h=(v+b-r)/c;v=(e+b-a)/c;e={x:0,y:0};b={x:0,y:0};f.ql=0;var y=n.mj(),z=new x.Ua,C=this.dt;C.Fp();4>m?C.Gf(-90*m):C.ae(5==m?90:-90);n.Ya&&(C.Hf(n.Ya.W),C.ae(-n.Ya.pitch));C.Gf(-n.pan.m);C.ae(n.u.m);C.Hf(n.W.m);for(m=0;m<=c;m++)for(var F=0;F<=c;F++){var E=2*(r+F*h)-1;var D=2*(a+m*v)-1;z.x=1*E;z.y=1*D;z.z=-1;z.normalize();
C.mt(z);E=this.ro(z,e,n.Z());0!=n.Hc()&&1>y&&(D=this.ro(z,b,n.Hc()),E&&D?(e.x=e.x*y+b.x*(1-y),e.y=e.y*y+b.y*(1-y)):!E&&D&&(E=!0,e.x=b.x,e.y=b.y));E||(e.x=NaN);f.lg[f.ql++]=p.width/2+e.x*p.width/2;f.lg[f.ql++]=p.height/2-e.y*p.width/2}this.Cu(f,c)};t.prototype.ro=function(f,e,a){var b=!0;switch(a){case 0:case 4:a=1/(f.z*this.Zl);e.x=-f.x*a;e.y=f.y*a;0<f.z&&(b=!1);break;case 9:1==f.z&&(b=!1);a=1/((1-f.z)*this.wm);e.x=f.x*a;e.y=-f.y*a;break;case 12:if(a=Math.sqrt(f.x*f.x+f.y*f.y),0==a)e.x=0,e.y=0;else{var c=
2*this.$k*Math.acos(-f.z)/a;if(2<a)return!1;e.x=c*f.x;e.y=-c*f.y}}return b};t.prototype.Cu=function(f,e){for(var a=this.o,b=[],c,m=f.Pa=0;m<e;m++)for(var h=0;h<e;h++){b[0]=m+h*(e+1);b[1]=m+1+h*(e+1);b[2]=m+(h+1)*(e+1);b[3]=m+1+(h+1)*(e+1);c=!0;for(var n=0;4>n;n++)isNaN(f.lg[2*b[0]])&&(c=!1);if(c){var p=!1,r=!1,v=!1,y=!1;for(n=0;4>n;n++){var z=f.lg[2*b[n]];z<a.C.width&&(r=!0);0<=z&&(p=!0);z=f.lg[2*b[n]+1];z<a.C.height&&(v=!0);0<=z&&(y=!0)}if(c=c&&r&&p&&v&&y)this.th?(f.mb[f.Pa++]=b[0],f.mb[f.Pa++]=
b[1],f.mb[f.Pa++]=b[1],f.mb[f.Pa++]=b[3],f.mb[f.Pa++]=b[3],f.mb[f.Pa++]=b[2],f.mb[f.Pa++]=b[2],f.mb[f.Pa++]=b[0],f.mb[f.Pa++]=b[3],f.mb[f.Pa++]=b[0],f.mb[f.Pa++]=b[1],f.mb[f.Pa++]=b[2]):(f.mb[f.Pa++]=b[0],f.mb[f.Pa++]=b[3],f.mb[f.Pa++]=b[2],f.mb[f.Pa++]=b[0],f.mb[f.Pa++]=b[1],f.mb[f.Pa++]=b[3])}}};t.prototype.qv=function(){var f=this.o,e=this.N,a=e.M,b=a.levels;f.ue&&(f.Rc(0),f.fc());if(f.R){var c=f.R,m=this.sp;c.useProgram(m);this.Jm(m);c.enable(c.CULL_FACE);c.cullFace(c.FRONT);c.enable(c.STENCIL_TEST);
c.stencilOp(c.KEEP,c.INCR,c.INCR);c.stencilFunc(c.EQUAL,0,255);x.la.identity(this.Bb);x.la.perspective(f.Mb(),f.Ab.width/f.Ab.height,.1,100,this.Bb);c.uniformMatrix4fv(c.getUniformLocation(m,"uPMatrix"),!1,this.Bb);e.ge=0;e.Uo();var h=e.Ln(),n=0;var p=b.length-1;for(var r={},v=b[p];v.Ef&&0<p;)p--,v=b[p];for(var y=p,z=y,C=0;6>C;C++)for(var F=0;F<v.ta;F++)for(var E=0;E<v.Y;E++){var D=E+F*v.Y+C*v.Y*v.ta;r[D]=1}for(;p>=h;){var A={};v=b[p];var G=null;0<p&&(G=b[p-1]);var J=!0;for(var H in r)if(r.hasOwnProperty(H)){D=
Number(H);var I=v.Ma[D];C=Number(Math.floor(D/(v.Y*v.ta)));F=Math.floor((D-C*v.Y*v.ta)/v.Y);E=Math.floor(D-(F*v.Y+C*v.Y*v.ta));if(6<=C)console.log("Grrr...");else{var M=e.cube.eg[C];M.tb=!1;I||(I=v.Ma[D]=new x.$g,f.O("create "+ +p+", <"+D+">"));this.Bu(I,v,E,F,Math.max(1,this.Xm>>y-p),C,0!=f.Hc());I.visible=0<I.Pa||v.cache;I.xj=3;I.Qh=Date.now();I.visible&&!I.Nb&&(J=!1,this.cj()?I.M||(I.Me?I.Me--:(this.Cj(I,v,e.Kg(C,p,E,F)),f.tb=!0)):this.N.ge++);if(G&&(I.visible||G.cache)){I=(E*a.V+1)/v.width;E=
Math.min(1,((E+1)*a.V-1)/v.width);var K=(F*a.V+1)/v.height;F=Math.min(1,((F+1)*a.V-1)/v.height);D=a.V/G.width;M=a.V/G.height;var O=K;K=Math.floor(K*G.height/a.V);do{var R=I,U=Math.floor(I*G.width/a.V);do{var V=U+K*G.Y+C*G.Y*G.ta;U<G.Y&&K<G.ta?A[V]=1:f.O("Grrrr");U++;R+=D}while(R<E);K++;O+=M}while(O<F)}}}J&&(z=p,20>f.fov.m&&p<this.Yf&&(this.Zj=!0));r=A;p--}this.am();c.uniform1i(c.getUniformLocation(m,"tileTexture"),0);c.activeTexture(c.TEXTURE0);p=h;for(h=-1;p<=Math.min(z,this.Yf-1);){v=b[p];for(H in v.Ma)if(v.Ma.hasOwnProperty(H)){r=
Number(H);I=v.Ma[r];C=Math.floor(r/(v.Y*v.ta));F=Math.floor((r-C*v.Y*v.ta)/v.Y);E=Math.floor(r-(F*v.Y+C*v.Y*v.ta));h!=C&&(h=C,this.jk(C,m));if(n>e.ug){f.O("Exceeded painted tiles");this.Zj=!1;break}I.Nb&&(y=r=a.V,E==v.Y-1&&(r=v.width-a.V*E),F==v.ta-1&&(y=v.height-a.V*F),r=(r+2*a.gb)/a.V,y=(y+2*a.gb)/a.V,c.bindTexture(c.TEXTURE_2D,I.Nb),c.uniform2f(c.getUniformLocation(m,"uCanvasDimensions"),f.C.width,f.C.height),A=c.getUniformLocation(m,"srcScale"),c.uniform2f(A,.5*v.width/a.V/r,.5*v.height/a.V/y),
A=c.getUniformLocation(m,"srcOffset"),c.uniform2f(A,(.5*v.width+a.gb-a.V*E)/a.V/r,-(.5*v.height+a.gb-a.V*F)/a.V/y+1),A=c.getUniformLocation(m,"zOffset"),c.uniform1f(A,(p+1)/(b.length+5)),r=c.getAttribLocation(m,"aVertexPosition"),c.disableVertexAttribArray(0),c.disableVertexAttribArray(1),c.disableVertexAttribArray(2),c.enableVertexAttribArray(r),c.activeTexture(c.TEXTURE0),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,
c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE),c.bindBuffer(c.ARRAY_BUFFER,this.Ls),c.vertexAttribPointer(r,2,c.FLOAT,!1,0,0),c.bufferData(c.ARRAY_BUFFER,new Float32Array(I.lg),c.DYNAMIC_DRAW),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.Ks),c.bufferData(c.ELEMENT_ARRAY_BUFFER,new Uint16Array(I.mb),c.DYNAMIC_DRAW),this.th?0==p&&0==C&&c.drawElements(c.LINES,I.Pa,c.UNSIGNED_SHORT,0):c.drawElements(c.TRIANGLES,I.Pa,c.UNSIGNED_SHORT,0),n++)}p++}c.disable(c.CULL_FACE);
c.cullFace(c.FRONT_AND_BACK);f.qh=!1;c.disable(c.STENCIL_TEST)}};t.prototype.jk=function(f,e){var a=this.o.R;x.la.identity(this.za);this.Dg(f,-1);a.uniformMatrix4fv(a.getUniformLocation(e,"matRotate"),!1,this.za)};t.prototype.Ft=function(){var f=this.o;if(f.R){var e=f.R,a=this.tp;e.useProgram(a);this.jk(0,a);e.uniform2f(e.getUniformLocation(a,"uCanvasDimensions"),f.C.width,f.C.height);var b=e.getUniformLocation(a,"srcOffset");e.uniform2f(b,.5,.5);1==f.B.format&&(b=e.getUniformLocation(a,"srcScale"),
f.Fd?(e.uniform2f(b,-.5/Math.PI,(f.B.flipY?-.5:.5)/Math.PI),b=e.getUniformLocation(a,"srcOffset"),f.Gg?e.uniform2f(b,.5,.75):e.uniform2f(b,.5,.25)):e.uniform2f(b,-.5/Math.PI,(f.B.flipY?-1:1)/Math.PI));14==f.B.format&&(b=e.getUniformLocation(a,"srcScale"),e.uniform2f(b,1-2*f.B.cf/(f.B.width/3),1-2*f.B.cf/(f.B.height/2)));this.Jm(a);b=e.getUniformLocation(a,"cubeTexture");e.uniform1i(b,0);b=e.getAttribLocation(a,"aVertexPosition");e.disableVertexAttribArray(0);e.disableVertexAttribArray(1);e.disableVertexAttribArray(2);
e.enableVertexAttribArray(b);e.bindBuffer(e.ARRAY_BUFFER,this.Rj);e.vertexAttribPointer(b,2,e.FLOAT,!1,0,0);e.activeTexture(e.TEXTURE0);e.bindTexture(e.TEXTURE_2D,f.B.texture);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR);e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.xd);e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,
0)}};t.prototype.Jm=function(f){var e=this.o,a=e.R,b=this.o.C,c=1;switch(e.fov.mode){case 0:c=b.width/b.height;break;case 1:c=1;break;case 2:c=b.width/Math.sqrt(b.width*b.width+b.height*b.height);break;case 3:4*b.height/3<b.width&&(c=4/3)}b=a.getUniformLocation(f,"rectDstDistance");this.Zl=Math.tan(Math.min(e.fov.m,179)/2*Math.PI/180)*c;a.uniform1f(b,this.Zl);b=a.getUniformLocation(f,"fisheyeDistance");this.$k=180/(e.fov.m*Math.PI*c);a.uniform1f(b,this.$k);b=a.getUniformLocation(f,"stereoDistance");
this.wm=Math.tan(Math.min(e.fov.m,359)/4*Math.PI/180)*c;a.uniform1f(b,this.wm);b=a.getUniformLocation(f,"directionBlend");a.uniform1f(b,e.mj())};t.prototype.Et=function(){var f=this.o,e=f.R,a=this.rp;e.useProgram(a);e.enable(e.STENCIL_TEST);e.stencilOp(e.KEEP,e.INCR,e.INCR);e.stencilFunc(e.EQUAL,0,255);this.jk(0,a);e.uniform2f(e.getUniformLocation(a,"uCanvasDimensions"),f.C.width,f.C.height);f=e.getUniformLocation(a,"srcScale");e.uniform2f(f,1,1);f=e.getUniformLocation(a,"srcOffset");e.uniform2f(f,
0,0);f=e.getUniformLocation(a,"zOffset");e.uniform1f(f,.9999);this.Jm(a);this.jk(0,a);f=e.getUniformLocation(a,"cubeTexture");e.uniform1i(f,0);a=e.getAttribLocation(a,"aVertexPosition");e.disableVertexAttribArray(0);e.disableVertexAttribArray(1);e.disableVertexAttribArray(2);e.enableVertexAttribArray(a);e.bindBuffer(e.ARRAY_BUFFER,this.Rj);e.vertexAttribPointer(a,2,e.FLOAT,!1,0,0);e.activeTexture(e.TEXTURE0);e.bindTexture(e.TEXTURE_CUBE_MAP,this.Qc);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_S,
e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MIN_FILTER,e.LINEAR);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MAG_FILTER,e.LINEAR);e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.xd);e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0);e.disable(e.STENCIL_TEST)};t.prototype.pr=function(){var f=this.o,e=f.R;e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE);for(var a=[1,3,5,4,0,2],b=!0,c=!0,m=!1,h=0;6>h;h++)this.eb[h].yf.complete?
this.Zi[h]||(m=!0):b=!1,this.eb[h].Df.complete||(c=!1);if(c||b)if(!c||b||!this.Qc||m){h=Math.round(f.Te/f.Lg);c=(f.Te-h)/2;f.O("paint cube single - isMain: "+b+" overlap: "+c);this.Yf=0;this.Qc||(this.Qc=e.createTexture());f.Vd++;e.bindTexture(e.TEXTURE_CUBE_MAP,this.Qc);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,1);m=document.createElement("canvas");m.width=h;m.height=
h;var n=m.getContext("2d");for(h=0;6>h;h++){var p=a[h];this.eb[p].yf.complete?this.Zi[p]||(n.drawImage(this.eb[p].yf,-c,-c),e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+h,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,m),this.Zi[p]=!0):(n.drawImage(this.eb[p].Df,-c,-c,f.Te,f.Te),e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+h,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,m))}this.Nh=!b}};t.prototype.nr=function(){var f=this.o,e=this.N.M,a=e.levels,b=f.R,c;var m=a.length-1;if(!(0>m)){a[m].Ef&&m--;var h=512;f.Mh&&(h=256);!f.yg&&2<=
f.devicePixelRatio&&(h=512);for((c=b.getParameter(b.MAX_CUBE_MAP_TEXTURE_SIZE))&&c<h&&(h=c);0<m&&a[m-1].width<=h;)m--;h=a[m];if(0!=h.Y){c=m;var n=this.ir(m);this.Nh&&n&&(this.Nh=!1);n||(m=a.length-1,h=a[m],n||(h.Ef?(n=h.loaded,this.Jl(m-1)&&(--m,n=!0)):n=this.Jl(m)),this.Nh=!0);this.Jl(c);if(n&&this.Yf>m){h=a[m];f.O("paint cube level "+m);this.Yf=m;a=e.gb;m=0<a||1<h.Y||1<h.ta;n=c=void 0;m&&(n=document.createElement("canvas"),n.width=h.width,n.height=h.height,2048>h.width&&(1500<h.width?(n.width=2048,
n.height=2048):700<h.width?(n.width=1024,n.height=1024):(n.width=512,n.height=512)),c=n.getContext("2d"));this.Qc=b.createTexture();f.Vd++;b.bindTexture(b.TEXTURE_CUBE_MAP,this.Qc);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 p=[1,3,5,4,0,2];e=e.V;for(var r=0;6>r;r++){for(var v=0;v<h.ta;v++)for(var y=0;y<h.Y;y++){var z=y+v*h.Y+p[r]*h.Y*h.ta,C=h.Ma[z],F=C.M;C.Ec&&
(F=C.Ec);F?m?(z=n.width/h.width,c.drawImage(F,z*(y*e-a),z*(v*e-a),z*F.width,z*F.height)):b.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+r,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,F):(f.O("WTF?!"),f.O(z),f.O(C))}m&&b.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+r,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,n)}}}}};t.prototype.Jl=function(f){var e=this.o,a=this.N,b=a.M.levels[f];if(0==b.Y)return!1;var c=!0;b.cache=!0;for(var m=0;6>m;m++)for(var h=0;h<b.ta;h++)for(var n=0;n<b.Y;n++){var p=n+h*b.Y+m*b.Y*b.ta,r=b.Ma[p];r||(r=b.Ma[p]=
new x.$g);this.cj()?r.M||(r.Me?r.Me--:(this.Cj(r,b,a.Kg(m,f,n,h)),e.tb=!0)):a.ge++;r.Nb||(c=!1,e.tb=!0)}c&&(b.loaded=!0);return c};t.prototype.ir=function(f){f=this.N.M.levels[f];if(0==f.Y)return!1;for(var e=0;6>e;e++)for(var a=0;a<f.ta;a++)for(var b=0;b<f.Y;b++){var c=f.Ma[b+a*f.Y+e*f.Y*f.ta];if(!c||!c.Nb)return!1}return f.loaded=!0};t.prototype.ready=function(){return null!=this.Qc};t.prototype.mp=function(){for(var f=0;6>f;f++)if(!this.eb[f].Df.complete)return!1;return!0};t.prototype.am=function(){for(var f=
this.o,e=this.N,a=e.M.levels,b=f.R,c=Date.now(),m=a.length-1;0<=m;m--){var h=a[m];if(!h.cache)for(var n in h.Ma)if(h.Ma.hasOwnProperty(n)){var p=h.Ma[n];0<p.xj&&p.xj--;p.visible||0<p.xj?(p.visible&&(p.Qh=c),p=this.re.indexOf(p),-1!==p&&this.re.splice(p,1)):-1===this.re.indexOf(p)&&(p.level=h,this.re.push(p))}}if(this.re.length>1.1*e.eq)for(this.re.sort(function(r,v){return v.Qh-r.Qh});this.re.length>e.eq;)p=this.re.pop(),p.Nb&&(b.deleteTexture(p.Nb),f.Vd--,p.Nb=0),p.M=null,p.kg&&(b.deleteBuffer(p.kg),
p.kg=0),n=p.level.Ma.indexOf(p),f.O("delete <"+n+"> "+(c-p.Qh)),delete p.level.Ma[n]};t.prototype.hv=function(){var f=this.o;if(f.R){var e=this.o.R,a;for(a=0;a<f.U.length;a++){var b=f.U[a];if(!b.od){x.la.identity(this.za);x.la.rotate(this.za,-f.W.m*Math.PI/180,[0,0,1]);x.la.rotate(this.za,-f.u.m*Math.PI/180,[1,0,0]);x.la.rotate(this.za,(180-f.pan.m)*Math.PI/180,[0,1,0]);x.la.rotate(this.za,b.pan*Math.PI/180,[0,1,0]);x.la.rotate(this.za,-b.u*Math.PI/180,[1,0,0]);x.la.translate(this.za,[0,0,1]);x.la.rotate(this.za,
b.yb*Math.PI/180,[0,0,1]);x.la.rotate(this.za,-b.Oa*Math.PI/180,[0,1,0]);x.la.rotate(this.za,b.Ka*Math.PI/180,[1,0,0]);var c=Math.tan(b.fov/2*Math.PI/180),m=b.aspect;m||(m=16/9);x.la.scale(this.za,[c,c/m,1]);x.la.translate(this.za,[0,0,-1]);e.bindBuffer(e.ARRAY_BUFFER,this.Pk);e.vertexAttribPointer(this.P.ja,3,e.FLOAT,!1,0,0);e.bindBuffer(e.ARRAY_BUFFER,this.ef);e.vertexAttribPointer(this.P.La,2,e.FLOAT,!1,0,0);e.activeTexture(e.TEXTURE0);e.bindTexture(e.TEXTURE_2D,b.texture);e.texParameteri(e.TEXTURE_2D,
e.TEXTURE_MAG_FILTER,e.LINEAR);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.xd);e.uniform1i(this.P.zg,0);e.uniformMatrix4fv(this.P.bi,!1,this.za);e.uniformMatrix4fv(this.P.Je,!1,this.Bb);e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0)}}}};t.prototype.gv=function(){var f=this.o,e;if(f.C.width!=f.ea.offsetWidth||f.C.height!=
f.ea.offsetHeight)f.C.width=f.ea.offsetWidth,f.C.height=f.ea.offsetHeight;f.ue&&(f.Rc(0),f.fc());if(f.R){var a=f.R;a.useProgram(this.P);x.la.identity(this.Bb);x.la.perspective(f.Mb(),f.Ab.width/f.Ab.height,.1,100,this.Bb);a.uniformMatrix4fv(this.P.Je,!1,this.Bb);this.Dg(0);a.uniform1i(this.P.zg,0);a.uniformMatrix4fv(this.P.Je,!1,this.Bb);a.uniformMatrix4fv(this.P.bi,!1,this.za);a.enableVertexAttribArray(this.P.ja);a.enableVertexAttribArray(this.P.La);a.bindBuffer(a.ARRAY_BUFFER,this.ef);a.vertexAttribPointer(this.P.La,
2,a.FLOAT,!1,0,0);a.activeTexture(a.TEXTURE0);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.xd);a.uniform1f(this.P.vk,1E-4);a.vertexAttribPointer(this.P.ja,3,a.FLOAT,!1,0,0);a.bindTexture(a.TEXTURE_2D,f.B.texture);for(e=0;1>e;e++)this.Dg(0),a.bindBuffer(a.ARRAY_BUFFER,f.B.nk),a.vertexAttribPointer(this.P.ja,3,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,f.B.Di),a.vertexAttribPointer(this.P.La,2,a.FLOAT,!1,0,0),a.activeTexture(a.TEXTURE0),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,f.B.sj),a.uniform1i(this.P.zg,
0),a.uniformMatrix4fv(this.P.bi,!1,this.za),a.uniformMatrix4fv(this.P.Je,!1,this.Bb),a.drawElements(a.TRIANGLES,36,a.UNSIGNED_SHORT,0)}};t.prototype.fv=function(){var f=this.o,e=f.R,a=f.B;if(0<f.U.length)for(var b=0;b<f.U.length;b++){var c=f.U[b];if(!c.od&&c.isRunning&&c.Fh!=c.j.currentTime&&(c.Fh=c.j.currentTime,!c.aspect&&0<c.j.videoHeight&&(c.aspect=c.j.videoWidth/c.j.videoHeight),f.Ki))try{c.texture&&(e.bindTexture(e.TEXTURE_2D,c.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGB,e.RGB,e.UNSIGNED_BYTE,
c.j),f.update())}catch(h){f.O(h)}}if(a.j&&(b=Number(a.j.currentTime),a.Fh!=b)){a.Fh=b;try{var m=0<a.j.readyState;f.wj&&a.Tc&&(m=m&&0<a.j.currentTime);a.texture&&a.qg&&m&&(a.Tc=!0,a.width=a.j.videoWidth,a.height=a.j.videoHeight,e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,f.B.flipY),e.bindTexture(e.TEXTURE_2D,a.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGB,e.RGB,e.UNSIGNED_BYTE,a.j),a.Bm=!0,f.update())}catch(h){f.O(h)}}};t.prototype.ip=function(){var f,e,a=this.o,b=this.o.R;a.rb.style.visibility="hidden";a.K.Ph!=
a.K.mode&&(a.K.Ph=a.K.mode);if((0<=a.K.mode||0<a.K.Qb.length)&&!a.D.Gi){var c=1;0>=a.K.mode&&(c=0);3==a.K.mode&&(c=a.K.Da);for(f=0;f<a.J.length;f++){var m=a.J[f];if("poly"==m.type){var h=m.Cf,n=c;2==a.K.mode&&(n=m.Da);var p=a.K.Qb.indexOf(m.id);-1!=p&&(n=a.K.Ac[p]);if(0<h.length){p=[];for(e=0;e<h.length;e++)p.push(h[e].dc),p.push(h[e].Pb),p.push(0);b.useProgram(this.$d);b.enable(b.BLEND);b.blendFuncSeparate(b.SRC_ALPHA,b.ONE_MINUS_SRC_ALPHA,b.SRC_ALPHA,b.ONE);b.disable(b.DEPTH_TEST);this.Nm||(this.Nm=
b.createBuffer());b.bindBuffer(b.ARRAY_BUFFER,this.Nm);b.bufferData(b.ARRAY_BUFFER,new Float32Array(p),b.STATIC_DRAW);b.uniform2f(b.getUniformLocation(this.$d,"uCanvasDimensions"),a.C.width,a.C.height);h=b.getUniformLocation(this.$d,"uColor");e=m.Xb;b.uniform3f(h,(e>>16&255)/255,(e>>8&255)/255,(e&255)/255);var r=b.getUniformLocation(this.$d,"uAlpha");b.uniform1f(r,m.Wb*n);b.vertexAttribPointer(this.$d.ja,3,b.FLOAT,!1,0,0);b.drawArrays(b.LINE_LOOP,0,p.length/3);e=m.Vb;b.uniform3f(h,(e>>16&255)/255,
(e>>8&255)/255,(e&255)/255);b.uniform1f(r,m.Ub*n);b.enable(b.STENCIL_TEST);b.clearStencil(0);b.clear(b.STENCIL_BUFFER_BIT);b.colorMask(!1,!1,!1,!1);b.stencilFunc(b.ALWAYS,1,1);b.stencilOp(b.INCR,b.INCR,b.INCR);b.drawArrays(b.TRIANGLE_FAN,0,p.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,p.length/3);b.disable(b.BLEND);b.enable(b.DEPTH_TEST);b.disable(b.STENCIL_TEST);b.useProgram(this.P)}}}}};t.prototype.ev=function(){var f=
this.o,e=this.N,a=e.M;if(f.C.width!=f.ea.offsetWidth||f.C.height!=f.ea.offsetHeight)f.C.width=f.ea.offsetWidth,f.C.height=f.ea.offsetHeight;f.ue&&(f.Rc(0),f.fc());if(f.R){var b=f.R;this.ik();b.clear(b.COLOR_BUFFER_BIT|b.DEPTH_BUFFER_BIT|b.STENCIL_BUFFER_BIT);b.disable(b.DEPTH_TEST);b.disable(b.CULL_FACE);b.useProgram(this.wh);var c=b.getUniformLocation(this.wh,"uRect");b.uniform2f(b.getUniformLocation(this.wh,"uCanvasDimensions"),f.C.width,f.C.height);b.activeTexture(b.TEXTURE0);b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,
this.xd);var m=b.getAttribLocation(this.wh,"aVertexPosition");b.disableVertexAttribArray(0);b.disableVertexAttribArray(1);b.disableVertexAttribArray(2);b.enableVertexAttribArray(m);b.bindBuffer(b.ARRAY_BUFFER,this.ef);b.vertexAttribPointer(m,2,b.FLOAT,!1,0,0);e.ge=0;var h=100/f.fov.m;var n=a.width/a.height;m=f.C.height*h*n;h*=f.C.height;n=(f.pan.m/100/n-.5)*m+f.C.width/2;for(var p=(f.u.m/100-.5)*h+f.C.height/2,r,v,y,z=0;a.levels.length>=z+2&&a.levels[z+1].width>m;)z++;var C;var F=[];for(C=a.levels.length-
1;C>=z;){var E=a.levels[C];if(E.cache){var D={Oc:0,Cd:0};D.Hd=E.Y-1;D.Id=E.ta-1}else{D={};r=-p/h*(E.height/a.V);v=(-n+f.C.width)/m*(E.width/a.V);var A=(-p+f.C.height)/h*(E.height/a.V);D.Oc=Math.min(Math.max(0,Math.floor(-n/m*(E.width/a.V))),E.Y-1);D.Cd=Math.min(Math.max(0,Math.floor(r)),E.ta-1);D.Hd=Math.min(Math.max(0,Math.floor(v)),E.Y-1);D.Id=Math.min(Math.max(0,Math.floor(A)),E.ta-1)}F[C]=D;var G=!0;for(v=D.Cd;v<=D.Id;v++)for(r=D.Oc;r<=D.Hd;r++)y=r+v*E.Y,A=E.Ma[y],A||(A=new x.$g,E.Ma[y]=A),this.cj()?
A.M||(this.Cj(A,E,e.Kg(0,C,r,v)),f.tb=!0):e.ge++,A.M&&A.M.complete||(G=!1),A.visible=!0;D.Ro=G;C--}for(C=a.levels.length-1;C>=z;){E=a.levels[C];if(F[C]&&0<=F[C].Oc)for(D=F[C],v=D.Cd;v<=D.Id;v++)for(r=D.Oc;r<=D.Hd;r++)y=r+v*E.Y,(A=E.Ma[y])&&A.M&&A.M.complete&&(f=n+(-a.gb+a.V*r)*m/E.width,b.uniform4f(c,f,p+(-a.gb+a.V*v)*h/E.height,A.M.width*m/E.width,A.M.height*h/E.height),A&&A.Nb&&(b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.xd),b.bindTexture(b.TEXTURE_2D,A.Nb),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)));C--}this.am()}};t.prototype.Ff=function(){var f=this.o.R;if(f&&this.eb)for(;0<this.eb.length;){var e=this.eb.pop();e.rt=!0;f.deleteTexture(e)}this.Qc&&(f.deleteTexture(this.Qc),this.Qc=null);this.Yf=1E6;this.Zi=[!1,!1,!1,!1,!1,!1]};return t}();x.Kq=w})(ggP2VR||
(ggP2VR={}));(function(x){var w=function(){return function(){this.hi={yh:1,zh:1,Wh:0,Xh:0,Li:0,qk:0,scale:1};this.oc=!0;this.Tf=[]}}();x.Gq=function(){return function(){var t;this.eg=Array(6);for(t=0;6>t;t++)this.eg[t]=new w}}()})(ggP2VR||(ggP2VR={}));
(function(x){x.Eq=function(){return function(){this.levels=[];this.Nj="0x000000";this.np=!1;this.To=this.So=.4;this.V=512;this.gb=1;this.Hl=0;this.Il="";this.wp=this.height=this.width=0}}();x.Ym=function(){return function(){this.height=this.width=0;this.Ef=this.cache=!1;this.ta=this.Y=0;this.loaded=!1;this.Ma=[]}}();x.$g=function(){return function(){this.loaded=this.visible=!1;this.Me=this.$l=0;this.lg=[];this.ql=0;this.mb=[];this.xj=this.Qh=this.Pa=0}}()})(ggP2VR||(ggP2VR={}));
(function(x){var w=function(){function t(f,e){this.o=f;this.S=e;var a=this.__div=document.createElement("div");a.ggVisible=!0;var b=document.createElement("img");if(e.gd){var c=e.gd;b.setAttribute("style","position: absolute; width: "+e.ff+"px; height: "+e.yd+"px; top: -"+e.yd/2+"px; left: -"+e.ff/2+"px; cursor: pointer; "+f.kb+"user-select: none; max-width: none;")}else c="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA5xJREFUeNqclmlIVFEUx997TjrplFQW2WKBBSYtRFlpWUILSSsRZRQIBdGHCFqIoKIvQRsUFRJC9LEgaSFbMMpcWi1pLzOLsjItKms0U5t5/c/wH7nc5o2jF374xrv87z33nHOPaRsRtbFgDpgJxoD+wATfwDNQDK6CyrCr5OcbhgiGIRsUAZt4QTWoIFXgp9JfAhY7rgdBl8NeBoLDYBloA+dBOagFTcDHcVEgDgwBGWA+OAcugvXgvb5wKMGJoAAMp9BpUA96EBf/Btsf8BI8AWfAErAcpHHDZeriliY2AVwDg8AucAQ0Ag+I4XhTm2Oxz8PT46KMbTx5EZjuJDgAnAVusJUm9DhYwalFcc59sIXXIaceFkowDySBPTRPL20xm+b7zYXa+N3CPrWJ6GuwGySA40HLBHc/GywFhbS5R1lEBrZy7FQwiSaX9pmnqeAYt+KUcew7BVZw/QKTq0ocpYPVvDOXItZCk2xgDIZqL8BR8Ab0VDbr4yZOgLeIwzQx6WiQxcCt1+6sld66L4yYtFSwF4yg2dU7/cEwGW9YVkAwmycp1dzdpvgm0DcCh4kHmxWzBls0uBX4qqmZJ4KzePm1IeJLgjmlC16aDKZpp5Q168B3o6wsSwTHgU+MIUs74RSj6y1d+212HKimJlUE+tFRfJpYtOKNXWmJTASqWf2Bu/R6+4TKHOrOzG4IhptjWgHbGkZvepQ6SQK7oRuCXzjX1DJavBEX1ygfT8FgBqpfm1zRDcEKbR2bsZlkJCdXieB1ZhZ5YtqVgXIPN+m9kbY6hpdb+d9fPncJRmZmqQheZkemJmgxyxykl3XWJEkcAl7N21s7PDcl5ZJ0PAa3wVwmWtVbZafPwQ7wLozYB7ATPNJO56d/LAikP9u+66KNJS1d4IOZp7wU0hfLukUyzgwm70T2N/DOxIy/eFdqawa5DL2NEGwP5k15Ja4woz9glvcomd9NzyvkFcQo5gomaLfm5c0svnKZ2k7q7+FauvR2MJKZR3+sY5WgtvkdG6JyELGhNHMTXyGfLviRJ5Tcd4Dlhle7086Sgp8CqVxDkn4OqHaqacr5ekjy3Q/W0FRNNGmoMtamdzdxsytZC0lqXKhEgWPVVgImg2NgFT1MHOoOk3yLEtgWN5TEOYvoIFI1rGM19//2wpAD7imF7lfwENwAxaASNCj90pcLLKdC2Iyw1M9gnEplMEp5kOU1f8WwKGJm8oUr9f8JMAAVMDM6HSDa9QAAAABJRU5ErkJggg%3D%3D",
b.setAttribute("style","position: absolute; width: 28px; height: 28px; top: -14px; left: -14px; cursor: pointer; "+f.kb+"user-select: none; max-width: none;");b.setAttribute("src",c);b.ondragstart=function(){return!1};a.appendChild(b);c="position:absolute;"+(f.kb+"user-select: none;");c+=f.kb+"touch-callout: none;";c+=f.kb+"tap-highlight-color: rgba(0,0,0,0);";f.Sc&&!f.na&&(c+=f.kb+"transform: translateZ(9999999px);");a.setAttribute("style",c);a.onclick=function(){f.Pe(e);f.Ol(f.Va(e.url),e.target);
f.ga&&f.ga.hotspotProxyClick&&f.ga.hotspotProxyClick(e.id,e.url);f.H("hsproxyclick",{id:e.id,url:e.url})};a.ondblclick=function(){f.ga&&f.ga.hotspotProxyDoubleClick&&f.ga.hotspotProxyDoubleClick(e.id,e.url);f.H("hsproxydblclick",{id:e.id,url:e.url})};var m=f.K.ek;if(m.enabled&&""!=e.title){var h=document.createElement("div");c="position:absolute;";c=e.gd?f.il()?c+("top: -"+(e.yd/2+20)+"px;"):c+("top: "+e.yd/2+"px;"):f.il()?c+"top:\t -50px;":c+"top:\t 20px;";c=m.rk?c+"white-space: pre-wrap;":c+"white-space: nowrap;";
c+=f.kb+"transform-origin: 50% 50%;";h.setAttribute("style",c+"visibility: hidden;overflow: hidden;padding: 0px 1px 0px 1px;");h.style.color=this.o.oa(m.fk,m.dk);h.style.backgroundColor=m.background?this.o.oa(m.Vb,m.Ub):"transparent";h.style.border="solid "+this.o.oa(m.Xb,m.Wb)+" "+m.Ti+"px";h.style.borderRadius=m.Ak+"px";h.style.textAlign="center";0<m.width?(h.style.left=-m.width/2+"px",h.style.width=m.width+"px"):h.style.width="auto";h.style.height=0<m.height?m.height+"px":"auto";h.style.overflow=
"hidden";h.innerHTML=f.Va(e.title);h.classList.add("ggskin");h.classList.add("ggdefaulthotspot");a.addEventListener("mouseover",function(){0==m.width&&(h.style.left=-h.offsetWidth/2+"px");h.style.visibility="inherit";f.ga&&f.ga.hotspotProxyOver&&f.ga.hotspotProxyOver(e.id,e.url);f.H("hsproxyover",{id:e.id,url:e.url})});a.addEventListener("mouseout",function(){h.style.visibility="hidden";f.ga&&f.ga.hotspotProxyOut&&f.ga.hotspotProxyOut(e.id,e.url);f.H("hsproxyout",{id:e.id,url:e.url})});a.appendChild(h);
this.hq=h}a.addEventListener("mouseover",function(){f.Pe(e)});a.addEventListener("mouseout",function(){f.Pe(null)})}t.prototype.Is=function(){this.hq&&(this.hq.innerHTML=this.o.Va(this.S.title))};return t}();x.Aq=w})(ggP2VR||(ggP2VR={}));
(function(x){x.ed=function(){return function(){this.value=this.time=0;this.Mm="";this.bf=this.af=this.$e=this.Ze=this.hb=this.type=this.Fb=0;this.td="";this.an=0}}();x.Vm=function(){return function(){this.$u=this.Tq=this.length=0}}();x.Um=function(){return function(){}}()})(ggP2VR||(ggP2VR={}));
(function(x){var w=function(){function t(f){this.o=f;this.enabled=!1;this.eh=1;this.Sf=0;this.type="crossdissolve";this.dd=this.da=this.Yc=0;this.uk=20;this.sk=90;this.tk=20;this.Zg=1;this.Yg=!1;this.zm=this.ym=this.$p=0;this.Ci=70;this.yq=0;this.Gb=this.xq=1;this.Xg=this.Wg=.5;this.Ye=this.me=!1;this.Rk=1}t.prototype.Jh=function(){var f=this.o.R,e=f.createShader(f.VERTEX_SHADER);f.shaderSource(e,"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");
f.compileShader(e);f.getShaderParameter(e,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(e)),e=null);var a=f.createShader(f.FRAGMENT_SHADER);f.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying 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");
f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.Aa=f.createProgram();f.attachShader(this.Aa,e);f.attachShader(this.Aa,a);f.linkProgram(this.Aa);f.getProgramParameter(this.Aa,f.LINK_STATUS)||alert("Could not initialise shaders");this.Aa.ja=f.getAttribLocation(this.Aa,"aVertexPosition");f.enableVertexAttribArray(this.Aa.ja);this.Aa.La=f.getAttribLocation(this.Aa,"aTextureCoord");f.enableVertexAttribArray(this.Aa.La);a=f.createShader(f.FRAGMENT_SHADER);
f.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\nuniform float 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");
f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.ib=f.createProgram();f.attachShader(this.ib,e);f.attachShader(this.ib,a);f.linkProgram(this.ib);f.getProgramParameter(this.ib,f.LINK_STATUS)||alert("Could not initialise shaders");this.ib.ja=f.getAttribLocation(this.ib,"aVertexPosition");f.enableVertexAttribArray(this.ib.ja);this.ib.La=f.getAttribLocation(this.ib,"aTextureCoord");f.enableVertexAttribArray(this.ib.La);a=f.createShader(f.FRAGMENT_SHADER);
f.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\nuniform 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");
f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.Ta=f.createProgram();f.attachShader(this.Ta,e);f.attachShader(this.Ta,a);f.linkProgram(this.Ta);f.getProgramParameter(this.Ta,f.LINK_STATUS)||alert("Could not initialise shaders");this.Ta.ja=f.getAttribLocation(this.Ta,"aVertexPosition");f.enableVertexAttribArray(this.Ta.ja);this.Ta.La=f.getAttribLocation(this.Ta,"aTextureCoord");f.enableVertexAttribArray(this.Ta.La);a=f.createShader(f.FRAGMENT_SHADER);
f.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\nuniform float uPercent;\nuniform int uDirection;\nuniform vec2 uCanvasDimensions;\nuniform float uSoftEdge;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n float alpha = 0.0;\n if (uDirection == 1) {\n\t if (gl_FragCoord.x > uPercent) {\n    alpha = 1.0; \n  } else {\n    alpha = 1.0 - ((uPercent - gl_FragCoord.x) / uSoftEdge);\n  }\n }\n if (uDirection == 2) {\n\t if (gl_FragCoord.x < uCanvasDimensions.x - uPercent) {\n    alpha = 1.0; \n  } else {\n    alpha = 1.0 - ((gl_FragCoord.x - (uCanvasDimensions.x - uPercent)) / uSoftEdge);\n  }\n }\n if (uDirection == 3) {\n\t if (gl_FragCoord.y < uCanvasDimensions.y - uPercent) {\n    alpha = 1.0; \n  } else {\n    alpha = 1.0 - ((gl_FragCoord.y - (uCanvasDimensions.y - uPercent)) / uSoftEdge);\n  }\n }\n if (uDirection == 4) {\n\t if (gl_FragCoord.y > uPercent) {\n    alpha = 1.0; \n  } else {\n    alpha = 1.0 - ((uPercent - gl_FragCoord.y) / uSoftEdge);\n  }\n }\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, alpha);\n}\n");
f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.ab=f.createProgram();f.attachShader(this.ab,e);f.attachShader(this.ab,a);f.linkProgram(this.ab);f.getProgramParameter(this.ab,f.LINK_STATUS)||alert("Could not initialise shaders");this.ab.ja=f.getAttribLocation(this.ab,"aVertexPosition");f.enableVertexAttribArray(this.ab.ja);this.ab.La=f.getAttribLocation(this.ab,"aTextureCoord");f.enableVertexAttribArray(this.ab.La)};t.prototype.Rc=function(){var f=
this.o.R;if(!f)return!1;if(this.Bc=f.createFramebuffer()){f.bindFramebuffer(f.FRAMEBUFFER,this.Bc);this.Bc.width=1024;this.Bc.height=1024;this.Kf=f.createTexture();f.bindTexture(f.TEXTURE_2D,this.Kf);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,f.LINEAR);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,f.LINEAR);f.texImage2D(f.TEXTURE_2D,0,f.RGBA,this.Bc.width,this.Bc.height,0,f.RGBA,f.UNSIGNED_BYTE,null);var e=f.createRenderbuffer();f.bindRenderbuffer(f.RENDERBUFFER,e);f.renderbufferStorage(f.RENDERBUFFER,
f.DEPTH_COMPONENT16,this.Bc.width,this.Bc.height);f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_2D,this.Kf,0);f.framebufferRenderbuffer(f.FRAMEBUFFER,f.DEPTH_ATTACHMENT,f.RENDERBUFFER,e);f.bindTexture(f.TEXTURE_2D,null);f.bindRenderbuffer(f.RENDERBUFFER,null);f.bindFramebuffer(f.FRAMEBUFFER,null);this.wb=f.createBuffer();f.bindBuffer(f.ARRAY_BUFFER,this.wb);f.bufferData(f.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,-1,0,-1,1,0,1,1,0]),f.STATIC_DRAW);this.wb.itemSize=3;this.wb.Ie=
4;this.xg=f.createBuffer();f.bindBuffer(f.ARRAY_BUFFER,this.xg);f.bufferData(f.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),f.STATIC_DRAW);return!0}return!1};t.prototype.Ql=function(f){var e=this.o.R,a=this.o.Ab;if(this.Ld){e.useProgram(this.Aa);e.bindBuffer(e.ARRAY_BUFFER,this.wb);e.vertexAttribPointer(this.Aa.ja,this.wb.itemSize,e.FLOAT,!1,0,0);e.bindBuffer(e.ARRAY_BUFFER,this.xg);e.vertexAttribPointer(this.Aa.La,2,e.FLOAT,!1,0,0);e.enableVertexAttribArray(this.Aa.ja);e.enableVertexAttribArray(this.Aa.La);
e.activeTexture(e.TEXTURE0);e.bindTexture(e.TEXTURE_2D,this.Kf);a=1+(this.Gb-1)*f;var b=e.getUniformLocation(this.Aa,"uAlpha");e.uniform1f(b,1);b=e.getUniformLocation(this.Aa,"uZoomIn");e.uniform1i(b,1);b=e.getUniformLocation(this.Aa,"uZoomCenter");var c=.5+(this.Wg-.5)*Math.sqrt(f),m=.5+(this.Xg-.5)*Math.sqrt(f);0>c-.5/a&&(c=.5/a);0>m-.5/a&&(m=.5/a);1<c+.5/a&&(c=1-.5/a);1<m+.5/a&&(m=1-.5/a);e.uniform2f(b,c,m);c=e.getUniformLocation(this.Aa,"uZoomFactor");e.uniform1f(c,a);e.uniform1i(e.getUniformLocation(this.Aa,
"uSampler"),0);e.drawArrays(e.TRIANGLE_STRIP,0,this.wb.Ie);e.useProgram(this.o.sa.P)}else{this.o.Ii();e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.SRC_ALPHA,e.ONE);e.enable(e.BLEND);e.disable(e.DEPTH_TEST);c=.5+(this.Wg-.5);m=.5+(this.Xg-.5);0>c-.5/this.Gb&&(c=.5/this.Gb);0>m-.5/this.Gb&&(m=.5/this.Gb);1<c+.5/this.Gb&&(c=1-.5/this.Gb);1<m+.5/this.Gb&&(m=1-.5/this.Gb);if("crossdissolve"==this.type)e.useProgram(this.Aa),e.bindBuffer(e.ARRAY_BUFFER,this.wb),e.vertexAttribPointer(this.Aa.ja,
this.wb.itemSize,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,this.xg),e.vertexAttribPointer(this.Aa.La,2,e.FLOAT,!1,0,0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.Kf),b=e.getUniformLocation(this.Aa,"uAlpha"),e.uniform1f(b,1-f),b=e.getUniformLocation(this.Aa,"uZoomIn"),e.uniform1i(b,1==this.da||2==this.da||6==this.da||7==this.da?1:0),b=e.getUniformLocation(this.Aa,"uZoomCenter"),e.uniform2f(b,c,m),c=e.getUniformLocation(this.Aa,"uZoomFactor"),e.uniform1f(c,this.Gb),e.uniform1i(e.getUniformLocation(this.Aa,
"uSampler"),0);else if("diptocolor"==this.type)e.useProgram(this.ib),e.bindBuffer(e.ARRAY_BUFFER,this.wb),e.vertexAttribPointer(this.ib.ja,this.wb.itemSize,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,this.xg),e.vertexAttribPointer(this.ib.La,2,e.FLOAT,!1,0,0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.Kf),e.uniform1f(e.getUniformLocation(this.ib,"uColorPercent"),Math.min(2*f,1)),b=e.getUniformLocation(this.ib,"uAlpha"),e.uniform1f(b,1-Math.max(2*(f-.5),0)),e.uniform3f(e.getUniformLocation(this.ib,
"uDipColor"),(this.Sf>>16&255)/255,(this.Sf>>8&255)/255,(this.Sf&255)/255),b=e.getUniformLocation(this.ib,"uZoomIn"),e.uniform1i(b,1==this.da||2==this.da||6==this.da||7==this.da?1:0),b=e.getUniformLocation(this.ib,"uZoomCenter"),e.uniform2f(b,c,m),c=e.getUniformLocation(this.ib,"uZoomFactor"),e.uniform1f(c,this.Gb),e.uniform1i(e.getUniformLocation(this.ib,"uSampler"),0);else if("irisround"==this.type||"irisroundcenter"==this.type||"irisrectangular"==this.type||"irisrectangularcenter"==this.type){e.useProgram(this.Ta);
e.bindBuffer(e.ARRAY_BUFFER,this.wb);e.vertexAttribPointer(this.Ta.ja,this.wb.itemSize,e.FLOAT,!1,0,0);e.bindBuffer(e.ARRAY_BUFFER,this.xg);e.vertexAttribPointer(this.Ta.La,2,e.FLOAT,!1,0,0);e.activeTexture(e.TEXTURE0);e.bindTexture(e.TEXTURE_2D,this.Kf);if(1==this.da||2==this.da||6==this.da||7==this.da||"irisroundcenter"==this.type||"irisrectangularcenter"==this.type)var h=b=.5;else b=this.Wg,h=this.Xg;var n=b*a.width,p=h*a.height;n=Math.max(n,a.width-n);p=Math.max(p,a.height-p);"irisround"==this.type||
"irisroundcenter"==this.type?e.uniform1f(e.getUniformLocation(this.Ta,"uRadius"),(Math.sqrt(n*n+p*p)+this.Yc)*f):(n>p?(p=a.height/a.width*n+this.Yc,n+=this.Yc):(n=a.width/a.height*p+this.Yc,p+=this.Yc),e.uniform2f(e.getUniformLocation(this.Ta,"uRectDim"),n*f,p*f));f=e.getUniformLocation(this.Ta,"uSoftEdge");e.uniform1f(f,this.Yc);e.uniform1i(e.getUniformLocation(this.Ta,"uRound"),"irisround"==this.type||"irisroundcenter"==this.type?1:0);e.uniform2f(e.getUniformLocation(this.Ta,"uIrisCenter"),b*a.width,
h*a.height);b=e.getUniformLocation(this.Ta,"uZoomIn");e.uniform1i(b,1==this.da||2==this.da||6==this.da||7==this.da?1:0);b=e.getUniformLocation(this.Ta,"uZoomCenter");e.uniform2f(b,c,m);c=e.getUniformLocation(this.Ta,"uZoomFactor");e.uniform1f(c,this.Gb);e.uniform1i(e.getUniformLocation(this.Ta,"uSampler"),0)}else if("wipeleftright"==this.type||"wiperightleft"==this.type||"wipetopbottom"==this.type||"wipebottomtop"==this.type||"wiperandom"==this.type)e.useProgram(this.ab),e.bindBuffer(e.ARRAY_BUFFER,
this.wb),e.vertexAttribPointer(this.ab.ja,this.wb.itemSize,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,this.xg),e.vertexAttribPointer(this.ab.La,2,e.FLOAT,!1,0,0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.Kf),e.uniform1f(e.getUniformLocation(this.ab,"uPercent"),3>this.Rk?f*(a.width+this.Yc):f*(a.height+this.Yc)),f=e.getUniformLocation(this.ab,"uSoftEdge"),e.uniform1f(f,this.Yc),e.uniform1i(e.getUniformLocation(this.ab,"uDirection"),this.Rk),e.uniform2f(e.getUniformLocation(this.ab,
"uCanvasDimensions"),a.width,a.height),b=e.getUniformLocation(this.ab,"uZoomIn"),e.uniform1i(b,1==this.da||2==this.da||6==this.da||7==this.da?1:0),b=e.getUniformLocation(this.ab,"uZoomCenter"),e.uniform2f(b,c,m),c=e.getUniformLocation(this.ab,"uZoomFactor"),e.uniform1f(c,this.Gb),e.uniform1i(e.getUniformLocation(this.ab,"uSampler"),0);e.drawArrays(e.TRIANGLE_STRIP,0,this.wb.Ie);e.useProgram(this.o.sa.P);e.disable(e.BLEND);e.enable(e.DEPTH_TEST)}};return t}();x.Cq=w})(ggP2VR||(ggP2VR={}));
(function(x){var w=function(){function t(f){this.Hi=[];this.o=f;this.enabled=!1;this.Fb=2;this.zn=!1}t.prototype.Jn=function(f){if(2==f.mode||3==f.mode||5==f.mode){var e=this.o.ra.currentTime;if(f.ub&&f.ub.gain&&f.Lb&&f.Jb&&f.Kb){var a=f.Lb.gain.value,b=f.Jb.gain.value,c=f.Kb.gain.value;f.ub.gain.linearRampToValueAtTime(f.ub.gain.value,e);f.ub.gain.linearRampToValueAtTime(0,e+this.Fb);f.Lb.gain.linearRampToValueAtTime(a,e);f.Lb.gain.linearRampToValueAtTime(0,e+this.Fb);f.Jb.gain.linearRampToValueAtTime(b,
e);f.Jb.gain.linearRampToValueAtTime(0,e+this.Fb);f.Kb.gain.linearRampToValueAtTime(c,e);f.Kb.gain.linearRampToValueAtTime(0,e+this.Fb)}}else e=this.o.ra.currentTime,f.Ib&&f.Ib.gain&&(f.Ib.gain.linearRampToValueAtTime(f.Ib.gain.value,e),f.Ib.gain.linearRampToValueAtTime(0,e+this.Fb));f.Zk=!0;setTimeout(function(){f.Ne()},1E3*this.Fb+5)};t.prototype.Ou=function(){for(var f=0;f<this.o.X.length;f++){var e=this.o.X[f];!e.stopped&&!this.o.isPlaying(e.id)&&-1<e.loop&&4!=e.mode&&6!=e.mode&&(e.wa?e.pe():
(e.Od&&e.Pf(),e.j.play(),e.j.currentTime=0))}};t.prototype.yr=function(){var f=(this.o.ra.currentTime-this.Ku)/this.Fb;f=Math.min(1,f);for(var e=0;e<this.o.X.length;e++){var a=this.o.X[e];this.o.isPlaying(a.id)&&1>a.va&&(a.va=f)}1==f&&clearInterval(this.Ju)};return t}();x.Dq=w})(ggP2VR||(ggP2VR={}));
(function(x){var w=function(){function t(f){this.Uh=[];this.vd=null;this.yc=[];this.kc=[];this.zc=[];this.pm=!0;this.o=f;this.lr()}t.prototype.Jh=function(){var f=this.o.R,e=f.createShader(f.VERTEX_SHADER);f.shaderSource(e,"attribute vec3 aVertexPosition;\nvoid main(void) {\n gl_Position = vec4(aVertexPosition, 1.0);\n}\n");f.compileShader(e);f.getShaderParameter(e,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(e)),e=null);var a=f.createShader(f.FRAGMENT_SHADER);f.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec4 vColor;\nuniform vec2 uCanvasDimensions;\nuniform vec2 uFlareCenterPosition;\nuniform float uBlindingValue;\nuniform float uAspectRatio;\nvoid main(void) {\n float canvasDiag = sqrt( (uCanvasDimensions.x * uCanvasDimensions.x) + (uCanvasDimensions.y * uCanvasDimensions.y) );\n vec2 diff = uFlareCenterPosition - gl_FragCoord.xy;\n diff.y = diff.y * uAspectRatio;\n float distFromFlarePoint = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n float factor = (distFromFlarePoint / canvasDiag) / 10.0;\n gl_FragColor = vec4(1.0, 1.0, 1.0, pow(((1.0 - factor) * 0.8) * uBlindingValue, 2.0));\n}\n");
f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.Dc=f.createProgram();f.attachShader(this.Dc,e);f.attachShader(this.Dc,a);f.linkProgram(this.Dc);f.getProgramParameter(this.Dc,f.LINK_STATUS)||alert("Could not initialise shaders");this.Dc.ja=f.getAttribLocation(this.Dc,"aVertexPosition");f.enableVertexAttribArray(this.Dc.ja);a=f.createShader(f.VERTEX_SHADER);e=f.createShader(f.VERTEX_SHADER);f.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\nvarying vec4 vColor;\nuniform vec2 uCirclePosition;\nuniform float uCircleRadius;\nuniform vec2 uCanvasDimensions2;\nuniform float uAspectRatio;\nvoid main(void) {\n vec2 circleOnScreen = aVertexPosition.xy * uCircleRadius + uCirclePosition;\n circleOnScreen.y = circleOnScreen.y / uAspectRatio;\n vec2 circleNorm = (circleOnScreen / uCanvasDimensions2) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(circleNorm.x, circleNorm.y, 0.0, 1.0);\n}\n");
f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);f.shaderSource(e,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\nvarying vec4 vColor;\nuniform vec2 uCirclePosition;\nuniform float uCircleRadius;\nuniform vec2 uCanvasDimensions2;\nuniform float uAspectRatio;\nvoid main(void) {\n vec2 circleOnScreen = aVertexPosition.xy * uCircleRadius + uCirclePosition;\n circleOnScreen.y = circleOnScreen.y / uAspectRatio;\n vec2 circleNorm = (circleOnScreen / uCanvasDimensions2) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(circleNorm.x, circleNorm.y, 0.0, 1.0);\n}\n");
f.compileShader(e);f.getShaderParameter(e,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(e)),a=null);var b=f.createShader(f.FRAGMENT_SHADER);f.shaderSource(b,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec4 vColor;\nuniform vec2 uCircleTexturePosition;\nuniform vec3 uCircleColor;\nuniform float uCircleRadius;\nuniform float uCircleAlpha;\nuniform float uCircleSoftness;\nuniform float uAspectRatio;\nvoid main(void) {\n vec2 diff = uCircleTexturePosition - gl_FragCoord.xy;\n diff.y = diff.y * uAspectRatio;\n float distFromCircleCenter = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n float softnessDistance = uCircleRadius * (1.0 - uCircleSoftness);\n if (distFromCircleCenter > uCircleRadius)\n {\n\t  gl_FragColor = vec4(uCircleColor, 0.0);\n }\n else if (distFromCircleCenter <= (softnessDistance))\n {\n\t  float factor = distFromCircleCenter / softnessDistance;\n\t  gl_FragColor = vec4(uCircleColor, pow((1.0 - (0.2 * factor)) * uCircleAlpha, 1.8));\n }\n else\n {\n\t  float factor = (distFromCircleCenter - softnessDistance) / (uCircleRadius - softnessDistance);\n\t  gl_FragColor = vec4(uCircleColor, pow((0.8 - (0.8 * factor)) * uCircleAlpha, 1.8));\n }\n}\n");
f.compileShader(b);f.getShaderParameter(b,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(b)),b=null);this.Ba=f.createProgram();f.attachShader(this.Ba,a);f.attachShader(this.Ba,b);f.linkProgram(this.Ba);f.getProgramParameter(this.Ba,f.LINK_STATUS)||alert("Could not initialise shaders");this.Ba.ja=f.getAttribLocation(this.Ba,"aVertexPosition");f.enableVertexAttribArray(this.Ba.ja);a=f.createShader(f.FRAGMENT_SHADER);f.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec4 vColor;\nuniform vec2 uRingTexturePosition;\nuniform float uRingRadius;\nuniform float uRingAlpha;\nuniform float uAspectRatio;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec2 diff = uRingTexturePosition - gl_FragCoord.xy;\n diff.y = diff.y * uAspectRatio;\n float distFromRingCenter = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n float factor = distFromRingCenter / uRingRadius;\n if (distFromRingCenter > uRingRadius)\n {\n\t gl_FragColor = vec4(1.0, 1.0, 1.0, 0.0);\n }\n else\n {\n vec4 textureColor = texture2D(uSampler, vec2(factor / uAspectRatio, 0.5));\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, uRingAlpha);\n }\n}\n");
f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.Db=f.createProgram();f.attachShader(this.Db,e);f.attachShader(this.Db,a);f.linkProgram(this.Db);f.getProgramParameter(this.Db,f.LINK_STATUS)||alert("Could not initialise shaders");this.Db.ja=f.getAttribLocation(this.Db,"aVertexPosition")};t.prototype.Rc=function(){var f=this.o.R;this.Ud=f.createBuffer();f.bindBuffer(f.ARRAY_BUFFER,this.Ud);f.bufferData(f.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,
-1,0,1,1,0,-1,1,0]),f.STATIC_DRAW);this.Ud.itemSize=3;this.Ud.Ie=4;this.gg=f.createBuffer();f.bindBuffer(f.ARRAY_BUFFER,this.gg);for(var e=[0,0,0],a=2*Math.PI/6,b=Math.PI/180*35,c=1,m=b;m<=b+2*Math.PI;m+=a)e.push(Math.sin(m)),e.push(-Math.cos(m)),e.push(0),c++;f.bufferData(f.ARRAY_BUFFER,new Float32Array(e),f.STATIC_DRAW);this.gg.itemSize=3;this.gg.Ie=c;this.zp=f.createTexture();f.bindTexture(f.TEXTURE_2D,this.zp);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,f.LINEAR);f.texParameteri(f.TEXTURE_2D,
f.TEXTURE_MAG_FILTER,f.LINEAR);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,f.CLAMP_TO_EDGE);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,f.CLAMP_TO_EDGE);e=document.createElement("canvas");e.width=100;e.height=1;a=e.getContext("2d");a.width=100;a.height=1;b=a.createLinearGradient(0,0,100,0);b.addColorStop(0,this.o.oa(0,0));b.addColorStop(.88,this.o.oa(0,0));b.addColorStop(.9,this.o.oa(16654848,1));b.addColorStop(.92,this.o.oa(16776448,1));b.addColorStop(.94,this.o.oa(4849466,1));b.addColorStop(.96,
this.o.oa(131071,1));b.addColorStop(.98,this.o.oa(8190,1));b.addColorStop(1,this.o.oa(0,0));a.fillStyle=b;a.fillRect(0,0,100,1);f.texImage2D(f.TEXTURE_2D,0,f.RGBA,f.RGBA,f.UNSIGNED_BYTE,e)};t.prototype.Rt=function(){for(;0<this.Uh.length;)this.Uh.pop()};t.prototype.lr=function(){var f=[],e=[],a=[];var b={radius:14,alpha:.2,color:11390415,A:.27};f.push(b);b={radius:20,alpha:.25,color:11390415,A:.4};f.push(b);b={radius:10,alpha:.2,color:12442332,A:.6};f.push(b);b={radius:15,alpha:.2,color:11390415,
A:.8};f.push(b);b={radius:10,alpha:.2,color:12442332,A:1.5};f.push(b);b={radius:15,alpha:.2,color:11390415,A:1.8};f.push(b);b={radius:8,alpha:.2,color:12575203,G:.8,A:.7};e.push(b);b={radius:7,alpha:.4,color:12575203,G:.5,A:1.6};e.push(b);b={radius:5,alpha:.4,color:12575203,G:.6,A:.9};e.push(b);b={radius:8,alpha:.3,color:12575203,G:.4,A:1.1};e.push(b);this.yc.push(f);this.kc.push(e);this.zc.push(a);f=[];e=[];a=[];b={radius:30,alpha:.3,color:11390415,A:.5};f.push(b);b={radius:10,alpha:.3,color:11390415,
A:1};f.push(b);b={radius:20,alpha:.3,color:11390415,A:1.3};f.push(b);b={radius:10,alpha:.3,color:11390415,A:1.5};f.push(b);b={radius:15,alpha:.3,color:11390415,A:1.8};f.push(b);b={radius:10,alpha:.3,color:15506856,G:.8,A:.7};e.push(b);b={radius:20,alpha:.5,color:15506856,G:.5,A:1.6};e.push(b);b={radius:5,alpha:.5,color:15506856,G:.6,A:.9};e.push(b);b={radius:60,alpha:.4,color:15506856,G:.2,A:1.1};e.push(b);a.push({radius:220,alpha:.035,A:2});this.yc.push(f);this.kc.push(e);this.zc.push(a);f=[];e=
[];a=[];b={radius:30,alpha:.5,color:15465727,A:.5};f.push(b);b={radius:40,alpha:.28,color:15726842,A:.8};f.push(b);b={radius:25,alpha:.32,color:15726842,A:1.1};f.push(b);b={radius:15,alpha:.25,color:15726842,A:1.35};f.push(b);b={radius:10,alpha:.28,color:15465727,A:1.65};f.push(b);b={radius:10,alpha:.45,color:15465727,G:.8,A:.7};e.push(b);b={radius:7,alpha:.5,color:15465727,G:.4,A:.9};e.push(b);b={radius:40,alpha:.4,color:15465727,G:.3,A:.38};e.push(b);b={radius:50,alpha:.4,color:15465727,G:.5,A:1.25};
e.push(b);b={radius:18,alpha:.2,color:15465727,G:.5,A:1.25};e.push(b);b={radius:10,alpha:.34,color:15726842,G:.8,A:1.5};e.push(b);b={radius:38,alpha:.37,color:15465727,G:.3,A:-.5};e.push(b);this.yc.push(f);this.kc.push(e);this.zc.push(a);f=[];e=[];a=[];b={radius:16,alpha:.5,color:16363159,A:.1};f.push(b);b={radius:26,alpha:.3,color:16091819,A:.32};f.push(b);b={radius:29,alpha:.2,color:16091819,A:1.32};f.push(b);b={radius:20,alpha:.18,color:16363159,A:1.53};f.push(b);b={radius:27,alpha:.13,color:16425092,
A:1.6};f.push(b);b={radius:20,alpha:.1,color:16091819,A:1.75};f.push(b);b={radius:12,alpha:.45,color:16312238,G:.45,A:.2};e.push(b);b={radius:8,alpha:.25,color:16434209,G:.7,A:.33};e.push(b);b={radius:9,alpha:.25,color:16091819,G:.4,A:.7};e.push(b);b={radius:7,alpha:.2,color:16091819,G:.4,A:.85};e.push(b);b={radius:60,alpha:.23,color:16091819,G:.55,A:1.05};e.push(b);b={radius:37,alpha:.1,color:16091819,G:.55,A:1.22};e.push(b);b={radius:10,alpha:.25,color:16363159,G:.65,A:1.38};e.push(b);b={radius:7,
alpha:.2,color:16434209,G:.5,A:1.45};e.push(b);b={radius:3,alpha:.2,color:16416033,G:.5,A:1.78};e.push(b);b={radius:6,alpha:.18,color:16434209,G:.45,A:1.9};e.push(b);b={radius:4,alpha:.14,color:16766514,G:.45,A:2.04};e.push(b);b={radius:30,alpha:.14,color:16766514,G:.8,A:.04};e.push(b);this.yc.push(f);this.kc.push(e);this.zc.push(a);f=[];e=[];a=[];b={radius:9,alpha:.3,color:14346999,G:.3,A:.3};e.push(b);b={radius:5,alpha:.5,color:14148072,G:.8,A:.6};e.push(b);b={radius:3,alpha:.37,color:14346999,
G:.66,A:.8};e.push(b);b={radius:45,alpha:.2,color:14346999,G:.36,A:1.2};e.push(b);b={radius:13,alpha:.2,color:14346999,G:.36,A:1.23};e.push(b);b={radius:11,alpha:.2,color:14148072,G:.36,A:1.28};e.push(b);b={radius:27,alpha:.16,color:14346999,G:.36,A:1.55};e.push(b);b={radius:6,alpha:.36,color:14148072,G:.8,A:1.7};e.push(b);this.yc.push(f);this.kc.push(e);this.zc.push(a);f=[];e=[];a=[];b={radius:24,alpha:.2,color:15186464,A:.2};f.push(b);b={radius:7,alpha:.26,color:15186464,A:.35};f.push(b);b={radius:23,
alpha:.18,color:15186464,A:.65};f.push(b);b={radius:13,alpha:.2,color:15186464,A:.8};f.push(b);b={radius:11,alpha:.15,color:15186464,A:1.4};f.push(b);b={radius:15,alpha:.11,color:15451904,A:1.6};f.push(b);b={radius:6,alpha:.45,color:15579138,G:.45,A:.22};e.push(b);b={radius:3,alpha:.3,color:15451904,G:.25,A:.4};e.push(b);b={radius:4,alpha:.2,color:15451904,G:.25,A:.45};e.push(b);b={radius:65,alpha:.17,color:15186464,G:.25,A:.5};e.push(b);b={radius:5,alpha:.45,color:15579138,G:.45,A:.88};e.push(b);
b={radius:140,alpha:.18,color:15579138,G:.32,A:.95};e.push(b);b={radius:12,alpha:.22,color:15579138,G:.32,A:1.1};e.push(b);b={radius:8,alpha:.32,color:15451904,G:.72,A:1.2};e.push(b);b={radius:55,alpha:.2,color:15451904,G:.45,A:1.33};e.push(b);b={radius:4,alpha:.3,color:15451904,G:.25,A:1.42};e.push(b);this.yc.push(f);this.kc.push(e);this.zc.push(a);f=[];e=[];a=[];b={radius:16,alpha:.4,color:10933495,A:.32};f.push(b);b={radius:14,alpha:.3,color:11007484,A:.36};f.push(b);b={radius:10,alpha:.3,color:4037331,
A:.58};f.push(b);b={radius:14,alpha:.22,color:8835068,A:.68};f.push(b);b={radius:10,alpha:.27,color:11007484,A:.82};f.push(b);b={radius:11,alpha:.27,color:10867450,A:1};f.push(b);b={radius:9,alpha:.2,color:6158332,A:1.05};f.push(b);b={radius:10,alpha:.17,color:10867450,A:1.78};f.push(b);b={radius:10,alpha:.3,color:4037331,A:-.23};f.push(b);b={radius:8,alpha:.45,color:8835068,G:.45,A:.175};e.push(b);b={radius:7,alpha:.4,color:12574715,G:.55,A:.46};e.push(b);b={radius:3,alpha:.3,color:10867450,G:.35,
A:.5};e.push(b);b={radius:60,alpha:.37,color:4031699,G:.75,A:.75};e.push(b);b={radius:3,alpha:.25,color:4031699,G:.25,A:.75};e.push(b);b={radius:3,alpha:.2,color:6158332,G:.25,A:.9};e.push(b);b={radius:7,alpha:.45,color:8835068,G:.45,A:1.3};e.push(b);b={radius:32,alpha:.22,color:8835068,G:.75,A:1.62};e.push(b);b={radius:9,alpha:.45,color:4031699,G:.65,A:1.6};e.push(b);b={radius:8,alpha:.25,color:4031699,G:.65,A:1.83};e.push(b);b={radius:7,alpha:.4,color:12574715,G:.55,A:-.18};e.push(b);this.yc.push(f);
this.kc.push(e);this.zc.push(a);f=[];e=[];a=[];b={radius:16,alpha:.4,color:16389120,A:.32};f.push(b);b={radius:26,alpha:.22,color:16389120,A:.4};f.push(b);b={radius:26,alpha:.25,color:16389120,A:.65};f.push(b);b={radius:18,alpha:.3,color:16389120,A:1.23};f.push(b);b={radius:14,alpha:.26,color:16389120,A:1.33};f.push(b);b={radius:17,alpha:.18,color:16389120,A:1.7};f.push(b);b={radius:30,alpha:.16,color:16389120,A:2.15};f.push(b);b={radius:100,alpha:.25,color:16389120,G:.22,A:1.45};e.push(b);b={radius:7,
alpha:.5,color:15628151,G:.3,A:1.5};e.push(b);b={radius:3,alpha:.5,color:15628151,G:.3,A:1.52};e.push(b);b={radius:4,alpha:.5,color:16389120,G:.3,A:1.745};e.push(b);b={radius:9,alpha:.22,color:16389120,G:.3,A:1.8};e.push(b);this.yc.push(f);this.kc.push(e);this.zc.push(a);f=[];e=[];a=[];b={radius:16,alpha:.4,color:10933495,A:.32};f.push(b);b={radius:14,alpha:.3,color:11007484,A:.36};f.push(b);b={radius:10,alpha:.3,color:4037331,A:.58};f.push(b);b={radius:14,alpha:.22,color:8835068,A:.68};f.push(b);
b={radius:10,alpha:.27,color:11007484,A:.82};f.push(b);b={radius:11,alpha:.27,color:10867450,A:1};f.push(b);b={radius:9,alpha:.2,color:6158332,A:1.05};f.push(b);b={radius:10,alpha:.17,color:10867450,A:1.78};f.push(b);b={radius:10,alpha:.3,color:4037331,A:-.23};f.push(b);b={radius:8,alpha:.45,color:8835068,G:.45,A:.175};e.push(b);b={radius:7,alpha:.4,color:12574715,G:.55,A:.46};e.push(b);b={radius:3,alpha:.3,color:10867450,G:.35,A:.5};e.push(b);b={radius:60,alpha:.37,color:4031699,G:.75,A:.75};e.push(b);
b={radius:3,alpha:.25,color:4031699,G:.25,A:.75};e.push(b);b={radius:3,alpha:.2,color:6158332,G:.25,A:.9};e.push(b);b={radius:7,alpha:.45,color:8835068,G:.45,A:1.3};e.push(b);b={radius:32,alpha:.22,color:8835068,G:.75,A:1.62};e.push(b);b={radius:9,alpha:.45,color:4031699,G:.65,A:1.6};e.push(b);b={radius:8,alpha:.25,color:4031699,G:.65,A:1.83};e.push(b);b={radius:7,alpha:.4,color:12574715,G:.55,A:-.18};e.push(b);this.yc.push(f);this.kc.push(e);this.zc.push(a);f=[];e=[];a=[];b={radius:16,alpha:.4,color:16389120,
A:.32};f.push(b);b={radius:26,alpha:.22,color:16389120,A:.4};f.push(b);b={radius:26,alpha:.25,color:16389120,A:.65};f.push(b);b={radius:18,alpha:.3,color:16389120,A:1.23};f.push(b);b={radius:14,alpha:.26,color:16389120,A:1.33};f.push(b);b={radius:17,alpha:.18,color:16389120,A:1.7};f.push(b);b={radius:30,alpha:.16,color:16389120,A:2.15};f.push(b);b={radius:100,alpha:.25,color:16389120,G:.22,A:1.45};e.push(b);b={radius:7,alpha:.5,color:15628151,G:.3,A:1.5};e.push(b);b={radius:3,alpha:.5,color:15628151,
G:.3,A:1.52};e.push(b);b={radius:4,alpha:.5,color:16389120,G:.3,A:1.745};e.push(b);b={radius:9,alpha:.22,color:16389120,G:.3,A:1.8};e.push(b);this.yc.push(f);this.kc.push(e);this.zc.push(a);f=[];e=[];a=[];b={radius:24,alpha:.2,color:15186464,A:.2};f.push(b);b={radius:7,alpha:.26,color:15186464,A:.35};f.push(b);b={radius:23,alpha:.18,color:15186464,A:.65};f.push(b);b={radius:13,alpha:.2,color:15186464,A:.8};f.push(b);b={radius:11,alpha:.15,color:15186464,A:1.4};f.push(b);b={radius:15,alpha:.11,color:15451904,
A:1.6};f.push(b);b={radius:6,alpha:.45,color:15579138,G:.45,A:.22};e.push(b);b={radius:3,alpha:.3,color:15451904,G:.25,A:.4};e.push(b);b={radius:4,alpha:.2,color:15451904,G:.25,A:.45};e.push(b);b={radius:65,alpha:.17,color:15186464,G:.25,A:.5};e.push(b);b={radius:5,alpha:.45,color:15579138,G:.45,A:.88};e.push(b);b={radius:140,alpha:.18,color:15579138,G:.32,A:.95};e.push(b);b={radius:12,alpha:.22,color:15579138,G:.32,A:1.1};e.push(b);b={radius:8,alpha:.32,color:15451904,G:.72,A:1.2};e.push(b);b={radius:55,
alpha:.2,color:15451904,G:.45,A:1.33};e.push(b);b={radius:4,alpha:.3,color:15451904,G:.25,A:1.42};e.push(b);this.yc.push(f);this.kc.push(e);this.zc.push(a)};t.prototype.Ct=function(){if(this.pm){var f=this.o.R,e,a=new x.Ua(0,0,-100),b=this.o.lf(),c=0,m=0,h=!1;if(this.o.na){var n=this.o.Ab.width;var p=this.o.Ab.height;this.o.D.Gi&&(n=this.o.D.Bc.width,p=this.o.D.Bc.height)}else{this.aa||(this.aa=this.vd.getContext("2d"));if(this.aa.width!==this.o.C.width||this.aa.height!==this.o.C.height)this.aa.width=
this.o.C.width,this.aa.height=this.o.C.height;this.aa.clear?this.aa.clear():this.aa.clearRect(0,0,this.vd.width,this.vd.height);n=this.aa.width;p=this.aa.height}var r=Math.sqrt(n*n+p*p),v=r/800;for(e=0;e<this.Uh.length;e++){var y=this.Uh[e];a.init(0,0,-100);a.Ka(-y.u*Math.PI/180);a.Oa(y.pan*Math.PI/180);a.Oa(-this.o.pan.m*Math.PI/180);a.Ka(this.o.u.m*Math.PI/180);a.yb(this.o.W.m*Math.PI/180);if(-.01>a.z){m=-b/a.z;c=a.x*m;m*=a.y;var z=Math.max(n,p);Math.abs(c)<z/2+100&&Math.abs(m)<z/2+100&&(h=!0,c+=
n/2,m+=p/2)}if(h){this.o.na&&(f.blendFunc(f.SRC_ALPHA,f.ONE),f.enable(f.BLEND),f.disable(f.DEPTH_TEST));z=n/2;var C=p/2;var F=Math.sqrt((z-c)*(z-c)+(C-m)*(C-m));var E=r/2;C=n>p?n:p;z=y.kn/100*((E-F)/E);0>z&&(z=0);if(this.o.na){f.useProgram(this.Dc);f.bindBuffer(f.ARRAY_BUFFER,this.o.D.wb);f.vertexAttribPointer(this.Dc.ja,this.o.D.wb.itemSize,f.FLOAT,!1,0,0);var D=f.getUniformLocation(this.Dc,"uCanvasDimensions");f.uniform2f(D,f.drawingBufferWidth,f.drawingBufferHeight);f.uniform2f(f.getUniformLocation(this.Dc,
"uFlareCenterPosition"),f.drawingBufferWidth/n*c,p-f.drawingBufferHeight/p*m);f.uniform1f(f.getUniformLocation(this.Dc,"uBlindingValue"),z);D=f.getUniformLocation(this.Dc,"uAspectRatio");f.uniform1f(D,this.o.D.Gi?f.drawingBufferWidth/f.drawingBufferHeight:f.drawingBufferWidth/f.drawingBufferHeight/(n/p));f.drawArrays(f.TRIANGLE_STRIP,0,this.o.D.wb.Ie)}else D=this.aa.createRadialGradient(c,m,1,c,m,C),D.addColorStop(0,"rgba(255, 255, 255, "+z+")"),D.addColorStop(.5,"rgba(255, 255, 255, "+.8*z+")"),
D.addColorStop(1,"rgba(255, 255, 255, "+.6*z+")"),this.aa.fillStyle=D,this.aa.fillRect(0,0,this.aa.width,this.aa.height);if(0!=Number(y.type)&&!this.o.D.Gi){z=n/2-c;C=p/2-m;var A=1,G=Number(y.type)-1;F<.35*E&&(A=F/(.35*E),A*=A);F>.7*E&&(A=(E-F)/(.3*E));A*=y.alpha/100;if(0<this.yc[G].length)for(F=0;F<this.yc[G].length;F++){var J=this.yc[G][F];E=J.radius*v;var H=J.alpha*A;0>H&&(H=0);var I=J.color;if(8==G||9==G||10==G)I=y.color;if(this.o.na)f.useProgram(this.Ba),f.bindBuffer(f.ARRAY_BUFFER,this.gg),
f.vertexAttribPointer(this.Ba.ja,this.gg.itemSize,f.FLOAT,!1,0,0),D=f.getUniformLocation(this.Ba,"uCanvasDimensions2"),f.uniform2f(D,f.drawingBufferWidth,f.drawingBufferHeight),f.uniform2f(f.getUniformLocation(this.Ba,"uCirclePosition"),f.drawingBufferWidth/n*(c+z*J.A),f.drawingBufferWidth/n*(p-(m+C*J.A))),f.uniform2f(f.getUniformLocation(this.Ba,"uCircleTexturePosition"),f.drawingBufferWidth/n*(c+z*J.A),p-(m+C*J.A)),f.uniform1f(f.getUniformLocation(this.Ba,"uCircleRadius"),E),f.uniform3f(f.getUniformLocation(this.Ba,
"uCircleColor"),(I>>16&255)/255,(I>>8&255)/255,(I&255)/255),f.uniform1f(f.getUniformLocation(this.Ba,"uCircleAlpha"),H),f.uniform1f(f.getUniformLocation(this.Ba,"uCircleSoftness"),.1),D=f.getUniformLocation(this.Ba,"uAspectRatio"),f.uniform1f(D,f.drawingBufferWidth/f.drawingBufferHeight/(n/p)),f.drawArrays(f.TRIANGLE_FAN,0,this.gg.Ie);else{this.aa.save();this.aa.translate(c+z*J.A,m+C*J.A);D=this.aa.createRadialGradient(0,0,1,0,0,1.1*E);D.addColorStop(0,this.o.oa(I,H));D.addColorStop(.65,this.o.oa(I,
.9*H));D.addColorStop(.8,this.o.oa(I,.7*H));D.addColorStop(1,this.o.oa(I,.2*H));this.aa.beginPath();I=2*Math.PI/6;J=Math.PI/180*35;var M=!0;for(H=J;H<=J+2*Math.PI;H+=I)M?(this.aa.moveTo(E*Math.sin(H),E*Math.cos(H)),M=!1):this.aa.lineTo(E*Math.sin(H),E*Math.cos(H));this.aa.closePath();this.aa.fillStyle=D;this.aa.fill();this.aa.restore()}}if(0<this.kc[G].length)for(F=0;F<this.kc[G].length;F++){J=this.kc[G][F];E=J.radius*v;H=J.alpha*A;0>H&&(H=0);I=J.color;if(8==G||9==G||10==G)I=y.color;this.o.na?(f.useProgram(this.Ba),
f.bindBuffer(f.ARRAY_BUFFER,this.Ud),f.vertexAttribPointer(this.Ba.ja,this.Ud.itemSize,f.FLOAT,!1,0,0),D=f.getUniformLocation(this.Ba,"uCanvasDimensions2"),f.uniform2f(D,f.drawingBufferWidth,f.drawingBufferHeight),D=f.getUniformLocation(this.Ba,"uCirclePosition"),f.uniform2f(D,f.drawingBufferWidth/n*(c+z*J.A),f.drawingBufferWidth/n*(p-(m+C*J.A))),D=f.getUniformLocation(this.Ba,"uCircleTexturePosition"),f.uniform2f(D,f.drawingBufferWidth/n*(c+z*J.A),p-(m+C*J.A)),D=f.getUniformLocation(this.Ba,"uCircleRadius"),
f.uniform1f(D,E),f.uniform3f(f.getUniformLocation(this.Ba,"uCircleColor"),(I>>16&255)/255,(I>>8&255)/255,(I&255)/255),f.uniform1f(f.getUniformLocation(this.Ba,"uCircleAlpha"),H),f.uniform1f(f.getUniformLocation(this.Ba,"uCircleSoftness"),J.G),D=f.getUniformLocation(this.Ba,"uAspectRatio"),f.uniform1f(D,f.drawingBufferWidth/f.drawingBufferHeight/(n/p)),f.drawArrays(f.TRIANGLE_FAN,0,this.Ud.Ie)):(this.aa.save(),this.aa.translate(c+z*J.A,m+C*J.A),D=this.aa.createRadialGradient(0,0,1,0,0,E),D.addColorStop(0,
this.o.oa(I,H)),D.addColorStop(1-J.G,this.o.oa(I,.8*H)),D.addColorStop(1,this.o.oa(I,0)),this.aa.beginPath(),this.aa.arc(0,0,E,0,2*Math.PI,!1),this.aa.closePath(),this.aa.fillStyle=D,this.aa.fill(),this.aa.restore())}if(0<this.zc[G].length)for(F=0;F<this.zc[G].length;F++)y=this.zc[G][F],E=y.radius*v,H=y.alpha*A,0>H&&(H=0),this.o.na?(f.useProgram(this.Db),f.activeTexture(f.TEXTURE0),f.bindTexture(f.TEXTURE_2D,this.zp),f.bindBuffer(f.ARRAY_BUFFER,this.Ud),f.vertexAttribPointer(this.Db.ja,this.Ud.itemSize,
f.FLOAT,!1,0,0),D=f.getUniformLocation(this.Db,"uCanvasDimensions2"),f.uniform2f(D,n,p),D=f.getUniformLocation(this.Db,"uCirclePosition"),f.uniform2f(D,c+z*y.A,p-(m+C*y.A)),D=f.getUniformLocation(this.Db,"uRingTexturePosition"),f.uniform2f(D,f.drawingBufferWidth/n*(c+z*y.A),p-(m+C*y.A)),D=f.getUniformLocation(this.Db,"uCircleRadius"),f.uniform1f(D,E),f.uniform2f(f.getUniformLocation(this.Db,"uRingPosition"),c+z*y.A,p-(m+C*y.A)),f.uniform1f(f.getUniformLocation(this.Db,"uRingRadius"),E),f.uniform1f(f.getUniformLocation(this.Db,
"uRingAlpha"),H),D=f.getUniformLocation(this.Db,"uAspectRatio"),f.uniform1f(D,f.drawingBufferWidth/f.drawingBufferHeight/(n/p)),f.uniform1i(f.getUniformLocation(this.Db,"uSampler"),0),f.drawArrays(f.TRIANGLE_FAN,0,this.Ud.Ie)):(this.aa.save(),this.aa.translate(c+z*y.A,m+C*y.A),D=this.aa.createRadialGradient(0,0,0,0,0,E),D.addColorStop(0,this.o.oa(16777215,0)),D.addColorStop(.88,this.o.oa(0,0)),D.addColorStop(.9,this.o.oa(16654848,H)),D.addColorStop(.92,this.o.oa(16776448,H)),D.addColorStop(.94,this.o.oa(4849466,
H)),D.addColorStop(.96,this.o.oa(131071,H)),D.addColorStop(.98,this.o.oa(8190,H)),D.addColorStop(1,this.o.oa(0,0)),this.aa.beginPath(),this.aa.arc(0,0,E,0,2*Math.PI,!1),this.aa.closePath(),this.aa.fillStyle=D,this.aa.fill(),this.aa.restore())}this.o.na&&(f.useProgram(this.o.sa.P),f.disable(f.BLEND),f.enable(f.DEPTH_TEST))}}}};return t}();x.Bq=w})(ggP2VR||(ggP2VR={}));var THREE;
(function(x){var w=function(){function t(f){this.vb=[];this.Kj=[];this.ca={x:0,y:0};this.Wc={x:0,y:0};this.$h=0;this.session=null;this.al=!1;this.Rm=this.Qm=this.Af=0;this.xl=this.Sg=!1;this.qm=0;this.Eg=-5;this.Em=0;this.ej=this.fg=this.Ej=!1;this.o=null;this.cm=!0;this.ig=1;this.qj=[];this.frustumCulled=!1;this.Hh=0;this.Pm=null;this.Ck=this.uq=!1;this.Ee=[-1,-1,-1,-1];this.Fe=[-1,-1,-1,-1];this.wf=[!1,!1,!1,!1];this.Gc=[];this.zj=[];this.vf=[];this.o=f;var e=this;setTimeout(function(){if(window.WebXRPolyfill&&
window.Promise){var a={cardboardConfig:{BUFFER_SCALE:1}};try{new window.WebXRPolyfill(a),f.O("WebXR Polyfill loaded!")}catch(b){f.Uc(b)}}e.Us()},0);THREE?this.jn():console.log("Three.js not available!")}t.prototype.mr=function(){this.init();this.animate()};t.prototype.jn=function(){this.Am=new THREE.Matrix4;this.cp=new THREE.Euler};t.prototype.init=function(){"xr"in navigator||console.log("no WebXR support");if(THREE)if(this.Sa)console.log("already set up!");else{this.Am||this.jn();var f=this,e=this.o,
a=this.lc=e.lc,b=this.Zt=new THREE.Scene,c=this.Fu=new THREE.Scene,m=this.camera=new THREE.PerspectiveCamera(100,window.innerWidth/window.innerHeight,.001,2E4);b.add(m);108>THREE.REVISION&&(this.frustumCulled=!0);m.position.z=-.01;m.position.y=0;m.position.x=0;this.Sa=m=new THREE.WebGLRenderer({depth:!0,logarithmicDepthBuffer:!0,alpha:!0,antialias:!0,stencil:!1});m.setClearColor(new THREE.Color(0),1);m.setPixelRatio(window.devicePixelRatio);m.setSize(window.innerWidth,window.innerHeight);m.outputEncoding=
THREE.sRGBEncoding;m.shadowMap.enabled=!1;a.appendChild(m.domElement);"xr"in navigator&&(m.xr.enabled=!0,m.xr.setReferenceSpaceType("local"));var h=this.Mk=new THREE.Group;h.name="controllerGroup";h.renderOrder=3E3;a=this.Kk=m.xr.getController(0);a.addEventListener("selectstart",function(z){f.fp(z)});a.addEventListener("selectend",function(z){f.ep(z)});a.visible=!0;a.userData.Wf=0;h.add(a);var n=this.Lk=m.xr.getController(1);n.addEventListener("selectstart",function(z){f.fp(z)});n.addEventListener("selectend",
function(z){f.ep(z)});n.visible=!0;n.userData.Wf=1;h.add(n);h.visible=!1;var p=this.Re=new THREE.Group;p.name="skinGroup";p.translateZ(this.Eg);p.visible=!1;p.renderOrder=1E3;c.add(p);p=this.Dm=new THREE.Group;p.name="toggleSkinGroup";p.translateZ(this.Eg+.1);p.renderOrder=1100;c.add(p);c.add(h);p=(new THREE.TextureLoader).load("webxr/vrSkinShow.svg");var r=(new THREE.TextureLoader).load("webxr/vrSkinHide.svg");h=new THREE.PlaneBufferGeometry(.3,.3);p=new THREE.MeshBasicMaterial({map:p});p.transparent=
!0;r=new THREE.MeshBasicMaterial({map:r});r.transparent=!0;h=new THREE.Mesh(h,p);h.name="SkinToggleButton";h.position.y=3.12;h.Dv=!1;h.userData.ft=p;h.userData.et=r;h.userData.onclick=function(){f.si()};this.Sb=h;this.Sb.visible=!1;this.Dm.add(h);h=(new THREE.BufferGeometry).setFromPoints([new THREE.Vector3(0,0,0),new THREE.Vector3(0,0,-1)]);p=new THREE.LineBasicMaterial({color:14737632});h=new THREE.Line(h,p);h.name="line";h.scale.z=5;a.add(h.clone());n.add(h.clone());this.oi=new THREE.Raycaster;
this.ca=new THREE.Vector2;this.Ke=new THREE.Group;this.Ke.name="panoGroup";e.kd||(this.Ke.renderOrder=1);this.tf=new THREE.Group;this.tf.name="imageGroup";this.Ed=new THREE.Group;this.Ed.name="hotspotGroup";this.dj=new THREE.Group;this.dj.name="elementGroup";this.fh=new THREE.Group;this.fh.name="centerGroup";e.kd||(this.fh.renderOrder=2E3);this.Ke.add(this.dj);this.Ke.add(this.Ed);this.Ke.add(this.tf);b.add(this.Ke);b.add(this.fh);h=new THREE.BufferGeometry;e=[];a=[];for(n=0;20>n;n++)p=2*n*Math.PI/
20,r=Math.cos(p),p=Math.sin(p),a.push(.03*r,.03*p,0),a.push(.05*r,.05*p,0);for(n=0;20>n;n++){p=2*n;r=2*n+1;var v=(n+1)%20*2+1,y=(n+1)%20*2;e.push(p,r,y);e.push(r,v,y)}h.setIndex(e);h.setAttribute("position",new THREE.Float32BufferAttribute(a,3));e=new THREE.MeshBasicMaterial({color:"black",side:THREE.DoubleSide});e=new THREE.Mesh(h,e);e.position.z=-5;this.fh.add(e);window.addEventListener("resize",function(){f.zt()},!1);document.addEventListener("mouseup",function(){f.vt()},!1);document.addEventListener("mousedown",
function(z){f.tt(z)},!1);document.addEventListener("mousemove",function(z){f.ut(z)},!1);S&&"undefined"!==typeof __THREE_DEVTOOLS__&&(__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:b})),__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:c})),__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:m})))}else console.log("Three.js not available!")};t.prototype.Rp=function(){var f=this.o;f.O("VR not found");f.H("vrchanged",{});f.H("playerstatechanged",{})};
t.prototype.Eu=function(){this.xl=!0;var f=this.o;f.O("XR found");f.H("vrchanged",{});f.H("playerstatechanged",{})};t.prototype.Us=function(){if(!this.uq){this.uq=!0;var f=this;if("xr"in navigator)navigator.xr.isSessionSupported("immersive-vr").then(function(e){e?f.Eu():f.Rp()})["catch"](f.Rp)}};t.prototype.ml=function(){return this.Re};t.prototype.pg=function(){return null!=this.session?this.Sa.xr.isPresenting:this.o.je?!0:!1};t.prototype.rf=function(){return this.xl&&THREE};t.prototype.xt=function(f){var e=
this;this.Oi();f.addEventListener("end",function(){e.wt()});console.log("XR Session started.");this.Sa.xr.setSession(f);this.al=!0;this.session=f;e.o.H("entervr",{session:f})};t.prototype.wt=function(){console.log("XR Session ended.");this.al=!1;this.session=null;this.Jk()};t.prototype.ag=function(){var f=this.o;if(this.xl){if(null===this.session){var e=this;navigator.xr.requestSession("immersive-vr",{optionalFeatures:["local-floor","bounded-floor"]}).then(function(b){e.xt(b)})["catch"](function(b){console.log(b);
console.warn("'immersive-vr' isn't supported, or an error occurred activating VR!");e.Jk()})}this.Ed&&this.Ed.translateY(-this.Hh);this.Hh=0;if(1==this.ig){var a=navigator.userAgent;0<=a.indexOf("OculusBrowser")&&(0<=a.indexOf("Pacific")&&(this.ig=1.7),0<=a.indexOf("Quest")&&(this.ig=1.5))}this.Sa.xr.setFramebufferScaleFactor(this.ig);f.Uc("Enter VR - scaled "+this.ig)}else this.Oi(),this.o.H("entervr",{session:null})};t.prototype.At=function(){if(THREE&&this.Sa){var f=this.o;f.je=!0;f.$.style.display=
"none";f.bb.style.display="none";this.Sa.domElement.style.display="inline";f.H("vrchanged",{});f.H("playerstatechanged",{})}};t.prototype.Jk=function(){if(THREE&&this.Sa){var f=this.o;f.je=!1;f.$.style.display="inline";f.bb.style.display="inline";this.Sa.domElement.style.display="none";f.Bg(0);f.fc();f.update();f.H("vrchanged",{});f.H("playerstatechanged",{});this.o.H("exitvr",{session:null});this.Hk()}};t.prototype.bg=function(){null!=this.session&&this.session.end()};t.prototype.gq=function(){this.pg()?
this.bg():this.ag()};t.prototype.zr=function(){var f=0,e=this.o,a=e.N.M;var b=1536;this.Sa&&e.O("Canvas: "+b);b*=Math.pow(2,0);if(0<a.levels.length){for(;a.levels.length>=f+2&&!a.levels[f+1].Ef&&a.levels[f+1].width>b;)f++;e.O("Level "+f+" - width: "+a.levels[f].width);e.O(a.levels)}return f};t.prototype.qo=function(f){var e=this.o,a=e.N.M,b=e.Ve[f];f="";if(b){b=b.firstChild;for(var c;b;)"input"==b.nodeName&&(c=b)&&(c=0<a.levels.length?c.getAttributeNode("leveltileurl"):c.getAttributeNode("tilevrurl"))&&
(f=c.nodeValue),b=b.nextSibling}else f=0<a.levels.length?a.Il:e.Ok;a=f;f=e.xp;for(b=0;3>b;b++)a=f(a,"c","vr"),a=f(a,"s","vr"),a=f(a,"r",0),a=f(a,"l",0),a=f(a,"x",0),a=f(a,"y",0),a=f(a,"v",0),a=f(a,"h",0);return e.fb(a)};t.prototype.ceilPowerOfTwo=function(f){return Math.pow(2,Math.ceil(Math.log(f)/Math.LN2))};t.prototype.loadTexture=function(f,e,a){var b=new THREE.ImageLoader;b.setCrossOrigin(this.o.crossOrigin);var c=this;b.load(e,function(m){var h=c.ceilPowerOfTwo(m.width),n=c.ceilPowerOfTwo(m.height);
f.encoding=THREE.sRGBEncoding;if(h==m.width&&n==m.height||!a)f.image=m;else{c.o.O("resizing "+m.width+"/"+m.height+" -> "+h+"/"+n);var p=document.createElement("canvas");p.width=h;p.height=n;p.getContext("2d").drawImage(m,0,0,h,n);f.image=p}f.needsUpdate=!0;f.wo=!0;f.ye&&f.ye.wo&&(f.Eh.visible=!0,f.ye.Eh.visible=!0)});this.qj.push(f)};t.prototype.Oi=function(){if(THREE){var f=this.o;if(this.Ck)f.O("vr panorama aleady added!");else{var e=this.tf,a=this;f.O("add vr panorama");this.Ff();this.camera.layers.enable(1);
e.setRotationFromEuler(this.cp);e.rotateX(f.Ya.pitch*Math.PI/180);e.rotateZ(-f.Ya.W*Math.PI/180);var b=new THREE.SphereBufferGeometry(2E4/3*1.5,16,16),c=new THREE.Texture,m=new THREE.ImageLoader;m.setCrossOrigin(this.o.crossOrigin);m.load(this.qo(f.hj()),function(h){c.encoding=THREE.sRGBEncoding;c.image=h;c.needsUpdate=!0});m=new THREE.MeshBasicMaterial({map:c,side:THREE.DoubleSide});b=new THREE.Mesh(b,m);b.scale.x=-1;b.rotateZ(f.Ya.W*Math.PI/180);b.rotateX(-f.Ya.pitch*Math.PI/180);b.rotateY(-90*
Math.PI/180);e.add(b);a.Oj=b;a.Ck=!0;setTimeout(function(){f.O("Adding Main Pano");a.Ck=!1;a.Pq();f.B.j?a.Sq():a.Qq();a.Nq()});this.Tt();this.cm=!0}}};t.prototype.Sq=function(){var f=this.o,e=this.tf,a=2E4/3;if(f.Fd){var b=new THREE.VideoTexture(f.B.j);b.wrapS=THREE.ClampToEdgeWrapping;b.wrapT=THREE.ClampToEdgeWrapping;b.minFilter=THREE.LinearFilter;b.encoding=THREE.sRGBEncoding;var c=new THREE.SphereBufferGeometry(a,60,40);c.scale(-1,1,1);for(var m=c.attributes.uv.array,h=1;h<m.length;h+=2)m[h]*=
.5;m=new THREE.MeshBasicMaterial({map:b});c=new THREE.Mesh(c,m);c.rotateY(-90*Math.PI/180);c.layers.set(f.Gg?1:2);e.add(c);c=new THREE.SphereBufferGeometry(a,60,40);c.scale(-1,1,1);m=c.attributes.uv.array;for(h=1;h<m.length;h+=2)m[h]*=.5,m[h]+=.5;m=new THREE.MeshBasicMaterial({map:b});c=new THREE.Mesh(c,m);c.rotateY(-90*Math.PI/180);c.layers.set(f.Gg?2:1)}else c=new THREE.SphereBufferGeometry(a,60,40),c.scale(-1,1,1),b=new THREE.VideoTexture(f.B.j),b.encoding=THREE.sRGBEncoding,b.wrapS=THREE.ClampToEdgeWrapping,
b.wrapT=THREE.ClampToEdgeWrapping,b.minFilter=THREE.LinearFilter,m=new THREE.MeshBasicMaterial({map:b}),c=new THREE.Mesh(c,m),c.rotateY(-90*Math.PI/180);e.add(c);try{f.B.j.play()}catch(n){f.Uc(n)}};t.prototype.Qq=function(){var f=this.o,e=this.o.N.M,a=[],b=this.zr(),c=this.tf,m=2E4/3,h=f.Fd?2:1;if(e.levels.length>b)for(var n=e.levels[b],p=0;6>p;p++){a[p]=new THREE.Group;for(var r=0;r<n.ta;r++)for(var v=0;v<n.Y;v++)for(var y=0;y<h;y++){var z=new THREE.Texture;z.encoding=THREE.sRGBEncoding;this.loadTexture(z,
f.N.Kg(p,b,v,r,1==y),!0);z.wrapS=THREE.ClampToEdgeWrapping;z.wrapT=THREE.ClampToEdgeWrapping;z.minFilter=THREE.LinearMipMapLinearFilter;z.anisotropy=1;var C=e.V+2*e.gb,F=e.V+2*e.gb;v==n.Y-1&&(C=n.width-e.V*(n.Y-1)+2*e.gb);r==n.ta-1&&(F=n.width-e.V*(n.ta-1)+2*e.gb);var E=new THREE.PlaneBufferGeometry(m*C/n.width,m*F/n.width,8),D=new THREE.MeshBasicMaterial({map:z});E=new THREE.Mesh(E,D);D.transparent=!0;D.side=THREE.FrontSide;D=1*e.V;E.position.x=m*(v*D+C/2-e.gb-n.width/2)/n.width;E.position.y=m*-(r*
D+F/2-e.gb-n.width/2)/n.width;E.position.z=-.5*m;if(f.Fd)if(E.visible=!1,E.layers.set(1==y?1:2),z.Eh=E,0==y)var A=E;else C=A.material.map,z.ye=C,C.ye=z;a[p].add(E);E.frustumCulled=this.frustumCulled}4>p?a[p].rotation.y=-p*Math.PI/2:a[p].rotation.x=(4==p?1:-1)*Math.PI/2;c.add(a[p])}else for(e=f.Lg,p=0;6>p;p++)for(a[p]=new THREE.Group,y=0;y<h;y++)b=p,f.Fd&&(b=p+(1==y?6:0)),z=new THREE.Texture,z.encoding=THREE.sRGBEncoding,this.loadTexture(z,f.fb(f.lh[b]),!1),z.wrapS=THREE.ClampToEdgeWrapping,z.wrapT=
THREE.ClampToEdgeWrapping,z.minFilter=THREE.LinearFilter,E=new THREE.PlaneBufferGeometry(e*m/2,e*m/2,64),D=new THREE.MeshBasicMaterial({map:z}),E=new THREE.Mesh(E,D),D.transparent=!0,D.side=THREE.FrontSide,E.position.x=0,E.position.y=0,E.position.z=-.25*m,f.Fd&&(E.layers.set(1==y?1:2),E.visible=!1,z.Eh=E,0==y?A=E:(C=A.material.map,z.ye=C,C.ye=z)),a[p].add(E),4>p?a[p].rotation.y=-p*Math.PI/2:a[p].rotation.x=(4==p?1:-1)*Math.PI/2,c.add(a[p])};t.prototype.Pq=function(){var f=this.o,e=this.Ed;new x.Ua(0,
0,-100);for(var a=f.K.ek,b=0;b<f.J.length;b++){var c=f.J[b];if("poly"!=c.type){var m=null,h=c.Ru(),n=c.Lf?100:5;if(f.Mi&&f.Mi.addSkinHotspot)(m=f.Mi.addSkinHotspot(c))&&m.userData.Av&&(n=100);else{var p=.2;if(!1!==h){n=!c.distance||0>=c.distance?5:1>c.distance?1:5>c.distance?c.distance:5;if(c.gd){h=.005;var r=(new THREE.TextureLoader).load(c.gd);r.encoding=THREE.sRGBEncoding;var v=new THREE.MeshBasicMaterial({map:r});if(c.Lf){m=2*n*Math.tan(c.fov/2*Math.PI/180);var y=new THREE.PlaneBufferGeometry(m,
m*c.yd/c.ff,1,1);v.transparent=!0;v.opacity=1}else y=new THREE.PlaneBufferGeometry(h*c.ff,h*c.yd,1,1),v.transparent=!0,v.opacity=.25;p=h*c.yd/2;v.side=THREE.DoubleSide}else y=new THREE.SphereBufferGeometry(.2,16,16),r=(new THREE.TextureLoader).load(this.qo(h)),r.encoding=THREE.sRGBEncoding,v=new THREE.MeshBasicMaterial({map:r}),v.transparent=!0,v.opacity=.25;m=new THREE.Mesh(y,v);h=c.title;if(a.enabled&&""!=h){y=document.createElement("canvas");y.width=256;y.height=32;r=y.getContext("2d");this.Fi||
(this.Fi=document.createElement("canvas"),this.Fi.width=y.width,this.Fi.height=y.height);var z=this.Fi.getContext("2d");z.clearRect(0,0,y.width,y.height);z.font="16px Helvetica";z.textAlign="center";z.textBaseline="top";v=z.measureText(h);var C=v.width;0<a.height&&(C=Math.min(a.width,y.width-6),C=Math.max(C,v.width));v=C+6;a.background&&(z.fillStyle=this.o.oa(a.Vb,a.Ub),z.fillRect((y.width-C)/2-3,2,C+6,24));0<a.Ti&&(z.strokeStyle=this.o.oa(a.Xb,a.Wb),z.strokeRect((y.width-C)/2-3,2,C+6,24));z.fillStyle=
this.o.oa(a.fk,a.dk);z.fillText(h,y.width/2,5,y.width-6);r.drawImage(this.Fi,(y.width-v)/2,2,v,24,0,0,y.width,y.height);r=new THREE.Texture(y);r.encoding=THREE.sRGBEncoding;r.needsUpdate=!0;h=1.5;y=new THREE.PlaneBufferGeometry(1*h*v/y.width,3*h/y.height,1,1);v=new THREE.MeshBasicMaterial({map:r,side:THREE.DoubleSide});y=new THREE.Mesh(y,v);y.translateY(-p-.125*h/2);y.frustumCulled=this.frustumCulled;m.add(y);v.transparent=!0;v.opacity=.5}m.userData={S:c}}}m&&(m.rotateY(c.pan*Math.PI/180),m.rotateX(c.u*
Math.PI/180),m.translateZ(-n),m.castShadow=!1,m.receiveShadow=!1,m.frustumCulled=this.frustumCulled,e.add(m))}}};t.prototype.Nq=function(){for(var f=this.o,e=0;e<f.Xa.length;e++){var a=f.Xa[e];if(a.j){var b=(new THREE.TextureLoader).load(a.j.src);this.xn(a,b)}}for(e=0;e<f.U.length;e++)a=f.U[e],a.j&&"_videopanorama"!=a.id&&!a.od&&(a.j.play(),b=new THREE.VideoTexture(a.j),b.encoding=THREE.sRGBEncoding,b.wrapS=THREE.ClampToEdgeWrapping,b.wrapT=THREE.ClampToEdgeWrapping,b.minFilter=THREE.LinearFilter,
this.xn(a,b))};t.prototype.xn=function(f,e){var a=this.dj,b=5E3*Math.tan(f.fov*Math.PI/360);var c=0<f.pc?b*f.Pc/f.pc:b;f.Ic&&1!=f.Ic&&(c*=f.Ic);b=new THREE.PlaneBufferGeometry(b,c,5,5);e=new THREE.MeshBasicMaterial({map:e,side:THREE.DoubleSide,transparent:!0});e=new THREE.Mesh(b,e);e.rotateY(f.pan*Math.PI/180);e.rotateX(f.u*Math.PI/180);e.translateY(-0);e.translateZ(-2500);e.rotateZ(-f.yb*Math.PI/180);e.rotateY(-f.Oa*Math.PI/180);e.rotateX(-f.Ka*Math.PI/180);e.userData=f;e.castShadow=!1;e.receiveShadow=
!1;a.add(e)};t.prototype.rh=function(f){for(var e=f.children.length-1;0<=e;e--){var a=f.children[e];this.rh(a);f.remove(a)}f.geometry&&f.geometry.dispose();f.material&&(f.material.texture&&(f.material.texture.dispose(),f.material.texture.ye=null,f.material.texture.Eh=null),f.material.map&&(f.material.map.dispose(),f.material.map.ye=null,f.material.map.Eh=null),f.material.dispose())};t.prototype.Ff=function(){THREE&&(this.qj=[],this.rh(this.tf),this.rh(this.Ed),this.rh(this.dj),10<this.Sa.info.memory.textures&&
this.o.Sm(this.Sa.info.memory))};t.prototype.zt=function(){if(THREE){var f=this.camera;f.aspect=window.innerWidth/window.innerHeight;f.updateProjectionMatrix();this.Sa.setSize(window.innerWidth,window.innerHeight)}};t.prototype.fp=function(f){if(THREE){f=f.target;this.Hk();var e=this.hl(f);0<e.length&&(this.ah(e,f.userData.Wf),0<this.vb.length&&(f=this.vb[0],e=f.userData,e.S&&!e.fromSkin?(f=e.S,this.o.pd(f.url,f.target)):(this.oe(f,"onclick"),this.oe(f,"onmousedown"))))}};t.prototype.ep=function(f){if(THREE){f=
f.target;var e=this.hl(f);0<e.length&&this.ah(e,f.userData.Wf)}};t.prototype.hl=function(f){this.Am.identity().extractRotation(f.matrixWorld);this.oi.ray.origin.setFromMatrixPosition(f.matrixWorld);this.oi.ray.direction.set(0,0,-1).applyMatrix4(this.Am);return this.yl(this.oi)};t.prototype.yl=function(f){var e=[];if(this.Ed.visible){var a=f.intersectObjects(this.Ed.children,!0);e=e.concat(a)}this.Re.visible&&(a=f.intersectObjects(this.Re.children,!0),e=e.concat(a));a=f.intersectObjects(this.Dm.children,
!0);return e=e.concat(a)};t.prototype.ah=function(f,e){void 0===e&&(e=-1);for(var a=0;a<f.length;a++)if(void 0!==f[a].object.userData.isVisible&&f[a].object.userData.isVisible()||void 0===f[a].object.userData.isVisible&&f[a].object.visible||f[a].object.userData.xv){var b=f[a].object;b.selected=!0;b.distance=f[a].distance;b.Wf=e;this.vb.push(b)}};t.prototype.intersectObjects=function(f){var e=f.getObjectByName("line"),a=this.hl(f);0<a.length&&this.ah(a,f.userData.Wf);e.scale.z=0<this.vb.length?this.vb[0].distance:
5};t.prototype.Hk=function(){for(;this.vb.length;)this.vb.pop().selected=!1};t.prototype.ut=function(f){f.preventDefault();var e=this.ca,a=this.Sa;e.x=f.clientX/a.domElement.clientWidth*2-1;e.y=2*-(f.clientY/a.domElement.clientHeight)+1;1==f.buttons&&(this.$h=this.Wc.x-e.x)};t.prototype.Vs=function(){var f=this.oi;f.setFromCamera(this.ca,this.camera);f=this.yl(f);0<f.length&&this.ah(f)};t.prototype.Ws=function(){var f=this.oi;f.setFromCamera({x:0,y:0},this.camera);f=this.yl(f);0<f.length&&this.ah(f)};
t.prototype.vt=function(){this.$h=0;if(0<this.vb.length){var f=this.vb[0];f.userData.S||this.oe(f,"onmouseup")}};t.prototype.oe=function(f,e,a){void 0===a&&(a=!1);var b=f;do if(b.userData[e])if(a){var c=f.Wf;0<=c&&this.Gc&&this.Gc[c]&&(c=this.Gc[c],c.hapticActuators&&0<c.hapticActuators.length&&c.hapticActuators[0].pulse(.8,5))}else b.userData[e]();while(!b.userData.stopPropagation&&(b=b.parent))};t.prototype.ln=function(f,e){do if(f.userData.onclick||f.userData.S&&!f.userData.fromSkin)e?f.userData.yi=
-1:f.userData.yi&&-1!=f.userData.yi?Date.now()>f.userData.yi+1E3&&(f.userData.onclick?(f.userData.onclick(),f.userData.yi=-1):f.userData.S&&f.userData.S.url&&this.o.pd(f.userData.S.url,f.userData.S.target)):f.userData.yi=Date.now();while(!f.userData.stopPropagation&&(f=f.parent))};t.prototype.tt=function(f){50>f.clientX&&50>f.clientY&&this.o.bg();if(0<this.vb.length){f=this.vb[0];for(var e=1;e<this.vb.length;e++)this.vb[e].position.z>f.position.z&&(f=this.vb[e]);e=f.userData;e.S?(f=e.S,this.o.pd(f.url,
f.target)):(this.oe(f,"onclick"),this.oe(f,"onmousedown"))}else this.Wc.x=this.ca.x,this.Wc.y=this.ca.y};t.prototype.animate=function(){var f=this.Vo=this;this.Sa&&this.Sa.setAnimationLoop(function(){f.render()})};t.prototype.render=function(){if(THREE){var f=null;try{f=this.Sa.xr.getCamera(this.camera)}catch(v){}this.Pm=f;0==this.Hh&&f&&(this.Hh=f.position.y,this.Ed.translateY(this.Hh));var e=this.Vo,a=e.o;if(a.je){e.Sg=e.Kk.visible||e.Lk.visible?!1:!0;var b=this.Ms();this.Ns();this.Oj&&0<this.qj.length&&
this.qj.every(function(v){return v.wo})&&(this.rh(this.Oj),this.tf.remove(this.Oj),this.Oj=null,a.O("unload Preview Sphere"));for(var c=this.Ed,m=c.children.length-1;0<=m;m--){var h=c.children[m],n=1,p=1;h.selected?(n=1.5,p=1):b?(n=.6,p=.7):(n=.4,p=.5);var r=h.scale.x;r+=.1*(n-r);h.userData.fromSkin?h.userData.ggUse3d&&(r=10):(h.material.opacity+=.1*(p-h.material.opacity),h.userData&&h.userData.S&&h.userData.S.gd?(h.userData.S.Lf&&(r=1,h.material.opacity=1),0<h.children.length&&(h.children[0].material.opacity=
h.material.opacity)):(h.rotateY(1*Math.PI/180),0<h.children.length&&(h.children[0].rotateY(-1*Math.PI/180),h.children[0].material.opacity=h.material.opacity)));h.scale.x=h.scale.y=h.scale.z=r}b=e.camera.rotation.clone();b.reorder("YXZ");this.Qm=180*b.y/Math.PI;this.Rm=180*b.x/Math.PI;a.Mi&&!this.Re.visible&&(10<this.Rm?this.Ej||(this.Ej=!0,this.ct=new Date):(this.Ej=!1,!this.fg&&!this.Sb.visible||this.ej||(this.ej=!0,this.Yk=new Date),this.fg=!1),!this.Ej||this.fg||this.Sb.visible||(c=new Date,500<
c.getTime()-this.ct.getTime()&&(this.fg=!0,this.Yk=new Date)),this.fg?(this.Sb.visible=!0,c=new Date,c=(c.getTime()-this.Yk.getTime())/5,100<=c?(this.Sb.material.opacity=1,this.fg=!1):this.Sb.material.opacity=c/100):this.ej&&(c=new Date,c=(c.getTime()-this.Yk.getTime())/5,100<=c?(this.Sb.material.opacity=0,this.ej=this.Sb.visible=!1):this.Sb.material.opacity=1-c/100));this.cm&&(this.ri(this.Qm-a.pan.m),this.cm=!1);a.Mp(this.Qm-this.Af,this.Rm,180*b.z/Math.PI);a=this.fh;e.Sg?f&&(a.setRotationFromEuler(f.rotation),
a.visible=!0):a.visible=!1;a=this.Dm;f&&!this.Re.visible&&(a.translateZ(-(this.Eg+.1)),a.rotateY(-this.Em),b=new THREE.Vector3(0,0,1),b.applyEuler(f.rotation),this.Em=Math.atan2(b.x,b.z),a.rotateY(this.Em),a.translateZ(this.Eg+.1));e.Sa.autoClear=!0;e.Sa.render(e.Zt,e.camera);e.Sa.autoClear=!1;e.Sa.clearDepth();e.Sa.render(e.Fu,e.camera);0==this.$h||isNaN(this.$h)||this.ri(this.$h)}}};t.prototype.Ms=function(){var f=this,e=this;this.Gc=[];var a=!0;this.session?this.session.inputSources.forEach(function(p){var r=
p.profiles;"gaze"==p.targetRayMode?e.Sg=!0:(f.Gc.push(p.gamepad),0<=r.indexOf("oculus-go")&&(a=!1),0<=r.indexOf("generic-trigger-squeeze-thumbstick")&&(a=!0),0<=r.indexOf("oculus-touch")&&(a=!0))}):this.Gc=navigator.getGamepads&&navigator.getGamepads();var b=!1;if(this.Gc)for(var c=0;c<this.Gc.length;c++){var m=this.Gc[c];if(m&&0<m.buttons.length)if(2<=m.axes.length&&2<m.buttons.length&&!a)if(m.buttons[2].pressed)this.wf[c]||(this.wf[c]=!0,this.si());else if(m.buttons[2].touched){b=!0;this.wf[c]=
!1;var h=m.axes[0],n=m.axes[1];-1==this.Ee[c]?this.Ee[c]=h:(m=this.Ee[c]-h,-.3>m&&(this.ri(20),this.Ee[c]=h,this.Fe[c]=n),.3<m&&(this.ri(-20),this.Ee[c]=h,this.Fe[c]=n));-1==this.Fe[c]?this.Fe[c]=n:(m=this.Fe[c]-n,-.5>m&&(this.si(!0),this.Fe[c]=n,this.Ee[c]=h),.5<m&&(this.si(!1),this.Fe[c]=n,this.Ee[c]=h))}else this.Ee[c]=-1,this.Fe[c]=-1,this.wf[c]=!1;else 4<=m.axes.length&&(h=m.axes[2],n=m.axes[3],.8<h?(b=!0,1!=this.vf[c]&&(this.vf[c]=1,this.zj[c]=Date.now()-1E4)):-.8>h?(b=!0,-1!=this.vf[c]&&(this.vf[c]=
-1,this.zj[c]=Date.now()-1E4)):this.vf[c]=0,0!=this.vf[c]&&400<Date.now()-this.zj[c]&&(this.zj[c]=Date.now(),this.ri(20*this.vf[c])),m.buttons[1].pressed?this.wf[c]||(this.wf[c]=!0,this.si()):this.wf[c]=!1)}e.Mk.visible==(!this.Gc||0==this.Gc.length)&&(e.Mk.visible=!e.Mk.visible);return b};t.prototype.kp=function(f){for(f=f.parent;f;){if(f.selected)return!0;f=f.parent}return!1};t.prototype.Ns=function(){var f=this.Vo;f.Kj=f.vb.slice();f.Hk();f.Kk.visible&&f.intersectObjects(f.Kk);f.Lk.visible&&f.intersectObjects(f.Lk);
f.al||f.Vs();f.Sg&&f.Ws();for(var e=0;e<f.vb.length;e++){var a=f.vb[e];f.Sg&&this.ln(a,!1);-1!=f.Kj.indexOf(a)||this.kp(a)||(this.oe(a,"onmouseover"),this.Gc&&0<this.Gc.length&&this.oe(a,"onclick",!0))}for(e=0;e<f.Kj.length;e++)a=f.Kj[e],-1==f.vb.indexOf(a)&&(this.kp(a)||this.oe(a,"onmouseout"),f.Sg&&this.ln(a,!0))};t.prototype.si=function(f){var e=this.Re;void 0===f&&(f=!e.visible);var a=this.Pm;f?(e.translateZ(-this.Eg),e.rotateY(-this.qm),a&&(f=new THREE.Vector3(0,0,1),f.applyEuler(a.rotation),
this.qm=Math.atan2(f.x,f.z)),e.rotateY(this.qm),e.translateZ(this.Eg),this.Re.visible=!0,this.Sb.material=this.Sb.userData.et,this.Sb.visible=!0,this.Sb.material.opacity=1):(this.Re.visible=!1,this.Sb.material=this.Sb.userData.ft,this.Sb.visible=!1)};t.prototype.Tt=function(){this.Af=0;this.Ke.setRotationFromEuler(this.cp)};t.prototype.ri=function(f){this.Af+=f;this.Ke.rotateY(f*Math.PI/180)};return t}();x.Lq=w})(ggP2VR||(ggP2VR={}));
(function(x){var w=function(){return function(){this.fov=this.u=this.pan=0}}();x.tv=w;var t=function(){function f(e){this.pan={m:0,Ia:0,min:0,max:360,d:0,ci:0,Zb:0,open:0};this.u={m:0,Ia:0,min:-90,max:90,d:0,Zb:0,open:0};this.W={m:0,Ia:0,min:-180,max:180,d:0,open:0};this.nc={pan:0,u:-90,W:0,fov:170,pb:9};this.fov={m:70,Ia:70,min:1,Zh:0,max:170,Kl:360,Ll:270,prev:0,d:0,Nc:{enabled:!1,x:0,y:0},mode:0,Xp:0,Bn:0,open:0};this.cube=new x.Gq;this.sa=null;this.Ya={W:0,pitch:0};this.Gg=this.Fd=!1;this.Lj=
this.hp=4;this.gp=this.Pl=0;this.M=new x.Eq;this.ug=200;this.Ei=0;this.Cm=5;this.ge=0;this.eq=50;this.Rs=0;this.B={src:[],cf:4,width:640,height:480,Tc:!1,qg:!1,$j:!0,um:!1,se:"loop",ck:"",j:HTMLVideoElement=null,Bm:!1,texture:WebGLTexture=null,nk:WebGLBuffer=null,Di:WebGLBuffer=null,sj:WebGLBuffer=null,format:1,Fh:0,flipY:1,sb:function(){return 0},fm:function(){},loop:function(){return!1}};this.xf={pan:-1,u:-1,fov:-1};this.Fl=0;this.lh=[];this.Ok="";this.mh=[];this.Lg=this.Te=1;this.Sl=new w;this.o=
e}f.prototype.ma=function(){this.o.ma(!1)};f.prototype.update=function(){this.o.update()};f.prototype.nf=function(){return this.pan.m};f.prototype.kl=function(){for(var e=this.pan.m;-180>e;)e+=360;for(;180<e;)e-=360;return e};f.prototype.we=function(){for(var e=this.pan.m-this.pan.ci;-180>e;)e+=360;for(;180<e;)e-=360;return e};f.prototype.be=function(e){this.ma();isNaN(e)||(this.pan.m=Number(e));this.update()};f.prototype.Xj=function(e){this.ma();isNaN(e)||(this.pan.m=Number(e)+this.pan.ci);this.update()};
f.prototype.Vi=function(e,a){isNaN(e)||(this.be(this.nf()+e),a&&(this.pan.d=e))};f.prototype.pn=function(e,a){this.Vi(e*this.kf(),a)};f.prototype.kf=function(){return Math.min(1,2*Math.tan(Math.PI*Math.min(this.fov.m,90)/360))};f.prototype.jg=function(){return this.u.m};f.prototype.ce=function(e){this.ma();isNaN(e)||(this.u.m=Number(e));this.update()};f.prototype.Wi=function(e,a){this.ce(this.jg()+e);a&&(this.u.d=e)};f.prototype.rn=function(e,a){this.Wi(e*this.kf(),a)};f.prototype.Bg=function(e){this.ma();
isNaN(e)||(this.W.m=Number(e));this.update()};f.prototype.nj=function(){return this.W.m};f.prototype.Dd=function(){return this.fov.m};f.prototype.zb=function(e){this.ma();switch(this.Z()){case 4:var a=170;break;case 12:a=360;break;case 9:a=355;break;default:a=170}this.ac()&&(a=9999999999);return!isNaN(e)&&0<e&&e<a&&(a=this.fov.m,this.fov.m=1*e,this.df(),a!=this.fov.m)?(this.update(),!0):!1};f.prototype.im=function(e){0<=e&&4>e&&(this.fov.mode=Number(e),this.df(),this.update())};f.prototype.ac=function(){return 2==
this.o.Jd};f.prototype.Ek=function(e,a){this.zb(this.Dd()+e);a&&(this.fov.d=e)};f.prototype.Ui=function(e,a){if(!isNaN(e)){var b=e/90*Math.cos(Math.min(this.fov.m,90)*Math.PI/360);b=this.fov.m*Math.exp(b);this.zb(b);a&&(this.fov.d=e)}};f.prototype.nm=function(e,a){this.ma();isNaN(e)||(this.pan.m=e);isNaN(a)||(this.u.m=a);this.update()};f.prototype.Mp=function(e,a,b){this.ma();!isNaN(e)&&1E7>e&&-1E7<e&&(this.pan.m=e);!isNaN(a)&&1E7>a&&-1E7<a&&(this.u.m=a);!isNaN(b)&&1E7>b&&-1E7<b&&(this.W.m=b);this.update()};
f.prototype.Ag=function(e,a,b){this.ma();isNaN(e)||(this.pan.m=e);isNaN(a)||(this.u.m=a);isNaN(b)||this.zb(b);this.update()};f.prototype.Dp=function(){this.Ag(this.pan.Ia,this.u.Ia,this.fov.Ia)};f.prototype.qb=function(e,a,b){var c=a?Number(a):0;if(0!=e&&4!=e&&12!=e&&9!=e)this.o.Uc("Unsupported projection type: "+e);else if(a&&0!==c&&4!==c&&12!==c&&9!==c)this.o.Uc("Unsupported projection2 type: "+c);else if(e==c&&(c=0),this.gp=b?Number(b):1,this.Lj!=e||this.Pl!=c)this.Lj=e,this.Pl=c,this.sa.tj()};
f.prototype.Z=function(){return 0==this.Lj?4:this.Lj};f.prototype.Hc=function(){return this.Pl};f.prototype.Ch=function(){return this.hp};f.prototype.mj=function(){return this.gp};f.prototype.aspect=function(){return this.o.C.width/this.o.C.height};f.prototype.Io=function(){return 4==this.Z()&&0==this.Hc()};f.prototype.Mb=function(e,a){e||(e=this.fov.m);a||(a=this.Z());return this.Xf(a,1/this.Nn(this.o.C),e)};f.prototype.Xf=function(e,a,b){return this.ac()?a*b:4==e?360*Math.atan(a*Math.tan(b/2*Math.PI/
180))/Math.PI:9==e?720*Math.atan(a*Math.tan(b/4*Math.PI/180))/Math.PI:a*b};f.prototype.el=function(e,a){e||(e=this.Mb());a||(a=this.Z());return this.Xf(a,this.aspect(),e)};f.prototype.dl=function(e,a){e||(e=this.Mb());a||(a=this.Z());var b=this.aspect();b=Math.sqrt(1+b*b);return this.Xf(a,b,e)};f.prototype.mn=function(e){var a;a||(a=this.Z());return this.Xf(a,this.Nn(this.o.C),e)};f.prototype.Nn=function(e){var a=1;switch(this.fov.mode){case 0:a=1;break;case 1:a=e.width/e.height;break;case 2:a=Math.sqrt(e.width*
e.width+e.height*e.height)/e.height;break;case 3:a=4*e.height/3>e.width?1:3*e.width/(4*e.height)}return a};f.prototype.vi=function(e){this.zb(this.mn(e))};f.prototype.jm=function(e){var a=this.Z(),b=1/this.aspect();this.vi(this.Xf(a,b,e))};f.prototype.gm=function(e){var a=this.Z(),b=this.aspect();b=1/Math.sqrt(1+b*b);this.vi(this.Xf(a,b,e))};f.prototype.df=function(){if(!this.o.je){var e=this.Sl;e.pan=this.pan.m;e.u=this.u.m;e.fov=this.fov.m;this.Vf(e);this.Vf(e);this.Vf(e);this.pan.m=e.pan;this.u.m=
e.u;this.fov.m!=e.fov&&(this.fov.m=e.fov)}};f.prototype.Vf=function(e){var a=this.aspect();var b=this.o.C;var c=this.o,m=c.v;if(this.ac()){if(0<this.fov.Zh){var h=this.Te;this.M.levels&&0<this.M.levels.length&&(h=this.M.levels[0].height);10<h&&(this.fov.min=100*b.height/(h*this.fov.Zh))}h=e.fov/2;b=h*a;var n=this.M.width/this.M.height*50;a=c.I.Cp?2*Math.min(50,n/a):2*Math.max(50,n/a);e.fov<this.fov.min&&(e.fov=this.fov.min);e.fov>a&&(e.fov=a);50<h?e.u=0:(50<e.u+h&&(e.u=50-h),-50>e.u-h&&(e.u=-50+h));
b>n?e.pan=0:(e.pan+b>n&&(e.pan=n-b,c.v.active&&(c.v.speed=-c.v.speed,this.pan.d=0)),e.pan-b<-n&&(e.pan=-n+b,m.active&&(m.speed=-m.speed,this.pan.d=0)))}else{0<this.fov.Zh&&(h=this.Te,this.M.levels&&0<this.M.levels.length&&(h=this.M.levels[0].height),10<h&&(this.fov.min=360*Math.atan2(b.height/2,h/2*this.fov.Zh)/Math.PI));e.fov<this.fov.min&&(e.fov=this.fov.min);n=this.fov.max;var p=179;h=this.Mb()/2;b=a*h;4==this.Z()?b=180*Math.atan(a*Math.tan(h*Math.PI/180))/Math.PI:9==this.Z()?(n=this.fov.Ll,p=
355):12==this.Z()&&(n=this.fov.Kl,p=360);c.na||(n=Math.max(160,n));e.fov>n&&(e.fov=n);12==this.Z()&&(2*b>p&&(e.fov=p/a),h=this.Mb()/2,2*h>p&&(e.fov=p),h=this.Mb()/2,b=a*h);2*h>this.u.max-this.u.min&&180>this.u.max-this.u.min&&(h=(this.u.max-this.u.min)/2,e.fov=this.mn(2*h));90>this.u.max?e.u+h>this.u.max&&(e.u=this.u.max-h):e.u>this.u.max&&(e.u=this.u.max);-90<this.u.min?e.u-h<this.u.min&&(e.u=this.u.min+h):e.u<this.u.min&&(e.u=this.u.min);c=this.pan.max-this.pan.min;359.99>c&&(a=90,n=Math.tan(h*
Math.PI/180),p=Math.tan((Math.abs(e.u)+h)*Math.PI/180),p=Math.sqrt(p*p+1)/Math.sqrt(n*n+1),h=180*Math.atan(p*Math.tan(b*Math.PI/180))/Math.PI,2*h>c&&(p=Math.tan(c*Math.PI/360)/Math.tan(b*Math.PI/180),c=p*Math.sqrt(n*n+1),p=Math.sqrt(c*c-1),a=180/Math.PI*Math.atan(p)),e.pan+h>this.pan.max&&(e.pan=this.pan.max-h,m.active&&(m.speed=-m.speed,this.pan.d=0)),e.pan-h<this.pan.min&&(e.pan=this.pan.min+h,m.active&&(m.speed=-m.speed,this.pan.d=0)),e.u+b>a&&(e.u=a-b),e.u-b<-a&&(e.u=-a+b))}};f.prototype.Kg=function(e,
a,b,c,m){var h=this.M.Hl-1-a,n=this.M.Il,p="x";switch(e){case 0:p="f";break;case 1:p="r";break;case 2:p="b";break;case 3:p="l";break;case 4:p="u";break;case 5:p="d";break;case "vr":p="vr"}m&&(e+="l",p+="l");m=this.o.xp;for(var r=0;3>r;r++)n=m(n,"c",e),n=m(n,"s",p),n=m(n,"r",a),n=m(n,"l",h),n=m(n,"x",b),n=m(n,"y",c),n=m(n,"v",c),n=m(n,"h",b);return this.o.fb(n)};f.prototype.us=function(e,a,b){b.Oc=e.width/this.M.V*a.yh;b.Cd=e.height/this.M.V*a.zh;b.Hd=e.width/this.M.V*a.Wh;b.Id=e.height/this.M.V*a.Xh;
b.Oc=Math.min(Math.max(0,Math.floor(b.Oc)),e.Y-1);b.Cd=Math.min(Math.max(0,Math.floor(b.Cd)),e.ta-1);b.Hd=Math.min(Math.max(0,Math.floor(b.Hd)),e.Y-1);b.Id=Math.min(Math.max(0,Math.floor(b.Id)),e.ta-1)};f.prototype.dv=function(){if(!(6>this.cube.eg.length))for(var e=0;6>e;e++){var a=this.cube.eg[e];var b=[];b.push(new x.Ua(-1,-1,-1,0,0));b.push(new x.Ua(1,-1,-1,1,0));b.push(new x.Ua(1,1,-1,1,1));b.push(new x.Ua(-1,1,-1,0,1));for(var c=0;4>c;c++)4>e?b[c].Oa(-Math.PI/2*e):b[c].Ka(Math.PI/2*(4==e?-1:
1)),this.Ya&&(b[c].yb(this.Ya.W*Math.PI/180),b[c].Ka(-this.Ya.pitch*Math.PI/180)),b[c].Gf(-this.pan.m),b[c].ae(this.u.m),b[c].Hf(this.W.m);b=this.o.Ik(b);a.oc=0<b.length;if(a.oc){a=a.hi;a.yh=b[0].Md;a.Wh=b[0].Md;a.zh=b[0].hc;a.Xh=b[0].hc;for(c=1;c<b.length;c++)a.yh=Math.min(a.yh,b[c].Md),a.Wh=Math.max(a.Wh,b[c].Md),a.zh=Math.min(a.zh,b[c].hc),a.Xh=Math.max(a.Xh,b[c].hc);a.Li=a.Wh-a.yh;a.qk=a.Xh-a.zh;a.scale=Math.max(a.Li,a.qk)}else a.hi.Li=-1,a.hi.qk=-1}};f.prototype.Uo=function(){for(var e=0;e<this.M.levels.length;e++){var a=
this.M.levels[e],b;for(b in a.Ma)a.Ma.hasOwnProperty(b)&&(a.Ma[b].visible=!1)}};f.prototype.Ln=function(){var e=0,a=this.o.C,b=Math.tan(Math.min(this.Mb(),175)*Math.PI/360),c=a.height/(2*b);c*=1+a.width/a.height*b/2;for(c*=Math.pow(2,1<this.o.devicePixelRatio?this.M.To:this.M.So);this.M.levels.length>=e+2&&!this.M.levels[e+1].Ef&&this.M.levels[e+1].width>c;)e++;return e};f.prototype.Ht=function(){if(this.o.I.Bp&&this.o.I.Xd){var e=this.Sl;e.pan=this.pan.m;e.u=this.u.m;e.fov=this.fov.m;this.Vf(e);
this.Vf(e);this.Vf(e);var a=e.pan-this.pan.m,b=e.u-this.u.m;e=e.fov-this.fov.m;if(0!=a||0!=b||0!=e){var c=.2+.9*Math.min((Math.abs(a)+Math.abs(b)+Math.abs(e))/Math.abs(Math.min(this.fov.m,90))*.3,1);this.pan.m+=a*c;this.u.m+=b*c;this.fov.m+=e*c;this.o.ka.dm=.3;this.update()}else this.o.ka.dm=0}else this.df();if(isNaN(this.pan.m)||1E7<this.pan.m||-1E7>this.pan.m)this.pan.m=0;if(isNaN(this.u.m)||1E7<this.u.m||-1E7>this.u.m)this.u.m=0;if(isNaN(this.W.m)||1E7<this.W.m||-1E7>this.W.m)this.W.m=0;if(!this.ac()){for(;360<
this.pan.m;)this.pan.m-=360;for(;-360>this.pan.m;)this.pan.m+=360}};return f}();x.Fq=t})(ggP2VR||(ggP2VR={}));var S=!1;
(function(x){var w=function(){return function(){this.fov=this.u=this.pan=0}}(),t=function(){return function(){this.vn=-1E7;this.Bo=!1}}(),f=function(){function e(a,b){this.$s="TGljZW5zZTogRGF2aWQgRyBNZWhhcw==";this.N=new x.Fq(this);this.pan=this.N.pan;this.u=this.N.u;this.W=this.N.W;this.nc=this.N.nc;this.fov=this.N.fov;this.Jd=0;this.Ya=this.N.Ya;this.C={width:10,height:10};this.Qk=new x.Ua;this.crossOrigin="anonymous";this.Vd=this.Nf=0;this.fd=1;this.vq={};this.Gg=this.Fd=!1;this.Ra={};this.ki=this.nh="";this.Tl=[];this.El=
!1;this.ia={start:{x:0,y:0},pa:{x:0,y:0},Yd:{x:0,y:0},m:{x:0,y:0},ha:{x:0,y:0}};this.T={Wc:!1,hd:!1,vj:function(){return this.hd||this.Wc},Mn:0,startTime:0,start:{x:0,y:0},pa:{x:0,y:0},Yd:{x:0,y:0},m:{x:0,y:0},ha:{x:0,y:0},ii:!1,Hg:HTMLElement=null};this.jf=this.te=!0;this.ka={enabled:!0,pa:{x:0,y:0},ha:{x:0,y:0},dm:0,fov:{active:!1,mc:0,center:{enabled:!1,x:0,y:0}}};this.nb={alpha:0,beta:0,gamma:0,orientation:0,Af:0,pi:!0,fadeIn:0};this.Gh={alpha:0,beta:0,gamma:0,orientation:0};this.B={src:[],cf:4,
width:640,height:480,Tc:!1,qg:!1,$j:!0,um:!1,se:"loop",ck:"",j:HTMLVideoElement=null,Bm:!1,texture:WebGLTexture=null,nk:WebGLBuffer=null,Di:WebGLBuffer=null,sj:WebGLBuffer=null,format:1,Fh:0,flipY:1,sb:function(){return 0},fm:function(){},loop:function(){return!1}};this.yj=0;this.control=this.rb=this.Ja=this.$=this.Fc=this.bb=this.ea=null;this.wd=[];this.tb=!1;this.ph=1;this.ua=null;this.le=this.We=this.qf=!1;this.bh=0;this.Pd=.02;this.xk=0;this.yk=!1;this.wk=this.Qi=this.dh=this.Qf=this.fn=0;this.dn=
-1;this.wc="";this.bm=this.Oe=!1;this.gi=0;this.lh=[];this.Ok="";this.mh=[];this.Lg=this.Te=1;this.yg=!1;this.v={enabled:!1,timeout:5,active:!1,Fg:!1,speed:.4,gk:0,Ao:!1,Ij:0,bp:!0,vg:"",ap:!1,Tg:!1,sd:!1,Ri:"",tn:!1,Qd:"Animation01",Rf:!1,Fj:!1,xm:!1,startTime:0,ld:0,xh:!1,$i:!1,Bj:0,Gd:0,Sh:0,Th:0,Rh:0,Po:0};this.F={active:!1,aborted:!1,speed:.1,pan:0,u:0,W:0,fov:70,Ci:70,Sh:0,Th:0,Qo:0,Rh:0,pb:0,li:0,Gl:0,Lm:!1,ai:!1,cn:0,bn:0,rj:!1};this.Om=null;this.xf={pan:-1,u:-1,fov:-1};this.Fl=0;this.Mi=
this.ga=null;this.Ug={};this.Vg={};this.Mf={};this.ob={};this.Ha={};this.qe=[];this.en={};this.rc={};this.Vc={};this.tg={};this.K={mode:1,Ph:-1,Da:0,jb:0,ud:.05,Xb:255,Wb:1,Vb:255,Ub:.3,Be:!0,ek:{enabled:!0,width:180,height:20,fk:0,dk:1,background:!0,Vb:16777215,Ub:1,Xb:0,Wb:1,Ak:3,Ti:1,rk:!0},Qb:[],Ac:[],rd:[],Yj:[]};this.Fa=null;this.J=[];this.Sp=!1;this.X=[];this.U=[];this.Xa=[];this.Tb=[];this.Ve=[];this.$a=[];this.ya=[];this.Jf=[];this.Ce=this.qd=!1;this.xi=-1;this.ba=1;this.sa=this.Le=this.Yb=
this.lc=null;this.uh={};this.Rb={};this.bq=this.Ig="";this.aq=-1;this.Bt={target:0,current:0,ud:.01,delay:2,Vk:0,aj:!1,Xq:!1};this.margin={left:0,top:0,right:0,bottom:0};this.I={Vh:!1,bt:!1,qc:!1,Ge:!1,Xd:!0,Eo:!1,tm:1,Bp:!1,Of:!0,Sk:!0,jh:!0,kh:!0,Yi:!1,ng:!1,Cp:!0,sensitivity:8};this.Yh=[];this.qh=!0;this.ca={x:0,y:0};this.Ki=this.Qg=this.Pg=this.je=this.na=!1;this.mk=this.kv=!0;this.ul=!1;this.ue=!0;this.Rg=this.rl=this.tl=!1;this.qq=!0;this.wl=!1;this.kb=this.ne="";this.$b="transition";this.Bd=
"transform";this.Zf="perspective";this.tr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYBgeACDAAADIAAE3iTbkAAAAAElFTkSuQmCC";this.Ab={width:0,height:0};this.Rn=new x.Ua;this.Qn=new x.Ua;this.Sn=new x.Ua;this.Tn=new x.Ua;this.Pn=new x.Ua;this.uf=!1;this.ec=this.Oo=this.xa="";this.pk=[];this.Nl=[];this.Mh=this.Fo=this.Kh=this.Go=this.Bl=this.kd=this.Jo=this.zl=this.em=this.Sc=this.wj=this.og=this.Al=this.Ho=this.Cl=
this.Lo=this.pl=!1;this.Ji=!0;this.Sj=this.uj=!1;this.Ih=[];this.devicePixelRatio=1;this.fa=this.D=null;this.gh=!1;this.Za=null;this.Ea={enabled:!1,speed:1,running:!1,finished:!0,Ad:{pan:0,u:0,fov:0,pb:0,pq:!1}};this.Ml=!1;this.Dj="<<LOG>>";this.Km=!1;this.ih=function(m,h){if(0==m.length)return m;var n;var p=[];var r=h.Pj(m[0])-0;for(n=0;n<m.length;n++){var v=n;var y=n+1;y==m.length&&(y=0);var z=h.Pj(m[y])-0;if(0<=r&&0<=z)p.push(m[v]);else if(0<=r||0<=z){var C=z/(z-r);0>C&&(C=0);1<C&&(C=1);var F=
new x.Ua;F.Wd(m[v],m[y],C);0>r||p.push(m[v]);p.push(F)}r=z}return p};this.Sl=new w;this.sm=0;this.ni="";this.xc=!1;this.Aj=-1;this.bs=function(m){return m?this.Lh()&&(m.clientX||m.clientY)?{x:m.clientX,y:m.clientY}:m.pageX||m.pageY?{x:m.pageX,y:m.pageY}:m.clientX||m.clientY?{x:m.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,y:m.clientY+document.body.scrollTop+document.documentElement.scrollTop}:m.touches&&m.touches[0]?{x:m.touches[0].pageX,y:m.touches[0].pageY}:{x:0,y:0}:{x:0,
y:0}};this.ve=function(m){m=this.bs(m);var h=this.Dh();return{x:m.x-h.x,y:m.y-h.y}};this.Hj=1;this.gj=this.Mo=this.Wk=this.Yl=this.Qj=0;this.No=!1;this.Td=!0;this.un=[5,0,0];this.lb=new x.Ni(this);this.lb.Be=!1;this.En();if(7<this.Dj.length){var c=e.oh("bG9n");window[e.oh("Y29uc29sZQ==")][c](e.Cn(this.Dj))}this.Pe(this.lb);this.checkLoaded=this.wd;this.isLoaded=!1;b&&b.hasOwnProperty("webGLFlags")&&b.webGLFlags&&(this.vq=b.webGLFlags);this.ma(!1);this.Qa=new x.Bq(this);this.yn(a);this.Wq();this.userdata=
this.Ug=this.dg();this.emptyHotspot=this.lb;this.mouse=this.ca;this.D=new x.Cq(this);this.Za=new x.Dq(this);this.sa=new x.Kq(this);this.N.sa=this.sa;this.Ga=new x.Lq(this);this.fc()}e.prototype.uo=function(a){return-99991===a?this.$s:"7.0.1/19894"};e.prototype.Dr=function(){return this.fd};e.prototype.$t=function(a){0<a&&(this.fd=a)};e.prototype.Pi=function(a){if(""!=a)try{var b=void 0;b="object"===typeof a?a:JSON.parse(a);if("object"===typeof b)for(var c in b)if("translations"==c&&this.Ra.hasOwnProperty("translations")){var m=
b[c],h;for(h in m)if(this.Ra.translations.hasOwnProperty(h))for(a=0;a<m[h].length-1;a++)""!=m[h][a]&&(this.Ra.translations[h][a]=m[h][a]);else this.Ra.translations[h]=m[h]}else this.Ra[c]=b[c];this.Ra.hasOwnProperty("projectLanguage")&&(this.ki=this.Ra.projectLanguage);this.H("languagechanged",{language:this.nh})}catch(n){console.error(n)}};e.prototype.Va=function(a,b){var c=a;if(""!=c&&"object"===typeof this.Ra&&this.Ra.hasOwnProperty("languages")&&this.Ra.hasOwnProperty("translations")){var m=this.Ra.languages.indexOf(this.nh);
-1!=m&&this.Ra.translations.hasOwnProperty(a)&&(a=this.Ra.translations[a],Array.isArray(a)&&a.length>m&&""!=a[m]&&(c=a[m]))}if(b&&0<b.length)for(m=b.length-1;0<=m;m--)c=c.replace(new RegExp("%"+String(m+1),"g"),b[m]);return c};e.prototype.lm=function(a){this.El=!0;a=a.replace("_","-");if("object"===typeof this.Ra&&this.Ra.hasOwnProperty("languages")&&this.Ra.hasOwnProperty("translations")&&this.ki!=a){for(var b=-1,c=-1,m="",h=-1,n=-1,p=a.substring(0,2).toUpperCase(),r=0;r<this.Ra.languages.length;r++)if(this.Ra.languages[r].toUpperCase()==
a.toUpperCase()){b=r;break}else if(!this.ki.toUpperCase().startsWith(p)&&this.Ra.languages[r].toUpperCase().startsWith(p)){if(""==m||-1!=m.indexOf("-"))c=r,m=this.Ra.languages[r]}else for(var v=window.navigator.languages,y=0;y<v.length;y++)!this.ki.toUpperCase().startsWith(p)&&this.Ra.languages[r].toUpperCase().startsWith(v[y].substring(0,2).toUpperCase())&&(-1==n||y<n)&&(h=r,n=y);a=-1!=b?b:-1!=c?c:h;a=-1!=a?this.Ra.languages[a]:this.ki}this.nh!=a&&(this.nh=a,this.br(),this.cr(),this.$.setAttribute("lang",
a),this.H("languagechanged",{language:a}))};e.prototype.Sr=function(){return this.nh};e.prototype.qs=function(){return this.Tl};e.prototype.Nk=function(){this.D.enabled=this.fa.enabled;this.D.type=this.fa.type;this.D.da=this.fa.zoomin;this.D.dd=this.fa.zoomout;this.D.eh=this.fa.blendtime;this.D.Yg=this.fa.zoomoutpause;this.D.uk=this.fa.zoomfov;this.D.sk=this.fa.zoomafterinfov;this.D.tk=this.fa.zoomafteroutfov;this.D.Zg=this.fa.zoomspeed;this.D.Sf=this.fa.blendcolor;this.D.Yc=this.fa.softedge;this.fa=
null};e.prototype.uu=function(a){this.fa={};this.fa.enabled=!0;this.fa.type=this.D.type;this.fa.zoomin=this.D.da;this.fa.zoomout=this.D.dd;this.fa.blendtime=this.D.eh;this.fa.zoomoutpause=this.D.Yg;this.fa.zoomfov=this.D.uk;this.fa.zoomafterinfov=this.D.sk;this.fa.zoomafteroutfov=this.D.tk;this.fa.zoomspeed=this.D.Zg;this.fa.blendcolor=this.D.Sf;this.fa.softedge=this.D.Yc;if(a.hasOwnProperty("type")){var b=a.type;if("cut"==b||"crossdissolve"==b||"diptocolor"==b||"irisround"==b||"irisroundcenter"==
b||"irisrectangular"==b||"irisrectangularcenter"==b||"wipeleftright"==b||"wiperightleft"==b||"wipetopbottom"==b||"wipebottomtop"==b||"wiperandom"==b)this.fa.type=b}a.hasOwnProperty("before")&&(b=Number(a.before),0==b||2==b)&&(this.fa.zoomin=b);a.hasOwnProperty("after")&&(b=Number(a.after),0==b||2==b||3==b||4==b)&&(this.fa.zoomout=b);a.hasOwnProperty("transitiontime")&&(b=Number(a.transitiontime),0<=b&&50>=b&&(this.fa.blendtime=b));a.hasOwnProperty("waitfortransition")&&(this.fa.zoomoutpause=1==a.waitfortransition);
a.hasOwnProperty("zoomedfov")&&(b=Number(a.zoomedfov),.01<=b&&50>=b&&(this.fa.zoomfov=b));a.hasOwnProperty("zoomafterinfov")&&(b=Number(a.zoomafterinfov),70<=b&&120>=b&&(this.fa.zoomafterinfov=b));a.hasOwnProperty("zoomafteroutoutfov")&&(b=Number(a.zoomafteroutfov),.01<=b&&70>=b&&(this.fa.zoomafteroutfov=b));a.hasOwnProperty("zoomspeed")&&(b=Number(a.zoomspeed),.01<=b&&99>=b&&(this.fa.zoomspeed=b));a.hasOwnProperty("dipcolor")&&(this.fa.blendcolor=a.dipcolor);a.hasOwnProperty("softedge")&&(a=Number(a.softedge),
0<=a&&1E3>=a&&(this.fa.softedge=a));this.gh||this.Nk()};e.prototype.qb=function(a,b,c){this.N.qb(a,b,c)};e.prototype.Z=function(){return this.N.Z()};e.prototype.Ch=function(){return this.N.Ch()};e.prototype.Hc=function(){return this.N.Hc()};e.prototype.mj=function(){return this.N.mj()};e.prototype.Fk=function(a,b){if(0!=a&&4!=a&&12!=a&&9!=a)this.Uc("Unsupported projection type: "+a);else if(this.na||0==a||4==a||this.Uc("Projection changes require WebGL!"),this.Z()!=a){var c={};c.pan=this.pan.m;c.tilt=
this.u.m;c.fov=this.fov.m;c.projection=a;c.timingFunction=3;c.speed=b;a=this.Ah(a);c.fov=Math.min(a,c.fov);this.Gj(c)}};e.prototype.addListener=function(a,b){(this.uh[a]=this.uh[a]||[]).push(b)};e.prototype.H=function(a,b){if(a=this.uh[a])for(var c=a.length,m=0;m<c;m++)try{a[m].apply(null,[b])}catch(h){this.Uc(h)}};e.prototype.removeEventListener=function(a,b){var c=this.uh[a];if(c){var m;var h=0;for(m=c.length;h<m;h++)if(c[h]===b){1===m?delete this.uh[a]:c.splice(h,1);break}}};e.prototype.St=function(){this.tb=
!0};e.prototype.Fs=function(){return this.R};e.prototype.Rq=function(a,b,c,m){if(!this.Rb.hasOwnProperty(a)){var h=new t;this.Rb[a]=h;h.type=b;"undefined"!==typeof c&&this.Qe(a,c);"object"===typeof m&&this.Np(a,m);return!0}return!1};e.$n=function(a){var b=document.cookie.indexOf(a+"="),c="";-1!=b&&(b=b+a.length+1,a=document.cookie.indexOf(";",b),-1==a&&(a=document.cookie.length),c=decodeURIComponent(document.cookie.substring(b,a)));return c};e.xu=function(a,b){0==a.type?a.value="string"===typeof b?
b:b.toString():1==a.type?a.value="string"===typeof b?parseFloat(b):"number"===typeof b?b:b?1:0:2==a.type&&(a.value="string"===typeof b?"false"!==b&&""!==b&&"0"!==b:"number"===typeof b?0!=b:!!b)};e.prototype.Np=function(a,b){if(this.Rb.hasOwnProperty(a)&&"object"===typeof b){var c=this.Rb[a];b.hasOwnProperty("cookiePath")&&(c.wn=String(b.cookiePath));b.hasOwnProperty("cookieExpireDays")&&(c.vn=parseFloat(b.cookieExpireDays));if(b.hasOwnProperty("keep")&&(c.Dl=!!b.keep,c.Dl&&0<document.cookie.length))if(""!=
this.Ig){if(-1!=document.cookie.indexOf(this.Ig+"=")){var m=JSON.parse(x.ic.$n(this.Ig));m.hasOwnProperty(a)&&this.Qe(a,m[a])}}else m="ggvar_"+a,-1!=document.cookie.indexOf(m+"=")&&(m=x.ic.$n(m),this.Qe(a,m));b.hasOwnProperty("ignoreInState")&&(c.Bo=b.ignoreInState);b.hasOwnProperty("customProperty")&&"object"===typeof b.customProperty&&(b=b.customProperty,this.Ha.hasOwnProperty(a)?(this.Ha[a].variabletype!=b.variableType||this.Ha[a].propertytype!=b.propertyType)&&console.log("Custom property added as variable has different types than custom property from project."):
this.Ha[a]={Nd:b.variableType,mi:b.propertyType,Uk:b.defaultValue});return!0}return!1};e.prototype.tu=function(a,b){this.Ig=a;b&&"object"===typeof b&&(b.hasOwnProperty("cookiePath")&&(this.bq=String(b.cookiePath)),b.hasOwnProperty("cookieExpireDays")&&(this.aq=parseFloat(b.cookieExpireDays)))};e.gn=function(a,b,c){-1<=b&&(a+="; max-age="+86400*b);""!=c&&(a+="; path="+c);return a};e.ao=function(a,b){switch(b){case 0:return a;case 1:return a.toString();case 2:return a?"true":"false"}};e.cl=function(a,
b){switch(b){case 0:return a;case 1:return Number(a);case 2:return"true"==a}};e.prototype.Qe=function(a,b,c){void 0===c&&(c=!0);if(void 0===b)return!1;var m=!1;this.Ha.hasOwnProperty(a)&&(0==this.Ha[a].mi?(this.Lp(this.xa,a,b),m=!0):1==this.Ha[a].mi&&this.S&&(this.km(this.xa,this.S.id,a,b),m=!0));if(this.Rb.hasOwnProperty(a)){var h=this.Rb[a];if(h.value!=b){x.ic.xu(h,b);if(h.Dl&&c){if(""!=this.Ig){h={};for(var n=0,p=Object.keys(this.Rb);n<p.length;n++)c=p[n],this.Rb[c].Dl&&(h[c]=encodeURIComponent(this.Rb[c].value.toString()));
c=this.Ig+"="+JSON.stringify(h);c=x.ic.gn(c,this.aq,this.bq)}else c="ggvar_"+a+"="+encodeURIComponent(b.toString()),c=x.ic.gn(c,h.vn,h.wn?h.wn:"");document.cookie=c}m||this.H("varchanged_"+a,{value:b})}return!0}return!1};e.prototype.oj=function(a,b){return 0==b?this.Va(a):a};e.prototype.nl=function(a,b){void 0===b&&(b="");if(this.Ha.hasOwnProperty(a)){if(0==this.Ha[a].mi)return this.mo(this.xa,a);if(1==this.Ha[a].mi){if(""!=b||this.S&&this.S!=this.lb)return this.fl(this.xa,""!=b?b:this.S.id,a);switch(this.Ha[a].Nd){case 0:return"";
case 1:return 0;case 2:return!1}}}if(this.Rb.hasOwnProperty(a))return this.oj(this.Rb[a].value,this.Rb[a].type)};e.oh=function(a){var b="",c=0;a=a.replace(/[^A-Za-z0-9+\/=]/g,"");do{var m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++));var h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++));var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++));var p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++));
m=m<<2|h>>4;h=(h&15)<<4|n>>2;var r=(n&3)<<6|p;b+=String.fromCharCode(m);64!=n&&(b+=String.fromCharCode(h));64!=p&&(b+=String.fromCharCode(r))}while(c<a.length);return b};e.Qu=function(a){for(var b=[1,1,1,1,2,2,3,0],c=a.length,m="",h=0;h<c;){var n=a.charCodeAt(h++);if(n&128){var p=b[n>>3&7];if(!(n&64&&p)||h+p>c)return null;for(n&=63>>p;0<p;--p){var r=a.charCodeAt(h++);if(128!=(r&192))return null;n=n<<6|r&63}}m+=String.fromCharCode(n)}return m};e.Cn=function(a){return e.Qu(e.oh(a))};e.prototype.En=
function(){this.devicePixelRatio=window.devicePixelRatio||1;this.Lo=!!navigator.userAgent.match(/(Windows|Win)/g);this.Cl=!!navigator.userAgent.match(/(Mac|Macintosh|Mac_powerpc)/g)&&!navigator.userAgent.match(/(like Mac)/g);this.Ho=!!navigator.userAgent.match(/(Linux|Ubuntu)/g);this.Al=!!navigator.userAgent.match(/(MSIE)/g);this.og=!!navigator.userAgent.match(/(Edge|EdgA|Edg)/g);this.wj=!!navigator.userAgent.match(/(Firefox)/g);if(this.Sc=!!navigator.userAgent.match(/(Safari)/g)){var a=navigator.userAgent.indexOf("Safari");
this.Xc=navigator.userAgent.substring(a+7);a=navigator.userAgent.indexOf("Version");-1!=a&&(this.Xc=navigator.userAgent.substring(a+8));this.Xc=this.Xc.substring(0,this.Xc.indexOf(" "));this.Xc=this.Xc.substring(0,this.Xc.indexOf("."));this.em=!0}this.Jo=!!navigator.userAgent.match(/(SamsungBrowser)/g);if(this.zl=!!navigator.userAgent.match(/(Chrome|CriOS)/g))this.Sc=!1;this.kd=!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g);this.Bl=!!navigator.userAgent.match(/(iPad)/g)||this.Cl&&2<navigator.maxTouchPoints;
this.Go=!!navigator.userAgent.match(/(iPhone|iPod)/g);this.Kh=!!navigator.userAgent.match(/(android)/i);this.Fo=!!navigator.userAgent.match(/(IEMobile)/i);this.Mh=this.kd||this.Kh||this.Fo||this.Bl;/iP(hone|od|ad)/.test(navigator.platform)&&(a=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),this.Ih=[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3]||"0",10)]);this.uj=!window.requestAnimationFrame;a=["Webkit","Moz","O","ms","Ms"];this.kb="";this.$b="transition";this.Bd="transform";this.Zf="perspective";
for(var b=0;b<a.length;b++)"undefined"!==typeof document.documentElement.style[a[b]+"Transform"]&&(this.kb="-"+a[b].toLowerCase()+"-",this.$b=a[b]+"Transition",this.Bd=a[b]+"Transform",this.Zf=a[b]+"Perspective");this.ul=ma();this.na=na();this.Pg=this.ul;this.na&&(this.Pg=!1);this.Oe=!0;this.bm=!1;if(this.kd||this.Kh)this.Jp(80),this.N.Cm=2;this.Uc("Pano2VR player "+this.uo()+" - Prefix:"+this.kb+", "+(this.ul?"CSS 3D available":"CSS 3D not available")+", "+(this.na?"WebGL available":"WebGL not available"));
S&&this.O("Pano2VR Debug version!");try{window.AudioContext=window.AudioContext||window.webkitAudioContext,this.ra=new AudioContext}catch(c){this.ra=null}this.Sc&&(!this.em||9>Number(this.Xc))&&(this.ra=null);this.Sc&&!this.kd&&12<=Number(this.Xc)&&13>Number(this.Xc)&&(this.ra=null);this.Sc&&this.kd&&13==Number(this.Ih[0])&&(1==Number(this.Ih[1])||2<=Number(this.Ih[1]))&&(this.ra=null);this.Ji=this.Go?this.Sc&&this.em&&10<=Number(this.Xc)?!0:!1:!0};e.prototype.O=function(a){if(S){var b=document.getElementById("gg_debug");
b&&(b.innerHTML=a.toString()+"<br />");window.console&&window.console.log(a)}};e.prototype.Sm=function(a){if(S){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a.toString()+"<br />");window.console&&window.console.warn(a)}};e.prototype.Uc=function(a){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a+"<br />");window.console&&window.console.log(a)};e.prototype.Jp=function(a){this.N.ug=a};e.prototype.setCrossOrigin=function(a){this.crossOrigin=a};e.prototype.du=function(a){this.De=
a};e.prototype.ls=function(){return this.gi};e.prototype.bu=function(a){this.ne=a};e.prototype.Zn=function(){return this.ne};e.prototype.il=function(){return this.Mh};e.prototype.co=function(){return this.wl};e.prototype.Rr=function(){return this.uf};e.prototype.hs=function(){return this.uf?this.lo().length:1};e.prototype.Or=function(){return this.v.active};e.prototype.fu=function(a){this.Mh=!!a};e.prototype.jj=function(){return this.isLoaded};e.prototype.Qr=function(){return!this.isLoaded};e.prototype.lf=
function(){return Number(this.C.height)/(2*Math.tan(Math.PI/180*(this.Mb()/2)))};e.prototype.Op=function(a,b){try{this.isFullscreen&&(a=window.innerWidth,b=window.innerHeight);var c=a-this.margin.left-this.margin.right,m=b-this.margin.top-this.margin.bottom;if(!(10>c||10>m)){var h=window.devicePixelRatio||1;this.yg&&(h=1);this.ea.style.width=c+"px";this.ea.style.height=m+"px";this.ea.style.left=this.margin.left+"px";this.ea.style.top=this.margin.top+"px";if(this.na)try{this.bb&&(this.bb.style.position=
"absolute",this.bb.style.display="inline",this.bb.style.width=c+"px",this.bb.style.height=m+"px",this.bb.width=c*h,this.bb.height=m*h),this.R&&(this.Ab.width=c*h,this.Ab.height=m*h,this.R.viewport(0,0,this.R.drawingBufferWidth,this.R.drawingBufferHeight))}catch(v){alert(v)}this.Fc&&(this.Fc.style.width=a+"px",this.Fc.style.height=b+"px",this.Fc.width=a,this.Fc.height=b);this.Ja&&(this.Ja.style.width=a+"px",this.Ja.style.height=b+"px",this.rb.style.width=a+"px",this.rb.style.height=b+"px",this.rb.width=
a,this.rb.height=b,this.rb.style.left=this.margin.left+"px",this.rb.style.top=this.margin.top+"px",this.ua&&this.ua!=this.Ja&&(this.ua.style.width=a+"px",this.ua.style.height=b+"px"));if(this.Qa){var n=this.Qa.vd;n.style.width=a+"px";n.style.height=b+"px";n.width=a;n.height=b;n.style.left=this.margin.left+"px";n.style.top=this.margin.top+"px"}this.qf&&(this.tb=!0);var p=this.ea.offsetWidth,r=this.ea.offsetHeight;if(this.C.width!=p||this.C.height!=r)this.C.width=p,this.C.height=r;this.jv();this.ua&&
this.ua.ggUpdateSize&&this.ua.ggUpdateSize(a,b);this.H("sizechanged",{w:a,h:b});this.H("playerstatechanged",{})}}catch(v){this.Sm(v)}};e.prototype.ie=function(){this.Km=!0};e.prototype.fc=function(){this.Op(this.lc.offsetWidth,this.lc.offsetHeight)};e.prototype.Es=function(){var a={width:0,height:0};a.width=this.C.width;a.height=this.C.height;return a};e.prototype.Dh=function(){var a={x:0,y:0},b=this.ea.getBoundingClientRect();a.x=b.left;a.y=b.top;this.Sc&&14>Number(this.Xc)&&(a.x=b.left+window.scrollX,
a.y=b.top+window.scrollY);return a};e.prototype.su=function(a){this.ga=a};e.prototype.gu=function(a,b,c,m){this.margin.left=a;this.margin.top=b;this.margin.right=c;this.margin.bottom=m;this.ga=this.skinObj;this.Mi=this.vrSkinObj;this.ie()};e.prototype.fr=function(a){0==a&&(this.I.Xd=!1);1==a&&(this.I.Xd=!0);2==a&&(this.I.Xd=!this.I.Xd);this.H("viewmodechanged",{});this.H("playerstatechanged",{})};e.prototype.Cs=function(){return 1==this.I.Xd?1:0};e.prototype.qn=function(a,b){this.K.mode=1==b&&0<this.K.mode?
0:Math.round(a);this.update();this.H("polymodechanged",{})};e.prototype.vh=function(a){var b=[];a="#"==a.substr(0,1)?a.substr(1):"^"+a+"$";a=new RegExp(a,"");for(var c=0;c<this.J.length;c++)"poly"==this.J[c].type&&a.test(this.J[c].id)&&b.push(this.J[c]);return b};e.prototype.Qp=function(a){a=this.vh(a);for(var b=0;b<a.length;b++){var c=this.K.Qb.indexOf(a[b].id);-1==c?(this.K.Qb.push(a[b].id),this.K.Ac.push(0),this.K.rd.push(1)):this.K.rd[c]=1}this.update()};e.prototype.yo=function(a){a=this.vh(a);
for(var b=0;b<a.length;b++){var c=this.K.Qb.indexOf(a[b].id);-1!=c&&(this.K.rd[c]=0,this.K.Yj.push(a[b].id),this.update())}};e.prototype.Vu=function(a){a=this.vh(a);for(var b=0;b<a.length;b++){var c=this.K.Qb.indexOf(a[b].id);-1==c||-1!=c&&0==this.K.rd[c]?this.Qp(a[b].id):this.yo(a[b].id);this.update()}};e.prototype.er=function(a,b,c,m,h){var n=""==a?this.J:this.vh(a);for(var p=0;p<n.length;p++){var r=n[p];"poly"==r.type&&(r.Vb=b,r.Ub=c,r.Xb=m,r.Wb=h)}""==a&&(this.K.Vb=b,this.K.Ub=c,this.K.Xb=m,this.K.Wb=
h);this.update()};e.prototype.ju=function(a,b){var c=""==a?this.J:this.vh(a);for(var m=0;m<c.length;m++){var h=c[m];"poly"==h.type&&(h.Be=b)}""==a&&(this.K.Be=b);this.update()};e.prototype.dr=function(a){this.Qa&&(this.Qa.pm=0==a?!0:1==a?!1:!this.Qa.pm,this.update())};e.prototype.os=function(){return this.K.mode};e.prototype.gr=function(){this.H("viewstatechanged",{})};e.prototype.Ds=function(){return 0};e.prototype.Yr=function(a){return"_firstmap"==a?"web":"_firstfloorplan"==a?"file":(a=this.rc[a])?
a.type:"web"};e.prototype.Xr=function(a){"_firstmap"==a?a=this.bo():"_firstfloorplan"==a&&(a=this.ij());return(a=this.rc[a])?a:{}};e.prototype.bo=function(){var a="",b;for(b in this.rc){var c=this.rc[b];"web"==c.type&&1E4>c.index&&(a=b)}return a};e.prototype.ij=function(){var a="",b;for(b in this.rc){var c=this.rc[b];"file"==c.type&&1E4>c.index&&(a=b)}return a};e.prototype.es=function(a,b){"_firstfloorplan"==b&&(b=this.ij());var c=[];a||(a=this.xa);var m=this.qe[a];m&&(a=m);""===a&&0<Object.keys(this.Vc).length&&
(a=Object.keys(this.Vc)[0]);this.Vc[a]&&this.Vc[a][b]&&(c.push(this.Vc[a][b].y),c.push(this.Vc[a][b].x));return c};e.prototype.fs=function(a,b){"_firstfloorplan"==b&&(b=this.ij());var c=[];a||(a=this.xa);var m=this.qe[a];m&&(a=m);""===a&&0<Object.keys(this.Vc).length&&(a=Object.keys(this.Vc)[0]);this.tg[a]&&this.tg[a][b]&&(c.push(this.tg[a][b].x),c.push(this.tg[a][b].y));return c};e.prototype.io=function(a){var b=this.qe[a];b&&(a=b);b=this.ho();for(var c=[],m=0;m<b.length;m++)this.Vc[a][b[m]]&&c.push(b[m]);
return c};e.prototype.Wr=function(a){a=this.io(a);return 0<a.length?a[0]:""};e.prototype.ho=function(){var a=[],b;for(b in this.rc)a.push(b);return a};e.prototype.Ir=function(){var a=[],b;for(b in this.rc)"file"==this.rc[b].type&&a.push(b);return a};e.prototype.Ps=function(){for(var a in this.rc)if("web"==this.rc[a].type)return!0;return!1};e.prototype.Os=function(){for(var a in this.rc)if("file"==this.rc[a].type)return!0;return!1};e.prototype.xp=function(a,b,c){var m=(new RegExp("%0*"+b,"i")).exec(a.toString());
if(m){m=m.toString();var h=c.toString();m.charAt(m.length-1)!=b&&(h=(1+c).toString());if(!isNaN(parseFloat(c)))for(;h.length<m.length-1;)h="0"+h;a=a.replace(m,h)}return a};e.prototype.Ts=function(a,b,c){a=Math.atan2(a+1,c);var m=Math.atan2(b+1,c);b=Math.sin(a);c=Math.sin(m);a=Math.cos(a);m=Math.cos(m);this.Rn.init(0,0,-1);this.Qn.init(a,0,-b);this.Sn.init(-a,0,-b);this.Tn.init(0,m,-c);this.Pn.init(0,-m,-c)};e.prototype.Ik=function(a){a=this.ih(a,this.Rn);a=this.ih(a,this.Qn);a=this.ih(a,this.Sn);
a=this.ih(a,this.Tn);return a=this.ih(a,this.Pn)};e.prototype.mq=function(a){if(!this.Oe&&this.Zs!=a){this.Zs=a;var b=this.margin.left+this.C.width/2+"px ";b+=this.margin.top+this.C.height/2+"px ";this.Ja.style[this.Zf]=a+"px";this.Ja.style[this.Zf+"Origin"]=b;this.ea.style[this.Zf]=a+"px";this.ea.style[this.Zf+"Origin"]=b}};e.prototype.fl=function(a,b,c){""==a&&(a="node1");return this.ob.hasOwnProperty(a)&&this.ob[a].hasOwnProperty(b)&&this.ob[a][b].hasOwnProperty(c)?this.oj(x.ic.cl(this.ob[a][b][c],
this.Ha[c].Nd),this.Ha[c].Nd):this.Ha.hasOwnProperty(c)?this.oj(x.ic.cl(this.Ha[c].Uk,this.Ha[c].Nd),this.Ha[c].Nd):null};e.prototype.km=function(a,b,c,m){""==a&&(a="node1");m="string"===typeof m?m:x.ic.ao(m,this.Ha[c].Nd);this.ob.hasOwnProperty(a)||(this.ob[a]={});this.ob[a].hasOwnProperty(b)||(this.ob[a][b]={});this.ob[a][b].hasOwnProperty(c)&&this.ob[a][b][c]==m||(this.ob[a][b][c]=m,this.H("varchanged_"+c,{}))};e.prototype.Hr=function(a){return this.Ha.hasOwnProperty(a)?this.Ha[a].Uk:null};e.prototype.eo=
function(){return this.D.he||this.D.Ld||this.na&&(4!=this.Z()||0!=this.Hc())?!1:!0};e.prototype.Gm=function(){var a=new x.Ua(0,0,-100),b=this.lf(),c=this.N.M;var m=100/this.fov.m;var h=c.width/c.height;c=this.C.height*m*h;m*=this.C.height;for(var n=this.eo(),p=0;p<this.J.length;p++){var r=this.J[p];if("point"==r.type){var v=!1;if(this.ac()){var y=(this.pan.m-r.pan)/100/h*c;var z=(this.u.m-r.u)/100*m;Math.abs(y)<this.C.width/2+500&&Math.abs(z)<this.C.height/2+500&&(v=!0)}else a.init(0,0,-100),a.Ka(-r.u*
Math.PI/180),a.Oa(r.pan*Math.PI/180),a.Oa(-this.pan.m*Math.PI/180),a.Ka(this.u.m*Math.PI/180),a.yb(this.W.m*Math.PI/180),.01>a.z?(z=-b/a.z,y=a.x*z,z*=a.y,Math.abs(y)<this.C.width/2+5E3&&Math.abs(z)<this.C.height/2+5E3&&(v=!0)):z=y=-1E4;r.dc=y+this.C.width/2;r.Pb=z+this.C.height/2;r.Ul=r.dc/this.C.width*100;r.Vl=r.Pb/this.C.height*100;r.visible=v;r.px=r.dc;r.py=r.Pb;r.pxp=r.Ul;r.pyp=r.Vl;r.visible=r.visible;if(r.j&&r.j.onUpdatePosition)r.j.onUpdatePosition(this,r);else r.j&&r.j.__div&&("none"!=r.j.__div.style[this.$b]&&
(r.j.__div.style[this.$b]="none"),v&&n?(r.j.ggUse3d?(this.Oe||this.mq(b),this.ac()?(r.j.__div.style[this.Bd]="scale("+(100/this.fov.m*500/r.j.gg3dDistance).toFixed(10)+")",r.j.__div.style.left=this.margin.left+y+this.C.width/2+"px",r.j.__div.style.top=this.margin.top+z+this.C.height/2+"px"):(r.j.__div.style.width="1px",r.j.__div.style.height="1px",y="",this.Oe&&(y+="perspective("+b+"px) "),y+="translate3d(0px,0px,"+b+"px) ",y+="rotateZ("+this.W.m.toFixed(10)+"deg) ",y+="rotateX("+this.u.m.toFixed(10)+
"deg) ",y+="rotateY("+(-this.pan.m).toFixed(10)+"deg) ",y+="rotateY("+r.pan.toFixed(10)+"deg) ",y+="rotateX("+(-r.u).toFixed(10)+"deg) ",y+="translate3d(0px,0px,"+(-1*r.j.gg3dDistance).toFixed(10)+"px) ",r.j.__div.style[this.Bd+"Origin"]="0% 0%",r.j.__div.style[this.Bd]=y,r.j.__div.style.left=this.margin.left+this.C.width/2+"px",r.j.__div.style.top=this.margin.top+this.C.height/2+"px")):this.Sp?(r.j.__div.style.left=this.margin.left+this.C.width/2+"px",r.j.__div.style.top=this.margin.top+this.C.height/
2+"px",r.j.__div.style[this.Bd]="translate3d(0px,0px,-1000px) rotateY(0.1deg) translate3d("+y+"px,"+z+"px, 0.5px)",r.j.__div.style["transform-style"]="preserve-3d"):(r.j.__div.style.left=this.margin.left+y+this.C.width/2+"px",r.j.__div.style.top=this.margin.top+z+this.C.height/2+"px"),r.j.__div.ggVisible&&(r.j.__div.style.visibility="visible")):(r.j.ggUse3d&&(r.j.__div.style[this.Bd]=""),r.j.__div.style.left="-1000px",r.j.__div.style.top="-1000px",r.j.__div.style.visibility="hidden"))}if("poly"==
r.type){var C=[];if(this.ac())for(r.Cf=[],v=0;v<r.vertices.length;v++)z=r.vertices[v],y=(this.pan.m-z.pan)/100/h*c,z=(this.u.m-z.u)/100*m,y+=this.margin.left+this.C.width/2,z+=this.margin.top+this.C.height/2,r.Cf.push({dc:y,Pb:z});else{for(v=0;v<r.vertices.length;v++)z=r.vertices[v],a.init(0,0,-100),a.Ka(-z.u*Math.PI/180),a.Oa(z.pan*Math.PI/180),a.Oa(-this.pan.m*Math.PI/180),a.Ka(this.u.m*Math.PI/180),a.yb(this.W.m*Math.PI/180),C.push(a.clone());C=this.Ik(C);if(0<C.length)for(v=0;v<C.length;v++)a=
C[v],.1>a.z?(z=-b/a.z,y=this.C.width/2+a.x*z,z=this.C.height/2+a.y*z):z=y=0,a.dc=y,a.Pb=z;r.Cf=C}}}this.H("hotspotsupdated",{})};e.prototype.Gr=function(){for(var a=[],b=0;b<this.J.length;b++){var c=this.J[b];"point"==c.type&&c.j&&c.j.__div&&a.push(c.j.__div)}return a};e.prototype.oa=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+")"};e.prototype.Dt=function(){var a;if(this.rb&&(this.K.Ph!=this.K.mode&&(this.K.Ph=this.K.mode,
this.rb.style.visibility=0<this.K.mode?"inherit":"hidden"),0<=this.K.mode||0<this.K.Qb.length)){this.Hb||(this.Hb=this.rb.getContext("2d"));if(this.Hb.width!=this.C.width||this.Hb.height!=this.C.height)this.Hb.width=this.C.width,this.Hb.height=this.C.height;this.Hb.clear?this.Hb.clear():this.Hb.clearRect(0,0,this.rb.width,this.rb.height);var b=1;0>=this.K.mode&&(b=0);3==this.K.mode&&(b=this.K.Da);for(a=0;a<this.J.length;a++){var c=this.J[a];var m=b;if("poly"==c.type){var h=c.Cf;2==this.K.mode&&(m=
c.Da);var n=this.K.Qb.indexOf(c.id);-1!=n&&(m=this.K.Ac[n]);this.Hb.fillStyle=this.oa(c.Vb,c.Ub*m);this.Hb.strokeStyle=this.oa(c.Xb,c.Wb*m);if(0<h.length){this.Hb.beginPath();for(c=0;c<h.length;c++)m=h[c],0==c?this.Hb.moveTo(m.dc,m.Pb):this.Hb.lineTo(m.dc,m.Pb);this.Hb.closePath();this.Hb.stroke();this.Hb.fill()}}}}};e.zo=function(a,b,c){var m,h=!1;var n=0;for(m=a.length-1;n<a.length;m=n++){var p=a[n];m=a[m];p.Pb>c!=m.Pb>c&&b<(m.dc-p.dc)*(c-p.Pb)/(m.Pb-p.Pb)+p.dc&&(h=!h)}return h};e.prototype.Xi=
function(a,b){var c=-1;if((0<=this.K.mode||0<this.K.Qb.length)&&this.Io())for(var m=0;m<this.J.length;m++){var h=this.J[m];"poly"==h.type&&h.Cf&&0<h.Cf.length&&(-1!=this.K.mode||-1!=this.K.Qb.indexOf(h.id))&&x.ic.zo(h.Cf,a,b)&&(c=m,h.dc=a,h.Pb=b)}return 0<=c?this.J[c]:!1};e.prototype.Io=function(){return 4==this.Z()&&0==this.Hc()};e.prototype.aspect=function(){return this.C.width/this.C.height};e.prototype.df=function(){this.N.df()};e.prototype.update=function(a){void 0===a&&(a=0);this.tb=!0;a&&(this.ph=
Math.max(1*a,this.ph))};e.prototype.fo=function(){return 0<this.N.Ei||0<this.N.ge};e.prototype.Ii=function(){var a=Date.now();if(this.ac())this.Gm(),this.na&&(this.sa.ev(),this.sa.ip());else if(0===this.Jd)if(!this.na||4==this.Z()&&0==this.Hc()){var b=this.lf();this.Ts(this.C.width/2,this.C.height/2,b);this.Gm();this.Ki?this.sa.hv():this.kv&&this.oq();this.Hm();this.na?(this.B.Tc?14==this.B.format?this.sa.gv():this.sa.wq():0<this.N.M.levels.length?this.sa.pv():this.sa.rv(),this.sa.ip()):(this.Qg&&
this.bv(),this.Dt());this.Qa&&this.Qa.Ct()}else this.sa.wq(),this.Gm(),this.Qs();b=Date.now();50<b-a?(this.O("Time between frames: "+(b-a)),this.yg||(2<this.sm?(this.yg=!0,this.O("disabling HighDPI rendering"),this.fc()):this.sm++)):this.sm=0;this.qf&&this.N.M.wp++;this.na&&(a=this.R,a.disable(a.BLEND),a.disable(a.STENCIL_TEST),a.disable(a.DEPTH_TEST),a.disable(a.CULL_FACE))};e.prototype.bv=function(){this.df();var a;this.Fc&&(a=this.Fc.getContext("2d"));if(this.C.width!==this.ea.offsetWidth||this.C.height!==
this.ea.offsetHeight)this.C.width=this.ea.offsetWidth,this.C.height=this.ea.offsetHeight;if(a){var b=a.canvas.width/2,c=a.canvas.height/2,m=a.createRadialGradient(b,c,5,b,c,Math.max(b,c));m.addColorStop(0,"#333");m.addColorStop(1,"#fff");a.rect(0,0,a.canvas.width,a.canvas.height);a.fillStyle=m;a.fill();a.fillStyle="#f00";a.font="20px Helvetica";a.textAlign="center";a.fillText("Pan: "+this.pan.m.toFixed(1),b,c-60);a.fillText("Tilt: "+this.u.m.toFixed(1),b,c-30);a.fillText("Fov: "+this.fov.m.toFixed(1),
b,c+0);a.fillText("Node: "+this.hj(),b,c+30);a.fillText("Title: "+this.Ug.title,b,c+60)}};e.prototype.lu=function(a){a=Math.round(a);this.Oe=0<(a&1);this.bm=0<(a&2);this.mk=0<(a&4);this.yg=0<(a&8);4096<=a&&(this.Pg=0<(a&4096),this.na=0<(a&8192),this.Qg=0<(a&32768))};e.prototype.rs=function(){var a=0;this.Oe&&(a|=1);this.bm&&(a|=2);this.mk&&(a|=4);this.Pg&&(a|=4096);this.na&&(a|=8192);this.Qg&&(a|=32768);return a};e.prototype.Hm=function(){var a=Math.round(this.lf());this.Oe||this.mq(a);for(var b=
0;b<this.Xa.length;b++){var c=this.Xa[b];c.Im(a);c.j.hidden=!1}for(b=0;b<this.Tb.length;b++)c=this.Tb[b],c.Im(a),c.j.hidden=!1};e.prototype.oq=function(){for(var a=Math.round(this.lf()),b=0;b<this.U.length;b++){var c=this.U[b];c.od||(c.Im(a),c.j.hidden=!1)}};e.prototype.Qs=function(){for(var a=0;a<this.Xa.length;a++){var b=this.Xa[a];b.If(!1)}for(a=0;a<this.U.length;a++)b=this.U[a],b.od||b.If(!1);for(a=0;a<this.Tb.length;a++)b=this.Tb[a],b.If(!1)};e.prototype.jv=function(){try{for(var a=0;a<this.pj();a++){var b=
this.ol(a);b.od||b.ie()}}catch(c){this.Sm(c)}};e.prototype.Rc=function(a){this.ue=!1;try{this.bb=a?a:document.createElement("canvas");var b=this.lc.offsetWidth-this.margin.left-this.margin.right,c=this.lc.offsetHeight-this.margin.top-this.margin.bottom;if(100>b||100>c)c=b=100;var m=window.devicePixelRatio||1;this.yg&&(m=1);this.ea.style.width=b+"px";this.ea.style.height=c+"px";this.bb.style.width=b+"px";this.bb.style.height=c+"px";this.bb.width=b*m;this.bb.height=c*m;this.bb.style.display="none";
this.bb.style.touchAction="none";this.ea.insertBefore(this.bb,this.ea.firstChild);var h=this.vq;h.stencil=!0;h.depth=!0;h.powerPreference="high-performance";h.alpha=this.Sc?!0:!1;this.kd&&10<=this.Ih[0]&&(h.antialias=!1,h.alpha=!1);a={};a.flags=h;a.canvas=this.bb;this.H("beforewebglcontext",a);this.R=this.bb.getContext("webgl",h);this.R||(this.R=this.bb.getContext("experimental-webgl",h));if(this.R){var n=this.R;this.Ab.width=b*m;this.Ab.height=c*m;n.clearColor(0,0,0,0);n.enable(this.R.DEPTH_TEST);
n.viewport(0,0,500,500);n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT);4096<=n.getParameter(n.MAX_TEXTURE_SIZE)&&!this.Mh&&(this.N.ug=1<m?4*this.N.ug:2*this.N.ug);this.O("Max tile cnt: "+this.N.ug);this.sa.Jh();this.sa.tj();this.sa.Co(this.Lg);this.sa.Do();this.D&&(this.D.Jh(),this.D.Rc());this.Qa&&(this.Qa.Jh(),this.Qa.Rc())}}catch(p){this.O(p)}this.R?(this.na=!0,this.H("webglready",{gl:this.R})):alert("Could not initialise WebGL!")};e.prototype.ku=function(a){this.ni=a};e.prototype.getQueryParameter=
function(){return this.ni};e.prototype.fb=function(a){if(a){if("{"==a.charAt(0)||"/"==a.charAt(0)||0<a.indexOf("://")||0==a.indexOf("javascript:"))return a;""!=this.ni&&(a=-1==a.indexOf("?")?a+("?"+this.ni):a+("&"+this.ni));return this.ne+a}return this.ne};e.prototype.nf=function(){return this.pan.m};e.prototype.ks=function(){return this.F.pan};e.prototype.kl=function(){for(var a=this.pan.m;-180>a;)a+=360;for(;180<a;)a-=360;return a};e.prototype.we=function(){for(var a=this.pan.m-this.pan.ci;-180>
a;)a+=360;for(;180<a;)a-=360;return a};e.prototype.ac=function(){return this.N.ac()};e.prototype.be=function(a){this.ma(!1);isNaN(a)||(this.pan.m=Number(a));this.update()};e.prototype.Xj=function(a){this.ma(!1);isNaN(a)||(this.pan.m=Number(a)+this.pan.ci);this.update()};e.prototype.Vi=function(a,b){isNaN(a)||(this.be(this.nf()+a),b&&(this.pan.d=a))};e.prototype.pn=function(a,b){this.Vi(a*this.kf(),b)};e.prototype.jg=function(){return this.u.m};e.prototype.vs=function(){return this.F.u};e.prototype.ce=
function(a){this.ma(!1);isNaN(a)||(this.u.m=Number(a));this.update()};e.prototype.Wi=function(a,b){this.ce(this.jg()+a);b&&(this.u.d=a)};e.prototype.rn=function(a,b){this.Wi(a*this.kf(),b)};e.prototype.Bg=function(a){this.N.Bg(a)};e.prototype.nj=function(){return this.N.nj()};e.prototype.Dd=function(){return this.N.Dd()};e.prototype.Mb=function(){return this.N.Mb()};e.prototype.el=function(a,b){return this.N.el(a,b)};e.prototype.dl=function(a,b){return this.N.dl(a,b)};e.prototype.Jr=function(){return this.F.Ci};
e.prototype.zb=function(a){return this.N.zb(a)};e.prototype.im=function(a){this.N.im(a)};e.prototype.vi=function(a){this.N.vi(a)};e.prototype.jm=function(a){this.N.jm(a)};e.prototype.gm=function(a){this.N.gm(a)};e.prototype.hm=function(a,b){if(120<this.Dd())this.zb(a);else{var c=this.lj(b.x,b.y,!0);if(this.zb(a)){b=this.lj(b.x,b.y,!0);a=c.pan-b.pan;b=c.tilt-b.tilt;if(15<Math.abs(a)||10<Math.abs(b))b=a=0;a=this.ac()?-a:a*Math.cos(c.tilt*Math.PI/180);this.pan.Zb-=a;this.u.Zb+=b;this.nm(this.pan.m-a,
this.u.m+b)}}};e.prototype.Ek=function(a,b){return this.zb(this.Dd()+a)?(b&&(this.fov.d=a),!0):!1};e.prototype.ar=function(a,b){this.hm(this.Dd()+a,b)};e.prototype.Ui=function(a,b){if(!isNaN(a)){var c=a/90*Math.cos(Math.min(this.fov.m,90)*Math.PI/360);c=this.fov.m*Math.exp(c);this.zb(c);b&&(this.fov.d=a)}};e.prototype.nn=function(a,b,c){if(!isNaN(a)){var m=a/90*Math.cos(Math.min(this.fov.m,90)*Math.PI/360);m=this.fov.m*Math.exp(m);this.hm(m,b);c&&(this.fov.d=a,this.fov.Nc.enabled=!0,this.fov.Nc.x=
b.x,this.fov.Nc.y=b.y)}};e.prototype.nm=function(a,b){this.ma(!1);isNaN(a)||(this.pan.m=a);isNaN(b)||(this.u.m=b);this.update()};e.prototype.Mp=function(a,b,c){this.ma(!1);!isNaN(a)&&1E7>a&&-1E7<a&&(this.pan.m=a);!isNaN(b)&&1E7>b&&-1E7<b&&(this.u.m=b);!isNaN(c)&&1E7>c&&-1E7<c&&(this.W.m=c);this.update()};e.prototype.Ag=function(a,b,c){this.ma(!1);isNaN(a)||(this.pan.m=a);isNaN(b)||(this.u.m=b);isNaN(c)||this.zb(c);this.update()};e.prototype.Dp=function(){this.Ag(this.pan.Ia,this.u.Ia,this.fov.Ia)};
e.prototype.setLocked=function(a){this.Hp(a);this.Ip(a);this.Gp(a)};e.prototype.Hp=function(a){this.I.qc=!!a};e.prototype.Gp=function(a){this.I.Vh=!!a};e.prototype.Vr=function(){return this.I.Vh};e.prototype.Ip=function(a){this.I.Ge=!!a};e.prototype.Nr=function(){return this.ka.enabled};e.prototype.eu=function(a){var b=this.ka;a&&(b.ha.x=0,b.ha.y=0);b.enabled=!!a};e.prototype.Gs=function(){return this.I.Of};e.prototype.Au=function(a){this.I.Of=a};e.prototype.Vj=function(a){this.xc=!!a};e.prototype.Kr=
function(){return this.vl()?!0:this.rl};e.prototype.vu=function(a,b){void 0===b&&(b=!0);this.qq=b;this.Rg==!a&&(a&&this.vl()?this.yp():((this.Rg=!!a)?this.nb.pi=!0:this.W.m=0,this.H("gyrochanged",{}),this.H("playerstatechanged",{})))};e.prototype.vl=function(){return window.hasOwnProperty("DeviceOrientationEvent")&&DeviceOrientationEvent.hasOwnProperty("requestPermission")&&"function"===typeof DeviceOrientationEvent.requestPermission?!0:!1};e.prototype.yp=function(){var a=this;if(this.vl())try{DeviceOrientationEvent.requestPermission().then(function(b){"granted"===
b&&(a.nb.pi=!0,a.Rg=!0,a.H("gyrochanged",{}),a.H("playerstatechanged",{}))})["catch"](console.error)}catch(b){console.log(b)}};e.prototype.ws=function(){return this.Rg};e.prototype.js=function(){return this.Kh?5:this.Bl?6:this.kd?4:this.Lo?1:this.Cl?2:this.Ho?3:0};e.prototype.Er=function(){return this.Al?5:this.og?4:this.wj?2:this.Sc?3:this.zl?1:0};e.prototype.Fr=function(){return window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?1:0};e.prototype.moveTo=function(a,b,c,m,
h,n){this.ma(!1);if("_blank"!==a&&""!==a){this.F.active=!0;this.F.aborted=!1;this.F.Lm=!1;var p=a.toString().split("/");1<p.length&&(a=Number(p[0]),m=Number(b),b=Number(p[1]),2<p.length&&(c=Number(p[2])));this.F.pan=isNaN(a)?this.pan.m:Number(a);this.F.u=isNaN(b)?this.u.m:Number(b);this.F.fov=!isNaN(c)&&0<c&&180>c?Number(c):this.fov.m;this.F.speed=!isNaN(m)&&0<m?Number(m):1;this.F.W=isNaN(h)?this.W.m:Number(h);void 0!==n?!a||4!=n&&12!=n&&9!=n||(this.F.pb=n):this.F.pb=this.Z()}};e.prototype.Gj=function(a){this.ma(!1);
var b=0,c=0,m=70,h=4,n=0,p=1;a.hasOwnProperty("pan")&&(b=Number(a.pan),this.F.pan=b);a.hasOwnProperty("tilt")&&(c=Number(a.tilt),this.F.u=c);a.hasOwnProperty("fov")&&(m=Number(a.fov),this.F.fov=m);a.hasOwnProperty("projection")&&(h=Number(a.projection),this.F.pb=h);a.hasOwnProperty("timingFunction")&&(n=Number(a.timingFunction));a.hasOwnProperty("speed")&&(p=Number(a.speed));0>=p?(this.Ag(b,c,m),this.qb(h)):(a=new x.Um,a.cb="__AutoMove",a.Se=this.kl(),a.Ai=this.u.m,a.de=this.fov.m,a.zi=this.Z(),a.Kd=
b,a.fe=c,a.Jg=m,a.ee=h,a.$f=!1,a.gf=!1,a.hf=!1,0==n&&(a.gf=!0),1==n&&(a.$f=!0,a.gf=!0),2==n&&(a.hf=!0),a.speed=p,this.F.bn=this.L,this.L=this.Un(a),this.F.cn=(new Date).getTime(),this.F.Lm=!0,this.F.active=!0,this.F.aborted=!1,this.F.pan=b,this.F.u=c,this.F.fov=m,this.le=!1)};e.prototype.jt=function(a){this.moveTo(this.pan.Ia,this.u.Ia,this.fov.Ia,a)};e.prototype.kt=function(a,b){var c={};c.pan=this.pan.Ia;c.tilt=this.u.Ia;c.fov=this.fov.Ia;c.projection=this.Ch();c.timingFunction=b;c.speed=a;this.Gj(c)};
e.prototype.Oq=function(a,b,c,m){var h=new x.Ni(this);h.type="point";h.pan=b;h.u=c;h.id=a;h.j={};h.j.player=this;h.cg();h.j.hotspot=h;h.j.__div=document.createElement("div");h.j.__div.appendChild(m);this.J.push(h);h.j.__div.style.position="absolute";h.j.__div.style.left="-1000px";h.j.__div.style.top="-1000px";h.j.__div.ggVisible=!0;this.Ja.insertBefore(h.j.__div,this.Ja.firstChild);this.tb=!0};e.prototype.cv=function(a,b,c){for(var m=0;m<this.J.length;m++){var h=this.J[m];h.id==a&&(h.pan=b,h.u=c,
h.cg())}this.tb=!0};e.prototype.Qt=function(a){for(var b=-1,c,m=0;m<this.J.length;m++)c=this.J[m],c.id==a&&(b=m);-1<b&&(c=this.J.splice(b,1).pop(),c.j&&c.j.__div&&this.Ja.removeChild(c.j.__div))};e.prototype.ns=function(){for(var a=[],b=0;b<this.J.length;b++){var c=this.J[b];"point"==c.type&&a.push(String(c.id))}return a};e.prototype.Mr=function(a){for(var b=0;b<this.J.length;b++){var c=this.J[b];if(c.id==a)return b={},b.id=a,b.pan=c.pan,b.tilt=c.u,b.pxp=c.Ul,b.pyp=c.Vl,b.url=c.url,b.target=c.target,
b.distance=c.distance,b.title=c.title,b.description=c.description,b.skinid=c.rm,c.gd&&(b.customimage=c.gd,b.customimagewidth=c.ff,b.customimageheight=c.yd,b.use3D=c.Lf,b.distance3D=c.bj),c.j&&c.j.__div&&(b.div=c.j.__div),b}};e.prototype.tq=function(a,b){this.ia.start.x=a;this.ia.start.y=b;this.ia.pa.x=a;this.ia.pa.y=b;this.ka.pa.x=a;this.ka.pa.y=b;this.Yl++;this.pan.Zb=this.pan.m;this.u.Zb=this.u.m};e.prototype.rq=function(a,b){var c=this.Mb();this.pan.Zb+=a*c/this.C.height;this.u.Zb+=b*c/this.C.height;
this.pan.m=this.pan.Zb;this.u.m=this.u.Zb};e.prototype.sq=function(a,b){this.ia.m.x=a;this.ia.m.y=b;this.ia.ha.x=this.ia.m.x-this.ia.pa.x;this.ia.ha.y=this.ia.m.y-this.ia.pa.y;this.I.Xd&&(this.ia.pa.x=this.ia.m.x,this.ia.pa.y=this.ia.m.y,this.update())};e.prototype.ma=function(a){this.v.active&&(this.v.active=!1,this.H("autorotatechanged",{}),this.pan.d=0,this.u.d=0,this.fov.d=0,this.fov.Nc.enabled=!1);this.F.active&&(this.F.active=!1,this.pan.d=0,this.u.d=0,this.fov.d=0,this.fov.Nc.enabled=!1);this.We=
this.F.aborted=!1;this.v.Fj=!1;this.Pd=.02;this.bh=0;this.v.sd&&(this.v.enabled=this.v.Rf,a&&(this.v.sd=this.v.Tg));this.rg=(new Date).getTime()};e.prototype.Tr=function(){return this.rg};e.prototype.oo=function(a,b){a||(a=this.ca.x,b=this.ca.y);var c=this.C.height/(2*Math.tan(this.Mb()*Math.PI/360));a-=this.C.width/2;b-=this.C.height/2;var m={};m.pan=180*Math.atan(a/c)/Math.PI;m.tilt=180*Math.atan(-b/Math.sqrt(a*a+c*c))/Math.PI;return m};e.prototype.lj=function(a,b,c){a||(a=this.ca.x,b=this.ca.y);
if(this.ac()){var m=this.fov.m/this.C.height;a=-(a-this.C.width/2)*m+this.pan.m;b=-(b-this.C.height/2)*m+this.u.m}else{m=new x.Ua(0,0,1);b=this.oo(a,b);m.ae(-b.tilt);m.Gf(b.pan);m.ae(-this.u.m);m.Gf(-this.pan.m);c||(m.ae(-this.Ya.pitch),m.Hf(this.Ya.W));for(a=m.Uq()-180;-180>a;)a+=360;b=m.Vq()}m={};m.pan=a;m.tilt=b;return m};e.prototype.Jc=function(a){return a==this.control||a&&void 0!==a.ggPermeableMap&&1==a.ggPermeableMap?!0:a&&void 0!==a.ggPermeable&&0==a.ggPermeable?!1:a&&a.ggType&&("container"==
a.ggType||"cloner"==a.ggType||"timer"==a.ggType)?!0:!1};e.prototype.Gk=function(a,b){var c=this.lf(),m,h;for(m=0;m<this.pj();m++){var n=this.ol(m);if(n.Na)return n}for(m=0;m<this.pj();m++)if(n=this.ol(m),!n.od){var p=[],r=new x.Ua,v;var y=h=void 0;0<n.fov&&(h=Math.tan(n.fov/2*Math.PI/180),y=0<n.pc?h*n.Pc/n.pc:h,n.Ic&&1!=n.Ic&&(y*=n.Ic));for(v=0;4>v;v++){switch(v){case 0:r.init(-h,-y,0);break;case 1:r.init(h,-y,0);break;case 2:r.init(h,y,0);break;case 3:r.init(-h,y,0)}r.Ka(n.Ka*Math.PI/180);r.Oa(-n.Oa*
Math.PI/180);r.yb(n.yb*Math.PI/180);--r.z;r.Ka(-n.u*Math.PI/180);r.Oa(n.pan*Math.PI/180);r.Oa(-this.pan.m*Math.PI/180);r.Ka(this.u.m*Math.PI/180);r.yb(this.W.m*Math.PI/180);p.push(r.clone())}p=this.Ik(p);if(0<p.length){for(v=0;v<p.length;v++)r=p[v],.1>r.z?(y=-c/r.z,h=this.C.width/2+r.x*y,y=this.C.height/2+r.y*y):y=h=0,r.dc=h,r.Pb=y;if(x.ic.zo(p,a,b))return n}}return null};e.prototype.pj=function(){return this.U.length+this.Xa.length+this.Tb.length};e.prototype.ol=function(a){return a<this.U.length?
this.U[a]:a<this.U.length+this.Xa.length?this.Xa[a-this.U.length]:this.Tb[a-(this.U.length+this.Xa.length)]};e.prototype.Lh=function(){return document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement&&null!=document.msFullscreenElement||document.fullScreen};e.prototype.it=function(a){this.nq(a);window.focus();if(this.zd)this.zd.onclick();(this.te||this.jf&&this.og)&&7>this.fd&&this.hg();this.Yb=null;if(!this.I.qc&&!this.xc){a=a?a:window.event;if(a.which||0==a.which||1==a.which){var b=
(new Date).getTime();if(this.Le){this.Yb=this.Le;this.T.Wc=!0;this.T.startTime=b;a.stopPropagation();return}if(this.Jc(a.target)){var c;if((c=this.Gk(this.ca.x,this.ca.y))&&c.ze&&(this.Yb=c,void 0!==c.code&&""!==c.code&&c.oc))return;this.tq(a.pageX,a.pageY);this.T.Wc=!0;this.T.startTime=b;a.preventDefault();this.ma(!0)}}this.ia.ha.x=0;this.ia.ha.y=0}};e.prototype.Og=function(a,b,c){var m=this.K.ek;m.enabled&&(this.S!=this.lb&&0<=a&&0<=b&&""!=this.S.title?(this.Fa.innerHTML=this.Va(this.S.title),this.Fa.style.color=
this.oa(m.fk,m.dk),this.Fa.style.backgroundColor=m.background?this.oa(m.Vb,m.Ub):"transparent",this.Fa.style.border="solid "+this.oa(m.Xb,m.Wb)+" "+m.Ti+"px",this.Fa.style.borderRadius=m.Ak+"px",this.Fa.style.textAlign="center",0<m.width?(this.Fa.style.left=a-m.width/2+this.margin.left+"px",this.Fa.style.width=m.width+"px"):(this.Fa.style.width="auto",this.Fa.style.left=a-this.Fa.offsetWidth/2+this.margin.left+"px"),this.Fa.style.height=0<m.height?m.height+"px":"auto",this.Fa.style.top=b+(c?-60:25)+
this.margin.top+"px",this.Fa.style.visibility="inherit",this.Fa.style.overflow="hidden"):(this.Fa.style.visibility="hidden",this.Fa.innerHTML=""))};e.prototype.nq=function(a){var b=this.Dh();this.Lh()?(this.ca.x=a.clientX-this.margin.left,this.ca.y=a.clientY-this.margin.top):(this.ca.x=a.clientX-b.x,this.ca.y=a.clientY-b.y)};e.prototype.Pe=function(a){if("string"==typeof a)for(var b=0;b<this.J.length;b++)if(this.J[b].id==a){a=this.J[b];break}this.S=a&&null!==a&&"object"==typeof a?a:this.lb;this.S==
this.lb&&(a=this.Xi(this.ca.x,this.ca.y))&&(a.jb=0);this.S.cg&&this.S.cg();this.hotspot=this.S;this.H("activehotspotchanged",{hotspot:this.S})};e.prototype.ht=function(a){a=a?a:window.event;this.nq(a);if(!this.I.qc&&!this.xc&&!this.Le){this.v.active&&(this.v.Bj=(new Date).getTime());0==a.buttons&&(this.T.Wc=!1);this.T.Wc&&(a.preventDefault(),(a.which||0==a.which||1==a.which)&&this.sq(a.pageX,a.pageY),this.ma(!0));var b=!1;if(this.S==this.lb||"poly"==this.S.type){var c=this.lb;0<this.J.length&&this.Jc(a.target)&&
(c=this.Xi(this.ca.x,this.ca.y));this.Tj(c);this.Og(this.ca.x,this.ca.y,!1);0!=c&&c!=this.lb&&(b=!0)}c=null;!b&&this.Jc(a.target)&&(c=this.Gk(this.ca.x,this.ca.y));this.v.$i&&(this.v.$i=!1);this.Ja.style.cursor=this.S!=this.lb&&this.S.Be&&b||c&&c.mg?"pointer":"default"}};e.prototype.Tj=function(a){!1===a&&(a=this.lb);this.S!=a&&(this.S!=this.lb&&(0<this.K.mode&&(this.S.jb=0),this.ga&&this.ga.hotspotProxyOut&&this.ga.hotspotProxyOut(this.S.id,this.S.url),this.H("hsproxyout",{id:this.S.id,url:this.S.url})),
a!=this.lb?(this.Pe(a),this.ga&&this.ga.hotspotProxyOver&&this.ga.hotspotProxyOver(this.S.id,this.S.url),this.H("hsproxyover",{id:this.S.id,url:this.S.url}),0<this.K.mode&&(this.K.jb=1,this.S.jb=1)):(this.Pe(this.lb),0<this.K.mode&&(this.K.jb=0)))};e.prototype.gt=function(a){a=a?a:window.event;this.Aj=-1;if(this.te||this.jf&&this.og)7<=this.fd?this.Wp():this.hg();if(!this.I.qc&&!this.xc&&(this.Yb&&(this.Yb.ze(),this.Le=this.Yb.Na?this.Yb:null),this.T.Wc)){this.ma(!0);a.preventDefault();this.T.Wc=
!1;a=(new Date).getTime();var b=Math.abs(this.ia.start.x-this.ia.pa.x)+Math.abs(this.ia.start.y-this.ia.pa.y);if(400>a-this.T.startTime&&0<=b&&20>b){var c=this.Xi(this.ca.x,this.ca.y);c&&this.iq(c);b=Math.abs(this.ia.Yd.x-this.ia.pa.x)+Math.abs(this.ia.Yd.y-this.ia.pa.y);var m=this.lj(this.ca.x,this.ca.y,!0);700>a-this.Oh&&0<=b&&20>b?(c?this.jq(c):this.I.Sk&&this.hk(),this.H("doubleclick",{pan:-Math.round(100*m.pan)/100,tilt:Math.round(100*m.tilt)/100}),this.Oh=0):(this.H("panoclick",{pan:-Math.round(100*
m.pan)/100,tilt:Math.round(100*m.tilt)/100}),this.Oh=a);this.ia.Yd.x=this.ia.pa.x;this.ia.Yd.y=this.ia.pa.y}}};e.prototype.Wo=function(a){if(!this.I.Ge&&!this.xc&&(a=a?a:window.event,this.Jc(a.target))){var b=a.detail?-1*a.detail:a.wheelDelta/40;this.I.Eo&&(b=-b);a.axis&&(-1==this.Aj?this.Aj=a.axis:this.Aj!=a.axis&&(b=0));var c=0<b?1:-1;a.wheelDeltaX&&a.wheelDeltaY&&Math.abs(a.wheelDeltaX)>Math.abs(a.wheelDeltaY)&&(b=0);0!=b&&(this.I.Of?this.nn(c*this.I.tm,this.ve(a),!0):this.Ui(c*this.I.tm,!0),this.update());
a.preventDefault();this.ma(!0)}};e.prototype.Zu=function(a){a||(a=window.event);var b=a.touches,c=this.Dh();this.ca.x=b[0].clientX-c.x;this.ca.y=b[0].clientY-c.y;this.Ue=this.Yb=null;window.focus();this.wl||(this.wl=!0,this.H("hastouch",{}),this.H("playerstatechanged",{}));!this.Jo&&(this.te||this.jf&&this.og)&&7>this.fd&&this.hg();if(!this.I.qc&&!this.xc)if(c=(new Date).getTime(),this.Le)this.Yb=this.Le,this.T.hd=!0,this.T.startTime=c,a.preventDefault(),this.T.ii=!0;else{if(!this.T.hd&&b[0]){this.T.startTime=
c;this.T.start.x=b[0].pageX;this.T.start.y=b[0].pageY;this.T.pa.x=b[0].pageX;this.T.pa.y=b[0].pageY;c=this.Eb=b[0].target;if(this.Jc(c)){var m;(m=this.Gk(this.ca.x,this.ca.y))&&m.ze&&(this.Yb=m);if(m=this.Xi(this.ca.x,this.ca.y))this.O(m),this.Ue=m,this.Tj(m),this.ve(a),this.Og(this.ca.x,this.ca.y,!0);this.tq(b[0].pageX,b[0].pageY);this.T.Mn=b[0].identifier;this.T.hd=!0;a.preventDefault();this.T.ii=!0;this.ma(!0)}if(c){m=!1;if(null!=this.T.Hg)for(var h=this.T.Hg;h&&h!=this.control;){if(h.onmouseout)h.onmouseout(a);
h=h.parentNode}h=c;for(var n=!0;h&&h!=this.control;)c!=this.T.Hg&&h.onmouseover&&(h.onmouseover(a),7<=this.fd&&this.Jc(a)&&(m=!0)),h.onmousedown&&(h.onmousedown(a),n=!1,m=!0),h.onclick&&(n=!1),h=h.parentNode;this.T.Hg=n&&7<=this.fd&&c!=this.T.Hg?c:null;m&&(a.preventDefault(),this.T.ii=!0)}}1<b.length&&(this.T.hd=!1);!this.tl&&2==b.length&&b[0]&&b[1]&&this.Jc(this.Eb)&&(a=b[0].pageX-b[1].pageX,b=b[0].pageY-b[1].pageY,this.fov.Xp=Math.sqrt(a*a+b*b),this.fov.prev=this.fov.m);this.ia.ha.x=0;this.ia.ha.y=
0}};e.prototype.hg=function(){try{this.Ji&&this.B.j&&(!this.B.Tc&&this.B.$j&&this.B.j.play(),this.B.j.muted=!1);if(this.ra&&(this.ra.resume(),"suspended"==this.ra.state))return;if(this.kd&&this.ra&&this.ra.createOscillator){var a=this.ra.createOscillator(),b=this.ra.createGain();a.frequency.value=30;a.type="sine";a.connect(b);b.connect(this.ra.destination);b.gain.value=.01;a.start(0);setTimeout(function(){a.stop()},1E4)}for(b=0;b<this.X.length;b++){var c=this.X[b];(!this.isPlaying(c.id)||c.wa)&&0<=
c.loop&&c.autoplay&&!this.qd&&(c.wa&&c.Uf(),this.Zd(c.id,c.loop))}for(b=0;b<this.U.length;b++){var m=this.U[b];!this.isPlaying(m.id)&&m.autoplay&&this.Ji&&!this.qd&&this.Zd(m.id,m.loop);this.isPlaying(m.id)&&m.autoplay&&this.Ji&&!this.qd&&(m.Od&&m.Pf(),m.j.muted=!1)}this.jf=this.te=!1}catch(h){this.O(h)}};e.prototype.Yu=function(a){a||(a=window.event);var b=a.touches,c=this.Dh();this.ca.x=b[0].clientX-c.x;this.ca.y=b[0].clientY-c.y;if(this.I.qc||this.xc)(this.D.Ld||this.D.he||this.D.Zc)&&a.preventDefault();
else{b[0]&&(this.T.pa.x=b[0].pageX,this.T.pa.y=b[0].pageY);if(this.Eb){c=this.Eb;for(var m=!1;c&&c!=this.control&&!m;)"scrollarea"==c.ggType&&(m=!0),"map"==c.ggType&&(m=!0),"text"==c.ggType&&(m=!0),c=c.parentNode;m||a.preventDefault()}if(this.T.hd){a.preventDefault();for(c=0;c<b.length;c++)if(b[c].identifier==this.T.Mn){this.sq(b[c].pageX,b[c].pageY);break}this.Ue&&(this.ve(a),this.Og(this.ca.x,this.ca.y,!0));this.ma(!0)}2==b.length&&b[0]&&b[1]&&(this.T.hd=!1,!this.tl&&this.Jc(this.Eb)&&(this.I.Ge||
(c=b[0].pageX-b[1].pageX,m=b[0].pageY-b[1].pageY,this.fov.Bn=Math.sqrt(c*c+m*m),this.ka.fov.active=!0,this.ka.fov.center.enabled=!0,this.ka.fov.center.x=(b[0].pageX+b[1].pageX)/2,this.ka.fov.center.y=(b[0].pageY+b[1].pageY)/2,this.ka.fov.mc=this.fov.prev*Math.sqrt(this.fov.Xp/this.fov.Bn),4==this.Z()&&!this.ac()&&this.ka.fov.mc>this.fov.max&&(this.ka.fov.mc=this.fov.max),this.ka.fov.mc<this.fov.min&&(this.ka.fov.mc=this.fov.min)),this.ma(!0),a.preventDefault()))}};e.prototype.Xu=function(a){this.T.ii&&
(this.T.ii=!1,a.preventDefault());var b=!1;if(this.te||this.jf&&this.og)7<=this.fd?this.Wp():this.hg();if(!this.I.qc&&!this.xc){this.T.hd&&(a.preventDefault(),this.ma(!0));var c=(new Date).getTime(),m=void 0,h=!1;m=Math.abs(this.T.start.x-this.T.pa.x)+Math.abs(this.T.start.y-this.T.pa.y);if(0<=m&&20>m){b=!0;this.Jc(this.Eb)&&(a.preventDefault(),this.Yb&&(this.Yb.ze(),this.Le=this.Yb.Na?this.Yb:null));if(this.Eb){var n=this.Eb;for(m=function(){if(n.onclick){var r=n;setTimeout(function(){r.onclick(a)},
0);"hotspot"!=n.zv&&(h=!0);b=!1}n=n.parentNode};n&&n!=this.control;)m()}m=Math.abs(this.T.Yd.x-this.T.pa.x)+Math.abs(this.T.Yd.y-this.T.pa.y);if(700>c-this.Oh&&0<=m&&20>m){if(this.Jc(this.Eb))if(a.preventDefault(),this.Ue)this.jq(this.Ue);else if(this.I.Sk){var p=this;setTimeout(function(){p.hk()},1)}if(this.Eb)for(n=this.Eb;n&&n!=this.control;)n.ondblclick&&(n.ondblclick(),h=!0,b=!1),n=n.parentNode;this.Oh=0}else this.Oh=c;this.T.Yd.x=this.T.pa.x;this.T.Yd.y=this.T.pa.y}if(this.Eb)for(n=this.Eb;n&&
n!=this.control;)this.T.Hg!=this.Eb&&n.onmouseout&&(n.onmouseout(a),7<=this.fd&&(h=!0)),n.onmouseup&&(n.onmouseup(a),7<=this.fd&&(h=!0)),n=n.parentNode;h&&a.preventDefault();this.ve(a);this.Ue&&(this.Og(-1,-1,!0),b&&this.iq(this.Ue));this.Eb=null;this.T.hd=!1;this.Tj(this.lb);this.Ue=null}};e.prototype.Wu=function(a){this.I.qc||this.xc||(this.T.hd=!1);this.Ue=null;this.Tj(this.lb);this.ve(a);this.Og(-1,-1,!0)};e.prototype.Ko=function(){return null!=this.Eb||this.T.hd||this.T.Wc};e.prototype.Xo=function(a){if(!this.zf&&
window.MSGesture){var b=window.MSGesture;this.O("setup gesture");this.zf=new b;this.zf.target=this.control}this.zf&&this.zf.addPointer(a.pointerId)};e.prototype.Wn=function(a){this.tl=!0;this.Hj=1;this.I.qc||this.I.Ge||this.xc||(a.touches?(this.Eb=a.touches.target,this.Jc(a.target)&&(a.preventDefault(),this.fov.prev=this.fov.m,this.ma(!0))):(a.preventDefault(),this.fov.prev=this.fov.m,this.ma(!0)))};e.prototype.Br=function(a){if(!this.I.qc&&!this.I.Ge&&!this.xc&&this.Jc(a.target)){a.preventDefault();
this.ka.fov.active=!0;this.ka.fov.center.enabled=!0;var b=this.ve(a);this.ka.fov.center.x=b.x;this.ka.fov.center.y=b.y;this.ka.fov.mc=this.fov.prev/Math.sqrt(a.scale);4==this.Z()&&2!=this.Jd&&this.ka.fov.mc>this.fov.max&&(this.ka.fov.mc=this.fov.max);this.update();this.ma(!0)}};e.prototype.lt=function(a){this.I.qc||this.I.Ge||this.xc||(a.preventDefault(),1!=a.scale&&(this.ka.fov.active=!0,this.Hj*=a.scale,this.ka.fov.center.enabled=!0,a=this.ve(a),this.ka.fov.center.x=a.x,this.ka.fov.center.y=a.y,
this.ka.fov.mc=this.fov.prev/Math.sqrt(this.Hj),4==this.Z()&&2!=this.Jd&&this.ka.fov.mc>this.fov.max&&(this.ka.fov.mc=this.fov.max),this.update(),this.ma(!0)))};e.prototype.Vn=function(a){this.I.qc||this.I.Ge||this.xc||(this.ka.fov.active=!1,a.preventDefault(),this.ma(!0),this.zf&&this.zf.reset&&this.zf.reset())};e.prototype.Xs=function(a){this.I.Vh||this.xc||(this.isFullscreen&&a.preventDefault(),this.yj=a.keyCode,this.ma(!0))};e.prototype.Ys=function(a){this.yj&&(this.yj=0,a.preventDefault())};
e.prototype.st=function(){this.yj=0};e.prototype.di=function(){this.isFullscreen&&(this.Lh()||this.exitFullscreen(),this.Lh()&&(this.$.style.left="0px",this.$.style.top="0px"))};e.prototype.yt=function(a,b,c,m){m?(this.Gh.alpha=a,this.Gh.beta=b,this.Gh.gamma=c,this.Gh.gamma+=90):(this.nb.alpha=a,this.nb.beta=b,this.nb.gamma=c,this.nb.gamma+=90);this.nb.orientation=window.orientation?1*parseInt(""+window.orientation,10):0;c=new x.Wm;a=this.nb;c.Gf(-a.alpha);c.Hf(-a.beta);c.ae(-a.gamma);c.Hf(90-a.orientation);
1>c.Ob?-1<c.Ob?(b=180/Math.PI*Math.asin(-c.Ob),a=180/Math.PI*Math.atan2(c.vc,c.uc),c=180/Math.PI*Math.atan2(c.tc,c.sc)):(b=0,a=90,c=-180/Math.PI*Math.atan2(-c.bc,c.cc)):(b=0,a=-90,c=180/Math.PI*Math.atan2(-c.bc,c.cc));if(this.Rg)if(this.Ko()||this.F.rj||this.nb.pi)this.nb.Af=this.nf()+c,this.nb.fadeIn=0,this.nb.pi=!1;else{m=this.F.active;var h=1;10>this.nb.fadeIn&&(this.nb.fadeIn+=1,h=.1*this.nb.fadeIn);c=-c+this.nb.Af;this.be(h*c+(1-h)*this.nf());this.ce(h*a+(1-h)*this.jg());this.qq?this.Bg(h*b+
(1-h)*this.nj()):this.Bg(0);this.df();this.F.active=m}};e.prototype.iq=function(a){this.ga&&this.ga.hotspotProxyClick&&this.ga.hotspotProxyClick(a.id,a.url);this.H("hsproxyclick",{id:this.S.id,url:this.S.url});""!=a.url&&(this.Ol(a.url,a.target),this.Og(-1,-1,!1))};e.prototype.jq=function(a){this.ga&&this.ga.hotspotProxyDoubleClick&&this.ga.hotspotProxyDoubleClick(a.id,a.url);this.H("hsproxydblclick",{id:this.S.id,url:this.S.url})};e.prototype.kf=function(){return Math.min(1,2*Math.tan(Math.PI*Math.min(this.fov.m,
90)/360))};e.prototype.jp=function(){var a=this;setTimeout(function(){a.jp()},100);9!=a.Qj||a.uj||window.requestAnimationFrame(function(){a.ei();a.O("restart recover timer")});10<a.Qj&&1<a.Yl&&(a.Uc("recover timer - disabling requestAnimationFrame"),a.uj=!0,a.ei());a.Qj++};e.prototype.wi=function(a){if("__VideoPano"!=this.L.cb){var b={PAN:{value:0,name:"pan"},wv:{value:1,name:"tilt"},sv:{value:2,name:"fov"}},c=0,m=0,h=0;a=Math.max(a,0);for(var n in b){var p=b[n],r=this.mf(this.po(a,p.value,""),p.value,
"");var v=(v=this.ko(r))?this.Xn(r,v,a):r.value;switch(p.value){case 0:p=this.pan.m;if(this.le&&3!=r.type){if(!this.ac()){for(;360<v;)v-=360;for(;-360>v;)v+=360}c=v-p;this.ac()||(180<c&&(c-=360),-180>c&&(c+=360));this.pan.m+=c*this.Pd}else this.pan.m=v;this.v.Sh=this.pan.m;break;case 1:p=this.u.m;this.le&&3!=r.type?(m=v-p,this.u.m+=m*this.Pd):this.u.m=v;this.v.Th=this.u.m;break;case 2:p=this.fov.m,this.le&&3!=r.type?(h=v-p,this.fov.m+=h*this.Pd):this.fov.m=v,this.v.Rh=this.fov.m}}v=this.Z();for(b=
Math.floor(a);!this.mf(b,3)&&0<b;)b--;b=this.mf(b,3);n=a-b.time;this.le&&-1!=this.dh&&this.Qi+this.wk>a?(v=this.Ah(this.dh),this.fov.m>v?this.Qi=a:(n=(a-this.Qi)/this.wk,n=Math.min(1,n),this.qb(this.Z(),this.dh,1-n))):(0==b.Fb||n>b.Fb-.3?this.qb(b.value):(n/=b.Fb,this.qb(v,b.value,1-n)),this.v.Po=b.value);this.le&&(v=Math.sqrt(c*c+m*m+h*h),.3>v&&(this.le=!1,this.Pd=.02,this.bh=0),0<this.bh&&v>this.bh&&(this.Pd+=.01,this.Pd=Math.min(this.Pd,1)),this.bh=v)}c=Math.floor(a);m=this.Cr(c);for(h=0;h<m.length;h++)if(n=
m[h],3>n.an)c!=this.dn&&(v=n.td,this.Rb.hasOwnProperty(v)&&(b=this.Rb[v].type,0==b?this.Qe(v,n.Mm):1==b?this.Qe(v,n.value):2==b&&this.Qe(v,"true"==n.Mm)));else if(b=this.mf(this.po(a,n.hb,n.td),n.hb,n.td),v=(v=this.ko(b))?this.Xn(b,v,a):b.value,n=n.td.split("|"),2==n.length)for(b=n[0],n=n[1],r=0;r<this.J.length;r++)p=this.J[r],p.id==b&&("pan"==n?p.pan=v:"tilt"==n&&(p.u=v));this.dn=c;this.update()};e.prototype.Yn=function(){if(""!=this.v.vg){var a=this.no(this.v.vg);if(0==a.length||1==a.length&&a[0]==
this.xa)return this.xa}a=this.xa;do if(this.v.bp){var b=1E3;do a=this.$a[Math.floor(Math.random()*this.$a.length)];while(b--&&a==this.xa)}else b=this.$a.indexOf(a),b++,b>=this.$a.length&&(b=0),a=this.$a[b];while(""!=this.v.vg&&!this.Bh(a).tags.includes(this.v.vg)&&a!=this.xa);return a};e.prototype.Gt=function(a){var b=this.F.speed;this.F.Gl&&(b=b*(a.getTime()-this.F.Gl)/60);this.F.Gl=a.getTime();this.v.xh&&(this.sa.ready()||4==this.Z())&&this.jj()&&(this.v.xh=!1,this.v.active=!0,this.Ea.running=!0,
this.Ea.finished=!1);if(this.F.active||0!=this.F.pb&&this.sa.ready()){if(this.F.Lm&&"__AutoMove"==this.L.cb){var c=a.getTime()-this.F.cn;b=c/100;if(b>=this.L.length){if(this.wi(this.L.length),this.ya.splice(this.ya.indexOf(this.L),1),this.F.active=!1,this.L=this.F.bn,this.F.pb=0,this.Ag(this.F.pan,this.F.u,this.F.fov),this.pan.Zb=this.F.pan,this.u.Zb=this.F.u,this.F.ai&&(this.F.ai=!1,this.v.Fj=!0,this.v.sd=!0,this.v.active=!0,this.H("autorotatechanged",{})),this.onMoveComplete)this.onMoveComplete()}else this.wi(b)}else{this.pan.d=
this.F.pan-this.pan.m;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.u.d=this.F.u-this.u.m;this.W.d=this.F.W-this.W.m;this.fov.d=this.F.fov-this.fov.m;c=b*this.kf();var m=Math.sqrt(this.pan.d*this.pan.d+this.u.d*this.u.d+this.W.d*this.W.d+this.fov.d*this.fov.d),h=this.pan.m-this.F.Sh,n=this.u.m-this.F.Th,p=this.W.m-this.F.Qo,r=this.fov.m-this.F.Rh;100*Math.sqrt(h*h+n*n+p*p+r*r)<c&&0==this.F.pb&&(this.F.aborted=!0);this.F.Sh=this.pan.m;
this.F.Th=this.u.m;this.F.Qo=this.W.m;this.F.Rh=this.fov.m;if(100*m<c||this.F.aborted){if(this.pan.d=0,this.u.d=0,this.W.d=0,this.fov.d=0,this.fov.Nc.enabled=!1,this.F.active&&(this.F.active=!1,this.pan.m=this.F.pan,this.u.m=this.F.u,this.W.m=this.F.W,this.fov.m=this.F.fov,this.onMoveComplete))this.onMoveComplete()}else m=m>5*c?c/m:.2,this.pan.d*=m,this.u.d*=m,this.fov.d*=m;this.pan.m+=this.pan.d;this.u.m+=this.u.d;this.W.m+=this.W.d;this.I.Of&&this.fov.Nc.enabled?this.hm(this.fov.m+this.fov.d,this.fov.Nc):
this.fov.m+=this.fov.d;0!=this.F.pb&&(this.F.pb!=this.Z()?(b=this.Ah(this.F.pb),this.Dd()>b?(this.fov.m+=-Math.max((2.5-1.7*Math.min(Math.sqrt(this.pan.d*this.pan.d+this.u.d*this.u.d+this.W.d*this.W.d)/c,1))*c,this.fov.d)-this.fov.d,this.F.fov=this.fov.m):(this.qb(this.F.pb,this.Z(),0),this.O("New projection from Target:"+this.Z()),this.F.li=0,this.sa.tj())):1>this.F.li?(this.F.li=Math.min(1,this.F.li+.05*b),this.qb(this.Z(),this.Hc(),this.F.li)):(this.qb(this.Z(),0,0),this.F.pb=0,this.sa.tj()))}this.rg=
a.getTime();this.update()}else if(this.v.active&&!this.D.he){c=a.getTime()-this.v.startTime;this.v.Bj<this.v.startTime&&(this.v.Bj=this.v.startTime);if((this.v.sd||this.Ea.running)&&0<this.ya.length){b=c/100;m=!1;if(this.wc!=this.L.cb||""!=this.L.Xe&&this.v.Qd!=this.L.Xe){for(c=0;c<this.ya.length;c++)if(""==this.wc&&this.ya[c].Xe==this.v.Qd||""!=this.wc&&this.ya[c].cb==this.wc&&this.ya[c].Xe==this.v.Qd){m=!0;this.L=this.ya[c];this.wc=this.L.cb;break}!m&&0<this.ya.length&&this.ya[0].Xe==this.v.Qd&&
(m=!0,this.L=this.ya[0],this.wc=this.L.cb)}else m=!0;if(m)if(c=(h=this.B.j&&this.B.Tc)&&this.v.xm&&!this.Ea.running,this.We){m=b;if(c)for(this.B.j.currentTime<this.fn&&this.yk&&(this.xk++,this.yk=!1),m=10*(this.xk*this.B.j.duration+this.B.j.currentTime),this.fn=this.B.j.currentTime,.05>this.B.j.duration-this.B.j.currentTime&&(this.yk=!0);m>=10*this.Qf;)m-=10*this.Qf;if(!h&&b>=this.L.length||h&&!c&&b>=this.L.length||h&&c&&(this.L.cb!=this.L.Zo||this.L.Yo!=this.xa)&&b>=this.L.length){this.wi(this.L.length);
this.v.Gd=0;this.We=!1;if(this.Ea.running){this.Ep();return}if(this.v.tn){c=0;do b=this.en[this.L.Xe],m=Math.floor(Math.random()*Object.keys(b).length),m=b[m],this.wc=m.cliptitle,b=m.nodeid,m=m.startview,c++;while(b==this.xa&&10>c)}else this.wc=this.L.Zo,b=this.L.Yo,m=this.L.pt;this.wc==this.L.cb&&this.xa==b?1<this.$a.length&&0<this.v.Ij&&(this.v.startTime=a.getTime(),(c=this.Yn())&&c!=this.xa&&(this.pd("{"+c+"}"),this.We=!1,this.v.active=!0,this.D.me=!0,this.D.Ye=!0)):(this.uf&&b!=this.xa&&(this.pd("{"+
b+"}",m),this.D.enabled?(this.v.active=!1,this.D.me=!0,this.D.Ye=!0):this.v.active=!0),this.v.startTime=a.getTime())}else this.wi(m),this.v.Gd=m}else if(b=this.L.qa[0],m=this.L.qa[1],h=this.L.qa[2],n=this.L.qa[3],3!=n.hb&&(n=0),this.v.Fj||this.F.aborted||this.Ea.running||c){if(this.We=!0,this.v.startTime=0<this.v.Gd?a.getTime()-100*this.v.Gd:a.getTime(),this.le=c){for(this.Qf=this.xk=0;this.Qf<this.L.length/10;)this.Qf+=this.B.j.duration;m=10*this.B.j.currentTime;for(c=Math.floor(m);!this.mf(c,3)&&
0<c;)c--;c=this.mf(c,3);c.value==this.Z()?this.dh=-1:(this.dh=c.value,this.Qi=m,this.wk=Math.max(5,c.time+c.Fb-m))}}else{c={};if(0<this.v.Gd)c.pan=this.v.Sh,c.tilt=this.v.Th,c.fov=this.v.Rh,c.projection=this.v.Po;else{for(c.pan=b.value;360<c.pan;)c.pan-=360;for(;-360>c.pan;)c.pan+=360;c.tilt=m.value;c.fov=h.value;c.projection=n?n.value:4}c.timingFunction=3;c.speed=1;this.F.ai=!0;this.Gj(c);this.v.active=!0}}else 0<this.v.Ij&&this.uf&&c>=1E3*this.v.Ij?1<this.$a.length&&(this.v.startTime=a.getTime(),
(c=this.Yn())&&c!=this.xa&&(this.v.ld=a.getTime(),this.v.timeout=0,this.pd("{"+c+"}"),this.v.active=!0,this.D.me=!0)):(c=a.getTime(),m=b=1E3/60,0!=this.v.ld&&(m=c-this.v.ld),this.u.d=this.v.gk*((this.v.Ao?this.u.Ia:0)-this.u.m)/100,this.fov.d=this.v.gk*(this.fov.Ia-this.fov.m)/100,this.pan.d=.95*this.pan.d+-this.v.speed*this.kf()*.05,b=m/b,this.pan.m+=this.pan.d*b,this.u.m+=this.u.d*b,this.fov.m+=this.fov.d*b,this.v.ld=c,this.update());3E3<a.getTime()-this.v.Bj&&!this.v.$i&&(this.Ja.style.cursor=
"none",this.v.$i=!0)}else!this.Ea.finished&&1E3<a.getTime()-this.rg&&(this.ya.splice(this.ya.indexOf(this.L),1),this.L=this.bl(!1),this.wc=this.L.cb,this.v.active=!1,this.v.xh=!0),this.v.enabled&&!this.T.vj()&&a.getTime()-this.rg>1E3*this.v.timeout&&!this.v.xh&&(this.v.Fg&&this.jj()||!this.v.Fg)&&(this.v.active=!0,this.v.startTime=a.getTime(),this.v.ld=0,this.H("autorotatechanged",{}),this.pan.d=0,this.u.d=0,this.fov.d=0,this.fov.Nc.enabled=!1),!this.ka.enabled||this.T.vj()||0==this.pan.d&&0==this.u.d&&
0==this.fov.d||(this.F.rj=!0,this.pan.d*=.9,this.u.d*=.9,this.fov.d*=.9,this.pan.m+=this.pan.d,this.u.m+=this.u.d,this.I.Of&&this.fov.Nc.enabled?this.nn(this.fov.d,this.fov.Nc):this.Ui(this.fov.d),1E-4>this.pan.d*this.pan.d+this.u.d*this.u.d+this.fov.d*this.fov.d&&(this.pan.d=0,this.u.d=0,this.fov.d=0,this.fov.Nc.enabled=!1),this.update())};e.prototype.kq=function(a){var b=this.D;b.Zc=!1;"previewtrack"==b.delay&&2!=this.Jd||"videopano"==b.delay&&!this.B.j?0<this.N.M.levels.length?this.N.M.levels[this.N.M.levels.length-
1].loaded||(b.Zc=!0):this.sa.mp()||(b.Zc=!0):"videopano"==b.delay&&this.B.j&&!this.B.qg&&(b.Zc=!0);b.Zc||this.ak(a)};e.prototype.ak=function(a){a||(a=new Date);var b=this.D;b.Zc=!1;b.he=!0;b.$p=a.getTime()+100;0==b.dd||b.Yg||this.vm()};e.prototype.vm=function(){var a=this.D;4==a.dd?(this.L=this.bl(!0,a.ym,a.zm,a.Ci),this.wc=this.L.cb,this.v.active=!0,this.Ea.running=!0):this.moveTo(a.ym,a.zm,a.Ci,a.Zg,0,a.ee)};e.prototype.It=function(a){var b=this.D;if(!b.Pp){if(b.Ld){var c=a.getTime()-b.yq;c/=1E3*
b.xq;1<=c?(b.Ql(1),b.Ld=!1,this.Kn(),this.Zp(),this.kq(a)):0<=c&&b.Ql(c)}else b.he&&(c=a.getTime()-b.$p,c/=1E3*b.eh,1<=c?(b.he=!1,this.rg=a.getTime(),this.update(),0!=b.dd&&b.Yg&&this.vm(),4!=b.dd&&(this.Vj(!1),this.v.active=b.me,this.v.sd=b.Ye,this.H("autorotatechanged",{}),b.me=!1,b.Ye=!1),this.v.ld=0,this.fa&&this.Nk(),this.gh=!1):0<=c&&b.Ql(c));b=this.Bt;b.Xq&&(b.aj?a.getTime()-b.Vk>=1E3*b.delay&&(b.aj=!1):(b.current+=b.ud,0>b.current&&(b.current=0,b.ud=-b.ud,b.aj=!0,b.Vk=a.getTime()),1<b.current&&
(b.current=1,b.ud=-b.ud,b.aj=!0,b.Vk=a.getTime())))}};e.prototype.Lt=function(){var a,b=this.K;if(0<b.Qb.length){for(a=0;a<b.Qb.length;a++)b.rd[a]!=b.Ac[a]&&(b.rd[a]>b.Ac[a]?(b.Ac[a]+=.05,b.rd[a]<b.Ac[a]&&(b.Ac[a]=b.rd[a])):(b.Ac[a]-=.05,b.rd[a]>b.Ac[a]&&(b.Ac[a]=b.rd[a],-1!=b.Yj.indexOf(b.Qb[a])&&(b.Yj.splice(b.Yj.indexOf(b.Qb[a]),1),b.Qb.splice(a,1),b.rd.splice(a,1),b.Ac.splice(a,1)))));this.update()}if(2==b.mode)for(a=0;a<this.J.length;a++){var c=this.J[a];"poly"==c.type&&c.jb!=c.Da&&(c.jb>c.Da?
(c.Da+=b.ud,c.jb<c.Da&&(c.Da=c.jb)):(c.Da-=b.ud,c.jb>c.Da&&(c.Da=c.jb)),this.update())}3==b.mode&&b.jb!=b.Da&&(b.jb>b.Da?(b.Da+=b.ud,b.jb<b.Da&&(b.Da=b.jb)):(b.Da-=b.ud,b.jb>b.Da&&(b.Da=b.jb)),this.update())};e.prototype.Kt=function(){var a=this.ka;this.T.vj()&&(this.I.Xd?(a.ha.x=.4*(this.ia.pa.x-a.pa.x),a.ha.y=.4*(this.ia.pa.y-a.pa.y),a.pa.x+=a.ha.x,a.pa.y+=a.ha.y):(a.ha.x=.1*-this.ia.ha.x*this.I.sensitivity/8,a.ha.y=.1*-this.ia.ha.y*this.I.sensitivity/8),this.rq(a.ha.x,a.ha.y),this.update());a.fov.active&&
(this.I.Of&&a.fov.center.enabled?this.ar(.4*(a.fov.mc-this.fov.m),a.fov.center):this.Ek(.4*(a.fov.mc-this.fov.m)),.001>Math.abs(a.fov.mc-this.fov.m)/this.fov.m&&(a.fov.active=!1),this.update());if(a.enabled&&(0!=a.ha.x||0!=a.ha.y)&&!this.T.vj()){var b=.9*(1-a.dm);a.ha.x*=b;a.ha.y*=b;this.F.rj=!0;.01>a.ha.x*a.ha.x+a.ha.y*a.ha.y?(a.ha.x=0,a.ha.y=0):(this.rq(a.ha.x,a.ha.y),this.update())}};e.prototype.Jt=function(){if(!this.jj()&&this.qf&&5<this.N.M.wp){var a,b=0,c=this.wd.length;if(this.Qg)c=50,this.Wk<
c&&this.Wk++,b=this.Wk;else for(a=0;a<c;a++)(this.wd[a].complete&&this.wd[a].src!=this.tr||""==this.wd[a].src)&&b++;b==c?(this.gi=1,this.isLoaded=!0,this.ua&&this.ua.ggLoaded&&this.ua.ggLoaded(),this.H("imagesready",{}),this.v.Fg&&this.v.enabled&&!this.F.active&&!this.D.Ld&&(this.v.active=!0,this.v.Fg=!1,this.v.startTime=(new Date).getTime(),this.v.ld=0)):this.gi=b/(1*c);this.H("downloadprogress",{percentLoaded:this.gi})}};e.prototype.ei=function(){var a=this;a.Sj||(a.uj?setTimeout(function(){a.Sj=
!1;a.ei()},1E3/60):window.requestAnimationFrame(function(){a.Sj=!1;a.ei()}));a.Sj=!0;this.Yl=this.Qj=0;a.F.rj=!1;var b=new Date;this.gj++;120<=this.gj&&(this.O("F/s: "+Math.round(1E3*this.gj/(b.getTime()-this.Mo))),this.Mo=b.getTime(),this.gj=0);this.H("timer",{});this.na&&this.sa.rr();this.Km&&(this.fc(),this.Km=!1);this.Kt();this.Jt();this.B.j&&this.B.Tc&&!this.We&&this.Om&&(this.L=this.Om,this.wi(10*this.B.j.currentTime));this.Gt(b);this.N.Ht();this.It(b);this.sa.fv();(0<=this.K.mode||0<this.K.Qb.length)&&
this.Lt();this.kk();if(this.xf.pan!=this.pan.m||this.xf.u!=this.u.m||this.xf.fov!=this.fov.m)this.xf.pan=this.pan.m,this.xf.u=this.u.m,this.xf.fov=this.fov.m,this.H("positionchanged",{});this.Fl!=this.Z()&&(this.Fl=this.Z(),this.H("projectionchanged",{}));this.tb&&(0<this.ph?this.ph--:(this.tb=!1,this.ph=0),this.D.he||this.D.Ld||this.D.Zc||this.je||(this.Ii(),this.H("renderframe",{})),this.H("repaint",{}));b=this.fo();b!=this.No&&(b?(this.ua&&this.ua.ggReLoadedLevels&&this.ua.ggReLoadedLevels(),this.H("tilesrequested",
{})):(a.ua&&a.ua.ggLoadedLevels&&a.ua.ggLoadedLevels(),this.H("tilesready",{})),this.No=b)};e.prototype.Ah=function(a){switch(a){case 4:a=Math.min(110,this.fov.max);break;case 12:a=Math.min(270,this.fov.Kl);a=Math.min(360*this.aspect(),a);a=Math.min(360/this.aspect(),a);break;case 9:a=Math.min(270,this.fov.Ll);break;default:a=90}return a};e.prototype.kk=function(){this.Qk.On(this.pan.m,this.u.m);for(var a=0;a<this.X.length+this.U.length;a++){if(a<this.X.length)var b=this.X[a];else if(b=this.U[a-this.X.length],
b.od)continue;b.kk()}};e.prototype.Du=function(a,b){var c=this;var m="<<U>>"+String(c.kb);m=m.toUpperCase();"U"!=m.charAt(2)&&(c.I.ng=!1);if(0!=c.Yh.length||!c.I.ng||c.I.jh||c.I.kh&&c.rf()||c.I.Yi)if(c.zd)c.$.removeChild(c.zd),c.zd=null;else{c.zd=document.createElement("div");var h=c.zd;m="left: "+a+"px;top:\t "+(b+"px;z-index: 32000;");m+="position:relative;";m+="display: table;";m+="color: black;";m+="background-color: white;";m+="border: 1px solid lightgray;";m+="box-shadow: 1px 1px 3px #333;";
m+="font-family: Verdana, Arial, Helvetica, sans-serif;";m+="font-size: 9pt;";m+="opacity : 0.95;";h.setAttribute("style",m);h.setAttribute("class","gg_contextmenu");m=document.createElement("style");a=document.createTextNode(".gg_context_row:hover { background-color: #3399FF }");m.type="text/css";m.styleSheet?m.styleSheet.cssText=a.nodeValue:m.appendChild(a);h.appendChild(m);for(a=0;a<c.Yh.length;a++)if(b=c.Yh[a],""!=b.text){var n=document.createElement("div");m="text-align: left;";m+="margin: 0;";
m+="padding: 5px 20px;";m+="vertical-align: left;";n.setAttribute("style",m);n.setAttribute("class","gg_context_row");""!=b.url?(m=document.createElement("a"),m.href=b.url,m.target="_blank",m.innerHTML=this.Va(b.text),m.setAttribute("style","color: black; text-decoration: none;"),n.appendChild(m)):(m=document.createElement("span"),m.innerHTML=this.Va(b.text),m.setAttribute("style","color: black; text-decoration: none;"),n.appendChild(m));h.appendChild(n)}0<c.Yh.length&&(!c.I.ng||c.I.jh||c.I.kh&&c.rf()||
c.I.Yi)&&h.appendChild(document.createElement("hr"));if(c.I.Yi&&c.na){b=[];b.push({text:this.Va("Rectilinear Projection"),ji:4});b.push({text:this.Va("Stereographic Projection"),ji:9});b.push({text:this.Va("Fisheye Projection"),ji:12});for(a=0;a<b.length;a++){n=b[a];var p=document.createElement("div");p.setAttribute("class","gg_context_row");m="text-align: left;";m+="margin: 0;";m=c.Z()==n.ji?m+"padding: 5px 20px 5px 7px;":m+"padding: 5px 20px;";m+="vertical-align: left;";m+="cursor: pointer;";p.setAttribute("style",
m);p.onclick=function(r){return function(){c.Fk(r,1);c.update()}}(n.ji);p.innerHTML=c.Z()==n.ji?"&#10687; "+n.text:n.text;h.appendChild(p)}(!c.I.ng||c.I.jh||c.I.kh&&c.rf())&&h.appendChild(document.createElement("hr"))}c.I.jh&&(a=document.createElement("div"),a.setAttribute("class","gg_context_row"),m="text-align: left;margin: 0;padding: 5px 20px;",m+="vertical-align: left;",m+="cursor: pointer;",a.setAttribute("style",m),a.onclick=function(){c.hk()},a.innerHTML=c.Lh()?this.Va("Exit Fullscreen"):this.Va("Enter Fullscreen"),
h.appendChild(a));c.I.kh&&c.rf()&&(a=document.createElement("div"),a.setAttribute("class","gg_context_row"),m="text-align: left;margin: 0;padding: 5px 20px;",m+="vertical-align: left;",m+="cursor: pointer;",a.setAttribute("style",m),a.onclick=function(){c.ag()},a.innerHTML="Enter VR",h.appendChild(a));c.I.ng||(a=document.createElement("div"),m="text-align: left;margin: 0;padding: 5px 20px;",m+="vertical-align: left;",a.setAttribute("style",m),a.setAttribute("class","gg_context_row"),m=document.createElement("a"),
m.href=e.oh("aHR0cDovL3Bhbm8ydnIuY29tLw=="),m.target="_blank",m.innerHTML=e.oh("Q3JlYXRlZCB3aXRoIFBhbm8yVlI="),7<this.Dj.length&&(m.innerHTML+="<br/>"+e.Cn(this.Dj).replace(/./gm,function(r){return"&#"+r.charCodeAt(0)+";"})),m.setAttribute("style","color: black; text-decoration: none;"),a.appendChild(m),h.appendChild(a));c.$.insertBefore(c.zd,c.$.firstChild);h.onclick=function(){c.zd&&(c.$.removeChild(c.zd),c.zd=null)};h.oncontextmenu=h.onclick}};e.prototype.Wq=function(){var a=this;var b=a.Ja;a.control=
b;a.control=b;setTimeout(function(){a.ei()},10);setTimeout(function(){a.jp()},200);setTimeout(function(){a.ie();a.Ii()},10);b.addEventListener&&(b.addEventListener("touchstart",function(c){a.Zu(c)},!1),b.addEventListener("touchmove",function(c){a.Yu(c)},!1),b.addEventListener("touchend",function(c){a.Xu(c)},!1),b.addEventListener("touchcancel",function(c){a.Wu(c)},!1),b.addEventListener("pointerdown",function(c){a.Xo(c)},!1),b.addEventListener("MSPointerDown",function(c){a.Xo(c)},!1),b.addEventListener("MSGestureStart",
function(c){a.Wn(c)},!1),b.addEventListener("MSGestureEnd",function(c){a.Vn(c)},!1),b.addEventListener("MSGestureChange",function(c){a.lt(c)},!1),b.addEventListener("gesturestart",function(c){a.Wn(c)},!1),b.addEventListener("gesturechange",function(c){a.Br(c)},!1),b.addEventListener("gestureend",function(c){a.Vn(c)},!1),b.addEventListener("mousedown",function(c){a.it(c)},!1),b.addEventListener("mousemove",function(c){a.ht(c)},!1),document.addEventListener("mouseup",function(c){a.gt(c)},!1),b.addEventListener("mousewheel",
function(c){a.Wo(c)},!1),b.addEventListener("DOMMouseScroll",function(c){a.Wo(c)},!1),document.addEventListener("keydown",function(c){a.Xs(c)},!1),document.addEventListener("keyup",function(c){a.Ys(c)},!1),window.addEventListener("resize",function(){a.ie()},!1),a.lc.addEventListener("resize",function(){a.ie()},!1),window.addEventListener("blur",function(){a.st()},!1),a.$.addEventListener("webkitfullscreenchange",function(){a.di()},!1),document.addEventListener("mozfullscreenchange",function(){a.di()},
!1),window.addEventListener("webkitfullscreenchange",function(){a.di()},!1),document.addEventListener("MSFullscreenChange",function(){a.di()},!1),document.addEventListener("fullscreenchange",function(){a.di()},!1));b.oncontextmenu=function(c){void 0===c&&(c=window.event);return c.target&&!a.Jc(c.target)?!0:c.ctrlKey?!0:(c=a.ve(c),a.Du(c.x,c.y),!1)};window.addEventListener("deviceorientation",function(c){a.yt(c.alpha,c.beta,c.gamma,c.absolute);null!=c.alpha&&null!=c.beta&&null!=c.gamma&&0==a.rl&&(a.rl=
!0,a.H("gyroavailable",{available:!0}),a.H("playerstatechanged",{}))})};e.prototype.$m=function(){for(var a=0;a<this.J.length;a++)if("point"==this.J[a].type&&(this.ga&&this.ga.addSkinHotspot?(this.J[a].cg(),this.J[a].j=this.ga.addSkinHotspot(this.J[a])):(this.J[a].j=new x.Aq(this,this.J[a]),this.J[a].gd&&this.J[a].Lf&&(this.J[a].j.ggUse3d=!0,this.J[a].j.gg3dDistance=this.J[a].bj)),this.J[a].j.__div.style.left="-1000px",this.J[a].j.__div.style.top="-1000px",this.J[a].j&&this.J[a].j.__div)){var b=this.Ja.firstChild;
b?this.Ja.insertBefore(this.J[a].j.__div,b):this.Ja.appendChild(this.J[a].j.__div)}};e.prototype.br=function(){if(!this.ga||!this.ga.addSkinHotspot)for(var a=0;a<this.J.length;a++)"point"==this.J[a].type&&this.J[a].j&&this.J[a].j.Is()};e.prototype.cr=function(){for(var a=0;a<this.Xa.length;a++)this.Xa[a].Rd();for(a=0;a<this.Tb.length;a++)this.Tb[a].Rd();for(a=0;a<this.X.length;a++)this.X[a].Rd();for(a=0;a<this.U.length;a++)this.U[a].Rd()};e.prototype.Tm=function(){var a,b=document.createElement("fakeelement"),
c={OTransition:"oTransitionEnd",MSTransition:"msTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd",transition:"transitionEnd"};for(a in c)if(void 0!==b.style[a])return c[a]};e.prototype.Wa=function(a){var b=[];a="#"==a.substr(0,1)?a.substr(1):"^"+a+"$";a=new RegExp(a,"");for(var c=0;c<this.X.length;c++)a.test(this.X[c].id)&&b.push(this.X[c]);for(c=0;c<this.U.length;c++)a.test(this.U[c].id)&&b.push(this.U[c]);for(c=0;c<this.Xa.length;c++)a.test(this.Xa[c].id)&&b.push(this.Xa[c]);
for(c=0;c<this.Tb.length;c++)a.test(this.Tb[c].id)&&b.push(this.Tb[c]);return b};e.prototype.$r=function(a){if("_videopanorama"==a)return this.B.j;a=this.Wa(a);return 0<a.length?a[0].j:null};e.prototype.Zr=function(a){a=this.Wa(a);return 0<a.length&&a[0].wa?a[0]:null};e.prototype.qp=function(a,b){var c=this;b.addEventListener("ended",function(h){c.H("videoended",{video:h.target})});b.addEventListener("pause",function(h){c.H("videopaused",{video:h.target})});b.addEventListener("play",function(h){c.H("videostarted",
{video:h.target})});for(var m=0;m<this.U.length;m++)if(this.U[m].id==a)return this.U[m].j=b,this.U[m];m=new x.Zm(this);m.registerElement(a,b);return m};e.prototype.isPlaying=function(a){if("_main"===a)return!0;a=this.Wa(a);return 0<a.length?a[0].wa?a[0].wg:!a[0].j.ended&&!a[0].j.paused:!1};e.prototype.Zd=function(a,b){var c=this,m=null;if(!this.qd)try{for(var h=this.Wa(a),n=0;n<h.length;n++){var p=h[n];if(p instanceof x.ke){p.sb=b&&!isNaN(Number(b))?Number(b)-1:p.loop-1;-1==p.sb&&(p.sb=1E7);this.O(p.j);
this.isPlaying(a)&&this.bk(a);if(p.wa)p.pe();else{m=p.j.play();if(void 0!==m)m.then(function(){c.Cg(!0)})["catch"](function(){c.Cg(!1)});p.Od&&p.Pf()}this.ui(p.id,!1)}}}catch(r){this.O(r)}return m};e.prototype.lp=function(a,b){a=this.Wa(a);for(var c=0;c<a.length;c++){var m=a[c];this.isPlaying(m.id)?this.fi(m.id):this.Zd(m.id,b)}};e.prototype.Nt=function(a,b){a=this.Wa(a);for(var c=0;c<a.length;c++){var m=a[c];m instanceof x.ke&&(this.isPlaying(m.id)?this.bk(m.id):this.Zd(m.id,b))}};e.prototype.fi=
function(a){try{var b=void 0;if("_main"==a){this.ui(a,!0);for(b=0;b<this.X.length;b++)this.X[b].wa?this.X[b].Bk():this.X[b].j.pause();for(b=0;b<this.U.length;b++)this.U[b].j.pause()}else{var c=this.Wa(a);for(b=0;b<c.length;b++){var m=c[b];m instanceof x.ke&&(this.ui(m.id,!0),m.wa?m.Bk():m.j.pause())}}}catch(h){this.O(h)}};e.prototype.Mq=function(a,b){a=this.Wa(a);for(var c=0;c<a.length;c++){var m=a[c];0==b||1==b?m.pf&&m.pf(1==b):2==b&&m.ze&&m.ze();!m.Na||-1==this.Xa.indexOf(m)&&-1==this.U.indexOf(m)&&
-1==this.Tb.indexOf(m)||(this.Yb=this.Le=m)}};e.prototype.bk=function(a){var b;try{if("_main"===a){this.ui(a,!0);for(b=0;b<this.X.length;b++)this.X[b].wa?this.X[b].Uf():(this.X[b].j.pause(),this.X[b].j.currentTime=0);for(b=0;b<this.U.length;b++)this.U[b].j.pause(),this.U[b].j.currentTime=0}else{var c=this.Wa(a);for(b=0;b<c.length;b++){var m=c[b];m instanceof x.ke&&(this.ui(m.id,!0),m.wa?m.Uf():m.j&&m.j.pause&&(m.j.pause(),m.j.currentTime=0))}}}catch(h){this.O(h)}};e.prototype.ui=function(a,b){a=this.Wa("_main"===
a?".*":a);for(var c=0;c<a.length;c++)a[c].stopped=b};e.prototype.Gu=function(a){a=this.Wa(a);return 0<a.length?(a=a[0],a instanceof x.ke?a.wa?a.Zq():a.j?a.j.currentTime:0:0):0};e.prototype.Iu=function(a,b){a=this.Wa(a);for(var c=0;c<a.length;c++){var m=a[c];m instanceof x.ke&&(m.wa?(0>b&&(b=0),b>m.Si.duration&&(b=m.Si.duration-.1),m.$q(b)):m.j&&(0>b&&(b=0),b>m.j.duration&&(b=m.j.duration-.1),m.j.currentTime=b))}};e.prototype.Hu=function(a,b){a=this.Wa(a);0<a.length&&(a=a[0],a.j&&(a.j.playbackRate=
b))};e.prototype.setVolume=function(a,b){try{var c=void 0,m=Number(b);1<m&&(m=1);0>m&&(m=0);"_videopanorama"===a&&this.B.j&&(this.B.j.volume=m);if("_main"===a){this.ba=m;for(c=0;c<this.X.length;c++)this.X[c].j.volume=this.X[c].level*this.ba;for(c=0;c<this.U.length;c++)this.U[c].j.volume=this.U[c].level*this.ba;this.B.j&&(this.B.j.volume=this.ba)}else{var h=this.Wa(a);this.O(h);for(c=0;c<h.length;c++){var n=h[c];n.j&&null!=n.j.volume&&(n.j.volume=m*this.ba);n.level=m}}}catch(p){this.O(p)}};e.prototype.hr=
function(a,b){try{var c=void 0,m=void 0;"_videopanorama"===a&&this.B.j&&(this.B.j.volume+=Number(b));if("_main"===a){c=this.ba;c+=Number(b);1<c&&(c=1);0>c&&(c=0);this.ba=c;for(m=0;m<this.X.length;m++)this.X[m].j.volume=this.X[m].level*this.ba;for(m=0;m<this.U.length;m++)this.U[m].j.volume=this.U[m].level*this.ba;this.B.j&&(this.B.j.volume=this.ba)}else{var h=this.Wa(a);for(m=0;m<h.length;m++){var n=h[m];n instanceof x.ke&&(c=n.level,c+=Number(b),1<c&&(c=1),0>c&&(c=0),n.level=c,n.j&&null!=n.j.volume&&
(n.j.volume=c*this.ba))}}}catch(p){this.O(p)}};e.prototype.mm=function(a,b){if("_main"===a||"_all"===a||"_videopanorama"===a)"_all"===a&&(b=(this.qd=1==b||-1==b&&!this.qd?!0:!1)?1:0),this.B.j&&(this.B.j.muted=-1==b?!this.B.j.muted:1==b);a=this.Wa("_main"===a||"_all"===a?".*":a);for(var c=0;c<a.length;c++){var m=a[c];m.Kp&&m.Kp(b)}};e.prototype.ot=function(a){this.mm(a,1)};e.prototype.av=function(a){this.mm(a,0)};e.prototype.Uu=function(a){this.mm(a,-1)};e.prototype.Lr=function(){return this.Ce};e.prototype.Ss=
function(){this.hn=document.createElement("audio");this.hn.src="./media/testsound.mp3"};e.prototype.Vp=function(){var a=this;this.ra&&"suspended"===this.ra.state&&this.ra.resume();var b=a.hn.play();if(void 0!==b)b.then(function(){a.Cg(!0)})["catch"](function(){a.Cg(!1)})};e.prototype.Wp=function(){this.Ce&&1!=this.xi?this.Vp():this.te=this.jf=!1};e.prototype.ss=function(){return this.xi};e.prototype.Cg=function(a){if(1!=this.xi){var b=a?1:0;this.xi!=b&&(this.xi=b,this.H("soundspermittedchanged",{permitted:a}))}};
e.prototype.Lu=function(){var a=this;this.hg();this.te&&setTimeout(function(){a.hg()},200)};e.prototype.Wj=function(a,b,c){a.j.style.opacity=0==b?1:0;a.j.style[this.$b]="opacity "+c+"ms";a.j.style.opacity=0==b?0:1};e.prototype.hu=function(a,b,c){function m(){var r=h[p];if(!r.j)return"continue";0==b?(n.Wj(r,b,c),setTimeout(function(){0==r.j.style.opacity&&r.If(!1)},c+10),r.oc=!1):1==b?(n.Wj(r,b,c),r.If(!0),r.oc=!0):2==b&&("visible"==r.j.style.visibility?(n.Wj(r,0,c),setTimeout(function(){0==r.j.style.opacity&&
r.If(!1)},c+10),r.oc=!1):(n.Wj(r,1,c),r.If(!0),r.oc=!0))}for(var h=this.Wa(a),n=this,p=0;p<h.length;p++)m()};e.prototype.Zp=function(){var a=this;try{for(var b=this,c=!1,m=!1,h=0;h<this.X.length;h++){var n=this.X[h];if(-1!=n.loop&&!this.isPlaying(n.id)&&!n.stopped){var p=void 0;this.ra&&this.Za.enabled&&4!=n.mode&&6!=n.mode&&!this.qd?this.Za.zn?(n.wa?n.pe():(p=n.j.play(),n.Od&&n.Pf(),n.j.currentTime=0),n.va=0,m=!0):c=!0:4==n.mode||6==n.mode||"_background"==n.id&&this.isPlaying(n.id)||this.qd||(n.wa?
n.pe():(p=n.j.play(),n.j.currentTime&&(n.j.currentTime=0)));if(void 0!==p)p.then(function(){a.Cg(!0)})["catch"](function(){a.Cg(!1)})}}c&&setTimeout(function(){b.Za.Ou()},1E3*this.Za.Fb);m&&(this.Za.Ku=this.ra.currentTime,this.Za.Ju=setInterval(function(){b.Za.yr()},10))}catch(r){this.O(r)}};e.prototype.Kn=function(){for(var a=0;a<this.Za.Hi.length;a++)this.Za.Jn(this.Za.Hi[a])};e.prototype.vp=function(){for(var a;0<this.J.length;)a=this.J.pop(),a.j&&(this.Ja.removeChild(a.j.__div),delete a.j),a.j=
null;this.K.Da=0;this.K.jb=0;this.H("hotspotsremoved",{})};e.prototype.om=function(a){this.Nf=a;this.$.style.zIndex=0!=a?a.toString():"auto";this.Qa&&this.Qa.vd&&(this.Qa.vd.zIndex=(a+4).toString());this.Ja.style.zIndex=(a+4).toString();this.rb.style.zIndex=(a+3).toString();this.Fa.style.zIndex=(a+5).toString();for(var b=0;b<this.pj();b++){var c=b<this.U.length?this.U[b]:this.Xa[b-this.U.length];c.j&&(c.j.style.zIndex=(a+(c.Na?8E4:0)).toString())}};e.prototype.Uj=function(a){var b=this.isFullscreen!==
a;this.isFullscreen!==a&&(this.isFullscreen=a,this.update(100));if(this.isFullscreen){if(this.mk)try{this.$.webkitRequestFullScreen?this.$.webkitRequestFullScreen():this.$.mozRequestFullScreen?this.$.mozRequestFullScreen():this.$.msRequestFullscreen?this.$.msRequestFullscreen():this.$.requestFullScreen?this.$.requestFullScreen():this.$.requestFullscreen&&this.$.requestFullscreen()}catch(c){this.O(c)}this.$.style.position="absolute";a=this.Dh();this.$.style.left=window.pageXOffset-a.x+this.margin.left+
"px";this.$.style.top=window.pageYOffset-a.y+this.margin.top+"px";this.om(10);document.body.style.overflow="hidden";b&&(this.ua&&this.ua.ggEnterFullscreen&&this.ua.ggEnterFullscreen(),this.H("fullscreenenter",{}),this.H("playerstatechanged",{}))}else{if(this.mk)try{document.webkitIsFullScreen?document.webkitCancelFullScreen():document.mozFullScreen?document.mozCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():document.fullScreen&&(document.cancelFullScreen?document.cancelFullScreen():
document.exitFullscreen&&document.exitFullscreen())}catch(c){this.O(c)}this.$.style.position="relative";this.$.style.left="0px";this.$.style.top="0px";this.om(0);document.body.style.overflow="";b&&(this.ua&&this.ua.ggExitFullscreen&&this.ua.ggExitFullscreen(),this.H("fullscreenexit",{}),this.H("playerstatechanged",{}))}this.ie()};e.prototype.hk=function(){this.Uj(!this.isFullscreen)};e.prototype.ur=function(){this.Uj(!0)};e.prototype.exitFullscreen=function(){this.Uj(!1)};e.prototype.Pr=function(){return this.isFullscreen};
e.prototype.ag=function(){this.Ga.mr();this.yp();this.Ga.ag();this.Ga.At();return!0};e.prototype.ys=function(){return"N/A"};e.prototype.xs=function(){if(this.Ga)return this.Ga.pg()?this.Ga.Pm:this.Ga.camera};e.prototype.zs=function(){if(this.Ga)return this.Ga.Sa};e.prototype.wu=function(a){this.Ga&&(this.Ga.ig=a)};e.prototype.bg=function(){this.Ga&&(this.Ga.bg(),this.Ga.Ff(),this.Ga.Jk());return!0};e.prototype.gq=function(){this.Ga&&(this.Ga.pg()?this.bg():this.ag());return!0};e.prototype.pg=function(){return this.Ga&&
this.Ga.pg()?!0:!1};e.prototype.rf=function(){return this.Ga&&this.Ga.rf()?!0:!1};e.prototype.ml=function(){return this.Ga?this.Ga.ml():!1};e.prototype.Mu=function(a,b,c){this.v.Qd=this.v.Ri;this.v.sd=this.v.Tg;this.v.enabled=!0;this.v.Rf=this.v.enabled;this.v.active=!0;this.v.ld=0;var m=new Date;this.v.Gd=0;this.v.startTime=m.getTime();void 0!==a&&0!=a&&(this.v.speed=a);void 0!==b&&(this.v.timeout=b);void 0!==c&&(this.v.gk=c);this.H("autorotatechanged",{})};e.prototype.Pu=function(){this.v.active=
!1;this.v.enabled=!1;this.v.Rf=this.v.enabled;this.We=this.v.Fj=!1;this.F.active&&this.F.ai&&(this.F.active=!1,this.F.ai=!1,this.F.pb=0);this.H("autorotatechanged",{})};e.prototype.Tu=function(){this.v.enabled=!this.v.active;this.v.Rf=this.v.enabled;this.v.active=this.v.enabled;this.v.ld=0;if(this.v.enabled){var a=new Date;this.v.Gd=0;this.v.startTime=a.getTime();this.v.Qd=this.v.Ri;this.v.sd=this.v.Tg}this.H("autorotatechanged",{})};e.prototype.Mt=function(){this.ma(!1)};e.prototype.Vt=function(){this.v.enabled&&
(this.v.active=!0,this.v.ld=0)};e.prototype.au=function(a){this.v.vg=a;this.v.ap=!0};e.prototype.Up=function(a){this.Ea.running&&this.Ep();this.wc="";a&&""!=a&&(this.v.Qd=a);this.v.Rf=this.v.enabled;this.v.sd=!0;this.v.enabled=!0;this.v.active=!0;this.v.ld=0;this.D.he&&(this.D.Ye=!0,this.D.me=!0);a=new Date;this.v.Gd=0;this.v.startTime=a.getTime();this.H("autorotatechanged",{})};e.prototype.Ut=function(a){a&&""!=a&&this.v.Qd!=a||0==this.v.Gd?this.Up(a):(this.v.sd=!0,this.v.enabled=!0,this.v.active=
!0,this.H("autorotatechanged",{}))};e.prototype.Ep=function(){this.Ea.running=!1;this.Ea.finished=!0;this.v.active=this.D.me;this.v.sd=this.D.Ye;this.ya.splice(this.ya.indexOf(this.L),1);0<this.ya.length&&(this.L=this.ya[0]);this.wc="";this.Vj(!1);this.D.me=!1;this.D.Ye=!1;this.rg=(new Date).getTime()};e.prototype.sn=function(a){if(this.lc=document.getElementById(a))return this.lc.innerHTML="",!0;alert("container not found!");return!1};e.prototype.cu=function(a){var b=this;b.lc.removeEventListener("resize",
function(){b.ie()});b.sn(a)&&(b.lc.appendChild(b.$),b.lc.addEventListener("resize",function(){b.ie()},!1))};e.prototype.yn=function(a){this.sn(a)&&(this.$=document.createElement("div"),this.$.onselectstart=function(){return!1},S&&this.$.setAttribute("id","viewport"),this.$.setAttribute("role","application"),a="top:\t0px;left: 0px;position:relative;-ms-touch-action: none;touch-action: none;text-align: left;"+(this.kb+"user-select: none;"),this.$.setAttribute("style",a),this.lc.appendChild(this.$),
this.ea=document.createElement("div"),a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;-ms-touch-action: none;touch-action: none;"+(this.kb+"user-select: none;"),S&&this.ea.setAttribute("id","viewer"),this.ea.setAttribute("style",a),this.$.appendChild(this.ea),this.Qa&&(this.Qa.vd=document.createElement("canvas"),S&&this.Qa.vd.setAttribute("id","lensflarecanvas"),a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;"+(this.kb+"user-select: none;"),
a+=this.kb+"pointer-events: none;",this.Qa.vd.setAttribute("style",a),this.$.appendChild(this.Qa.vd)),this.Ja=document.createElement("div"),S&&this.Ja.setAttribute("id","hotspots"),a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;",this.Al&&(a+="background-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);"),this.Sc&&!this.na&&(a+=this.kb+"transform: translateZ(9999999px);"),a+=this.kb+"user-select: none;",this.Ja.setAttribute("style",
a),this.$.appendChild(this.Ja),this.rb=document.createElement("canvas"),S&&this.rb.setAttribute("id","hotspotcanvas"),a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;"+(this.kb+"user-select: none;"),a+=this.kb+"pointer-events: none;",this.rb.setAttribute("style",a),this.$.appendChild(this.rb),this.Fa=document.createElement("div"),S&&this.Fa.setAttribute("id","hotspottext"),this.Fa.setAttribute("style","top:\t0px;left: 0px;position:absolute;padding: 3px;visibility: hidden;"),
this.Fa.classList.add("ggskin"),this.Fa.classList.add("ggdefaulthotspot"),this.Fa.innerHTML=" Hotspot text!",this.$.appendChild(this.Fa),this.divSkin=this.ua=this.Ja,this.om(0))};e.prototype.Ff=function(){var a;this.ka.ha.x=0;this.ka.ha.y=0;this.sa.Ff();var b=[];for(a=0;a<this.U.length;a++){var c=this.U[a];c.od?b.push(c):c.Ne()}for(a=0;a<this.Xa.length;a++)this.Xa[a].Ne();for(a=0;a<this.Tb.length;a++)this.Tb[a].Ne();this.K.Ph=-1;this.rb.style.visibility="hidden";this.Jd=0;this.Jf=[];this.Za.Hi=[];
for(a=0;a<this.X.length;a++)c=this.X[a],c.$o||7>this.fd&&0==c.mode||this.Jf.push(c);this.U=b;this.Xa=[];this.Tb=[];this.B.j&&(this.$.removeChild(this.B.j),this.B.j=null,a=this.Wa("_videopanorama"),0<a.length&&(a[0].j=null));this.B.Tc=!1;this.B.qg=!1};e.prototype.so=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}};e.prototype.jo=function(){var a=this.so();return a.w>a.h?a.w:a.h};e.prototype.Xl=
function(a,b){a=(new DOMParser).parseFromString(a,"text/xml");this.pp(a,b)};e.prototype.op=function(a,b,c){try{var m=void 0;m=new XMLHttpRequest;m.open("GET",a,!1);m.send(null);if(m.responseXML){var h=a.lastIndexOf("/");0<=h&&(this.ne=a.slice(0,h+1));2<=arguments.length&&null!=b&&(this.ne=b);this.Xl(m.responseText,c)}else alert("Error loading panorama XML")}catch(n){alert("Error:"+n)}};e.prototype.Pt=function(a,b,c,m){var h=new XMLHttpRequest;var n=this;h.onload=function(p){if(4<=h.readyState)if(h.responseXML){var r=
a.lastIndexOf("/");0<=r&&(n.ne=a.slice(0,r+1));3<=arguments.length&&null!=c&&(n.ne=c);n.Xl(h.responseText,m);b&&b()}else alert("Error loading panorama XML");else console.error("Wrong state loading XML:"+h.statusText)};h.onerror=function(){console.error("Error loading XML:"+h.statusText)};h.open("GET",a,!0);h.send(null)};e.prototype.Dk=function(a){var b="";"{"==a.charAt(0)&&(b=a.slice(1,a.length-1));(a=this.qe[b])&&(b=a);a={oldNodeId:this.xa,nodeId:b};this.H("beforechangenodeid",a);this.pl?this.pl=
!1:this.Nl.push(this.xa);""!=this.xa&&-1==this.pk.indexOf(this.xa)&&(this.pk.push(this.xa),this.H("changevisitednodes",{}));this.Oo=this.xa;this.xa=b;this.O("change active node: "+b);this.ga&&this.ga.changeActiveNode&&this.ga.changeActiveNode("{"+b+"}");this.H("changenodeid",a);this.jf=!0};e.prototype.hj=function(){return this.xa};e.prototype.cs=function(a){return 0<this.$a.length?(a||(a=this.xa),a=this.$a.indexOf(a),a++,a>=this.$a.length&&(a=0),this.$a[a]):""};e.prototype.ps=function(a){return 0<
this.$a.length?(a||(a=this.xa),a=this.$a.indexOf(a),a--,0>a&&(a=this.$a.length-1),this.$a[a]):""};e.prototype.Ur=function(){return this.Oo};e.prototype.ts=function(){return this.ec};e.prototype.qt=function(a){return-1!=this.pk.indexOf(a)};e.prototype.jr=function(){this.pk=[];this.H("changevisitednodes",{})};e.prototype.pp=function(a,b){a=a.firstChild;this.Ve=[];this.$a=[];this.qe=[];this.Ce=!1;var c;if(c=a.getAttributeNode("appversion")){if(c=c.nodeValue.toString().match(/(\d+)\.(\d+)\.?(\d+)?/))this.un=
[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3]||"0",10)];this.O(this.un)}for(var m=a.firstChild;m;){if("map"==m.nodeName){var h={};(c=m.getAttributeNode("index"))&&(h.index=Number(c.nodeValue));(c=m.getAttributeNode("title"))&&(h.title=c.nodeValue.toString());c=m.getAttributeNode("type");h.type=c.nodeValue.toString();"web"==h.type?(c=m.getAttributeNode("mapprovider"),h.mapprovider=c.nodeValue.toString(),(c=m.getAttributeNode("mapstyle"))&&(h.mapstyle=c.nodeValue.toString()),(c=m.getAttributeNode("googlecustomstylecode"))&&
(h.googlecustomstylecode=c.nodeValue.toString()),(c=m.getAttributeNode("mapurltemplate"))&&(h.mapurltemplate=c.nodeValue.toString()),(c=m.getAttributeNode("mapmaxzoom"))&&(h.mapmaxzoom=Number(c.nodeValue)),(c=m.getAttributeNode("customlayernames"))&&(h.customlayernames=c.nodeValue.toString().split("|")),(c=m.getAttributeNode("customlayerurltemplates"))&&(h.customlayerurltemplates=c.nodeValue.toString().split("|")),(c=m.getAttributeNode("customlayermaxzooms"))&&(h.customlayermaxzooms=c.nodeValue.toString().split("|")),
(c=m.getAttributeNode("mapkey"))&&(h.mapkey=c.nodeValue.toString()),(c=m.getAttributeNode("styleurl"))&&(h.styleurl=c.nodeValue.toString()),(c=m.getAttributeNode("mapboxlayernames"))&&(h.mapboxlayernames=c.nodeValue.toString().split("|")),(c=m.getAttributeNode("mapboxlayerstyleurls"))&&(h.mapboxlayerstyleurls=c.nodeValue.toString().split("|")),(c=m.getAttributeNode("googlelayernames"))&&(h.googlelayernames=c.nodeValue.toString().split("|")),(c=m.getAttributeNode("googlelayerstyles"))&&(h.googlelayerstyles=
c.nodeValue.toString().split("|")),(c=m.getAttributeNode("maplimits"))&&(h.maplimits=c.nodeValue.toString().split("|"))):(c=m.getAttributeNode("width"),h.width=Number(c.nodeValue),c=m.getAttributeNode("height"),h.height=Number(c.nodeValue),c=m.getAttributeNode("zoomlevels"),h.zoomlevels=Number(c.nodeValue),c=m.getAttributeNode("tileformat"),h.tileformat=c.nodeValue.toString(),c=m.getAttributeNode("bgcolor"),h.bgcolor=c.nodeValue.toString(),c=m.getAttributeNode("crispedges"),h.crispedges=1==c.nodeValue,
c=m.getAttributeNode("transparent"),h.transparent=1==c.nodeValue,c=m.getAttributeNode("floorplannorth"),h.floorplannorth=Number(c.nodeValue));c=m.getAttributeNode("id");this.rc[c.nodeValue.toString()]=h}m=m.nextSibling}if("tour"==a.nodeName){this.uf=!0;if(c=a.getAttributeNode("start"))this.ec=c.nodeValue.toString();this.hasOwnProperty("startNode")&&this.startNode&&(this.ec=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="");m=a.firstChild;for(a=h="";m;){if("panorama"==m.nodeName){if(c=m.getAttributeNode("id"))h=c.nodeValue.toString(),""==this.ec&&(this.ec=h),""==a&&(a=h),this.Ve[h]=m,this.$a.push(h);for(c=m.firstChild;c;){if("userdata"==c.nodeName){var n=this.dg(c);this.Vg[h]=n;h==this.ec&&(this.Vg._first=n);n.customnodeid&&(this.qe[n.customnodeid]=h);this.Vc[h]=this.Gn(c);this.tg[h]=this.Hn(c);this.Mf[h]=this.In(c)}if("hotspots"==
c.nodeName)for(n=c.firstChild;n;)"hotspot"!=n.nodeName&&"polyhotspot"!=n.nodeName||this.Xk(h,c),n=n.nextSibling;if("sounds"==c.nodeName||"media"==c.nodeName)for(n=c.firstChild;n;){"sound"!=n.nodeName||this.Ml||(this.Ce=!0);if("video"==n.nodeName){var p;(p=n.getAttributeNode("level"))&&0<Number(p.nodeValue)&&(this.Ce=!0)}n=n.nextSibling}c=c.nextSibling}}if("masternode"==m.nodeName)for(c=m.firstChild;c;){"userdata"==c.nodeName&&(n=this.dg(c),this.Vg._master=n);"animationsequences"==c.nodeName&&this.wr(c);
if("translations"==c.nodeName){(p=c.getAttributeNode("json"))&&this.Pi(p.nodeValue.toString());for(n=c.firstChild;n;){"json"==n.nodeName&&this.Pi(n.textContent);if("projecttranslation"==n.nodeName){var r={};if(p=n.getAttributeNode("langcode"))r.langCode=p.nodeValue;if(p=n.getAttributeNode("langname"))r.langName=p.nodeValue;this.Tl.push(r)}n=n.nextSibling}this.El||this.lm(window.navigator.language)}c=c.nextSibling}"customproperty"==m.nodeName&&this.Fn(m);m=m.nextSibling}!this.Ve.hasOwnProperty(this.ec)&&
(m=this.qe[this.ec])&&(this.ec=m);this.Ve.hasOwnProperty(this.ec)||(this.Uc("Start node "+this.ec+" not found!"),this.ec=a);this.Wl(this.Ve[this.ec],b);this.Dk("{"+this.ec+"}");this.xa=this.ec}else this.uf=!1,this.Wl(a,b),this.Dk(""),this.$a.push("");this.je&&(this.O("add pano vr config"),this.Ga.Oi());this.Ce&&(this.Ss(),this.Vp());this.H("configloaded",{});this.H("changenode",{});this.H("playerstatechanged",{})};e.prototype.Wl=function(a,b){var c=this;this.vp();this.Qa&&this.Qa.Rt();this.Pe(this.lb);
this.Ff();for(var m=a.firstChild,h,n,p=0,r=this.N.M;m;){if("view"==m.nodeName){if(h=m.getAttributeNode("fovmode"))this.fov.mode=Number(h.nodeValue);h=m.getAttributeNode("pannorth");this.pan.ci=1*(h?h.nodeValue:0);for(var v=m.firstChild;v;){"start"==v.nodeName&&(h=v.getAttributeNode("pan"),this.pan.m=Number(h?h.nodeValue:0),this.pan.Ia=this.pan.m,h=v.getAttributeNode("tilt"),this.u.m=Number(h?h.nodeValue:0),this.u.Ia=this.u.m,h=v.getAttributeNode("roll"),this.W.m=Number(h?h.nodeValue:0),this.W.Ia=
this.W.m,h=v.getAttributeNode("fov"),this.fov.m=Number(h?h.nodeValue:70),this.fov.Ia=this.fov.m,h=v.getAttributeNode("projection"),this.N.hp=Number(h?h.nodeValue:4),this.qb(this.Ch()));"min"==v.nodeName&&(h=v.getAttributeNode("pan"),this.pan.min=1*(h?h.nodeValue:0),h=v.getAttributeNode("tilt"),this.u.min=1*(h?h.nodeValue:-90),h=v.getAttributeNode("fov"),this.fov.min=1*(h?h.nodeValue:5),1E-20>this.fov.min&&(this.fov.min=1E-20),h=v.getAttributeNode("fovpixel"),this.fov.Zh=1*(h?h.nodeValue:0));if("max"==
v.nodeName){h=v.getAttributeNode("pan");this.pan.max=1*(h?h.nodeValue:0);h=v.getAttributeNode("tilt");this.u.max=1*(h?h.nodeValue:90);h=v.getAttributeNode("fov");this.fov.max=1*(h?h.nodeValue:120);180<=this.fov.max&&(this.fov.max=179.9);if(h=v.getAttributeNode("fovstereographic"))this.fov.Ll=1*h.nodeValue;if(h=v.getAttributeNode("fovfisheye"))this.fov.Kl=1*h.nodeValue;if(h=v.getAttributeNode("scaletofit"))this.I.Cp=1==h.nodeValue}if("flyin"==v.nodeName){if(h=v.getAttributeNode("projection"))this.nc.pb=
Number(h.nodeValue);if(h=v.getAttributeNode("pan"))this.nc.pan=parseFloat(h.nodeValue);if(h=v.getAttributeNode("tilt"))this.nc.u=parseFloat(h.nodeValue);if(h=v.getAttributeNode("fov"))this.nc.fov=parseFloat(h.nodeValue)}v=v.nextSibling}}if("autorotate"==m.nodeName){if(h=m.getAttributeNode("speed"))this.v.speed=1*h.nodeValue;if(h=m.getAttributeNode("delay"))this.v.timeout=1*h.nodeValue;if(h=m.getAttributeNode("returntohorizon"))this.v.gk=1*h.nodeValue;if(h=m.getAttributeNode("horizonfromdefview"))this.v.Ao=
1==h.nodeValue;if(h=m.getAttributeNode("nodedelay"))this.v.Ij=1*h.nodeValue;if(h=m.getAttributeNode("noderandom"))this.v.bp=1==h.nodeValue;(h=m.getAttributeNode("nodefilter"))&&!this.v.ap&&(this.v.vg=h.nodeValue);this.Td&&(this.v.enabled=!0,this.v.Rf=!0,this.v.active=!1);(h=m.getAttributeNode("startloaded"))&&this.Td&&(this.v.Fg=1==h.nodeValue,this.v.Fg&&(this.v.active=!1));if(h=m.getAttributeNode("useanimation"))this.v.Tg=1==h.nodeValue,this.v.sd=this.v.Tg;if(h=m.getAttributeNode("syncanimationwithvideo"))this.v.xm=
1==h.nodeValue}if("animation"==m.nodeName){if(h=m.getAttributeNode("syncanimationwithvideo"))this.v.xm=1==h.nodeValue;if(h=m.getAttributeNode("useinautorotation"))this.v.Tg=1==h.nodeValue;if(h=m.getAttributeNode("animsequence"))this.v.Ri=h.nodeValue,this.Td&&(this.v.Qd=this.v.Ri);if(h=m.getAttributeNode("clipsrandom"))this.v.tn=1==h.nodeValue;this.ya=[];for(v=m.firstChild;v;){if("clip"==v.nodeName){this.L=new x.Vm;if(h=v.getAttributeNode("animtitle"))this.L.Xe=h.nodeValue.toString();if(h=v.getAttributeNode("cliptitle"))this.L.cb=
h.nodeValue.toString();if(h=v.getAttributeNode("nodeid"))this.L.Bv=h.nodeValue.toString();if(h=v.getAttributeNode("length"))this.L.length=Number(h.nodeValue);if(h=v.getAttributeNode("animtype"))this.L.Tq=Number(h.nodeValue);if(h=v.getAttributeNode("nextcliptitle"))this.L.Zo=h.nodeValue.toString();if(h=v.getAttributeNode("nextclipnodeid"))this.L.Yo=h.nodeValue.toString();if(h=v.getAttributeNode("nextclipstartview"))this.L.pt=h.nodeValue.toString();if(h=v.getAttributeNode("transitiontype"))this.L.$u=
Number(h.nodeValue);var y=v.firstChild;for(this.L.qa=[];y;){if("keyframe"==y.nodeName){var z=new x.ed;if(h=y.getAttributeNode("time"))z.time=Number(h.nodeValue);if(h=y.getAttributeNode("value"))z.value=Number(h.nodeValue);if(h=y.getAttributeNode("valuestring"))z.Mm=h.nodeValue.toString();if(h=y.getAttributeNode("transitiontime"))z.Fb=Number(h.nodeValue);h=y.getAttributeNode("type");var C=0;h&&(z.type=Number(h.nodeValue),C=Number(h.nodeValue));if(h=y.getAttributeNode("property"))z.hb=Number(h.nodeValue);
if(h=y.getAttributeNode("additionaltrackid"))z.td=h.nodeValue.toString();if(h=y.getAttributeNode("additionaltracktype"))z.an=Number(h.nodeValue);if(1==C||2==C){if(h=y.getAttributeNode("bezierintime"))z.Ze=Number(h.nodeValue);if(h=y.getAttributeNode("bezierinvalue"))z.$e=Number(h.nodeValue);if(h=y.getAttributeNode("bezierouttime"))z.af=Number(h.nodeValue);if(h=y.getAttributeNode("bezieroutvalue"))z.bf=Number(h.nodeValue)}this.L.qa.push(z)}y=y.nextSibling}this.ya.push(this.L);"__VideoPano"==this.L.cb&&
(this.Om=this.L)}v=v.nextSibling}}"input"==m.nodeName&&(n||(n=m));if(n)for(y=0;6>y;y++)h=n.getAttributeNode("prev"+y+"url"),this.mh[y]=h?String(h.nodeValue):"";"altinput"==m.nodeName&&(v=0,(h=m.getAttributeNode("screensize"))&&(v=1*h.nodeValue),0<v&&v<=this.jo()&&v>p&&(p=v,n=m));if("control"==m.nodeName&&this.Td){if(h=m.getAttributeNode("simulatemass"))this.ka.enabled=1==h.nodeValue;if(h=m.getAttributeNode("rubberband"))this.I.Bp=1==h.nodeValue;if(h=m.getAttributeNode("zoomcentercursor"))this.I.Of=
1==h.nodeValue;if(h=m.getAttributeNode("locked"))this.I.qc=1==h.nodeValue;h&&(this.I.Vh=1==h.nodeValue);if(h=m.getAttributeNode("lockedmouse"))this.I.qc=1==h.nodeValue;if(h=m.getAttributeNode("lockedkeyboard"))this.I.Vh=1==h.nodeValue;if(h=m.getAttributeNode("lockedkeyboardzoom"))this.I.bt=1==h.nodeValue;if(h=m.getAttributeNode("lockedwheel"))this.I.Ge=1==h.nodeValue;if(h=m.getAttributeNode("invertwheel"))this.I.Eo=1==h.nodeValue;if(h=m.getAttributeNode("speedwheel"))this.I.tm=1*h.nodeValue;if(h=
m.getAttributeNode("invertcontrol"))this.I.Xd=1==h.nodeValue;if(h=m.getAttributeNode("sensitivity"))this.I.sensitivity=1*h.nodeValue,1>this.I.sensitivity&&(this.I.sensitivity=1);if(h=m.getAttributeNode("dblclickfullscreen"))this.I.Sk=1==h.nodeValue;if(h=m.getAttributeNode("contextfullscreen"))this.I.jh=1==h.nodeValue;if(h=m.getAttributeNode("contextvr"))this.I.kh=1==h.nodeValue;if(h=m.getAttributeNode("contextprojections"))this.I.Yi=1==h.nodeValue;if(h=m.getAttributeNode("hideabout"))this.I.ng=1==
h.nodeValue;for(v=m.firstChild;v;)"menulink"==v.nodeName&&(y={text:"",url:""},h=v.getAttributeNode("text"),y.text=h.nodeValue,h=v.getAttributeNode("url"),y.url=h.nodeValue,this.Yh.push(y)),v=v.nextSibling}if("transition"==m.nodeName&&this.Td){if(h=m.getAttributeNode("enabled"))this.D.enabled=1==h.nodeValue;if(h=m.getAttributeNode("blendtime"))this.D.eh=1*h.nodeValue;if(h=m.getAttributeNode("blendcolor"))this.D.Sf=h.nodeValue.toString();if(h=m.getAttributeNode("type"))this.D.type=h.nodeValue.toString();
if(h=m.getAttributeNode("delay"))this.D.delay=h.nodeValue.toString();if(h=m.getAttributeNode("softedge"))this.D.Yc=1*h.nodeValue;if(h=m.getAttributeNode("zoomin"))this.D.da=1*h.nodeValue;if(h=m.getAttributeNode("zoomout"))this.D.dd=1*h.nodeValue;if(h=m.getAttributeNode("zoomfov"))this.D.uk=1*h.nodeValue;if(h=m.getAttributeNode("zoomafterinfov"))this.D.sk=1*h.nodeValue;if(h=m.getAttributeNode("zoomafteroutfov"))this.D.tk=1*h.nodeValue;if(h=m.getAttributeNode("zoomspeed"))this.D.Zg=1*h.nodeValue;if(h=
m.getAttributeNode("zoomoutpause"))this.D.Yg=1==h.nodeValue;"cut"==this.D.type&&(this.D.eh=0)}if("soundstransition"==m.nodeName){if(h=m.getAttributeNode("enabled"))this.Za.enabled=1==h.nodeValue;if(h=m.getAttributeNode("transitiontime"))this.Za.Fb=1*h.nodeValue;if(h=m.getAttributeNode("crossfade"))this.Za.zn=1==h.nodeValue}if("flyintransition"==m.nodeName){if(h=m.getAttributeNode("enabled"))this.Ea.enabled=1==h.nodeValue&&this.na;if(h=m.getAttributeNode("speed"))this.Ea.speed=1*h.nodeValue}"userdata"==
m.nodeName&&(this.userdata=this.Ug=this.dg(m),this.Vc[a.id]||(this.Vc[a.id]=this.Gn(m),this.tg[a.id]=this.Hn(m),this.Mf[a.id]=this.In(m)));"projectuserdata"==m.nodeName&&(this.Vg._master=this.dg(m));"customproperty"==m.nodeName&&this.Fn(m);if("translations"==m.nodeName)for((h=m.getAttributeNode("json"))&&this.Pi(h.nodeValue.toString()),this.El||this.lm(window.navigator.language),v=m.firstChild;v;){if("projecttranslation"==v.nodeName){y={};if(h=v.getAttributeNode("langcode"))y.langCode=h.nodeValue;
if(h=v.getAttributeNode("langname"))y.langName=h.nodeValue;this.Tl.push(y)}v=v.nextSibling}if("hotspots"==m.nodeName){if(h=m.getAttributeNode("smoothmovement"))this.Sp=1==h.nodeValue;for(v=m.firstChild;v;){if("label"==v.nodeName&&this.Td){y=this.K.ek;if(h=v.getAttributeNode("enabled"))y.enabled=1==h.nodeValue;if(h=v.getAttributeNode("width"))y.width=1*h.nodeValue;if(h=v.getAttributeNode("height"))y.height=1*h.nodeValue;if(h=v.getAttributeNode("textcolor"))y.fk=1*h.nodeValue;if(h=v.getAttributeNode("textalpha"))y.dk=
1*h.nodeValue;if(h=v.getAttributeNode("background"))y.background=1==h.nodeValue;if(h=v.getAttributeNode("backgroundalpha"))y.Ub=1*h.nodeValue;if(h=v.getAttributeNode("backgroundcolor"))y.Vb=1*h.nodeValue;if(h=v.getAttributeNode("border"))y.Ti=1*h.nodeValue;if(h=v.getAttributeNode("bordercolor"))y.Xb=1*h.nodeValue;if(h=v.getAttributeNode("borderalpha"))y.Wb=1*h.nodeValue;if(h=v.getAttributeNode("borderradius"))y.Ak=1*h.nodeValue;if(h=v.getAttributeNode("wordwrap"))y.rk=1==h.nodeValue}if("polystyle"==
v.nodeName&&this.Td){if(h=v.getAttributeNode("mode"))this.K.mode=1*h.nodeValue;if(h=v.getAttributeNode("bordercolor"))this.K.Xb=1*h.nodeValue;if(h=v.getAttributeNode("backgroundcolor"))this.K.Vb=1*h.nodeValue;if(h=v.getAttributeNode("borderalpha"))this.K.Wb=1*h.nodeValue;if(h=v.getAttributeNode("backgroundalpha"))this.K.Ub=1*h.nodeValue;if(h=v.getAttributeNode("handcursor"))this.K.Be=1==h.nodeValue}h=void 0;"hotspot"==v.nodeName&&(h=new x.Ni(this),h.type="point",h.xb(v),this.J.push(h),this.Xk(a.id,
v));"polyhotspot"==v.nodeName&&(h=new x.Ni(this),h.type="poly",h.xb(v),this.J.push(h),this.Xk(a.id,v));v=v.nextSibling}}if("sounds"==m.nodeName||"media"==m.nodeName)for(v=m.firstChild;v;){if("sound"==v.nodeName&&!this.Ml)for(this.Ce=!0,h=new x.ke(this),h.xb(v),h.addElement(),y=0;y<this.Jf.length;y++)h.id==this.Jf[y].id&&(this.Jf.splice(y,1),y--);"video"==v.nodeName&&(h=new x.Zm(this),h.xb(v),h.addElement(),0<h.level&&(this.Ce=!0));"image"==v.nodeName&&(h=new x.Hq(this),h.xb(v),h.addElement());"webelement"==
v.nodeName&&(h=new x.Jq(this),h.xb(v),h.addElement());"lensflare"==v.nodeName&&this.Qa&&(h=new x.Iq(this),h.xb(v),this.Qa.Uh.push(h));v=v.nextSibling}m=m.nextSibling}for(y=this.v.Gd=0;y<this.Jf.length;y++){a=this.Jf[y];if(this.ra&&this.Za.enabled&&this.isPlaying(a.id))this.Za.Hi.push(a);else{try{a.wa?a.Uf():a.j.pause()}catch(E){this.O(E)}a.Ne()}this.X.splice(this.X.indexOf(a),1)}1!=this.D.da&&2!=this.D.da&&6!=this.D.da&&7!=this.D.da&&this.Kn();this.je||(this.nb.pi=!0);b&&("object"===typeof b&&null!==
b?(b.hasOwnProperty("pan")&&this.be(Number(b.pan)),b.hasOwnProperty("tilt")&&this.ce(Number(b.tilt)),b.hasOwnProperty("projection")&&this.qb(Number(b.projection)),b.hasOwnProperty("fov")&&this.zb(Number(b.fov))):""!=b&&(b=b.toString().split("/"),4<b.length&&this.qb(Number(b[4])),0<b.length&&(h=String(b[0]),"N"==h.charAt(0)?this.Xj(Number(h.substr(1))):"S"==h.charAt(0)?this.Xj(-180+Number(h.substr(1))):this.be(Number(h))),1<b.length&&this.ce(Number(b[1])),2<b.length&&this.zb(Number(b[2]))),this.pan.open=
this.pan.m,this.Ea.Ad.pan=this.pan.m,this.Ea.Ad.u=this.u.m,this.Ea.Ad.fov=this.fov.m,this.Ea.Ad.pb=this.Z(),this.Ea.Ad.pq=!0);if(n){h=n.getAttributeNode("stereo");this.Fd=!1;h&&1==h.nodeValue&&(this.Fd=!0);h=n.getAttributeNode("fliplr");this.Gg=!1;h&&1==h.nodeValue&&(this.Gg=!0);for(y=0;y<(this.Fd?12:6);y++)(h=n.getAttributeNode("tile"+y+"url"))&&(this.lh[y]=String(h.nodeValue));for(y=0;6>y;y++)(h=n.getAttributeNode("prev"+y+"url"))&&(this.mh[y]=String(h.nodeValue));if(h=n.getAttributeNode("tilevrurl"))this.Ok=
String(h.nodeValue);if(h=n.getAttributeNode("tilesize"))this.Te=1*h.nodeValue;h=n.getAttributeNode("canvassize");if(h=n.getAttributeNode("tilescale"))this.Lg=1*h.nodeValue;if(h=n.getAttributeNode("leveltileurl"))r.Il=h.nodeValue;if(h=n.getAttributeNode("leveltilesize"))r.V=Number(h.nodeValue);if(h=n.getAttributeNode("levelbias"))r.So=Number(h.nodeValue);if(h=n.getAttributeNode("levelbiashidpi"))r.To=Number(h.nodeValue);h=n.getAttributeNode("overlap");this.Ya.W=0;this.Ya.pitch=0;h&&(r.gb=Number(h.nodeValue));
if(h=n.getAttributeNode("levelingroll"))this.Ya.W=Number(h.nodeValue);if(h=n.getAttributeNode("levelingpitch"))this.Ya.pitch=Number(h.nodeValue);this.Jd=0;(h=n.getAttributeNode("flat"))&&1==h.nodeValue&&(this.Jd=2);h=n.getAttributeNode("width");r.width=1*(h?h.nodeValue:1);h=n.getAttributeNode("height");r.height=1*(h?h.nodeValue:r.width);this.B.src=[];r.levels=[];for(v=n.firstChild;v;){if("preview"==v.nodeName){if(h=v.getAttributeNode("color"))r.Nj=h.nodeValue;if(h=v.getAttributeNode("strip"))r.np=
1==h.nodeValue}if("video"==v.nodeName){if(h=v.getAttributeNode("format"))"3x2"==h.nodeValue&&(this.B.format=14),"equirectangular"==h.nodeValue&&(this.B.format=1);if(h=v.getAttributeNode("flipy"))this.B.flipY=Number(h.nodeValue);if(h=v.getAttributeNode("startonload"))this.B.$j=1==h.nodeValue;if(h=v.getAttributeNode("startmutedmobile"))this.B.um=1==h.nodeValue;if(h=v.getAttributeNode("bleed"))this.B.cf=Number(h.nodeValue);if(h=v.getAttributeNode("endaction"))this.B.se=String(h.nodeValue);if(h=v.getAttributeNode("targetview"))this.B.ck=
String(h.nodeValue);if(h=v.getAttributeNode("width"))this.B.width=Number(h.nodeValue);if(h=v.getAttributeNode("height"))this.B.height=Number(h.nodeValue);for(y=v.firstChild;y;)"source"==y.nodeName&&(h=y.getAttributeNode("url"))&&this.B.src.push(h.nodeValue.toString()),y=y.nextSibling}if("level"==v.nodeName){n=new x.Ym;h=v.getAttributeNode("width");n.width=1*(h?h.nodeValue:1);h=v.getAttributeNode("height");n.height=1*(h?h.nodeValue:n.width);if(h=v.getAttributeNode("preload"))n.cache=1==h.nodeValue;
if(h=v.getAttributeNode("preview"))n.Ef=1==h.nodeValue;n.Y=Math.floor((n.width+r.V-1)/r.V);n.ta=Math.floor((n.height+r.V-1)/r.V);r.levels.push(n)}v=v.nextSibling}r.Hl=r.levels.length}this.qf=!0;this.Qg&&(this.na=this.Pg=!1,this.Fc||(this.O("dummy rendering"),this.Fc=document.createElement("canvas"),this.Fc.width=100,this.Fc.height=100,this.Fc.id="dummycanvas",this.ea.appendChild(this.Fc)),this.fc());this.na&&this.R&&(this.sa.Co(this.Lg),this.sa.Do());var F=this;0<r.levels.length&&r.np&&0==this.Jd&&
(b=new Image,n=new x.Ym,n.Ef=!0,n.cache=!0,n.Y=n.ta=0,n.height=n.width=0,r.levels.push(n),b.crossOrigin=this.crossOrigin,b.onload=this.sa.nt(b),b.setAttribute("src",this.N.Kg(6,r.Hl-1,0,0)));if(0<this.B.src.length&&this.na)if(this.Ji){this.B.j=document.createElement("video");this.B.j.crossOrigin=this.crossOrigin;this.B.j.setAttribute("style","display:none; max-width:none;");this.B.j.setAttribute("playsinline","playsinline");this.B.j.preload=!0;this.B.j.volume=this.ba;this.$.appendChild(this.B.j);
this.B.Tc=!1;this.B.Bm=!1;this.B.j.oncanplay=function(){if(!F.B.Tc){F.B.qg=!0;var E,D,A=[],G=new x.Ua,J=F.R,H=F.B.j.videoWidth/3;F.B.width=F.B.j.videoWidth;F.B.height=F.B.j.videoHeight;for(E=0;6>E;E++){var I=E%3*H+F.B.cf;var M=I+H-2*F.B.cf;var K=4;3>E&&(K+=H);var O=K+H-2*F.B.cf;for(D=0;4>D;D++){G.x=-1;G.y=-1;G.z=1;for(var R=0;R<D;R++)G.Ap();A.push((0<G.x?I:M)/(3*H),(0<G.y?O:K)/(2*H))}}J.bindBuffer(J.ARRAY_BUFFER,F.B.Di);J.bufferData(J.ARRAY_BUFFER,new Float32Array(A),J.STATIC_DRAW);F.D.Zc&&"videopano"==
F.D.delay&&F.ak(null)}};this.B.sb=function(){var E=F.Wa("_videopanorama");return 0<E.length&&E[0].sb?E[0].sb:0};this.B.fm=function(E){var D=F.Wa("_videopanorama");0<D.length&&(D[0].sb=E)};this.B.loop=function(){return 0<F.B.sb()?(F.B.fm(F.B.sb()-1),F.B.j.play(),!0):!1};"exit"==this.B.se?this.B.j.onended=function(){F.B.qg=!1;F.B.Tc=!1;F.$.removeChild(F.B.j);F.B.j=null;F.update()}:"stop"==this.B.se?F.B.j.onended=function(){F.B.loop()||F.update()}:"{"==this.B.se.charAt(0)?this.B.j.onended=function(){F.pd(F.B.se,
F.B.ck)}:this.B.j.loop=!0;for(y=0;y<this.B.src.length;y++)r=document.createElement("source"),r.setAttribute("src",this.fb(this.B.src[y])),this.B.j.appendChild(r);r=this.Wa("_videopanorama");0<r.length?r[0].j=this.B.j:this.qp("_videopanorama",this.B.j);if(this.B.$j&&(r=this.B.j.play(),void 0!==r))r.then(function(){})["catch"](function(){c.B.um&&(c.B.j.muted=!0,c.B.j.play())})}else"{"==this.B.se.charAt(0)&&F.pd(F.B.se,F.B.ck);this.$m();this.D.Ld||this.Zp();this.update();this.Td&&(this.Td=!1,this.H("viewerinit",
{}),this.ua&&this.ua.ggViewerInit&&this.ua.ggViewerInit(),this.Ea.enabled&&0==this.Jd&&this.na&&(this.qb(9),this.pan.m=this.nc.pan,this.u.m=this.nc.u,this.fov.m=this.nc.fov,this.qb(this.nc.pb),this.L=this.bl(!1),this.pan.m=this.L.qa[0].value,this.u.m=this.L.qa[1].value,this.fov.m=this.L.qa[2].value,3==this.L.qa[3].hb&&this.qb(this.L.qa[3].value),this.wc=this.L.cb,this.Vj(!0),this.v.active=!1,this.v.xh=!0));this.fc()};e.prototype.Ol=function(a,b){0<a.length&&(".xml"==a.slice(-4)||".swf"==a.slice(-4)||
"{"==a.charAt(0)?this.pd(this.fb(a),b):window.open(this.fb(a),b))};e.prototype.Nu=function(){this.qf=this.isLoaded=!1;this.checkLoaded=this.wd=[];this.gi=0;this.ua&&this.ua.ggReLoaded&&this.ua.ggReLoaded();this.H("beforechangenode",{})};e.prototype.Js=function(a){var b="";0<this.Nl.length&&(b=this.Nl.pop());""!=b&&(this.pl=!0);this.pd("{"+b+"}",a)};e.prototype.pd=function(a,b){if(""!=a&&"{}"!=a){this.Nu();this.ue&&!this.Qg&&(this.Rc(0),this.fc());this.ga&&this.ga.hotspotProxyOut&&this.ga.hotspotProxyOut(this.S.id,
this.S.url);this.H("hsproxyout",{id:this.S.id,url:this.S.url});".swf"==a.substr(a.length-4)&&(a=a.substr(0,a.length-4)+".xml");var c="",m=null;"object"===typeof b&&null!==b?m=b:b&&(c=b.toString());b="/"+this.u.m+"/"+this.fov.m+"//"+this.Z();c=c.replace("$cur",this.pan.m+b);c=c.replace("$(cur)",this.pan.m+b);c=c.replace("$fwd","N"+this.we()+b);c=c.replace("$(fwd)","N"+this.we()+b);c=c.replace("$bwd","S"+this.we()+b);c=c.replace("$(bwd)","S"+this.we()+b);c=c.replace("$ap",String(this.pan.m));c=c.replace("$(ap)",
String(this.pan.m));c=c.replace("$an",String(this.we()));c=c.replace("$(an)",String(this.we()));c=c.replace("$at",String(this.u.m));c=c.replace("$(at)",String(this.u.m));c=c.replace("$af",String(this.fov.m));c=c.replace("$(af)",String(this.fov.m));c=c.replace("$ar",String(this.Z()));c=c.replace("$(ar)",String(this.Z()));""!=c&&(b=c.split("/"),3<b.length&&""!=b[3]&&(this.startNode=b[3]));m=null!==m?m:c;this.ma(!1);if("{"==a.charAt(0)){b=a.substr(1,a.length-2);if(this.xa==b&&this.gh){this.qf=this.isLoaded=
!0;return}(c=this.qe[b])&&(b=c);c=this.D;var h=this.R;if(this.Ve[b]){this.gh=!0;if(this.D.enabled&&this.na&&this.D.Bc){c.Pp=!0;c.he||c.Ld||c.Zc||this.Vj(!0);var n=void 0;"wipeleftright"==c.type?n=1:"wiperightleft"==c.type?n=2:"wipetopbottom"==c.type?n=3:"wipebottomtop"==c.type?n=4:"wiperandom"==c.type&&(n=Math.ceil(4*Math.random()));c.Rk=n;h.bindFramebuffer(h.FRAMEBUFFER,c.Bc);h.viewport(0,0,c.Bc.width,c.Bc.height);h.clear(h.COLOR_BUFFER_BIT|h.DEPTH_BUFFER_BIT);c.Gi=!0;this.Ii();c.Gi=!1;h.bindFramebuffer(h.FRAMEBUFFER,
null);h.viewport(0,0,this.Ab.width,this.Ab.height);h=new Date;this.S!=this.lb&&6!=c.da?7==c.da?(c.Wg=this.S.dc/this.C.width,c.Xg=.5):(c.Wg=this.S.dc/this.C.width,c.Xg=1-this.S.Pb/this.C.height):(c.Wg=.5,c.Xg=.5);if(1==c.da||2==c.da||6==c.da||7==c.da)c.yq=h.getTime()+100,c.Ld=!0,c.Gb=Math.sin(this.Dd()/2*Math.PI/180)/Math.sin(c.uk/2*Math.PI/180),c.Gb=Math.max(c.Gb,1),c.xq=1/c.Zg*c.Gb*.3}this.Wl(this.Ve[b],m);this.Dk(a);if(c.enabled&&this.na&&(this.kq(null),0!=c.dd)){c.ym=this.nf();c.zm=this.jg();c.Ci=
this.Dd();c.ee=this.Z();if(1==c.dd||3==c.dd)this.zb(c.tk);else if(2==c.dd)this.zb(c.sk);else if(4==c.dd){for(m=a=0;m<this.ya.length;m++)this.ya[m].cb&&0==this.ya[m].cb.indexOf("__FlyIn")&&(a=this.ya[m]);0!=a?(this.qb(this.kj(3,a).value),this.be(this.kj(0,a).value),this.ce(this.kj(1,a).value),this.zb(this.kj(2,a).value)):(this.qb(this.nc.pb),this.be(this.nc.pan),this.ce(this.nc.u),this.zb(this.nc.fov))}c.Yg||1==c.da||2==c.da||6==c.da||7==c.da||this.vm()}c.Pp=!1;this.je&&(this.O("add pano opennext"),
this.Ga.Oi());this.D.Ld||this.D.he||this.D.Zc||(this.fa&&this.Nk(),this.gh=!1)}else{this.Uc("invalid node id: "+b);return}}else this.op(a,null,m);this.H("changenode",{});this.update(5)}};e.prototype.lo=function(){return this.qf?this.uf?this.$a.slice(0):[""]:[]};e.prototype.dg=function(a){var b;var c={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"))&&
(c.title=b.nodeValue.toString()),(b=a.getAttributeNode("description"))&&(c.description=b.nodeValue.toString()),(b=a.getAttributeNode("author"))&&(c.author=b.nodeValue.toString()),(b=a.getAttributeNode("datetime"))&&(c.datetime=b.nodeValue.toString()),(b=a.getAttributeNode("copyright"))&&(c.copyright=b.nodeValue.toString()),(b=a.getAttributeNode("source"))&&(c.source=b.nodeValue.toString()),(b=a.getAttributeNode("info"))&&(c.information=b.nodeValue.toString()),(b=a.getAttributeNode("comment"))&&(c.comment=
b.nodeValue.toString()),(b=a.getAttributeNode("latitude"))&&(c.latitude=Number(b.nodeValue)),(b=a.getAttributeNode("longitude"))&&(c.longitude=Number(b.nodeValue)),(b=a.getAttributeNode("nodeid"))&&(c.nodeid=b.nodeValue.toString()),(b=a.getAttributeNode("altitude"))&&(c.altitude=Number(b.nodeValue)),(b=a.getAttributeNode("heading"))&&(c.heading=Number(b.nodeValue)),(b=a.getAttributeNode("customnodeid"))&&(c.customnodeid=b.nodeValue.toString()),(b=a.getAttributeNode("streetviewlink"))&&(c.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--);c.tags=a}return c};e.prototype.wr=function(a){for(var b="",c=a.firstChild;c;){if("sequence"==c.nodeName){if(a=c.getAttributeNode("title"))b=a.nodeValue;for(var m=[],h=c.firstChild;h;){if("sequenceelement"==h.nodeName){var n={};if(a=h.getAttributeNode("index"))n.index=a.nodeValue;if(a=h.getAttributeNode("nodeid"))n.nodeid=a.nodeValue;if(a=h.getAttributeNode("cliptitle"))n.cliptitle=
a.nodeValue;if(a=h.getAttributeNode("startview"))n.startview=a.nodeValue;m.push(n)}h=h.nextSibling}this.en[b]=m}c=c.nextSibling}};e.prototype.Gn=function(a){for(var b={},c=a.firstChild;c;){if("mapcoords"==c.nodeName){var m={x:0,y:0};a=c.getAttributeNode("x");m.x=Number(a.nodeValue);a=c.getAttributeNode("y");m.y=Number(a.nodeValue);a=c.getAttributeNode("mapid");b[a.nodeValue.toString()]=m}c=c.nextSibling}return b};e.prototype.Hn=function(a){for(var b={},c=a.firstChild;c;){if("mapcoords"==c.nodeName){var m=
{x:0,y:0};a=c.getAttributeNode("x_floorplan_percent");m.x=Number(a.nodeValue);a=c.getAttributeNode("y_floorplan_percent");m.y=Number(a.nodeValue);a=c.getAttributeNode("mapid");b[a.nodeValue.toString()]=m}c=c.nextSibling}return b};e.prototype.In=function(a){for(var b={},c=a.firstChild;c;){if("custompropertyvalue"==c.nodeName){a=c.getAttributeNode("value");var m=a.nodeValue.toString();a=c.getAttributeNode("variablename");b[a.nodeValue.toString()]=m}c=c.nextSibling}return b};e.prototype.Xk=function(a,
b){var c,m="";(c=b.getAttributeNode("id"))&&(m=c.nodeValue.toString());if(!this.ob.hasOwnProperty(a)||!this.ob[a].hasOwnProperty(m)){var h={};for(b=b.firstChild;b;){if("custompropertyvalue"==b.nodeName){c=b.getAttributeNode("variablename");var n=c.nodeValue;c=b.getAttributeNode("value");h[n]=c.nodeValue}b=b.nextSibling}this.ob[a]||(this.ob[a]={});this.ob[a][m]=h}};e.prototype.Fn=function(a){var b=a.getAttributeNode("variablename"),c=b.nodeValue.toString();b=a.getAttributeNode("variabletype");var m=
Number(b.nodeValue);b=a.getAttributeNode("propertytype");var h=Number(b.nodeValue);b=a.getAttributeNode("defaultvalue");this.Ha[c]={Nd:m,mi:h,Uk:b.nodeValue.toString()}};e.prototype.Bh=function(a){return a?this.Vg[a]?this.Vg[a]:this.dg():this.Ug};e.prototype.mo=function(a,b){""==a&&(a="node1");return this.Mf.hasOwnProperty(a)&&this.Mf[a].hasOwnProperty(b)?this.oj(x.ic.cl(this.Mf[a][b],this.Ha[b].Nd),this.Ha[b].Nd):null};e.prototype.Lp=function(a,b,c){c="string"===typeof c?c:x.ic.ao(c,this.Ha[b].Nd);
this.Mf[a][b]!=c&&(this.Mf[a][b]=c,this.H("varchanged_"+b,{}))};e.prototype.jl=function(a){a=this.Bh(a);var b=[];""!=a.latitude&&0!=a.latitude&&0!=a.longitude&&(b.push(a.latitude),b.push(a.longitude));return b};e.prototype.no=function(a){for(var b=[],c=0;c<this.$a.length;c++){var m=this.$a[c],h=this.Bh(m);h&&h.tags.includes(a)&&b.push(m)}return b};e.prototype.gs=function(a){return this.Bh(a).title};e.prototype.ds=function(a,b){var c=-1;a=this.jl(a);b=this.jl(b);if(2==a.length&&2==b.length){c=Math.PI/
180*(b[0]-a[0]);var m=Math.PI/180*(b[1]-a[1]);a=Math.sin(c/2)*Math.sin(c/2)+Math.sin(m/2)*Math.sin(m/2)*Math.cos(Math.PI/180*a[0])*Math.cos(Math.PI/180*b[0]);c=12742E3*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}return c};e.prototype.mf=function(a,b,c){var m;for(m=0;m<this.L.qa.length;m++){var h=this.L.qa[m];if(h.time==a&&h.hb==b&&(!c||h.td==c))return h}return!1};e.prototype.kj=function(a,b){var c;for(c=0;c<b.qa.length;c++)if(0==b.qa[c].time&&b.qa[c].hb==a)return b.qa[c];return!1};e.prototype.po=function(a,
b,c){for(a=Math.floor(a);!this.mf(a,b,c)&&0<a;)a--;return a};e.prototype.ko=function(a){var b,c=1E5,m=a,h=!1;for(b=0;b<this.L.qa.length;b++){var n=this.L.qa[b];n.hb==a.hb&&n.td==a.td&&n.time>a.time&&n.time<c&&(m=this.L.qa[b],c=m.time,h=!0)}return h?m:!1};e.prototype.Cr=function(a){for(var b=[],c=0;c<this.L.qa.length;c++){var m=this.L.qa[c];if(m.time<=a&&4==m.hb){for(var h=!1,n=0;n<b.length;n++)if(b[n].td==this.L.qa[c].td){b[n].time<m.time?b.splice(n,1):h=!0;break}h||b.push(m)}}return b};e.prototype.Xn=
function(a,b,c){var m=new x.Mc(a.time,a.value),h=new x.Mc(b.time,b.value),n=(c-a.time)/(b.time-a.time);if(0!=a.type||0!=b.type&&3!=b.type)if(3==a.type)c=a.value;else{n=new x.Mc;var p=new x.Mc,r=b.time-a.time;0==a.type?p.init(a.time+.3*r,a.value):p.init(a.af,a.bf);0==b.type||3==b.type?n.init(b.time-.3*r,b.value):n.init(b.Ze,b.$e);a=new x.Mc;a.zk(m,h,p,n,c);c=a.y}else a=new x.Mc,a.Wd(m,h,n),c=a.y;return c};e.prototype.bl=function(a,b,c,m){for(var h=0;h<this.ya.length;h++)if(this.ya[h].cb&&0==this.ya[h].cb.indexOf("__FlyIn"))return this.ya[h];
h=new x.Um;h.cb="__FlyIn";h.Se=this.pan.m;h.Ai=this.u.m;h.de=this.fov.m;h.zi=this.Z();h.ee=this.Ch();a?(h.$f=!1,h.gf=!1,h.speed=this.D.Zg,h.Kd=b,h.fe=c,h.Jg=m):(h.$f=!0,h.gf=!0,h.speed=this.Ea.speed,this.Ea.Ad.pq?(h.Kd=this.Ea.Ad.pan,h.fe=this.Ea.Ad.u,h.Jg=this.Ea.Ad.fov,h.ee=this.Ea.Ad.pb):(h.Kd=this.pan.Ia,h.fe=this.u.Ia,h.Jg=this.fov.Ia));return this.Un(h)};e.prototype.Un=function(a){var b=new x.Vm;b.cb=a.cb;b.Xe="";b.qa=[];for(var c=a.zi!=a.ee&&-1!=a.ee;-180>a.Kd;)a.Kd+=360;for(;180<a.Kd;)a.Kd-=
360;var m=a.Kd-a.Se;if(360==this.pan.max-this.pan.min){for(;-180>m;)m+=360;for(;180<m;)m-=360}var h=a.fe-a.Ai,n=a.Jg-a.de,p=Math.round(Math.sqrt(m*m+h*h+n*n)/a.speed*.33);c&&(p=Math.max(10,p));b.length=p;if(a.hf){var r=Math.ceil(.7*p);r=Math.min(15,r);r=Math.max(5,r);b.length=p+r;var v=.33*r}var y=a.Jg,z=p,C=0,F=p-1;if(c){var E=a.de;var D=4==a.ee?120:this.Ah(a.ee);n=y-a.de;var A=new x.Mc(0,a.de),G=new x.Mc(p,y),J=new x.Mc,H=new x.Mc;H.init(p/3,a.de+n/3);J.init(2*p/3,y-n/3);if(E>D)for(;C<=p&&E>D;)E=
new x.Mc,E.zk(A,G,H,J,C),E=E.y,C++;else C=1;C>=.8*p&&(z=C=Math.round(.8*p));0==C&&(C=1);D=4==a.zi?120:this.Ah(a.zi);E=a.Jg;if(E>D)for(;F>C&&E>D;)E=new x.Mc,E.zk(A,G,H,J,F),E=E.y,F--}A=new x.ed;A.time=0;A.hb=0;A.value=a.Se;A.type=1;A.af=p/3;A.bf=a.$f?a.Se:a.Se+m/3;b.qa.push(A);A=new x.ed;A.time=0;A.hb=1;A.value=a.Ai;A.type=1;A.af=p/3;A.bf=a.$f?a.Ai:a.Ai+h/3;b.qa.push(A);A=new x.ed;A.time=0;A.hb=2;A.value=a.de;A.type=1;A.af=p/3;A.bf=a.$f?a.de:a.de+n/3;b.qa.push(A);A=new x.ed;A.time=0;A.hb=3;A.value=
a.zi;A.type=0;A.Fb=0;b.qa.push(A);c&&(A=new x.ed,A.time=C,A.hb=3,A.value=a.ee,A.type=0,A.Fb=F-C,b.qa.push(A));A=new x.ed;A.time=p;A.hb=0;A.value=a.Se+m;A.type=1;A.Ze=2*p/3;A.$e=a.gf&&!a.hf?A.value:A.value-m/3;a.hf&&(A.af=p+v,A.bf=A.value+v/p*m);b.qa.push(A);A=new x.ed;A.time=p;A.hb=1;A.value=a.fe;A.type=1;A.Ze=2*p/3;A.$e=a.gf&&!a.hf?a.fe:a.fe-h/3;a.hf&&(A.af=p+v,A.bf=A.value+v/p*h);b.qa.push(A);A=new x.ed;A.time=z;A.hb=2;A.value=y;A.type=1;A.Ze=2*z/3;A.$e=a.gf?y:y-n/3;b.qa.push(A);a.hf&&(A=new x.ed,
A.time=p+r,A.hb=0,A.value=a.Se+m,A.type=1,A.Ze=p+r-v,A.$e=a.Se+m,b.qa.push(A),A=new x.ed,A.time=p+r,A.hb=1,A.value=a.fe,A.type=1,A.Ze=p+r-v,A.$e=a.fe,b.qa.push(A));this.ya.push(b);return b};e.prototype.nv=function(){this.B.j&&this.B.j.play()};e.prototype.ov=function(){this.B.j&&(this.B.j.pause(),this.B.j.currentTime=0)};e.prototype.mv=function(){this.B.j&&this.B.j.pause()};e.prototype.zu=function(a){this.B.j&&(0>a&&(a=0),a>this.B.j.duration&&(a=this.B.j.duration-.1),this.B.j.currentTime=a,this.update())};
e.prototype.Bs=function(){return this.B.j?this.B.j.currentTime:0};e.prototype.As=function(){if(this.B.j)return this.B.j};e.prototype.yu=function(a){if(this.B.j){var b=!this.B.j.paused&&!this.B.j.ended,c=this.B.j.currentTime;this.B.j.pause();this.B.j.src=isNaN(parseInt(a,10))?String(a):this.B.src[parseInt(a,10)];b&&(this.B.j.onloadedmetadata=function(){this.currentTime=c;this.play();this.onloadedmetadata=null});this.B.j.currentTime=c}};e.prototype.sr=function(){this.Ml=!0};e.prototype.ms=function(){var a=
{};a.currentNode=this.hj();a.position={pan:this.pan.m,tilt:this.u.m,fov:this.fov.m,projection:this.Z()};for(var b=a.variables={},c=0,m=Object.keys(this.Rb);c<m.length;c++){var h=m[c];this.Rb[h].Bo||"undefined"!==this.nl(h)&&((b[h]={}).value=this.nl(h))}b=a.hsprops={};c=0;for(m=Object.keys(this.ob);c<m.length;c++){h=m[c];for(var n=b[h]={},p=0,r=Object.keys(this.ob[h]);p<r.length;p++)for(var v=r[p],y=n[v]={},z=0,C=Object.keys(this.ob[h][v]);z<C.length;z++){var F=C[z];y[F]=this.fl(h,v,F)}}b=a.polyhotspots=
[];for(c=0;c<this.J.length;c++)"poly"==this.J[c].type&&(m=this.J[c],h={},h.id=m.id,h.bordercolor=m.Xb,h.borderalpha=m.Wb,h.backgroundcolor=m.Vb,h.backgroundalpha=m.Ub,b.push(h));return a};e.prototype.iu=function(a){if(a.hasOwnProperty("position")){var b=a.position;this.pan.m=b.pan;this.u.m=b.tilt;this.fov.m=b.fov;this.qb(b.projection)}b=0;for(var c=Object.keys(a.variables);b<c.length;b++){var m=c[b];this.Qe(m,a.variables[m].value)}b=0;for(c=Object.keys(a.hsprops);b<c.length;b++){m=c[b];for(var h=
a.hsprops[m],n=0,p=Object.keys(h);n<p.length;n++)for(var r=p[n],v=h[r],y=0,z=Object.keys(v);y<z.length;y++){var C=z[y];this.km(m,r,C,v[C])}}for(b=0;b<a.polyhotspots.length;b++)for(c=a.polyhotspots[b],m=0;m<this.J.length;m++)"poly"==this.J[m].type&&this.J[m].id==c.id&&(this.J[m].Xb=c.bordercolor,this.J[m].Wb=c.borderalpha,this.J[m].Ub=c.backgroundalpha,this.J[m].Vb=c.backgroundcolor);return this.tb=!0};return e}();x.ic=f})(ggP2VR||(ggP2VR={}));window.ggHasHtml5Css3D=ma;window.ggHasWebGL=na;
window.pano2vrPlayer=ggP2VR.ic;var Z=ggP2VR.ic.prototype;Z._=Z.Va;Z.setContainer=Z.cu;Z.setLanguage=Z.lm;Z.getLanguage=Z.Sr;Z.addTranslations=Z.Pi;Z.getProjectTranslations=Z.qs;Z.getVersion=Z.uo;Z.readConfigString=Z.Xl;Z.readConfigUrl=Z.op;Z.readConfigUrlAsync=Z.Pt;Z.readConfigXml=Z.pp;Z.openUrl=Z.Ol;Z.openNext=Z.pd;Z.goBack=Z.Js;Z.setMargins=Z.gu;Z.addListener=Z.addListener;Z.on=Z.addListener;Z.removeEventListener=Z.removeEventListener;Z.off=Z.removeEventListener;Z.detectBrowser=Z.En;
Z.initWebGL=Z.Rc;Z.getPercentLoaded=Z.ls;Z.setBasePath=Z.bu;Z.getBasePath=Z.Zn;Z.setViewerSize=Z.Op;Z.getViewerSize=Z.Es;Z.updateViewerSizeNow=Z.fc;Z.setSkinObject=Z.su;Z.changeViewMode=Z.fr;Z.getViewMode=Z.Cs;Z.changePolygonMode=Z.qn;Z.setPolygonMode=Z.qn;Z.getPolygonMode=Z.os;Z.showOnePolyHotspot=Z.Qp;Z.hideOnePolyHotspot=Z.yo;Z.changePolyHotspotColor=Z.er;Z.setPolyHotspotHandcursor=Z.ju;Z.toggleOnePolyHotspot=Z.Vu;Z.changeViewState=Z.gr;Z.getViewState=Z.Ds;Z.setRenderFlags=Z.lu;
Z.getRenderFlags=Z.rs;Z.setMaxTileCount=Z.Jp;Z.updatePanorama=Z.Ii;Z.isTouching=Z.Ko;Z.getIsMobile=Z.il;Z.setIsMobile=Z.fu;Z.getHasTouch=Z.co;Z.getIsTour=Z.Rr;Z.getNodesCount=Z.hs;Z.getIsAutorotating=Z.Or;Z.getIsLoading=Z.Qr;Z.getIsLoaded=Z.jj;Z.getIsTileLoading=Z.fo;Z.getLastActivity=Z.Tr;Z.getPan=Z.nf;Z.getPanNorth=Z.we;Z.getPanDest=Z.ks;Z.getPanN=Z.kl;Z.setPan=Z.be;Z.setPanNorth=Z.Xj;Z.changePan=Z.Vi;Z.changePanLog=Z.pn;Z.getTilt=Z.jg;Z.getTiltDest=Z.vs;Z.setTilt=Z.ce;Z.changeTilt=Z.Wi;
Z.changeTiltLog=Z.rn;Z.getFov=Z.Dd;Z.getFovDest=Z.Jr;Z.setFov=Z.zb;Z.setFovMode=Z.im;Z.changeFov=Z.Ek;Z.changeFovLog=Z.Ui;Z.getVFov=Z.Mb;Z.setVFov=Z.vi;Z.getHFov=Z.el;Z.setHFov=Z.jm;Z.getDFov=Z.dl;Z.setDFov=Z.gm;Z.getRoll=Z.nj;Z.setRoll=Z.Bg;Z.setPanTilt=Z.nm;Z.setPanTiltFov=Z.Ag;Z.setDefaultView=Z.Dp;Z.setLocked=Z.setLocked;Z.setLockedMouse=Z.Hp;Z.setLockedKeyboard=Z.Gp;Z.getLockedKeyboard=Z.Vr;Z.setLockedWheel=Z.Ip;Z.moveTo=Z.moveTo;Z.moveToEx=Z.Gj;Z.moveToDefaultView=Z.jt;
Z.moveToDefaultViewEx=Z.kt;Z.addHotspotElements=Z.$m;Z.playSound=Z.Zd;Z.playPauseSound=Z.lp;Z.playStopSound=Z.Nt;Z.pauseSound=Z.fi;Z.activateSound=Z.Mq;Z.soundGetTime=Z.Gu;Z.soundSetTime=Z.Iu;Z.soundSetPlaybackRate=Z.Hu;Z.setMediaVisibility=Z.hu;Z.isPlaying=Z.isPlaying;Z.stopSound=Z.bk;Z.setVolume=Z.setVolume;Z.changeVolume=Z.hr;Z.mute=Z.ot;Z.unmute=Z.av;Z.toggleMuted=Z.Uu;Z.getHasSounds=Z.Lr;Z.getSoundsPermitted=Z.ss;Z.startAutoplayMedia=Z.Lu;Z.removeHotspots=Z.vp;Z.getHotspotsVisible=Z.eo;
Z.getHotspotPropValue=Z.fl;Z.setHotspotPropValue=Z.km;Z.getCustomPropertyDefaultValue=Z.Hr;Z.getCurrentPerspective=Z.lf;Z.addHotspot=Z.Oq;Z.updateHotspot=Z.cv;Z.removeHotspot=Z.Qt;Z.setActiveHotspot=Z.Pe;Z.getPointHotspotIds=Z.ns;Z.getHotspot=Z.Mr;Z.setFullscreen=Z.Uj;Z.toggleFullscreen=Z.hk;Z.enterFullscreen=Z.ur;Z.exitFullscreen=Z.exitFullscreen;Z.getIsFullscreen=Z.Pr;Z.startAutorotate=Z.Mu;Z.stopAutorotate=Z.Pu;Z.toggleAutorotate=Z.Tu;Z.pauseAutorotate=Z.Mt;Z.resumeAutorotate=Z.Vt;
Z.setAutorotateNodeFilter=Z.au;Z.startAnimation=Z.Up;Z.resumeAnimation=Z.Ut;Z.createLayers=Z.yn;Z.removePanorama=Z.Ff;Z.getScreenResolution=Z.so;Z.getMaxScreenResolution=Z.jo;Z.getNodeIds=Z.lo;Z.getNodeUserdata=Z.Bh;Z.getNodeUserdataPropValue=Z.mo;Z.setNodeUserdataPropValue=Z.Lp;Z.getNodeLatLng=Z.jl;Z.getNodeTitle=Z.gs;Z.getNodeDistance=Z.ds;Z.getCurrentNode=Z.hj;Z.getNextNode=Z.cs;Z.getPrevNode=Z.ps;Z.getLastVisitedNode=Z.Ur;Z.getStartNode=Z.ts;Z.getNodesWithTag=Z.no;Z.getCurrentPointHotspots=Z.Gr;
Z.getPositionAngles=Z.lj;Z.getPositionRawAngles=Z.oo;Z.nodeVisited=Z.qt;Z.clearVisitedNodes=Z.jr;Z.setElementIdPrefix=Z.du;Z.videoPanoPlay=Z.nv;Z.videoPanoStop=Z.ov;Z.videoPanoPause=Z.mv;Z.getVideoPanoTime=Z.Bs;Z.setVideoPanoTime=Z.zu;Z.getVideoPanoObject=Z.As;Z.setVideoPanoSource=Z.yu;Z.getMediaObject=Z.$r;Z.getMediaBufferSourceObject=Z.Zr;Z.registerVideoElement=Z.qp;Z.disableSoundLoading=Z.sr;Z.setCrossOrigin=Z.setCrossOrigin;Z.setProjection=Z.qb;Z.getProjection=Z.Z;Z.changeProjection=Z.Fk;
Z.changeProjectionEx=Z.Fk;Z.changeLensflares=Z.dr;Z.setTransition=Z.uu;Z.getMapType=Z.Yr;Z.getMapDetails=Z.Xr;Z.getNodeMapCoords=Z.es;Z.getNodeMapCoordsInPercent=Z.fs;Z.getMapContainingNode=Z.Wr;Z.getMapsContainingNode=Z.io;Z.getMapIDs=Z.ho;Z.getFloorplanIDs=Z.Ir;Z.getFirstMap=Z.bo;Z.getFirstFloorplan=Z.ij;Z.hasMap=Z.Ps;Z.hasFloorplan=Z.Os;Z.addVariable=Z.Rq;Z.setVariableOptions=Z.Np;Z.setVariableValue=Z.Qe;Z.getVariableValue=Z.nl;Z.setSuperCookie=Z.tu;Z.getGyroAvailable=Z.Kr;Z.setUseGyro=Z.vu;
Z.getUseGyro=Z.ws;Z.getOS=Z.js;Z.getBrowser=Z.Er;Z.getBrowserTheme=Z.Fr;Z.triggerEvent=Z.H;Z.requestRedraw=Z.St;Z.getWebGlContext=Z.Fs;Z.getHasTouch=Z.co;Z.updateViewerSizeNow=Z.fc;Z.getApiVersion=Z.Dr;Z.setApiVersion=Z.$t;Z.getInertia=Z.Nr;Z.setInertia=Z.eu;Z.getZoomCenterCursor=Z.Gs;Z.setZoomCenterCursor=Z.Au;Z.getPlayerState=Z.ms;Z.setPlayerState=Z.iu;Z.getQueryParameter=Z.getQueryParameter;Z.setQueryParameter=Z.ku;Z.enterVR=Z.ag;Z.exitVR=Z.bg;Z.toggleVR=Z.gq;Z.isInVR=Z.pg;Z.hasVR=Z.rf;
Z.getVRDisplayName=Z.ys;Z.getVRCamera=Z.xs;Z.getVRRenderer=Z.zs;Z.setVRFrameBufferScaleFactor=Z.wu;Z.getSkinGroup=Z.ml;
