-
Notifications
You must be signed in to change notification settings - Fork 0
/
pano_player.js
529 lines (528 loc) · 264 KB
/
pano_player.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
//////////////////////////////////////////////////////////////////////
// Pano2VR 6.1.14/18105 HTML5/CSS3 & WebGL Panorama Player //
// License: BKYM.COM //
// (c) 2021, Garden Gnome Software, http://ggnome.com //
//////////////////////////////////////////////////////////////////////
/*
this.useWebVR*/
var jl="function"==typeof Object.defineProperties?Object.defineProperty:function(x,p,m){if(x==Array.prototype||x==Object.prototype)return x;x[p]=m.value;return x};function ml(x){x=["object"==typeof globalThis&&globalThis,x,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var p=0;p<x.length;++p){var m=x[p];if(m&&m.Math==Math)return m}throw Error("Cannot find global object");}var nl=ml(this);
function pl(x,p){if(p)a:{var m=nl;x=x.split(".");for(var d=0;d<x.length-1;d++){var c=x[d];if(!(c in m))break a;m=m[c]}x=x[x.length-1];d=m[x];p=p(d);p!=d&&null!=p&&jl(m,x,{configurable:!0,writable:!0,value:p})}}var vl;if("function"==typeof Object.setPrototypeOf)vl=Object.setPrototypeOf;else{var wl;a:{var xl={a:!0},yl={};try{yl.__proto__=xl;wl=yl.a;break a}catch(x){}wl=!1}vl=wl?function(x,p){x.__proto__=p;if(x.__proto__!==p)throw new TypeError(x+" is not extensible");return x}:null}var zl=vl;
pl("Object.setPrototypeOf",function(x){return x||zl});pl("Array.prototype.fill",function(x){return x?x:function(p,m,d){var c=this.length||0;0>m&&(m=Math.max(0,c+m));if(null==d||d>c)d=c;d=Number(d);0>d&&(d=Math.max(0,c+d));for(m=Number(m||0);m<d;m++)this[m]=p;return this}});function Al(x){return x?x:Array.prototype.fill}pl("Int8Array.prototype.fill",Al);pl("Uint8Array.prototype.fill",Al);pl("Uint8ClampedArray.prototype.fill",Al);pl("Int16Array.prototype.fill",Al);pl("Uint16Array.prototype.fill",Al);
pl("Int32Array.prototype.fill",Al);pl("Uint32Array.prototype.fill",Al);pl("Float32Array.prototype.fill",Al);pl("Float64Array.prototype.fill",Al);function Bl(x){var p=0;return function(){return p<x.length?{done:!1,value:x[p++]}:{done:!0}}}
pl("Symbol",function(x){function p(a){if(this instanceof p)throw new TypeError("Symbol is not a constructor");return new m(d+(a||"")+"_"+c++,a)}function m(a,b){this.Ko=a;jl(this,"description",{configurable:!0,writable:!0,value:b})}if(x)return x;m.prototype.toString=function(){return this.Ko};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",c=0;return p});
pl("Symbol.iterator",function(x){if(x)return x;x=Symbol("Symbol.iterator");for(var p="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),m=0;m<p.length;m++){var d=nl[p[m]];"function"===typeof d&&"function"!=typeof d.prototype[x]&&jl(d.prototype,x,{configurable:!0,writable:!0,value:function(){return Cl(Bl(this))}})}return x});function Cl(x){x={next:x};x[Symbol.iterator]=function(){return this};return x}
function Dl(x,p){x instanceof String&&(x+="");var m=0,d=!1,c={next:function(){if(!d&&m<x.length){var a=m++;return{value:p(a,x[a]),done:!1}}d=!0;return{done:!0,value:void 0}}};c[Symbol.iterator]=function(){return c};return c}pl("Array.prototype.keys",function(x){return x?x:function(){return Dl(this,function(p){return p})}});pl("Object.is",function(x){return x?x:function(p,m){return p===m?0!==p||1/p===1/m:p!==p&&m!==m}});
pl("Array.prototype.includes",function(x){return x?x:function(p,m){var d=this;d instanceof String&&(d=String(d));var c=d.length;m=m||0;for(0>m&&(m=Math.max(m+c,0));m<c;m++){var a=d[m];if(a===p||Object.is(a,p))return!0}return!1}});
pl("String.prototype.includes",function(x){return x?x:function(p,m){if(null==this)throw new TypeError("The 'this' value for String.prototype.includes must not be null or undefined");if(p instanceof RegExp)throw new TypeError("First argument to String.prototype.includes must not be a regular expression");return-1!==(this+"").indexOf(p,m||0)}});
var __extends=this&&this.__extends||function(){function x(p,m){x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,c){d.__proto__=c}||function(d,c){for(var a in c)Object.prototype.hasOwnProperty.call(c,a)&&(d[a]=c[a])};return x(p,m)}return function(p,m){function d(){this.constructor=p}if("function"!==typeof m&&null!==m)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");x(p,m);p.prototype=null===m?Object.create(m):(d.prototype=m.prototype,new d)}}();
function El(){var x="perspective",p=["Webkit","Moz","O","ms","Ms"],m;for(m=0;m<p.length;m++)"undefined"!==typeof document.documentElement.style[p[m]+"Perspective"]&&(x=p[m]+"Perspective");"undefined"!==typeof document.documentElement.style[x]?"webkitPerspective"in document.documentElement.style?(x=document.createElement("style"),p=document.createElement("div"),m=document.head||document.getElementsByTagName("head")[0],x.textContent="@media (-webkit-transform-3d) {#ggswhtml5{height:5px}}",m.appendChild(x),
p.id="ggswhtml5",document.documentElement.appendChild(p),m=5===p.offsetHeight,x.parentNode.removeChild(x),p.parentNode.removeChild(p)):m=!0:m=!1;return m}function Fl(){var x;if(x=!!window.WebGLRenderingContext)try{var p=document.createElement("canvas");p.width=100;p.height=100;var m=p.getContext("webgl");m||(m=p.getContext("experimental-webgl"));x=!!m}catch(d){x=!1}return x}var ggP2VR;
(function(x){var p=function(){function d(c){this.u=null;this.Zg=this.Mm=this.qb=!1;this.rb=!0;this.ob=this.Ma=this.Ga=0;this.fov=70;this.jb=0;this.autoplay=this.eh=!1;this.id="";this.A=this.pan=0;this.u=c;this.Cc=this.Wb=100;this.Mc=1}d.prototype.ac=function(c){var a;if(a=c.getAttributeNode("id"))this.id=a.nodeValue.toString();if(a=c.getAttributeNode("pan"))this.pan=Number(a.nodeValue);if(a=c.getAttributeNode("tilt"))this.A=Number(a.nodeValue)};d.prototype.xo=function(c){var a="",b=this.u,e=!0;if(b.Sf){var g=
new x.Ha(0,0,-100);g.Ga(-this.A*Math.PI/180);g.Ma(this.pan*Math.PI/180);g.Ma(-b.pan.m*Math.PI/180);g.Ga(b.A.m*Math.PI/180);g.ob(b.V.m*Math.PI/180);.01<=g.z&&(e=!1)}b.Uc&&(a+="perspective("+c+"px) ");a=a+("translate3d(0px,0px,"+c+"px) rotateZ(")+(b.V.m.toFixed(10)+"deg) ");a+="rotateX("+b.A.m.toFixed(10)+"deg) ";a+="rotateY("+(-b.pan.m).toFixed(10)+"deg) ";a+="rotateY("+this.pan.toFixed(10)+"deg) ";a+="rotateX("+(-this.A).toFixed(10)+"deg) ";c=1E4;g=this.j.videoWidth;var f=this.j.videoHeight;if(0==
g||0==f)g=640,f=480;0<this.Wb&&(g=this.Wb);0<this.Cc&&(f=this.Cc);0<g&&0<f&&(this.j.width=g,this.j.height=f,this.j.style.width=g+"px",this.j.style.height=f+"px");0<this.fov&&(c=g/(2*Math.tan(this.fov/2*Math.PI/180)));a+="translate3d(0px,0px,"+(-c).toFixed(10)+"px) ";a+="rotateZ("+this.ob.toFixed(10)+"deg) ";a+="rotateY("+(-this.Ma).toFixed(10)+"deg) ";a+="rotateX("+this.Ga.toFixed(10)+"deg) ";this.Mc&&1!=this.Mc&&(a+="scaleY("+this.Mc+") ");a+="translate3d("+-g/2+"px,"+-f/2+"px,0px) ";this.j.style[b.Wa+
"Origin"]="0% 0%";this.qb&&(a="",1==this.jb&&(a+="scale("+Math.min(b.D.width/g,b.D.height/f)+") "),a+="translate3d("+-g/2+"px,"+-f/2+"px,0px) ");this.Bq!=a&&(this.Bq=a,this.j.style[b.Wa]=a,this.j.style.visibility=e&&this.rb?"visible":"hidden",this.Zg&&this.Mm==this.qb&&(this.j.style[b.dd]="all 0s linear 0s"),this.Mm=this.qb)};d.prototype.lg=function(c){this.j&&(this.j.style.visibility=c?"visible":"hidden")};d.prototype.mf=function(){var c=this.u;c.ja?(this.j.style.left=c.D.width/2+"px",this.j.style.top=
c.D.height/2+"px"):(this.j.style.left=c.margin.left+c.D.width/2+"px",this.j.style.top=c.margin.top+c.D.height/2+"px")};return d}();x.Zs=p;var m=function(d){function c(a){a=d.call(this,a)||this;a.ya=!1;a.ho=!1;a.mn=!1;a.qg=!1;a.wi=!1;a.Uk=!1;a.Gd=!1;a.xb=null;a.Ag=null;a.oj=0;a.bg=0;a.Tc=!1;a.paused=!0;a.ended=!1;a.Tk=!1;a.stopped=!1;a.qj=!1;a.jc=null;a.Bf=-1;a.vg=!1;a.url=[];a.loop=0;a.level=1;a.yc=0;a.mode=1;a.xi=10;a.Cb=0;a.pg=0;a.qa=1;a.Xc=0;a.Yc=0;a.Zc=0;a.$c=0;a.$f=-1;return a}__extends(c,d);
c.prototype.so=function(){var a=this,b=a.j.play();if(void 0!==b)b.then(function(){a.xg()})["catch"](function(){a.qa=1;a.j.pause();a.ho&&(a.j.muted=!0,a.j.play())})};c.prototype.bo=function(){this.ya&&this.qj?(this.qj=!1,clearInterval(this.jc),this.jc=null):0==this.loop?this.ya?(this.xb=null,this.Id()):this.j.play():0<this.yb?(this.yb--,this.ya||(this.j.currentTime=0),this.wi&&(this.Sb&&0==this.Sb.gain.value||0==this.Lb.gain.value&&0==this.Vb.gain.value&&0==this.Tb.gain.value&&0==this.Ub.gain.value)||
(this.ya?(this.xb=null,this.Id()):this.j.play())):this.ya&&(this.xb=null,this.Tc=!1,this.ended=this.paused=!0,clearInterval(this.jc),this.jc=null,this.u.M("bufferSoundEnded",{id:this.id}))};c.prototype.xg=function(){this.Gd=!1;var a=this.u.va;a&&(this.ya||(this.source=a.createMediaElementSource(this.j)),2==this.mode||3==this.mode||5==this.mode?(this.qd=a.createChannelSplitter(2),this.Lb=a.createGain(),this.Tb=a.createGain(),this.Ub=a.createGain(),this.Vb=a.createGain(),this.Eg=a.createChannelMerger(2),
this.ya?this.xb.connect(this.qd):this.source.connect(this.qd),this.qd.connect(this.Lb,0),this.qd.connect(this.Tb,0),this.qd.connect(this.Ub,1),this.qd.connect(this.Vb,1),this.Lb.connect(this.Eg,0,0),this.Tb.connect(this.Eg,0,1),this.Ub.connect(this.Eg,0,0),this.Vb.connect(this.Eg,0,1),this.Eg.connect(a.destination),1==this.$f&&this.ll()):(this.Sb=a.createGain(),this.ya?this.xb.connect(this.Sb):this.source.connect(this.Sb),this.Sb.connect(a.destination)))};c.prototype.ll=function(){1!=this.$f||this.Gd||
!this.qd||2!=this.mode&&3!=this.mode&&5!=this.mode||(this.qd.connect(this.Ub,0),this.qd.connect(this.Vb,0))};c.prototype.Nh=function(){var a=this.u.va;this.qb||this.Uk||(this.Lb?(this.Lb.gain.setValueAtTime(this.Xc,a.currentTime),this.Vb.gain.setValueAtTime(this.$c,a.currentTime),this.Tb.gain.setValueAtTime(this.Yc,a.currentTime),this.Ub.gain.setValueAtTime(this.Zc,a.currentTime)):this.Sb&&this.Sb.gain.setValueAtTime((this.Xc+this.$c)/2,a.currentTime+1))};c.prototype.Bj=function(){if(!this.Gd||4==
this.mode||6==this.mode){var a=this.u,b=this.u.va;if(this.j||this.ya){var e,g=this.pan-a.pan.m;for(e=this.A-a.A.m;-180>g;)g+=360;for(;180<g;)g-=360;var f=this.yc,h=this.xi;0==h&&(h=.01);0>h&&(h=a.fov.m);this.dc||(this.dc=new x.Ha,this.dc.jm(this.pan,this.A));0!=this.mode&&1!=this.mode||!b||this.Sb&&this.Sb.gain.setValueAtTime(this.level*a.ca*this.qa,b.currentTime);if(2==this.mode&&b){var l=.5*Math.cos(g*Math.PI/180)+.5;this.Xc=Math.sqrt(l)*this.qa*this.level*a.ca;this.$c=Math.sqrt(l)*this.qa*this.level*
a.ca;this.Yc=Math.sqrt(1-l)*this.qa*this.level*a.ca;this.Zc=Math.sqrt(1-l)*this.qa*this.level*a.ca;this.Nh()}if(3==this.mode){g=0>g?g<-this.Cb?g+this.Cb:0:g>this.Cb?g-this.Cb:0;var k=this.level;e=Math.abs(e);e=e<this.pg?0:e-this.pg;var w=1-e/h;if(Math.abs(g)>h||0>w)l=k*f*a.ca,b?(this.Xc=l*this.qa,this.$c=l*this.qa,this.Zc=this.Yc=0,this.Nh()):this.j.volume=k*f*a.ca;else if(l=1-Math.abs(g/h),b){var r=k*(f+(1-f)*w*l)*a.ca;l=k*f*a.ca;0<=g?(this.Xc=r*this.qa,this.$c=l*this.qa):(this.Xc=l*this.qa,this.$c=
r*this.qa);2*Math.abs(g)<h?(l=1-Math.abs(2*g)/h,r=k*(f+(1-f)*w*l)*a.ca,l=.5*k*(1-f)*w*(1-l)*a.ca,0<=g?(this.$c=r*this.qa,this.Zc=l*this.qa,this.Yc=0):(this.Xc=r*this.qa,this.Yc=l*this.qa,this.Zc=0)):(l=1-(Math.abs(2*g)-h)/h,r=.5*k*(1-f)*w*l*a.ca,0<=g?(this.Zc=r*this.qa,this.Yc=0):(this.Yc=r*this.qa,this.Zc=0));this.Nh()}else this.j.volume=k*(f+(1-f)*w*l)*a.ca}4==this.mode&&(Math.abs(g)<this.Cb&&Math.abs(e)<this.pg?this.qg||(this.qg=!0,this.yb=this.loop-1,this.ya?this.Tc||this.Id():this.j.play()):
this.qg=!1);5==this.mode&&(e=180*Math.acos(a.bk.bj(this.dc))/Math.PI,e<this.Cb?b?(this.Xc=this.level*a.ca*this.qa,this.$c=this.level*a.ca*this.qa,this.Zc=this.Yc=0,this.Nh()):this.j.volume=this.level*a.ca:b?(e<this.Cb+h?(g=0>g?g>-this.Cb?0:g+this.Cb:g<this.Cb?0:g-this.Cb,r=1-Math.max(e-this.Cb,0)/h,l=Math.max(1-Math.abs(g)*Math.cos(this.A*Math.PI/180)/h,0),0<g?(this.Xc=this.level*(r*(1-this.yc)+this.yc)*a.ca*this.qa,this.$c=this.level*(r*l*(1-this.yc)+this.yc)*a.ca*this.qa,this.Yc=0,this.Zc=this.level*
r*(1-l)*a.ca*this.qa):(this.Xc=this.level*(r*l*(1-this.yc)+this.yc)*a.ca*this.qa,this.$c=this.level*(r*(1-this.yc)+this.yc)*a.ca*this.qa,this.Yc=this.level*r*(1-l)*a.ca*this.qa,this.Zc=0)):(r=this.level*this.yc*a.ca,this.Xc=r*this.qa,this.$c=r*this.qa,this.Zc=this.Yc=0),this.Nh()):(e-=this.Cb,e<h&&0<h?(l=1-Math.abs(e/h),this.j.volume=this.level*(f+(1-f)*l)*a.ca):this.j.volume=f*a.ca));6==this.mode&&(e=180*Math.acos(a.bk.bj(this.dc))/Math.PI,Math.abs(e)<this.Cb?this.qg||(this.qg=!0,this.yb=this.loop-
1,this.ya?this.Tc||this.Id():this.j.play()):this.qg=!1)}}};c.prototype.Ul=function(){var a=this;a.xb=this.u.va.createBufferSource();a.xb.addEventListener("ended",function(){a.bo()},!1);a.Gd||(2==a.mode||3==a.mode||5==a.mode?a.xb.connect(a.qd):a.xb.connect(a.Sb))};c.prototype.Ar=function(a){var b=this,e=this.u.va;b.Ul();this.u.O("createBufferSoundSource()");e.decodeAudioData(a,function(g){b.$f=g.numberOfChannels;1==b.$f&&b.ll();b.Ag=g;b.xb.buffer=g;b.u.O("audio Data decoded");b.Tk&&(b.Id(),b.Tk=!1)})};
c.prototype.Id=function(){var a=this.u.va,b=this.bg;if(this.Ag){null==this.xb&&(this.Ul(),this.xb.buffer=this.Ag);this.oj=a.currentTime-b;this.bg=0;this.Bf=-1;this.Tc=!0;this.ended=this.qj=this.stopped=this.paused=!1;this.Gd&&this.xg();try{this.xb.start(0,b),this.u.M("bufferSoundPlay",{id:this.id}),this.jc&&(clearInterval(this.jc),this.jc=null),this.jc=setInterval(function(e){return function(){e.u.M("bufferSoundTimeupdate",{id:e.id,time:e.wf()})}}(this),50)}catch(e){this.u.O(e),clearInterval(this.jc),
this.jc=null}this.u.O("buffer Source started")}else this.u.O("bufferSoundPlay() -> no audio buffer -> playWhenReady"),this.Tk=!0};c.prototype.Pj=function(){var a=this.u.va.currentTime-this.oj;this.xf();this.stopped=!1;this.bg=a;this.paused=!0;this.u.M("bufferSoundPause",{id:this.id});this.u.M("bufferSoundTimeupdate",{id:this.id,time:this.wf()})};c.prototype.xf=function(){this.xb&&this.Tc&&(this.qj=!0,this.xb.disconnect(),this.xb.stop(0),this.xb=null);this.oj=this.bg=0;this.Bf=-1;this.ended=this.paused=
this.Tc=!1;this.stopped=!0;clearInterval(this.jc);this.jc=null;this.u.M("bufferSoundStop",{id:this.id});this.u.M("bufferSoundTimeupdate",{id:this.id,time:this.wf()})};c.prototype.wf=function(){var a=this.u.va;if(-1<this.Bf)return this.Bf;if(this.ended)return this.mi();if(!this.stopped){if(this.paused)return this.bg;if(this.Tc)return a.currentTime-this.oj}return 0};c.prototype.mi=function(){return this.Ag?this.Ag.duration:1};c.prototype.Ml=function(a){var b=this.Tc;this.vg=this.vg||this.Tc;b&&this.xf();
this.bg=a;this.paused=!0;this.ended=this.stopped=this.Tc=!1;this.Bf=-1;this.vg?(this.Id(),this.vg=!1):this.u.M("bufferSoundTimeupdate",{id:this.id,time:a});this.vg=!1};c.prototype.ip=function(a){this.Tc&&(this.vg=!0,this.xf());this.Bf=a;this.u.M("bufferSoundTimeupdate",{id:this.id,time:this.wf()})};c.prototype.addElement=function(){var a=-1,b=this,e=this.u,g=this.u.va;try{for(var f=!1,h=0;h<e.Y.length;h++)e.Y[h].id==b.id&&(a=h,null==e.Y[h].j&&!e.Y[h].ya||e.Y[h].url.join()!=b.url.join()||e.Y[h].loop!=
b.loop||e.Y[h].mode!=b.mode||(f=!0,e.Y[h].pan=b.pan,e.Y[h].A=b.A,e.Y[h].level=b.level,e.Y[h].yc=b.yc,e.Y[h].xi=b.xi,e.Y[h].Cb=b.Cb,e.Y[h].pg=b.pg));if(f)e.O("Keep playing "+b.id);else{if(0<=a){var l=e.Y[a];if(null!=l.j||l.ya)if(g&&e.Ja.enabled)e.Ja.Vh.push(l),1!=e.K.ta&&2!=e.K.ta&&6!=e.K.ta&&e.Ja.fm(l);else{try{l.ya?l.Pj():l.j.pause()}catch(r){e.O(r)}try{l.Ye()}catch(r){e.O(r)}}}g&&(this.Gd=!0);if(g&&(e.gd||e.nc)){if(0<b.url.length){b.ya=!0;var k=new XMLHttpRequest;k.open("GET",e.fb(b.url[0]),!0);
k.responseType="arraybuffer";k.onload=function(){b.Ar(k.response)};k.send();b.wi=!1}}else{b.j=document.createElement("audio");b.j.crossOrigin=e.crossOrigin;b.j.setAttribute("class","ggmedia");e.Of&&b.j.setAttribute("id",e.Of+b.id);for(h=0;h<b.url.length;h++)f=void 0,f=document.createElement("source"),""!=b.url[h]&&"#"!=b.url[h]&&(f.crossOrigin=e.crossOrigin,f.setAttribute("src",e.fb(b.url[h])),b.j.appendChild(f));b.j.volume=b.level*e.ca;if(0<b.j.childNodes.length&&(e.aa.appendChild(b.j),b.j.addEventListener("ended",
function(){b.bo()},!1),g)){b.wi=!1;0==b.loop&&b.source&&b.source.mediaElement&&(b.source.mediaElement.loop=!0);var w=new XMLHttpRequest;w.open("GET",e.fb(b.url[0]),!0);w.responseType="arraybuffer";w.onload=function(){g.decodeAudioData(w.response,function(r){b.$f=r.numberOfChannels;1==b.$f&&b.ll()})};w.send()}}1<=b.loop&&(b.yb=b.loop-1);0<=a?e.Y[a]=b:e.Y.push(b);b.Bj()}}catch(r){this.u.O(r)}};c.prototype.Ye=function(){try{this.u.O("Remove Snd:"+this.id),this.ya?(clearInterval(this.jc),this.jc=null):
(this.u.aa.removeChild(this.j),this.j=null)}catch(a){this.u.O(a)}};c.prototype.ac=function(a){d.prototype.ac.call(this,a);var b;(b=a.getAttributeNode("url"))&&this.url.push(b.nodeValue.toString());if(b=a.getAttributeNode("level"))this.level=Number(b.nodeValue);if(b=a.getAttributeNode("loop"))this.loop=Number(b.nodeValue);if(b=a.getAttributeNode("mode"))this.mode=Number(b.nodeValue);if(b=a.getAttributeNode("nodechangekeep"))this.mn=1==Number(b.nodeValue);if(b=a.getAttributeNode("field"))this.xi=Number(b.nodeValue);
if(b=a.getAttributeNode("ambientlevel"))this.yc=Number(b.nodeValue);if(b=a.getAttributeNode("pansize"))this.Cb=Number(b.nodeValue);if(b=a.getAttributeNode("tiltsize"))this.pg=Number(b.nodeValue);for(a=a.firstChild;a;)"source"==a.nodeName&&(b=a.getAttributeNode("url"))&&this.url.push(b.nodeValue.toString()),a=a.nextSibling};return c}(p);x.Cl=m;m=function(d){function c(a){a=d.call(this,a)||this;a.poster="";a.Ga=0;a.Ma=0;a.ob=0;a.fov=50;a.jb=0;a.eh=!1;a.kd=!1;return a}__extends(c,d);c.prototype.Ne=function(){1!=
this.jb&&4!=this.jb||this.ah(!this.qb);2==this.jb&&this.u.wn(this.id)};c.prototype.ah=function(a){var b=this.u,e=b.va;if(1==this.jb||4==this.jb)if(this.qb=a,this.u.Rb)(b=b.sa)&&b.activateSound(this.id,this.qb?1:0);else{if(this.qb)this.j.style.pointerEvents="auto",this.j.style.cursor="pointer",this.j.style.zIndex=(b.di+8E4).toString(),this.j.style[this.u.dd]="all 1s ease 0s",this.u.isPlaying(this.id)||b.We(this.id);else{this.j.style.pointerEvents="none";this.j.style.cursor="default";this.j.style.zIndex=
b.di.toString();this.j.style[this.u.dd]="all 1s ease 0s";this.u.isPlaying(this.id)&&b.pj(this.id);this.Uk=!0;var g=this;setTimeout(function(){g.Uk=!1},1E3)}if(e&&(2==this.mode||3==this.mode||5==this.mode)&&(e=e.currentTime,this.Lb&&this.Vb&&this.Tb.gain&&this.Tb&&this.Ub)){var f=this.Lb.gain.value,h=this.Vb.gain.value,l=this.Tb.gain.value,k=this.Ub.gain.value;this.qb?(this.Lb.gain.linearRampToValueAtTime(f,e),this.Lb.gain.linearRampToValueAtTime(this.level*b.ca,e+1),this.Vb.gain.linearRampToValueAtTime(h,
e),this.Vb.gain.linearRampToValueAtTime(this.level*b.ca,e+1),this.Tb.gain.linearRampToValueAtTime(l,e),this.Tb.gain.linearRampToValueAtTime(0,e+1),this.Ub.gain.linearRampToValueAtTime(k,e),this.Ub.gain.linearRampToValueAtTime(0,e+1)):(this.Lb.gain.linearRampToValueAtTime(f,e),this.Lb.gain.linearRampToValueAtTime(this.Xc,e+1),this.Vb.gain.linearRampToValueAtTime(h,e),this.Vb.gain.linearRampToValueAtTime(this.$c,e+1),this.Tb.gain.linearRampToValueAtTime(l,e),this.Tb.gain.linearRampToValueAtTime(this.Yc,
e+1),this.Ub.gain.linearRampToValueAtTime(k,e),this.Ub.gain.linearRampToValueAtTime(this.Zc,e+1))}this.Zg=!0;this.u.yo()}2==this.jb&&(a?this.u.We(this.id):this.u.Sk(this.id))};c.prototype.bh=function(){this.Zg=!1;this.j.style[this.u.dd]="none"};c.prototype.Qs=function(){0==this.loop?this.j.play():0<this.yb?(this.yb--,this.j.currentTime=0,this.j.play()):this.isRunning=!1};c.prototype.ac=function(a){d.prototype.ac.call(this,a);var b;if(b=a.getAttributeNode("poster"))this.poster=String(b.nodeValue);
if(b=a.getAttributeNode("maskimage"))this.jd=String(b.nodeValue);if(b=a.getAttributeNode("rotx"))this.Ga=Number(b.nodeValue);if(b=a.getAttributeNode("roty"))this.Ma=Number(b.nodeValue);if(b=a.getAttributeNode("rotz"))this.ob=Number(b.nodeValue);if(b=a.getAttributeNode("fov"))this.fov=Number(b.nodeValue);if(b=a.getAttributeNode("width"))this.Wb=Number(b.nodeValue);if(b=a.getAttributeNode("height"))this.Cc=Number(b.nodeValue);this.Mc=(b=a.getAttributeNode("stretch"))?Number(b.nodeValue):1;if(b=a.getAttributeNode("clickmode"))this.jb=
Number(b.nodeValue);if(b=a.getAttributeNode("handcursor"))this.eh=1==Number(b.nodeValue);if(b=a.getAttributeNode("startmutedmobile"))this.ho=1==Number(b.nodeValue)};c.prototype.addElement=function(){var a=this,b=this.u,e=this.u.va;try{a.j=document.createElement("video");a.j.setAttribute("class","ggmedia");a.j.crossOrigin=b.crossOrigin;a.j.hidden=!0;a.j.addEventListener("click",function(h){h.stopPropagation()});b.Of&&a.j.setAttribute("id",b.Of+a.id);if(b.$h)a.j.setAttribute("playsinline","playsinline"),
a.j.setAttribute("style","display: none; max-width:none;");else if(a.j.setAttribute("style","max-width:none;pointer-events:none;"),a.j.setAttribute("playsinline","playsinline"),1==a.jb||4==a.jb)a.j.addEventListener(b.Ho(),function(){a.bh()},!1),a.j.addEventListener("transitionend",function(){a.bh()},!1);var g=void 0;for(g=0;g<a.url.length;g++){var f=void 0;f=document.createElement("source");f.crossOrigin=b.crossOrigin;f.setAttribute("src",b.fb(a.url[g]));a.j.appendChild(f)}""!=a.poster&&(a.j.poster=
b.fb(a.poster),0>a.loop&&(a.j.preload="none"));a.jd&&""!=a.jd&&(a.j.style.jd="url('"+b.fb(a.jd)+"')",a.j.style.webkitMaskImage="url('"+b.fb(a.jd)+"')",a.j.style.maskSize="100% 100%",a.j.style.webkitMaskSize="100% 100%");a.j.volume=a.level*b.ca;1<=a.loop&&(a.yb=a.loop-1);e&&(this.Gd=!0);(1==a.mode||2==a.mode||3==a.mode||5==a.mode)&&0<=a.loop&&(a.j.autoplay=!0,a.isRunning=!0,a.autoplay=!0,a.so());b.T.push(this);b.$h?b.aa.appendChild(a.j):(a.j.style.position="absolute",b.Qe&&(a.Wb/=2,a.Cc/=2),a.Wb&&
(a.j.width=a.Wb),a.Cc&&(a.j.height=a.Cc),b.N.appendChild(a.j));a.j.addEventListener("ended",function(){a.Qs()},!1)}catch(h){b.O(h)}};c.prototype.registerElement=function(a,b){this.kd=!0;this.j=b;this.id=a;this.level=1;this.u.T.push(this)};c.prototype.Ye=function(){var a=this.u;a.$h&&(a.S.deleteTexture(this.texture),this.texture=0,a.aa.removeChild(this.j));a.zo&&a.N.removeChild(this.j);this.j=null};return c}(m);x.Dl=m;m=function(d){function c(a){a=d.call(this,a)||this;a.url="";a.Ga=0;a.Ma=0;a.ob=0;
a.fov=50;a.jb=0;a.eh=!1;a.Wb=100;a.Cc=100;a.Mc=1;return a}__extends(c,d);c.prototype.ac=function(a){d.prototype.ac.call(this,a);var b;if(b=a.getAttributeNode("url"))this.url=b.nodeValue.toString();if(b=a.getAttributeNode("maskimage"))this.jd=String(b.nodeValue);if(b=a.getAttributeNode("rotx"))this.Ga=Number(b.nodeValue);if(b=a.getAttributeNode("roty"))this.Ma=Number(b.nodeValue);if(b=a.getAttributeNode("rotz"))this.ob=Number(b.nodeValue);if(b=a.getAttributeNode("fov"))this.fov=Number(b.nodeValue);
if(b=a.getAttributeNode("width"))this.Wb=Number(b.nodeValue);if(b=a.getAttributeNode("height"))this.Cc=Number(b.nodeValue);this.Mc=(b=a.getAttributeNode("stretch"))?Number(b.nodeValue):1;if(b=a.getAttributeNode("clickmode"))this.jb=Number(b.nodeValue);if(b=a.getAttributeNode("handcursor"))this.eh=1==Number(b.nodeValue);for(a=a.firstChild;a;)"source"==a.nodeName&&(b=a.getAttributeNode("url"))&&(this.url=b.nodeValue.toString()),a=a.nextSibling};c.prototype.bh=function(){this.Zg=!1;this.j.style[this.u.dd]=
"none"};c.prototype.Ne=function(){1!==this.jb&&4!==this.jb||this.ah(!this.qb)};c.prototype.ah=function(a){var b=this.u;if(1===this.jb||4===this.jb)this.qb=a,this.u.Rb?(a=this.u.sa)&&a.activateSound(this.id,this.qb?1:0):(this.qb?(this.j.style.pointerEvents="auto",this.j.style.cursor="pointer",this.j.style.zIndex=(b.di+8E4).toString()):(this.j.style.pointerEvents="none",this.j.style.cursor="default",this.j.style.zIndex=b.di.toString()),this.j.style[b.dd]="all 1s ease 0s",this.Zg=!0,b.uo())};c.prototype.addElement=
function(){var a=this,b=this.u;try{a.j=document.createElement("img");a.j.setAttribute("style","-webkit-user-drag:none; max-width:none; pointer-events:none;");a.j.setAttribute("class","ggmedia");a.j.hidden=!0;a.j.addEventListener("click",function(e){e.stopPropagation()});b.Of&&a.j.setAttribute("id",b.Of+a.id);a.j.ondragstart=function(){return!1};if(1===a.jb||4===a.jb)a.j.addEventListener(b.Ho(),function(){a.bh()},!1),a.j.addEventListener("transitionend",function(){a.bh()},!1);a.j.setAttribute("src",
b.fb(a.url));a.Wb&&(a.j.width=a.Wb);a.Cc&&(a.j.height=a.Cc);b.gb.push(a);a.j.style.position="absolute";a.jd&&""!=a.jd&&(a.j.style.jd="url('"+b.fb(a.jd)+"')",a.j.style.webkitMaskImage="url('"+b.fb(a.jd)+"')",a.j.style.maskSize="100% 100%",a.j.style.webkitMaskSize="100% 100%");b.N.appendChild(a.j)}catch(e){b.O("Error addimage:"+e)}};c.prototype.Ye=function(){this.u.N.removeChild(this.j);this.j=null};return c}(p);x.Ro=m;p=function(d){function c(a){a=d.call(this,a)||this;a.Ll=50;a.alpha=50;a.type=0;a.color=
16777215;return a}__extends(c,d);c.prototype.ac=function(a){d.prototype.ac.call(this,a);var b;if(b=a.getAttributeNode("blinding"))this.Ll=Number(b.nodeValue);if(b=a.getAttributeNode("alpha"))this.alpha=Number(b.nodeValue);if(b=a.getAttributeNode("type"))this.type=Number(b.nodeValue);if(b=a.getAttributeNode("color"))this.color=1*Number(b.nodeValue)};return c}(p);x.So=p;p=function(){function d(c){this.u=c;this.type="empty";this.fl=this.id=this.target=this.description=this.title=this.url="";this.w=100;
this.h=20;this.Fj=!1;this.j=null;this.Db=this.$b=this.ib=this.wa=this.distance=this.A=this.pan=0;this.visible=!0;this.ic=c.I.ic;this.fc=c.I.fc;this.hc=c.I.hc;this.ec=c.I.ec;this.Lf=c.I.Lf;this.cd="";this.Jd=this.Fe=0;this.rg=!1;this.ui=0;this.vertices=[]}d.prototype.Ff=function(){this.id=this.id;this.pan=this.pan;this.tilt=this.A;this.url=this.url;this.target=this.target;this.title=this.title;this.distance=this.distance;this.description=this.description;this.skinid=this.fl;this.obj=this.j;this.customimage=
this.cd;this.customimagewidth=this.Fe;this.customimageheight=this.Jd;this.use3D=this.rg;this.distance3D=this.ui;this.j&&this.j.__div&&(this.div=this.j.__div)};d.prototype.vs=function(){var c=this.url;return"{"==c.charAt(0)?c.substr(1,c.length-2):!1};d.prototype.ac=function(c){var a;if(a=c.getAttributeNode("url"))this.url=a.nodeValue.toString();if(a=c.getAttributeNode("target"))this.target=a.nodeValue.toString();if(a=c.getAttributeNode("title"))this.title=a.nodeValue.toString();if(a=c.getAttributeNode("description"))this.description=
a.nodeValue.toString();if(a=c.getAttributeNode("id"))this.id=a.nodeValue.toString();if(a=c.getAttributeNode("skinid"))this.fl=a.nodeValue.toString();if(a=c.getAttributeNode("width"))this.w=Number(a.nodeValue);if(a=c.getAttributeNode("height"))this.h=Number(a.nodeValue);if(a=c.getAttributeNode("wordwrap"))this.Fj=1==Number(a.nodeValue);a=c.getAttributeNode("pan");this.pan=1*(a?Number(a.nodeValue):0);a=c.getAttributeNode("tilt");this.A=1*(a?Number(a.nodeValue):0);a=c.getAttributeNode("fov");this.fov=
1*(a?Number(a.nodeValue):0);a=c.getAttributeNode("distance");this.distance=1*(a?Number(a.nodeValue):0);if(a=c.getAttributeNode("bordercolor"))this.ic=1*Number(a.nodeValue);if(a=c.getAttributeNode("backgroundcolor"))this.fc=1*Number(a.nodeValue);if(a=c.getAttributeNode("borderalpha"))this.hc=1*Number(a.nodeValue);if(a=c.getAttributeNode("backgroundalpha"))this.ec=1*Number(a.nodeValue);if(a=c.getAttributeNode("handcursor"))this.Lf=1==Number(a.nodeValue);if(a=c.getAttributeNode("customimage"))this.cd=
this.u.tm()+a.nodeValue;if(a=c.getAttributeNode("customimagewidth"))this.Fe=Number(a.nodeValue);if(a=c.getAttributeNode("customimageheight"))this.Jd=Number(a.nodeValue);if(a=c.getAttributeNode("use3D"))this.rg=1==Number(a.nodeValue);if(a=c.getAttributeNode("distance3D"))this.ui=Number(a.nodeValue);for(c=c.firstChild;c;){if("polystring"==c.nodeName){a=c.textContent.toString().split("|");for(var b=0;b<a.length;b++){var e=a[b].split("/");if(2==e.length){var g={pan:0,A:0};g.pan=Number(e[0]);g.A=Number(e[1]);
this.vertices.push(g)}}}"vertex"==c.nodeName&&(g={pan:0,A:0},a=c.getAttributeNode("pan"),g.pan=1*(a?Number(a.nodeValue):0),a=c.getAttributeNode("tilt"),g.A=1*(a?Number(a.nodeValue):0),this.vertices.push(g));c=c.nextSibling}this.Ff()};return d}();x.gi=p})(ggP2VR||(ggP2VR={}));
(function(x){var p=function(){function m(d,c){this.x=d;this.y=c}m.prototype.init=function(d,c){this.x=d;this.y=c};m.prototype.Nd=function(d,c,a){var b=c.y-d.y;this.x=d.x+(c.x-d.x)*a;this.y=d.y+b*a};m.prototype.hp=function(d,c,a,b,e){var g=new m;g.Nd(d,a,e);d=new m;d.Nd(a,b,e);a=new m;a.Nd(b,c,e);c=new m;c.Nd(g,d,e);g=new m;g.Nd(d,a,e);d=new m;d.Nd(c,g,e);this.x=d.x;this.y=d.y};m.prototype.Nj=function(d,c,a,b,e){var g=new m,f=.5,h=.25;do{g.hp(d,c,a,b,f);var l=g.x-e;f=0<l?f-h:f+h;h/=2}while(.01<Math.abs(l));
this.x=g.x;this.y=g.y};return m}();x.Kc=p})(ggP2VR||(ggP2VR={}));
(function(x){var p=function(){function m(d,c,a,b,e){this.x=d;this.y=c;this.z=a;this.Fd=b;this.dc=e}m.prototype.init=function(d,c,a,b,e){this.x=d;this.y=c;this.z=a;this.Fd=b;this.dc=e};m.prototype.toString=function(){return"("+this.x+","+this.y+","+this.z+") - ("+this.Fd+","+this.dc+")"};m.prototype.Ga=function(d){var c=Math.sin(d);d=Math.cos(d);var a=this.y,b=this.z;this.y=d*a-c*b;this.z=c*a+d*b};m.prototype.Gr=function(){var d=this.y;this.y=-this.z;this.z=d};m.prototype.Fr=function(){var d=this.y;
this.y=this.z;this.z=-d};m.prototype.Ma=function(d){var c=Math.sin(d);d=Math.cos(d);var a=this.x,b=this.z;this.x=d*a+c*b;this.z=-c*a+d*b};m.prototype.Hr=function(){var d=this.x;this.x=-this.z;this.z=d};m.prototype.ob=function(d){var c=Math.sin(d);d=Math.cos(d);var a=this.x,b=this.y;this.x=d*a-c*b;this.y=c*a+d*b};m.prototype.Kn=function(){var d=this.x;this.x=-this.y;this.y=d};m.prototype.Vd=function(d){this.Ga(d*Math.PI/180)};m.prototype.$e=function(d){this.Ma(d*Math.PI/180)};m.prototype.af=function(d){this.ob(d*
Math.PI/180)};m.prototype.clone=function(){return new m(this.x,this.y,this.z,this.Fd,this.dc)};m.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)};m.prototype.normalize=function(){var d=this.length();0<d&&(d=1/d,this.x*=d,this.y*=d,this.z*=d)};m.prototype.bj=function(d){return this.x*d.x+this.y*d.y+this.z*d.z};m.prototype.jm=function(d,c){var a=Math.cos(c*Math.PI/180);this.x=a*Math.sin(d*Math.PI/180);this.y=Math.sin(c*Math.PI/180);this.z=a*Math.cos(d*Math.PI/
180)};m.prototype.cp=function(){return 180*Math.atan2(-this.x,-this.z)/Math.PI};m.prototype.ep=function(){return 180*Math.asin(this.y/this.length())/Math.PI};m.prototype.Nd=function(d,c,a){this.x=d.x*a+c.x*(1-a);this.y=d.y*a+c.y*(1-a);this.z=d.z*a+c.z*(1-a);this.Fd=d.Fd*a+c.Fd*(1-a);this.dc=d.dc*a+c.dc*(1-a)};return m}();x.Ha=p})(ggP2VR||(ggP2VR={}));
(function(x){var p=function(){function m(){this.Qn()}m.prototype.Qn=function(){this.pc=1;this.Dc=this.qc=this.Ob=0;this.rc=1;this.sc=this.Xb=this.Ec=0;this.Yb=1};m.prototype.clone=function(d){this.pc=d.pc;this.Ob=d.Ob;this.qc=d.qc;this.Dc=d.Dc;this.rc=d.rc;this.Ec=d.Ec;this.Xb=d.Xb;this.sc=d.sc;this.Yb=d.Yb};m.prototype.Wr=function(d){var c=Math.cos(d);d=Math.sin(d);this.pc=1;this.Dc=this.qc=this.Ob=0;this.rc=c;this.Ec=-d;this.Xb=0;this.sc=d;this.Yb=c};m.prototype.Xr=function(d){var c=Math.cos(d);
d=Math.sin(d);this.pc=c;this.Ob=0;this.qc=d;this.Dc=0;this.rc=1;this.Ec=0;this.Xb=-d;this.sc=0;this.Yb=c};m.prototype.Yr=function(d){var c=Math.cos(d);d=Math.sin(d);this.pc=c;this.Ob=-d;this.qc=0;this.Dc=d;this.rc=c;this.sc=this.Xb=this.Ec=0;this.Yb=1};m.prototype.Tr=function(d){this.Wr(d*Math.PI/180)};m.prototype.Ur=function(d){this.Xr(d*Math.PI/180)};m.prototype.Vr=function(d){this.Yr(d*Math.PI/180)};m.prototype.Vd=function(d){this.hd||(this.hd=new m,this.le=new m);this.hd.Tr(d);this.le.clone(this);
this.multiply(this.hd,this.le)};m.prototype.$e=function(d){this.hd||(this.hd=new m,this.le=new m);this.hd.Ur(d);this.le.clone(this);this.multiply(this.hd,this.le)};m.prototype.af=function(d){this.hd||(this.hd=new m,this.le=new m);this.hd.Vr(d);this.le.clone(this);this.multiply(this.hd,this.le)};m.prototype.multiply=function(d,c){this.pc=d.pc*c.pc+d.Ob*c.Dc+d.qc*c.Xb;this.Ob=d.pc*c.Ob+d.Ob*c.rc+d.qc*c.sc;this.qc=d.pc*c.qc+d.Ob*c.Ec+d.qc*c.Yb;this.Dc=d.Dc*c.pc+d.rc*c.Dc+d.Ec*c.Xb;this.rc=d.Dc*c.Ob+
d.rc*c.rc+d.Ec*c.sc;this.Ec=d.Dc*c.qc+d.rc*c.Ec+d.Ec*c.Yb;this.Xb=d.Xb*c.pc+d.sc*c.Dc+d.Yb*c.Xb;this.sc=d.Xb*c.Ob+d.sc*c.rc+d.Yb*c.sc;this.Yb=d.Xb*c.qc+d.sc*c.Ec+d.Yb*c.Yb};m.prototype.Yq=function(d){var c=d.x;var a=d.y;var b=d.z;d.x=c*this.pc+a*this.Ob+b*this.qc;d.y=c*this.Dc+a*this.rc+b*this.Ec;d.z=c*this.Xb+a*this.sc+b*this.Yb};return m}();x.yl=p})(ggP2VR||(ggP2VR={}));
(function(x){x.la={create:function(p){var m="undefined"!=typeof Float32Array?new Float32Array(16):Array(16);p&&(m[0]=p[0],m[1]=p[1],m[2]=p[2],m[3]=p[3],m[4]=p[4],m[5]=p[5],m[6]=p[6],m[7]=p[7],m[8]=p[8],m[9]=p[9],m[10]=p[10],m[11]=p[11],m[12]=p[12],m[13]=p[13],m[14]=p[14],m[15]=p[15]);return m},set:function(p,m){m[0]=p[0];m[1]=p[1];m[2]=p[2];m[3]=p[3];m[4]=p[4];m[5]=p[5];m[6]=p[6];m[7]=p[7];m[8]=p[8];m[9]=p[9];m[10]=p[10];m[11]=p[11];m[12]=p[12];m[13]=p[13];m[14]=p[14];m[15]=p[15];return m},identity:function(p){p[0]=
1;p[1]=0;p[2]=0;p[3]=0;p[4]=0;p[5]=1;p[6]=0;p[7]=0;p[8]=0;p[9]=0;p[10]=1;p[11]=0;p[12]=0;p[13]=0;p[14]=0;p[15]=1;return p},multiply:function(p,m,d){d||(d=p);var c=p[0],a=p[1],b=p[2],e=p[3],g=p[4],f=p[5],h=p[6],l=p[7],k=p[8],w=p[9],r=p[10],y=p[11],z=p[12],ha=p[13],ua=p[14];p=p[15];var id=m[0],sh=m[1],db=m[2],gl=m[3],tf=m[4],hl=m[5],il=m[6],ll=m[7],kl=m[8],ol=m[9],ql=m[10],rl=m[11],sl=m[12],tl=m[13],ul=m[14];m=m[15];d[0]=id*c+sh*g+db*k+gl*z;d[1]=id*a+sh*f+db*w+gl*ha;d[2]=id*b+sh*h+db*r+gl*ua;d[3]=id*
e+sh*l+db*y+gl*p;d[4]=tf*c+hl*g+il*k+ll*z;d[5]=tf*a+hl*f+il*w+ll*ha;d[6]=tf*b+hl*h+il*r+ll*ua;d[7]=tf*e+hl*l+il*y+ll*p;d[8]=kl*c+ol*g+ql*k+rl*z;d[9]=kl*a+ol*f+ql*w+rl*ha;d[10]=kl*b+ol*h+ql*r+rl*ua;d[11]=kl*e+ol*l+ql*y+rl*p;d[12]=sl*c+tl*g+ul*k+m*z;d[13]=sl*a+tl*f+ul*w+m*ha;d[14]=sl*b+tl*h+ul*r+m*ua;d[15]=sl*e+tl*l+ul*y+m*p;return d},translate:function(p,m,d){var c=m[0],a=m[1];m=m[2];if(!d||p==d)return p[12]=p[0]*c+p[4]*a+p[8]*m+p[12],p[13]=p[1]*c+p[5]*a+p[9]*m+p[13],p[14]=p[2]*c+p[6]*a+p[10]*m+p[14],
p[15]=p[3]*c+p[7]*a+p[11]*m+p[15],p;var b=p[0],e=p[1],g=p[2],f=p[3],h=p[4],l=p[5],k=p[6],w=p[7],r=p[8],y=p[9],z=p[10],ha=p[11];d[0]=b;d[1]=e;d[2]=g;d[3]=f;d[4]=h;d[5]=l;d[6]=k;d[7]=w;d[8]=r;d[9]=y;d[10]=z;d[11]=ha;d[12]=b*c+h*a+r*m+p[12];d[13]=e*c+l*a+y*m+p[13];d[14]=g*c+k*a+z*m+p[14];d[15]=f*c+w*a+ha*m+p[15];return d},scale:function(p,m,d){var c=m[0],a=m[1];m=m[2];if(!d||p==d)return p[0]*=c,p[1]*=c,p[2]*=c,p[3]*=c,p[4]*=a,p[5]*=a,p[6]*=a,p[7]*=a,p[8]*=m,p[9]*=m,p[10]*=m,p[11]*=m,p;d[0]=p[0]*c;d[1]=
p[1]*c;d[2]=p[2]*c;d[3]=p[3]*c;d[4]=p[4]*a;d[5]=p[5]*a;d[6]=p[6]*a;d[7]=p[7]*a;d[8]=p[8]*m;d[9]=p[9]*m;d[10]=p[10]*m;d[11]=p[11]*m;d[12]=p[12];d[13]=p[13];d[14]=p[14];d[15]=p[15];return d},rotate:function(p,m,d,c){var a=d[0],b=d[1];d=d[2];var e=Math.sqrt(a*a+b*b+d*d);if(!e)return null;1!=e&&(e=1/e,a*=e,b*=e,d*=e);var g=Math.sin(m),f=Math.cos(m),h=1-f;m=p[0];e=p[1];var l=p[2],k=p[3],w=p[4],r=p[5],y=p[6],z=p[7],ha=p[8],ua=p[9],id=p[10],sh=p[11],db=a*a*h+f,gl=b*a*h+d*g,tf=d*a*h-b*g,hl=a*b*h-d*g,il=b*
b*h+f,ll=d*b*h+a*g,kl=a*d*h+b*g;a=b*d*h-a*g;b=d*d*h+f;c?p!=c&&(c[12]=p[12],c[13]=p[13],c[14]=p[14],c[15]=p[15]):c=p;c[0]=m*db+w*gl+ha*tf;c[1]=e*db+r*gl+ua*tf;c[2]=l*db+y*gl+id*tf;c[3]=k*db+z*gl+sh*tf;c[4]=m*hl+w*il+ha*ll;c[5]=e*hl+r*il+ua*ll;c[6]=l*hl+y*il+id*ll;c[7]=k*hl+z*il+sh*ll;c[8]=m*kl+w*a+ha*b;c[9]=e*kl+r*a+ua*b;c[10]=l*kl+y*a+id*b;c[11]=k*kl+z*a+sh*b;return c},Fp:function(p,m,d,c,a,b,e){e||(e=x.la.create());var g=m-p,f=c-d,h=b-a;e[0]=2*a/g;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=2*a/f;e[6]=0;e[7]=
0;e[8]=(m+p)/g;e[9]=(c+d)/f;e[10]=-(b+a)/h;e[11]=-1;e[12]=0;e[13]=0;e[14]=-(b*a*2)/h;e[15]=0;return e},perspective:function(p,m,d,c,a){p=d*Math.tan(p*Math.PI/360);m*=p;return x.la.Fp(-m,m,-p,p,d,c,a)},dt:function(p,m,d,c,a,b,e){e||(e=x.la.create());var g=m-p,f=c-d,h=b-a;e[0]=2/g;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=2/f;e[6]=0;e[7]=0;e[8]=0;e[9]=0;e[10]=-2/h;e[11]=0;e[12]=-(p+m)/g;e[13]=-(c+d)/f;e[14]=-(b+a)/h;e[15]=1;return e}}})(ggP2VR||(ggP2VR={}));
(function(x){var p=function(){function m(d){this.Aa=x.la.create();this.Bb=x.la.create();this.wd=0;this.kb=[];this.kh=!1;this.kl=this.kk=this.Yk=1;this.zf=1E6;this.ri=[!1,!1,!1,!1,!1,!1];this.nj=!1;this.fk=[];this.zl=8;this.Qq=new x.yl;this.fe=[];this.u=d;if(d.gd||d.Qe)d.Sh=2}m.prototype.gh=function(){var d=this.u.S;if(d){var c=d.createShader(d.FRAGMENT_SHADER);d.shaderSource(c,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\n\t\t\t\t\tuniform sampler2D uSampler;\n\t\t\t\t\tvoid main(void) {\n\t\t\t\t\t\tgl_FragColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n\t\t\t\t\t}");
d.compileShader(c);d.getShaderParameter(c,d.COMPILE_STATUS)||(console&&console.log(d.getShaderInfoLog(c)),alert(d.getShaderInfoLog(c)),c=null);var a=d.createShader(d.VERTEX_SHADER);this.fd(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.R=d.createProgram();this.Xf(this.R,a,c);this.R.ka=d.getAttribLocation(this.R,"aVertexPosition");d.enableVertexAttribArray(this.R.ka);this.R.Na=d.getAttribLocation(this.R,"aTextureCoord");d.enableVertexAttribArray(this.R.Na);this.R.ne=d.getUniformLocation(this.R,"uPMatrix");this.R.Bh=d.getUniformLocation(this.R,"uMVMatrix");this.R.ig=d.getUniformLocation(this.R,"uSampler");this.R.Jj=d.getUniformLocation(this.R,"uZoffset");c=d.createShader(d.VERTEX_SHADER);this.fd(c,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\n\t\t\t\tuniform vec2 uCanvasDimensions;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tvec2 pointNorm = (aVertexPosition.xy / uCanvasDimensions) * 2.0 - vec2(1.0, 1.0);\n\t\t\t\t\tgl_Position = vec4(pointNorm.x, pointNorm.y * -1.0, 0.0, 1.0);\n\t\t\t\t}");
a=d.createShader(d.FRAGMENT_SHADER);this.fd(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.Sd=d.createProgram();this.Xf(this.Sd,c,a);this.Sd.ka=d.getAttribLocation(this.Sd,"aVertexPosition");d.enableVertexAttribArray(this.Sd.ka);a=d.createShader(d.VERTEX_SHADER);this.fd(a,"precision highp float;\n\t\t\t\tattribute vec3 aVertexPosition;\n\t\t\t\tvarying vec2 vTextureCoord;\n\t\t\t\tuniform vec2 uCanvasDimensions;\n\t\t\t\tuniform vec4 uRect;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tvec2 pos = vec2(uRect.x + uRect.z*aVertexPosition.x,uRect.y + uRect.w*aVertexPosition.y);\n\t\t\t\t\tvec2 pointNorm = (pos / uCanvasDimensions) * 2.0 - vec2(1.0, 1.0);\n\t\t\t\t\tgl_Position = vec4(pointNorm.x, pointNorm.y * -1.0, 1.0, 1.0);\n\t\t\t\t\tvTextureCoord.s=aVertexPosition.x;\n\t\t\t\t\tvTextureCoord.t=1.0-aVertexPosition.y;\n\t\t\t\t}");
c=d.createShader(d.FRAGMENT_SHADER);this.fd(c,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\n\t\t\t\tuniform sampler2D uSampler;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tgl_FragColor = texture2D(uSampler,vTextureCoord);\n\t\t\t\t}");this.Qg=d.createProgram();this.Xf(this.Qg,a,c)}};m.prototype.Ji=function(){var d=this.u,c=d.S;if(c){var a=c.createShader(c.FRAGMENT_SHADER);var b=this.rk(13);this.fd(a,b);b=c.createShader(c.VERTEX_SHADER);
this.fd(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.Cn=c.createProgram();this.Xf(this.Cn,b,a);a=c.createShader(c.FRAGMENT_SHADER);b=this.rk(4);this.fd(a,b);b=c.createShader(c.VERTEX_SHADER);this.fd(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.Dn=c.createProgram();this.Xf(this.Dn,b,a);a=c.createShader(c.FRAGMENT_SHADER);b=this.rk(d.F.format);this.fd(a,b);b=c.createShader(c.VERTEX_SHADER);this.fd(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.En=c.createProgram();this.Xf(this.En,b,a);this.dj||(this.dj=c.createBuffer())}else this.u.O("No WebGL to initRemapShader!")};m.prototype.fd=function(d,c){var a=this.u.S;a.shaderSource(d,c);a.compileShader(d);a.getShaderParameter(d,a.COMPILE_STATUS)||(console&&console.log(a.getShaderInfoLog(d)),Gl&&alert(a.getShaderInfoLog(d)))};m.prototype.Xf=function(d,c,a){var b=this.u.S;b.attachShader(d,c);b.attachShader(d,a);b.linkProgram(d);b.getProgramParameter(d,b.LINK_STATUS)||(alert("Could not initialise shader program"),
console&&console.log(b.getError()));b.useProgram(d)};m.prototype.rk=function(d){var c=this.u;var a="#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#define M_PI 3.14159265358979323846\nvarying vec2 dst;\nuniform vec2 srcScale;\nuniform vec2 srcOffset;\nuniform float rectDstDistance;\nuniform float fisheyeDistance;\nuniform float stereoDistance;\nuniform float directionBlend;\nuniform mat4 matRotate; // = mat4( 1.0,0.0,0.0,0.0, 0.0,1.0,0.0,0.0, 0.0,0.0,1.0,0.0, 0.0,0.0,0.0,1.0 );\nconst float rectSrcDistance = 1.0;\nuniform vec2 tonemap;\n";
a=(13==d?a+"uniform samplerCube cubeTexture;":a+"uniform sampler2D tileTexture;\n")+"void main()\n{\n";a+="vec4 direction;\n";a+="vec2 src;\n";a+="vec2 srcCord;\n";a+="vec2 texc;\n";var b=this.Im(c.Ta());c.Ta()!=c.Fc&&0!=c.Fc?(c=this.Im(c.Fc),a+="vec4 direction1,direction2;\n",a+=b.replace("direction=","direction1="),a+=c.replace("direction=","direction2="),a+="direction=normalize(mix(direction1, direction2,1.0-directionBlend));\n"):a+=b;a+="direction=direction*matRotate;\n";13==d&&(a+="direction.z=-direction.z;",
a+="gl_FragColor = textureCube(cubeTexture, direction.xyz);");4==d&&(a+="float iz=1.0/(direction.z * rectSrcDistance);\n",a+="src.x=-direction.x*iz;\n",a+="src.y= direction.y*iz;\n",a+="texc=src * srcScale + srcOffset;\n",a+="if (",a+="(direction.z<0.0) && ",a+="(texc.x>=0.0) && (texc.x<=1.0) && (texc.y>=0.0) && (texc.y<=1.0)) {\n",a+=" gl_FragColor = texture2D(tileTexture, texc);\n",a+="} else {\n",a+=" discard;\n",a+="}\n");1==d&&(a+="src.x=atan(float(-direction.x), float(-direction.z));",a+=
"src.y=asin(direction.y);\n",a+="texc=src * srcScale + srcOffset;\n",a+="gl_FragColor = texture2D(tileTexture, texc);\n");14==d&&(a+="vec2 cf;\n",a+="if ((direction.z<0.0) && (direction.z<=-abs(direction.x)) && (direction.z<=-abs(direction.y))) {\n",a+=" src.x=-direction.x/direction.z;\n",a+=" src.y=+direction.y/direction.z;\n",a+=" cf.x=1.0;cf.y=3.0;\n",a+="}\n",a+="if ((direction.x>=0.0) && (direction.x>=abs(direction.y)) && (direction.x>=abs(direction.z))) {\n",a+=" src.x=+direction.z/direction.x;\n",
a+=" src.y=-direction.y/direction.x;\n",a+=" cf.x=3.0;cf.y=3.0;\n",a+="}\n",a+="if ((direction.z>=0.0) && (direction.z>=abs(direction.x)) && (direction.z>=abs(direction.y))) {\n",a+=" src.x=-direction.x/direction.z;\n",a+=" src.y=-direction.y/direction.z;\n",a+=" cf.x=5.0;cf.y=3.0;\n",a+="}\n",a+="if ((direction.x<=0.0) && (direction.x<=-abs(direction.y)) && (direction.x<=-abs(direction.z))) {\n",a+=" src.x=+direction.z/direction.x;\n",a+=" src.y=+direction.y/direction.x;\n",a+=" cf.x=1.0;cf.y=1.0;\n",
a+="}\n",a+="if ((direction.y>=0.0) && (direction.y>=abs(direction.x)) && (direction.y>=abs(direction.z))) {\n",a+=" src.x=+direction.x/direction.y;\n",a+=" src.y=-direction.z/direction.y;\n",a+=" cf.x=5.0;cf.y=1.0;\n",a+="}\n",a+="if ((direction.y<=0.0) && (direction.y<=-abs(direction.x)) && (direction.y<=-abs(direction.z))) {\n",a+=" src.x=-direction.x/direction.y;\n",a+=" src.y=-direction.z/direction.y;\n",a+=" cf.x=3.0;cf.y=1.0;\n",a+="}\n",a+="texc.x=(cf.x+src.x*srcScale.x) / 6.0;\n",a+=
"texc.y=(cf.y+src.y*srcScale.y) / 4.0;\n",a+="gl_FragColor = texture2D(tileTexture, texc);\n");return a+="}\n"};m.prototype.Im=function(d){var c="";switch(d){case 4:c+="direction.x=dst.x*rectDstDistance;\ndirection.y=dst.y*rectDstDistance;\ndirection.z=-1.0;\n";break;case 12:c+="float r,ph,ro;\nr=length(dst.xy)*0.5;\nro=atan(float(dst.x),float(-dst.y));\nph=r / fisheyeDistance;\ndirection.x= sin(ph) * sin(ro);\ndirection.y=-sin(ph) * cos(ro);\ndirection.z=-cos(ph);\n";break;case 9:c+="float n;\nvec2 ind;\nind=dst*stereoDistance;\nn=1.0 + ind.x*ind.x + ind.y*ind.y;\ndirection.x=2.0*ind.x/n;\ndirection.y=2.0*ind.y/n;\ndirection.z=(n-2.0)/n;\n"}return c+
"direction.w=0.0;\ndirection=normalize(direction);\n"};m.prototype.Sm=function(d){var c,a,b=this.u,e=this.u.S;this.ak=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,this.ak);var g=[-1,-1,1,1,-1,1,1,1,1,-1,1,1];for(c=0;12>c;c++)2>c%3&&(g[c]*=d);e.bufferData(e.ARRAY_BUFFER,new Float32Array(g),e.STATIC_DRAW);this.Ee=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,this.Ee);var f=[1,0,0,0,0,1,1,1];e.bufferData(e.ARRAY_BUFFER,new Float32Array(f),e.STATIC_DRAW);this.sd=e.createBuffer();e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,
this.sd);var h=[0,1,2,0,2,3];e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array(h),e.STATIC_DRAW);g=[];h=[];f=[];var l=new x.Ha;for(d=0;6>d;d++){var k=d%3;var w=3>d?1:0;for(a=0;4>a;a++){l.x=-1;l.y=-1;l.z=1;for(c=0;c<a;c++)l.Kn();f.push((0>l.x?.33:0)+.33*k,(0>l.y?0:.5)+.5*w);if(4>d)for(c=0;c<d;c++)l.Hr();else 5==d?l.Gr():l.Fr();g.push(l.x,l.y,l.z)}c=4*d;h.push(0+c,1+c,2+c,0+c,2+c,3+c)}b.F.ul=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,b.F.ul);e.bufferData(e.ARRAY_BUFFER,new Float32Array(g),e.STATIC_DRAW);
b.F.rj=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,b.F.rj);e.bufferData(e.ARRAY_BUFFER,new Float32Array(f),e.STATIC_DRAW);b.F.Ak=e.createBuffer();e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,b.F.Ak);e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array(h),e.STATIC_DRAW);this.Eq=e.createBuffer();this.Dq=e.createBuffer()};m.prototype.uk=function(d){var c=this;return function(){try{if(d.br)return;var a=c.u.S;a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,1);var b=!1;null!=d.Se&&d.Se.complete?d.Om||(a.bindTexture(a.TEXTURE_2D,
d),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,d.Se),b=d.Om=!0):null!=d.dg&&d.dg.complete&&(a.bindTexture(a.TEXTURE_2D,d),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,d.dg),b=!0);b&&(d.loaded=!0);a.bindTexture(a.TEXTURE_2D,null);a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,0)}catch(e){c.u.O(e)}c.u.update(2)}};m.prototype.Tm=function(){var d=this.u,c=d.S;if(this.kb)for(;0<this.kb.length;)c.deleteTexture(this.kb.pop());this.kb=[];for(var a=0;6>a;a++){var b=c.createTexture();this.wd++;
b.dg=null;b.Se=null;b.Om=!1;c.bindTexture(c.TEXTURE_2D,b);c.texImage2D(c.TEXTURE_2D,0,c.RGB,1,1,0,c.RGB,c.UNSIGNED_BYTE,null);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);if(d.Af[a]){var e=new Image;e.crossOrigin=d.crossOrigin;e.src=d.fb(d.Af[a]);b.dg=e;e.addEventListener&&e.addEventListener("load",this.uk(b),!1);d.kc.push(e)}this.kb.push(b)}for(a=0;6>a;a++)d.Kg[a]&&
(e=new Image,e.crossOrigin=d.crossOrigin,e.src=d.fb(d.Kg[a]),e.addEventListener?e.addEventListener("load",this.uk(this.kb[a]),!1):e.onload=this.uk(this.kb[a]),this.kb[a].Se=e,d.kc.push(e));for(a=0;a<d.T.length;a++)d.T[a].kd||(d.T[a].texture=c.createTexture(),d.wd++,c.bindTexture(c.TEXTURE_2D,d.T[a].texture),c.texImage2D(c.TEXTURE_2D,0,c.RGB,1,1,0,c.RGB,c.UNSIGNED_BYTE,null),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,
c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE));d.F.texture=c.createTexture();d.wd++;c.bindTexture(c.TEXTURE_2D,d.F.texture);c.texImage2D(c.TEXTURE_2D,0,c.RGB,1,1,0,c.RGB,c.UNSIGNED_BYTE,null);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);c.bindTexture(c.TEXTURE_2D,null)};m.prototype.Xs=function(){var d=this.u;if(d.D.width!=d.N.offsetWidth||d.D.height!=d.N.offsetHeight)d.D.width=
d.N.offsetWidth,d.D.height=d.N.offsetHeight;d.he&&(d.Oc(0),d.Jc());if(d.S){var c=d.S;this.zj();c.clearColor(0,0,0,1);c.clear(c.COLOR_BUFFER_BIT|c.DEPTH_BUFFER_BIT);c.useProgram(this.R);this.mg(0);c.uniform1i(this.R.ig,0);c.enableVertexAttribArray(this.R.ka);c.enableVertexAttribArray(this.R.Na);c.bindBuffer(c.ARRAY_BUFFER,this.Ee);c.vertexAttribPointer(this.R.Na,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.sd);c.uniform1f(this.R.Jj,1E-4);c.vertexAttribPointer(this.R.ka,
3,c.FLOAT,!1,0,0);x.la.identity(this.Bb);x.la.perspective(d.mc(),d.Ab.width/d.Ab.height,.1,100,this.Bb);c.uniformMatrix4fv(this.R.ne,!1,this.Bb);for(d=0;6>d;d++)this.mg(d),c.bindBuffer(c.ARRAY_BUFFER,this.ak),c.vertexAttribPointer(this.R.ka,3,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.Ee),c.vertexAttribPointer(this.R.Na,2,c.FLOAT,!1,0,0),6<=this.kb.length&&this.kb[d].loaded&&(c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,this.kb[d]),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.sd),c.uniform1i(this.R.ig,
0),c.uniformMatrix4fv(this.R.Bh,!1,this.Aa),c.uniformMatrix4fv(this.R.ne,!1,this.Bb),c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT,0))}};m.prototype.zj=function(){var d=this.u;if(d.v.eg&&6<d.v.eg.length){var c=parseInt(d.v.eg);d.S.clearColor((c>>16&255)/255,(c>>8&255)/255,(c>>0&255)/255,1)}};m.prototype.mg=function(d,c){void 0===c&&(c=1);var a=this.u;x.la.identity(this.Aa);x.la.rotate(this.Aa,c*-a.V.m*Math.PI/180,[0,0,1]);x.la.rotate(this.Aa,c*-a.A.m*Math.PI/180,[1,0,0]);-1==c?x.la.rotate(this.Aa,
-a.pan.m*Math.PI/180,[0,1,0]):x.la.rotate(this.Aa,(180-a.pan.m)*Math.PI/180,[0,1,0]);a.Pa&&(x.la.rotate(this.Aa,-a.Pa.pitch*Math.PI/180,[1,0,0]),x.la.rotate(this.Aa,a.Pa.V*Math.PI/180,[0,0,1]));4>d?x.la.rotate(this.Aa,-Math.PI/2*d,[0,1,0]):x.la.rotate(this.Aa,Math.PI/2*(5==d?1:-1),[1,0,0])};m.prototype.ys=function(d){var c=this;return function(){c.fk.push(d)}};m.prototype.zp=function(d){this.u.Oa=!0;this.u.td=!0;d.loaded=!0;d.Zk=0;d.pe=0;var c=this.u.S;this.am();c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL,
1);if(null!=d.v&&d.v.complete){d.sb=c.createTexture();this.u.wd++;c.bindTexture(c.TEXTURE_2D,d.sb);try{c.texImage2D(c.TEXTURE_2D,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,d.v)}catch(a){c.texImage2D(c.TEXTURE_2D,0,c.RGBA,1,1,0,c.RGBA,c.UNSIGNED_BYTE,new Uint8Array([128,128,128,250])),this.u.O(a)}}this.u.update(2)};m.prototype.am=function(){this.u.cc&&this.u.cc--};m.prototype.Ap=function(){if(0<this.fk.length){var d=this.fk.shift();this.zp(d)}};m.prototype.Zq=function(d){var c=this;return function(){c.u.Oa=!0;
c.u.td=!0;var a=c.u.v;try{if(null!=d&&d.complete){var b=a.levels[a.levels.length-1],e=a.Ea;b.height=b.width=d.width-2*e;b.U=b.fa=1;for(var g=0;6>g;g++){var f=new x.ae;f.W=document.createElement("canvas");c.u.ja?(f.W.width=b.width+2*e,f.W.height=b.height+2*e):(f.W.width=a.P+2*e,f.W.height=a.P+2*e);f.cb=f.W.getContext("2d");f.W.style[c.u.Wa+"Origin"]="0% 0%";f.W.style.overflow="hidden";f.W.style.position="absolute";f.v=d;var h=b.width+2*e,l=b.height+2*e;f.cb&&f.cb.drawImage(d,0,g*l,h,l,0,0,h,l);if(c.u.ja&&
c.u.S){var k=c.u.S;k.pixelStorei(k.UNPACK_FLIP_Y_WEBGL,1);f.sb=k.createTexture();c.u.wd++;k.bindTexture(k.TEXTURE_2D,f.sb);try{k.texImage2D(k.TEXTURE_2D,0,k.RGBA,k.RGBA,k.UNSIGNED_BYTE,f.W)}catch(w){c.u.O(w)}k.bindTexture(k.TEXTURE_2D,null);k.pixelStorei(k.UNPACK_FLIP_Y_WEBGL,0)}c.u.nd&&(f.W.ie=-1,c.u.N.insertBefore(f.W,c.u.N.firstChild));b.ba[g]=f}b.loaded=!0}}catch(w){c.u.O(w)}c.u.update(2)}};m.prototype.oo=function(d){var c=this;return function(){c.u.Oa=!0;c.u.td=!0;c.am();d.v=null}};m.prototype.Vs=
function(){var d=this.u,c=d.v,a=d.v.levels;d.he&&(d.Oc(0),d.Jc());if(d.S){var b=d.S;b.useProgram(this.R);this.zj();b.clearColor(0,0,0,1);b.clear(b.COLOR_BUFFER_BIT|b.DEPTH_BUFFER_BIT);b.enable(b.DEPTH_TEST);x.la.identity(this.Bb);x.la.perspective(d.mc(),d.Ab.width/d.Ab.height,.1,100,this.Bb);b.uniformMatrix4fv(this.R.ne,!1,this.Bb);d.wo();d.Mk();var e=d.jk();var g=a.length-1;for(d.Hc=0;g>=e;){var f=a[g],h=1;g==a.length-1&&0==c.Ea&&(h=c.P/(c.P-.5));for(var l=0;6>l;l++){var k=d.cube.faces[l];var w=
k.cg;if(k.rb&&0<w.ug&&0<w.ci&&0<w.scale||f.cache){k.Oa=!1;k.vf[g]||(k.vf[g]={mb:0,Kb:0,Mb:0,Nb:0});var r=k.vf[g];f.cache?(r.mb=0,r.Kb=0,r.Mb=f.U-1,r.Nb=f.fa-1):d.Jm(f,w,r);w=!0;for(var y=r.Kb;y<=r.Nb;y++)for(var z=r.mb;z<=r.Mb;z++){var ha=z+y*f.U+l*f.U*f.fa,ua=f.ba[ha];ua||(ua=f.ba[ha]=new x.ae);this.vi()?ua.v||(ua.pe?ua.pe--:(this.Si(ua,f,d.ue(l,g,z,y)),d.Oa=!0)):d.Hc++;if(ua.sb){if(!ua.Kf){ha=.5*g+1;ua.Kf=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,ua.Kf);var id=[-1,-1,1,1,-1,1,1,1,1,-1,1,1];id[3]=
z*c.P-c.Ea;id[0]=Math.min((z+1)*c.P,f.width)+c.Ea;id[7]=y*c.P-c.Ea;id[1]=Math.min((y+1)*c.P,f.height)+c.Ea;id[4]=id[1];id[6]=id[3];id[9]=id[0];id[10]=id[7];for(var sh=0;12>sh;sh++)id[sh]=0==sh%3?h*ha*(-2*id[sh]/f.width+1):1==sh%3?h*ha*(-2*id[sh]/f.height+1):ha;b.bufferData(b.ARRAY_BUFFER,new Float32Array(id),b.STATIC_DRAW)}}else w=!1;ua.visible=k.rb}r.Hk=w}}g--}for(l=0;6>l;l++)if(k=d.cube.faces[l],k.rb)for(w=k.cg,this.mg(l),b.uniform1i(this.R.ig,0),b.uniformMatrix4fv(this.R.ne,!1,this.Bb),b.uniformMatrix4fv(this.R.Bh,
!1,this.Aa),b.enableVertexAttribArray(this.R.ka),b.enableVertexAttribArray(this.R.Na),b.bindBuffer(b.ARRAY_BUFFER,this.Ee),b.vertexAttribPointer(this.R.Na,2,b.FLOAT,!1,0,0),b.activeTexture(b.TEXTURE0),b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.sd),b.useProgram(this.R),g=e;g<=a.length-1;){f=a[g];if(k.rb&&0<w.ug&&k.vf[g]&&0<=k.vf[g].mb){r=k.vf[g];for(y=r.Kb;y<=r.Nb;y++)for(z=r.mb;z<=r.Mb;z++)ha=z+y*f.U+l*f.U*f.fa,(ua=f.ba[ha])&&ua.sb&&(b.uniform1f(this.R.Jj,1E-4*(z%2+y%2*2)),b.bindBuffer(b.ARRAY_BUFFER,
ua.Kf),b.vertexAttribPointer(this.R.ka,3,b.FLOAT,!1,0,0),b.bindTexture(b.TEXTURE_2D,ua.sb),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE),b.drawElements(b.TRIANGLES,6,b.UNSIGNED_SHORT,0)),ua.visible=k.rb;r.Hk&&(g=a.length)}g++}this.$k();d.td=!1}};m.prototype.vi=function(){return this.u.cc<this.u.Sh};m.prototype.Si=
function(d,c,a){var b=this.u;b.zk++;d.v=new Image;d.Zk++;d.pe=1<<d.Zk;d.v.onload=this.ys(d);d.v.onerror=this.oo(d);d.v.onabort=this.oo(d);d.v.crossOrigin=b.crossOrigin;d.v.setAttribute("src",a);b.O("load "+a);c.cache&&b.kc.push(d.v);b.cc++};m.prototype.Go=function(){var d=this.u,c=d.v;d.he&&(d.Oc(0),d.Jc());if(d.S){var a=d.S;this.zj();Gl&&a.clearColor(.2,0,0,1);a.clearColor(0,0,0,1);a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT);a.disable(a.DEPTH_TEST);a.disable(a.CULL_FACE);a.bindBuffer(a.ARRAY_BUFFER,
this.dj);var b=[0,0];b[2]=d.D.width;b[3]=0;b[4]=d.D.width;b[5]=d.D.height;b[6]=0;b[7]=d.D.height;a.bufferData(a.ARRAY_BUFFER,new Float32Array(b),a.STATIC_DRAW);this.u.Hc=0;if(!this.Nc||this.kh)0<c.levels.length?this.xp():this.yp();d.F.Ad?this.qr():(a.enable(a.DEPTH_TEST),a.depthRange(0,1),a.depthFunc(a.LESS),this.nj=!1,0<c.levels.length&&this.Ws(),this.Nc&&!this.nj&&this.pr())}};m.prototype.gs=function(d,c,a,b,e,g,f){var h=this.u,l=h.v,k=h.D,w=a*l.P/c.width,r=(a+1)*l.P/c.width;a=b*l.P/c.height;c=
(b+1)*l.P/c.height;1<r&&(e*=2,r=1);1<c&&(e*=2,c=1);e=Math.min(this.zl,e);r=(r-w)/e;var y=(c-a)/e;b=c=0;l={x:0,y:0};var z={x:0,y:0},ha=0;d.Fi=0;var ua=h.Dh,id=new x.Ha,sh=this.Qq;sh.Qn();4>g?sh.$e(-90*g):sh.Vd(5==g?90:-90);h.Pa&&(sh.af(h.Pa.V),sh.Vd(-h.Pa.pitch));sh.$e(-h.pan.m);sh.Vd(h.A.m);sh.af(h.V.m);for(g=0;g<=e;g++)for(var db=0;db<=e;db++){var gl=2*(w+db*r)-1;var tf=2*(a+g*y)-1;id.x=1*gl;id.y=1*tf;id.z=-1;id.normalize();sh.Yq(id);gl=this.Fm(id,l,h.Ta());0!=h.Fc&&1>ua&&(gl=gl&&this.Fm(id,z,h.Fc),
l.x=l.x*ua+z.x*(1-ua),l.y=l.y*ua+z.y*(1-ua));gl?-1E10<l.x&&1E10>l.x&&-1E10<l.y&&1E10>l.y?-2<l.x&&2>l.x&&-2<l.y&&2>l.y&&(c+=l.x,b+=l.y,ha++):l.x=NaN:l.x=NaN;d.xd[d.Fi++]=l.x;d.xd[d.Fi++]=l.y}0<ha?(c/=ha,b/=ha):f=0;for(a=0;a<d.Fi;a+=2)l.x=d.xd[a],l.y=d.xd[a+1],h=l.x-c,w=l.y-b,l.x+=h*f,l.y+=w*f,d.xd[a]=k.width/2+l.x*k.width/2,d.xd[a+1]=k.height/2-l.y*k.width/2;this.hs(d,e)};m.prototype.Fm=function(d,c,a){var b=!0;switch(a){case 0:case 4:a=1/(d.z*this.Yk);c.x=-d.x*a;c.y=d.y*a;0<d.z&&(b=!1);break;case 9:1==
d.z&&(b=!1);a=1/((1-d.z)*this.kl);c.x=d.x*a;c.y=-d.y*a;break;case 12:if(a=Math.sqrt(d.x*d.x+d.y*d.y),0==a)c.x=0,c.y=0;else{var e=2*this.kk*Math.acos(-d.z)/a;if(2<a)return!1;c.x=e*d.x;c.y=-e*d.y}}return b};m.prototype.hs=function(d,c){for(var a=this.u,b=[],e,g=d.Md=0;g<c;g++)for(var f=0;f<c;f++){b[0]=g+f*(c+1);b[1]=g+1+f*(c+1);b[2]=g+(f+1)*(c+1);b[3]=g+1+(f+1)*(c+1);e=!0;for(var h=0;4>h;h++)isNaN(d.xd[2*b[0]])&&(e=!1);if(e){var l=!1,k=!1,w=!1,r=!1;for(h=0;4>h;h++){var y=d.xd[2*b[h]];y<a.D.width&&(k=
!0);0<=y&&(l=!0);y=d.xd[2*b[h]+1];y<a.D.height&&(w=!0);0<=y&&(r=!0)}if(e=e&&k&&l&&w&&r)d.Oe[d.Md++]=b[0],d.Oe[d.Md++]=b[3],d.Oe[d.Md++]=b[2],d.Oe[d.Md++]=b[0],d.Oe[d.Md++]=b[1],d.Oe[d.Md++]=b[3]}}};m.prototype.Ws=function(){var d=this.u,c=d.v,a=d.v.levels;d.he&&(d.Oc(0),d.Jc());if(d.S){var b=d.S,e=this.Dn;b.useProgram(e);this.ql(e);b.enable(b.CULL_FACE);b.cullFace(b.FRONT);b.enable(b.DEPTH_TEST);x.la.identity(this.Bb);x.la.perspective(d.mc(),d.Ab.width/d.Ab.height,.1,100,this.Bb);b.uniformMatrix4fv(b.getUniformLocation(e,
"uPMatrix"),!1,this.Bb);this.u.Hc=0;d.Mk();var g=d.jk(),f=0;var h=a.length-1;for(var l={},k=a[h];k.Xe&&0<h;)h--,k=a[h];for(var w=h,r=w,y=0;6>y;y++)for(var z=0;z<k.fa;z++)for(var ha=0;ha<k.U;ha++){var ua=ha+z*k.U+y*k.U*k.fa;l[ua]=1}for(;h>=g;){var id={};k=a[h];var sh=null;0<h&&(sh=a[h-1]);var db=!0;for(var gl in l)if(l.hasOwnProperty(gl)){ua=Number(gl);var tf=k.ba[ua];y=Number(Math.floor(ua/(k.U*k.fa)));z=Math.floor((ua-y*k.U*k.fa)/k.U);ha=Math.floor(ua-(z*k.U+y*k.U*k.fa));if(6<=y)console.log("Grrr...");
else{var hl=this.u.cube.faces[y];hl.Oa=!1;tf||(tf=k.ba[ua]=new x.ae,d.O("create "+ua));this.gs(tf,k,ha,z,Math.max(1,this.zl>>w-h),y,-(0!=d.Fc)?.3:.1);tf.visible=0<tf.Md||k.cache;tf.Ni=3;tf.oh=Date.now();tf.visible&&!tf.sb&&(db=!1,this.vi()?tf.v||(tf.pe?tf.pe--:(this.Si(tf,k,d.ue(y,h,ha,z)),d.Oa=!0)):this.u.Hc++);if(sh&&(tf.visible||sh.cache)){tf=(ha*c.P+1)/k.width;ha=Math.min(1,((ha+1)*c.P-1)/k.width);var il=(z*c.P+1)/k.height;z=Math.min(1,((z+1)*c.P-1)/k.height);ua=c.P/sh.width;hl=c.P/sh.height;
var ll=il;il=Math.floor(il*sh.height/c.P);do{var kl=tf,ol=Math.floor(tf*sh.width/c.P);do{var ql=ol+il*sh.U+y*sh.U*sh.fa;ol<sh.U&&il<sh.fa?id[ql]=1:d.O("Grrrr");ol++;kl+=ua}while(kl<ha);il++;ll+=hl}while(ll<z)}}}db&&(r=h,20>d.fov.m&&h<this.zf&&(this.nj=!0));l=id;h--}this.$k();b.uniform1i(b.getUniformLocation(e,"tileTexture"),0);b.activeTexture(b.TEXTURE0);h=g;for(g=-1;h<=Math.min(r,this.zf-1);){k=a[h];for(gl in k.ba)if(k.ba.hasOwnProperty(gl)){l=Number(gl);tf=k.ba[l];y=Math.floor(l/(k.U*k.fa));z=Math.floor((l-
y*k.U*k.fa)/k.U);ha=Math.floor(l-(z*k.U+y*k.U*k.fa));g!=y&&(g=y,this.Aj(y,e));if(f>d.Te){d.O("Excided painted tiles");this.nj=!1;break}tf.sb&&(l=y=c.P,ha==k.U-1&&(y=k.width-c.P*ha),z==k.fa-1&&(l=k.height-c.P*z),y=(y+2*c.Ea)/c.P,l=(l+2*c.Ea)/c.P,b.bindTexture(b.TEXTURE_2D,tf.sb),b.uniform2f(b.getUniformLocation(e,"uCanvasDimensions"),d.D.width,d.D.height),w=b.getUniformLocation(e,"srcScale"),b.uniform2f(w,.5*k.width/c.P/y,.5*k.height/c.P/l),w=b.getUniformLocation(e,"srcOffset"),b.uniform2f(w,(.5*k.width+
c.Ea-c.P*ha)/c.P/y,-(.5*k.height+c.Ea-c.P*z)/c.P/l+1),w=b.getUniformLocation(e,"zOffset"),b.uniform1f(w,(h+1)/(a.length+5)),y=b.getAttribLocation(e,"aVertexPosition"),b.disableVertexAttribArray(0),b.disableVertexAttribArray(1),b.disableVertexAttribArray(2),b.enableVertexAttribArray(y),b.activeTexture(b.TEXTURE0),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE),b.texParameteri(b.TEXTURE_2D,
b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE),b.bindBuffer(b.ARRAY_BUFFER,this.Eq),b.vertexAttribPointer(y,2,b.FLOAT,!1,0,0),b.bufferData(b.ARRAY_BUFFER,new Float32Array(tf.xd),b.DYNAMIC_DRAW),b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.Dq),b.bufferData(b.ELEMENT_ARRAY_BUFFER,new Uint16Array(tf.Oe),b.DYNAMIC_DRAW),b.drawElements(b.TRIANGLES,tf.Md,b.UNSIGNED_SHORT,0),f++)}h++}b.disable(b.CULL_FACE);b.cullFace(b.FRONT_AND_BACK);d.td=!1}};m.prototype.Aj=function(d,c){var a=this.u.S;x.la.identity(this.Aa);this.mg(d,
-1);a.uniformMatrix4fv(a.getUniformLocation(c,"matRotate"),!1,this.Aa)};m.prototype.qr=function(){var d=this.u;if(d.S){var c=d.S,a=this.En;c.useProgram(a);this.Aj(0,a);c.uniform2f(c.getUniformLocation(a,"uCanvasDimensions"),d.D.width,d.D.height);var b=c.getUniformLocation(a,"srcOffset");c.uniform2f(b,.5,.5);1==d.F.format&&(b=c.getUniformLocation(a,"srcScale"),d.Pd?(c.uniform2f(b,-.5/Math.PI,(d.F.flipY?-.5:.5)/Math.PI),b=c.getUniformLocation(a,"srcOffset"),d.Rh?c.uniform2f(b,.5,.75):c.uniform2f(b,
.5,.25)):c.uniform2f(b,-.5/Math.PI,(d.F.flipY?-1:1)/Math.PI));14==d.F.format&&(b=c.getUniformLocation(a,"srcScale"),c.uniform2f(b,1-2*d.F.tf/(d.F.width/3),1-2*d.F.tf/(d.F.height/2)));this.ql(a);b=c.getUniformLocation(a,"cubeTexture");c.uniform1i(b,0);b=c.getAttribLocation(a,"aVertexPosition");c.disableVertexAttribArray(0);c.disableVertexAttribArray(1);c.disableVertexAttribArray(2);c.enableVertexAttribArray(b);c.bindBuffer(c.ARRAY_BUFFER,this.dj);c.vertexAttribPointer(b,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);
c.bindTexture(c.TEXTURE_2D,d.F.texture);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.LINEAR);c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.sd);c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT,0)}};m.prototype.ql=function(d){var c=this.u,a=c.S,b=this.u.D,e=b.width/b.height;switch(c.fov.mode){case 1:e=1;break;case 2:e=
b.width/Math.sqrt(b.width*b.width+b.height*b.height);break;case 3:4*b.height/3<b.width&&(e=4/3)}b=a.getUniformLocation(d,"rectDstDistance");this.Yk=Math.tan(Math.min(c.fov.m,179)/2*Math.PI/180)*e;a.uniform1f(b,this.Yk);b=a.getUniformLocation(d,"fisheyeDistance");this.kk=180/(c.fov.m*Math.PI*e);a.uniform1f(b,this.kk);b=a.getUniformLocation(d,"stereoDistance");this.kl=Math.tan(Math.min(c.fov.m,359)/4*Math.PI/180)*e;a.uniform1f(b,this.kl);b=a.getUniformLocation(d,"directionBlend");a.uniform1f(b,c.Dh)};
m.prototype.pr=function(){var d=this.u,c=d.S,a=this.Cn;c.useProgram(a);c.enable(c.DEPTH_TEST);this.Aj(0,a);c.uniform2f(c.getUniformLocation(a,"uCanvasDimensions"),d.D.width,d.D.height);d=c.getUniformLocation(a,"srcScale");c.uniform2f(d,1,1);d=c.getUniformLocation(a,"srcOffset");c.uniform2f(d,0,0);d=c.getUniformLocation(a,"zOffset");c.uniform1f(d,.9999);this.ql(a);this.Aj(0,a);d=c.getUniformLocation(a,"cubeTexture");c.uniform1i(d,0);a=c.getAttribLocation(a,"aVertexPosition");c.disableVertexAttribArray(0);
c.disableVertexAttribArray(1);c.disableVertexAttribArray(2);c.enableVertexAttribArray(a);c.bindBuffer(c.ARRAY_BUFFER,this.dj);c.vertexAttribPointer(a,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_CUBE_MAP,this.Nc);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_MIN_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_MAG_FILTER,c.LINEAR);
c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.sd);c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT,0)};m.prototype.yp=function(){var d=this.u,c=d.S;c.getParameter(c.MAX_CUBE_MAP_TEXTURE_SIZE);for(var a=[1,3,5,4,0,2],b=!0,e=!0,g=!1,f=0;6>f;f++)this.kb[f].Se.complete?this.ri[f]||(g=!0):b=!1,this.kb[f].dg.complete||(e=!1);if(e||b)if(!e||b||!this.Nc||g){f=Math.round(d.Ic/d.hf);e=(d.Ic-f)/2;d.O("paint cube single - isMain: "+b+" overlap: "+e);this.zf=0;this.Nc||(this.Nc=c.createTexture());d.wd++;c.bindTexture(c.TEXTURE_CUBE_MAP,
this.Nc);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL,1);g=document.createElement("canvas");g.width=f;g.height=f;var h=g.getContext("2d");for(f=0;6>f;f++){var l=a[f];this.kb[l].Se.complete?this.ri[l]||(h.drawImage(this.kb[l].Se,-e,-e),c.texImage2D(c.TEXTURE_CUBE_MAP_POSITIVE_X+f,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,g),this.ri[l]=!0):(h.drawImage(this.kb[l].dg,-e,-e,d.Ic,d.Ic),
c.texImage2D(c.TEXTURE_CUBE_MAP_POSITIVE_X+f,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,g))}this.kh=!b}};m.prototype.xp=function(){var d=this.u,c=this.u.v,a=d.v.levels,b=d.S,e;var g=a.length-1;if(!(0>g)){a[g].Xe&&g--;var f=512;d.jh&&(f=256);!d.hg&&2<=d.devicePixelRatio&&(f=512);for((e=b.getParameter(b.MAX_CUBE_MAP_TEXTURE_SIZE))&&e<f&&(f=e);0<g&&a[g-1].width<=f;)g--;f=a[g];if(0!=f.U){e=g;var h=this.qp(g);this.kh&&h&&(this.kh=!1);h||(g=a.length-1,f=a[g],h||(f.Xe?(h=f.loaded,this.Lk(g-1)&&(--g,h=!0)):h=this.Lk(g)),
this.kh=!0);this.Lk(e);if(h&&this.zf>g){f=a[g];d.O("paint cube level "+g);this.zf=g;a=d.v.Ea;g=0<a||1<f.U||1<f.fa;h=e=void 0;g&&(h=document.createElement("canvas"),h.width=f.width,h.height=f.height,2048>f.width&&(1500<f.width?(h.width=2048,h.height=2048):700<f.width?(h.width=1024,h.height=1024):(h.width=512,h.height=512)),e=h.getContext("2d"));this.Nc=b.createTexture();d.wd++;b.bindTexture(b.TEXTURE_CUBE_MAP,this.Nc);b.texParameteri(b.TEXTURE_CUBE_MAP,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE);b.texParameteri(b.TEXTURE_CUBE_MAP,
b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE);b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL,1);var l=[1,3,5,4,0,2];c=c.P;for(var k=0;6>k;k++){for(var w=0;w<f.fa;w++)for(var r=0;r<f.U;r++){var y=r+w*f.U+l[k]*f.U*f.fa,z=f.ba[y],ha=z.v;z.W&&(ha=z.W);ha?g?(y=h.width/f.width,e.drawImage(ha,y*(r*c-a),y*(w*c-a),y*ha.width,y*ha.height)):b.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+k,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,ha):(d.O("WTF?!"),d.O(y),d.O(z))}g&&b.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+k,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,h)}}}}};
m.prototype.Lk=function(d){var c=this.u,a=c.v.levels[d];if(0==a.U)return!1;var b=!0;a.cache=!0;for(var e=0;6>e;e++)for(var g=0;g<a.fa;g++)for(var f=0;f<a.U;f++){var h=f+g*a.U+e*a.U*a.fa,l=a.ba[h];l||(l=a.ba[h]=new x.ae);this.vi()?l.v||(l.pe?l.pe--:(this.Si(l,a,c.ue(e,d,f,g)),c.Oa=!0)):this.u.Hc++;l.sb||(b=!1,c.Oa=!0)}b&&(a.loaded=!0);return b};m.prototype.qp=function(d){d=this.u.v.levels[d];if(0==d.U)return!1;for(var c=0;6>c;c++)for(var a=0;a<d.fa;a++)for(var b=0;b<d.U;b++){var e=d.ba[b+a*d.U+c*d.U*
d.fa];if(!e||!e.sb)return!1}return d.loaded=!0};m.prototype.ready=function(){return null!=this.Nc};m.prototype.$k=function(){for(var d=this.u,c=d.v.levels,a=d.S,b=Date.now(),e=c.length-1;0<=e;e--){var g=c[e];if(!g.cache)for(var f in g.ba)if(g.ba.hasOwnProperty(f)){var h=g.ba[f];0<h.Ni&&h.Ni--;h.visible||0<h.Ni?(h.visible&&(h.oh=b),h=this.fe.indexOf(h),-1!==h&&this.fe.splice(h,1)):-1===this.fe.indexOf(h)&&(h.level=g,this.fe.push(h))}}if(this.fe.length>1.1*d.mo)for(this.fe.sort(function(l,k){return k.oh-
l.oh});this.fe.length>d.mo;)h=this.fe.pop(),h.sb&&(a.deleteTexture(h.sb),d.wd--,h.sb=0),h.v=null,h.Kf&&(a.deleteBuffer(h.Kf),h.Kf=0),f=h.level.ba.indexOf(h),d.O("delete "+f+" "+(b-h.oh)),delete h.level.ba[f]};m.prototype.Os=function(){var d=this.u;if(d.S){var c=this.u.S;c.disable(c.DEPTH_TEST);var a;for(a=0;a<d.T.length;a++){var b=d.T[a];if(!b.kd){x.la.identity(this.Aa);x.la.rotate(this.Aa,-d.V.m*Math.PI/180,[0,0,1]);x.la.rotate(this.Aa,-d.A.m*Math.PI/180,[1,0,0]);x.la.rotate(this.Aa,(180-d.pan.m)*
Math.PI/180,[0,1,0]);x.la.rotate(this.Aa,b.pan*Math.PI/180,[0,1,0]);x.la.rotate(this.Aa,-b.A*Math.PI/180,[1,0,0]);x.la.translate(this.Aa,[0,0,1]);x.la.rotate(this.Aa,b.ob*Math.PI/180,[0,0,1]);x.la.rotate(this.Aa,-b.Ma*Math.PI/180,[0,1,0]);x.la.rotate(this.Aa,b.Ga*Math.PI/180,[1,0,0]);var e=Math.tan(b.fov/2*Math.PI/180),g=b.aspect;g||(g=16/9);x.la.scale(this.Aa,[e,e/g,1]);x.la.translate(this.Aa,[0,0,-1]);c.bindBuffer(c.ARRAY_BUFFER,this.ak);c.vertexAttribPointer(this.R.ka,3,c.FLOAT,!1,0,0);c.bindBuffer(c.ARRAY_BUFFER,
this.Ee);c.vertexAttribPointer(this.R.Na,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_2D,b.texture);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.sd);c.uniform1i(this.R.ig,0);c.uniformMatrix4fv(this.R.Bh,!1,this.Aa);c.uniformMatrix4fv(this.R.ne,
!1,this.Bb);c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT,0)}}c.enable(c.DEPTH_TEST)}};m.prototype.Ns=function(){var d=this.u,c;if(d.D.width!=d.N.offsetWidth||d.D.height!=d.N.offsetHeight)d.D.width=d.N.offsetWidth,d.D.height=d.N.offsetHeight;d.he&&(d.Oc(0),d.Jc());if(d.S){var a=d.S;a.useProgram(this.R);x.la.identity(this.Bb);x.la.perspective(d.mc(),d.Ab.width/d.Ab.height,.1,100,this.Bb);a.uniformMatrix4fv(this.R.ne,!1,this.Bb);this.mg(0);a.uniform1i(this.R.ig,0);a.uniformMatrix4fv(this.R.ne,!1,this.Bb);
a.uniformMatrix4fv(this.R.Bh,!1,this.Aa);a.enableVertexAttribArray(this.R.ka);a.enableVertexAttribArray(this.R.Na);a.bindBuffer(a.ARRAY_BUFFER,this.Ee);a.vertexAttribPointer(this.R.Na,2,a.FLOAT,!1,0,0);a.activeTexture(a.TEXTURE0);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.sd);a.uniform1f(this.R.Jj,1E-4);a.vertexAttribPointer(this.R.ka,3,a.FLOAT,!1,0,0);a.bindTexture(a.TEXTURE_2D,d.F.texture);for(c=0;1>c;c++)this.mg(0),a.bindBuffer(a.ARRAY_BUFFER,d.F.ul),a.vertexAttribPointer(this.R.ka,3,a.FLOAT,!1,
0,0),a.bindBuffer(a.ARRAY_BUFFER,d.F.rj),a.vertexAttribPointer(this.R.Na,2,a.FLOAT,!1,0,0),a.activeTexture(a.TEXTURE0),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,d.F.Ak),a.uniform1i(this.R.ig,0),a.uniformMatrix4fv(this.R.Bh,!1,this.Aa),a.uniformMatrix4fv(this.R.ne,!1,this.Bb),a.drawElements(a.TRIANGLES,36,a.UNSIGNED_SHORT,0)}};m.prototype.Ms=function(){var d=this.u,c=d.S,a=d.F;if(0<d.T.length)for(var b=0;b<d.T.length;b++){var e=d.T[b];if(!e.kd&&e.isRunning&&e.Ei!=e.j.currentTime&&(e.Ei=e.j.currentTime,!e.aspect&&
0<e.j.videoHeight&&(e.aspect=e.j.videoWidth/e.j.videoHeight),d.$h))try{e.texture&&(c.bindTexture(c.TEXTURE_2D,e.texture),c.texImage2D(c.TEXTURE_2D,0,c.RGB,c.RGB,c.UNSIGNED_BYTE,e.j),d.update())}catch(f){d.O(f)}}if(a.j&&(b=Number(a.j.currentTime),a.Ei!=b)){a.Ei=b;try{var g=0<a.j.readyState;d.Sf&&a.Ad&&(g=g&&0<a.j.currentTime);a.texture&&a.Mi&&g&&(a.Ad=!0,a.width=a.j.videoWidth,a.height=a.j.videoHeight,c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL,d.F.flipY),c.bindTexture(c.TEXTURE_2D,a.texture),c.texImage2D(c.TEXTURE_2D,
0,c.RGB,c.RGB,c.UNSIGNED_BYTE,a.j),a.lo=!0,d.update())}catch(f){d.O(f)}}};m.prototype.tn=function(){var d,c,a=this.u,b=this.u.S;a.Ka.style.visibility="hidden";a.I.mh!=a.I.mode&&(a.I.mh=a.I.mode);if((0<=a.I.mode||0<a.I.vb.length)&&!a.K.Uh){var e=1;0>=a.I.mode&&(e=0);3==a.I.mode&&(e=a.I.wa);for(d=0;d<a.X.length;d++){var g=a.X[d];if("poly"==g.type){var f=g.oe,h=e;2==a.I.mode&&(h=g.wa);var l=a.I.vb.indexOf(g.id);-1!=l&&(h=a.I.bc[l]);if(0<f.length){l=[];for(c=0;c<f.length;c++)l.push(f[c].$b),l.push(f[c].Db),
l.push(0);b.useProgram(this.Sd);b.enable(b.BLEND);b.blendFuncSeparate(b.SRC_ALPHA,b.ONE_MINUS_SRC_ALPHA,b.SRC_ALPHA,b.ONE);b.disable(b.DEPTH_TEST);f=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,f);b.bufferData(b.ARRAY_BUFFER,new Float32Array(l),b.STATIC_DRAW);b.uniform2f(b.getUniformLocation(this.Sd,"uCanvasDimensions"),a.D.width,a.D.height);f=b.getUniformLocation(this.Sd,"uColor");c=g.ic;b.uniform3f(f,(c>>16&255)/255,(c>>8&255)/255,(c&255)/255);var k=b.getUniformLocation(this.Sd,"uAlpha");b.uniform1f(k,
g.hc*h);b.vertexAttribPointer(this.Sd.ka,3,b.FLOAT,!1,0,0);b.drawArrays(b.LINE_LOOP,0,l.length/3);c=g.fc;b.uniform3f(f,(c>>16&255)/255,(c>>8&255)/255,(c&255)/255);b.uniform1f(k,g.ec*h);b.enable(b.STENCIL_TEST);b.clearStencil(0);b.clear(b.STENCIL_BUFFER_BIT);b.colorMask(!1,!1,!1,!1);b.stencilFunc(b.ALWAYS,1,1);b.stencilOp(b.INCR,b.INCR,b.INCR);b.drawArrays(b.TRIANGLE_FAN,0,l.length/3);b.colorMask(!0,!0,!0,!0);b.stencilFunc(b.EQUAL,1,1);b.stencilOp(b.ZERO,b.ZERO,b.ZERO);b.drawArrays(b.TRIANGLE_FAN,
0,l.length/3);b.disable(b.BLEND);b.enable(b.DEPTH_TEST);b.disable(b.STENCIL_TEST);b.useProgram(this.R)}}}}};m.prototype.pl=function(){var d=this.u,c=d.v;if(d.D.width!=d.N.offsetWidth||d.D.height!=d.N.offsetHeight)d.D.width=d.N.offsetWidth,d.D.height=d.N.offsetHeight;d.he&&(d.Oc(0),d.Jc());if(d.S){var a=d.S;this.zj();a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT);a.disable(a.DEPTH_TEST);a.disable(a.CULL_FACE);a.useProgram(this.Qg);var b=a.getUniformLocation(this.Qg,"uRect");a.uniform2f(a.getUniformLocation(this.Qg,
"uCanvasDimensions"),d.D.width,d.D.height);a.activeTexture(a.TEXTURE0);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.sd);var e=a.getAttribLocation(this.Qg,"aVertexPosition");a.disableVertexAttribArray(0);a.disableVertexAttribArray(1);a.disableVertexAttribArray(2);a.enableVertexAttribArray(e);a.bindBuffer(a.ARRAY_BUFFER,this.Ee);a.vertexAttribPointer(e,2,a.FLOAT,!1,0,0);d.Hc=0;var g=100/d.fov.m;var f=c.width/c.height;e=d.D.height*g*f;g*=d.D.height;f=(d.pan.m/100/f-.5)*e+d.D.width/2;for(var h=(d.A.m/100-
.5)*g+d.D.height/2,l,k,w,r=0,y=e*Math.pow(2,1<d.devicePixelRatio?c.Jk:c.Ik);c.levels.length>=r+2&&c.levels[r+1].width>y;)r++;var z=[];for(y=c.levels.length-1;y>=r;){var ha=c.levels[y];if(ha.cache){var ua={mb:0,Kb:0};ua.Mb=ha.U-1;ua.Nb=ha.fa-1}else{ua={};l=-h/g*(ha.height/d.v.P);k=(-f+d.D.width)/e*(ha.width/d.v.P);var id=(-h+d.D.height)/g*(ha.height/d.v.P);ua.mb=Math.min(Math.max(0,Math.floor(-f/e*(ha.width/d.v.P))),ha.U-1);ua.Kb=Math.min(Math.max(0,Math.floor(l)),ha.fa-1);ua.Mb=Math.min(Math.max(0,
Math.floor(k)),ha.U-1);ua.Nb=Math.min(Math.max(0,Math.floor(id)),ha.fa-1)}z[y]=ua;var sh=!0;for(k=ua.Kb;k<=ua.Nb;k++)for(l=ua.mb;l<=ua.Mb;l++)w=l+k*ha.U,id=ha.ba[w],id||(id=new x.ae,ha.ba[w]=id),this.vi()?id.v||(this.Si(id,ha,d.ue(0,y,l,k)),d.Oa=!0):this.u.Hc++,id.v&&id.v.complete||(sh=!1),id.visible=!0;ua.Hk=sh;y--}for(y=c.levels.length-1;y>=r;){ha=c.levels[y];if(z[y]&&0<=z[y].mb)for(ua=z[y],k=ua.Kb;k<=ua.Nb;k++)for(l=ua.mb;l<=ua.Mb;l++)w=l+k*ha.U,(id=ha.ba[w])&&id.v&&id.v.complete&&(d=f+(-c.Ea+
c.P*l)*e/ha.width,a.uniform4f(b,d,h+(-c.Ea+c.P*k)*g/ha.height,id.v.width*e/ha.width,id.v.height*g/ha.height),id&&id.sb&&(a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.sd),a.bindTexture(a.TEXTURE_2D,id.sb),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.drawElements(a.TRIANGLES,6,a.UNSIGNED_SHORT,0)));y--}this.$k()}};
m.prototype.Ze=function(){var d=this.u.S;if(d&&this.kb)for(;0<this.kb.length;){var c=this.kb.pop();c.br=!0;d.deleteTexture(c)}this.Nc&&(d.deleteTexture(this.Nc),this.Nc=null);this.zf=1E6;this.ri=[!1,!1,!1,!1,!1,!1]};return m}();x.To=p})(ggP2VR||(ggP2VR={}));
(function(x){var p=function(){return function(){this.cg={Sg:1,Tg:1,vh:0,wh:0,ug:0,ci:0,scale:1};this.rb=!0;this.vf=[]}}(),m=function(){function d(){var c;this.faces=Array(6);for(c=0;6>c;c++)this.faces[c]=new p}d.prototype.rp=function(c,a,b,e){for(var g=0;6>g;g++){var f;if(f=this.faces[g]){var h=[];h.push(new x.Ha(-1,-1,-1,0,0));h.push(new x.Ha(1,-1,-1,1,0));h.push(new x.Ha(1,1,-1,1,1));h.push(new x.Ha(-1,1,-1,0,1));for(var l=0;l<h.length;l++)4>g?h[l].Ma(-Math.PI/2*g):h[l].Ga(Math.PI/2*(4===g?-1:1)),
e&&(h[l].ob(e.V*Math.PI/180),h[l].Ga(-e.pitch*Math.PI/180)),h[l].Ma(-c*Math.PI/180),h[l].Ga(a*Math.PI/180),h[l].ob(b*Math.PI/180);f.rb=0<h.length}}};return d}();x.Qo=m})(ggP2VR||(ggP2VR={}));
(function(x){x.Po=function(){return function(){this.levels=[];this.eg="0x000000";this.xn=!1;this.Jk=this.Ik=.4;this.P=512;this.Ea=1;this.Gk=0;this.Kk="";this.Gn=this.height=this.width=0}}();x.Al=function(){return function(){this.height=this.width=0;this.Xe=this.cache=!1;this.fa=this.U=0;this.loaded=!1;this.ba=[]}}();x.ae=function(){return function(){this.loaded=this.visible=!1;this.pe=this.Zk=0;this.xd=[];this.Fi=0;this.Oe=[];this.Ni=this.oh=this.Md=0}}()})(ggP2VR||(ggP2VR={}));
(function(x){x.Lo=function(){return function(p,m){this.u=p;this.za=m;var d=this.__div=document.createElement("div");d.ggVisible=!0;var c=document.createElement("img");if(m.cd){var a=m.cd;c.setAttribute("style","position: absolute;width: "+m.Fe+"px; height: "+m.Jd+"px;top: -"+m.Jd/2+"px;left: -"+m.Fe/2+"px; "+p.Qa+"user-select: none; max-width: none;")}else a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA5xJREFUeNqclmlIVFEUx997TjrplFQW2WKBBSYtRFlpWUILSSsRZRQIBdGHCFqIoKIvQRsUFRJC9LEgaSFbMMpcWi1pLzOLsjItKms0U5t5/c/wH7nc5o2jF374xrv87z33nHOPaRsRtbFgDpgJxoD+wATfwDNQDK6CyrCr5OcbhgiGIRsUAZt4QTWoIFXgp9JfAhY7rgdBl8NeBoLDYBloA+dBOagFTcDHcVEgDgwBGWA+OAcugvXgvb5wKMGJoAAMp9BpUA96EBf/Btsf8BI8AWfAErAcpHHDZeriliY2AVwDg8AucAQ0Ag+I4XhTm2Oxz8PT46KMbTx5EZjuJDgAnAVusJUm9DhYwalFcc59sIXXIaceFkowDySBPTRPL20xm+b7zYXa+N3CPrWJ6GuwGySA40HLBHc/GywFhbS5R1lEBrZy7FQwiSaX9pmnqeAYt+KUcew7BVZw/QKTq0ocpYPVvDOXItZCk2xgDIZqL8BR8Ab0VDbr4yZOgLeIwzQx6WiQxcCt1+6sld66L4yYtFSwF4yg2dU7/cEwGW9YVkAwmycp1dzdpvgm0DcCh4kHmxWzBls0uBX4qqmZJ4KzePm1IeJLgjmlC16aDKZpp5Q168B3o6wsSwTHgU+MIUs74RSj6y1d+212HKimJlUE+tFRfJpYtOKNXWmJTASqWf2Bu/R6+4TKHOrOzG4IhptjWgHbGkZvepQ6SQK7oRuCXzjX1DJavBEX1ygfT8FgBqpfm1zRDcEKbR2bsZlkJCdXieB1ZhZ5YtqVgXIPN+m9kbY6hpdb+d9fPncJRmZmqQheZkemJmgxyxykl3XWJEkcAl7N21s7PDcl5ZJ0PAa3wVwmWtVbZafPwQ7wLozYB7ATPNJO56d/LAikP9u+66KNJS1d4IOZp7wU0hfLukUyzgwm70T2N/DOxIy/eFdqawa5DL2NEGwP5k15Ja4woz9glvcomd9NzyvkFcQo5gomaLfm5c0svnKZ2k7q7+FauvR2MJKZR3+sY5WgtvkdG6JyELGhNHMTXyGfLviRJ5Tcd4Dlhle7086Sgp8CqVxDkn4OqHaqacr5ekjy3Q/W0FRNNGmoMtamdzdxsytZC0lqXKhEgWPVVgImg2NgFT1MHOoOk3yLEtgWN5TEOYvoIFI1rGM19//2wpAD7imF7lfwENwAxaASNCj90pcLLKdC2Iyw1M9gnEplMEp5kOU1f8WwKGJm8oUr9f8JMAAVMDM6HSDa9QAAAABJRU5ErkJggg%3D%3D",
c.setAttribute("style","position: absolute;width: 28px; height: 28px;top: -14px;left: -14px; "+p.Qa+"user-select: none; max-width: none;");c.setAttribute("src",a);c.ondragstart=function(){return!1};d.appendChild(c);a="position:absolute;"+(p.Qa+"user-select: none;");a+=p.Qa+"touch-callout: none;";a+=p.Qa+"tap-highlight-color: rgba(0,0,0,0);";p.nc&&!p.ja&&(a+=p.Qa+"transform: translateZ(9999999px);");d.setAttribute("style",a);d.onclick=function(){p.jg(m);p.Rk(m.url,m.target);p.ma&&p.ma.hotspotProxyClick&&
p.ma.hotspotProxyClick(m.id,m.url)};d.ondblclick=function(){p.ma&&p.ma.hotspotProxyDoubleClick&&p.ma.hotspotProxyDoubleClick(m.id,m.url)};var b=p.I.tj;if(b.enabled&&""!=m.title){var e=document.createElement("div");a="position:absolute;";a=m.cd?a+("top:\t "+m.Jd/2+"px;"):a+"top:\t 20px;";a=b.Fj?a+"white-space: pre-wrap;":a+"white-space: nowrap;";a+=p.Qa+"transform-origin: 50% 50%;";e.setAttribute("style",a+"visibility: hidden;overflow: hidden;padding: 0px 1px 0px 1px;");e.style.color=this.u.ga(b.uj,
b.sj);e.style.backgroundColor=b.background?this.u.ga(b.fc,b.ec):"transparent";e.style.border="solid "+this.u.ga(b.ic,b.hc)+" "+b.li+"px";e.style.borderRadius=b.Oj+"px";e.style.textAlign="center";0<b.width?(e.style.left=-b.width/2+"px",e.style.width=b.width+"px"):e.style.width="auto";e.style.height=0<b.height?b.height+"px":"auto";e.style.overflow="hidden";e.innerHTML=m.title;e.classList.add("ggskin");e.classList.add("ggdefaulthotspot");d.onmouseover=function(){0==b.width&&(e.style.left=-e.offsetWidth/
2+"px");e.style.visibility="inherit";p.ma&&p.ma.hotspotProxyOver&&p.ma.hotspotProxyOver(m.id,m.url)};d.onmouseout=function(){e.style.visibility="hidden";p.ma&&p.ma.hotspotProxyOut&&p.ma.hotspotProxyOut(m.id,m.url)};d.appendChild(e)}}}()})(ggP2VR||(ggP2VR={}));
(function(x){x.ad=function(){return function(){this.value=this.time=0;this.tl="";this.De=this.Ce=this.Be=this.Ae=this.ub=this.type=this.Gb=0;this.ii=""}}();x.xl=function(){return function(){this.Fs=this.bp=this.length=0}}();x.wl=function(){return function(){}}()})(ggP2VR||(ggP2VR={}));
(function(x){var p=function(){function m(d){this.u=d;this.enabled=!1;this.Bg=1;this.uf=0;this.type="crossdissolve";this.xc=this.ta=this.Wc=0;this.Ij=20;this.Gj=90;this.Hj=20;this.ye=1;this.wg=!1;this.gf=this.ff=this.jl=0;this.Zd=70;this.Jo=0;this.Ib=this.Io=1;this.fi=this.ei=.5;this.ze=!1;this.dk=1}m.prototype.gh=function(){var d=this.u.S,c=d.createShader(d.VERTEX_SHADER);d.shaderSource(c,"attribute vec3 aVertexPosition;\nattribute vec2 aTextureCoord;\nvarying vec2 vTextureCoord;\nuniform bool uZoomIn;\nuniform float uZoomFactor;\nuniform vec2 uZoomCenter;\nvoid main(void) {\n\t gl_Position = vec4(aVertexPosition, 1.0);\n\t if(!uZoomIn) {\n\t \n\t vTextureCoord = aTextureCoord;\n\t }\n\t else {\n\t vTextureCoord = (aTextureCoord - vec2(0.5, 0.5)) * (1.0/uZoomFactor) + uZoomCenter;\n\t }\n}\n");
d.compileShader(c);d.getShaderParameter(c,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(c)),c=null);var a=d.createShader(d.FRAGMENT_SHADER);d.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\nuniform float uAlpha;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, uAlpha);\n}\n");
d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.Ca=d.createProgram();d.attachShader(this.Ca,c);d.attachShader(this.Ca,a);d.linkProgram(this.Ca);d.getProgramParameter(this.Ca,d.LINK_STATUS)||alert("Could not initialise shaders");this.Ca.ka=d.getAttribLocation(this.Ca,"aVertexPosition");d.enableVertexAttribArray(this.Ca.ka);this.Ca.Na=d.getAttribLocation(this.Ca,"aTextureCoord");d.enableVertexAttribArray(this.Ca.Na);a=d.createShader(d.FRAGMENT_SHADER);
d.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\nuniform float uColorPercent;\nuniform float uAlpha;\nuniform vec3 uDipColor;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n gl_FragColor = vec4(textureColor.x * (1.0 - uColorPercent) + uDipColor.x * uColorPercent, textureColor.y * (1.0 - uColorPercent) + uDipColor.y * uColorPercent, textureColor.z * (1.0 - uColorPercent) + uDipColor.z * uColorPercent, uAlpha);\n}\n");
d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.hb=d.createProgram();d.attachShader(this.hb,c);d.attachShader(this.hb,a);d.linkProgram(this.hb);d.getProgramParameter(this.hb,d.LINK_STATUS)||alert("Could not initialise shaders");this.hb.ka=d.getAttribLocation(this.hb,"aVertexPosition");d.enableVertexAttribArray(this.hb.ka);this.hb.Na=d.getAttribLocation(this.hb,"aTextureCoord");d.enableVertexAttribArray(this.hb.Na);a=d.createShader(d.FRAGMENT_SHADER);
d.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\nuniform bool uRound;\nuniform float uRadius;\nuniform vec2 uRectDim;\nuniform vec2 uIrisCenter;\nuniform float uSoftEdge;\nuniform sampler2D uSampler;\nvoid main(void) {\n float alpha = 0.0;\n vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n if (uRound) {\n\t vec2 diff = uIrisCenter - gl_FragCoord.xy;\n\t float distFromCenter = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n\t if (distFromCenter > uRadius) {\n alpha = 1.0;\n } else {\n alpha = 1.0 - ((uRadius - distFromCenter) / uSoftEdge);\n };\n }\n else {\n float alphaFromLeft = 1.0 - ((gl_FragCoord.x -(uIrisCenter.x - uRectDim.x)) / uSoftEdge);\n float alphaFromRight = 1.0 - (((uIrisCenter.x + uRectDim.x) - gl_FragCoord.x) / uSoftEdge);\n float alphaFromTop = 1.0 - ((gl_FragCoord.y -(uIrisCenter.y - uRectDim.y)) / uSoftEdge);\n float alphaFromBottom = 1.0 - (((uIrisCenter.y + uRectDim.y) - gl_FragCoord.y) / uSoftEdge);\n alpha = max(max(alphaFromLeft, alphaFromRight), max(alphaFromTop, alphaFromBottom));\n }\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, alpha);\n}\n");
d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.Va=d.createProgram();d.attachShader(this.Va,c);d.attachShader(this.Va,a);d.linkProgram(this.Va);d.getProgramParameter(this.Va,d.LINK_STATUS)||alert("Could not initialise shaders");this.Va.ka=d.getAttribLocation(this.Va,"aVertexPosition");d.enableVertexAttribArray(this.Va.ka);this.Va.Na=d.getAttribLocation(this.Va,"aTextureCoord");d.enableVertexAttribArray(this.Va.Na);a=d.createShader(d.FRAGMENT_SHADER);
d.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\nuniform float uPercent;\nuniform int uDirection;\nuniform vec2 uCanvasDimensions;\nuniform float uSoftEdge;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n float alpha = 0.0;\n if (uDirection == 1) {\n\t if (gl_FragCoord.x > uPercent) {\n alpha = 1.0; \n } else {\n alpha = 1.0 - ((uPercent - gl_FragCoord.x) / uSoftEdge);\n }\n }\n if (uDirection == 2) {\n\t if (gl_FragCoord.x < uCanvasDimensions.x - uPercent) {\n alpha = 1.0; \n } else {\n alpha = 1.0 - ((gl_FragCoord.x - (uCanvasDimensions.x - uPercent)) / uSoftEdge);\n }\n }\n if (uDirection == 3) {\n\t if (gl_FragCoord.y < uCanvasDimensions.y - uPercent) {\n alpha = 1.0; \n } else {\n alpha = 1.0 - ((gl_FragCoord.y - (uCanvasDimensions.y - uPercent)) / uSoftEdge);\n }\n }\n if (uDirection == 4) {\n\t if (gl_FragCoord.y > uPercent) {\n alpha = 1.0; \n } else {\n alpha = 1.0 - ((uPercent - gl_FragCoord.y) / uSoftEdge);\n }\n }\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, alpha);\n}\n");
d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.$a=d.createProgram();d.attachShader(this.$a,c);d.attachShader(this.$a,a);d.linkProgram(this.$a);d.getProgramParameter(this.$a,d.LINK_STATUS)||alert("Could not initialise shaders");this.$a.ka=d.getAttribLocation(this.$a,"aVertexPosition");d.enableVertexAttribArray(this.$a.ka);this.$a.Na=d.getAttribLocation(this.$a,"aTextureCoord");d.enableVertexAttribArray(this.$a.Na)};m.prototype.Oc=function(){var d=
this.u.S;if(!d)return!1;if(this.wc=d.createFramebuffer()){d.bindFramebuffer(d.FRAMEBUFFER,this.wc);this.wc.width=1024;this.wc.height=1024;this.jf=d.createTexture();d.bindTexture(d.TEXTURE_2D,this.jf);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.LINEAR);d.texImage2D(d.TEXTURE_2D,0,d.RGBA,this.wc.width,this.wc.height,0,d.RGBA,d.UNSIGNED_BYTE,null);var c=d.createRenderbuffer();d.bindRenderbuffer(d.RENDERBUFFER,c);d.renderbufferStorage(d.RENDERBUFFER,
d.DEPTH_COMPONENT16,this.wc.width,this.wc.height);d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_2D,this.jf,0);d.framebufferRenderbuffer(d.FRAMEBUFFER,d.DEPTH_ATTACHMENT,d.RENDERBUFFER,c);d.bindTexture(d.TEXTURE_2D,null);d.bindRenderbuffer(d.RENDERBUFFER,null);d.bindFramebuffer(d.FRAMEBUFFER,null);this.tb=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,this.tb);d.bufferData(d.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,-1,0,-1,1,0,1,1,0]),d.STATIC_DRAW);this.tb.itemSize=3;this.tb.me=
4;this.fg=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,this.fg);d.bufferData(d.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),d.STATIC_DRAW);return!0}return!1};m.prototype.un=function(d){var c=this.u.S,a=this.u.Ab;if(this.Ed){c.useProgram(this.Ca);c.bindBuffer(c.ARRAY_BUFFER,this.tb);c.vertexAttribPointer(this.Ca.ka,this.tb.itemSize,c.FLOAT,!1,0,0);c.bindBuffer(c.ARRAY_BUFFER,this.fg);c.vertexAttribPointer(this.Ca.Na,2,c.FLOAT,!1,0,0);c.enableVertexAttribArray(this.Ca.ka);c.enableVertexAttribArray(this.Ca.Na);
c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_2D,this.jf);a=1+(this.Ib-1)*d;var b=c.getUniformLocation(this.Ca,"uAlpha");c.uniform1f(b,1);b=c.getUniformLocation(this.Ca,"uZoomIn");c.uniform1i(b,1);b=c.getUniformLocation(this.Ca,"uZoomCenter");var e=.5+(this.ei-.5)*Math.sqrt(d),g=.5+(this.fi-.5)*Math.sqrt(d);0>e-.5/a&&(e=.5/a);0>g-.5/a&&(g=.5/a);1<e+.5/a&&(e=1-.5/a);1<g+.5/a&&(g=1-.5/a);c.uniform2f(b,e,g);e=c.getUniformLocation(this.Ca,"uZoomFactor");c.uniform1f(e,a);c.uniform1i(c.getUniformLocation(this.Ca,
"uSampler"),0);c.drawArrays(c.TRIANGLE_STRIP,0,this.tb.me);c.useProgram(this.u.Ba.R)}else{this.u.Xh();c.blendFuncSeparate(c.SRC_ALPHA,c.ONE_MINUS_SRC_ALPHA,c.SRC_ALPHA,c.ONE);c.enable(c.BLEND);c.disable(c.DEPTH_TEST);e=.5+(this.ei-.5);g=.5+(this.fi-.5);0>e-.5/this.Ib&&(e=.5/this.Ib);0>g-.5/this.Ib&&(g=.5/this.Ib);1<e+.5/this.Ib&&(e=1-.5/this.Ib);1<g+.5/this.Ib&&(g=1-.5/this.Ib);if("crossdissolve"==this.type)c.useProgram(this.Ca),c.bindBuffer(c.ARRAY_BUFFER,this.tb),c.vertexAttribPointer(this.Ca.ka,
this.tb.itemSize,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.fg),c.vertexAttribPointer(this.Ca.Na,2,c.FLOAT,!1,0,0),c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,this.jf),b=c.getUniformLocation(this.Ca,"uAlpha"),c.uniform1f(b,1-d),b=c.getUniformLocation(this.Ca,"uZoomIn"),c.uniform1i(b,1==this.ta||2==this.ta||6==this.ta?1:0),b=c.getUniformLocation(this.Ca,"uZoomCenter"),c.uniform2f(b,e,g),e=c.getUniformLocation(this.Ca,"uZoomFactor"),c.uniform1f(e,this.Ib),c.uniform1i(c.getUniformLocation(this.Ca,
"uSampler"),0);else if("diptocolor"==this.type)c.useProgram(this.hb),c.bindBuffer(c.ARRAY_BUFFER,this.tb),c.vertexAttribPointer(this.hb.ka,this.tb.itemSize,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.fg),c.vertexAttribPointer(this.hb.Na,2,c.FLOAT,!1,0,0),c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,this.jf),c.uniform1f(c.getUniformLocation(this.hb,"uColorPercent"),Math.min(2*d,1)),b=c.getUniformLocation(this.hb,"uAlpha"),c.uniform1f(b,1-Math.max(2*(d-.5),0)),c.uniform3f(c.getUniformLocation(this.hb,
"uDipColor"),(this.uf>>16&255)/255,(this.uf>>8&255)/255,(this.uf&255)/255),b=c.getUniformLocation(this.hb,"uZoomIn"),c.uniform1i(b,1==this.ta||2==this.ta||6==this.ta?1:0),b=c.getUniformLocation(this.hb,"uZoomCenter"),c.uniform2f(b,e,g),e=c.getUniformLocation(this.hb,"uZoomFactor"),c.uniform1f(e,this.Ib),c.uniform1i(c.getUniformLocation(this.hb,"uSampler"),0);else if("irisround"==this.type||"irisroundcenter"==this.type||"irisrectangular"==this.type||"irisrectangularcenter"==this.type){c.useProgram(this.Va);
c.bindBuffer(c.ARRAY_BUFFER,this.tb);c.vertexAttribPointer(this.Va.ka,this.tb.itemSize,c.FLOAT,!1,0,0);c.bindBuffer(c.ARRAY_BUFFER,this.fg);c.vertexAttribPointer(this.Va.Na,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_2D,this.jf);if(1==this.ta||2==this.ta||6==this.ta||"irisroundcenter"==this.type||"irisrectangularcenter"==this.type)var f=b=.5;else b=this.ei,f=this.fi;var h=b*a.width,l=f*a.height;h=Math.max(h,a.width-h);l=Math.max(l,a.height-l);"irisround"==this.type||"irisroundcenter"==
this.type?c.uniform1f(c.getUniformLocation(this.Va,"uRadius"),(Math.sqrt(h*h+l*l)+this.Wc)*d):(h>l?(l=a.height/a.width*h+this.Wc,h+=this.Wc):(h=a.width/a.height*l+this.Wc,l+=this.Wc),c.uniform2f(c.getUniformLocation(this.Va,"uRectDim"),h*d,l*d));d=c.getUniformLocation(this.Va,"uSoftEdge");c.uniform1f(d,this.Wc);c.uniform1i(c.getUniformLocation(this.Va,"uRound"),"irisround"==this.type||"irisroundcenter"==this.type?1:0);c.uniform2f(c.getUniformLocation(this.Va,"uIrisCenter"),b*a.width,f*a.height);b=
c.getUniformLocation(this.Va,"uZoomIn");c.uniform1i(b,1==this.ta||2==this.ta||6==this.ta?1:0);b=c.getUniformLocation(this.Va,"uZoomCenter");c.uniform2f(b,e,g);e=c.getUniformLocation(this.Va,"uZoomFactor");c.uniform1f(e,this.Ib);c.uniform1i(c.getUniformLocation(this.Va,"uSampler"),0)}else if("wipeleftright"==this.type||"wiperightleft"==this.type||"wipetopbottom"==this.type||"wipebottomtop"==this.type||"wiperandom"==this.type)c.useProgram(this.$a),c.bindBuffer(c.ARRAY_BUFFER,this.tb),c.vertexAttribPointer(this.$a.ka,
this.tb.itemSize,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.fg),c.vertexAttribPointer(this.$a.Na,2,c.FLOAT,!1,0,0),c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,this.jf),c.uniform1f(c.getUniformLocation(this.$a,"uPercent"),3>this.dk?d*(a.width+this.Wc):d*(a.height+this.Wc)),d=c.getUniformLocation(this.$a,"uSoftEdge"),c.uniform1f(d,this.Wc),c.uniform1i(c.getUniformLocation(this.$a,"uDirection"),this.dk),c.uniform2f(c.getUniformLocation(this.$a,"uCanvasDimensions"),a.width,a.height),
b=c.getUniformLocation(this.$a,"uZoomIn"),c.uniform1i(b,1==this.ta||2==this.ta||6==this.ta?1:0),b=c.getUniformLocation(this.$a,"uZoomCenter"),c.uniform2f(b,e,g),e=c.getUniformLocation(this.$a,"uZoomFactor"),c.uniform1f(e,this.Ib),c.uniform1i(c.getUniformLocation(this.$a,"uSampler"),0);c.drawArrays(c.TRIANGLE_STRIP,0,this.tb.me);c.useProgram(this.u.Ba.R);c.disable(c.BLEND);c.enable(c.DEPTH_TEST)}};return m}();x.No=p})(ggP2VR||(ggP2VR={}));
(function(x){var p=function(){function m(d){this.Vh=[];this.u=d;this.enabled=!1;this.Gb=2;this.pi=!1}m.prototype.fm=function(d){if(2==d.mode||3==d.mode||5==d.mode){var c=this.u.va.currentTime;if(d.Lb&&d.Lb.gain&&d.Vb&&d.Tb&&d.Ub){var a=d.Vb.gain.value,b=d.Tb.gain.value,e=d.Ub.gain.value;d.Lb.gain.linearRampToValueAtTime(d.Lb.gain.value,c);d.Lb.gain.linearRampToValueAtTime(0,c+this.Gb);d.Vb.gain.linearRampToValueAtTime(a,c);d.Vb.gain.linearRampToValueAtTime(0,c+this.Gb);d.Tb.gain.linearRampToValueAtTime(b,
c);d.Tb.gain.linearRampToValueAtTime(0,c+this.Gb);d.Ub.gain.linearRampToValueAtTime(e,c);d.Ub.gain.linearRampToValueAtTime(0,c+this.Gb)}}else c=this.u.va.currentTime,d.Sb&&d.Sb.gain&&(d.Sb.gain.linearRampToValueAtTime(d.Sb.gain.value,c),d.Sb.gain.linearRampToValueAtTime(0,c+this.Gb));d.wi=!0;setTimeout(function(){d.Ye()},1E3*this.Gb+5)};m.prototype.ss=function(){for(var d=0;d<this.u.Y.length;d++){var c=this.u.Y[d];-1==this.u.Xd.indexOf(c.id)&&(-1==this.u.Xd.indexOf("_main")||-1!=this.u.kf.indexOf(c.id))&&
!this.u.isPlaying(c.id)&&-1<c.loop&&4!=c.mode&&6!=c.mode&&(c.ya?c.Id():(c.Gd&&c.xg(),c.j.play(),c.j.currentTime=0))}};m.prototype.Dp=function(){var d=(this.u.va.currentTime-this.os)/this.Gb;d=Math.min(1,d);for(var c=0;c<this.u.Y.length;c++){var a=this.u.Y[c];this.u.isPlaying(a.id)&&1>a.qa&&(a.qa=d)}1==d&&clearInterval(this.ns)};return m}();x.Oo=p})(ggP2VR||(ggP2VR={}));
(function(x){var p=function(){function m(d){this.th=[];this.pd=null;this.uc=[];this.lc=[];this.vc=[];this.el=!0;this.u=d;this.vp()}m.prototype.gh=function(){var d=this.u.S,c=d.createShader(d.VERTEX_SHADER);d.shaderSource(c,"attribute vec3 aVertexPosition;\nvoid main(void) {\n gl_Position = vec4(aVertexPosition, 1.0);\n}\n");d.compileShader(c);d.getShaderParameter(c,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(c)),c=null);var a=d.createShader(d.FRAGMENT_SHADER);d.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec4 vColor;\nuniform vec2 uCanvasDimensions;\nuniform vec2 uFlareCenterPosition;\nuniform float uBlindingValue;\nuniform float uAspectRatio;\nvoid main(void) {\n float canvasDiag = sqrt( (uCanvasDimensions.x * uCanvasDimensions.x) + (uCanvasDimensions.y * uCanvasDimensions.y) );\n vec2 diff = uFlareCenterPosition - gl_FragCoord.xy;\n diff.y = diff.y * uAspectRatio;\n float distFromFlarePoint = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n float factor = (distFromFlarePoint / canvasDiag) / 10.0;\n gl_FragColor = vec4(1.0, 1.0, 1.0, pow(((1.0 - factor) * 0.8) * uBlindingValue, 2.0));\n}\n");
d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.zc=d.createProgram();d.attachShader(this.zc,c);d.attachShader(this.zc,a);d.linkProgram(this.zc);d.getProgramParameter(this.zc,d.LINK_STATUS)||alert("Could not initialise shaders");this.zc.ka=d.getAttribLocation(this.zc,"aVertexPosition");d.enableVertexAttribArray(this.zc.ka);a=d.createShader(d.VERTEX_SHADER);c=d.createShader(d.VERTEX_SHADER);d.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\nvarying vec4 vColor;\nuniform vec2 uCirclePosition;\nuniform float uCircleRadius;\nuniform vec2 uCanvasDimensions2;\nuniform float uAspectRatio;\nvoid main(void) {\n vec2 circleOnScreen = aVertexPosition.xy * uCircleRadius + uCirclePosition;\n circleOnScreen.y = circleOnScreen.y / uAspectRatio;\n vec2 circleNorm = (circleOnScreen / uCanvasDimensions2) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(circleNorm.x, circleNorm.y, 0.0, 1.0);\n}\n");
d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);d.shaderSource(c,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\nvarying vec4 vColor;\nuniform vec2 uCirclePosition;\nuniform float uCircleRadius;\nuniform vec2 uCanvasDimensions2;\nuniform float uAspectRatio;\nvoid main(void) {\n vec2 circleOnScreen = aVertexPosition.xy * uCircleRadius + uCirclePosition;\n circleOnScreen.y = circleOnScreen.y / uAspectRatio;\n vec2 circleNorm = (circleOnScreen / uCanvasDimensions2) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(circleNorm.x, circleNorm.y, 0.0, 1.0);\n}\n");
d.compileShader(c);d.getShaderParameter(c,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(c)),a=null);var b=d.createShader(d.FRAGMENT_SHADER);d.shaderSource(b,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec4 vColor;\nuniform vec2 uCircleTexturePosition;\nuniform vec3 uCircleColor;\nuniform float uCircleRadius;\nuniform float uCircleAlpha;\nuniform float uCircleSoftness;\nuniform float uAspectRatio;\nvoid main(void) {\n vec2 diff = uCircleTexturePosition - gl_FragCoord.xy;\n diff.y = diff.y * uAspectRatio;\n float distFromCircleCenter = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n float softnessDistance = uCircleRadius * (1.0 - uCircleSoftness);\n if (distFromCircleCenter > uCircleRadius)\n {\n\t gl_FragColor = vec4(uCircleColor, 0.0);\n }\n else if (distFromCircleCenter <= (softnessDistance))\n {\n\t float factor = distFromCircleCenter / softnessDistance;\n\t gl_FragColor = vec4(uCircleColor, pow((1.0 - (0.2 * factor)) * uCircleAlpha, 1.8));\n }\n else\n {\n\t float factor = (distFromCircleCenter - softnessDistance) / (uCircleRadius - softnessDistance);\n\t gl_FragColor = vec4(uCircleColor, pow((0.8 - (0.8 * factor)) * uCircleAlpha, 1.8));\n }\n}\n");
d.compileShader(b);d.getShaderParameter(b,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(b)),b=null);this.Da=d.createProgram();d.attachShader(this.Da,a);d.attachShader(this.Da,b);d.linkProgram(this.Da);d.getProgramParameter(this.Da,d.LINK_STATUS)||alert("Could not initialise shaders");this.Da.ka=d.getAttribLocation(this.Da,"aVertexPosition");d.enableVertexAttribArray(this.Da.ka);a=d.createShader(d.FRAGMENT_SHADER);d.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec4 vColor;\nuniform vec2 uRingTexturePosition;\nuniform float uRingRadius;\nuniform float uRingAlpha;\nuniform float uAspectRatio;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec2 diff = uRingTexturePosition - gl_FragCoord.xy;\n diff.y = diff.y * uAspectRatio;\n float distFromRingCenter = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n float factor = distFromRingCenter / uRingRadius;\n if (distFromRingCenter > uRingRadius)\n {\n\t gl_FragColor = vec4(1.0, 1.0, 1.0, 0.0);\n }\n else\n {\n vec4 textureColor = texture2D(uSampler, vec2(factor / uAspectRatio, 0.5));\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, uRingAlpha);\n }\n}\n");
d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.Fb=d.createProgram();d.attachShader(this.Fb,c);d.attachShader(this.Fb,a);d.linkProgram(this.Fb);d.getProgramParameter(this.Fb,d.LINK_STATUS)||alert("Could not initialise shaders");this.Fb.ka=d.getAttribLocation(this.Fb,"aVertexPosition")};m.prototype.Oc=function(){var d=this.u.S;this.Ld=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,this.Ld);d.bufferData(d.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,
-1,0,1,1,0,-1,1,0]),d.STATIC_DRAW);this.Ld.itemSize=3;this.Ld.me=4;this.Hf=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,this.Hf);for(var c=[0,0,0],a=2*Math.PI/6,b=Math.PI/180*35,e=1,g=b;g<=b+2*Math.PI;g+=a)c.push(Math.sin(g)),c.push(-Math.cos(g)),c.push(0),e++;d.bufferData(d.ARRAY_BUFFER,new Float32Array(c),d.STATIC_DRAW);this.Hf.itemSize=3;this.Hf.me=e;this.Jn=d.createTexture();d.bindTexture(d.TEXTURE_2D,this.Jn);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR);d.texParameteri(d.TEXTURE_2D,
d.TEXTURE_MAG_FILTER,d.LINEAR);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE);c=document.createElement("canvas");c.width=100;c.height=1;a=c.getContext("2d");a.width=100;a.height=1;b=a.createLinearGradient(0,0,100,0);b.addColorStop(0,this.u.ga(0,0));b.addColorStop(.88,this.u.ga(0,0));b.addColorStop(.9,this.u.ga(16654848,1));b.addColorStop(.92,this.u.ga(16776448,1));b.addColorStop(.94,this.u.ga(4849466,1));b.addColorStop(.96,
this.u.ga(131071,1));b.addColorStop(.98,this.u.ga(8190,1));b.addColorStop(1,this.u.ga(0,0));a.fillStyle=b;a.fillRect(0,0,100,1);d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,d.UNSIGNED_BYTE,c)};m.prototype.Dr=function(){for(;0<this.th.length;)this.th.pop()};m.prototype.vp=function(){var d=[],c=[],a=[];var b={radius:14,alpha:.2,color:11390415,B:.27};d.push(b);b={radius:20,alpha:.25,color:11390415,B:.4};d.push(b);b={radius:10,alpha:.2,color:12442332,B:.6};d.push(b);b={radius:15,alpha:.2,color:11390415,
B:.8};d.push(b);b={radius:10,alpha:.2,color:12442332,B:1.5};d.push(b);b={radius:15,alpha:.2,color:11390415,B:1.8};d.push(b);b={radius:8,alpha:.2,color:12575203,H:.8,B:.7};c.push(b);b={radius:7,alpha:.4,color:12575203,H:.5,B:1.6};c.push(b);b={radius:5,alpha:.4,color:12575203,H:.6,B:.9};c.push(b);b={radius:8,alpha:.3,color:12575203,H:.4,B:1.1};c.push(b);this.uc.push(d);this.lc.push(c);this.vc.push(a);d=[];c=[];a=[];b={radius:30,alpha:.3,color:11390415,B:.5};d.push(b);b={radius:10,alpha:.3,color:11390415,
B:1};d.push(b);b={radius:20,alpha:.3,color:11390415,B:1.3};d.push(b);b={radius:10,alpha:.3,color:11390415,B:1.5};d.push(b);b={radius:15,alpha:.3,color:11390415,B:1.8};d.push(b);b={radius:10,alpha:.3,color:15506856,H:.8,B:.7};c.push(b);b={radius:20,alpha:.5,color:15506856,H:.5,B:1.6};c.push(b);b={radius:5,alpha:.5,color:15506856,H:.6,B:.9};c.push(b);b={radius:60,alpha:.4,color:15506856,H:.2,B:1.1};c.push(b);a.push({radius:220,alpha:.035,B:2});this.uc.push(d);this.lc.push(c);this.vc.push(a);d=[];c=
[];a=[];b={radius:30,alpha:.5,color:15465727,B:.5};d.push(b);b={radius:40,alpha:.28,color:15726842,B:.8};d.push(b);b={radius:25,alpha:.32,color:15726842,B:1.1};d.push(b);b={radius:15,alpha:.25,color:15726842,B:1.35};d.push(b);b={radius:10,alpha:.28,color:15465727,B:1.65};d.push(b);b={radius:10,alpha:.45,color:15465727,H:.8,B:.7};c.push(b);b={radius:7,alpha:.5,color:15465727,H:.4,B:.9};c.push(b);b={radius:40,alpha:.4,color:15465727,H:.3,B:.38};c.push(b);b={radius:50,alpha:.4,color:15465727,H:.5,B:1.25};
c.push(b);b={radius:18,alpha:.2,color:15465727,H:.5,B:1.25};c.push(b);b={radius:10,alpha:.34,color:15726842,H:.8,B:1.5};c.push(b);b={radius:38,alpha:.37,color:15465727,H:.3,B:-.5};c.push(b);this.uc.push(d);this.lc.push(c);this.vc.push(a);d=[];c=[];a=[];b={radius:16,alpha:.5,color:16363159,B:.1};d.push(b);b={radius:26,alpha:.3,color:16091819,B:.32};d.push(b);b={radius:29,alpha:.2,color:16091819,B:1.32};d.push(b);b={radius:20,alpha:.18,color:16363159,B:1.53};d.push(b);b={radius:27,alpha:.13,color:16425092,
B:1.6};d.push(b);b={radius:20,alpha:.1,color:16091819,B:1.75};d.push(b);b={radius:12,alpha:.45,color:16312238,H:.45,B:.2};c.push(b);b={radius:8,alpha:.25,color:16434209,H:.7,B:.33};c.push(b);b={radius:9,alpha:.25,color:16091819,H:.4,B:.7};c.push(b);b={radius:7,alpha:.2,color:16091819,H:.4,B:.85};c.push(b);b={radius:60,alpha:.23,color:16091819,H:.55,B:1.05};c.push(b);b={radius:37,alpha:.1,color:16091819,H:.55,B:1.22};c.push(b);b={radius:10,alpha:.25,color:16363159,H:.65,B:1.38};c.push(b);b={radius:7,
alpha:.2,color:16434209,H:.5,B:1.45};c.push(b);b={radius:3,alpha:.2,color:16416033,H:.5,B:1.78};c.push(b);b={radius:6,alpha:.18,color:16434209,H:.45,B:1.9};c.push(b);b={radius:4,alpha:.14,color:16766514,H:.45,B:2.04};c.push(b);b={radius:30,alpha:.14,color:16766514,H:.8,B:.04};c.push(b);this.uc.push(d);this.lc.push(c);this.vc.push(a);d=[];c=[];a=[];b={radius:9,alpha:.3,color:14346999,H:.3,B:.3};c.push(b);b={radius:5,alpha:.5,color:14148072,H:.8,B:.6};c.push(b);b={radius:3,alpha:.37,color:14346999,
H:.66,B:.8};c.push(b);b={radius:45,alpha:.2,color:14346999,H:.36,B:1.2};c.push(b);b={radius:13,alpha:.2,color:14346999,H:.36,B:1.23};c.push(b);b={radius:11,alpha:.2,color:14148072,H:.36,B:1.28};c.push(b);b={radius:27,alpha:.16,color:14346999,H:.36,B:1.55};c.push(b);b={radius:6,alpha:.36,color:14148072,H:.8,B:1.7};c.push(b);this.uc.push(d);this.lc.push(c);this.vc.push(a);d=[];c=[];a=[];b={radius:24,alpha:.2,color:15186464,B:.2};d.push(b);b={radius:7,alpha:.26,color:15186464,B:.35};d.push(b);b={radius:23,
alpha:.18,color:15186464,B:.65};d.push(b);b={radius:13,alpha:.2,color:15186464,B:.8};d.push(b);b={radius:11,alpha:.15,color:15186464,B:1.4};d.push(b);b={radius:15,alpha:.11,color:15451904,B:1.6};d.push(b);b={radius:6,alpha:.45,color:15579138,H:.45,B:.22};c.push(b);b={radius:3,alpha:.3,color:15451904,H:.25,B:.4};c.push(b);b={radius:4,alpha:.2,color:15451904,H:.25,B:.45};c.push(b);b={radius:65,alpha:.17,color:15186464,H:.25,B:.5};c.push(b);b={radius:5,alpha:.45,color:15579138,H:.45,B:.88};c.push(b);
b={radius:140,alpha:.18,color:15579138,H:.32,B:.95};c.push(b);b={radius:12,alpha:.22,color:15579138,H:.32,B:1.1};c.push(b);b={radius:8,alpha:.32,color:15451904,H:.72,B:1.2};c.push(b);b={radius:55,alpha:.2,color:15451904,H:.45,B:1.33};c.push(b);b={radius:4,alpha:.3,color:15451904,H:.25,B:1.42};c.push(b);this.uc.push(d);this.lc.push(c);this.vc.push(a);d=[];c=[];a=[];b={radius:16,alpha:.4,color:10933495,B:.32};d.push(b);b={radius:14,alpha:.3,color:11007484,B:.36};d.push(b);b={radius:10,alpha:.3,color:4037331,
B:.58};d.push(b);b={radius:14,alpha:.22,color:8835068,B:.68};d.push(b);b={radius:10,alpha:.27,color:11007484,B:.82};d.push(b);b={radius:11,alpha:.27,color:10867450,B:1};d.push(b);b={radius:9,alpha:.2,color:6158332,B:1.05};d.push(b);b={radius:10,alpha:.17,color:10867450,B:1.78};d.push(b);b={radius:10,alpha:.3,color:4037331,B:-.23};d.push(b);b={radius:8,alpha:.45,color:8835068,H:.45,B:.175};c.push(b);b={radius:7,alpha:.4,color:12574715,H:.55,B:.46};c.push(b);b={radius:3,alpha:.3,color:10867450,H:.35,
B:.5};c.push(b);b={radius:60,alpha:.37,color:4031699,H:.75,B:.75};c.push(b);b={radius:3,alpha:.25,color:4031699,H:.25,B:.75};c.push(b);b={radius:3,alpha:.2,color:6158332,H:.25,B:.9};c.push(b);b={radius:7,alpha:.45,color:8835068,H:.45,B:1.3};c.push(b);b={radius:32,alpha:.22,color:8835068,H:.75,B:1.62};c.push(b);b={radius:9,alpha:.45,color:4031699,H:.65,B:1.6};c.push(b);b={radius:8,alpha:.25,color:4031699,H:.65,B:1.83};c.push(b);b={radius:7,alpha:.4,color:12574715,H:.55,B:-.18};c.push(b);this.uc.push(d);
this.lc.push(c);this.vc.push(a);d=[];c=[];a=[];b={radius:16,alpha:.4,color:16389120,B:.32};d.push(b);b={radius:26,alpha:.22,color:16389120,B:.4};d.push(b);b={radius:26,alpha:.25,color:16389120,B:.65};d.push(b);b={radius:18,alpha:.3,color:16389120,B:1.23};d.push(b);b={radius:14,alpha:.26,color:16389120,B:1.33};d.push(b);b={radius:17,alpha:.18,color:16389120,B:1.7};d.push(b);b={radius:30,alpha:.16,color:16389120,B:2.15};d.push(b);b={radius:100,alpha:.25,color:16389120,H:.22,B:1.45};c.push(b);b={radius:7,
alpha:.5,color:15628151,H:.3,B:1.5};c.push(b);b={radius:3,alpha:.5,color:15628151,H:.3,B:1.52};c.push(b);b={radius:4,alpha:.5,color:16389120,H:.3,B:1.745};c.push(b);b={radius:9,alpha:.22,color:16389120,H:.3,B:1.8};c.push(b);this.uc.push(d);this.lc.push(c);this.vc.push(a);d=[];c=[];a=[];b={radius:16,alpha:.4,color:10933495,B:.32};d.push(b);b={radius:14,alpha:.3,color:11007484,B:.36};d.push(b);b={radius:10,alpha:.3,color:4037331,B:.58};d.push(b);b={radius:14,alpha:.22,color:8835068,B:.68};d.push(b);
b={radius:10,alpha:.27,color:11007484,B:.82};d.push(b);b={radius:11,alpha:.27,color:10867450,B:1};d.push(b);b={radius:9,alpha:.2,color:6158332,B:1.05};d.push(b);b={radius:10,alpha:.17,color:10867450,B:1.78};d.push(b);b={radius:10,alpha:.3,color:4037331,B:-.23};d.push(b);b={radius:8,alpha:.45,color:8835068,H:.45,B:.175};c.push(b);b={radius:7,alpha:.4,color:12574715,H:.55,B:.46};c.push(b);b={radius:3,alpha:.3,color:10867450,H:.35,B:.5};c.push(b);b={radius:60,alpha:.37,color:4031699,H:.75,B:.75};c.push(b);
b={radius:3,alpha:.25,color:4031699,H:.25,B:.75};c.push(b);b={radius:3,alpha:.2,color:6158332,H:.25,B:.9};c.push(b);b={radius:7,alpha:.45,color:8835068,H:.45,B:1.3};c.push(b);b={radius:32,alpha:.22,color:8835068,H:.75,B:1.62};c.push(b);b={radius:9,alpha:.45,color:4031699,H:.65,B:1.6};c.push(b);b={radius:8,alpha:.25,color:4031699,H:.65,B:1.83};c.push(b);b={radius:7,alpha:.4,color:12574715,H:.55,B:-.18};c.push(b);this.uc.push(d);this.lc.push(c);this.vc.push(a);d=[];c=[];a=[];b={radius:16,alpha:.4,color:16389120,
B:.32};d.push(b);b={radius:26,alpha:.22,color:16389120,B:.4};d.push(b);b={radius:26,alpha:.25,color:16389120,B:.65};d.push(b);b={radius:18,alpha:.3,color:16389120,B:1.23};d.push(b);b={radius:14,alpha:.26,color:16389120,B:1.33};d.push(b);b={radius:17,alpha:.18,color:16389120,B:1.7};d.push(b);b={radius:30,alpha:.16,color:16389120,B:2.15};d.push(b);b={radius:100,alpha:.25,color:16389120,H:.22,B:1.45};c.push(b);b={radius:7,alpha:.5,color:15628151,H:.3,B:1.5};c.push(b);b={radius:3,alpha:.5,color:15628151,
H:.3,B:1.52};c.push(b);b={radius:4,alpha:.5,color:16389120,H:.3,B:1.745};c.push(b);b={radius:9,alpha:.22,color:16389120,H:.3,B:1.8};c.push(b);this.uc.push(d);this.lc.push(c);this.vc.push(a);d=[];c=[];a=[];b={radius:24,alpha:.2,color:15186464,B:.2};d.push(b);b={radius:7,alpha:.26,color:15186464,B:.35};d.push(b);b={radius:23,alpha:.18,color:15186464,B:.65};d.push(b);b={radius:13,alpha:.2,color:15186464,B:.8};d.push(b);b={radius:11,alpha:.15,color:15186464,B:1.4};d.push(b);b={radius:15,alpha:.11,color:15451904,
B:1.6};d.push(b);b={radius:6,alpha:.45,color:15579138,H:.45,B:.22};c.push(b);b={radius:3,alpha:.3,color:15451904,H:.25,B:.4};c.push(b);b={radius:4,alpha:.2,color:15451904,H:.25,B:.45};c.push(b);b={radius:65,alpha:.17,color:15186464,H:.25,B:.5};c.push(b);b={radius:5,alpha:.45,color:15579138,H:.45,B:.88};c.push(b);b={radius:140,alpha:.18,color:15579138,H:.32,B:.95};c.push(b);b={radius:12,alpha:.22,color:15579138,H:.32,B:1.1};c.push(b);b={radius:8,alpha:.32,color:15451904,H:.72,B:1.2};c.push(b);b={radius:55,
alpha:.2,color:15451904,H:.45,B:1.33};c.push(b);b={radius:4,alpha:.3,color:15451904,H:.25,B:1.42};c.push(b);this.uc.push(d);this.lc.push(c);this.vc.push(a)};m.prototype.mr=function(){if(this.el){var d=this.u.S,c,a=new x.Ha(0,0,-100),b=this.u.vd(),e=0,g=0,f=!1;if(this.u.ja){var h=this.u.Ab.width;var l=this.u.Ab.height;this.u.K.Uh&&(h=this.u.K.wc.width,l=this.u.K.wc.height)}else{this.$||(this.$=this.pd.getContext("2d"));if(this.$.width!==this.u.D.width||this.$.height!==this.u.D.height)this.$.width=
this.u.D.width,this.$.height=this.u.D.height;this.$.clear?this.$.clear():this.$.clearRect(0,0,this.pd.width,this.pd.height);h=this.$.width;l=this.$.height}var k=Math.sqrt(h*h+l*l),w=k/800;for(c=0;c<this.th.length;c++){var r=this.th[c];a.init(0,0,-100);a.Ga(-r.A*Math.PI/180);a.Ma(r.pan*Math.PI/180);a.Ma(-this.u.pan.m*Math.PI/180);a.Ga(this.u.A.m*Math.PI/180);a.ob(this.u.V.m*Math.PI/180);if(-.01>a.z){g=-b/a.z;e=a.x*g;g*=a.y;var y=Math.max(h,l);Math.abs(e)<y/2+100&&Math.abs(g)<y/2+100&&(f=!0,e+=h/2,
g+=l/2)}if(f){this.u.ja&&(d.blendFunc(d.SRC_ALPHA,d.ONE),d.enable(d.BLEND),d.disable(d.DEPTH_TEST));y=h/2;var z=l/2;var ha=Math.sqrt((y-e)*(y-e)+(z-g)*(z-g));var ua=k/2;z=h>l?h:l;y=r.Ll/100*((ua-ha)/ua);0>y&&(y=0);if(this.u.ja){d.useProgram(this.zc);d.bindBuffer(d.ARRAY_BUFFER,this.u.K.tb);d.vertexAttribPointer(this.zc.ka,this.u.K.tb.itemSize,d.FLOAT,!1,0,0);var id=d.getUniformLocation(this.zc,"uCanvasDimensions");d.uniform2f(id,d.drawingBufferWidth,d.drawingBufferHeight);d.uniform2f(d.getUniformLocation(this.zc,
"uFlareCenterPosition"),d.drawingBufferWidth/h*e,l-d.drawingBufferHeight/l*g);d.uniform1f(d.getUniformLocation(this.zc,"uBlindingValue"),y);id=d.getUniformLocation(this.zc,"uAspectRatio");d.uniform1f(id,this.u.K.Uh?d.drawingBufferWidth/d.drawingBufferHeight:d.drawingBufferWidth/d.drawingBufferHeight/(h/l));d.drawArrays(d.TRIANGLE_STRIP,0,this.u.K.tb.me)}else id=this.$.createRadialGradient(e,g,1,e,g,z),id.addColorStop(0,"rgba(255, 255, 255, "+y+")"),id.addColorStop(.5,"rgba(255, 255, 255, "+.8*y+")"),
id.addColorStop(1,"rgba(255, 255, 255, "+.6*y+")"),this.$.fillStyle=id,this.$.fillRect(0,0,this.$.width,this.$.height);if(0!=Number(r.type)&&!this.u.K.Uh){y=h/2-e;z=l/2-g;var sh=1,db=Number(r.type)-1;ha<.35*ua&&(sh=ha/(.35*ua),sh*=sh);ha>.7*ua&&(sh=(ua-ha)/(.3*ua));sh*=r.alpha/100;if(0<this.uc[db].length)for(ha=0;ha<this.uc[db].length;ha++){var gl=this.uc[db][ha];ua=gl.radius*w;var tf=gl.alpha*sh;0>tf&&(tf=0);var hl=gl.color;if(8==db||9==db||10==db)hl=r.color;if(this.u.ja)d.useProgram(this.Da),d.bindBuffer(d.ARRAY_BUFFER,
this.Hf),d.vertexAttribPointer(this.Da.ka,this.Hf.itemSize,d.FLOAT,!1,0,0),id=d.getUniformLocation(this.Da,"uCanvasDimensions2"),d.uniform2f(id,d.drawingBufferWidth,d.drawingBufferHeight),d.uniform2f(d.getUniformLocation(this.Da,"uCirclePosition"),d.drawingBufferWidth/h*(e+y*gl.B),d.drawingBufferWidth/h*(l-(g+z*gl.B))),d.uniform2f(d.getUniformLocation(this.Da,"uCircleTexturePosition"),d.drawingBufferWidth/h*(e+y*gl.B),l-(g+z*gl.B)),d.uniform1f(d.getUniformLocation(this.Da,"uCircleRadius"),ua),d.uniform3f(d.getUniformLocation(this.Da,
"uCircleColor"),(hl>>16&255)/255,(hl>>8&255)/255,(hl&255)/255),d.uniform1f(d.getUniformLocation(this.Da,"uCircleAlpha"),tf),d.uniform1f(d.getUniformLocation(this.Da,"uCircleSoftness"),.1),id=d.getUniformLocation(this.Da,"uAspectRatio"),d.uniform1f(id,d.drawingBufferWidth/d.drawingBufferHeight/(h/l)),d.drawArrays(d.TRIANGLE_FAN,0,this.Hf.me);else{this.$.save();this.$.translate(e+y*gl.B,g+z*gl.B);id=this.$.createRadialGradient(0,0,1,0,0,1.1*ua);id.addColorStop(0,this.u.ga(hl,tf));id.addColorStop(.65,
this.u.ga(hl,.9*tf));id.addColorStop(.8,this.u.ga(hl,.7*tf));id.addColorStop(1,this.u.ga(hl,.2*tf));this.$.beginPath();hl=2*Math.PI/6;gl=Math.PI/180*35;var il=!0;for(tf=gl;tf<=gl+2*Math.PI;tf+=hl)il?(this.$.moveTo(ua*Math.sin(tf),ua*Math.cos(tf)),il=!1):this.$.lineTo(ua*Math.sin(tf),ua*Math.cos(tf));this.$.closePath();this.$.fillStyle=id;this.$.fill();this.$.restore()}}if(0<this.lc[db].length)for(ha=0;ha<this.lc[db].length;ha++){gl=this.lc[db][ha];ua=gl.radius*w;tf=gl.alpha*sh;0>tf&&(tf=0);hl=gl.color;
if(8==db||9==db||10==db)hl=r.color;this.u.ja?(d.useProgram(this.Da),d.bindBuffer(d.ARRAY_BUFFER,this.Ld),d.vertexAttribPointer(this.Da.ka,this.Ld.itemSize,d.FLOAT,!1,0,0),id=d.getUniformLocation(this.Da,"uCanvasDimensions2"),d.uniform2f(id,d.drawingBufferWidth,d.drawingBufferHeight),id=d.getUniformLocation(this.Da,"uCirclePosition"),d.uniform2f(id,d.drawingBufferWidth/h*(e+y*gl.B),d.drawingBufferWidth/h*(l-(g+z*gl.B))),id=d.getUniformLocation(this.Da,"uCircleTexturePosition"),d.uniform2f(id,d.drawingBufferWidth/
h*(e+y*gl.B),l-(g+z*gl.B)),id=d.getUniformLocation(this.Da,"uCircleRadius"),d.uniform1f(id,ua),d.uniform3f(d.getUniformLocation(this.Da,"uCircleColor"),(hl>>16&255)/255,(hl>>8&255)/255,(hl&255)/255),d.uniform1f(d.getUniformLocation(this.Da,"uCircleAlpha"),tf),d.uniform1f(d.getUniformLocation(this.Da,"uCircleSoftness"),gl.H),id=d.getUniformLocation(this.Da,"uAspectRatio"),d.uniform1f(id,d.drawingBufferWidth/d.drawingBufferHeight/(h/l)),d.drawArrays(d.TRIANGLE_FAN,0,this.Ld.me)):(this.$.save(),this.$.translate(e+
y*gl.B,g+z*gl.B),id=this.$.createRadialGradient(0,0,1,0,0,ua),id.addColorStop(0,this.u.ga(hl,tf)),id.addColorStop(1-gl.H,this.u.ga(hl,.8*tf)),id.addColorStop(1,this.u.ga(hl,0)),this.$.beginPath(),this.$.arc(0,0,ua,0,2*Math.PI,!1),this.$.closePath(),this.$.fillStyle=id,this.$.fill(),this.$.restore())}if(0<this.vc[db].length)for(ha=0;ha<this.vc[db].length;ha++)r=this.vc[db][ha],ua=r.radius*w,tf=r.alpha*sh,0>tf&&(tf=0),this.u.ja?(d.useProgram(this.Fb),d.activeTexture(d.TEXTURE0),d.bindTexture(d.TEXTURE_2D,
this.Jn),d.bindBuffer(d.ARRAY_BUFFER,this.Ld),d.vertexAttribPointer(this.Fb.ka,this.Ld.itemSize,d.FLOAT,!1,0,0),id=d.getUniformLocation(this.Fb,"uCanvasDimensions2"),d.uniform2f(id,h,l),id=d.getUniformLocation(this.Fb,"uCirclePosition"),d.uniform2f(id,e+y*r.B,l-(g+z*r.B)),id=d.getUniformLocation(this.Fb,"uRingTexturePosition"),d.uniform2f(id,d.drawingBufferWidth/h*(e+y*r.B),l-(g+z*r.B)),id=d.getUniformLocation(this.Fb,"uCircleRadius"),d.uniform1f(id,ua),d.uniform2f(d.getUniformLocation(this.Fb,"uRingPosition"),
e+y*r.B,l-(g+z*r.B)),d.uniform1f(d.getUniformLocation(this.Fb,"uRingRadius"),ua),d.uniform1f(d.getUniformLocation(this.Fb,"uRingAlpha"),tf),id=d.getUniformLocation(this.Fb,"uAspectRatio"),d.uniform1f(id,d.drawingBufferWidth/d.drawingBufferHeight/(h/l)),d.uniform1i(d.getUniformLocation(this.Fb,"uSampler"),0),d.drawArrays(d.TRIANGLE_FAN,0,this.Ld.me)):(this.$.save(),this.$.translate(e+y*r.B,g+z*r.B),id=this.$.createRadialGradient(0,0,0,0,0,ua),id.addColorStop(0,this.u.ga(16777215,0)),id.addColorStop(.88,
this.u.ga(0,0)),id.addColorStop(.9,this.u.ga(16654848,tf)),id.addColorStop(.92,this.u.ga(16776448,tf)),id.addColorStop(.94,this.u.ga(4849466,tf)),id.addColorStop(.96,this.u.ga(131071,tf)),id.addColorStop(.98,this.u.ga(8190,tf)),id.addColorStop(1,this.u.ga(0,0)),this.$.beginPath(),this.$.arc(0,0,ua,0,2*Math.PI,!1),this.$.closePath(),this.$.fillStyle=id,this.$.fill(),this.$.restore())}this.u.ja&&(d.useProgram(this.u.Ba.R),d.disable(d.BLEND),d.enable(d.DEPTH_TEST))}}}};return m}();x.Mo=p})(ggP2VR||(ggP2VR=
{}));var THREE;
(function(x){var p=function(){function m(d){this.zd=[];this.ra={x:0,y:0};this.Sc={x:0,y:0};this.zh=0;this.qe=null;this.lk=!1;this.vl=this.Ve=0;this.yk=this.Dj=!1;this.u=null;this.al=!0;this.If=1;this.Hi=[];this.frustumCulled=!1;this.fh=0;this.Qj=this.Eo=this.rn=!1;this.Wf=[-1,-1,-1,-1];this.Pi=[];this.Re=[];this.u=d;var c=this;setTimeout(function(){if(window.WebXRPolyfill&&window.Promise){var a={cardboardConfig:{BUFFER_SCALE:1}};Gl&&(a.allowCardboardOnDesktop=!0);try{new window.WebXRPolyfill(a),d.O("WebXR Polyfill loaded!")}catch(b){}}c.Gq()},
0);THREE?this.Kl():console.log("Three.js not available!")}m.prototype.wp=function(){this.init();this.animate()};m.prototype.Kl=function(){this.ol=new THREE.Matrix4;this.qn=new THREE.Euler};m.prototype.init=function(){"xr"in navigator||console.log("no WebXR support");if(THREE)if(this.Eb)console.log("already set up!");else{this.ol||this.Kl();var d=this,c=this.rd=this.u.rd,a=this.Ir=new THREE.Scene,b=this.camera=new THREE.PerspectiveCamera(100,window.innerWidth/window.innerHeight,.001,2E4);108>THREE.REVISION&&
(this.frustumCulled=!0);b.position.z=-.01;b.position.y=0;b.position.x=0;this.Eb=b=new THREE.WebGLRenderer({depth:!0,logarithmicDepthBuffer:!0,alpha:!0,antialias:!0,stencil:!0});b.setClearColor(new THREE.Color(0),1);b.setPixelRatio(window.devicePixelRatio);b.setSize(window.innerWidth,window.innerHeight);b.outputEncoding=THREE.GammaEncoding;b.shadowMap.enabled=!1;c.appendChild(b.domElement);"xr"in navigator&&(b.xr.enabled=!0,b.xr.setReferenceSpaceType("local"));var e=this.Jg=new THREE.Group;c=this.Yj=
b.xr.getController(0);c.addEventListener("selectstart",function(f){d.sn(f)});c.addEventListener("selectend",function(){});c.visible=!0;e.add(c);b=this.Zj=b.xr.getController(1);b.addEventListener("selectstart",function(f){d.sn(f)});b.addEventListener("selectend",function(){});b.visible=!0;e.add(b);e.visible=!1;a.add(e);e=(new THREE.BufferGeometry).setFromPoints([new THREE.Vector3(0,0,0),new THREE.Vector3(0,0,-1)]);var g=new THREE.LineBasicMaterial({color:14737632});e=new THREE.Line(e,g);e.name="line";
e.scale.z=5;c.add(e.clone());b.add(e.clone());this.Jh=new THREE.Raycaster;this.ra=new THREE.Vector2;this.ag=new THREE.Group;this.Qf=new THREE.Group;this.yd=new THREE.Group;this.ik=new THREE.Group;this.Rj=new THREE.Group;this.ag.add(this.yd);this.ag.add(this.ik);this.ag.add(this.Qf);a.add(this.ag);a.add(this.Rj);a=document.createElement("canvas");a.width=64;a.height=64;c=a.getContext("2d");c.fillStyle="black";c.lineWidth=3;c.beginPath();c.arc(32,32,10,0,2*Math.PI);c.stroke();a=new THREE.Texture(a);
a.needsUpdate=!0;a.encoding=THREE.sRGBEncoding;e=new THREE.PlaneBufferGeometry(2,2,8);a=new THREE.MeshBasicMaterial({map:a});a.transparent=!0;a=new THREE.Mesh(e,a);a.position.z=-50;this.Rj.add(a);window.addEventListener("resize",function(){d.jr()},!1);document.addEventListener("mouseup",function(){d.fr()},!1);document.addEventListener("mousedown",function(f){d.dr(f)},!1);document.addEventListener("mousemove",function(f){d.er(f)},!1)}else console.log("Three.js not available!")};m.prototype.ao=function(){var d=
this.u;d.O("VR not found");d.M("vrchanged",{});d.M("playerstatechanged",{})};m.prototype.ks=function(){this.yk=!0;var d=this.u;d.O("XR found");d.M("vrchanged",{});d.M("playerstatechanged",{})};m.prototype.Gq=function(){if(!this.Eo){this.Eo=!0;var d=this;if("xr"in navigator)navigator.xr.isSessionSupported("immersive-vr").then(function(c){c?d.ks():d.ao()})["catch"](d.ao)}};m.prototype.ih=function(){return null!=this.qe?this.Eb.xr.isPresenting:!1};m.prototype.Pe=function(){return this.yk&&THREE};m.prototype.hr=
function(d){var c=this;this.hi();d.addEventListener("end",function(){c.gr()});console.log("XR Session started.");this.Eb.xr.setSession(d);this.lk=!0;this.qe=d};m.prototype.gr=function(){console.log("XR Session ended.");this.lk=!1;this.qe=null;this.Xj()};m.prototype.Df=function(){var d=this.u;if(this.yk){if(null===this.qe){var c=this;navigator.xr.requestSession("immersive-vr",{optionalFeatures:["local-floor","bounded-floor"]}).then(function(b){c.hr(b)})["catch"](function(b){console.log(b);console.warn("'immersive-vr' isn't supported, or an error occurred activating VR!");
c.Xj()})}this.yd&&this.yd.translateY(-this.fh);this.fh=0;if(1==this.If){var a=navigator.userAgent;0<=a.indexOf("OculusBrowser")&&(0<=a.indexOf("Pacific")&&(this.If=1.7),0<=a.indexOf("Quest")&&(this.If=1.5))}this.Eb.xr.setFramebufferScaleFactor(this.If);d.Qc("Enter VR - scaled "+this.If)}else this.hi()};m.prototype.kr=function(){if(THREE&&this.Eb){var d=this.u;d.xe=!0;d.aa.style.display="none";d.ab.style.display="none";this.Eb.domElement.style.display="inline";d.M("vrchanged",{});d.M("playerstatechanged",
{})}};m.prototype.Xj=function(){if(THREE&&this.Eb){var d=this.u;d.xe=!1;d.aa.style.display="inline";d.ab.style.display="inline";this.Eb.domElement.style.display="none";d.ij(0);d.Jc();d.update();d.M("vrchanged",{});d.M("playerstatechanged",{})}};m.prototype.Ef=function(){null!=this.qe&&this.qe.end()};m.prototype.po=function(){this.ih()?this.Ef():this.Df()};m.prototype.hm=function(){var d=0,c=this.u;var a=1536;this.Eb&&c.O("Canvas: "+a);a*=Math.pow(2,0);if(0<c.v.levels.length){for(;c.v.levels.length>=
d+2&&!c.v.levels[d+1].Xe&&c.v.levels[d+1].width>a;)d++;c.O("Level "+d+" - width: "+c.v.levels[d].width);c.O(c.v.levels)}return d};m.prototype.Em=function(d){var c=this.u,a=c.$d[d];d="";if(a){a=a.firstChild;for(var b;a;)"input"==a.nodeName&&(b=a)&&(b=0<c.v.levels.length?b.getAttributeNode("leveltileurl"):b.getAttributeNode("tilevrurl"))&&(d=b.nodeValue),a=a.nextSibling}else d=0<c.v.levels.length?c.v.Kk:c.Xl;for(a=0;3>a;a++)d=c.Qb(d,"c","vr"),d=c.Qb(d,"s","vr"),d=c.Qb(d,"r",0),d=c.Qb(d,"l",0),d=c.Qb(d,
"x",0),d=c.Qb(d,"y",0),d=c.Qb(d,"v",0),d=c.Qb(d,"h",0);return c.fb(d)};m.prototype.ceilPowerOfTwo=function(d){return Math.pow(2,Math.ceil(Math.log(d)/Math.LN2))};m.prototype.loadTexture=function(d,c,a){var b=new THREE.ImageLoader;b.setCrossOrigin(this.u.crossOrigin);var e=this;b.load(c,function(g){var f=e.ceilPowerOfTwo(g.width),h=e.ceilPowerOfTwo(g.height);d.format=THREE.RGBFormat;d.encoding=THREE.sRGBEncoding;d.needsUpdate=!0;if(f==g.width&&h==g.height||!a)d.image=g;else{e.u.O("resizing "+g.width+
"/"+g.height+" -> "+f+"/"+h);var l=document.createElement("canvas");l.width=f;l.height=h;l.getContext("2d").drawImage(g,0,0,f,h);d.image=l}d.Nm=!0;d.je&&d.je.Nm&&(d.$g.visible=!0,d.je.$g.visible=!0)});this.Hi.push(d)};m.prototype.hi=function(){if(THREE){var d=this.u;if(this.Qj)d.O("vr panorama aleady added!");else{this.hm();var c=this.Qf,a=this;d.O("add vr panorama");this.Ze();this.camera.layers.enable(1);c.setRotationFromEuler(this.qn);c.rotateX(d.Pa.pitch*Math.PI/180);c.rotateZ(-d.Pa.V*Math.PI/
180);var b=new THREE.SphereBufferGeometry(2E4/3*1.5,16,16),e=(new THREE.TextureLoader).load(this.Em(d.nk()));e.encoding=THREE.sRGBEncoding;e=new THREE.MeshBasicMaterial({map:e,side:THREE.DoubleSide});b=new THREE.Mesh(b,e);b.scale.x=-1;b.rotateZ(d.Pa.V*Math.PI/180);b.rotateX(-d.Pa.pitch*Math.PI/180);b.rotateY(-90*Math.PI/180);c.add(b);a.aj=b;a.Qj=!0;setTimeout(function(){d.O("Adding Main Pano");a.Qj=!1;a.Yo();d.F.j?a.ap():a.Zo();a.Wo()});this.In();this.al=!0}}};m.prototype.ap=function(){var d=this.u,
c=this.Qf,a=2E4/3;if(d.Pd){var b=new THREE.VideoTexture(d.F.j);b.wrapS=THREE.ClampToEdgeWrapping;b.wrapT=THREE.ClampToEdgeWrapping;b.minFilter=THREE.LinearFilter;b.encoding=THREE.sRGBEncoding;var e=new THREE.SphereBufferGeometry(a,60,40);e.scale(-1,1,1);for(var g=e.attributes.uv.array,f=1;f<g.length;f+=2)g[f]*=.5;g=new THREE.MeshBasicMaterial({map:b});e=new THREE.Mesh(e,g);e.rotateY(-90*Math.PI/180);e.layers.set(d.Rh?1:2);c.add(e);e=new THREE.SphereBufferGeometry(a,60,40);e.scale(-1,1,1);g=e.attributes.uv.array;
for(f=1;f<g.length;f+=2)g[f]*=.5,g[f]+=.5;g=new THREE.MeshBasicMaterial({map:b});e=new THREE.Mesh(e,g);e.rotateY(-90*Math.PI/180);e.layers.set(d.Rh?2:1)}else e=new THREE.SphereBufferGeometry(a,60,40),e.scale(-1,1,1),b=new THREE.VideoTexture(d.F.j),b.encoding=THREE.sRGBEncoding,b.wrapS=THREE.ClampToEdgeWrapping,b.wrapT=THREE.ClampToEdgeWrapping,b.minFilter=THREE.LinearFilter,g=new THREE.MeshBasicMaterial({map:b}),e=new THREE.Mesh(e,g),e.rotateY(-90*Math.PI/180);c.add(e);try{d.F.j.play()}catch(h){d.Qc(h)}};
m.prototype.Zo=function(){var d=this.u,c=[],a=this.hm(),b=this.Qf,e=2E4/3,g=d.Pd?2:1;if(d.v.levels.length>a)for(var f=d.v.levels[a],h=0;6>h;h++){c[h]=new THREE.Group;for(var l=0;l<f.fa;l++)for(var k=0;k<f.U;k++)for(var w=0;w<g;w++){var r=new THREE.Texture;r.encoding=THREE.sRGBEncoding;this.loadTexture(r,d.ue(h,a,k,l,1==w),!0);r.wrapS=THREE.ClampToEdgeWrapping;r.wrapT=THREE.ClampToEdgeWrapping;r.minFilter=THREE.LinearMipMapLinearFilter;r.anisotropy=1;var y=d.v.P+2*d.v.Ea,z=d.v.P+2*d.v.Ea;k==f.U-1&&
(y=f.width-d.v.P*(f.U-1)+2*d.v.Ea);l==f.fa-1&&(z=f.width-d.v.P*(f.fa-1)+2*d.v.Ea);var ha=new THREE.PlaneBufferGeometry(e*y/f.width,e*z/f.width,8),ua=new THREE.MeshBasicMaterial({map:r});ha=new THREE.Mesh(ha,ua);ua.transparent=!0;ua.side=THREE.FrontSide;ua=1*d.v.P;ha.position.x=e*(k*ua+y/2-d.v.Ea-f.width/2)/f.width;ha.position.y=e*-(l*ua+z/2-d.v.Ea-f.width/2)/f.width;ha.position.z=-.5*e;if(d.Pd)if(ha.visible=!1,ha.layers.set(1==w?1:2),r.$g=ha,0==w)var id=ha;else y=id.material.map,r.je=y,y.je=r;c[h].add(ha);
ha.frustumCulled=this.frustumCulled}4>h?c[h].rotation.y=-h*Math.PI/2:c[h].rotation.x=(4==h?1:-1)*Math.PI/2;b.add(c[h])}else for(a=d.hf,h=0;6>h;h++)for(c[h]=new THREE.Group,w=0;w<g;w++)f=h,d.Pd&&(f=h+(1==w?6:0)),r=new THREE.Texture,r.encoding=THREE.sRGBEncoding,this.loadTexture(r,d.fb(d.Kg[f]),!1),r.wrapS=THREE.ClampToEdgeWrapping,r.wrapT=THREE.ClampToEdgeWrapping,r.minFilter=THREE.LinearFilter,ha=new THREE.PlaneBufferGeometry(a*e/2,a*e/2,64),ua=new THREE.MeshBasicMaterial({map:r}),ha=new THREE.Mesh(ha,
ua),ua.transparent=!0,ua.side=THREE.FrontSide,ha.position.x=0,ha.position.y=0,ha.position.z=-.25*e,d.Pd&&(ha.layers.set(1==w?1:2),ha.visible=!1,r.$g=ha,0==w?id=ha:(y=id.material.map,r.je=y,y.je=r)),c[h].add(ha),4>h?c[h].rotation.y=-h*Math.PI/2:c[h].rotation.x=(4==h?1:-1)*Math.PI/2,b.add(c[h])};m.prototype.Yo=function(){var d=this.u,c=this.yd;new x.Ha(0,0,-100);for(var a=d.I.tj,b=0;b<d.X.length;b++){var e=d.X[b],g=e.vs(),f=.2;if(!1!==g){var h=!e.distance||0>=e.distance?5:1>e.distance?1:5>e.distance?
e.distance:5;if(e.cd){var l=.005,k=(new THREE.TextureLoader).load(e.cd);k.encoding=THREE.sRGBEncoding;var w=new THREE.MeshBasicMaterial({map:k});if(e.rg){h=100;f=2*h*Math.tan(e.fov/2*Math.PI/180);var r=new THREE.PlaneBufferGeometry(f,f*e.Jd/e.Fe,1,1);w.transparent=!0;w.opacity=1}else r=new THREE.PlaneBufferGeometry(l*e.Fe,l*e.Jd,1,1),w.transparent=!0,w.opacity=.25;f=l*e.Jd/2;w.side=THREE.DoubleSide}else r=new THREE.SphereBufferGeometry(.2,16,16),k=(new THREE.TextureLoader).load(this.Em(g)),k.encoding=
THREE.sRGBEncoding,w=new THREE.MeshBasicMaterial({map:k}),w.transparent=!0,w.opacity=.25;g=new THREE.Mesh(r,w);l=e.title;if(a.enabled&&""!=l){r=document.createElement("canvas");r.width=256;r.height=32;k=r.getContext("2d");this.Th||(this.Th=document.createElement("canvas"),this.Th.width=r.width,this.Th.height=r.height);var y=this.Th.getContext("2d");y.clearRect(0,0,r.width,r.height);y.font="16px Helvetica";y.textAlign="center";y.textBaseline="top";w=y.measureText(l);var z=w.width;0<a.height&&(z=Math.min(a.width,
r.width-6),z=Math.max(z,w.width));w=z+6;a.background&&(y.fillStyle=this.u.ga(a.fc,a.ec),y.fillRect((r.width-z)/2-3,2,z+6,24));0<a.li&&(y.strokeStyle=this.u.ga(a.ic,a.hc),y.strokeRect((r.width-z)/2-3,2,z+6,24));y.fillStyle=this.u.ga(a.uj,a.sj);y.fillText(l,r.width/2,5,r.width-6);k.drawImage(this.Th,(r.width-w)/2,2,w,24,0,0,r.width,r.height);k=new THREE.Texture(r);k.encoding=THREE.sRGBEncoding;k.needsUpdate=!0;l=1.5;r=new THREE.PlaneBufferGeometry(1*l*w/r.width,3*l/r.height,1,1);w=new THREE.MeshBasicMaterial({map:k,
side:THREE.DoubleSide});r=new THREE.Mesh(r,w);r.translateY(-f-.125*l/2);r.frustumCulled=this.frustumCulled;g.add(r);w.transparent=!0;w.opacity=.5}g.rotateY(e.pan*Math.PI/180);g.rotateX(e.A*Math.PI/180);g.translateZ(-h);g.userData=e;g.castShadow=!1;g.receiveShadow=!1;g.frustumCulled=this.frustumCulled;c.add(g)}}};m.prototype.Wo=function(){for(var d=this.u,c=this.ik,a=0;a<d.T.length;a++){var b=d.T[a];if(b.j&&"_videopanorama"!=b.id&&!b.kd){b.j.play();var e=new THREE.VideoTexture(b.j);e.encoding=THREE.sRGBEncoding;
e.wrapS=THREE.ClampToEdgeWrapping;e.wrapT=THREE.ClampToEdgeWrapping;e.minFilter=THREE.LinearFilter;e.format=THREE.RGBAFormat;var g=5E3*Math.tan(b.fov*Math.PI/360);var f=0<b.Wb?g*b.Cc/b.Wb:g;b.Mc&&1!=b.Mc&&(f*=b.Mc);g=new THREE.PlaneBufferGeometry(g,f,5,5);e=new THREE.MeshBasicMaterial({map:e,side:THREE.DoubleSide});e.transparent=!0;e.blending=THREE.CustomBlending;e.blendEquation=THREE.AddEquation;e.blendSrc=THREE.SrcAlphaFactor;e.blendDst=THREE.OneMinusSrcAlphaFactor;e.alphaTest=0;e=new THREE.Mesh(g,
e);e.rotateY(b.pan*Math.PI/180);e.rotateX(b.A*Math.PI/180);e.translateY(-0);e.translateZ(-2500);e.rotateZ(-b.ob*Math.PI/180);e.rotateY(-b.Ma*Math.PI/180);e.rotateX(-b.Ga*Math.PI/180);e.userData=b;e.castShadow=!1;e.receiveShadow=!1;c.add(e)}}};m.prototype.Ng=function(d){for(var c=d.children.length-1;0<=c;c--){var a=d.children[c];this.Ng(a);d.remove(a)}d.geometry&&d.geometry.dispose();d.material&&(d.material.texture&&(d.material.texture.dispose(),d.material.texture.je=null,d.material.texture.$g=null),
d.material.map&&(d.material.map.dispose(),d.material.map.je=null,d.material.map.$g=null),d.material.dispose())};m.prototype.Ze=function(){THREE&&(this.Hi=[],this.Ng(this.Qf),this.Ng(this.yd),this.Ng(this.ik),10<this.Eb.info.memory.textures&&this.u.Us(this.Eb.info.memory))};m.prototype.jr=function(){if(THREE){var d=this.camera;d.aspect=window.innerWidth/window.innerHeight;d.updateProjectionMatrix();this.Eb.setSize(window.innerWidth,window.innerHeight)}};m.prototype.sn=function(d){THREE&&(d=this.wm(d.target),
0<d.length&&(d=d[0].object.userData,this.u.ld(d.url,d.target)))};m.prototype.wm=function(d){this.ol.identity().extractRotation(d.matrixWorld);this.Jh.ray.origin.setFromMatrixPosition(d.matrixWorld);this.Jh.ray.direction.set(0,0,-1).applyMatrix4(this.ol);return this.Jh.intersectObjects(this.yd.children)};m.prototype.intersectObjects=function(d){var c=d.getObjectByName("line");d=this.wm(d);if(0<d.length){d=d[0];var a=d.object;a.selected=!0;this.zd.push(a);c.scale.z=d.distance}else c.scale.z=5};m.prototype.sp=
function(){for(;this.zd.length;)this.zd.pop().selected=!1};m.prototype.er=function(d){d.preventDefault();var c=this.ra,a=this.Eb;c.x=d.clientX/a.domElement.clientWidth*2-1;c.y=2*-(d.clientY/a.domElement.clientHeight)+1;1==d.buttons&&(this.zh=this.Sc.x-c.x)};m.prototype.Hq=function(){var d=this.Jh;d.setFromCamera(this.ra,this.camera);d=d.intersectObjects(this.yd.children);0<d.length&&(d=d[0].object,d.selected=!0,this.zd.push(d))};m.prototype.Iq=function(){var d=this.Jh;d.setFromCamera({x:0,y:0},this.camera);
d=d.intersectObjects(this.yd.children);0<d.length&&(d=d[0].object,d.selected=!0,this.zd.push(d))};m.prototype.fr=function(){this.zh=0};m.prototype.dr=function(d){50>d.clientX&&50>d.clientY&&this.u.Ef();0<this.zd.length?this.u.ld(this.zd[0].userData.url):(this.Sc.x=this.ra.x,this.Sc.y=this.ra.y)};m.prototype.animate=function(){var d=this.Rq=this;this.Eb&&this.Eb.setAnimationLoop(function(){d.render()})};m.prototype.render=function(){if(THREE){var d=null;try{d=this.Eb.xr.getCamera(this.camera)}catch(y){console.log(y)}0==
this.fh&&d&&(this.fh=d.position.y,this.yd.translateY(this.fh));var c=this.Rq,a=c.u;c.sp();if(a.xe){c.Dj=c.Yj.visible||c.Zj.visible?!1:!0;c.Yj.visible&&c.intersectObjects(c.Yj);c.Zj.visible&&c.intersectObjects(c.Zj);c.lk||c.Hq();var b=[],e=!0;this.qe?this.qe.inputSources.forEach(function(y){var z=y.profiles;"gaze"==y.targetRayMode?c.Dj=!0:(b.push(y.gamepad),0<=z.indexOf("oculus-go")&&(e=!1),0<=z.indexOf("generic-trigger-squeeze-thumbstick")&&(e=!0),0<=z.indexOf("oculus-touch")&&(e=!0))}):b=navigator.getGamepads&&
navigator.getGamepads();var g=!1;!c.Jg.visible&&0<b.length&&(c.Jg.visible=!0);c.Jg.visible==(0==b.length)&&(c.Jg.visible=!c.Jg.visible);if(c.Dj)if(c.Iq(),0<this.zd.length)if(this.Ek!=this.zd[0])this.Ek=this.zd[0],this.Mq=Date.now();else{if(Date.now()>this.Mq+1E3){var f=this.Ek.userData;f&&f.url&&this.u.ld(f.url,f.target)}}else this.Ek=null;for(f=0;f<b.length;f++){var h=b[f];if(h&&0<h.buttons.length)if(2<h.buttons.length&&h.buttons[2].touched&&2<=h.axes.length&&!e)if(g=!0,h=h.axes[0],-1==this.Wf[f])this.Wf[f]=
h;else{var l=this.Wf[f]-h;-.3>l&&(this.Lh(20),this.Wf[f]=h);.3<l&&(this.Lh(-20),this.Wf[f]=h)}else this.Wf[f]=-1,4<=h.axes.length&&(h=h.axes[2],.8<h?(g=!0,1!=this.Re[f]&&(this.Re[f]=1,this.Pi[f]=Date.now()-1E4)):-.8>h?(g=!0,-1!=this.Re[f]&&(this.Re[f]=-1,this.Pi[f]=Date.now()-1E4)):this.Re[f]=0,0!=this.Re[f]&&400<Date.now()-this.Pi[f]&&(this.Pi[f]=Date.now(),this.Lh(20*this.Re[f])))}this.aj&&0<this.Hi.length&&this.Hi.every(function(y){return y.Nm})&&(this.Ng(this.aj),this.Qf.remove(this.aj),this.aj=
null,a.O("unload Preview Sphere"));f=this.yd;for(h=f.children.length-1;0<=h;h--){l=f.children[h];var k=1,w=1;l.selected?(k=1.5,w=1):g?(k=.6,w=.7):(k=.4,w=.5);var r=l.scale.x;r+=.1*(k-r);l.material.opacity+=.1*(w-l.material.opacity);l.userData&&l.userData.cd?(l.userData.rg&&(r=1,l.material.opacity=1),0<l.children.length&&(l.children[0].material.opacity=l.material.opacity)):(l.rotateY(1*Math.PI/180),0<l.children.length&&(l.children[0].rotateY(-1*Math.PI/180),l.children[0].material.opacity=l.material.opacity));
l.scale.x=l.scale.y=l.scale.z=r}g=d?d.rotation.clone():c.camera.rotation.clone();g.reorder("YXZ");this.vl=180*g.y/Math.PI;this.al&&(this.Lh(this.vl-a.pan.m),this.al=!1);a.Rr(this.vl-this.Ve,180*g.x/Math.PI,180*g.z/Math.PI);a=this.Rj;c.Dj?d&&(a.setRotationFromEuler(d.rotation),a.visible=!0):a.visible=!1;c.Eb.render(c.Ir,c.camera);0==this.zh||isNaN(this.zh)||this.Lh(this.zh)}}};m.prototype.In=function(){this.Ve=0;this.ag.setRotationFromEuler(this.qn)};m.prototype.Lh=function(d){this.Ve+=d;this.ag.rotateY(d*
Math.PI/180)};return m}();x.Uo=p})(ggP2VR||(ggP2VR={}));var Gl=!1;
(function(x){var p=function(){return function(){this.fov=this.A=this.pan=0}}(),m=function(){return function(){this.Sl=-1E7}}(),d=function(){function c(a,b){this.Oq="TGljZW5zZTogQktZTS5DT00=";this.pan={m:0,eb:0,min:0,max:360,d:0,Qk:0,bd:0,open:0};this.A={m:0,eb:0,min:-90,max:90,d:0,bd:0,open:0};this.V={m:0,eb:0,min:-180,max:180,d:0,open:0};this.Lc={pan:0,A:-90,V:0,fov:170,Pb:9};this.fov={m:70,eb:70,min:1,yh:0,max:170,Nk:360,Ok:270,prev:0,d:0,mode:0,eo:0,Zl:0,open:0};this.Pa={V:0,pitch:0};this.D={width:10,height:10};
this.Ya=0;this.bk=new x.Ha;this.crossOrigin="anonymous";this.Xa=this.$i=4;this.wd=this.di=this.Dh=this.Fc=0;this.Fo={};this.Rh=this.Pd=!1;this.ia={start:{x:0,y:0},pa:{x:0,y:0},Rd:{x:0,y:0},m:{x:0,y:0},oa:{x:0,y:0}};this.Z={Sc:!1,ed:!1,Li:function(){return this.ed||this.Sc},im:0,startTime:0,start:{x:0,y:0},pa:{x:0,y:0},Rd:{x:0,y:0},m:{x:0,y:0},oa:{x:0,y:0},Gh:!1};this.Gf=this.Je=!0;this.La={enabled:!0,pa:{x:0,y:0},oa:{x:0,y:0},bl:0,fov:{active:!1,Bc:0}};this.nb={alpha:0,beta:0,gamma:0,orientation:0,
Ve:0,Kh:!0,fadeIn:0};this.dh={alpha:0,beta:0,gamma:0,orientation:0};this.F={src:[],tf:4,width:640,height:480,Ad:!1,Mi:!1,il:!0,fo:!1,Ie:"loop",nl:"",j:HTMLVideoElement=null,lo:!1,texture:WebGLTexture=null,ul:WebGLBuffer=null,rj:WebGLBuffer=null,Ak:WebGLBuffer=null,format:1,Ei:0,flipY:1,yb:function(){return 0},On:function(){},loop:function(){return!1}};this.Oi=0;this.sa=this.Ka=this.Sa=this.aa=this.Ac=this.ab=this.N=null;this.Ke="pano";this.mk="flashcontainer";this.ck="";this.control=null;this.kc=
[];this.Oa=!1;this.Mg=1;this.ua=null;this.be=this.qf=this.Mf=!1;this.yg=0;this.Hd=.02;this.Lj=0;this.Mj=!1;this.Kj=this.ji=this.zg=this.pf=this.Il=0;this.Hl=-1;this.Zb="";this.gg=this.Uc=!1;this.Fh=0;this.Kg=[];this.Xl="";this.Af=[];this.hf=this.Ic=1;this.Cg=1024;this.hg=!1;this.Te=200;this.cc=0;this.Sh=5;this.Hc=0;this.mo=50;this.zk=this.no=0;this.C={enabled:!1,timeout:5,active:!1,Qh:!1,speed:.4,wj:0,Zi:0,pn:!0,Zf:"",nn:!1,ai:!1,sg:!1,ki:"",ce:"Animation01",sf:!1,Vi:!1,ml:!1,startTime:0,Bd:0,Rg:!1,
si:!1,Ri:0,Qd:0,qh:0,rh:0,ph:0,fn:0};this.G={active:!1,aborted:!1,speed:.1,pan:0,A:0,V:0,fov:70,Zd:70,qh:0,rh:0,gn:0,ph:0,Pb:0,Ih:0,Fk:0,sl:!1,Ah:!1,Gl:0,Fl:0,Ii:!1};this.Vf={pan:-1,A:-1,fov:-1};this.dn=0;this.ma=null;this.tg={};this.bi={};this.ee=[];this.Ui={};this.Rc={};this.Yf={};this.I={mode:1,mh:-1,wa:0,ib:0,od:.05,ic:255,hc:1,fc:255,ec:.3,Lf:!0,tj:{enabled:!0,width:180,height:20,uj:0,sj:1,background:!0,fc:16777215,ec:1,ic:0,hc:1,Oj:3,li:1,Fj:!0},vb:[],bc:[],md:[],mj:[]};this.Ia=null;this.X=
[];this.Y=[];this.T=[];this.gb=[];this.$d={};this.Za=[];this.xa=[];this.Xd=[];this.kf=[];this.ef=[];this.ca=1;this.Ba=this.Td=this.Jb=this.rd=null;this.Og={};this.Gc={};this.ko=this.ng="";this.jo=-1;this.v=new x.Po;this.lr={target:0,current:0,od:.01,delay:2,gk:0,ti:!1,gp:!1};this.margin={left:0,top:0,right:0,bottom:0};this.L={uh:!1,Pq:!1,oc:!1,ke:!1,Od:!0,Um:!1,co:1,Ln:!1,ek:!0,Hg:!0,Ig:!0,oi:!1,Nf:!1,Nn:!0,sensitivity:8};this.xh=[];this.td=!0;this.ra={x:0,y:0};this.$h=this.Rb=this.Yh=this.nd=this.xe=
this.ja=!1;this.Cj=this.zo=!0;this.wk=!1;this.he=!0;this.nf=this.tk=this.vk=!1;this.Ao=!0;this.Gi=!1;this.Qa=this.de="";this.dd="transition";this.Wa="transform";this.Kd="perspective";this.cm="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYBgeACDAAADIAAE3iTbkAAAAAElFTkSuQmCC";this.Ab={width:0,height:0};this.mm=new x.Ha;this.lm=new x.Ha;this.nm=new x.Ha;this.om=new x.Ha;this.km=new x.Ha;this.Tf=!1;this.en=this.Ra="";
this.Ej=[];this.Pk=[];this.sk=!1;this.yj=[];this.jh=this.Vm=this.Qe=this.Wm=this.gd=this.Zm=this.Bk=this.Mn=this.nc=this.Sf=this.Rf=this.Ck=this.Xm=this.Ym=this.an=!1;this.Zh=!0;this.ej=this.Ki=!1;this.Pf=[];this.devicePixelRatio=1;this.ea=this.K=null;this.Dg=!1;this.Ja=null;this.zb={enabled:!1,speed:1,running:!1,finished:!0};this.ln=!1;this.Ti="<<LOG>>";this.cube=new x.Qo;this.rl=!1;this.Gg=function(g,f){if(0==g.length)return g;var h;var l=[];var k=f.bj(g[0])-0;for(h=0;h<g.length;h++){var w=h;var r=
h+1;r==g.length&&(r=0);var y=f.bj(g[r])-0;if(0<=k&&0<=y)l.push(g[w]);else if(0<=k||0<=y){var z=y/(y-k);0>z&&(z=0);1<z&&(z=1);var ha=new x.Ha;ha.Nd(g[w],g[r],z);0>k||l.push(g[w]);l.push(ha)}k=y}return l};this.yn=new p;this.hl=0;this.tc=!1;this.Qi=-1;this.Wg=function(g){return g?this.hh()&&(g.clientX||g.clientY)?{x:g.clientX,y:g.clientY}:g.pageX||g.pageY?{x:g.pageX,y:g.pageY}:g.clientX||g.clientY?{x:g.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,y:g.clientY+document.body.scrollTop+
document.documentElement.scrollTop}:g.touches&&g.touches[0]?{x:g.touches[0].pageX,y:g.touches[0].pageY}:{x:0,y:0}:{x:0,y:0}};this.Xi=1;this.Ep=this.Ai=this.bn=this.hk=this.Xk=this.cj=0;this.cn=!1;this.ge=!0;this.lb=new x.gi(this);this.lb.Lf=!1;this.bm();if(7<this.Ti.length){var e=c.Lg("bG9n");window[c.Lg("Y29uc29sZQ==")][e](c.$l(this.Ti))}this.jg(this.lb);this.checkLoaded=this.kc;this.isLoaded=!1;b&&b.hasOwnProperty("useFlash")&&b.useFlash&&(this.Rb=!0,this.ja=this.nd=!1,b.hasOwnProperty("flashPlayerId")?
this.Ke=b.flashPlayerId:this.Ke="pano",b.hasOwnProperty("flashContainerId")?this.mk=b.flashContainerId:this.mk=a+"flash");b&&b.hasOwnProperty("webGLFlags")&&b.webGLFlags&&(this.Fo=b.webGLFlags);this.Fa();this.Rb||(this.Ua=new x.Mo(this));this.Wl(a);this.fp();this.userdata=this.tg=this.Pg();this.emptyHotspot=this.lb;this.mouse=this.ra;this.K=new x.No(this);this.Ja=new x.Oo(this);this.Ba=new x.To(this);this.Hb=new x.Uo(this);this.Jc()}c.prototype.Km=function(a){return-99991===a?this.Oq:"6.1.14/18105"};
c.prototype.$j=function(){this.K.enabled=this.ea.enabled;this.K.type=this.ea.type;this.K.ta=this.ea.zoomin;this.K.xc=this.ea.zoomout;this.K.Bg=this.ea.blendtime;this.K.wg=this.ea.zoomoutpause;this.K.Ij=this.ea.zoomfov;this.K.Gj=this.ea.zoomafterinfov;this.K.Hj=this.ea.zoomafteroutfov;this.K.ye=this.ea.zoomspeed;this.K.uf=this.ea.blendcolor;this.K.Wc=this.ea.softedge;this.ea=null};c.prototype.cs=function(a){this.ea={};this.ea.enabled=!0;this.ea.type=this.K.type;this.ea.zoomin=this.K.ta;this.ea.zoomout=
this.K.xc;this.ea.blendtime=this.K.Bg;this.ea.zoomoutpause=this.K.wg;this.ea.zoomfov=this.K.Ij;this.ea.zoomafterinfov=this.K.Gj;this.ea.zoomafteroutfov=this.K.Hj;this.ea.zoomspeed=this.K.ye;this.ea.blendcolor=this.K.uf;this.ea.softedge=this.K.Wc;if(a.hasOwnProperty("type")){var b=a.type;if("cut"==b||"crossdissolve"==b||"diptocolor"==b||"irisround"==b||"irisrectangular"==b||"wipeleftright"==b||"wiperightleft"==b||"wipetopbottom"==b||"wipebottomtop"==b||"wiperandom"==b)this.ea.type=b}a.hasOwnProperty("before")&&
(b=Number(a.before),0==b||2==b)&&(this.ea.zoomin=b);a.hasOwnProperty("after")&&(b=Number(a.after),0==b||2==b||3==b||4==b)&&(this.ea.zoomout=b);a.hasOwnProperty("transitiontime")&&(b=Number(a.transitiontime),0<=b&&50>=b&&(this.ea.blendtime=b));a.hasOwnProperty("waitfortransition")&&(this.ea.zoomoutpause=1==a.waitfortransition);a.hasOwnProperty("zoomedfov")&&(b=Number(a.zoomedfov),.01<=b&&50>=b&&(this.ea.zoomfov=b));a.hasOwnProperty("zoomafterinfov")&&(b=Number(a.zoomafterinfov),70<=b&&120>=b&&(this.ea.zoomafterinfov=
b));a.hasOwnProperty("zoomafteroutoutfov")&&(b=Number(a.zoomafteroutfov),.01<=b&&70>=b&&(this.ea.zoomafteroutfov=b));a.hasOwnProperty("zoomspeed")&&(b=Number(a.zoomspeed),.01<=b&&99>=b&&(this.ea.zoomspeed=b));a.hasOwnProperty("dipcolor")&&(this.ea.blendcolor=a.dipcolor);a.hasOwnProperty("softedge")&&(a=Number(a.softedge),0<=a&&1E3>=a&&(this.ea.softedge=a));this.Dg||this.$j()};c.prototype.Vc=function(a,b,e){var g=b?Number(b):0;if(0!=a&&4!=a&&12!=a&&9!=a)this.Qc("Unsupported projection type: "+a);else if(b&&
0!==g&&4!==g&&12!==g&&9!==g)this.Qc("Unsupported projection2 type: "+g);else if(a==g&&(g=0),this.Dh=e?Number(e):1,this.Xa!=a||this.Fc!=g)this.Xa=a,this.Fc=g,this.Ba.Ji()};c.prototype.Ta=function(){return 0==this.Xa?4:this.Xa};c.prototype.Uj=function(a,b){if(0!=a&&4!=a&&12!=a&&9!=a)this.Qc("Unsupported projection type: "+a);else if(this.ja||0==a||4==a||this.Qc("Projection changes require WebGL!"),this.Ta()!=a){var e={};e.pan=this.pan.m;e.tilt=this.A.m;e.fov=this.fov.m;e.projection=a;e.timingFunction=
3;e.speed=b;a=this.Vg(a);e.fov=Math.min(a,e.fov);this.Wi(e)}};c.prototype.addListener=function(a,b){(this.Og[a]=this.Og[a]||[]).push(b)};c.prototype.M=function(a,b){if(a=this.Og[a])for(var e=a.length,g=0;g<e;g++)try{a[g].apply(null,[b])}catch(f){this.Qc(f)}};c.prototype.removeEventListener=function(a,b){var e=this.Og[a];if(e){var g;var f=0;for(g=e.length;f<g;f++)if(e[f]===b){1===g?delete this.Og[a]:e.splice(f,1);break}}};c.prototype.Er=function(){this.Oa=!0};c.prototype.Aq=function(){return this.S};
c.prototype.$o=function(a,b,e,g){if(!this.Gc.hasOwnProperty(a)){var f=new m;this.Gc[a]=f;f.type=b;"undefined"!==typeof e&&this.re(a,e);"object"===typeof g&&this.Wn(a,g);return!0}return!1};c.prototype.um=function(a){var b=document.cookie.indexOf(a+"="),e="";-1!=b&&(b=b+a.length+1,a=document.cookie.indexOf(";",b),-1==a&&(a=document.cookie.length),e=decodeURIComponent(document.cookie.substring(b,a)));return e};c.prototype.Xn=function(a,b,e){0==b&&this.re(a,e,!1);1==b&&this.re(a,parseFloat(e),!1);2==
b&&this.re(a,"true"==e,!1)};c.prototype.Wn=function(a,b){if(this.Gc.hasOwnProperty(a)&&"object"===typeof b){var e=this.Gc[a];b.hasOwnProperty("cookiePath")&&(e.Tl=String(b.cookiePath));b.hasOwnProperty("cookieExpireDays")&&(e.Sl=parseFloat(b.cookieExpireDays));b.hasOwnProperty("keep")&&(e.Dk=!!b.keep,e.Dk&&0<document.cookie.length&&(""!=this.ng?-1!=document.cookie.indexOf(this.ng+"=")&&(b=JSON.parse(this.um(this.ng)),b.hasOwnProperty(a)&&this.Xn(a,e.type,b[a])):(b="ggvar_"+a,-1!=document.cookie.indexOf(b+
"=")&&(b=this.um(b),this.Xn(a,e.type,b)))));return!0}return!1};c.prototype.bs=function(a,b){this.ng=a;b&&"object"===typeof b&&(b.hasOwnProperty("cookiePath")&&(this.ko=String(b.cookiePath)),b.hasOwnProperty("cookieExpireDays")&&(this.jo=parseFloat(b.cookieExpireDays)))};c.prototype.Jl=function(a,b,e){-1<=b&&(a+="; max-age="+86400*b);""!=e&&(a+="; path="+e);return a};c.prototype.re=function(a,b,e){void 0===e&&(e=!0);if(this.Gc.hasOwnProperty(a)){var g=this.Gc[a];if(0==g.type&&"string"===typeof b||
1==g.type&&"number"===typeof b||2==g.type&&"boolean"===typeof b){if(g.value!=b){g.value=b;if(g.Dk&&e){if(""!=this.ng){g={};for(var f=0,h=Object.keys(this.Gc);f<h.length;f++)e=h[f],this.Gc[e].Dk&&(g[e]=encodeURIComponent(this.Gc[e].value.toString()));e=this.ng+"="+JSON.stringify(g);e=this.Jl(e,this.jo,this.ko)}else e="ggvar_"+a+"="+encodeURIComponent(b.toString()),e=this.Jl(e,g.Sl,g.Tl?g.Tl:"");document.cookie=e}this.M("varchanged_"+a,{value:b})}return!0}}return!1};c.prototype.uq=function(a){if(this.Gc.hasOwnProperty(a))return this.Gc[a].value};
c.Lg=function(a){var b="",e=0;a=a.replace(/[^A-Za-z0-9\+\/=]/g,"");do{var g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(e++));var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(e++));var h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(e++));var l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(e++));g=g<<2|f>>4;f=(f&15)<<4|h>>2;var k=(h&3)<<6|
l;b+=String.fromCharCode(g);64!=h&&(b+=String.fromCharCode(f));64!=l&&(b+=String.fromCharCode(k))}while(e<a.length);return b};c.us=function(a){for(var b=[1,1,1,1,2,2,3,0],e=a.length,g="",f=0;f<e;){var h=a.charCodeAt(f++);if(h&128){var l=b[h>>3&7];if(!(h&64&&l)||f+l>e)return null;for(h&=63>>l;0<l;--l){var k=a.charCodeAt(f++);if(128!=(k&192))return null;h=h<<6|k&63}}g+=String.fromCharCode(h)}return g};c.$l=function(a){return c.us(c.Lg(a))};c.prototype.bm=function(){this.devicePixelRatio=window.devicePixelRatio||
1;this.an=!!navigator.userAgent.match(/(Windows|Win)/g);this.Ym=!!navigator.userAgent.match(/(Mac|Macintosh|Mac_powerpc)/g);this.Xm=!!navigator.userAgent.match(/(Linux|Ubuntu)/g);this.Ck=!!navigator.userAgent.match(/(MSIE)/g);this.Rf=!!navigator.userAgent.match(/(Edge|EdgA)/g);this.nc=!!navigator.userAgent.match(/(Safari)/g);this.Zm=!!navigator.userAgent.match(/(SamsungBrowser)/g);if(this.Bk=!!navigator.userAgent.match(/(Chrome)/g)||!!navigator.userAgent.match(/(CriOS)/g))this.nc=!1;if(this.Sf=!!navigator.userAgent.match(/(Firefox)/g)||
!!navigator.userAgent.match(/(FxiOS)/g))this.nc=!1;if(this.nc){var a=navigator.userAgent.indexOf("Safari");this.Cd=navigator.userAgent.substring(a+7);a=navigator.userAgent.indexOf("Version");-1!=a&&(this.Cd=navigator.userAgent.substring(a+8));this.Cd=this.Cd.substring(0,this.Cd.indexOf(" "));this.Cd=this.Cd.substring(0,this.Cd.indexOf("."));this.Mn=!0}this.gd=!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g);this.Wm=!!navigator.userAgent.match(/(iPhone|iPod)/g);this.Qe=!!navigator.userAgent.match(/(android)/i);
this.Vm=!!navigator.userAgent.match(/(IEMobile)/i);this.jh=this.gd||this.Qe||this.Vm;/iP(hone|od|ad)/.test(navigator.platform)&&(a=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),this.Pf=[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3]||"0",10)]);this.Ki=!window.requestAnimationFrame;a=["Webkit","Moz","O","ms","Ms"];this.Qa="";this.dd="transition";this.Wa="transform";this.Kd="perspective";for(var b=0;b<a.length;b++)"undefined"!==typeof document.documentElement.style[a[b]+"Transform"]&&(this.Qa=
"-"+a[b].toLowerCase()+"-",this.dd=a[b]+"Transition",this.Wa=a[b]+"Transform",this.Kd=a[b]+"Perspective");this.wk=El();this.ja=Fl();this.nd=this.wk;this.ja&&(this.nd=!1);this.Uc=!0;this.gg=!1;if(this.gd||this.Qe)this.Un(80),this.Sh=2;this.Qc("Pano2VR player "+this.Km()+" - Prefix:"+this.Qa+", "+(this.wk?"CSS 3D available":"CSS 3D not available")+", "+(this.ja?"WebGL available":"WebGL not available"));Gl&&this.O("Pano2VR Debug version!");try{window.AudioContext=window.AudioContext||window.webkitAudioContext,
this.va=new AudioContext}catch(e){this.va=null}this.nc&&(!this.Mn||9>Number(this.Cd))&&(this.va=null);this.nc&&!this.gd&&12<=Number(this.Cd)&&13>Number(this.Cd)&&(this.va=null);this.nc&&this.gd&&13==Number(this.Pf[0])&&(1==Number(this.Pf[1])||2<=Number(this.Pf[1]))&&(this.va=null);this.Zh=this.Wm?10<Number(this.Pf[0])?!0:!1:!0};c.prototype.O=function(a){if(Gl){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a.toString()+"<br />");window.console&&window.console.log(a)}};c.prototype.Us=function(a){if(Gl){var b=
document.getElementById("gg_debug");b&&(b.innerHTML=a.toString()+"<br />");window.console&&window.console.warn(a)}};c.prototype.Qc=function(a){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a+"<br />");window.console&&window.console.log(a)};c.prototype.Un=function(a){this.Te=a};c.prototype.setCrossOrigin=function(a){this.crossOrigin=a};c.prototype.Mr=function(a){this.Of=a};c.prototype.lq=function(){return this.Fh};c.prototype.Kr=function(a){this.de=a};c.prototype.tm=function(){return this.de};
c.prototype.Sp=function(){return this.jh};c.prototype.Np=function(){return this.Gi};c.prototype.Tp=function(){return this.Tf};c.prototype.Pp=function(){return this.C.active};c.prototype.Nr=function(a){this.jh=!!a};c.prototype.Bi=function(){return this.isLoaded};c.prototype.Rp=function(){return!this.isLoaded};c.prototype.vd=function(){return Number(this.D.height)/(2*Math.tan(Math.PI/180*(this.mc()/2)))};c.prototype.Yn=function(a,b){this.isFullscreen&&(a=window.innerWidth,b=window.innerHeight);var e=
a-this.margin.left-this.margin.right,g=b-this.margin.top-this.margin.bottom;if(!(10>e||10>g)){var f=window.devicePixelRatio||1;this.hg&&(f=1);this.N.style.width=e+"px";this.N.style.height=g+"px";this.N.style.left=this.margin.left+"px";this.N.style.top=this.margin.top+"px";if(this.ja)try{this.ab&&(this.ab.style.position="absolute",this.ab.style.display="inline",this.ab.style.width=e+"px",this.ab.style.height=g+"px",this.ab.width=e*f,this.ab.height=g*f),this.S&&(this.Ab.width=e*f,this.Ab.height=g*f,
this.S.viewport(0,0,this.S.drawingBufferWidth,this.S.drawingBufferHeight))}catch(h){alert(h)}this.Ac&&(this.Ac.style.width=a+"px",this.Ac.style.height=b+"px",this.Ac.width=a,this.Ac.height=b);this.Sa&&(this.Sa.style.width=a+"px",this.Sa.style.height=b+"px",this.Ka.style.width=a+"px",this.Ka.style.height=b+"px",this.Ka.width=a,this.Ka.height=b,this.Ka.style.left=this.margin.left+"px",this.Ka.style.top=this.margin.top+"px",this.ua&&this.ua!=this.Sa&&(this.ua.style.width=a+"px",this.ua.style.height=
b+"px"));this.Ua&&(e=this.Ua.pd,e.style.width=a+"px",e.style.height=b+"px",e.width=a,e.height=b,e.style.left=this.margin.left+"px",e.style.top=this.margin.top+"px");this.Mf&&(this.Oa=!0);e=this.N.offsetWidth;g=this.N.offsetHeight;if(this.D.width!=e||this.D.height!=g)this.D.width=e,this.D.height=g;this.Ps();this.ua&&this.ua.ggUpdateSize&&this.ua.ggUpdateSize(a,b);this.M("sizechanged",{w:a,h:b});this.M("playerstatechanged",{})}};c.prototype.mf=function(){this.rl=!0};c.prototype.Jc=function(){this.Yn(this.rd.offsetWidth,
this.rd.offsetHeight)};c.prototype.zq=function(){var a={width:0,height:0};a.width=this.D.width;a.height=this.D.height;return a};c.prototype.Me=function(){var a={x:0,y:0},b=this.N;if(b.offsetParent){do a.x+=b.offsetLeft,a.y+=b.offsetTop,b=b.offsetParent;while(b)}return a};c.prototype.Zr=function(a){this.ma=a};c.prototype.Or=function(a,b,e,g){this.margin.left=a;this.margin.top=b;this.margin.right=e;this.margin.bottom=g;this.ma=this.skinObj;this.mf()};c.prototype.np=function(a){0==a&&(this.L.Od=!1);
1==a&&(this.L.Od=!0);2==a&&(this.L.Od=!this.L.Od);this.M("viewmodechanged",{});this.M("playerstatechanged",{})};c.prototype.xq=function(){return 1==this.L.Od?1:0};c.prototype.Ql=function(a,b){this.I.mode=1==b&&0<this.I.mode?0:Math.round(a);this.update();this.sa&&(this.sa.changePolygonMode(a,b),this.sa.update());this.M("polymodechanged",{})};c.prototype.$n=function(a){var b=this.I.vb.indexOf(a);-1==b?(this.I.vb.push(a),this.I.bc.push(0),this.I.md.push(1)):this.I.md[b]=1;this.update()};c.prototype.Pm=
function(a){var b=this.I.vb.indexOf(a);-1!=b&&(this.I.md[b]=0,this.I.mj.push(a),this.update())};c.prototype.As=function(a){var b=this.I.vb.indexOf(a);-1==b||-1!=b&&0==this.I.md[b]?this.$n(a):this.Pm(a);this.update()};c.prototype.lp=function(a,b,e,g,f){for(var h=0;h<this.X.length;h++){var l=this.X[h];"poly"!=l.type||l.id!=a&&""!=a||(l.fc=b,l.ec=e,l.ic=g,l.hc=f)}""==a&&(this.I.fc=b,this.I.ec=e,this.I.ic=g,this.I.hc=f);this.update()};c.prototype.jp=function(a){this.Ua&&(this.Ua.el=0==a?!0:1==a?!1:!this.Ua.el,
this.update())};c.prototype.nq=function(){return this.I.mode};c.prototype.op=function(){this.M("viewstatechanged",{})};c.prototype.yq=function(){return 0};c.prototype.Zp=function(a){return(a=this.Ui[a])?a.type:"web"};c.prototype.Yp=function(a){return(a=this.Ui[a])?a:{}};c.prototype.gq=function(a,b){var e=[];a||(a=this.Ra);var g=this.ee[a];g&&(a=g);""===a&&0<Object.keys(this.Rc).length&&(a=Object.keys(this.Rc)[0]);this.Rc[a]&&this.Rc[a][b]&&(e.push(this.Rc[a][b].y),e.push(this.Rc[a][b].x));return e};
c.prototype.hq=function(a,b){var e=[];a||(a=this.Ra);var g=this.ee[a];g&&(a=g);""===a&&0<Object.keys(this.Rc).length&&(a=Object.keys(this.Rc)[0]);this.Yf[a]&&this.Yf[a][b]&&(e.push(this.Yf[a][b].x),e.push(this.Yf[a][b].y));return e};c.prototype.zm=function(a){var b=this.ee[a];b&&(a=b);b=this.ym();var e=[];if(""!=a)for(var g=0;g<b.length;g++)this.Rc[a][b[g]]&&e.push(b[g]);return e};c.prototype.Xp=function(a){a=this.zm(a);return 0<a.length?a[0]:""};c.prototype.ym=function(){var a=[],b;for(b in this.Ui)a.push(b);
return a};c.prototype.Rm=function(a,b,e){a=Math.atan2(a+1,e);var g=Math.atan2(b+1,e);b=Math.sin(a);e=Math.sin(g);a=Math.cos(a);g=Math.cos(g);this.mm.init(0,0,-1);this.lm.init(a,0,-b);this.nm.init(-a,0,-b);this.om.init(0,g,-e);this.km.init(0,-g,-e)};c.prototype.Wj=function(a){a=this.Gg(a,this.mm);a=this.Gg(a,this.lm);a=this.Gg(a,this.nm);a=this.Gg(a,this.om);return a=this.Gg(a,this.km)};c.prototype.to=function(a){if(!this.Uc&&this.Nq!=a){this.Nq=a;var b=this.margin.left+this.D.width/2+"px ";b+=this.margin.top+
this.D.height/2+"px ";this.Sa.style[this.Kd]=a+"px";this.Sa.style[this.Kd+"Origin"]=b;this.N.style[this.Kd]=a+"px";this.N.style[this.Kd+"Origin"]=b}};c.prototype.vm=function(){return this.K.we||this.K.Ed||this.ja&&(4!=this.Xa||0!=this.Fc)?!1:!0};c.prototype.Wh=function(){var a=new x.Ha(0,0,-100),b=this.vd();var e=100/this.fov.m;var g=this.v.width/this.v.height;var f=this.D.height*e*g;e*=this.D.height;for(var h=this.vm(),l=0;l<this.X.length;l++){var k=this.X[l];if("point"==k.type){var w=!1;if(2==this.Ya){var r=
(this.pan.m-k.pan)/100/g*f;var y=(this.A.m-k.A)/100*e;Math.abs(r)<this.D.width/2+500&&Math.abs(y)<this.D.height/2+500&&(w=!0)}else a.init(0,0,-100),a.Ga(-k.A*Math.PI/180),a.Ma(k.pan*Math.PI/180),a.Ma(-this.pan.m*Math.PI/180),a.Ga(this.A.m*Math.PI/180),a.ob(this.V.m*Math.PI/180),.01>a.z?(y=-b/a.z,r=a.x*y,y*=a.y,Math.abs(r)<this.D.width/2+5E3&&Math.abs(y)<this.D.height/2+5E3&&(w=!0)):y=r=0;k.$b=r+this.D.width/2;k.Db=y+this.D.height/2;k.visible=w;k.px=k.$b;k.py=k.Db;k.visible=k.visible;if(k.j&&k.j.onUpdatePosition)k.j.onUpdatePosition(this,
k);else k.j&&k.j.__div&&("none"!=k.j.__div.style[this.dd]&&(k.j.__div.style[this.dd]="none"),w&&h?(k.j.ggUse3d?(this.Uc||this.to(b),2==this.Ya?(k.j.__div.style[this.Wa]="scale("+(100/this.fov.m*500/k.j.gg3dDistance).toFixed(10)+")",k.j.__div.style.left=this.margin.left+r+this.D.width/2+"px",k.j.__div.style.top=this.margin.top+y+this.D.height/2+"px"):(k.j.__div.style.width="1px",k.j.__div.style.height="1px",r="",this.Uc&&(r+="translate3d(0px,0px,"+(-1E3-200*l)+"px) perspective("+b+"px) "),r+="translate3d(0px,0px,"+
b+"px) ",r+="rotateZ("+this.V.m.toFixed(10)+"deg) ",r+="rotateX("+this.A.m.toFixed(10)+"deg) ",r+="rotateY("+(-this.pan.m).toFixed(10)+"deg) ",r+="rotateY("+k.pan.toFixed(10)+"deg) ",r+="rotateX("+(-k.A).toFixed(10)+"deg) ",r+="translate3d(0px,0px,"+(-1*k.j.gg3dDistance).toFixed(10)+"px) ",k.j.__div.style[this.Wa+"Origin"]="0% 0%",k.j.__div.style[this.Wa]=r,k.j.__div.style.left=this.margin.left+this.D.width/2+"px",k.j.__div.style.top=this.margin.top+this.D.height/2+"px")):(k.j.__div.style.left=this.margin.left+
r+this.D.width/2+"px",k.j.__div.style.top=this.margin.top+y+this.D.height/2+"px"),k.j.__div.ggVisible&&(""==k.j.__div.style.opacity||0<k.j.__div.style.opacity)&&(k.j.__div.style.visibility="visible")):(k.j.ggUse3d&&(k.j.__div.style[this.Wa]=""),k.j.__div.style.left="-1000px",k.j.__div.style.top="-1000px",k.j.__div.style.visibility="hidden"))}if("poly"==k.type){var z=[];if(2==this.Ya)for(k.oe=[],w=0;w<k.vertices.length;w++)y=k.vertices[w],r=(this.pan.m-y.pan)/100/g*f,y=(this.A.m-y.A)/100*e,r+=this.margin.left+
this.D.width/2,y+=this.margin.top+this.D.height/2,k.oe.push({$b:r,Db:y});else{for(w=0;w<k.vertices.length;w++)y=k.vertices[w],a.init(0,0,-100),a.Ga(-y.A*Math.PI/180),a.Ma(y.pan*Math.PI/180),a.Ma(-this.pan.m*Math.PI/180),a.Ga(this.A.m*Math.PI/180),a.ob(this.V.m*Math.PI/180),z.push(a.clone());z=this.Wj(z);if(0<z.length)for(w=0;w<z.length;w++)a=z[w],.1>a.z?(y=-b/a.z,r=this.D.width/2+a.x*y,y=this.D.height/2+a.y*y):y=r=0,a.$b=r,a.Db=y;k.oe=z}}}};c.prototype.Jp=function(){for(var a=[],b=0;b<this.X.length;b++){var e=
this.X[b];"point"==e.type&&e.j&&e.j.__div&&a.push(e.j.__div)}return a};c.prototype.ga=function(a,b){a=Number(a);isNaN(b)&&(b=0);0>b&&(b=0);1<b&&(b=1);return"rgba("+(a>>16&255)+","+(a>>8&255)+","+(a&255)+","+b+")"};c.prototype.nr=function(){var a;if(this.Ka&&(this.I.mh!=this.I.mode&&(this.I.mh=this.I.mode,this.Ka.style.visibility=0<this.I.mode?"inherit":"hidden"),0<=this.I.mode||0<this.I.vb.length)){this.na||(this.na=this.Ka.getContext("2d"));if(this.na.width!=this.D.width||this.na.height!=this.D.height)this.na.width=
this.D.width,this.na.height=this.D.height;this.na.clear?this.na.clear():this.na.clearRect(0,0,this.Ka.width,this.Ka.height);var b=1;0>=this.I.mode&&(b=0);3==this.I.mode&&(b=this.I.wa);for(a=0;a<this.X.length;a++){var e=this.X[a];var g=b;if("poly"==e.type){var f=e.oe;2==this.I.mode&&(g=e.wa);var h=this.I.vb.indexOf(e.id);-1!=h&&(g=this.I.bc[h]);this.na.fillStyle=this.ga(e.fc,e.ec*g);this.na.strokeStyle=this.ga(e.ic,e.hc*g);if(0<f.length){this.na.beginPath();for(e=0;e<f.length;e++)g=f[e],0==e?this.na.moveTo(g.$b,
g.Db):this.na.lineTo(g.$b,g.Db);this.na.closePath();this.na.stroke();this.na.fill()}}}}};c.prototype.Qm=function(a,b,e){var g,f=!1;var h=0;for(g=a.length-1;h<a.length;g=h++){var l=a[h];g=a[g];l.Db>e!=g.Db>e&&b<(g.$b-l.$b)*(e-l.Db)/(g.Db-l.Db)+l.$b&&(f=!f)}return f};c.prototype.ni=function(a,b){var e=-1;if((0<=this.I.mode||0<this.I.vb.length)&&this.Jq())for(var g=0;g<this.X.length;g++){var f=this.X[g];"poly"==f.type&&f.oe&&0<f.oe.length&&(-1!=this.I.mode||-1!=this.I.vb.indexOf(f.id))&&this.Qm(f.oe,
a,b)&&(e=g,f.$b=a,f.Db=b)}return 0<=e?this.X[e]:!1};c.prototype.Jq=function(){return 4==this.Ta()&&0==this.Fc};c.prototype.mc=function(){var a=0,b=this.Ta(),e=this.D;switch(this.fov.mode){case 0:a=this.fov.m/2;break;case 1:a=4==b?180*Math.atan(e.height/e.width*Math.tan(this.fov.m/2*Math.PI/180))/Math.PI:e.height/e.width*this.fov.m/2;break;case 2:a=Math.sqrt(e.width*e.width+e.height*e.height);a=4==b?180*Math.atan(e.height/a*Math.tan(this.fov.m/2*Math.PI/180))/Math.PI:e.height/a*this.fov.m/2;break;
case 3:a=4*e.height/3>e.width?this.fov.m/2:4==b?180*Math.atan(4*e.height/(3*e.width)*Math.tan(this.fov.m/2*Math.PI/180))/Math.PI:4*e.height/(3*e.width)*(this.fov.m/2)}return 2*a};c.prototype.Mp=function(a,b){a||(a=this.mc());b||(b=this.Ta());return 4==b?180*Math.atan(this.aspect()*Math.tan(a/2*Math.PI/180))/Math.PI:a*this.aspect()};c.prototype.aspect=function(){return this.D.width/this.D.height};c.prototype.Nl=function(a){var b=this.fov.m;a/=2;var e=this.Ta();switch(this.fov.mode){case 0:b=2*a;break;
case 1:a=4==e?180*Math.atan(this.D.width/this.D.height*Math.tan(a*Math.PI/180))/Math.PI:this.D.width/this.D.height*a;b=2*a;break;case 2:b=Math.sqrt(this.D.width*this.D.width+this.D.height*this.D.height);a=4==e?180*Math.atan(b/this.D.height*Math.tan(a*Math.PI/180))/Math.PI:b/this.D.height*a;b=2*a;break;case 3:4*this.D.height/3>this.D.width?b=2*a:(b=3*this.D.width/(4*this.D.height),a=4==e?180*Math.atan(b*Math.tan(a*Math.PI/180))/Math.PI:b*a,b=2*a)}return b};c.prototype.kj=function(a){this.fov.m=this.Nl(a)};
c.prototype.Fg=function(){if(!this.xe){var a=this.yn;a.pan=this.pan.m;a.A=this.A.m;a.fov=this.fov.m;this.yf(a);this.yf(a);this.yf(a);this.pan.m=a.pan;this.A.m=a.A;this.fov.m=a.fov}};c.prototype.yf=function(a){var b=this.D.width/this.D.height;if(2==this.Ya){if(0<this.fov.yh){var e=this.Ic;this.v.levels&&0<this.v.levels.length&&(e=this.v.levels[0].height);this.fov.min=100*this.D.height/(e*this.fov.yh)}var g=a.fov/2;e=g*b;var f=this.v.width/this.v.height*50;b=this.L.Nn?2*Math.min(50,f/b):2*Math.max(50,
f/b);a.fov<this.fov.min&&(a.fov=this.fov.min);a.fov>b&&(a.fov=b);50<g?a.A=0:(50<a.A+g&&(a.A=50-g),-50>a.A-g&&(a.A=-50+g));e>f?a.pan=0:(a.pan+e>f&&(a.pan=f-e,this.C.active&&(this.C.speed=-this.C.speed,this.pan.d=0)),a.pan-e<-f&&(a.pan=-f+e,this.C.active&&(this.C.speed=-this.C.speed,this.pan.d=0)))}else{0<this.fov.yh&&(e=this.Ic,this.v.levels&&0<this.v.levels.length&&(e=this.v.levels[0].height),this.fov.min=360*Math.atan2(this.D.height/2,e/2*this.fov.yh)/Math.PI);a.fov<this.fov.min&&(a.fov=this.fov.min);
f=this.fov.max;var h=179;g=this.mc()/2;e=b*g;4==this.Ta()?e=180*Math.atan(b*Math.tan(g*Math.PI/180))/Math.PI:9==this.Ta()?(f=this.fov.Ok,h=355):12==this.Ta()&&(f=this.fov.Nk,h=360);this.ja||(f=Math.max(160,f));a.fov>f&&(a.fov=f);12==this.Ta()&&(2*e>h&&(a.fov=h/b),g=this.mc()/2,2*g>h&&(a.fov=h),g=this.mc()/2,e=b*g);2*g>this.A.max-this.A.min&&180>this.A.max-this.A.min&&(g=(this.A.max-this.A.min)/2,a.fov=this.Nl(2*g));90>this.A.max?a.A+g>this.A.max&&(a.A=this.A.max-g):a.A>this.A.max&&(a.A=this.A.max);
-90<this.A.min?a.A-g<this.A.min&&(a.A=this.A.min+g):a.A<this.A.min&&(a.A=this.A.min);b=this.pan.max-this.pan.min;if(359.99>b){f=90;h=Math.tan(g*Math.PI/180);var l=Math.tan((Math.abs(a.A)+g)*Math.PI/180);l=Math.sqrt(l*l+1)/Math.sqrt(h*h+1);g=180*Math.atan(l*Math.tan(e*Math.PI/180))/Math.PI;2*g>b&&(l=Math.tan(b*Math.PI/360)/Math.tan(e*Math.PI/180),b=l*Math.sqrt(h*h+1),l=Math.sqrt(b*b-1),f=180/Math.PI*Math.atan(l));a.pan+g>this.pan.max&&(a.pan=this.pan.max-g,this.C.active&&(this.C.speed=-this.C.speed,
this.pan.d=0));a.pan-g<this.pan.min&&(a.pan=this.pan.min+g,this.C.active&&(this.C.speed=-this.C.speed,this.pan.d=0));a.A+e>f&&(a.A=f-e);a.A-e<-f&&(a.A=-f+e)}}};c.prototype.update=function(a){void 0===a&&(a=0);this.Oa=!0;a&&(this.Mg=Math.max(1*a,this.Mg))};c.prototype.xm=function(){return this.sa?!!this.sa.isTileLoading:0<this.cc||0<this.Hc};c.prototype.Xh=function(){var a=Date.now();if(this.Rb){if(this.sa)if(this.Hs(),2===this.Ya)this.Fg(),this.Wh();else if(0===this.Ya){var b=this.vd();this.Rm(this.D.width/
2,this.D.height/2,b);this.Wh()}}else 2===this.Ya?(this.Wh(),this.ja?(this.Ba.pl(),this.Ba.tn()):this.pl()):0===this.Ya&&(!this.ja||4==this.Xa&&0==this.Fc?(b=this.vd(),this.Rm(this.D.width/2,this.D.height/2,b),this.Wh(),this.$h?this.Ba.Os():this.zo&&this.yo(),this.uo(),this.ja?(this.F.Ad?14==this.F.format?this.Ba.Ns():this.Ba.Go():0<this.v.levels.length?this.Ba.Vs():this.Ba.Xs(),this.Ba.tn()):(this.nd?0<this.v.levels.length?this.Ls():this.Ks():this.Yh&&this.Gs(),this.nr()),this.Ua&&this.Ua.mr()):(this.Ba.Go(),
this.Wh(),this.Fq()));b=Date.now();50<b-a?(this.O("Time between frames: "+(b-a)),this.hg||(2<this.hl?(this.hg=!0,this.O("disabling HighDPI rendering"),this.Jc()):this.hl++)):this.hl=0;this.Mf&&this.v.Gn++};c.prototype.Ks=function(){var a=!1;if(this.D.width!=this.N.offsetWidth||this.D.height!=this.N.offsetHeight)this.D.width=this.N.offsetWidth,this.D.height=this.N.offsetHeight,this.N.style[this.Wa+"OriginX"]=this.D.width/2+"px",this.N.style[this.Wa+"OriginY"]=this.D.height/2+"px",a=!0;var b=Math.round(this.vd());
this.nh==b&&!a||this.Uc||(this.nh=b,this.N.style[this.Kd]=b+"px");this.cube.rp(this.pan.m,this.A.m,this.V.m,this.Pa);for(a=0;6>a;a++){var e;if(e=this.cube.faces[a]){var g="";this.Uc?(g+="translate3d("+this.D.width/2+"px,"+this.D.height/2+"px,0px) ",g+="perspective("+b+"px) ",g+="translate3d(0px,0px,"+b+"px) "):g+="translate3d("+this.D.width/2+"px,"+this.D.height/2+"px,"+b+"px) ";g+="rotateZ("+Number(this.V.m).toFixed(10)+"deg) ";g+="rotateX("+Number(this.A.m).toFixed(10)+"deg) ";g+="rotateY("+Number(-this.pan.m).toFixed(10)+
"deg) ";e.Lm&&(g+=e.Lm,e.rb||(g="translate3d(-10px,-10px,0px) scale(0.001,0.001)"),e.W.style[this.Wa]=g)}}};c.prototype.Gs=function(){this.Fg();var a;this.Ac&&(a=this.Ac.getContext("2d"));if(this.D.width!==this.N.offsetWidth||this.D.height!==this.N.offsetHeight)this.D.width=this.N.offsetWidth,this.D.height=this.N.offsetHeight;if(a){var b=a.canvas.width/2,e=a.canvas.height/2,g=a.createRadialGradient(b,e,5,b,e,Math.max(b,e));g.addColorStop(0,"#333");g.addColorStop(1,"#fff");a.rect(0,0,a.canvas.width,
a.canvas.height);a.fillStyle=g;a.fill();a.fillStyle="#f00";a.font="20px Helvetica";a.textAlign="center";a.fillText("Pan: "+this.pan.m.toFixed(1),b,e-60);a.fillText("Tilt: "+this.A.m.toFixed(1),b,e-30);a.fillText("Fov: "+this.fov.m.toFixed(1),b,e+0);a.fillText("Node: "+this.nk(),b,e+30);a.fillText("Title: "+this.tg.title,b,e+60)}};c.prototype.Hs=function(){this.Fg();if(this.D.width!==this.N.offsetWidth||this.D.height!==this.N.offsetHeight)this.D.width=this.N.offsetWidth,this.D.height=this.N.offsetHeight;
this.sa&&this.sa.setPan&&(this.sa.setPan(this.pan.m),this.sa.setTilt(this.A.m),this.sa.setFov(this.fov.m))};c.prototype.pl=function(){this.Ka.style.visibility="inherit";this.na||(this.na=this.Ka.getContext("2d"));if(this.na.width!=this.D.width||this.na.height!=this.D.height)this.na.width=this.D.width,this.na.height=this.D.height;this.na.clear?this.na.clear():this.na.clearRect(0,0,this.Ka.width,this.Ka.height);this.Hc=0;var a=100/this.fov.m;var b=this.v.width/this.v.height;var e=this.D.height*a*b;
a*=this.D.height;var g=(this.pan.m/100/b-.5)*e+this.D.width/2;for(var f=(this.A.m/100-.5)*a+this.D.height/2,h,l,k,w,r=0;this.v.levels.length>=r+2&&this.v.levels[r+1].width>e;)r++;var y;var z=[];for(y=this.v.levels.length-1;y>=r;){b=this.v.levels[y];if(b.cache){var ha={mb:0,Kb:0};ha.Mb=b.U-1;ha.Nb=b.fa-1}else{ha={};var ua=-f/a*(b.height/this.v.P);h=(-g+this.D.width)/e*(b.width/this.v.P);l=(-f+this.D.height)/a*(b.height/this.v.P);ha.mb=Math.min(Math.max(0,Math.floor(-g/e*(b.width/this.v.P))),b.U-1);
ha.Kb=Math.min(Math.max(0,Math.floor(ua)),b.fa-1);ha.Mb=Math.min(Math.max(0,Math.floor(h)),b.U-1);ha.Nb=Math.min(Math.max(0,Math.floor(l)),b.fa-1)}z[y]=ha;var id=!0;for(l=ha.Kb;l<=ha.Nb;l++)for(h=ha.mb;h<=ha.Mb;h++)w=h+l*b.U,ua=b.ba[w],ua||(ua=new x.ae,b.ba[w]=ua),this.cc<this.Sh?ua.v||(this.zk++,ua.v=new Image,ua.v.onload=this.xs(),ua.v.onerror=this.vj(ua),ua.v.onabort=this.vj(ua),ua.v.crossOrigin=this.crossOrigin,ua.v.setAttribute("src",this.ue(0,y,h,l)),b.cache&&this.kc.push(ua.v),this.cc++,this.Oa=
!0):this.Hc++,ua.v&&ua.v.complete||(id=!1),ua.visible=!0;ha.Hk=id;y--}for(y=this.v.levels.length-1;y>=r;){b=this.v.levels[y];if(z[y]&&0<=z[y].mb)for(ha=z[y],l=ha.Kb;l<=ha.Nb;l++)for(h=ha.mb;h<=ha.Mb;h++)w=h+l*b.U,(ua=b.ba[w])||(ua=b.ba[w]=new x.ae),ua.v&&ua.v.complete&&(w=g+(-this.v.Ea+this.v.P*h)*e/b.width,this.na.drawImage(ua.v,w,f+(-this.v.Ea+this.v.P*l)*a/b.height,ua.v.width*e/b.width,ua.v.height*a/b.height)),ua.visible=!0;y--}for(e=0;e<this.v.levels.length;e++)if(b=this.v.levels[e],!b.cache)for(k in b.ba)b.ba.hasOwnProperty(k)&&
(ua=b.ba[k],ua.visible||(ua.v=null,delete b.ba[k]));if(0<=this.I.mode||0<this.I.vb.length)for(e=1,0>=this.I.mode&&(e=0),3==this.I.mode&&(e=this.I.wa),k=0;k<this.X.length;k++)if(b=this.X[k],g=e,"poly"==b.type&&(a=b.oe,2==this.I.mode&&(g=b.wa),f=this.I.vb.indexOf(b.id),-1!=f&&(g=this.I.bc[f]),0<a.length)){this.na.fillStyle=this.ga(b.fc,b.ec*g);this.na.strokeStyle=this.ga(b.ic,b.hc*g);this.na.beginPath();for(b=0;b<a.length;b++)g=a[b],0==b?this.na.moveTo(g.$b,g.Db):this.na.lineTo(g.$b,g.Db);this.na.closePath();
this.na.stroke();this.na.fill()}this.td=!1};c.prototype.ws=function(a){var b=this;return function(){b.update();b.td=!0;a.loaded=!0;a.v&&!a.W&&b.N.appendChild(a.v);b.cc&&b.cc--;a.v&&a.cb&&(a.cb.drawImage(a.v,0,0),a.v=null)}};c.prototype.xs=function(){var a=this;return function(){a.Oa=!0;a.td=!0;a.cc&&a.cc--}};c.prototype.vj=function(a){var b=this;return function(){b.Oa=!0;b.td=!0;b.cc&&b.cc--;a.v=null}};c.prototype.Jm=function(a,b,e){e.mb=a.width/this.v.P*b.Sg;e.Kb=a.height/this.v.P*b.Tg;e.Mb=a.width/
this.v.P*b.vh;e.Nb=a.height/this.v.P*b.wh;e.mb=Math.min(Math.max(0,Math.floor(e.mb)),a.U-1);e.Kb=Math.min(Math.max(0,Math.floor(e.Kb)),a.fa-1);e.Mb=Math.min(Math.max(0,Math.floor(e.Mb)),a.U-1);e.Nb=Math.min(Math.max(0,Math.floor(e.Nb)),a.fa-1)};c.prototype.Sr=function(a){a=Math.round(a);this.Uc=0<(a&1);this.gg=0<(a&2);this.Cj=0<(a&4);this.hg=0<(a&8);4096<=a&&(this.nd=0<(a&4096),this.ja=0<(a&8192),this.Yh=0<(a&32768))};c.prototype.qq=function(){var a=0;this.Uc&&(a|=1);this.gg&&(a|=2);this.Cj&&(a|=
4);this.nd&&(a|=4096);this.ja&&(a|=8192);this.Yh&&(a|=32768);return a};c.prototype.wo=function(){if(!(6>this.cube.faces.length))for(var a=0;6>a;a++){var b=this.cube.faces[a];var e=[];e.push(new x.Ha(-1,-1,-1,0,0));e.push(new x.Ha(1,-1,-1,1,0));e.push(new x.Ha(1,1,-1,1,1));e.push(new x.Ha(-1,1,-1,0,1));for(var g=0;4>g;g++)4>a?e[g].Ma(-Math.PI/2*a):e[g].Ga(Math.PI/2*(4==a?-1:1)),this.Pa&&(e[g].ob(this.Pa.V*Math.PI/180),e[g].Ga(-this.Pa.pitch*Math.PI/180)),e[g].$e(-this.pan.m),e[g].Vd(this.A.m),e[g].af(this.V.m);
e=this.Wj(e);b.rb=0<e.length;if(b.rb){b=b.cg;b.Sg=e[0].Fd;b.vh=e[0].Fd;b.Tg=e[0].dc;b.wh=e[0].dc;for(g=1;g<e.length;g++)b.Sg=Math.min(b.Sg,e[g].Fd),b.vh=Math.max(b.vh,e[g].Fd),b.Tg=Math.min(b.Tg,e[g].dc),b.wh=Math.max(b.wh,e[g].dc);b.ug=b.vh-b.Sg;b.ci=b.wh-b.Tg;b.scale=Math.max(b.ug,b.ci)}else b.cg.ug=-1,b.cg.ci=-1}};c.prototype.Mk=function(){for(var a=0;a<this.v.levels.length;a++){var b=this.v.levels[a],e;for(e in b.ba)b.ba.hasOwnProperty(e)&&(b.ba[e].visible=!1)}};c.prototype.jk=function(){var a=
0,b=Math.tan(Math.min(this.mc(),175)*Math.PI/360),e=this.D.height/(2*b);e*=1+this.D.width/this.D.height*b/2;for(e*=Math.pow(2,1<this.devicePixelRatio?this.v.Jk:this.v.Ik);this.v.levels.length>=a+2&&!this.v.levels[a+1].Xe&&this.v.levels[a+1].width>e;)a++;return a};c.prototype.Ls=function(){var a=!1,b,e,g;if(this.D.width!==this.N.offsetWidth||this.D.height!==this.N.offsetHeight)this.D.width=this.N.offsetWidth,this.D.height=this.N.offsetHeight,this.N.style[this.Wa+"OriginX"]=this.D.width/2+"px",this.N.style[this.Wa+
"OriginY"]=this.D.height/2+"px",a=!0;var f=Math.round(this.vd());if(this.nh!=f||a)this.nh=f,this.Uc||(this.N.style[this.Kd]=f+"px",this.N.style[this.Kd+"Origin"]="50% 50%");this.Hc=0;if(0<this.v.levels.length){this.wo();this.Mk();var h="";for(b=0;6>b;b++){var l=this.cube.faces[b];l.rb&&(h=h+b+",")}h=this.jk();var k;for(k=this.v.levels.length-1;k>=h;){a=this.v.levels[k];var w=1;k==this.v.levels.length-1&&0==this.v.Ea&&(w=this.v.P/(this.v.P-2));for(b=0;6>b;b++){l=this.cube.faces[b];var r=l.cg;if(l.rb&&
0<r.ug&&0<r.ci&&0<r.scale||a.cache){l.Oa=!1;var y={};a.cache?(y.mb=0,y.Kb=0,y.Mb=a.U-1,y.Nb=a.fa-1):this.Jm(a,r,y);for(g=y.Kb;g<=y.Nb;g++)for(e=y.mb;e<=y.Mb;e++){var z=e+g*a.U+b*a.U*a.fa;(r=a.ba[z])||(r=a.ba[z]=new x.ae);if(!r.W&&this.cc<this.Sh){if(0<this.yj.length){r.W=this.yj.shift();for(z=this.N.firstChild;z&&z.ie&&(-1==z.ie||z.ie>=k);)z=z.nextSibling;this.N.insertBefore(r.W,z);r.cb=r.W.getContext("2d")}else if(this.no<this.Te){this.no++;r.W=document.createElement("canvas");r.W.width=this.v.P+
2*this.v.Ea;r.W.height=this.v.P+2*this.v.Ea;r.cb=r.W.getContext("2d");r.W.style[this.Wa+"Origin"]="0% 0%";r.W.style.overflow="hidden";r.W.style.position="absolute";for(z=this.N.firstChild;z&&z.ie&&(-1==z.ie||z.ie>=k);)z=z.nextSibling;this.N.insertBefore(r.W,z)}r.W&&(this.zk++,r.v=new Image,r.v.crossOrigin=this.crossOrigin,r.v.style[this.Wa+"Origin"]="0% 0%",r.v.style.position="absolute",r.v.style.overflow="hidden",r.W.ie=k,r.v.onload=this.ws(r),r.v.onerror=this.vj(r),r.v.onabort=this.vj(r),r.v.setAttribute("src",
this.ue(b,k,e,g)),a.cache&&this.kc.push(r.v),this.cc++,this.Oa=!0)}else this.Hc++;if(r.W){z="";this.Uc?(z+="translate3d("+this.D.width/2+"px,"+this.D.height/2+"px,0px) ",z+=" perspective("+f+"px) ",z+="translate3d(0px,0px,"+f+"px) "):z+="translate3d("+this.D.width/2+"px,"+this.D.height/2+"px,"+f+"px) ";z+="rotateZ("+Number(this.V.m).toFixed(10)+"deg) ";z+="rotateX("+Number(this.A.m).toFixed(10)+"deg) ";z+="rotateY("+Number(-this.pan.m).toFixed(10)+"deg) ";this.Pa&&(z+="rotateX("+Number(-this.Pa.pitch).toFixed(10)+
"deg) ",z+="rotateZ("+Number(this.Pa.V).toFixed(10)+"deg) ");z=4>b?z+("rotateY("+-90*b+"deg) "):z+("rotateX("+(4==b?-90:90)+"deg) ");if(this.gg){var ha=this.v.P/a.width*(2*k+1)*(this.Cg/this.v.P);ha=this.nc?2/Math.tan(this.fov.m*Math.PI/360)*ha:2*ha;z+=" scale("+ha*w*w+")"}else ha=1/(w*w);z+=" translate3d("+(1/w*e*this.v.P-this.v.Ea-a.width/2)+"px,";z+=1/w*g*this.v.P-this.v.Ea-a.width/2+"px,";z+=-a.width*ha/2+"px)";l.rb&&(r.visible=!0,r.W?r.W.style[this.Wa]=z:r.v&&(r.v.style[this.Wa]=z))}}}}k--}for(f=
0;f<this.v.levels.length;f++){a=this.v.levels[f];for(var ua in a.ba)a.ba.hasOwnProperty(ua)&&(r=a.ba[ua],!r.visible&&r.W&&(a.cache?r.W?r.W.style[this.Wa]="translate3d(-10px,-10px,0px) scale(0.001,0.001)":r.v&&(r.v.style[this.Wa]=""):(r.cb&&r.cb.clearRect(0,0,r.cb.canvas.width,r.cb.canvas.height),this.yj.push(r.W),r.W?(h="translate3d(-10px,-10px,0px) scale(0.001,0.001)",r.W.style[this.Wa]=h,r.W.ie=-1):r.loaded&&this.N.removeChild(r.v),r.W=null,r.v=null,r.cb=null,delete a.ba[ua])))}this.td=!1}};c.prototype.uo=
function(){var a=Math.round(this.vd());this.Uc||this.to(a);for(var b=0;b<this.gb.length;b++){var e=this.gb[b];e.xo(a);e.j.hidden=!1}};c.prototype.yo=function(){for(var a=Math.round(this.vd()),b=0;b<this.T.length;b++){var e=this.T[b];e.kd||(e.xo(a),e.j.hidden=!1)}};c.prototype.Fq=function(){for(var a=0;a<this.gb.length;a++){var b=this.gb[a];b.lg(!1)}for(a=0;a<this.T.length;a++)b=this.T[a],b.kd||b.lg(!1)};c.prototype.Ps=function(){for(var a=0;a<this.T.length;a++){var b=this.T[a];b.kd||b.mf()}for(a=
0;a<this.gb.length;a++)b=this.gb[a],b.mf()};c.prototype.Oc=function(a){this.he=!1;try{this.ab=a?a:document.createElement("canvas");var b=this.rd.offsetWidth-this.margin.left-this.margin.right,e=this.rd.offsetHeight-this.margin.top-this.margin.bottom;if(100>b||100>e)e=b=100;var g=window.devicePixelRatio||1;this.hg&&(g=1);this.N.style.width=b+"px";this.N.style.height=e+"px";this.ab.style.width=b+"px";this.ab.style.height=e+"px";this.ab.width=b*g;this.ab.height=e*g;this.ab.style.display="none";this.ab.style.touchAction=
"none";this.N.insertBefore(this.ab,this.N.firstChild);var f=this.Fo;f.stencil=!0;f.depth=!0;f.powerPreference="high-performance";f.alpha=this.nc?!0:!1;this.gd&&10<=this.Pf[0]&&(f.antialias=!1,f.alpha=!1);a={};a.flags=f;a.canvas=this.ab;this.M("beforewebglcontext",a);this.S=this.ab.getContext("webgl",f);this.S||(this.S=this.ab.getContext("experimental-webgl",f));if(this.S){var h=this.S;this.Ab.width=b*g;this.Ab.height=e*g;h.clearColor(0,0,0,0);h.enable(this.S.DEPTH_TEST);h.viewport(0,0,500,500);h.clear(h.COLOR_BUFFER_BIT|
h.DEPTH_BUFFER_BIT);4096<=h.getParameter(h.MAX_TEXTURE_SIZE)&&!this.jh&&(this.Te=1<g?4*this.Te:2*this.Te);this.O("Max tile cnt: "+this.Te);this.Ba.gh();this.Ba.Ji();this.Ba.Sm(this.hf);this.Ba.Tm();this.K&&(this.K.gh(),this.K.Oc());this.Ua&&(this.Ua.gh(),this.Ua.Oc())}}catch(l){this.O(l)}this.S?(this.ja=!0,this.M("webglready",{gl:this.S})):alert("Could not initialise WebGL!")};c.prototype.fb=function(a){return a?"{"==a.charAt(0)||"/"==a.charAt(0)||0<a.indexOf("://")||0==a.indexOf("javascript:")?a:
this.de+a:this.de};c.prototype.Qb=function(a,b,e){var g=(new RegExp("%0*"+b,"i")).exec(a.toString());if(g){g=g.toString();var f=e.toString();g.charAt(g.length-1)!=b&&(f=(1+e).toString());if(!isNaN(parseFloat(e)))for(;f.length<g.length-1;)f="0"+f;a=a.replace(g,f)}return a};c.prototype.ue=function(a,b,e,g,f){var h=this.v.Gk-1-b,l=this.v.Kk,k="x";switch(a){case 0:k="f";break;case 1:k="r";break;case 2:k="b";break;case 3:k="l";break;case 4:k="u";break;case 5:k="d";break;case "vr":k="vr"}f&&(a+="l",k+=
"l");for(f=0;3>f;f++)l=this.Qb(l,"c",a),l=this.Qb(l,"s",k),l=this.Qb(l,"r",b),l=this.Qb(l,"l",h),l=this.Qb(l,"x",e),l=this.Qb(l,"y",g),l=this.Qb(l,"v",g),l=this.Qb(l,"h",e);return this.fb(l)};c.prototype.Yg=function(){return this.pan.m};c.prototype.kq=function(){return this.G.pan};c.prototype.Cm=function(){for(var a=this.pan.m;-180>a;)a+=360;for(;180<a;)a-=360;return a};c.prototype.Le=function(){for(var a=this.pan.m-this.pan.Qk;-180>a;)a+=360;for(;180<a;)a-=360;return a};c.prototype.cf=function(a){this.Fa();
isNaN(a)||(this.pan.m=Number(a));this.update()};c.prototype.cl=function(a){this.Fa();isNaN(a)||(this.pan.m=Number(a)+this.pan.Qk);this.update()};c.prototype.Pl=function(a,b){isNaN(a)||(this.cf(this.Yg()+a),b&&(this.pan.d=a))};c.prototype.kp=function(a,b){this.Pl(a*this.zi(),b)};c.prototype.Di=function(){return this.A.m};c.prototype.rq=function(){return this.G.A};c.prototype.df=function(a){this.Fa();isNaN(a)||(this.A.m=Number(a));this.update()};c.prototype.Rl=function(a,b){this.df(this.Di()+a);b&&
(this.A.d=a)};c.prototype.mp=function(a,b){this.Rl(a*this.zi(),b)};c.prototype.ij=function(a){this.Fa();isNaN(a)||(this.V.m=Number(a));this.update()};c.prototype.Gm=function(){return this.V.m};c.prototype.pk=function(){return this.fov.m};c.prototype.Kp=function(){return this.G.Zd};c.prototype.bf=function(a){this.Fa();switch(this.Ta()){case 4:var b=170;break;case 12:b=360;break;case 9:b=355;break;default:b=170}2==this.Ya&&(b=9999999999);!isNaN(a)&&0<a&&a<b&&(b=this.fov.m,this.fov.m=1*a,b!=this.fov.m&&
this.update())};c.prototype.Ol=function(a,b){this.bf(this.pk()+a);b&&(this.fov.d=a)};c.prototype.Tj=function(a,b){if(!isNaN(a)){var e=a/90*Math.cos(Math.min(this.fov.m,90)*Math.PI/360);e=this.fov.m*Math.exp(e);this.bf(e);b&&(this.fov.d=a)}};c.prototype.Qr=function(a,b){this.Fa();isNaN(a)||(this.pan.m=a);isNaN(b)||(this.A.m=b);this.update()};c.prototype.Rr=function(a,b,e){this.Fa();!isNaN(a)&&1E7>a&&-1E7<a&&(this.pan.m=a);!isNaN(b)&&1E7>b&&-1E7<b&&(this.A.m=b);!isNaN(e)&&1E7>e&&-1E7<e&&(this.V.m=e);
this.update()};c.prototype.hj=function(a,b,e){this.Fa();isNaN(a)||(this.pan.m=a);isNaN(b)||(this.A.m=b);isNaN(e)||this.bf(e);this.update()};c.prototype.Lr=function(){this.hj(this.pan.eb,this.A.eb,this.fov.eb)};c.prototype.setLocked=function(a){this.Sn(a);this.Tn(a);this.Rn(a)};c.prototype.Sn=function(a){this.L.oc=a};c.prototype.Rn=function(a){this.L.uh=a};c.prototype.Wp=function(){return this.L.uh};c.prototype.Tn=function(a){this.L.ke=a};c.prototype.fj=function(a){this.tc=a};c.prototype.Lp=function(){return this.xk()?
!0:this.tk};c.prototype.Vn=function(a,b){void 0===b&&(b=!0);this.Ao=b;this.nf==!a&&(a&&this.xk()?this.Hn():((this.nf=!!a)?this.nb.Kh=!0:this.V.m=0,this.M("gyrochanged",{}),this.M("playerstatechanged",{})))};c.prototype.xk=function(){return window.hasOwnProperty("DeviceOrientationEvent")&&DeviceOrientationEvent.hasOwnProperty("requestPermission")&&"function"===typeof DeviceOrientationEvent.requestPermission?!0:!1};c.prototype.Hn=function(){var a=this;if(this.xk())try{DeviceOrientationEvent.requestPermission().then(function(b){"granted"===
b&&(a.nb.Kh=!0,a.nf=!0,a.M("gyrochanged",{}),a.M("playerstatechanged",{}))})["catch"](console.error)}catch(b){console.log(b)}};c.prototype.sq=function(){return this.nf};c.prototype.jq=function(){return this.Qe?5:this.gd?4:this.an?1:this.Ym?2:this.Xm?3:0};c.prototype.Ip=function(){return this.Ck?5:this.Rf?4:this.Sf?2:this.nc?3:this.Bk?1:0};c.prototype.moveTo=function(a,b,e,g,f,h){this.Fa();if("_blank"!==a&&""!==a){this.G.active=!0;this.G.aborted=!1;this.G.sl=!1;var l=a.toString().split("/");1<l.length&&
(a=Number(l[0]),g=Number(b),b=Number(l[1]),2<l.length&&(e=Number(l[2])));this.G.pan=isNaN(a)?this.pan.m:Number(a);this.G.A=isNaN(b)?this.A.m:Number(b);this.G.fov=!isNaN(e)&&0<e&&180>e?Number(e):this.fov.m;this.G.speed=!isNaN(g)&&0<g?Number(g):1;this.G.V=isNaN(f)?this.V.m:Number(f);void 0!==h?!a||4!=h&&12!=h&&9!=h||(this.G.Pb=h):this.G.Pb=this.Xa}};c.prototype.Wi=function(a){this.Fa();var b=0,e=0,g=70,f=4,h=0,l=1;a.hasOwnProperty("pan")&&(b=Number(a.pan),this.G.pan=b);a.hasOwnProperty("tilt")&&(e=
Number(a.tilt),this.G.A=e);a.hasOwnProperty("fov")&&(g=Number(a.fov),this.G.fov=g);a.hasOwnProperty("projection")&&(f=Number(a.projection),this.G.Pb=f);a.hasOwnProperty("timingFunction")&&(h=Number(a.timingFunction));a.hasOwnProperty("speed")&&(l=Number(a.speed));0>=l?(this.hj(b,e,g),this.Vc(f)):(a=new x.wl,a.bb="__AutoMove",a.se=this.Cm(),a.Ph=this.A.m,a.Wd=this.fov.m,a.Oh=this.Xa,a.Yd=b,a.te=e,a.og=g,a.Dd=f,a.Cf=!1,a.Ge=!1,a.He=!1,0==h&&(a.Ge=!0),1==h&&(a.Cf=!0,a.Ge=!0),2==h&&(a.He=!0),a.speed=
l,this.G.Fl=this.J,this.J=this.pm(a),this.G.Gl=(new Date).getTime(),this.G.sl=!0,this.G.active=!0,this.G.aborted=!1,this.G.pan=b,this.G.A=e,this.G.fov=g,this.be=!1)};c.prototype.Vq=function(a){this.moveTo(this.pan.eb,this.A.eb,this.fov.eb,a)};c.prototype.Wq=function(a,b){var e={};e.pan=this.pan.eb;e.tilt=this.A.eb;e.fov=this.fov.eb;e.projection=this.$i;e.timingFunction=b;e.speed=a;this.Wi(e)};c.prototype.Xo=function(a,b,e,g){var f=new x.gi(this);f.type="point";f.pan=b;f.A=e;f.id=a;f.j={};f.j.player=
this;f.Ff();f.j.hotspot=f;f.j.__div=document.createElement("div");f.j.__div.appendChild(g);this.X.push(f);f.j.__div.style.position="absolute";f.j.__div.style.left="-1000px";f.j.__div.style.top="-1000px";f.j.__div.ggVisible=!0;this.Sa.insertBefore(f.j.__div,this.Sa.firstChild);this.Oa=!0};c.prototype.Is=function(a,b,e){for(var g=0;g<this.X.length;g++){var f=this.X[g];f.id==a&&(f.pan=b,f.A=e,f.Ff())}this.Oa=!0};c.prototype.Cr=function(a){for(var b=-1,e,g=0;g<this.X.length;g++)e=this.X[g],e.id==a&&(b=
g);-1<b&&(e=this.X.splice(b,1).pop(),e.j&&e.j.__div&&this.Sa.removeChild(e.j.__div))};c.prototype.mq=function(){for(var a=[],b=0;b<this.X.length;b++){var e=this.X[b];"point"==e.type&&a.push(String(e.id))}return a};c.prototype.Op=function(a){for(var b=0;b<this.X.length;b++){var e=this.X[b];if(e.id==a)return b={},b.id=a,b.pan=e.pan,b.tilt=e.A,b.url=e.url,b.target=e.target,b.distance=e.distance,b.title=e.title,b.description=e.description,b.skinid=e.fl,e.cd&&(b.customimage=e.cd,b.customimagewidth=e.Fe,
b.customimageheight=e.Jd,b.use3D=e.rg,b.distance3D=e.ui),e.j&&e.j.__div&&(b.div=e.j.__div),b}};c.prototype.Do=function(a,b){this.ia.start.x=a;this.ia.start.y=b;this.ia.pa.x=a;this.ia.pa.y=b;this.La.pa.x=a;this.La.pa.y=b;this.Xk++;this.pan.bd=this.pan.m;this.A.bd=this.A.m};c.prototype.Bo=function(a,b){var e=this.mc();this.pan.bd+=a*e/this.D.height;this.A.bd+=b*e/this.D.height;this.pan.m=this.pan.bd;this.A.m=this.A.bd};c.prototype.Co=function(a,b){this.ia.m.x=a;this.ia.m.y=b;this.ia.oa.x=this.ia.m.x-
this.ia.pa.x;this.ia.oa.y=this.ia.m.y-this.ia.pa.y;this.L.Od&&(this.ia.pa.x=this.ia.m.x,this.ia.pa.y=this.ia.m.y,this.update())};c.prototype.Fa=function(){this.C.active&&(this.C.active=!1,this.M("autorotatechanged",{}),this.pan.d=0,this.A.d=0,this.fov.d=0);this.G.active&&(this.G.active=!1,this.pan.d=0,this.A.d=0,this.fov.d=0);this.qf=this.G.aborted=!1;this.C.Vi=!1;this.Hd=.02;this.yg=0;this.C.sg&&(this.C.enabled=this.C.sf);this.Uf=(new Date).getTime()};c.prototype.Up=function(){return this.Uf};c.prototype.Dm=
function(a,b){a||(a=this.ra.x,b=this.ra.y);var e=this.D.height/(2*Math.tan(this.fov.m*Math.PI/360));a-=this.D.width/2;b-=this.D.height/2;var g={};g.pan=180*Math.atan(a/e)/Math.PI;g.tilt=180*Math.atan(-b/Math.sqrt(a*a+e*e))/Math.PI;return g};c.prototype.oq=function(a,b){a||(a=this.ra.x,b=this.ra.y);if(2===this.Ya){var e=this.fov.m/this.D.height;a=-(a-this.D.width/2)*e+this.pan.m;b=-(b-this.D.height/2)*e+this.A.m}else{e=new x.Ha(0,0,1);a=this.Dm(a,b);e.Vd(-a.tilt);e.$e(a.pan);e.Vd(-this.A.m);e.$e(-this.pan.m);
e.Vd(-this.Pa.pitch);e.af(this.Pa.V);for(a=e.cp()-180;-180>a;)a+=360;b=e.ep()}e={};e.pan=a;e.tilt=b;return e};c.prototype.Pc=function(a){return a==this.control||a&&void 0!==a.ggPermeableMap&&1==a.ggPermeableMap?!0:a&&void 0!==a.ggPermeable&&0==a.ggPermeable?!1:a&&a.ggType&&("container"==a.ggType||"cloner"==a.ggType||"timer"==a.ggType)?!0:!1};c.prototype.Vj=function(a,b){var e=this.vd(),g,f;for(g=0;g<this.T.length+this.gb.length;g++){var h=g<this.T.length?this.T[g]:this.gb[g-this.T.length];if(h.qb)return h}for(g=
0;g<this.T.length+this.gb.length;g++)if(h=g<this.T.length?this.T[g]:this.gb[g-this.T.length],!h.kd){var l=[],k=new x.Ha,w;var r=f=void 0;0<h.fov&&(f=Math.tan(h.fov/2*Math.PI/180),r=0<h.Wb?f*h.Cc/h.Wb:f,h.Mc&&1!=h.Mc&&(r*=h.Mc));for(w=0;4>w;w++){switch(w){case 0:k.init(-f,-r,0);break;case 1:k.init(f,-r,0);break;case 2:k.init(f,r,0);break;case 3:k.init(-f,r,0)}k.Ga(h.Ga*Math.PI/180);k.Ma(-h.Ma*Math.PI/180);k.ob(h.ob*Math.PI/180);--k.z;k.Ga(-h.A*Math.PI/180);k.Ma(h.pan*Math.PI/180);k.Ma(-this.pan.m*
Math.PI/180);k.Ga(this.A.m*Math.PI/180);k.ob(this.V.m*Math.PI/180);l.push(k.clone())}l=this.Wj(l);if(0<l.length){for(w=0;w<l.length;w++)k=l[w],.1>k.z?(r=-e/k.z,f=this.D.width/2+k.x*r,r=this.D.height/2+k.y*r):r=f=0,k.$b=f,k.Db=r;if(this.Qm(l,a,b))return h}}return null};c.prototype.hh=function(){return document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement&&null!=document.msFullscreenElement||document.fullScreen};c.prototype.Uq=function(a){this.vo(a);window.focus();if(this.ud)this.ud.onclick();
(this.Je||this.Gf&&this.Rf)&&this.yi();this.Jb=null;if(!this.L.oc&&!this.tc){a=a?a:window.event;if(a.which||0==a.which||1==a.which){var b=(new Date).getTime();if(this.Td){this.Jb=this.Td;this.Z.Sc=!0;this.Z.startTime=b;a.stopPropagation();return}if(this.Pc(a.target)){var e;(e=this.Vj(this.ra.x,this.ra.y))&&e.Ne&&(this.Jb=e);this.Do(a.pageX,a.pageY);this.Z.Sc=!0;this.Z.startTime=b;a.preventDefault();this.Fa()}}this.ia.oa.x=0;this.ia.oa.y=0}};c.prototype.lf=function(a,b){var e=this.I.tj;e.enabled&&
(this.za!=this.lb&&0<=a&&0<=b&&""!=this.za.title?(this.Ia.innerHTML=this.za.title,this.Ia.style.color=this.ga(e.uj,e.sj),this.Ia.style.backgroundColor=e.background?this.ga(e.fc,e.ec):"transparent",this.Ia.style.border="solid "+this.ga(e.ic,e.hc)+" "+e.li+"px",this.Ia.style.borderRadius=e.Oj+"px",this.Ia.style.textAlign="center",0<e.width?(this.Ia.style.left=a-e.width/2+this.margin.left+"px",this.Ia.style.width=e.width+"px"):(this.Ia.style.width="auto",this.Ia.style.left=a-this.Ia.offsetWidth/2+this.margin.left+
"px"),this.Ia.style.height=0<e.height?e.height+"px":"auto",this.Ia.style.top=b+25+ +this.margin.top+"px",this.Ia.style.visibility="inherit",this.Ia.style.overflow="hidden"):(this.Ia.style.visibility="hidden",this.Ia.innerHTML=""))};c.prototype.vo=function(a){var b=this.Me();this.hh()?(this.ra.x=a.clientX-this.margin.left,this.ra.y=a.clientY-this.margin.top):(this.ra.x=a.pageX-b.x,this.ra.y=a.pageY-b.y);return b};c.prototype.jg=function(a){this.za=a&&null!==a&&"object"==typeof a?a:this.lb;this.za==
this.lb&&(a=this.ni(this.ra.x,this.ra.y))&&(a.ib=0);this.za.Ff&&this.za.Ff();this.hotspot=this.za;this.M("activehotspotchanged",{hotspot:this.za})};c.prototype.Tq=function(a){a=a?a:window.event;var b=this.vo(a);if(!this.L.oc&&!this.tc&&!this.Td){this.C.active&&(this.C.Ri=(new Date).getTime());0==a.buttons&&(this.Z.Sc=!1);this.Z.Sc&&(a.preventDefault(),(a.which||0==a.which||1==a.which)&&this.Co(a.pageX,a.pageY),this.Fa());var e=!1;if(this.za==this.lb||"poly"==this.za.type){var g=this.lb;0<this.X.length&&
this.Pc(a.target)&&(g=this.ni(this.ra.x,this.ra.y));this.Mh(g);this.lf(a.pageX-b.x,a.pageY-b.y);0!=g&&g!=this.lb&&(e=!0)}b=null;!e&&this.Pc(a.target)&&(b=this.Vj(this.ra.x,this.ra.y));this.C.si&&(this.C.si=!1);this.Sa.style.cursor=this.za!=this.lb&&this.za.Lf&&e||b&&b.eh?"pointer":"default"}};c.prototype.Mh=function(a){!1===a&&(a=this.lb);this.za!=a&&(this.za!=this.lb&&(0<this.I.mode&&(this.za.ib=0),this.ma&&this.ma.hotspotProxyOut&&this.ma.hotspotProxyOut(this.za.id,this.za.url)),a!=this.lb?(this.jg(a),
this.ma&&this.ma.hotspotProxyOver&&this.ma.hotspotProxyOver(this.za.id,this.za.url),0<this.I.mode&&(this.I.ib=1,this.za.ib=1)):(this.jg(this.lb),0<this.I.mode&&(this.I.ib=0)),this.sa&&this.sa.changeCurrentHotspot(this.za.id))};c.prototype.Sq=function(a){a=a?a:window.event;this.Qi=-1;(this.Je||this.Gf&&this.Rf)&&this.yi();if(!this.L.oc&&!this.tc&&(this.Jb&&(this.Jb.Ne(),this.Td=this.Jb.qb?this.Jb:null),this.Z.Sc)){this.Fa();a.preventDefault();this.Z.Sc=!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.Z.startTime&&0<=b&&20>b){var e=this.ni(this.ra.x,this.ra.y);e&&(this.za==this.lb&&this.Mh(e),this.qo(e));b=Math.abs(this.ia.Rd.x-this.ia.pa.x)+Math.abs(this.ia.Rd.y-this.ia.pa.y);700>a-this.lh&&0<=b&&20>b?(e?this.ro(e):this.L.ek&&this.xj(),this.lh=0):this.lh=a;this.ia.Rd.x=this.ia.pa.x;this.ia.Rd.y=this.ia.pa.y}}};c.prototype.hn=function(a){if(!this.L.ke&&!this.tc&&(a=a?a:window.event,this.Pc(a.target))){var b=a.detail?-1*a.detail:
a.wheelDelta/40;this.L.Um&&(b=-b);a.axis&&(-1==this.Qi?this.Qi=a.axis:this.Qi!=a.axis&&(b=0));var e=0<b?1:-1;a.wheelDeltaX&&a.wheelDeltaY&&Math.abs(a.wheelDeltaX)>Math.abs(a.wheelDeltaY)&&(b=0);0!=b&&(this.Tj(e*this.L.co,!0),this.update());a.preventDefault();this.Fa()}};c.prototype.Es=function(a){a||(a=window.event);var b=a.touches,e=this.Me();this.ra.x=b[0].pageX-e.x;this.ra.y=b[0].pageY-e.y;this.ve=this.Jb=null;window.focus();this.Gi||(this.Gi=!0,this.M("hastouch",{}),this.M("playerstatechanged",
{}));this.Zm||this.Qe||!(this.Je||this.Gf&&this.Rf)||this.yi();if(!this.L.oc&&!this.tc){var g=(new Date).getTime();if(this.Td)this.Jb=this.Td,this.Z.ed=!0,this.Z.startTime=g,a.preventDefault(),this.Z.Gh=!0;else{if(!this.Z.ed&&b[0]){this.Z.startTime=g;this.Z.start.x=b[0].pageX;this.Z.start.y=b[0].pageY;this.Z.pa.x=b[0].pageX;this.Z.pa.y=b[0].pageY;this.wb=b[0].target;if(this.Pc(this.wb)){(g=this.Vj(this.ra.x,this.ra.y))&&g.Ne&&(this.Jb=g);if(g=this.ni(this.ra.x,this.ra.y))this.O(g),this.ve=g,this.Mh(g),
g=this.Wg(a),this.lf(g.x-e.x,g.y-e.y);this.Do(b[0].pageX,b[0].pageY);this.Z.im=b[0].identifier;this.Z.ed=!0;a.preventDefault();this.Z.Gh=!0;this.Fa()}if(this.wb){e=this.wb;for(g=!1;e&&e!=this.control;){if(e.onmouseover)e.onmouseover();e.onmousedown&&!g&&(e.onmousedown(),g=!0);e=e.parentNode}g&&(a.preventDefault(),this.Z.Gh=!0)}}1<b.length&&(this.Z.ed=!1);!this.vk&&2==b.length&&b[0]&&b[1]&&this.Pc(this.wb)&&(a=b[0].pageX-b[1].pageX,b=b[0].pageY-b[1].pageY,this.fov.eo=Math.sqrt(a*a+b*b),this.fov.prev=
this.fov.m);this.ia.oa.x=0;this.ia.oa.y=0}}};c.prototype.yi=function(){this.Gf=this.Je=!1;try{this.Zh&&this.F.j&&(!this.F.Ad&&this.F.il&&this.F.j.play(),this.F.j.muted=!1);if(this.va&&(this.va.resume(),!("suspended"!=this.va.state||this.gd&&this.Sf))){this.Je=!0;return}if(this.gd&&this.va&&this.va.createOscillator){var a=this.va.createOscillator(),b=this.va.createGain();a.frequency.value=30;a.type="sine";a.connect(b);b.connect(this.va.destination);b.gain.value=.01;a.start(0);setTimeout(function(){a.stop()},
1E4)}for(b=0;b<this.Y.length;b++){var e=this.Y[b];!this.isPlaying(e.id)&&0<=e.loop&&e.autoplay&&this.We(e.id,e.loop)}for(b=0;b<this.T.length;b++){var g=this.T[b];!this.isPlaying(g.id)&&g.autoplay&&this.Zh&&this.We(g.id,g.loop);this.isPlaying(g.id)&&g.autoplay&&this.Zh&&(g.Gd&&g.xg(),g.j.muted=!1)}}catch(f){this.O(f)}};c.prototype.Ds=function(a){a||(a=window.event);var b=a.touches,e=this.Me();this.ra.x=b[0].pageX-e.x;this.ra.y=b[0].pageY-e.y;if(this.L.oc||this.tc)(this.K.Ed||this.K.we)&&a.preventDefault();
else{b[0]&&(this.Z.pa.x=b[0].pageX,this.Z.pa.y=b[0].pageY);if(this.wb){for(var g=this.wb,f=!1;g&&g!=this.control&&!f;)"scrollarea"==g.ggType&&(f=!0),"map"==g.ggType&&(f=!0),"text"==g.ggType&&(f=!0),g=g.parentNode;f||a.preventDefault()}if(this.Z.ed){a.preventDefault();for(g=0;g<b.length;g++)if(b[g].identifier==this.Z.im){this.Co(b[g].pageX,b[g].pageY);break}this.ve&&(g=this.Wg(a),this.lf(g.x-e.x,g.y-e.y));this.Fa()}2==b.length&&b[0]&&b[1]&&(this.Z.ed=!1,!this.vk&&this.Pc(this.wb)&&(this.L.ke||(e=b[0].pageX-
b[1].pageX,b=b[0].pageY-b[1].pageY,this.fov.Zl=Math.sqrt(e*e+b*b),this.La.fov.active=!0,this.La.fov.Bc=this.fov.prev*Math.sqrt(this.fov.eo/this.fov.Zl),4==this.Ta()&&2!=this.Ya&&this.La.fov.Bc>this.fov.max&&(this.La.fov.Bc=this.fov.max),this.La.fov.Bc<this.fov.min&&(this.La.fov.Bc=this.fov.min)),this.Fa(),a.preventDefault()))}};c.prototype.Cs=function(a){this.Z.Gh&&(this.Z.Gh=!1,a.preventDefault());var b=this.Me(),e=!1;(this.Je||this.Gf&&this.Rf)&&this.yi();if(!this.L.oc&&!this.tc){this.Z.ed&&(a.preventDefault(),
this.Fa());var g=(new Date).getTime();var f=void 0;var h=!1;f=Math.abs(this.Z.start.x-this.Z.pa.x)+Math.abs(this.Z.start.y-this.Z.pa.y);if(0<=f&&20>f){e=!0;this.Pc(this.wb)&&(a.preventDefault(),this.Jb&&(this.Jb.Ne(),this.Td=this.Jb.qb?this.Jb:null));if(this.wb){for(f=this.wb;f&&f!=this.control;)f.onclick&&(f.onclick(),"hotspot"!=f.bt&&(h=!0),e=!1),f=f.parentNode;h&&a.preventDefault()}f=Math.abs(this.Z.Rd.x-this.Z.pa.x)+Math.abs(this.Z.Rd.y-this.Z.pa.y);if(700>g-this.lh&&0<=f&&20>f){if(this.Pc(this.wb))if(a.preventDefault(),
this.ve)this.ro(this.ve);else if(this.L.ek){var l=this;setTimeout(function(){l.xj()},1)}if(this.wb){for(f=this.wb;f&&f!=this.control;)f.ondblclick&&(f.ondblclick(),h=!0,e=!1),f=f.parentNode;h&&a.preventDefault()}this.lh=0}else this.lh=g;this.Z.Rd.x=this.Z.pa.x;this.Z.Rd.y=this.Z.pa.y}if(this.wb)for(f=this.wb;f&&f!=this.control;){if(f.onmouseout)f.onmouseout();if(f.onmouseup)f.onmouseup();f=f.parentNode}a=this.Wg(a);this.lf(a.x-b.x,a.y-b.y);this.ve&&e&&this.qo(this.ve);this.lf(-1,-1);this.wb=null;
this.Z.ed=!1;this.Mh(this.lb);this.ve=null}};c.prototype.Bs=function(a){var b=this.Me();this.L.oc||this.tc||(this.Z.ed=!1);this.ve=null;this.Mh(this.lb);a=this.Wg(a);this.lf(a.x-b.x,a.y-b.y)};c.prototype.$m=function(){return null!=this.wb||this.Z.ed||this.Z.Sc};c.prototype.jn=function(a){if(!this.Ue&&window.MSGesture){var b=window.MSGesture;this.O("setup gesture");this.Ue=new b;this.Ue.target=this.control}this.Ue&&this.Ue.addPointer(a.pointerId)};c.prototype.rm=function(a){this.vk=!0;this.Xi=1;this.L.oc||
this.L.ke||this.tc||(a.touches?(this.wb=a.touches.target,this.Pc(a.target)&&(a.preventDefault(),this.fov.prev=this.fov.m,this.Fa())):(a.preventDefault(),this.fov.prev=this.fov.m,this.Fa()))};c.prototype.Gp=function(a){this.L.oc||this.L.ke||this.tc||!this.Pc(a.target)||(a.preventDefault(),this.La.fov.active=!0,this.La.fov.Bc=this.fov.prev/Math.sqrt(a.scale),4==this.Ta()&&2!=this.Ya&&this.La.fov.Bc>this.fov.max&&(this.La.fov.Bc=this.fov.max),this.update(),this.Fa())};c.prototype.Xq=function(a){this.L.oc||
this.L.ke||this.tc||(a.preventDefault(),1!=a.scale&&(this.La.fov.active=!0,this.Xi*=a.scale,this.La.fov.Bc=this.fov.prev/Math.sqrt(this.Xi),4==this.Ta()&&2!=this.Ya&&this.La.fov.Bc>this.fov.max&&(this.La.fov.Bc=this.fov.max),this.update(),this.Fa()))};c.prototype.qm=function(a){this.L.oc||this.L.ke||this.tc||(this.La.fov.active=!1,a.preventDefault(),this.Fa(),this.Ue&&this.Ue.reset&&this.Ue.reset())};c.prototype.Kq=function(a){this.L.uh||this.tc||(this.isFullscreen&&a.preventDefault(),this.Oi=a.keyCode,
this.Fa())};c.prototype.Lq=function(a){this.Oi&&(this.Oi=0,a.preventDefault())};c.prototype.cr=function(){this.Oi=0};c.prototype.Ch=function(){this.isFullscreen&&(this.hh()||this.exitFullscreen(),this.hh()&&(this.aa.style.left="0px",this.aa.style.top="0px"))};c.prototype.ir=function(a,b,e,g){g?(this.dh.alpha=a,this.dh.beta=b,this.dh.gamma=e,this.dh.gamma+=90):(this.nb.alpha=a,this.nb.beta=b,this.nb.gamma=e,this.nb.gamma+=90);this.nb.orientation=window.orientation?1*parseInt(""+window.orientation,
10):0;e=new x.yl;a=this.nb;e.$e(-a.alpha);e.af(-a.beta);e.Vd(-a.gamma);e.af(90-a.orientation);1>e.Ob?-1<e.Ob?(b=180/Math.PI*Math.asin(-e.Ob),a=180/Math.PI*Math.atan2(e.sc,e.rc),e=180/Math.PI*Math.atan2(e.qc,e.pc)):(b=0,a=90,e=-180/Math.PI*Math.atan2(-e.Xb,e.Yb)):(b=0,a=-90,e=180/Math.PI*Math.atan2(-e.Xb,e.Yb));if(this.nf)if(this.$m()||this.G.Ii||this.nb.Kh)this.nb.Ve=this.Yg()+e,this.nb.fadeIn=0,this.nb.Kh=!1,this.xe&&this.Hb.In();else{g=this.G.active;var f=1;10>this.nb.fadeIn&&(this.nb.fadeIn+=1,
f=.1*this.nb.fadeIn);e=-e+this.nb.Ve;this.cf(f*e+(1-f)*this.Yg());this.df(f*a+(1-f)*this.Di());this.Ao?this.ij(f*b+(1-f)*this.Gm()):this.ij(0);this.Fg();this.G.active=g}};c.prototype.qo=function(a){this.ma&&this.ma.hotspotProxyClick&&this.ma.hotspotProxyClick(a.id,a.url);""!=a.url&&(this.Rk(a.url,a.target),this.lf(-1,-1))};c.prototype.ro=function(a){this.ma&&this.ma.hotspotProxyDoubleClick&&this.ma.hotspotProxyDoubleClick(a.id,a.url)};c.prototype.zi=function(){return Math.min(1,2*Math.tan(Math.PI*
Math.min(this.fov.m,90)/360))};c.prototype.vn=function(){var a=this;setTimeout(function(){a.vn()},100);9!=a.cj||a.Ki||window.requestAnimationFrame(function(){a.Eh();a.O("restart recover timer")});10<a.cj&&1<a.Xk&&(a.Qc("recover timer - disabling requestAnimationFrame"),a.Ki=!0,a.Eh());a.cj++};c.prototype.lj=function(a){var b={PAN:{value:0,name:"pan"},$s:{value:1,name:"tilt"},Ys:{value:2,name:"fov"}},e=0,g=0,f=0;a=Math.max(a,0);for(var h in b){for(var l=b[h],k,w=Math.floor(a);!this.Jf(w,l.value)&&
0<w;)w--;w=this.Jf(w,l.value);var r=this.bq(w);if(r){k=new x.Kc(w.time,w.value);var y=new x.Kc(r.time,r.value),z=(a-w.time)/(r.time-w.time);if(0!=w.type||0!=r.type&&3!=r.type)if(3==w.type)k=w.value;else{z=new x.Kc;var ha=new x.Kc,ua=r.time-w.time;0==w.type?ha.init(w.time+.3*ua,w.value):ha.init(w.Ce,w.De);0==r.type||3==r.type?z.init(r.time-.3*ua,r.value):z.init(r.Ae,r.Be);r=new x.Kc;r.Nj(k,y,ha,z,a);k=r.y}else r=new x.Kc,r.Nd(k,y,z),k=r.y}else k=w.value;switch(l.value){case 0:l=this.pan.m;if(this.be&&
3!=w.type){if(2!=this.Ya){for(;360<k;)k-=360;for(;-360>k;)k+=360}e=k-l;2!=this.Ya&&(180<e&&(e-=360),-180>e&&(e+=360));this.pan.m+=e*this.Hd}else this.pan.m=k;this.C.qh=this.pan.m;break;case 1:l=this.A.m;this.be&&3!=w.type?(g=k-l,this.A.m+=g*this.Hd):this.A.m=k;this.C.rh=this.A.m;break;case 2:l=this.fov.m,this.be&&3!=w.type?(f=k-l,this.fov.m+=f*this.Hd):this.fov.m=k,this.C.ph=this.fov.m}}b=this.Ta();for(h=Math.floor(a);!this.Jf(h,3)&&0<h;)h--;h=this.Jf(h,3);w=a-h.time;this.be&&-1!=this.zg&&this.ji+
this.Kj>a?(b=this.Vg(this.zg),this.fov.m>b?this.ji=a:(w=(a-this.ji)/this.Kj,w=Math.min(1,w),this.Vc(this.Xa,this.zg,1-w))):(0==h.Gb||w>h.Gb-.3?this.Vc(h.value):(w/=h.Gb,this.Vc(b,h.value,1-w)),this.C.fn=h.value);this.be&&(e=Math.sqrt(e*e+g*g+f*f),.3>e&&(this.be=!1,this.Hd=.02,this.yg=0),0<this.yg&&e>this.yg&&(this.Hd+=.01,this.Hd=Math.min(this.Hd,1)),this.yg=e);h=Math.floor(a);if(h!=this.Hl)for(this.Hl=h,a=this.Hp(h),e=0;e<a.length;e++)g=a[e],f=g.ii,this.Gc.hasOwnProperty(f)&&(b=this.Gc[f].type,0==
b?this.re(f,g.tl):1==b?this.re(f,g.value):2==b&&this.re(f,"true"==g.tl));this.update()};c.prototype.sm=function(){if(""!=this.C.Zf){var a=this.Bm(this.C.Zf);if(0==a.length||1==a.length&&a[0]==this.Ra)return this.Ra}a=this.Ra;do if(this.C.pn){var b=1E3;do a=this.Za[Math.floor(Math.random()*this.Za.length)];while(b--&&a==this.Ra)}else b=this.Za.indexOf(a),b++,b>=this.Za.length&&(b=0),a=this.Za[b];while(""!=this.C.Zf&&!this.Xg(a).tags.includes(this.C.Zf)&&a!=this.Ra);return a};c.prototype.rr=function(a){var b=
this.G.speed;this.G.Fk&&(b=b*(a.getTime()-this.G.Fk)/60,5<b&&(b=5),.2>b&&(b=.2));this.G.Fk=a.getTime();this.C.Rg&&(this.Ba.ready()||4==this.Xa)&&this.Bi()&&(this.C.Rg=!1,this.C.active=!0,this.zb.running=!0,this.zb.finished=!1);if(this.G.active||0!=this.G.Pb&&this.Ba.ready()){if(this.G.sl&&"__AutoMove"==this.J.bb){var e=a.getTime()-this.G.Gl;b=e/100;if(b>=this.J.length){if(this.lj(this.J.length),this.xa.splice(this.xa.indexOf(this.J),1),this.G.active=!1,this.J=this.G.Fl,this.G.Pb=0,this.hj(this.G.pan,
this.G.A,this.G.fov),this.pan.bd=this.G.pan,this.A.bd=this.G.A,this.G.Ah&&(this.G.Ah=!1,this.C.Vi=!0,this.C.active=!0,this.M("autorotatechanged",{})),this.onMoveComplete)this.onMoveComplete()}else this.lj(b)}else{this.pan.d=this.G.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.A.d=this.G.A-this.A.m;this.V.d=this.G.V-this.V.m;this.fov.d=this.G.fov-this.fov.m;e=b*this.zi();var g=Math.sqrt(this.pan.d*this.pan.d+this.A.d*
this.A.d+this.V.d*this.V.d+this.fov.d*this.fov.d),f=this.pan.m-this.G.qh,h=this.A.m-this.G.rh,l=this.V.m-this.G.gn,k=this.fov.m-this.G.ph;100*Math.sqrt(f*f+h*h+l*l+k*k)<e&&0==this.G.Pb&&(this.G.aborted=!0);this.G.qh=this.pan.m;this.G.rh=this.A.m;this.G.gn=this.V.m;this.G.ph=this.fov.m;if(100*g<e||this.G.aborted){if(this.pan.d=0,this.A.d=0,this.V.d=0,this.fov.d=0,this.G.active&&(this.G.active=!1,this.pan.m=this.G.pan,this.A.m=this.G.A,this.V.m=this.G.V,this.fov.m=this.G.fov,this.onMoveComplete))this.onMoveComplete()}else g=
g>5*e?e/g:.2,this.pan.d*=g,this.A.d*=g,this.fov.d*=g;this.pan.m+=this.pan.d;this.A.m+=this.A.d;this.V.m+=this.V.d;this.fov.m+=this.fov.d;0!=this.G.Pb&&(this.G.Pb!=this.Xa?(b=this.Vg(this.G.Pb),this.pk()>b?(this.fov.m+=-Math.max((2.5-1.7*Math.min(Math.sqrt(this.pan.d*this.pan.d+this.A.d*this.A.d+this.V.d*this.V.d)/e,1))*e,this.fov.d)-this.fov.d,this.G.fov=this.fov.m):(this.Fc=this.Xa,this.Xa=this.G.Pb,this.O("New projection from Target:"+this.Xa),this.Dh=this.G.Ih=0,this.Ba.Ji())):1>this.G.Ih?(this.G.Ih=
Math.min(1,this.G.Ih+.05*b),this.Dh=this.G.Ih):(this.Fc=0,this.G.Pb=0,this.Ba.Ji()))}this.Uf=a.getTime();this.update()}else if(this.C.active){e=a.getTime()-this.C.startTime;this.C.Ri<this.C.startTime&&(this.C.Ri=this.C.startTime);if((this.C.sg||this.zb.running)&&0<this.xa.length){b=e/100;g=!1;if(this.Zb!=this.J.bb||""!=this.J.rf&&this.C.ce!=this.J.rf){for(e=0;e<this.xa.length;e++)if(""==this.Zb&&this.xa[e].rf==this.C.ce||""!=this.Zb&&this.xa[e].bb==this.Zb&&this.xa[e].rf==this.C.ce){g=!0;this.J=this.xa[e];
this.Zb=this.J.bb;break}!g&&0<this.xa.length&&this.xa[0].rf==this.C.ce&&(g=!0,this.J=this.xa[0],this.Zb=this.J.bb)}else g=!0;if(g)if(e=(f=this.F.j&&this.F.Ad)&&this.C.ml&&!this.zb.running,this.qf){g=b;if(e)for(this.F.j.currentTime<this.Il&&this.Mj&&(this.Lj++,this.Mj=!1),g=10*(this.Lj*this.F.j.duration+this.F.j.currentTime),this.Il=this.F.j.currentTime,.05>this.F.j.duration-this.F.j.currentTime&&(this.Mj=!0);g>=10*this.pf;)g-=10*this.pf;if(!f&&b>=this.J.length||f&&!e&&b>=this.J.length||f&&e&&(this.J.bb!=
this.J.kn||this.J.Yi!=this.Ra)&&b>=this.J.length){this.lj(this.J.length);this.C.Qd=0;this.qf=!1;if(this.zb.running){this.Pn();return}this.Zb=this.J.kn;this.Zb==this.J.bb&&this.Ra==this.J.Yi?1<this.Za.length&&0<this.C.Zi&&(e=this.sm())&&(this.ld("{"+e+"}"),this.C.startTime=a.getTime(),this.qf=!1,this.C.active=!0,this.K.ze=!0):(this.Tf&&this.J.Yi!=this.Ra&&(this.ld("{"+this.J.Yi+"}",this.J.$q),this.K.enabled?(this.C.active=!1,this.K.ze=!0):this.C.active=!0),this.C.startTime=a.getTime())}else this.lj(g),
this.C.Qd=g}else if(b=this.J.da[0],g=this.J.da[1],f=this.J.da[2],h=this.J.da[3],3!=h.ub&&(h=0),this.C.Vi||this.G.aborted||this.zb.running||e){if(this.qf=!0,this.C.startTime=0<this.C.Qd?a.getTime()-100*this.C.Qd:a.getTime(),this.be=e){for(this.pf=this.Lj=0;this.pf<this.J.length/10;)this.pf+=this.F.j.duration;g=10*this.F.j.currentTime;for(e=Math.floor(g);!this.Jf(e,3)&&0<e;)e--;e=this.Jf(e,3);e.value==this.Xa?this.zg=-1:(this.zg=e.value,this.ji=g,this.Kj=Math.max(5,e.time+e.Gb-g))}}else{e={};if(0<this.C.Qd)e.pan=
this.C.qh,e.tilt=this.C.rh,e.fov=this.C.ph,e.projection=this.C.fn;else{for(e.pan=b.value;360<e.pan;)e.pan-=360;for(;-360>e.pan;)e.pan+=360;e.tilt=g.value;e.fov=f.value;e.projection=h?h.value:4}e.timingFunction=3;e.speed=1;this.G.Ah=!0;this.Wi(e);this.C.active=!0}}else 0<this.C.Zi&&this.Tf&&e>=1E3*this.C.Zi?1<this.Za.length&&(e=this.sm())&&(this.C.startTime=a.getTime(),this.C.Bd=a.getTime(),this.C.timeout=0,this.ld("{"+e+"}"),this.C.active=!0,this.K.ze=!0):(e=a.getTime(),g=b=1E3/60,0!=this.C.Bd&&(g=
e-this.C.Bd),this.A.d=this.C.wj*(0-this.A.m)/100,this.fov.d=this.C.wj*(this.fov.eb-this.fov.m)/100,this.pan.d=.95*this.pan.d+-this.C.speed*this.zi()*.05,b=g/b,this.pan.m+=this.pan.d*b,this.A.m+=this.A.d*b,this.fov.m+=this.fov.d*b,this.C.Bd=e,this.update());3E3<a.getTime()-this.C.Ri&&!this.C.si&&(this.Sa.style.cursor="none",this.C.si=!0)}else!this.zb.finished&&1E3<a.getTime()-this.Uf&&(this.xa.splice(this.xa.indexOf(this.J),1),this.J=this.Ug(!1),this.Zb=this.J.bb,this.C.active=!1,this.C.Rg=!0),this.C.enabled&&
!this.Z.Li()&&a.getTime()-this.Uf>1E3*this.C.timeout&&!this.C.Rg&&(this.C.Qh&&this.Bi()||!this.C.Qh)&&(this.C.active=!0,this.C.startTime=a.getTime(),this.C.Bd=0,this.M("autorotatechanged",{}),this.pan.d=0,this.A.d=0,this.fov.d=0),!this.La.enabled||this.Z.Li()||0==this.pan.d&&0==this.A.d&&0==this.fov.d||(this.G.Ii=!0,this.pan.d*=.9,this.A.d*=.9,this.fov.d*=.9,this.pan.m+=this.pan.d,this.A.m+=this.A.d,this.Tj(this.fov.d),1E-4>this.pan.d*this.pan.d+this.A.d*this.A.d+this.fov.d*this.fov.d&&(this.pan.d=
0,this.A.d=0,this.fov.d=0),this.update())};c.prototype.tr=function(a){var b=this.K;if(!b.Zn){if(b.Ed){var e=Math.max(0,a.getTime()-b.Jo);e/=1E3*b.Io;1<=e?(b.Ed=!1,this.gm(),b.jl=a.getTime(),this.io(),b.we=!0,0==b.xc||b.wg||(4==b.xc?(this.J=this.Ug(!0,b.ff,b.gf,b.Zd),this.Zb=this.J.bb,this.C.active=!0,this.zb.running=!0):this.moveTo(b.ff,b.gf,b.Zd,b.ye,0,b.Dd))):b.un(e)}else b.we&&(e=Math.max(0,a.getTime()-b.jl),e/=1E3*b.Bg,1<=e?(b.we=!1,this.Uf=a.getTime(),this.update(),0!=b.xc&&b.wg&&(4==b.xc?(this.J=
this.Ug(!0,b.ff,b.gf,b.Zd),this.Zb=this.J.bb,this.C.active=!0,this.zb.running=!0):this.moveTo(b.ff,b.gf,b.Zd,b.ye,0,b.Dd)),4!=b.xc&&(this.fj(!1),this.C.active=b.ze,this.M("autorotatechanged",{}),b.ze=!1),this.C.Bd=0,this.ea&&this.$j(),this.Dg=!1):b.un(e));b=this.lr;b.gp&&(b.ti?a.getTime()-b.gk>=1E3*b.delay&&(b.ti=!1):(b.current+=b.od,0>b.current&&(b.current=0,b.od=-b.od,b.ti=!0,b.gk=a.getTime()),1<b.current&&(b.current=1,b.od=-b.od,b.ti=!0,b.gk=a.getTime())))}};c.prototype.yr=function(){var a,b=this.I;
if(0<b.vb.length){for(a=0;a<b.vb.length;a++)b.md[a]!=b.bc[a]&&(b.md[a]>b.bc[a]?(b.bc[a]+=.05,b.md[a]<b.bc[a]&&(b.bc[a]=b.md[a])):(b.bc[a]-=.05,b.md[a]>b.bc[a]&&(b.bc[a]=b.md[a],-1!=b.mj.indexOf(b.vb[a])&&(b.mj.splice(b.mj.indexOf(b.vb[a]),1),b.vb.splice(a,1),b.md.splice(a,1),b.bc.splice(a,1)))));this.update()}if(2==b.mode)for(a=0;a<this.X.length;a++){var e=this.X[a];"poly"==e.type&&e.ib!=e.wa&&(e.ib>e.wa?(e.wa+=b.od,e.ib<e.wa&&(e.wa=e.ib)):(e.wa-=b.od,e.ib>e.wa&&(e.wa=e.ib)),this.update())}3==b.mode&&
b.ib!=b.wa&&(b.ib>b.wa?(b.wa+=b.od,b.ib<b.wa&&(b.wa=b.ib)):(b.wa-=b.od,b.ib>b.wa&&(b.wa=b.ib)),this.update())};c.prototype.wr=function(){var a=this.La;this.Z.Li()&&(this.L.Od?(a.oa.x=.4*(this.ia.pa.x-a.pa.x),a.oa.y=.4*(this.ia.pa.y-a.pa.y),a.pa.x+=a.oa.x,a.pa.y+=a.oa.y):(a.oa.x=.1*-this.ia.oa.x*this.L.sensitivity/8,a.oa.y=.1*-this.ia.oa.y*this.L.sensitivity/8),this.Bo(a.oa.x,a.oa.y),this.update());a.fov.active&&(this.Ol(.4*(a.fov.Bc-this.fov.m)),.001>Math.abs(a.fov.Bc-this.fov.m)/this.fov.m&&(a.fov.active=
!1),this.update());if(a.enabled&&(0!=a.oa.x||0!=a.oa.y)&&!this.Z.Li()){var b=.9*(1-a.bl);a.oa.x*=b;a.oa.y*=b;this.G.Ii=!0;.01>a.oa.x*a.oa.x+a.oa.y*a.oa.y?(a.oa.x=0,a.oa.y=0):(this.Bo(a.oa.x,a.oa.y),this.update())}};c.prototype.sr=function(){if(this.L.Ln&&this.L.Od){var a=this.yn;a.pan=this.pan.m;a.A=this.A.m;a.fov=this.fov.m;this.yf(a);this.yf(a);this.yf(a);var b=a.pan-this.pan.m,e=a.A-this.A.m;a=a.fov-this.fov.m;if(0!=b||0!=e||0!=a){var g=.2+.9*Math.min((Math.abs(b)+Math.abs(e)+Math.abs(a))/Math.abs(Math.min(this.fov.m,
90))*.3,1);this.pan.m+=b*g;this.A.m+=e*g;this.fov.m+=a*g;this.La.bl=.3;this.update()}else this.La.bl=0}else this.Fg();if(isNaN(this.pan.m)||1E7<this.pan.m||-1E7>this.pan.m)this.pan.m=0;if(isNaN(this.A.m)||1E7<this.A.m||-1E7>this.A.m)this.A.m=0;if(isNaN(this.V.m)||1E7<this.V.m||-1E7>this.V.m)this.V.m=0;if(2!=this.Ya){for(;360<this.pan.m;)this.pan.m-=360;for(;-360>this.pan.m;)this.pan.m+=360}};c.prototype.ur=function(){if(!this.Bi()&&this.Mf&&5<this.v.Gn){var a,b=0,e=this.kc.length;if(this.Yh)e=50,
this.hk<e&&this.hk++,b=this.hk;else for(a=0;a<e;a++)(this.kc[a].complete&&this.kc[a].src!=this.cm||""==this.kc[a].src)&&b++;b==e?(this.Fh=1,this.isLoaded=!0,this.ua&&this.ua.ggLoaded&&this.ua.ggLoaded(),this.M("imagesready",{}),this.C.Qh&&this.C.enabled&&!this.G.active&&!this.K.Ed&&(this.C.active=!0,this.C.startTime=(new Date).getTime(),this.C.Bd=0)):this.Fh=b/(1*e);this.M("downloadprogress",{percentLoaded:this.Fh})}};c.prototype.Eh=function(){var a=this;a.ej||(a.Ki?setTimeout(function(){a.ej=!1;
a.Eh()},1E3/60):window.requestAnimationFrame(function(){a.ej=!1;a.Eh()}));a.ej=!0;this.Xk=this.cj=0;a.G.Ii=!1;var b=new Date;this.Ai++;120<=this.Ai&&(this.O("F/s: "+Math.round(1E3*this.Ai/(b.getTime()-this.bn))),this.bn=b.getTime(),this.Ai=0);this.M("timer",{});this.ja&&this.Ba.Ap();this.Rb&&""!==this.Ke&&!this.sa&&document.hasOwnProperty(this.Ke)&&document[this.Ke].setPan&&0==this.Ep--&&(this.sa=document[this.Ke],this.nd=this.ja=!1,this.Ka&&(this.Ka.style.visibility="hidden"),this.sa.setLocked(!0),
this.sa.setSlaveMode(!0),this.sa.readConfigString(this.ck),this.Qc("Flash player '"+this.Ke+"' connected."));this.rl&&(this.Jc(),this.rl=!1);this.wr();this.ur();this.rr(b);this.sr();this.tr(b);this.Ba.Ms();(0<=this.I.mode||0<this.I.vb.length)&&this.yr();this.Bj();if(this.Vf.pan!=this.pan.m||this.Vf.A!=this.A.m||this.Vf.fov!=this.fov.m)this.Vf.pan=this.pan.m,this.Vf.A=this.A.m,this.Vf.fov=this.fov.m,this.M("positionchanged",{});this.dn!=this.Xa&&(this.dn=this.Xa,this.M("projectionchanged",{}));this.Oa&&
(0<this.Mg?this.Mg--:(this.Oa=!1,this.Mg=0),this.K.we||this.K.Ed||this.xe||(this.Xh(),this.M("renderframe",{})),this.M("repaint",{}));b=this.xm();b!=this.cn&&(b?(this.ua&&this.ua.ggReLoadedLevels&&this.ua.ggReLoadedLevels(),this.M("tilesrequested",{})):(a.ua&&a.ua.ggLoadedLevels&&a.ua.ggLoadedLevels(),this.M("tilesready",{})),this.cn=b)};c.prototype.Vg=function(a){switch(a){case 4:a=Math.min(110,this.fov.max);break;case 12:a=Math.min(270,this.fov.Nk);a=Math.min(360*this.aspect(),a);a=Math.min(360/
this.aspect(),a);break;case 9:a=Math.min(270,this.fov.Ok);break;default:a=90}return a};c.prototype.Js=function(){var a=this;setTimeout(function(){a.kg(!1)},10);setTimeout(function(){a.kg(!1)},100)};c.prototype.Bj=function(){this.bk.jm(this.pan.m,this.A.m);for(var a=0;a<this.Y.length+this.T.length;a++){if(a<this.Y.length)var b=this.Y[a];else if(b=this.T[a-this.Y.length],b.kd)continue;b.Bj()}};c.prototype.js=function(a,b){var e=this;var g="<<U>>"+String(e.Qa);g=g.toUpperCase();"U"!=g.charAt(2)&&(e.L.Nf=
!1);if(0!=e.xh.length||!e.L.Nf||e.L.Hg||e.L.Ig&&e.Pe()||e.L.oi)if(e.ud)e.aa.removeChild(e.ud),e.ud=null;else{e.ud=document.createElement("div");var f=e.ud;g="left: "+a+"px;top:\t "+(b+"px;z-index: 32000;");g+="position:relative;";g+="display: table;";g+="color: black;";g+="background-color: white;";g+="border: 1px solid lightgray;";g+="box-shadow: 1px 1px 3px #333;";g+="font-family: Verdana, Arial, Helvetica, sans-serif;";g+="font-size: 9pt;";g+="opacity : 0.95;";f.setAttribute("style",g);f.setAttribute("class",
"gg_contextmenu");g=document.createElement("style");a=document.createTextNode(".gg_context_row:hover { background-color: #3399FF }");g.type="text/css";g.styleSheet?g.styleSheet.cssText=a.nodeValue:g.appendChild(a);f.appendChild(g);for(a=0;a<e.xh.length;a++){b=e.xh[a];var h=document.createElement("div");g="text-align: left;";g+="margin: 0;";g+="padding: 5px 20px;";g+="vertical-align: left;";h.setAttribute("style",g);h.setAttribute("class","gg_context_row");""!=b.url?(g=document.createElement("a"),
g.href=b.url,g.target="_blank",g.innerHTML=b.text,g.setAttribute("style","color: black; text-decoration: none;"),h.appendChild(g)):(g=document.createElement("span"),g.innerHTML=b.text,g.setAttribute("style","color: black; text-decoration: none;"),h.appendChild(g));f.appendChild(h)}0<e.xh.length&&(!e.L.Nf||e.L.Hg||e.L.Ig&&e.Pe()||e.L.oi)&&f.appendChild(document.createElement("hr"));if(e.L.oi&&e.ja){b=[];b.push({text:"Rectilinear Projection",Hh:4});b.push({text:"Stereographic Projection",Hh:9});b.push({text:"Fisheye Projection",
Hh:12});for(a=0;a<b.length;a++){h=b[a];var l=document.createElement("div");l.setAttribute("class","gg_context_row");g="text-align: left;";g+="margin: 0;";g=e.Xa==h.Hh?g+"padding: 5px 20px 5px 7px;":g+"padding: 5px 20px;";g+="vertical-align: left;";g+="cursor: pointer;";l.setAttribute("style",g);l.onclick=function(k){return function(){e.Uj(k,1);e.update()}}(h.Hh);l.innerHTML=e.Xa==h.Hh?"⦿ "+h.text:h.text;f.appendChild(l)}(!e.L.Nf||e.L.Hg||e.L.Ig&&e.Pe())&&f.appendChild(document.createElement("hr"))}e.L.Hg&&
(a=document.createElement("div"),a.setAttribute("class","gg_context_row"),g="text-align: left;margin: 0;padding: 5px 20px;",g+="vertical-align: left;",g+="cursor: pointer;",a.setAttribute("style",g),a.onclick=function(){e.xj()},a.innerHTML=e.hh()?"Exit Fullscreen":"Enter Fullscreen",f.appendChild(a));e.L.Ig&&e.Pe()&&(a=document.createElement("div"),a.setAttribute("class","gg_context_row"),g="text-align: left;margin: 0;padding: 5px 20px;",g+="vertical-align: left;",g+="cursor: pointer;",a.setAttribute("style",
g),a.onclick=function(){e.Df()},a.innerHTML="Enter VR",f.appendChild(a));e.L.Nf||(a=document.createElement("div"),g="text-align: left;margin: 0;padding: 5px 20px;",g+="vertical-align: left;",a.setAttribute("style",g),a.setAttribute("class","gg_context_row"),g=document.createElement("a"),g.href=c.Lg("aHR0cDovL3Bhbm8ydnIuY29tLw=="),g.target="_blank",g.innerHTML=c.Lg("Q3JlYXRlZCB3aXRoIFBhbm8yVlI="),7<this.Ti.length&&(g.innerHTML+="<br/>"+c.$l(this.Ti).replace(/./gm,function(k){return"&#"+k.charCodeAt(0)+
";"})),g.setAttribute("style","color: black; text-decoration: none;"),a.appendChild(g),f.appendChild(a));e.aa.insertBefore(e.ud,e.aa.firstChild);f.onclick=function(){e.ud&&(e.aa.removeChild(e.ud),e.ud=null)};f.oncontextmenu=f.onclick}};c.prototype.fp=function(){var a=this;var b=a.Sa;a.control=b;a.control=b;a.Js();setTimeout(function(){a.Eh()},10);setTimeout(function(){a.vn()},200);setTimeout(function(){a.mf();a.Xh()},10);b.addEventListener&&(b.addEventListener("touchstart",function(e){a.Es(e)},!1),
b.addEventListener("touchmove",function(e){a.Ds(e)},!1),b.addEventListener("touchend",function(e){a.Cs(e)},!1),b.addEventListener("touchcancel",function(e){a.Bs(e)},!1),b.addEventListener("pointerdown",function(e){a.jn(e)},!1),b.addEventListener("MSPointerDown",function(e){a.jn(e)},!1),b.addEventListener("MSGestureStart",function(e){a.rm(e)},!1),b.addEventListener("MSGestureEnd",function(e){a.qm(e)},!1),b.addEventListener("MSGestureChange",function(e){a.Xq(e)},!1),b.addEventListener("gesturestart",
function(e){a.rm(e)},!1),b.addEventListener("gesturechange",function(e){a.Gp(e)},!1),b.addEventListener("gestureend",function(e){a.qm(e)},!1),b.addEventListener("mousedown",function(e){a.Uq(e)},!1),b.addEventListener("mousemove",function(e){a.Tq(e)},!1),document.addEventListener("mouseup",function(e){a.Sq(e)},!1),b.addEventListener("mousewheel",function(e){a.hn(e)},!1),b.addEventListener("DOMMouseScroll",function(e){a.hn(e)},!1),document.addEventListener("keydown",function(e){a.Kq(e)},!1),document.addEventListener("keyup",
function(e){a.Lq(e)},!1),window.addEventListener("resize",function(){a.mf()},!1),window.addEventListener("blur",function(){a.cr()},!1),a.aa.addEventListener("webkitfullscreenchange",function(){a.Ch()},!1),document.addEventListener("mozfullscreenchange",function(){a.Ch()},!1),window.addEventListener("webkitfullscreenchange",function(){a.Ch()},!1),document.addEventListener("MSFullscreenChange",function(){a.Ch()},!1),document.addEventListener("fullscreenchange",function(){a.Ch()},!1));b.oncontextmenu=
function(e){void 0===e&&(e=window.event);if(e.target&&!a.Pc(e.target))return!0;if(!e.ctrlKey){e=a.Wg(e);var g=a.Me();a.js(e.x-g.x,e.y-g.y);return!1}return!0};window.addEventListener("deviceorientation",function(e){a.ir(e.alpha,e.beta,e.gamma,e.absolute);null!=e.alpha&&null!=e.beta&&null!=e.gamma&&0==a.tk&&(a.tk=!0,a.M("gyroavailable",{available:!0}),a.M("playerstatechanged",{}))})};c.prototype.El=function(){for(var a=0;a<this.X.length;a++)if("point"==this.X[a].type&&(this.ma&&this.ma.addSkinHotspot?
(this.X[a].Ff(),this.X[a].j=this.ma.addSkinHotspot(this.X[a])):(this.X[a].j=new x.Lo(this,this.X[a]),this.X[a].cd&&this.X[a].rg&&(this.X[a].j.ggUse3d=!0,this.X[a].j.gg3dDistance=this.X[a].ui)),this.X[a].j.__div.style.left="-1000px",this.X[a].j.__div.style.top="-1000px",this.X[a].j&&this.X[a].j.__div)){var b=this.Sa.firstChild;b?this.Sa.insertBefore(this.X[a].j.__div,b):this.Sa.appendChild(this.X[a].j.__div)}};c.prototype.Ho=function(){var a,b=document.createElement("fakeelement"),e={OTransition:"oTransitionEnd",
MSTransition:"msTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd",transition:"transitionEnd"};for(a in e)if(void 0!==b.style[a])return e[a]};c.prototype.pb=function(a){var b=[];a="#"==a.substr(0,1)?a.substr(1):"^"+a+"$";a=new RegExp(a,"");for(var e=0;e<this.Y.length;e++)a.test(this.Y[e].id)&&b.push(this.Y[e]);for(e=0;e<this.T.length;e++)a.test(this.T[e].id)&&b.push(this.T[e]);for(e=0;e<this.gb.length;e++)a.test(this.gb[e].id)&&b.push(this.gb[e]);return b};c.prototype.aq=
function(a){if("_videopanorama"==a)return this.F.j;a=this.pb(a);return 0<a.length?a[0].j:null};c.prototype.$p=function(a){a=this.pb(a);return 0<a.length&&a[0].ya?a[0]:null};c.prototype.Bn=function(a,b){var e=this;b.addEventListener("ended",function(f){e.M("videoended",{video:f.target})});b.addEventListener("pause",function(f){e.M("videopaused",{video:f.target})});b.addEventListener("play",function(f){e.M("videostarted",{video:f.target})});for(var g=0;g<this.T.length;g++)if(this.T[g].id==a)return this.T[g].j=
b,this.T[g];g=new x.Dl(this);g.registerElement(a,b);return g};c.prototype.isPlaying=function(a){if(this.Rb){var b=this.sa;if(b)return b.isPlaying(a)}else{if("_main"===a)return!0;a=this.pb(a);if(0<a.length)return a[0].ya?a[0].Tc:!a[0].j.ended&&!a[0].j.paused}return!1};c.prototype.We=function(a,b){if(this.Rb){var e=this.sa;e&&e.playSound(a,b)}else try{e=this.pb(a);for(var g=0;g<e.length;g++){var f=e[g];f.yb=b&&!isNaN(Number(b))?Number(b)-1:f.loop-1;-1==f.yb&&(f.yb=1E7);this.O(f.j);this.isPlaying(a)&&
this.pj(a);f.ya?f.Id():(f.j.play(),!f.Gd||this.nc&&this.Gi||f.xg());this.$r(f.id)}}catch(h){this.O(h)}};c.prototype.wn=function(a,b){a=this.pb(a);for(var e=0;e<a.length;e++){var g=a[e];this.isPlaying(g.id)?this.Sk(g.id):this.We(g.id,b)}};c.prototype.zr=function(a,b){a=this.pb(a);for(var e=0;e<a.length;e++){var g=a[e];this.isPlaying(g.id)?this.pj(g.id):this.We(g.id,b)}};c.prototype.Sk=function(a){if(this.Rb){var b=this.sa;b&&b.pauseSound(a)}else try{if(b=void 0,"_main"==a){this.jj(a);for(b=0;b<this.Y.length;b++)this.Y[b].ya?
this.Y[b].Pj():this.Y[b].j.pause();for(b=0;b<this.T.length;b++)this.T[b].j.pause()}else{var e=this.pb(a);for(b=0;b<e.length;b++){var g=e[b];this.jj(g.id);g.ya?g.Pj():g.j.pause()}}}catch(f){this.O(f)}};c.prototype.Vo=function(a,b){a=this.pb(a);for(var e=0;e<a.length;e++){var g=a[e];0==b||1==b?g.ah&&g.ah(1==b):2==b&&g.Ne&&g.Ne();!g.qb||-1==this.gb.indexOf(g)&&-1==this.T.indexOf(g)||(this.Jb=this.Td=g)}};c.prototype.pj=function(a){var b;if(this.Rb)(b=this.sa)&&b.stopSound(a);else try{if("_main"===a){this.jj(a);
for(b=0;b<this.Y.length;b++)this.Y[b].ya?this.Y[b].xf():(this.Y[b].j.pause(),this.Y[b].j.currentTime=0);for(b=0;b<this.T.length;b++)this.T[b].j.pause(),this.T[b].j.currentTime=0}else{var e=this.pb(a);for(b=0;b<e.length;b++){var g=e[b];this.jj(g.id);g.ya?g.xf():g.j&&g.j.pause&&(g.j.pause(),g.j.currentTime=0)}}}catch(f){this.O(f)}};c.prototype.jj=function(a){-1==this.Xd.indexOf(a)&&this.Xd.push(a);var b=this.kf.indexOf(a);-1!=b&&this.kf.splice(b,1);"_main"==a&&(this.kf=[])};c.prototype.$r=function(a){-1!=
this.Xd.indexOf("_main")&&-1==this.kf.indexOf(a)&&this.kf.push(a);a=this.Xd.indexOf(a);-1!=a&&this.Xd.splice(a,1)};c.prototype.ls=function(a){a=this.pb(a);return 0<a.length?(a=a[0],a.ya?a.wf():a.j?a.j.currentTime:0):0};c.prototype.ms=function(a,b){a=this.pb(a);0<a.length&&(a=a[0],a.ya?(0>b&&(b=0),b>a.mi()&&(b=a.mi()-.1),a.Ml(b)):a.j&&(0>b&&(b=0),b>a.j.duration&&(b=a.j.duration-.1),a.j.currentTime=b))};c.prototype.setVolume=function(a,b){if(this.Rb){var e=this.sa;e&&e.setVolume(a,b)}else try{e=void 0;
var g=Number(b);1<g&&(g=1);0>g&&(g=0);"_videopanorama"===a&&this.F.j&&(this.F.j.volume=g);if("_main"===a){this.ca=g;for(e=0;e<this.Y.length;e++)this.Y[e].j.volume=this.Y[e].level*this.ca;for(e=0;e<this.T.length;e++)this.T[e].j.volume=this.T[e].level*this.ca;this.F.j&&(this.F.j.volume=this.ca)}else{var f=this.pb(a);this.O(f);for(e=0;e<f.length;e++){var h=f[e];h.j&&null!=h.j.volume&&(h.j.volume=g*this.ca);h.level=g}}}catch(l){this.O(l)}};c.prototype.pp=function(a,b){if(this.Rb){var e=this.sa;e&&e.changeVolume(a,
b)}else try{var g=e=void 0;"_videopanorama"===a&&this.F.j&&(this.F.j.volume+=Number(b));if("_main"===a){e=this.ca;e+=Number(b);1<e&&(e=1);0>e&&(e=0);this.ca=e;for(g=0;g<this.Y.length;g++)this.Y[g].j.volume=this.Y[g].level*this.ca;for(g=0;g<this.T.length;g++)this.T[g].j.volume=this.T[g].level*this.ca;this.F.j&&(this.F.j.volume=this.ca)}else{var f=this.pb(a);for(g=0;g<f.length;g++){var h=f[g];e=h.level;e+=Number(b);1<e&&(e=1);0>e&&(e=0);h.level=e;h.j&&null!=h.j.volume&&(h.j.volume=e*this.ca)}}}catch(l){this.O(l)}};
c.prototype.gj=function(a,b,e){a.j.style.opacity=0==b?1:0;a.j.style[this.dd]="opacity "+e+"ms";a.j.style.opacity=0==b?0:1};c.prototype.Pr=function(a,b,e){function g(){var k=f[l];if(!k.j)return"continue";0==b?(h.gj(k,b,e),setTimeout(function(){0==k.j.style.opacity&&k.lg(!1)},e+10),k.rb=!1):1==b?(h.gj(k,b,e),k.lg(!0),k.rb=!0):2==b&&("visible"==k.j.style.visibility?(h.gj(k,0,e),setTimeout(function(){0==k.j.style.opacity&&k.lg(!1)},e+10),k.rb=!1):(h.gj(k,1,e),k.lg(!0),k.rb=!0))}for(var f=this.pb(a),h=
this,l=0;l<f.length;l++)g()};c.prototype.io=function(){try{var a=this,b=!1,e=!1;this.Ja.enabled&&(this.Ja.pi?e=!0:b=!0);for(var g=0;g<this.Y.length;g++){var f=this.Y[g];this.isPlaying(f.id)?e&&(f.qa=0):-1==f.loop||-1!=this.Xd.indexOf(f.id)||-1!=this.Xd.indexOf("_main")&&-1==this.kf.indexOf(f.id)||4==f.mode||6==f.mode||!this.va||!(this.Ja.enabled&&this.Ja.pi||!this.Ja.enabled)||"_background"==f.id&&this.isPlaying(f.id)||(f.autoplay=!0,this.Ja.enabled&&this.Ja.pi&&(f.qa=0),f.ya?this.Je?f.qa=1:f.Id():
(f.so(),f.j.currentTime&&(f.j.currentTime=0)))}b&&setTimeout(function(){a.Ja.ss()},1E3*this.Ja.Gb);e&&(this.Ja.os=this.va.currentTime,this.Ja.ns=setInterval(function(){a.Ja.Dp()},30))}catch(h){this.O(h)}};c.prototype.gm=function(){for(var a=0;a<this.Ja.Vh.length;a++)this.Ja.fm(this.Ja.Vh[a])};c.prototype.Fn=function(){for(var a;0<this.X.length;)a=this.X.pop(),a.j&&(this.Sa.removeChild(a.j.__div),delete a.j),a.j=null;this.I.wa=0;this.I.ib=0;this.M("hotspotsremoved",{})};c.prototype.dl=function(a){this.di=
a;this.aa.style.zIndex=0!=a?a.toString():"auto";this.Ua&&this.Ua.pd&&(this.Ua.pd.zIndex=(a+4).toString());this.Sa.style.zIndex=(a+4).toString();this.Ka.style.zIndex=(a+3).toString();this.Ia.style.zIndex=(a+5).toString();for(var b=0;b<this.T.length+this.gb.length;b++){var e=b<this.T.length?this.T[b]:this.gb[b-this.T.length];e.j&&(e.j.style.zIndex=(a+(e.qb?8E4:0)).toString())}};c.prototype.kg=function(a){var b=this.isFullscreen!==a;this.isFullscreen!==a&&(this.isFullscreen=a,this.update(100));if(this.isFullscreen){if(this.Cj)try{this.aa.webkitRequestFullScreen?
this.aa.webkitRequestFullScreen():this.aa.mozRequestFullScreen?this.aa.mozRequestFullScreen():this.aa.msRequestFullscreen?this.aa.msRequestFullscreen():this.aa.requestFullScreen?this.aa.requestFullScreen():this.aa.requestFullscreen&&this.aa.requestFullscreen()}catch(e){this.O(e)}this.aa.style.position="absolute";a=this.Me();this.aa.style.left=window.pageXOffset-a.x+this.margin.left+"px";this.aa.style.top=window.pageYOffset-a.y+this.margin.top+"px";this.dl(10);document.body.style.overflow="hidden";
b&&(this.ua&&this.ua.ggEnterFullscreen&&this.ua.ggEnterFullscreen(),this.M("fullscreenenter",{}),this.M("playerstatechanged",{}))}else{if(this.Cj)try{document.webkitIsFullScreen?document.webkitCancelFullScreen():document.mozFullScreen?document.mozCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():document.fullScreen&&(document.cancelFullScreen?document.cancelFullScreen():document.exitFullscreen&&document.exitFullscreen())}catch(e){this.O(e)}this.aa.style.position="relative";
this.aa.style.left="0px";this.aa.style.top="0px";this.dl(0);document.body.style.overflow="";b&&(this.ua&&this.ua.ggExitFullscreen&&this.ua.ggExitFullscreen(),this.M("fullscreenexit",{}),this.M("playerstatechanged",{}))}this.mf()};c.prototype.xj=function(){this.kg(!this.isFullscreen)};c.prototype.Cp=function(){this.kg(!0)};c.prototype.exitFullscreen=function(){this.kg(!1)};c.prototype.Qp=function(){return this.isFullscreen};c.prototype.Df=function(){this.Hb.rn=this.nf;this.Hb.wp();this.Hn();this.Hb.Df();
this.Hb.kr();return!0};c.prototype.tq=function(){return"N/A"};c.prototype.ds=function(a){this.Hb&&(this.Hb.If=a)};c.prototype.Ef=function(){if(this.Hb){var a=this.Hb;a.Ef();a.Ze();a.Xj();a.rn||this.Vn(!1)}return!0};c.prototype.po=function(){this.Hb&&(this.Hb.ih()?this.Ef():this.Df());return!0};c.prototype.ih=function(){return this.Hb&&this.Hb.ih()?!0:!1};c.prototype.Pe=function(){return this.Hb&&this.Hb.Pe()?!0:!1};c.prototype.qs=function(a,b,e){this.C.ce=this.C.ki;this.C.sg=this.C.ai;this.C.enabled=
!0;this.C.sf=this.C.enabled;this.C.active=!0;this.C.Bd=0;var g=new Date;this.C.Qd=0;this.C.startTime=g.getTime();a&&0!=a&&(this.C.speed=a);b&&(this.C.timeout=b);e&&(this.C.wj=e);this.M("autorotatechanged",{})};c.prototype.ts=function(){this.C.active=!1;this.C.enabled=!1;this.C.sf=this.C.enabled;this.qf=this.C.Vi=!1;this.G.active&&this.G.Ah&&(this.G.active=!1,this.G.Ah=!1,this.G.Pb=0);this.M("autorotatechanged",{})};c.prototype.zs=function(){this.C.enabled=!this.C.active;this.C.sf=this.C.enabled;this.C.active=
this.C.enabled;this.C.Bd=0;if(this.C.enabled){var a=new Date;this.C.Qd=0;this.C.startTime=a.getTime();this.C.ce=this.C.ki;this.C.sg=this.C.ai}this.M("autorotatechanged",{})};c.prototype.Jr=function(a){this.C.Zf=a;this.C.nn=!0};c.prototype.ps=function(a){this.zb.running&&this.Pn();this.Zb="";a&&""!=a&&(this.C.ce=a);this.C.sf=this.C.enabled;this.C.sg=!0;this.C.enabled=!0;this.C.active=!0;this.C.Bd=0;a=new Date;this.C.Qd=0;this.C.startTime=a.getTime();this.M("autorotatechanged",{})};c.prototype.Pn=function(){this.zb.running=
!1;this.zb.finished=!0;this.C.active=this.K.ze;this.xa.splice(this.xa.indexOf(this.J),1);0<this.xa.length&&(this.J=this.xa[0]);this.Zb="";this.fj(!1);this.K.ze=!1;this.Uf=(new Date).getTime()};c.prototype.Wl=function(a){if(this.rd=document.getElementById(a)){this.rd.innerHTML="";this.aa=document.createElement("div");this.aa.onselectstart=function(){return!1};Gl&&this.aa.setAttribute("id","viewport");a="top:\t0px;left: 0px;position:relative;-ms-touch-action: none;touch-action: none;text-align: left;"+
(this.Qa+"user-select: none;");this.aa.setAttribute("style",a);this.rd.appendChild(this.aa);this.N=document.createElement("div");a="top:\t0px;left: 0px;width: 100px;height: 100px;overflow: hidden;position:absolute;-ms-touch-action: none;touch-action: none;"+(this.Qa+"user-select: none;");Gl&&this.N.setAttribute("id","viewer");this.N.setAttribute("style",a);this.aa.appendChild(this.N);if(this.Rb){var b=document.createElement("div");a="top:\t0px;left: 0px;width: 100%;height: 100%;overflow: hidden;position:absolute;-ms-touch-action: none;touch-action: none;"+
(this.Qa+"user-select: none;");b.setAttribute("id",this.mk);b.setAttribute("style",a);this.N.appendChild(b)}this.Ua&&(this.Ua.pd=document.createElement("canvas"),Gl&&this.Ua.pd.setAttribute("id","lensflarecanvas"),a="top:\t0px;left: 0px;width: 100px;height: 100px;overflow: hidden;position:absolute;"+(this.Qa+"user-select: none;"),a+=this.Qa+"pointer-events: none;",this.Ua.pd.setAttribute("style",a),this.aa.appendChild(this.Ua.pd));this.Sa=document.createElement("div");Gl&&this.Sa.setAttribute("id",
"hotspots");a="top:\t0px;left: 0px;width: 100px;height: 100px;overflow: hidden;position:absolute;";this.Ck&&(a+="background-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);");this.nc&&!this.ja&&(a+=this.Qa+"transform: translateZ(9999999px);");a+=this.Qa+"user-select: none;";this.Sa.setAttribute("style",a);this.aa.appendChild(this.Sa);this.Ka=document.createElement("canvas");Gl&&this.Ka.setAttribute("id","hotspotcanvas");a="top:\t0px;left: 0px;width: 100px;height: 100px;overflow: hidden;position:absolute;"+
(this.Qa+"user-select: none;");a+=this.Qa+"pointer-events: none;";this.Ka.setAttribute("style",a);this.aa.appendChild(this.Ka);this.Ia=document.createElement("div");Gl&&this.Ia.setAttribute("id","hotspottext");this.Ia.setAttribute("style","top:\t0px;left: 0px;position:absolute;padding: 3px;visibility: hidden;");this.Ia.classList.add("ggskin");this.Ia.classList.add("ggdefaulthotspot");this.Ia.innerHTML=" Hotspot text!";this.aa.appendChild(this.Ia);this.divSkin=this.ua=this.Sa;this.dl(0)}else alert("container not found!")};
c.prototype.Yl=function(a){this.Oa=!0;return function(){a.cb&&(a.v&&a.v.complete?(a.loaded=!0,a.cb.drawImage(a.v,0,0,a.width,a.height),a.v=null,a.Ud=null):a.Ud&&a.Ud.complete&&!a.loaded&&(a.cb.drawImage(a.Ud,0,0,a.width,a.height),a.Ud=null))}};c.prototype.Vl=function(a){var b,e=128;this.v.eg&&(this.N.style.backgroundColor=this.v.eg.replace("0x","#"));a?(e=this.Cg,this.hf=1):this.Ic>e&&(e=this.Ic);for(b=0;6>b;b++){var g=this.cube.faces[b];a?(g.width=this.Cg,g.height=this.Cg):(g.W=document.createElement("canvas"),
g.W.width=this.Ic,g.W.height=this.Ic,g.width=this.Ic,g.height=this.Ic,g.cb=g.W.getContext("2d"));var f="position:absolute;";f+="left: 0px;";f+="top: 0px;";f+="width: "+e+"px;";f+="height: "+e+"px;";a&&(f+="outline: 1px solid transparent;");f+=this.Qa+"transform-origin: 0% 0%;";f+="-webkit-user-select: none;";f+=this.Qa+"transform: ";var h="";var l=1;this.gg&&(l=100);h=4>b?h+("rotateY("+-90*b+"deg)"):h+("rotateX("+(4==b?-90:90)+"deg)");this.gg&&(h+=" scale("+l+")");h+=" translate3d("+-e/2+"px,"+-e/
2+"px,"+-e*l/(2*this.hf)+"px)";f+=h+";";g.Lm=h;a||(g.W.setAttribute("style",f),this.N.insertBefore(g.W,this.N.firstChild))}if(!a){for(b=0;6>b;b++)g=this.cube.faces[b],""!=this.Af[b]&&(g.Ud=new Image,g.Ud.crossOrigin=this.crossOrigin,g.Ud.onload=this.Yl(g),g.Ud.setAttribute("src",this.fb(this.Af[b])),this.kc.push(g.Ud));for(b=0;6>b;b++)g=this.cube.faces[b],g.loaded=!1,g.v=new Image,g.v.crossOrigin=this.crossOrigin,g.v.onload=this.Yl(g),g.v.setAttribute("src",this.fb(this.Kg[b])),this.kc.push(g.v)}};
c.prototype.Ze=function(){var a;this.La.oa.x=0;this.La.oa.y=0;if(this.nd){for(a=0;a<this.cube.faces.length;a++)this.cube.faces[a].W&&this.cube.faces[a].W.setAttribute&&(this.cube.faces[a].W.setAttribute("src",this.cm),this.N.removeChild(this.cube.faces[a].W));if(this.v.levels){for(a=0;a<this.v.levels.length;a++){var b=this.v.levels[a];for(g in b.ba)if(b.ba.hasOwnProperty(g)){var e=b.ba[g];e.visible=!1;e.W&&(e.cb&&e.cb.clearRect(0,0,e.cb.canvas.width,e.cb.canvas.height),this.yj.push(e.W));e.v&&delete e.v;
e.sb&&(this.S.deleteTexture(e.sb),this.wd--);e.cb=null;e.W=null;e.v=null}delete b.ba}delete this.v.levels;this.v.levels=null}}this.Ba.Ze();var g=[];for(a=0;a<this.T.length;a++)b=this.T[a],b.kd?g.push(b):b.Ye();for(a=0;a<this.gb.length;a++)this.gb[a].Ye();this.I.mh=-1;this.Ka.style.visibility="hidden";this.Ya=0;this.ef=[];this.Ja.Vh=[];for(a=0;a<this.Y.length;a++)b=this.Y[a],0==b.mode||b.mn||this.ef.push(b);this.T=g;this.gb=[];this.F.j&&(this.aa.removeChild(this.F.j),this.F.j=null,a=this.pb("_videopanorama"),
0<a.length&&(a[0].j=null));this.F.Ad=!1;this.F.Mi=!1};c.prototype.Hm=function(){var a=1,b=-1!=navigator.userAgent.indexOf("Mac");window.devicePixelRatio&&b&&(a=window.devicePixelRatio);return{w:screen.width*a,h:screen.height*a}};c.prototype.Am=function(){var a=this.Hm();return a.w>a.h?a.w:a.h};c.prototype.Wk=function(a,b){var e=(new DOMParser).parseFromString(a,"text/xml");this.ck=a;this.An(e,b);this.sa&&(this.O("Apply to Flash player"),this.sa.readConfigString(this.ck),this.sa.setLocked(!0),this.sa.setSlaveMode(!0))};
c.prototype.zn=function(a,b,e){try{var g=void 0;g=new XMLHttpRequest;g.open("GET",a,!1);g.send(null);if(g.responseXML){var f=a.lastIndexOf("/");0<=f&&(this.de=a.substr(0,f+1));2<=arguments.length&&null!=b&&(this.de=b);this.Wk(g.responseText,e)}else alert("Error loading panorama XML")}catch(h){alert("Error:"+h)}};c.prototype.Br=function(a,b,e,g){var f=new XMLHttpRequest;var h=this;f.onload=function(l){if(4<=f.readyState)if(f.responseXML){var k=a.lastIndexOf("/");0<=k&&(h.de=a.substr(0,k+1));3<=arguments.length&&
null!=e&&(h.de=e);h.Wk(f.responseText,g);b&&b()}else alert("Error loading panorama XML");else console.error("Wrong state loading XML:"+f.statusText)};f.onerror=function(){console.error("Error loading XML:"+f.statusText)};f.open("GET",a,!0);f.send(null)};c.prototype.Sj=function(a){var b="";"{"==a.charAt(0)&&(b=a.substr(1,a.length-2));(a=this.ee[b])&&(b=a);a={oldNodeId:this.Ra,nodeId:b};this.M("beforechangenodeid",a);this.sk?this.sk=!1:this.Pk.push(this.Ra);""!=this.Ra&&-1==this.Ej.indexOf(this.Ra)&&
(this.Ej.push(this.Ra),this.M("changevisitednodes",{}));this.en=this.Ra;this.Ra=b;this.O("change active node: "+b);this.ma&&this.ma.changeActiveNode&&this.ma.changeActiveNode("{"+b+"}");this.M("changenodeid",a);this.Gf=!0};c.prototype.nk=function(){return this.Ra};c.prototype.cq=function(){if(0<this.Za.length){var a=this.Za.indexOf(this.Ra);a++;a>=this.Za.length&&(a=0);return this.Za[a]}return""};c.prototype.pq=function(){if(0<this.Za.length){var a=this.Za.indexOf(this.Ra);a--;0>a&&(a=this.Za.length-
1);return this.Za[a]}return""};c.prototype.Vp=function(){return this.en};c.prototype.ar=function(a){return-1!=this.Ej.indexOf(a)};c.prototype.tp=function(){this.Ej=[];this.M("changevisitednodes",{})};c.prototype.An=function(a,b){var e=a.firstChild;this.$d=[];this.Za=[];this.ee=[];for(a=e.firstChild;a;){if("map"==a.nodeName){var g={},f=a.getAttributeNode("title");f&&(g.title=f.nodeValue.toString());f=a.getAttributeNode("type");g.type=f.nodeValue.toString();"web"==g.type?(f=a.getAttributeNode("mapprovider"),
g.mapprovider=f.nodeValue.toString(),(f=a.getAttributeNode("mapstyle"))&&(g.mapstyle=f.nodeValue.toString()),(f=a.getAttributeNode("googlecustomstylecode"))&&(g.googlecustomstylecode=f.nodeValue.toString()),(f=a.getAttributeNode("mapurltemplate"))&&(g.mapurltemplate=f.nodeValue.toString()),(f=a.getAttributeNode("mapmaxzoom"))&&(g.mapmaxzoom=Number(f.nodeValue)),(f=a.getAttributeNode("mapkey"))&&(g.mapkey=f.nodeValue.toString()),(f=a.getAttributeNode("styleurl"))&&(g.styleurl=f.nodeValue.toString())):
(f=a.getAttributeNode("width"),g.width=Number(f.nodeValue),f=a.getAttributeNode("height"),g.height=Number(f.nodeValue),f=a.getAttributeNode("zoomlevels"),g.zoomlevels=Number(f.nodeValue),f=a.getAttributeNode("tileformat"),g.tileformat=f.nodeValue.toString(),f=a.getAttributeNode("bgcolor"),g.bgcolor=f.nodeValue.toString(),f=a.getAttributeNode("transparent"),g.transparent=1==f.nodeValue,f=a.getAttributeNode("floorplannorth"),g.floorplannorth=Number(f.nodeValue));f=a.getAttributeNode("id");this.Ui[f.nodeValue.toString()]=
g}a=a.nextSibling}if("tour"==e.nodeName){this.Tf=!0;a="";(f=e.getAttributeNode("start"))&&(a=f.nodeValue.toString());this.hasOwnProperty("startNode")&&this.startNode&&(a=String(this.startNode),this.startNode="");this.hasOwnProperty("startView")&&this.startView&&("object"===typeof this.startView&&null!==this.startView?b=this.startView:""!=this.startView&&(b=String(this.startView)),this.startView="");g=e.firstChild;var h="";for(e="";g;){if("panorama"==g.nodeName){if(f=g.getAttributeNode("id"))h=f.nodeValue.toString(),
""==a&&(a=h),""==e&&(e=h),this.$d[h]=g,this.Za.push(h);for(f=g.firstChild;f;){if("userdata"==f.nodeName){var l=this.Pg(f);this.bi[h]=l;h==a&&(this.bi._first=l);l.customnodeid&&(this.ee[l.customnodeid]=h);this.Rc[h]=this.dm(f);this.Yf[h]=this.em(f)}f=f.nextSibling}}if("masternode"==g.nodeName)for(f=g.firstChild;f;)"userdata"==f.nodeName&&(l=this.Pg(f),this.bi._master=l),f=f.nextSibling;g=g.nextSibling}this.$d.hasOwnProperty(a)||(f=this.ee[a])&&(a=f);this.$d.hasOwnProperty(a)||(this.Qc("Start node "+
a+" not found!"),a=e);this.Vk(this.$d[a],b);this.Sj("{"+a+"}");this.Ra=a}else this.Tf=!1,this.Vk(e,b),this.Sj(""),this.Za.push("");this.xe&&(this.O("add pano vr config"),this.Hb.hi());this.M("configloaded",{});this.M("changenode",{});this.M("playerstatechanged",{})};c.prototype.Vk=function(a,b){var e=this;this.Fn();this.Ua&&this.Ua.Dr();this.jg(this.lb);this.Ze();this.nh=0;this.Jb=this.Td=null;for(var g=a.firstChild,f,h,l=0;g;){if("view"==g.nodeName){if(f=g.getAttributeNode("fovmode"))this.fov.mode=
Number(f.nodeValue);f=g.getAttributeNode("pannorth");this.pan.Qk=1*(f?f.nodeValue:0);for(var k=g.firstChild;k;){"start"==k.nodeName&&(f=k.getAttributeNode("pan"),this.pan.m=Number(f?f.nodeValue:0),this.pan.eb=this.pan.m,f=k.getAttributeNode("tilt"),this.A.m=Number(f?f.nodeValue:0),this.A.eb=this.A.m,f=k.getAttributeNode("roll"),this.V.m=Number(f?f.nodeValue:0),this.V.eb=this.V.m,f=k.getAttributeNode("fov"),this.fov.m=Number(f?f.nodeValue:70),this.fov.eb=this.fov.m,f=k.getAttributeNode("projection"),
this.$i=Number(f?f.nodeValue:4),this.Vc(this.$i));"min"==k.nodeName&&(f=k.getAttributeNode("pan"),this.pan.min=1*(f?f.nodeValue:0),f=k.getAttributeNode("tilt"),this.A.min=1*(f?f.nodeValue:-90),f=k.getAttributeNode("fov"),this.fov.min=1*(f?f.nodeValue:5),1E-20>this.fov.min&&(this.fov.min=1E-20),f=k.getAttributeNode("fovpixel"),this.fov.yh=1*(f?f.nodeValue:0));if("max"==k.nodeName){f=k.getAttributeNode("pan");this.pan.max=1*(f?f.nodeValue:0);f=k.getAttributeNode("tilt");this.A.max=1*(f?f.nodeValue:
90);f=k.getAttributeNode("fov");this.fov.max=1*(f?f.nodeValue:120);180<=this.fov.max&&(this.fov.max=179.9);if(f=k.getAttributeNode("fovstereographic"))this.fov.Ok=1*f.nodeValue;if(f=k.getAttributeNode("fovfisheye"))this.fov.Nk=1*f.nodeValue;if(f=k.getAttributeNode("scaletofit"))this.L.Nn=1==f.nodeValue}if("flyin"==k.nodeName){if(f=k.getAttributeNode("projection"))this.Lc.Pb=Number(f.nodeValue);if(f=k.getAttributeNode("pan"))this.Lc.pan=parseFloat(f.nodeValue);if(f=k.getAttributeNode("tilt"))this.Lc.A=
parseFloat(f.nodeValue);if(f=k.getAttributeNode("fov"))this.Lc.fov=parseFloat(f.nodeValue)}k=k.nextSibling}}if("autorotate"==g.nodeName){if(f=g.getAttributeNode("speed"))this.C.speed=1*f.nodeValue;if(f=g.getAttributeNode("delay"))this.C.timeout=1*f.nodeValue;if(f=g.getAttributeNode("returntohorizon"))this.C.wj=1*f.nodeValue;if(f=g.getAttributeNode("nodedelay"))this.C.Zi=1*f.nodeValue;if(f=g.getAttributeNode("noderandom"))this.C.pn=1==f.nodeValue;(f=g.getAttributeNode("nodefilter"))&&!this.C.nn&&(this.C.Zf=
f.nodeValue);this.ge&&(this.C.enabled=!0,this.C.sf=!0,this.C.active=!1);this.C.Qd=0;if(f=g.getAttributeNode("startloaded"))this.C.Qh=1==f.nodeValue,this.C.Qh&&(this.C.active=!1);if(f=g.getAttributeNode("useanimation"))this.C.ai=1==f.nodeValue,this.C.sg=this.C.ai;if(f=g.getAttributeNode("syncanimationwithvideo"))this.C.ml=1==f.nodeValue}if("animation"==g.nodeName){if(f=g.getAttributeNode("syncanimationwithvideo"))this.C.ml=1==f.nodeValue;if(f=g.getAttributeNode("useinautorotation"))this.C.ai=1==f.nodeValue;
if(f=g.getAttributeNode("animsequence"))this.C.ki=f.nodeValue,this.ge&&(this.C.ce=this.C.ki);this.xa=[];for(k=g.firstChild;k;){if("clip"==k.nodeName){this.J=new x.xl;if(f=k.getAttributeNode("animtitle"))this.J.rf=f.nodeValue.toString();if(f=k.getAttributeNode("cliptitle"))this.J.bb=f.nodeValue.toString();if(f=k.getAttributeNode("nodeid"))this.J.ct=f.nodeValue.toString();if(f=k.getAttributeNode("length"))this.J.length=Number(f.nodeValue);if(f=k.getAttributeNode("animtype"))this.J.bp=Number(f.nodeValue);
if(f=k.getAttributeNode("nextcliptitle"))this.J.kn=f.nodeValue.toString();if(f=k.getAttributeNode("nextclipnodeid"))this.J.Yi=f.nodeValue.toString();if(f=k.getAttributeNode("nextclipstartview"))this.J.$q=f.nodeValue.toString();if(f=k.getAttributeNode("transitiontype"))this.J.Fs=Number(f.nodeValue);var w=k.firstChild;for(this.J.da=[];w;){if("keyframe"==w.nodeName){var r=new x.ad;if(f=w.getAttributeNode("time"))r.time=Number(f.nodeValue);if(f=w.getAttributeNode("value"))r.value=Number(f.nodeValue);
if(f=w.getAttributeNode("valuestring"))r.tl=f.nodeValue.toString();if(f=w.getAttributeNode("transitiontime"))r.Gb=Number(f.nodeValue);f=w.getAttributeNode("type");var y=0;f&&(r.type=Number(f.nodeValue),y=Number(f.nodeValue));if(f=w.getAttributeNode("property"))r.ub=Number(f.nodeValue);if(f=w.getAttributeNode("additionaltrackid"))r.ii=f.nodeValue.toString();if(1==y||2==y){if(f=w.getAttributeNode("bezierintime"))r.Ae=Number(f.nodeValue);if(f=w.getAttributeNode("bezierinvalue"))r.Be=Number(f.nodeValue);
if(f=w.getAttributeNode("bezierouttime"))r.Ce=Number(f.nodeValue);if(f=w.getAttributeNode("bezieroutvalue"))r.De=Number(f.nodeValue)}this.J.da.push(r)}w=w.nextSibling}this.xa.push(this.J)}k=k.nextSibling}}"input"==g.nodeName&&(h||(h=g));if(h)for(w=0;6>w;w++)f=h.getAttributeNode("prev"+w+"url"),this.Af[w]=f?String(f.nodeValue):"";"altinput"==g.nodeName&&(k=0,(f=g.getAttributeNode("screensize"))&&(k=1*f.nodeValue),0<k&&k<=this.Am()&&k>l&&(l=k,h=g));if("control"==g.nodeName&&this.ge){if(f=g.getAttributeNode("simulatemass"))this.La.enabled=
1==f.nodeValue;if(f=g.getAttributeNode("rubberband"))this.L.Ln=1==f.nodeValue;if(f=g.getAttributeNode("locked"))this.L.oc=1==f.nodeValue;f&&(this.L.uh=1==f.nodeValue);if(f=g.getAttributeNode("lockedmouse"))this.L.oc=1==f.nodeValue;if(f=g.getAttributeNode("lockedkeyboard"))this.L.uh=1==f.nodeValue;if(f=g.getAttributeNode("lockedkeyboardzoom"))this.L.Pq=1==f.nodeValue;if(f=g.getAttributeNode("lockedwheel"))this.L.ke=1==f.nodeValue;if(f=g.getAttributeNode("invertwheel"))this.L.Um=1==f.nodeValue;if(f=
g.getAttributeNode("speedwheel"))this.L.co=1*f.nodeValue;if(f=g.getAttributeNode("invertcontrol"))this.L.Od=1==f.nodeValue;if(f=g.getAttributeNode("sensitivity"))this.L.sensitivity=1*f.nodeValue,1>this.L.sensitivity&&(this.L.sensitivity=1);if(f=g.getAttributeNode("dblclickfullscreen"))this.L.ek=1==f.nodeValue;if(f=g.getAttributeNode("contextfullscreen"))this.L.Hg=1==f.nodeValue;if(f=g.getAttributeNode("contextvr"))this.L.Ig=1==f.nodeValue;if(f=g.getAttributeNode("contextprojections"))this.L.oi=1==
f.nodeValue;if(f=g.getAttributeNode("hideabout"))this.L.Nf=1==f.nodeValue;for(k=g.firstChild;k;)"menulink"==k.nodeName&&(w={text:"",url:""},f=k.getAttributeNode("text"),w.text=f.nodeValue,f=k.getAttributeNode("url"),w.url=f.nodeValue,this.xh.push(w)),k=k.nextSibling}if("transition"==g.nodeName&&this.ge){if(f=g.getAttributeNode("enabled"))this.K.enabled=1==f.nodeValue;if(f=g.getAttributeNode("blendtime"))this.K.Bg=1*f.nodeValue;if(f=g.getAttributeNode("blendcolor"))this.K.uf=f.nodeValue.toString();
if(f=g.getAttributeNode("type"))this.K.type=f.nodeValue.toString();if(f=g.getAttributeNode("softedge"))this.K.Wc=1*f.nodeValue;if(f=g.getAttributeNode("zoomin"))this.K.ta=1*f.nodeValue;if(f=g.getAttributeNode("zoomout"))this.K.xc=1*f.nodeValue;if(f=g.getAttributeNode("zoomfov"))this.K.Ij=1*f.nodeValue;if(f=g.getAttributeNode("zoomafterinfov"))this.K.Gj=1*f.nodeValue;if(f=g.getAttributeNode("zoomafteroutfov"))this.K.Hj=1*f.nodeValue;if(f=g.getAttributeNode("zoomspeed"))this.K.ye=1*f.nodeValue;if(f=
g.getAttributeNode("zoomoutpause"))this.K.wg=1==f.nodeValue;"cut"==this.K.type&&(this.K.Bg=0)}if("soundstransition"==g.nodeName){if(f=g.getAttributeNode("enabled"))this.Ja.enabled=1==f.nodeValue;if(f=g.getAttributeNode("transitiontime"))this.Ja.Gb=1*f.nodeValue;if(f=g.getAttributeNode("crossfade"))this.Ja.pi=1==f.nodeValue}if("flyintransition"==g.nodeName){if(f=g.getAttributeNode("enabled"))this.zb.enabled=1==f.nodeValue&&this.ja;if(f=g.getAttributeNode("speed"))this.zb.speed=1*f.nodeValue}"userdata"==
g.nodeName&&(this.userdata=this.tg=this.Pg(g),this.Rc[a.id]||(this.Rc[a.id]=this.dm(g),this.Yf[a.id]=this.em(g)));if("hotspots"==g.nodeName)for(k=g.firstChild;k;){if("label"==k.nodeName&&this.ge){w=this.I.tj;if(f=k.getAttributeNode("enabled"))w.enabled=1==f.nodeValue;if(f=k.getAttributeNode("width"))w.width=1*f.nodeValue;if(f=k.getAttributeNode("height"))w.height=1*f.nodeValue;if(f=k.getAttributeNode("textcolor"))w.uj=1*f.nodeValue;if(f=k.getAttributeNode("textalpha"))w.sj=1*f.nodeValue;if(f=k.getAttributeNode("background"))w.background=
1==f.nodeValue;if(f=k.getAttributeNode("backgroundalpha"))w.ec=1*f.nodeValue;if(f=k.getAttributeNode("backgroundcolor"))w.fc=1*f.nodeValue;if(f=k.getAttributeNode("border"))w.li=1*f.nodeValue;if(f=k.getAttributeNode("bordercolor"))w.ic=1*f.nodeValue;if(f=k.getAttributeNode("borderalpha"))w.hc=1*f.nodeValue;if(f=k.getAttributeNode("borderradius"))w.Oj=1*f.nodeValue;if(f=k.getAttributeNode("wordwrap"))w.Fj=1==f.nodeValue}if("polystyle"==k.nodeName&&this.ge){if(f=k.getAttributeNode("mode"))this.I.mode=
1*f.nodeValue;if(f=k.getAttributeNode("bordercolor"))this.I.ic=1*f.nodeValue;if(f=k.getAttributeNode("backgroundcolor"))this.I.fc=1*f.nodeValue;if(f=k.getAttributeNode("borderalpha"))this.I.hc=1*f.nodeValue;if(f=k.getAttributeNode("backgroundalpha"))this.I.ec=1*f.nodeValue;if(f=k.getAttributeNode("handcursor"))this.I.Lf=1==f.nodeValue}f=void 0;"hotspot"==k.nodeName&&(f=new x.gi(this),f.type="point",f.ac(k),this.X.push(f));"polyhotspot"==k.nodeName&&(f=new x.gi(this),f.type="poly",f.ac(k),this.X.push(f));
k=k.nextSibling}if("sounds"==g.nodeName||"media"==g.nodeName)for(k=g.firstChild;k;){if("sound"==k.nodeName&&!this.ln)for(f=new x.Cl(this),f.ac(k),this.Rb||f.addElement(),w=0;w<this.ef.length;w++)f.id==this.ef[w].id&&(this.ef.splice(w,1),w--);"video"==k.nodeName&&(f=new x.Dl(this),f.ac(k),this.Rb||f.addElement());"image"==k.nodeName&&(f=new x.Ro(this),f.ac(k),this.Rb||f.addElement());"lensflare"==k.nodeName&&this.Ua&&(f=new x.So(this),f.ac(k),this.Ua.th.push(f));k=k.nextSibling}g=g.nextSibling}for(w=
0;w<this.ef.length;w++){a=this.ef[w];if(this.va&&this.Ja.enabled&&this.isPlaying(a.id))this.Ja.Vh.push(a);else{try{a.ya?a.xf():a.j.pause()}catch(ha){this.O(ha)}a.Ye()}this.Y.splice(this.Y.indexOf(a),1)}1!=this.K.ta&&2!=this.K.ta&&6!=this.K.ta&&this.gm();this.nb.Kh=!0;b&&("object"===typeof b&&null!==b?(b.hasOwnProperty("pan")&&this.cf(Number(b.pan)),b.hasOwnProperty("tilt")&&this.df(Number(b.tilt)),b.hasOwnProperty("projection")&&this.Vc(Number(b.projection)),b.hasOwnProperty("fov")&&this.bf(Number(b.fov))):
""!=b&&(b=b.toString().split("/"),4<b.length&&this.Vc(Number(b[4])),0<b.length&&(f=String(b[0]),"N"==f.charAt(0)?this.cl(Number(f.substr(1))):"S"==f.charAt(0)?this.cl(-180+Number(f.substr(1))):this.cf(Number(f))),1<b.length&&this.df(Number(b[1])),2<b.length&&this.bf(Number(b[2]))),this.pan.open=this.pan.m);if(h){f=h.getAttributeNode("stereo");this.Pd=!1;f&&1==f.nodeValue&&(this.Pd=!0);f=h.getAttributeNode("fliplr");this.Rh=!1;f&&1==f.nodeValue&&(this.Rh=!0);for(w=0;w<(this.Pd?12:6);w++)(f=h.getAttributeNode("tile"+
w+"url"))&&(this.Kg[w]=String(f.nodeValue));for(w=0;6>w;w++)(f=h.getAttributeNode("prev"+w+"url"))&&(this.Af[w]=String(f.nodeValue));if(f=h.getAttributeNode("tilevrurl"))this.Xl=String(f.nodeValue);if(f=h.getAttributeNode("tilesize"))this.Ic=1*f.nodeValue;if(f=h.getAttributeNode("canvassize"))this.Cg=Number(f.nodeValue);if(f=h.getAttributeNode("tilescale"))this.hf=1*f.nodeValue;if(f=h.getAttributeNode("leveltileurl"))this.v.Kk=f.nodeValue;if(f=h.getAttributeNode("leveltilesize"))this.v.P=Number(f.nodeValue);
if(f=h.getAttributeNode("levelbias"))this.v.Ik=Number(f.nodeValue);if(f=h.getAttributeNode("levelbiashidpi"))this.v.Jk=Number(f.nodeValue);f=h.getAttributeNode("overlap");this.Pa.V=0;this.Pa.pitch=0;f&&(this.v.Ea=Number(f.nodeValue));if(f=h.getAttributeNode("levelingroll"))this.Pa.V=Number(f.nodeValue);if(f=h.getAttributeNode("levelingpitch"))this.Pa.pitch=Number(f.nodeValue);this.Ya=0;(f=h.getAttributeNode("flat"))&&1==f.nodeValue&&(this.Ya=2);f=h.getAttributeNode("width");this.v.width=1*(f?f.nodeValue:
1);f=h.getAttributeNode("height");this.v.height=1*(f?f.nodeValue:this.v.width);this.F.src=[];this.v.levels=[];for(k=h.firstChild;k;){if("preview"==k.nodeName){if(f=k.getAttributeNode("color"))this.v.eg=f.nodeValue;if(f=k.getAttributeNode("strip"))this.v.xn=1==f.nodeValue}if("video"==k.nodeName){if(f=k.getAttributeNode("format"))"3x2"==f.nodeValue&&(this.F.format=14),"equirectangular"==f.nodeValue&&(this.F.format=1);if(f=k.getAttributeNode("flipy"))this.F.flipY=Number(f.nodeValue);if(f=k.getAttributeNode("startonload"))this.F.il=
1==f.nodeValue;if(f=k.getAttributeNode("startmutedmobile"))this.F.fo=1==f.nodeValue;if(f=k.getAttributeNode("bleed"))this.F.tf=Number(f.nodeValue);if(f=k.getAttributeNode("endaction"))this.F.Ie=String(f.nodeValue);if(f=k.getAttributeNode("targetview"))this.F.nl=String(f.nodeValue);if(f=k.getAttributeNode("width"))this.F.width=Number(f.nodeValue);if(f=k.getAttributeNode("height"))this.F.height=Number(f.nodeValue);for(w=k.firstChild;w;)"source"==w.nodeName&&(f=w.getAttributeNode("url"))&&this.F.src.push(f.nodeValue.toString()),
w=w.nextSibling}if("level"==k.nodeName){h=new x.Al;f=k.getAttributeNode("width");h.width=1*(f?f.nodeValue:1);f=k.getAttributeNode("height");h.height=1*(f?f.nodeValue:h.width);if(f=k.getAttributeNode("preload"))h.cache=1==f.nodeValue;if(f=k.getAttributeNode("preview"))h.Xe=1==f.nodeValue;h.U=Math.floor((h.width+this.v.P-1)/this.v.P);h.fa=Math.floor((h.height+this.v.P-1)/this.v.P);this.v.levels.push(h)}k=k.nextSibling}this.v.Gk=this.v.levels.length}this.Mf=!0;this.Yh&&(this.ja=this.nd=!1,this.Ac||(this.O("dummy rendering"),
this.Ac=document.createElement("canvas"),this.Ac.width=100,this.Ac.height=100,this.Ac.id="dummycanvas",this.N.appendChild(this.Ac)),this.Jc());this.ja&&this.S&&(this.Ba.Sm(this.hf),this.Ba.Tm());this.nd&&(0<this.v.levels.length?this.Vl(!0):this.Vl(!1),this.nh=0);var z=this;0<this.v.levels.length&&this.v.xn&&0==this.Ya&&(b=new Image,h=new x.Al,h.Xe=!0,h.cache=!0,h.U=h.fa=0,h.height=h.width=0,this.v.levels.push(h),b.crossOrigin=this.crossOrigin,b.onload=this.Ba.Zq(b),b.setAttribute("src",this.ue(6,
this.v.Gk-1,0,0)));if(0<this.F.src.length&&this.ja)if(this.Zh){this.F.j=document.createElement("video");this.F.j.crossOrigin=this.crossOrigin;this.F.j.setAttribute("style","display:none; max-width:none;");this.F.j.setAttribute("playsinline","playsinline");this.F.j.preload=!0;this.F.j.volume=this.ca;this.aa.appendChild(this.F.j);this.F.Ad=!1;this.F.lo=!1;this.F.j.oncanplay=function(){if(!z.F.Ad){z.F.Mi=!0;var ha,ua,id=[],sh=new x.Ha,db=z.S,gl=z.F.j.videoWidth/3;z.F.width=z.F.j.videoWidth;z.F.height=
z.F.j.videoHeight;for(ha=0;6>ha;ha++){var tf=ha%3*gl+z.F.tf;var hl=tf+gl-2*z.F.tf;var il=4;3>ha&&(il+=gl);var ll=il+gl-2*z.F.tf;for(ua=0;4>ua;ua++){sh.x=-1;sh.y=-1;sh.z=1;for(var kl=0;kl<ua;kl++)sh.Kn();id.push((0<sh.x?tf:hl)/(3*gl),(0<sh.y?ll:il)/(2*gl))}}db.bindBuffer(db.ARRAY_BUFFER,z.F.rj);db.bufferData(db.ARRAY_BUFFER,new Float32Array(id),db.STATIC_DRAW)}};this.F.yb=function(){var ha=z.pb("_videopanorama");return 0<ha.length&&ha[0].yb?ha[0].yb:0};this.F.On=function(ha){var ua=z.pb("_videopanorama");
0<ua.length&&(ua[0].yb=ha)};this.F.loop=function(){return 0<z.F.yb()?(z.F.On(z.F.yb()-1),z.F.j.play(),!0):!1};"exit"==this.F.Ie?this.F.j.onended=function(){z.F.Mi=!1;z.F.Ad=!1;z.aa.removeChild(z.F.j);z.F.j=null;z.update()}:"stop"==this.F.Ie?z.F.j.onended=function(){z.F.loop()||z.update()}:"{"==this.F.Ie.charAt(0)?this.F.j.onended=function(){z.ld(z.F.Ie,z.F.nl)}:this.F.j.loop=!0;for(w=0;w<this.F.src.length;w++)h=document.createElement("source"),h.setAttribute("src",this.fb(this.F.src[w])),this.F.j.appendChild(h);
h=this.pb("_videopanorama");0<h.length?h[0].j=this.F.j:this.Bn("_videopanorama",this.F.j);if(this.F.il&&(h=this.F.j.play(),void 0!==h))h.then(function(){})["catch"](function(){e.F.fo&&(e.F.j.muted=!0,e.F.j.play())})}else"{"==this.F.Ie.charAt(0)&&z.ld(z.F.Ie,z.F.nl);this.El();this.K.Ed||this.io();this.update();this.ge&&(this.ge=!1,this.ua&&this.ua.ggViewerInit&&(this.ua.ggViewerInit(),this.M("viewerinit",{})),this.zb.enabled&&0==this.Ya&&this.ja&&(this.Vc(9),this.pan.m=this.Lc.pan,this.A.m=this.Lc.A,
this.fov.m=this.Lc.fov,this.Xa=this.Lc.Pb,this.J=this.Ug(!1),this.pan.m=this.J.da[0].value,this.A.m=this.J.da[1].value,this.fov.m=this.J.da[2].value,3==this.J.da[3].ub&&this.Vc(this.J.da[3].value),this.Zb=this.J.bb,this.fj(!0),this.C.active=!1,this.C.Rg=!0));this.Jc()};c.prototype.Rk=function(a,b){0<a.length&&(".xml"==a.substr(a.length-4)||".swf"==a.substr(a.length-4)||"{"==a.charAt(0)?this.ld(this.fb(a),b):window.open(this.fb(a),b))};c.prototype.rs=function(){this.Mf=this.isLoaded=!1;this.checkLoaded=
this.kc=[];this.Fh=0;this.ua&&this.ua.ggReLoaded&&this.ua.ggReLoaded();this.M("beforechangenode",{})};c.prototype.Cq=function(a){var b="";0<this.Pk.length&&(b=this.Pk.pop());""!=b&&(this.sk=!0);this.ld("{"+b+"}",a)};c.prototype.ld=function(a,b){if(""!=a&&"{}"!=a){var e="";if("{"==a.charAt(0)){e=a.substr(1,a.length-2);var g=this.ee[e];g&&(e=g);if(this.Ra==e&&this.Dg)return;if(!this.$d[e]){this.Qc("invalid node id: "+e);return}}this.rs();this.he&&(this.Oc(0),this.Jc());this.ma&&this.ma.hotspotProxyOut&&
this.ma.hotspotProxyOut(this.za.id,this.za.url);".swf"==a.substr(a.length-4)&&(a=a.substr(0,a.length-4)+".xml");g="";var f=null;"object"===typeof b&&null!==b?f=b:b&&(g=b.toString());b="/"+this.A.m+"/"+this.fov.m+"//"+this.Ta();g=g.replace("$cur",this.pan.m+b);g=g.replace("$(cur)",this.pan.m+b);g=g.replace("$fwd","N"+this.Le()+b);g=g.replace("$(fwd)","N"+this.Le()+b);g=g.replace("$bwd","S"+this.Le()+b);g=g.replace("$(bwd)","S"+this.Le()+b);g=g.replace("$ap",String(this.pan.m));g=g.replace("$(ap)",
String(this.pan.m));g=g.replace("$an",String(this.Le()));g=g.replace("$(an)",String(this.Le()));g=g.replace("$at",String(this.A.m));g=g.replace("$(at)",String(this.A.m));g=g.replace("$af",String(this.fov.m));g=g.replace("$(af)",String(this.fov.m));g=g.replace("$ar",String(this.Ta()));g=g.replace("$(ar)",String(this.Ta()));""!=g&&(b=g.split("/"),3<b.length&&""!=b[3]&&(this.startNode=b[3]));b=null!==f?f:g;this.Fa();if(""!=e){f=this.K;var h=this.S;if(this.$d[e]){this.Dg=!0;if(this.K.enabled&&this.ja&&
this.K.wc){f.Zn=!0;f.we||f.Ed||this.fj(!0);var l=void 0;"wipeleftright"==f.type?l=1:"wiperightleft"==f.type?l=2:"wipetopbottom"==f.type?l=3:"wipebottomtop"==f.type?l=4:"wiperandom"==f.type&&(l=Math.ceil(4*Math.random()));f.dk=l;h.bindFramebuffer(h.FRAMEBUFFER,f.wc);h.viewport(0,0,f.wc.width,f.wc.height);h.clear(h.COLOR_BUFFER_BIT|h.DEPTH_BUFFER_BIT);f.Uh=!0;this.Xh();f.Uh=!1;h.bindFramebuffer(h.FRAMEBUFFER,null);h.viewport(0,0,this.Ab.width,this.Ab.height);h=new Date;this.za!=this.lb&&6!=f.ta?(f.ei=
this.za.$b/this.D.width,f.fi=1-this.za.Db/this.D.height):(f.ei=.5,f.fi=.5);1!=f.ta&&2!=f.ta&&6!=f.ta?(f.jl=h.getTime()+50,f.we=!0):(f.Jo=h.getTime()+50,f.Ed=!0,f.Ib=Math.sin(this.mc()/2*Math.PI/180)/Math.sin(f.Ij/2*Math.PI/180),f.Ib=Math.max(f.Ib,1),f.Io=1/f.ye*f.Ib*.3)}this.Vk(this.$d[e],b);this.Sj(a);if(f.enabled&&this.ja&&0!=f.xc){f.ff=this.Yg();f.gf=this.Di();f.Zd=this.mc();f.Dd=this.Ta();if(1==f.xc||3==f.xc)this.kj(f.Hj);else if(2==f.xc)this.kj(f.Gj);else if(4==f.xc){for(b=e=0;b<this.xa.length;b++)this.xa[b].bb&&
0==this.xa[b].bb.indexOf("__FlyIn")&&(e=this.xa[b]);0!=e?(this.Vc(this.Ci(3,e).value),this.cf(this.Ci(0,e).value),this.df(this.Ci(1,e).value),this.bf(this.Ci(2,e).value)):(this.Vc(this.Lc.Pb),this.cf(this.Lc.pan),this.df(this.Lc.A),this.kj(this.Lc.fov))}f.wg||1==f.ta||2==f.ta||6==f.ta||(4==f.xc?(this.J=this.Ug(!0,f.ff,f.gf,f.Zd),this.Zb=this.J.bb,this.C.active=!0,this.zb.running=!0):this.moveTo(f.ff,f.gf,f.Zd,f.ye,0,f.Dd))}f.Zn=!1;this.sa&&this.sa.openNext(a,g);this.xe&&(this.O("add pano opennext"),
this.Hb.hi());this.K.Ed||this.K.we||(this.ea&&this.$j(),this.Dg=!1)}}else this.zn(a,null,b);this.M("changenode",{});this.update(5)}};c.prototype.fq=function(){return this.Mf?this.Tf?this.Za.slice(0):[""]:[]};c.prototype.Pg=function(a){var b;var e={title:"",description:"",author:"",datetime:"",copyright:"",source:"",information:"",comment:"",latitude:0,longitude:0,altitude:-1E4,heading:0,nodeid:"",customnodeid:"",streetviewlink:"",tags:[]};if(a&&((b=a.getAttributeNode("title"))&&(e.title=b.nodeValue.toString()),
(b=a.getAttributeNode("description"))&&(e.description=b.nodeValue.toString()),(b=a.getAttributeNode("author"))&&(e.author=b.nodeValue.toString()),(b=a.getAttributeNode("datetime"))&&(e.datetime=b.nodeValue.toString()),(b=a.getAttributeNode("copyright"))&&(e.copyright=b.nodeValue.toString()),(b=a.getAttributeNode("source"))&&(e.source=b.nodeValue.toString()),(b=a.getAttributeNode("info"))&&(e.information=b.nodeValue.toString()),(b=a.getAttributeNode("comment"))&&(e.comment=b.nodeValue.toString()),
(b=a.getAttributeNode("latitude"))&&(e.latitude=Number(b.nodeValue)),(b=a.getAttributeNode("longitude"))&&(e.longitude=Number(b.nodeValue)),(b=a.getAttributeNode("nodeid"))&&(e.nodeid=b.nodeValue.toString()),(b=a.getAttributeNode("altitude"))&&(e.altitude=Number(b.nodeValue)),(b=a.getAttributeNode("heading"))&&(e.heading=Number(b.nodeValue)),(b=a.getAttributeNode("customnodeid"))&&(e.customnodeid=b.nodeValue.toString()),(b=a.getAttributeNode("streetviewlink"))&&(e.streetviewlink=b.nodeValue.toString()),
b=a.getAttributeNode("tags"))){a=b.nodeValue.toString().split("|");for(b=0;b<a.length;b++)""==a[b]&&(a.splice(b,1),b--);e.tags=a}return e};c.prototype.dm=function(a){for(var b={},e=a.firstChild;e;){if("mapcoords"==e.nodeName){var g={x:0,y:0};a=e.getAttributeNode("x");g.x=Number(a.nodeValue);a=e.getAttributeNode("y");g.y=Number(a.nodeValue);a=e.getAttributeNode("mapid");b[a.nodeValue.toString()]=g}e=e.nextSibling}return b};c.prototype.em=function(a){for(var b={},e=a.firstChild;e;){if("mapcoords"==
e.nodeName){var g={x:0,y:0};a=e.getAttributeNode("x_floorplan_percent");g.x=Number(a.nodeValue);a=e.getAttributeNode("y_floorplan_percent");g.y=Number(a.nodeValue);a=e.getAttributeNode("mapid");b[a.nodeValue.toString()]=g}e=e.nextSibling}return b};c.prototype.Xg=function(a){return a?this.bi[a]?this.bi[a]:this.Pg():this.tg};c.prototype.qk=function(a){a=this.Xg(a);var b=[];""!=a.latitude&&0!=a.latitude&&0!=a.longitude&&(b.push(a.latitude),b.push(a.longitude));return b};c.prototype.Bm=function(a){for(var b=
[],e=0;e<this.Za.length;e++){var g=this.Za[e],f=this.Xg(g);f&&f.tags.includes(a)&&b.push(g)}return b};c.prototype.iq=function(a){return this.Xg(a).title};c.prototype.eq=function(a,b){var e=-1;a=this.qk(a);b=this.qk(b);if(2==a.length&&2==b.length){e=Math.PI/180*(b[0]-a[0]);var g=Math.PI/180*(b[1]-a[1]);a=Math.sin(e/2)*Math.sin(e/2)+Math.sin(g/2)*Math.sin(g/2)*Math.cos(Math.PI/180*a[0])*Math.cos(Math.PI/180*b[0]);e=12742E3*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}return e};c.prototype.Jf=function(a,
b){var e;for(e=0;e<this.J.da.length;e++)if(this.J.da[e].time==a&&this.J.da[e].ub==b)return this.J.da[e];return!1};c.prototype.Ci=function(a,b){var e;for(e=0;e<b.da.length;e++)if(0==b.da[e].time&&b.da[e].ub==a)return b.da[e];return!1};c.prototype.bq=function(a){var b,e=1E5,g=a,f=!1;for(b=0;b<this.J.da.length;b++)this.J.da[b].ub==a.ub&&this.J.da[b].time>a.time&&this.J.da[b].time<e&&(g=this.J.da[b],e=g.time,f=!0);return f?g:!1};c.prototype.Hp=function(a){for(var b=[],e=0;e<this.J.da.length;e++)if(this.J.da[e].time<=
a&&4==this.J.da[e].ub){for(var g=!1,f=0;f<b.length;f++)if(b[f].ii==this.J.da[e].ii){b[f].time<this.J.da[e].time?b.splice(f,1):g=!0;break}g||b.push(this.J.da[e])}return b};c.prototype.Ug=function(a,b,e,g){for(var f=0;f<this.xa.length;f++)if(this.xa[f].bb&&0==this.xa[f].bb.indexOf("__FlyIn"))return this.xa[f];f=new x.wl;f.bb="__FlyIn";f.se=this.pan.m;f.Ph=this.A.m;f.Wd=this.fov.m;f.Oh=this.Xa;f.Dd=this.$i;a?(f.Cf=!1,f.Ge=!1,f.speed=this.K.ye,f.Yd=b,f.te=e,f.og=g):(f.Cf=!0,f.Ge=!0,f.speed=this.zb.speed,
f.Yd=this.pan.eb,f.te=this.A.eb,f.og=this.fov.eb);return this.pm(f)};c.prototype.pm=function(a){var b=new x.xl;b.bb=a.bb;b.rf="";b.da=[];for(var e=a.Oh!=a.Dd&&-1!=a.Dd;-180>a.Yd;)a.Yd+=360;for(;180<a.Yd;)a.Yd-=360;var g=a.Yd-a.se;if(360==this.pan.max-this.pan.min){for(;-180>g;)g+=360;for(;180<g;)g-=360}var f=a.te-a.Ph,h=a.og-a.Wd,l=Math.round(Math.sqrt(g*g+f*f+h*h)/a.speed*.33);e&&(l=Math.max(10,l));b.length=l;if(a.He){var k=Math.ceil(.7*l);k=Math.min(15,k);k=Math.max(5,k);b.length=l+k;var w=.33*
k}var r=a.og,y=l,z=0,ha=l-1;if(e){var ua=a.Wd;var id=4==a.Dd?120:this.Vg(a.Dd);var sh=a.og;h=sh-a.Wd;var db=new x.Kc(0,a.Wd),gl=new x.Kc(l,sh),tf=new x.Kc,hl=new x.Kc;hl.init(l/3,a.Wd+h/3);tf.init(2*l/3,sh-h/3);if(ua>id)for(;z<=l&&ua>id;)ua=new x.Kc,ua.Nj(db,gl,hl,tf,z),ua=ua.y,z++;else z=1;z>=.8*l&&(y=z=Math.round(.8*l));0==z&&(z=1);id=4==a.Oh?120:this.Vg(a.Oh);ua=a.og;if(ua>id)for(;ha>z&&ua>id;)ua=new x.Kc,ua.Nj(db,gl,hl,tf,ha),ua=ua.y,ha--}db=new x.ad;db.time=0;db.ub=0;db.value=a.se;db.type=1;
db.Ce=l/3;db.De=a.Cf?a.se:a.se+g/3;b.da.push(db);db=new x.ad;db.time=0;db.ub=1;db.value=a.Ph;db.type=1;db.Ce=l/3;db.De=a.Cf?a.Ph:a.Ph+f/3;b.da.push(db);db=new x.ad;db.time=0;db.ub=2;db.value=a.Wd;db.type=1;db.Ce=l/3;db.De=a.Cf?a.Wd:a.Wd+h/3;b.da.push(db);db=new x.ad;db.time=0;db.ub=3;db.value=a.Oh;db.type=0;db.Gb=0;b.da.push(db);e&&(db=new x.ad,db.time=z,db.ub=3,db.value=a.Dd,db.type=0,db.Gb=ha-z,b.da.push(db));db=new x.ad;db.time=l;db.ub=0;db.value=a.se+g;db.type=1;db.Ae=2*l/3;db.Be=a.Ge&&!a.He?
db.value:db.value-g/3;a.He&&(db.Ce=l+w,db.De=db.value+w/l*g);b.da.push(db);db=new x.ad;db.time=l;db.ub=1;db.value=a.te;db.type=1;db.Ae=2*l/3;db.Be=a.Ge&&!a.He?a.te:a.te-f/3;a.He&&(db.Ce=l+w,db.De=db.value+w/l*f);b.da.push(db);db=new x.ad;db.time=y;db.ub=2;db.value=r;db.type=1;db.Ae=2*y/3;db.Be=a.Ge?r:r-h/3;b.da.push(db);a.He&&(db=new x.ad,db.time=l+k,db.ub=0,db.value=a.se+g,db.type=1,db.Ae=l+k-w,db.Be=a.se+g,b.da.push(db),db=new x.ad,db.time=l+k,db.ub=1,db.value=a.te,db.type=1,db.Ae=l+k-w,db.Be=a.te,
b.da.push(db));this.xa.push(b);return b};c.prototype.Ss=function(){this.F.j&&this.F.j.play()};c.prototype.Ts=function(){this.F.j&&(this.F.j.pause(),this.F.j.currentTime=0)};c.prototype.Rs=function(){this.F.j&&this.F.j.pause()};c.prototype.fs=function(a){this.F.j&&(0>a&&(a=0),a>this.F.j.duration&&(a=this.F.j.duration-.1),this.F.j.currentTime=a,this.update())};c.prototype.wq=function(){return this.F.j?this.F.j.currentTime:0};c.prototype.vq=function(){if(this.F.j)return this.F.j};c.prototype.es=function(a){if(this.F.j){var b=
!this.F.j.paused&&!this.F.j.ended,e=this.F.j.currentTime;this.F.j.pause();this.F.j.src=isNaN(parseInt(a,10))?String(a):this.F.src[parseInt(a,10)];b&&(this.F.j.onloadedmetadata=function(){this.currentTime=e;this.play();this.onloadedmetadata=null});this.F.j.currentTime=e}};c.prototype.Bp=function(){this.ln=!0};return c}();x.Bl=d})(ggP2VR||(ggP2VR={}));window.ggHasHtml5Css3D=El;window.ggHasWebGL=Fl;window.pano2vrPlayer=ggP2VR.Bl;var n=ggP2VR.Bl.prototype;n.getVersion=n.Km;n.readConfigString=n.Wk;
n.readConfigUrl=n.zn;n.readConfigUrlAsync=n.Br;n.readConfigXml=n.An;n.openUrl=n.Rk;n.openNext=n.ld;n.goBack=n.Cq;n.setMargins=n.Or;n.addListener=n.addListener;n.on=n.addListener;n.removeEventListener=n.removeEventListener;n.off=n.removeEventListener;n.detectBrowser=n.bm;n.initWebGL=n.Oc;n.getPercentLoaded=n.lq;n.setBasePath=n.Kr;n.getBasePath=n.tm;n.setViewerSize=n.Yn;n.getViewerSize=n.zq;n.setSkinObject=n.Zr;n.changeViewMode=n.np;n.getViewMode=n.xq;n.changePolygonMode=n.Ql;n.setPolygonMode=n.Ql;
n.getPolygonMode=n.nq;n.showOnePolyHotspot=n.$n;n.hideOnePolyHotspot=n.Pm;n.changePolyHotspotColor=n.lp;n.toggleOnePolyHotspot=n.As;n.changeViewState=n.op;n.getViewState=n.yq;n.setRenderFlags=n.Sr;n.getRenderFlags=n.qq;n.setMaxTileCount=n.Un;n.getVFov=n.mc;n.setVFov=n.kj;n.getHFov=n.Mp;n.updatePanorama=n.Xh;n.isTouching=n.$m;n.getIsMobile=n.Sp;n.setIsMobile=n.Nr;n.getIsTour=n.Tp;n.getIsAutorotating=n.Pp;n.getIsLoading=n.Rp;n.getIsLoaded=n.Bi;n.getIsTileLoading=n.xm;n.getLastActivity=n.Up;
n.getPan=n.Yg;n.getPanNorth=n.Le;n.getPanDest=n.kq;n.getPanN=n.Cm;n.setPan=n.cf;n.setPanNorth=n.cl;n.changePan=n.Pl;n.changePanLog=n.kp;n.getTilt=n.Di;n.getTiltDest=n.rq;n.setTilt=n.df;n.changeTilt=n.Rl;n.changeTiltLog=n.mp;n.getFov=n.pk;n.getFovDest=n.Kp;n.setFov=n.bf;n.changeFov=n.Ol;n.changeFovLog=n.Tj;n.getRoll=n.Gm;n.setRoll=n.ij;n.setPanTilt=n.Qr;n.setPanTiltFov=n.hj;n.setDefaultView=n.Lr;n.setLocked=n.setLocked;n.setLockedMouse=n.Sn;n.setLockedKeyboard=n.Rn;n.getLockedKeyboard=n.Wp;
n.setLockedWheel=n.Tn;n.moveTo=n.moveTo;n.moveToEx=n.Wi;n.moveToDefaultView=n.Vq;n.moveToDefaultViewEx=n.Wq;n.addHotspotElements=n.El;n.playSound=n.We;n.playPauseSound=n.wn;n.playStopSound=n.zr;n.pauseSound=n.Sk;n.activateSound=n.Vo;n.soundGetTime=n.ls;n.soundSetTime=n.ms;n.setMediaVisibility=n.Pr;n.isPlaying=n.isPlaying;n.stopSound=n.pj;n.setVolume=n.setVolume;n.changeVolume=n.pp;n.removeHotspots=n.Fn;n.getHotspotsVisible=n.vm;n.getCurrentPerspective=n.vd;n.addHotspot=n.Xo;n.updateHotspot=n.Is;
n.removeHotspot=n.Cr;n.setActiveHotspot=n.jg;n.getPointHotspotIds=n.mq;n.getHotspot=n.Op;n.setFullscreen=n.kg;n.toggleFullscreen=n.xj;n.enterFullscreen=n.Cp;n.exitFullscreen=n.exitFullscreen;n.getIsFullscreen=n.Qp;n.startAutorotate=n.qs;n.stopAutorotate=n.ts;n.toggleAutorotate=n.zs;n.setAutorotateNodeFilter=n.Jr;n.startAnimation=n.ps;n.createLayers=n.Wl;n.removePanorama=n.Ze;n.getScreenResolution=n.Hm;n.getMaxScreenResolution=n.Am;n.getNodeIds=n.fq;n.getNodeUserdata=n.Xg;n.getNodeLatLng=n.qk;
n.getNodeTitle=n.iq;n.getNodeDistance=n.eq;n.getCurrentNode=n.nk;n.getNextNode=n.cq;n.getPrevNode=n.pq;n.getLastVisitedNode=n.Vp;n.getNodesWithTag=n.Bm;n.getCurrentPointHotspots=n.Jp;n.getPositionAngles=n.oq;n.getPositionRawAngles=n.Dm;n.nodeVisited=n.ar;n.clearVisitedNodes=n.tp;n.setElementIdPrefix=n.Mr;n.videoPanoPlay=n.Ss;n.videoPanoStop=n.Ts;n.videoPanoPause=n.Rs;n.getVideoPanoTime=n.wq;n.setVideoPanoTime=n.fs;n.getVideoPanoObject=n.vq;n.setVideoPanoSource=n.es;n.getMediaObject=n.aq;
n.getMediaBufferSourceObject=n.$p;n.registerVideoElement=n.Bn;n.disableSoundLoading=n.Bp;n.setCrossOrigin=n.setCrossOrigin;n.setProjection=n.Vc;n.getProjection=n.Ta;n.changeProjection=n.Uj;n.changeProjectionEx=n.Uj;n.changeLensflares=n.jp;n.setTransition=n.cs;n.getMapType=n.Zp;n.getMapDetails=n.Yp;n.getNodeMapCoords=n.gq;n.getNodeMapCoordsInPercent=n.hq;n.getMapContainingNode=n.Xp;n.getMapsContainingNode=n.zm;n.getMapIDs=n.ym;n.addVariable=n.$o;n.setVariableOptions=n.Wn;n.setVariableValue=n.re;
n.getVariableValue=n.uq;n.setSuperCookie=n.bs;n.getGyroAvailable=n.Lp;n.setUseGyro=n.Vn;n.getUseGyro=n.sq;n.getOS=n.jq;n.getBrowser=n.Ip;n.triggerEvent=n.M;n.requestRedraw=n.Er;n.getWebGlContext=n.Aq;n.getHasTouch=n.Np;n.enterVR=n.Df;n.exitVR=n.Ef;n.toggleVR=n.po;n.isInVR=n.ih;n.hasVR=n.Pe;n.getVRDisplayName=n.tq;n.setVRFrameBufferScaleFactor=n.ds;var Hl=ggP2VR.Cl.prototype;Hl.bufferSoundCurrentTime=Hl.wf;Hl.bufferSoundSetTime=Hl.Ml;Hl.bufferSoundSetDragTime=Hl.ip;Hl.bufferSoundDuration=Hl.mi;