Browse Source

Remove pre-built files.

pull/952/head
Matthew Petroff 3 years ago
parent
commit
a745250060
3 changed files with 0 additions and 249 deletions
  1. +0
    -2
      build/pannellum.css
  2. +0
    -127
      build/pannellum.htm
  3. +0
    -120
      build/pannellum.js

+ 0
- 2
build/pannellum.css
File diff suppressed because it is too large
View File


+ 0
- 127
build/pannellum.htm
File diff suppressed because it is too large
View File


+ 0
- 120
build/pannellum.js View File

@@ -1,120 +0,0 @@
// Pannellum 40ffc37, https://github.com/mpetroff/pannellum
window.libpannellum=function(C,h,k){function oa(L){function Da(a,d){return 1==a.level&&1!=d.level?-1:1==d.level&&1!=a.level?1:d.timestamp-a.timestamp}function pa(a,d){return a.level!=d.level?a.level-d.level:a.diff-d.diff}function Q(a,d,e,h,m,c,f){this.vertices=a;this.side=d;this.level=e;this.x=h;this.y=m;this.path=c.replace("%s",d).replace("%l",e).replace("%x",h).replace("%y",m);this.parentPath=f}function R(a,d,h,B,m){var c;var f=d.vertices;c=qa(a,f.slice(0,3));var k=qa(a,f.slice(3,6)),y=qa(a,f.slice(6,
9)),f=qa(a,f.slice(9,12)),t=c[0]+k[0]+y[0]+f[0];-4==t||4==t?c=!1:(t=c[1]+k[1]+y[1]+f[1],c=-4==t||4==t?!1:4!=c[2]+k[2]+y[2]+f[2]);if(c){c=d.vertices;k=c[0]+c[3]+c[6]+c[9];y=c[1]+c[4]+c[7]+c[10];f=c[2]+c[5]+c[8]+c[11];t=Math.sqrt(k*k+y*y+f*f);f=Math.asin(f/t);k=Math.atan2(y,k)-B;k+=k>Math.PI?-2*Math.PI:k<-Math.PI?2*Math.PI:0;k=Math.abs(k);d.diff=Math.acos(Math.sin(h)*Math.sin(f)+Math.cos(h)*Math.cos(f)*Math.cos(k));k=!1;for(y=0;y<e.nodeCache.length;y++)if(e.nodeCache[y].path==d.path){k=!0;e.nodeCache[y].timestamp=
e.nodeCacheTimestamp++;e.nodeCache[y].diff=d.diff;e.currentNodes.push(e.nodeCache[y]);break}k||(d.timestamp=e.nodeCacheTimestamp++,e.currentNodes.push(d),e.nodeCache.push(d));if(d.level<e.level){var f=p.cubeResolution*Math.pow(2,d.level-p.maxLevel),k=Math.ceil(f*p.invTileResolution)-1,y=f%p.tileResolution*2,l=2*f%p.tileResolution;0===l&&(l=p.tileResolution);0===y&&(y=2*p.tileResolution);t=0.5;if(d.x==k||d.y==k)t=1-p.tileResolution/(p.tileResolution+l);var u=1-t,f=[],r=t,z=t,A=t,F=u,b=u,w=u;if(l<p.tileResolution)if(d.x==
k&&d.y!=k){if(b=z=0.5,"d"==d.side||"u"==d.side)w=A=0.5}else d.x!=k&&d.y==k&&(F=r=0.5,"l"==d.side||"r"==d.side)&&(w=A=0.5);y<=p.tileResolution&&(d.x==k&&(r=0,F=1,"l"==d.side||"r"==d.side)&&(A=0,w=1),d.y==k&&(z=0,b=1,"d"==d.side||"u"==d.side)&&(A=0,w=1));l=new Float32Array([c[0],c[1],c[2],c[0]*r+c[3]*F,c[1]*t+c[4]*u,c[2]*A+c[5]*w,c[0]*r+c[6]*F,c[1]*z+c[7]*b,c[2]*A+c[8]*w,c[0]*t+c[9]*u,c[1]*z+c[10]*b,c[2]*A+c[11]*w]);l=new Q(l,d.side,d.level+1,2*d.x,2*d.y,p.fullpath,d.path);f.push(l);d.x==k&&y<=p.tileResolution||
(l=new Float32Array([c[0]*r+c[3]*F,c[1]*t+c[4]*u,c[2]*A+c[5]*w,c[3],c[4],c[5],c[3]*t+c[6]*u,c[4]*z+c[7]*b,c[5]*A+c[8]*w,c[0]*r+c[6]*F,c[1]*z+c[7]*b,c[2]*A+c[8]*w]),l=new Q(l,d.side,d.level+1,2*d.x+1,2*d.y,p.fullpath,d.path),f.push(l));d.x==k&&y<=p.tileResolution||d.y==k&&y<=p.tileResolution||(l=new Float32Array([c[0]*r+c[6]*F,c[1]*z+c[7]*b,c[2]*A+c[8]*w,c[3]*t+c[6]*u,c[4]*z+c[7]*b,c[5]*A+c[8]*w,c[6],c[7],c[8],c[9]*r+c[6]*F,c[10]*t+c[7]*u,c[11]*A+c[8]*w]),l=new Q(l,d.side,d.level+1,2*d.x+1,2*d.y+1,
p.fullpath,d.path),f.push(l));d.y==k&&y<=p.tileResolution||(l=new Float32Array([c[0]*t+c[9]*u,c[1]*z+c[10]*b,c[2]*A+c[11]*w,c[0]*r+c[6]*F,c[1]*z+c[7]*b,c[2]*A+c[8]*w,c[9]*r+c[6]*F,c[10]*t+c[7]*u,c[11]*A+c[8]*w,c[9],c[10],c[11]]),l=new Q(l,d.side,d.level+1,2*d.x,2*d.y+1,p.fullpath,d.path),f.push(l));for(d=0;d<f.length;d++)R(a,f[d],h,B,m)}}}function Oa(){return new Float32Array([-1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,
1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,1,1,-1,-1])}function Fa(a,d,e){var k=Math.sin(d);d=Math.cos(d);if("x"==e)return new Float32Array([a[0],d*a[1]+k*a[2],d*a[2]-k*a[1],a[3],d*a[4]+k*a[5],d*a[5]-k*a[4],a[6],d*a[7]+k*a[8],d*a[8]-k*a[7]]);if("y"==e)return new Float32Array([d*a[0]-k*a[2],a[1],d*a[2]+k*a[0],d*a[3]-k*a[5],a[4],d*a[5]+k*a[3],d*a[6]-k*a[8],a[7],d*a[8]+k*a[6]]);if("z"==e)return new Float32Array([d*a[0]+k*a[1],d*a[1]-k*a[0],a[2],d*a[3]+k*a[4],d*a[4]-k*a[3],a[5],d*a[6]+k*a[7],d*a[7]-
k*a[6],a[8]])}function ra(a){return new Float32Array([a[0],a[4],a[8],a[12],a[1],a[5],a[9],a[13],a[2],a[6],a[10],a[14],a[3],a[7],a[11],a[15]])}function Ga(e,d){a.bindTexture(a.TEXTURE_2D,d);a.texImage2D(a.TEXTURE_2D,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,e);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.bindTexture(a.TEXTURE_2D,
null)}function za(a){Pa(a,a.path+"."+p.extension,function(d,e){a.texture=d;a.textureLoaded=e?2:1},ea.crossOrigin)}function qa(a,d){var e=new Float32Array([a[0]*d[0]+a[1]*d[1]+a[2]*d[2],a[4]*d[0]+a[5]*d[1]+a[6]*d[2],a[11]+a[8]*d[0]+a[9]*d[1]+a[10]*d[2],1/(a[12]*d[0]+a[13]*d[1]+a[14]*d[2])]),k=e[0]*e[3],h=e[1]*e[3],e=e[2]*e[3],c=[0,0,0];-1>k&&(c[0]=-1);1<k&&(c[0]=1);-1>h&&(c[1]=-1);1<h&&(c[1]=1);if(-1>e||1<e)c[2]=1;return c}function Ha(){console.log("Reducing canvas size due to error 1286!");z.width=
Math.round(z.width/2);z.height=Math.round(z.height/2)}var z=h.createElement("canvas");z.style.width=z.style.height="100%";L.appendChild(z);var e,a,V,W,$,S,Aa,fa,p,D,ga,E,ha,Ia,aa,ea,Ja="fbudlr".split("");this.init=function(G,d,Ea,B,m,c,f,M){function y(a){if(C){var d=a*a*4,b=new Uint8ClampedArray(d),c=M.backgroundColor?M.backgroundColor:[0,0,0];c[0]*=255;c[1]*=255;c[2]*=255;for(var e=0;e<d;e++)b[e++]=c[0],b[e++]=c[1],b[e++]=c[2];a=new ImageData(b,a,a);for(t=0;6>t;t++)0==p[t].width&&(p[t]=a)}}d===k&&
(d="equirectangular");if("equirectangular"!=d&&"cubemap"!=d&&"multires"!=d)throw console.log("Error: invalid image type specified!"),{type:"config error"};D=d;p=G;ga=Ea;ea=M||{};if(e){V&&(a.detachShader(e,V),a.deleteShader(V));W&&(a.detachShader(e,W),a.deleteShader(W));a.bindBuffer(a.ARRAY_BUFFER,null);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,null);e.texture&&a.deleteTexture(e.texture);if(e.nodeCache)for(G=0;G<e.nodeCache.length;G++)a.deleteTexture(e.nodeCache[G].texture);a.deleteProgram(e);e=k}fa=k;var t,
C=!1,u;if("cubemap"==D)for(t=0;6>t;t++)0<p[t].width?(u===k&&(u=p[t].width),u!=p[t].width&&console.log("Cube faces have inconsistent widths: "+u+" vs. "+p[t].width)):C=!0;"cubemap"==D&&0!==(u&u-1)&&(navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 8_/)||navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 9_/)||navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 10_/)||navigator.userAgent.match(/Trident.*rv[ :]*11\./))||(a||(a=z.getContext("experimental-webgl",
{alpha:!1,depth:!1})),a&&1286==a.getError()&&Ha());if(!a&&("multires"==D&&p.hasOwnProperty("fallbackPath")||"cubemap"==D)&&("WebkitAppearance"in h.documentElement.style||navigator.userAgent.match(/Trident.*rv[ :]*11\./)||-1!==navigator.appVersion.indexOf("MSIE 10"))){S&&L.removeChild(S);S=h.createElement("div");S.className="pnlm-world";B=p.basePath?p.basePath+p.fallbackPath:p.fallbackPath;var Q=0;m=function(){var a=h.createElement("canvas");a.className="pnlm-face pnlm-"+Ja[this.side]+"face";S.appendChild(a);
var d=a.getContext("2d");a.style.width=this.width+4+"px";a.style.height=this.height+4+"px";a.width=this.width+4;a.height=this.height+4;d.drawImage(this,2,2);var b=d.getImageData(0,0,a.width,a.height),c=b.data,e,f;for(e=2;e<a.width-2;e++)for(f=0;4>f;f++)c[4*(e+a.width)+f]=c[4*(e+2*a.width)+f],c[4*(e+a.width*(a.height-2))+f]=c[4*(e+a.width*(a.height-3))+f];for(e=2;e<a.height-2;e++)for(f=0;4>f;f++)c[4*(e*a.width+1)+f]=c[4*(e*a.width+2)+f],c[4*((e+1)*a.width-2)+f]=c[4*((e+1)*a.width-3)+f];for(f=0;4>f;f++)c[4*
(a.width+1)+f]=c[4*(2*a.width+2)+f],c[4*(2*a.width-2)+f]=c[4*(3*a.width-3)+f],c[4*(a.width*(a.height-2)+1)+f]=c[4*(a.width*(a.height-3)+2)+f],c[4*(a.width*(a.height-1)-2)+f]=c[4*(a.width*(a.height-2)-3)+f];for(e=1;e<a.width-1;e++)for(f=0;4>f;f++)c[4*e+f]=c[4*(e+a.width)+f],c[4*(e+a.width*(a.height-1))+f]=c[4*(e+a.width*(a.height-2))+f];for(e=1;e<a.height-1;e++)for(f=0;4>f;f++)c[e*a.width*4+f]=c[4*(e*a.width+1)+f],c[4*((e+1)*a.width-1)+f]=c[4*((e+1)*a.width-2)+f];for(f=0;4>f;f++)c[f]=c[4*(a.width+
1)+f],c[4*(a.width-1)+f]=c[4*(2*a.width-2)+f],c[a.width*(a.height-1)*4+f]=c[4*(a.width*(a.height-2)+1)+f],c[4*(a.width*a.height-1)+f]=c[4*(a.width*(a.height-1)-2)+f];d.putImageData(b,0,0);R.call(this)};var R=function(){0<this.width?($===k&&($=this.width),$!=this.width&&console.log("Fallback faces have inconsistent widths: "+$+" vs. "+this.width)):C=!0;Q++;6==Q&&($=this.width,L.appendChild(S),f())},C=!1;for(t=0;6>t;t++)c=new Image,c.crossOrigin=ea.crossOrigin?ea.crossOrigin:"anonymous",c.side=t,c.onload=
m,c.onerror=R,c.src="multires"==D?B.replace("%s",Ja[t])+"."+p.extension:p[t].src;y($)}else{if(!a)throw console.log("Error: no WebGL support detected!"),{type:"no webgl"};"cubemap"==D&&y(u);p.fullpath=p.basePath?p.basePath+p.path:p.path;p.invTileResolution=1/p.tileResolution;G=Oa();Aa=[];for(t=0;6>t;t++)Aa[t]=G.slice(12*t,12*t+12),G=Oa();G=0;if("equirectangular"==D){if(G=a.getParameter(a.MAX_TEXTURE_SIZE),Math.max(p.width/2,p.height)>G)throw console.log("Error: The image is too big; it's "+p.width+
"px wide, but this device's maximum supported size is "+2*G+"px."),{type:"webgl size error",width:p.width,maxWidth:2*G};}else if("cubemap"==D&&u>a.getParameter(a.MAX_CUBE_MAP_TEXTURE_SIZE))throw console.log("Error: The image is too big; it's "+u+"px wide, but this device's maximum supported size is "+G+"px."),{type:"webgl size error",width:u,maxWidth:G};M!==k&&(u=isNaN(M.horizonPitch)?0:Number(M.horizonPitch),d=isNaN(M.horizonRoll)?0:Number(M.horizonRoll),0!=u||0!=d)&&(fa=[u,d]);u=a.TEXTURE_2D;a.viewport(0,
0,a.drawingBufferWidth,a.drawingBufferHeight);a.getShaderPrecisionFormat&&(d=a.getShaderPrecisionFormat(a.FRAGMENT_SHADER,a.HIGH_FLOAT))&&1>d.precision&&(ta=ta.replace("highp","mediump"));V=a.createShader(a.VERTEX_SHADER);d=l;"multires"==D&&(d=r);a.shaderSource(V,d);a.compileShader(V);W=a.createShader(a.FRAGMENT_SHADER);d=ka;"cubemap"==D?(u=a.TEXTURE_CUBE_MAP,d=ua):"multires"==D&&(d=hb);a.shaderSource(W,d);a.compileShader(W);e=a.createProgram();a.attachShader(e,V);a.attachShader(e,W);a.linkProgram(e);
a.getShaderParameter(V,a.COMPILE_STATUS)||console.log(a.getShaderInfoLog(V));a.getShaderParameter(W,a.COMPILE_STATUS)||console.log(a.getShaderInfoLog(W));a.getProgramParameter(e,a.LINK_STATUS)||console.log(a.getProgramInfoLog(e));a.useProgram(e);e.drawInProgress=!1;d=M.backgroundColor?M.backgroundColor:[0,0,0];a.clearColor(d[0],d[1],d[2],1);a.clear(a.COLOR_BUFFER_BIT);e.texCoordLocation=a.getAttribLocation(e,"a_texCoord");a.enableVertexAttribArray(e.texCoordLocation);"multires"!=D?(E||(E=a.createBuffer()),
a.bindBuffer(a.ARRAY_BUFFER,E),a.bufferData(a.ARRAY_BUFFER,new Float32Array([-1,1,1,1,1,-1,-1,1,1,-1,-1,-1]),a.STATIC_DRAW),a.vertexAttribPointer(e.texCoordLocation,2,a.FLOAT,!1,0,0),e.aspectRatio=a.getUniformLocation(e,"u_aspectRatio"),a.uniform1f(e.aspectRatio,a.drawingBufferWidth/a.drawingBufferHeight),e.psi=a.getUniformLocation(e,"u_psi"),e.theta=a.getUniformLocation(e,"u_theta"),e.f=a.getUniformLocation(e,"u_f"),e.h=a.getUniformLocation(e,"u_h"),e.v=a.getUniformLocation(e,"u_v"),e.vo=a.getUniformLocation(e,
"u_vo"),e.rot=a.getUniformLocation(e,"u_rot"),a.uniform1f(e.h,B/(2*Math.PI)),a.uniform1f(e.v,m/Math.PI),a.uniform1f(e.vo,c/Math.PI*2),"equirectangular"==D&&(e.backgroundColor=a.getUniformLocation(e,"u_backgroundColor"),a.uniform4fv(e.backgroundColor,d.concat([1]))),e.texture=a.createTexture(),a.bindTexture(u,e.texture),"cubemap"==D?(a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,p[1]),a.texImage2D(a.TEXTURE_CUBE_MAP_NEGATIVE_X,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,p[3]),a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_Y,
0,a.RGB,a.RGB,a.UNSIGNED_BYTE,p[4]),a.texImage2D(a.TEXTURE_CUBE_MAP_NEGATIVE_Y,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,p[5]),a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_Z,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,p[0]),a.texImage2D(a.TEXTURE_CUBE_MAP_NEGATIVE_Z,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,p[2])):p.width<=G?(a.uniform1i(a.getUniformLocation(e,"u_splitImage"),0),a.texImage2D(u,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,p)):(a.uniform1i(a.getUniformLocation(e,"u_splitImage"),1),B=h.createElement("canvas"),B.width=p.width/2,B.height=p.height,
B=B.getContext("2d"),B.drawImage(p,0,0),m=B.getImageData(0,0,p.width/2,p.height),a.texImage2D(u,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,m),e.texture2=a.createTexture(),a.activeTexture(a.TEXTURE1),a.bindTexture(u,e.texture2),a.uniform1i(a.getUniformLocation(e,"u_image1"),1),B.drawImage(p,-p.width/2,0),m=B.getImageData(0,0,p.width/2,p.height),a.texImage2D(u,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,m),a.texParameteri(u,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(u,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(u,
a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(u,a.TEXTURE_MAG_FILTER,a.LINEAR),a.activeTexture(a.TEXTURE0)),a.texParameteri(u,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(u,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(u,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(u,a.TEXTURE_MAG_FILTER,a.LINEAR)):(e.vertPosLocation=a.getAttribLocation(e,"a_vertCoord"),a.enableVertexAttribArray(e.vertPosLocation),ha||(ha=a.createBuffer()),Ia||(Ia=a.createBuffer()),aa||(aa=a.createBuffer()),a.bindBuffer(a.ARRAY_BUFFER,
Ia),a.bufferData(a.ARRAY_BUFFER,new Float32Array([0,0,1,0,1,1,0,1]),a.STATIC_DRAW),a.vertexAttribPointer(e.texCoordLocation,2,a.FLOAT,!1,0,0),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,aa),a.bufferData(a.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,0,2,3]),a.STATIC_DRAW),a.bindBuffer(a.ARRAY_BUFFER,ha),a.vertexAttribPointer(e.vertPosLocation,3,a.FLOAT,!1,0,0),e.perspUniform=a.getUniformLocation(e,"u_perspMatrix"),e.cubeUniform=a.getUniformLocation(e,"u_cubeMatrix"),e.level=-1,e.currentNodes=[],e.nodeCache=
[],e.nodeCacheTimestamp=0,e.textureLoads=[]);B=a.getError();if(0!==B)throw console.log("Error: Something went wrong with WebGL!",B),{type:"webgl error"};f()}};this.destroy=function(){L!==k&&(z!==k&&L.contains(z)&&L.removeChild(z),S!==k&&L.contains(S)&&L.removeChild(S));if(a){var e=a.getExtension("WEBGL_lose_context");e&&e.loseContext()}};this.resize=function(){var k=C.devicePixelRatio||1;z.width=z.clientWidth*k;z.height=z.clientHeight*k;a&&(1286==a.getError()&&Ha(),a.viewport(0,0,a.drawingBufferWidth,
a.drawingBufferHeight),"multires"!=D&&a.uniform1f(e.aspectRatio,z.clientWidth/z.clientHeight))};this.resize();this.setPose=function(a,d){a=isNaN(a)?0:Number(a);d=isNaN(d)?0:Number(d);fa=0==a&&0==d?k:[a,d]};this.render=function(h,d,l,r){var m,c=0;r===k&&(r={});r.roll&&(c=r.roll);if(fa!==k){m=fa[0];var f=fa[1],M=h,y=d,t=Math.cos(f)*Math.sin(h)*Math.sin(m)+Math.cos(h)*(Math.cos(m)*Math.cos(d)+Math.sin(f)*Math.sin(m)*Math.sin(d)),E=-Math.sin(h)*Math.sin(f)+Math.cos(h)*Math.cos(f)*Math.sin(d);h=Math.cos(f)*
Math.cos(m)*Math.sin(h)+Math.cos(h)*(-Math.cos(d)*Math.sin(m)+Math.cos(m)*Math.sin(f)*Math.sin(d));h=Math.asin(Math.max(Math.min(h,1),-1));d=Math.atan2(E,t);m=[Math.cos(M)*(Math.sin(f)*Math.sin(m)*Math.cos(y)-Math.cos(m)*Math.sin(y)),Math.cos(M)*Math.cos(f)*Math.cos(y),Math.cos(M)*(Math.cos(m)*Math.sin(f)*Math.cos(y)+Math.sin(y)*Math.sin(m))];f=[-Math.cos(h)*Math.sin(d),Math.cos(h)*Math.cos(d)];f=Math.acos(Math.max(Math.min((m[0]*f[0]+m[1]*f[1])/(Math.sqrt(m[0]*m[0]+m[1]*m[1]+m[2]*m[2])*Math.sqrt(f[0]*
f[0]+f[1]*f[1])),1),-1));0>m[2]&&(f=2*Math.PI-f);c+=f}if(a||"multires"!=D&&"cubemap"!=D){if("multires"!=D)l=2*Math.atan(Math.tan(0.5*l)/(a.drawingBufferWidth/a.drawingBufferHeight)),l=1/Math.tan(0.5*l),a.uniform1f(e.psi,d),a.uniform1f(e.theta,h),a.uniform1f(e.rot,c),a.uniform1f(e.f,l),!0===ga&&"equirectangular"==D&&(a.bindTexture(a.TEXTURE_2D,e.texture),a.texImage2D(a.TEXTURE_2D,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,p)),a.drawArrays(a.TRIANGLES,0,6);else{m=a.drawingBufferWidth/a.drawingBufferHeight;f=2*Math.atan(Math.tan(l/
2)*a.drawingBufferHeight/a.drawingBufferWidth);f=1/Math.tan(f/2);m=new Float32Array([f/m,0,0,0,0,f,0,0,0,0,100.1/-99.9,20/-99.9,0,0,-1,0]);for(f=1;f<p.maxLevel&&a.drawingBufferWidth>p.tileResolution*Math.pow(2,f-1)*Math.tan(l/2)*0.707;)f++;e.level=f;f=new Float32Array([1,0,0,0,1,0,0,0,1]);f=Fa(f,-c,"z");f=Fa(f,-h,"x");f=Fa(f,d,"y");f=new Float32Array([f[0],f[1],f[2],0,f[3],f[4],f[5],0,f[6],f[7],f[8],0,0,0,0,1]);a.uniformMatrix4fv(e.perspUniform,!1,ra(m));a.uniformMatrix4fv(e.cubeUniform,!1,ra(f));
c=new Float32Array([m[0]*f[0],m[0]*f[1],m[0]*f[2],0,m[5]*f[4],m[5]*f[5],m[5]*f[6],0,m[10]*f[8],m[10]*f[9],m[10]*f[10],m[11],-f[8],-f[9],-f[10],0]);e.nodeCache.sort(Da);if(200<e.nodeCache.length&&e.nodeCache.length>e.currentNodes.length+50)for(m=e.nodeCache.splice(200,e.nodeCache.length-200),f=0;f<m.length;f++)a.deleteTexture(m[f].texture);e.currentNodes=[];for(m=0;6>m;m++)f=new Q(Aa[m],Ja[m],1,0,0,p.fullpath,null),R(c,f,h,d,l);e.currentNodes.sort(pa);for(h=ba.length-1;0<=h;h--)-1===e.currentNodes.indexOf(ba[h].node)&&
(ba[h].node.textureLoad=!1,ba.splice(h,1));if(0===ba.length)for(h=0;h<e.currentNodes.length;h++)if(d=e.currentNodes[h],!d.texture&&!d.textureLoad){d.textureLoad=!0;setTimeout(va,0,d);break}0<e.textureLoads.length&&e.textureLoads.shift()();if(!e.drawInProgress){e.drawInProgress=!0;a.clear(a.COLOR_BUFFER_BIT);h={};for(d=0;d<e.currentNodes.length;d++)h[e.currentNodes[d].parentPath]|=!(1<e.currentNodes[d].textureLoaded);for(d=0;d<e.currentNodes.length;d++)1<e.currentNodes[d].textureLoaded&&0!=h[e.currentNodes[d].path]&&
(a.bufferData(a.ARRAY_BUFFER,e.currentNodes[d].vertices,a.STATIC_DRAW),a.bindTexture(a.TEXTURE_2D,e.currentNodes[d].texture),a.drawElements(a.TRIANGLES,6,a.UNSIGNED_SHORT,0));e.drawInProgress=!1}}if(r.returnImage!==k)return C.createImageBitmap&&"ImageBitmap"==r.returnImage?createImageBitmap(z):0==r.returnImage.toString().indexOf("image/")?z.toDataURL(r.returnImage):z.toDataURL("image/png")}else for(m=$/2,r={f:"translate3d(-"+(m+2)+"px, -"+(m+2)+"px, -"+m+"px)",b:"translate3d("+(m+2)+"px, -"+(m+2)+
"px, "+m+"px) rotateX(180deg) rotateZ(180deg)",u:"translate3d(-"+(m+2)+"px, -"+m+"px, "+(m+2)+"px) rotateX(270deg)",d:"translate3d(-"+(m+2)+"px, "+m+"px, -"+(m+2)+"px) rotateX(90deg)",l:"translate3d(-"+m+"px, -"+(m+2)+"px, "+(m+2)+"px) rotateX(180deg) rotateY(90deg) rotateZ(180deg)",r:"translate3d("+m+"px, -"+(m+2)+"px, -"+(m+2)+"px) rotateY(270deg)"},l=1/Math.tan(l/2),l=l*z.clientWidth/2+"px",d="perspective("+l+") translateZ("+l+") rotateX("+h+"rad) rotateY("+d+"rad) ",l=Object.keys(r),h=0;6>h;h++)if(c=
S.querySelector(".pnlm-"+l[h]+"face"))c.style.webkitTransform=d+r[l[h]],c.style.transform=d+r[l[h]]};this.isLoading=function(){if(a&&"multires"==D)for(var h=0;h<e.currentNodes.length;h++)if(!e.currentNodes[h].textureLoaded)return!0;return!1};this.getCanvas=function(){return z};var ba=[],Pa=function(){function h(){var a=this;this.texture=this.callback=null;this.image=new Image;this.image.crossOrigin=m?m:"anonymous";var c=function(){e.textureLoads.push(function(){0<a.image.width&&0<a.image.height?(Ga(a.image,
a.texture),a.callback(a.texture,!0)):a.callback(a.texture,!1);if(ba.length){var c=ba.shift();a.loadTexture(c.src,c.texture,c.callback)}else l[k++]=a})};this.image.addEventListener("load",c);this.image.addEventListener("error",c)}function d(a,c,d,e){this.node=a;this.src=c;this.texture=d;this.callback=e}var k=4,l={},m;h.prototype.loadTexture=function(a,c,d){this.texture=c;this.callback=d;this.image.src=a};for(var c=0;c<k;c++)l[c]=new h;return function(c,e,h,p){m=p;p=a.createTexture();k?l[--k].loadTexture(e,
p,h):ba.push(new d(c,e,p,h));return p}}(),va;if(C.Worker&&C.createImageBitmap){var oa=new Blob(["("+function(){self.onmessage=function(a){var d=a.data[0];fetch(d,{mode:"cors",credentials:"use-credentials"==a.data[1]?"include":"same-origin"}).then(function(a){return a.blob()}).then(function(a){return createImageBitmap(a)}).then(function(a){postMessage([d,!0,a],[a])}).catch(function(){postMessage([d,!1])})}}.toString()+")()"],{type:"application/javascript"}),Qa=new Worker(URL.createObjectURL(oa)),la=
{};Qa.onmessage=function(h){var d=h.data[0],l=h.data[1],p=h.data[2];e.textureLoads.push(function(){var e,c=!1;l&&(e=a.createTexture(),Ga(p,e),c=!0);var f=la[d];delete la[d];f!==k&&(f.texture=e,f.textureLoaded=c?2:1)})};va=function(a){var d=(new URL(a.path+"."+p.extension,C.location)).href;la[d]=a;Qa.postMessage([d,ea.crossOrigin])}}else va=za}var l="attribute vec2 a_texCoord;varying vec2 v_texCoord;void main() {gl_Position = vec4(a_texCoord, 0.0, 1.0);v_texCoord = a_texCoord;}",r="attribute vec3 a_vertCoord;attribute vec2 a_texCoord;uniform mat4 u_cubeMatrix;uniform mat4 u_perspMatrix;varying mediump vec2 v_texCoord;void main(void) {gl_Position = u_perspMatrix * u_cubeMatrix * vec4(a_vertCoord, 1.0);v_texCoord = a_texCoord;}",
ta="precision highp float;\nuniform float u_aspectRatio;\nuniform float u_psi;\nuniform float u_theta;\nuniform float u_f;\nuniform float u_h;\nuniform float u_v;\nuniform float u_vo;\nuniform float u_rot;\nconst float PI = 3.14159265358979323846264;\nuniform sampler2D u_image0;\nuniform sampler2D u_image1;\nuniform bool u_splitImage;\nuniform samplerCube u_imageCube;\nvarying vec2 v_texCoord;\nuniform vec4 u_backgroundColor;\nvoid main() {\nfloat x = v_texCoord.x * u_aspectRatio;\nfloat y = v_texCoord.y;\nfloat sinrot = sin(u_rot);\nfloat cosrot = cos(u_rot);\nfloat rot_x = x * cosrot - y * sinrot;\nfloat rot_y = x * sinrot + y * cosrot;\nfloat sintheta = sin(u_theta);\nfloat costheta = cos(u_theta);\nfloat a = u_f * costheta - rot_y * sintheta;\nfloat root = sqrt(rot_x * rot_x + a * a);\nfloat lambda = atan(rot_x / root, a / root) + u_psi;\nfloat phi = atan((rot_y * costheta + u_f * sintheta) / root);",
ua=ta+"float cosphi = cos(phi);\ngl_FragColor = textureCube(u_imageCube, vec3(cosphi*sin(lambda), sin(phi), cosphi*cos(lambda)));\n}",ka=ta+"lambda = mod(lambda + PI, PI * 2.0) - PI;\nvec2 coord = vec2(lambda / PI, phi / (PI / 2.0));\nif(coord.x < -u_h || coord.x > u_h || coord.y < -u_v + u_vo || coord.y > u_v + u_vo)\ngl_FragColor = u_backgroundColor;\nelse {\nif(u_splitImage) {\nif(coord.x < 0.0)\ngl_FragColor = texture2D(u_image0, vec2((coord.x + u_h) / u_h, (-coord.y + u_v + u_vo) / (u_v * 2.0)));\nelse\ngl_FragColor = texture2D(u_image1, vec2((coord.x + u_h) / u_h - 1.0, (-coord.y + u_v + u_vo) / (u_v * 2.0)));\n} else {\ngl_FragColor = texture2D(u_image0, vec2((coord.x + u_h) / (u_h * 2.0), (-coord.y + u_v + u_vo) / (u_v * 2.0)));\n}\n}\n}",
hb="varying mediump vec2 v_texCoord;uniform sampler2D u_sampler;void main(void) {gl_FragColor = texture2D(u_sampler, v_texCoord);}";return{renderer:function(h,k,l,r){return new oa(h,k,l,r)}}}(window,document);
window.pannellum=function(C,h,k){function oa(l,r){function ta(){var a=h.createElement("div");a.innerHTML="\x3c!--[if lte IE 9]><i></i><![endif]--\x3e";if(1==a.getElementsByTagName("i").length)L();else{wa=b.hfov;Ka=b.pitch;var g;if("cubemap"==b.type){K=[];for(a=0;6>a;a++)K.push(new Image),K[a].crossOrigin=b.crossOrigin;n.load.lbox.style.display="block";n.load.lbar.style.display="none"}else if("multires"==b.type)a=JSON.parse(JSON.stringify(b.multiRes)),b.basePath&&b.multiRes.basePath&&!/^(?:[a-z]+:)?\/\//i.test(b.multiRes.basePath)?
a.basePath=b.basePath+b.multiRes.basePath:b.multiRes.basePath?a.basePath=b.multiRes.basePath:b.basePath&&(a.basePath=b.basePath),K=a;else if(!0===b.dynamic)K=b.panorama;else{if(b.panorama===k){L(b.strings.noPanoramaError);return}K=new Image}if("cubemap"==b.type)for(var q=6,c=function(){q--;0===q&&ka()},d=function(a){var ia=h.createElement("a");ia.href=a.target.src;ia.textContent=ia.href;L(b.strings.fileAccessError.replace("%s",ia.outerHTML))},a=0;a<K.length;a++)g=b.cubeMap[a],"null"==g?(console.log("Will use background instead of missing cubemap face "+
a),c()):(b.basePath&&!ua(g)&&(g=b.basePath+g),K[a].onload=c,K[a].onerror=d,K[a].src=ja(g));else if("multires"==b.type)ka();else if(g="",b.basePath&&(g=b.basePath),!0!==b.dynamic){if(b.panorama instanceof Image||b.panorama instanceof ImageData||C.ImageBitmap&&b.panorama instanceof ImageBitmap){K=b.panorama;ka();return}g=ua(b.panorama)?b.panorama:g+b.panorama;K.onload=function(){C.URL.revokeObjectURL(this.src);ka()};var e=new XMLHttpRequest;e.onloadend=function(){if(200!=e.status){var a=h.createElement("a");
a.href=g;a.textContent=a.href;L(b.strings.fileAccessError.replace("%s",a.outerHTML))}oa(this.response,g);n.load.msg.innerHTML=""};e.onprogress=function(a){if(a.lengthComputable){n.load.lbarFill.style.width=a.loaded/a.total*100+"%";var b,ia;1E6<a.total?(b="MB",ia=(a.loaded/1E6).toFixed(2),a=(a.total/1E6).toFixed(2)):1E3<a.total?(b="kB",ia=(a.loaded/1E3).toFixed(1),a=(a.total/1E3).toFixed(1)):(b="B",ia=a.loaded,a=a.total);n.load.msg.innerHTML=ia+" / "+a+" "+b}else n.load.lbox.style.display="block",
n.load.lbar.style.display="none"};try{e.open("GET",g,!0)}catch(f){L(b.strings.malformedURLError)}e.responseType="blob";e.setRequestHeader("Accept","image/*,*/*;q=0.9");e.withCredentials="use-credentials"===b.crossOrigin;e.send()}b.draggable&&I.classList.add("pnlm-grab");I.classList.remove("pnlm-grabbing");Ra=!0===b.dynamicUpdate;b.dynamic&&Ra&&(K=b.panorama,ka())}}function ua(a){return/^(?:[a-z]+:)?\/\//i.test(a)||"/"==a[0]||"blob:"==a.slice(0,5)}function ka(){w||(w=new libpannellum.renderer(N));
Ya||(Ya=!0,X.addEventListener("mousedown",Oa,!1),h.addEventListener("mousemove",Ga,!1),h.addEventListener("mouseup",za,!1),b.mouseZoom&&(I.addEventListener("mousewheel",W,!1),I.addEventListener("DOMMouseScroll",W,!1)),b.doubleClickZoom&&X.addEventListener("dblclick",Fa,!1),l.addEventListener("mozfullscreenchange",B,!1),l.addEventListener("webkitfullscreenchange",B,!1),l.addEventListener("msfullscreenchange",B,!1),l.addEventListener("fullscreenchange",B,!1),"function"===typeof ResizeObserver?(Sa=new ResizeObserver(ga),
Sa.observe(l)):(C.addEventListener("resize",ga,!1),C.addEventListener("orientationchange",ga,!1)),b.disableKeyboardCtrl||(l.addEventListener("keydown",$,!1),l.addEventListener("keyup",Aa,!1),l.addEventListener("blur",S,!1)),h.addEventListener("mouseleave",za,!1),""===h.documentElement.style.pointerAction&&""===h.documentElement.style.touchAction?(X.addEventListener("pointerdown",e,!1),X.addEventListener("pointermove",a,!1),X.addEventListener("pointerup",V,!1),X.addEventListener("pointerleave",V,!1)):
(X.addEventListener("touchstart",qa,!1),X.addEventListener("touchmove",Ha,!1),X.addEventListener("touchend",z,!1)),C.navigator.pointerEnabled&&(l.style.touchAction="none"));Ja();c(b.hfov);setTimeout(function(){},500)}function oa(a,g){var q=new FileReader;q.addEventListener("loadend",function(){var c=q.result;if(navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 8_/)){var d=c.indexOf("\u00ff\u00c2");(0>d||65536<d)&&L(b.strings.iOS8WebGLError)}d=c.indexOf("<x:xmpmeta");if(-1<d&&!0!==b.ignoreGPanoXMP){var e=
c.substring(d,c.indexOf("</x:xmpmeta>")+12),f=function(a){var b;0<=e.indexOf(a+'="')?(b=e.substring(e.indexOf(a+'="')+a.length+2),b=b.substring(0,b.indexOf('"'))):0<=e.indexOf(a+">")&&(b=e.substring(e.indexOf(a+">")+a.length+1),b=b.substring(0,b.indexOf("<")));return b!==k?Number(b):null},c=f("GPano:FullPanoWidthPixels"),d=f("GPano:CroppedAreaImageWidthPixels"),l=f("GPano:FullPanoHeightPixels"),m=f("GPano:CroppedAreaImageHeightPixels"),p=f("GPano:CroppedAreaTopPixels"),n=f("GPano:PoseHeadingDegrees"),
r=f("GPano:PosePitchDegrees"),s=f("GPano:PoseRollDegrees"),t=f("GPano:InitialViewPitchDegrees"),u=f("GPano:InitialViewHeadingDegrees"),f=f("GPano:InitialHorizontalFOVDegrees");null!==c&&null!==d&&null!==l&&null!==m&&null!==p&&(0>T.indexOf("haov")&&(b.haov=d/c*360),0>T.indexOf("vaov")&&(b.vaov=m/l*180),0>T.indexOf("vOffset")&&(b.vOffset=-180*((p+m/2)/l-0.5)),null!==n&&0>T.indexOf("northOffset")&&(b.northOffset=n,!1!==b.compass&&(b.compass=!0)),null!==r&&null!==s&&(0>T.indexOf("horizonPitch")&&(b.horizonPitch=
r),0>T.indexOf("horizonRoll")&&(b.horizonRoll=s)),null!=t&&0>T.indexOf("pitch")&&(b.pitch=t),null!=u&&0>T.indexOf("yaw")&&(b.yaw=u),null!=f&&0>T.indexOf("hfov")&&(b.hfov=f))}K.src=C.URL.createObjectURL(a);K.onerror=function(){(function(){return C.fetch?C.fetch(h.location.href).then(function(a){return a.headers.get("Content-Security-Policy")}):null})().then(function(a){a&&a.split(";").find(function(a){if(a=a.match(/img-src(.*)/))return!a[1].includes("blob")})&&(console.log("CSP blocks blobs; reverting to URL."),
K.crossOrigin=b.crossOrigin,K.src=g)})}});q.readAsBinaryString!==k?q.readAsBinaryString(a):q.readAsText(a)}function L(a){a===k&&(a=b.strings.genericWebGLError);n.errorMsg.innerHTML="<p>"+a+"</p>";v.load.style.display="none";n.load.box.style.display="none";n.errorMsg.style.display="table";Ta=!0;H=k;N.style.display="none";A("error",a)}function Da(a){n.interactionMsg.style.opacity=1;n.interactionMsg.innerHTML="<p>"+a+"</p>";v.load.style.display="none";n.load.box.style.display="none";n.interactionMsg.style.display=
"table";A("messageshown");clearTimeout(n.t3);n.interactionMsg.removeEventListener("transitionend",pa);n.t3=setTimeout(function(){n.interactionMsg.style.opacity=0;n.interactionMsg.addEventListener("transitionend",pa)},2E3)}function pa(){n.interactionMsg.style.opacity=0;n.interactionMsg.style.display="none";A("messagecleared")}function Q(a){var b=R(a);ca.style.left=b.x+"px";ca.style.top=b.y+"px";clearTimeout(Q.t1);clearTimeout(Q.t2);ca.style.display="block";ca.style.opacity=1;Q.t1=setTimeout(function(){ca.style.opacity=
0},2E3);Q.t2=setTimeout(function(){ca.style.display="none"},2500);a.preventDefault()}function R(a){var b=l.getBoundingClientRect(),q={};q.x=(a.clientX||a.pageX)-b.left;q.y=(a.clientY||a.pageY)-b.top;return q}function Oa(a){a.preventDefault();l.focus();if(H&&b.draggable&&!b.draggingHotSpot){var g=R(a);if(b.hotSpotDebug){var q=ra(a);console.log("Pitch: "+q[0]+", Yaw: "+q[1]+", Center Pitch: "+b.pitch+", Center Yaw: "+b.yaw+", HFOV: "+b.hfov)}f();t();b.roll=0;x.hfov=0;ma=!0;O=Date.now();xa=g.x;ya=g.y;
Ua=b.yaw;Va=b.pitch;I.classList.add("pnlm-grabbing");I.classList.remove("pnlm-grab");A("mousedown",a);E()}}function Fa(a){b.minHfov===b.hfov?F.setHfov(wa,1E3):(a=ra(a),F.lookAt(a[0],a[1],b.minHfov,1E3))}function ra(a){var g=R(a);a=w.getCanvas();var q=a.clientWidth,c=a.clientHeight;a=g.x/q*2-1;var c=(1-g.y/c*2)*c/q,d=1/Math.tan(b.hfov*Math.PI/360),e=Math.sin(b.pitch*Math.PI/180),f=Math.cos(b.pitch*Math.PI/180),g=d*f-c*e,q=Math.sqrt(a*a+g*g),c=180*Math.atan((c*f+d*e)/q)/Math.PI;a=180*Math.atan2(a/q,
g/q)/Math.PI+b.yaw;-180>a&&(a+=360);180<a&&(a-=360);return[c,a]}function Ga(a){if(J)va(J,a);else if(ma&&H){O=Date.now();var g=w.getCanvas(),q=g.clientWidth,g=g.clientHeight;a=R(a);var c=180*(Math.atan(xa/q*2-1)-Math.atan(a.x/q*2-1))/Math.PI*b.hfov/90+Ua;x.yaw=(c-b.yaw)%360*0.2;b.yaw=c;q=360*Math.atan(Math.tan(b.hfov/360*Math.PI)*g/q)/Math.PI;q=180*(Math.atan(a.y/g*2-1)-Math.atan(ya/g*2-1))/Math.PI*q/90+Va;x.pitch=0.2*(q-b.pitch);b.pitch=q}}function za(a){J&&J.dragHandlerFunc&&J.dragHandlerFunc(a,
J.dragHandlerArgs);J=null;ma&&(ma=!1,15<Date.now()-O&&(x.pitch=x.yaw=0),I.classList.add("pnlm-grab"),I.classList.remove("pnlm-grabbing"),O=Date.now(),A("mouseup",a))}function qa(a){if(H&&b.draggable&&!J){f();t();b.roll=0;x.hfov=0;var g=R(a.targetTouches[0]);xa=g.x;ya=g.y;if(2==a.targetTouches.length){var q=R(a.targetTouches[1]);xa+=0.5*(q.x-g.x);ya+=0.5*(q.y-g.y);La=Math.sqrt((g.x-q.x)*(g.x-q.x)+(g.y-q.y)*(g.y-q.y))}ma=!0;O=Date.now();Ua=b.yaw;Va=b.pitch;A("touchstart",a);E()}}function Ha(a){if(b.draggable&&
(H&&(O=Date.now()),ma&&H)){var g=R(a.targetTouches[0]),q=g.x,d=g.y;if(2==a.targetTouches.length&&-1!=La){var e=R(a.targetTouches[1]),q=q+0.5*(e.x-g.x),d=d+0.5*(e.y-g.y),g=Math.sqrt((g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y));c(b.hfov+0.1*(La-g));La=g}g=b.hfov/360*b.touchPanSpeedCoeffFactor;"both"!=b.dragConfirm&&"yaw"!=b.dragConfirm||2==a.targetTouches.length?(q=(xa-q)*g+Ua,x.yaw=(q-b.yaw)%360*0.2,b.yaw=q):xa!=q&&Da(b.strings.twoTouchXActivate);"both"!=b.dragConfirm&&"pitch"!=b.dragConfirm||2==a.targetTouches.length?
(d=(d-ya)*g+Va,x.pitch=0.2*(d-b.pitch),b.pitch=d):ya!=d&&Da(b.strings.twoTouchYActivate);"yaw"!=b.dragConfirm&&"pitch"!=b.dragConfirm&&"both"!=b.dragConfirm||2!=a.targetTouches.length||(pa(),a.preventDefault())}}function z(){J=null;ma=!1;150<Date.now()-O&&(x.pitch=x.yaw=0);La=-1;O=Date.now();A("touchend",event)}function e(a){"touch"==a.pointerType&&H&&b.draggable&&(na.push(a.pointerId),Ba.push({clientX:a.clientX,clientY:a.clientY}),a.targetTouches=Ba,qa(a),a.preventDefault())}function a(a){if("touch"==
a.pointerType)if(J)va(J,a);else if(b.draggable)for(var g=0;g<na.length;g++)if(a.pointerId==na[g]){Ba[g].clientX=a.clientX;Ba[g].clientY=a.clientY;a.targetTouches=Ba;Ha(a);a.preventDefault();break}}function V(a){J&&J.dragHandlerFunc&&J.dragHandlerFunc(a,J.dragHandlerArgs);J=null;if("touch"==a.pointerType){for(var b=!1,q=0;q<na.length;q++)a.pointerId==na[q]&&(na[q]=k),na[q]&&(b=!0);b||(na=[],Ba=[],z());a.preventDefault()}}function W(a){H&&("fullscreenonly"!=b.mouseZoom||Ca)&&("ctrl"!=b.mouseZoom||a.ctrlKey?
(pa(),a.preventDefault(),f(),O=Date.now(),a.wheelDeltaY?(c(b.hfov-0.05*a.wheelDeltaY),x.hfov=0>a.wheelDelta?1:-1):a.wheelDelta?(c(b.hfov-0.05*a.wheelDelta),x.hfov=0>a.wheelDelta?1:-1):a.detail&&(c(b.hfov+1.5*a.detail),x.hfov=0<a.detail?1:-1),E()):Da(b.strings.ctrlZoomActivate))}function $(a){f();O=Date.now();t();b.roll=0;var g=a.which||a.keycode;0>b.capturedKeyNumbers.indexOf(g)||(a.preventDefault(),27==g?Ca&&Ea():fa(g,!0))}function S(){for(var a=0;10>a;a++)s[a]=!1}function Aa(a){var g=a.which||a.keycode;
0>b.capturedKeyNumbers.indexOf(g)||(a.preventDefault(),fa(g,!1))}function fa(a,b){var q=!1;switch(a){case 109:case 189:case 17:case 173:s[0]!=b&&(q=!0);s[0]=b;break;case 107:case 187:case 16:case 61:s[1]!=b&&(q=!0);s[1]=b;break;case 38:s[2]!=b&&(q=!0);s[2]=b;break;case 87:s[6]!=b&&(q=!0);s[6]=b;break;case 40:s[3]!=b&&(q=!0);s[3]=b;break;case 83:s[7]!=b&&(q=!0);s[7]=b;break;case 37:s[4]!=b&&(q=!0);s[4]=b;break;case 65:s[8]!=b&&(q=!0);s[8]=b;break;case 39:s[5]!=b&&(q=!0);s[5]=b;break;case 68:s[9]!=
b&&(q=!0),s[9]=b}q&&b&&(da="undefined"!==typeof performance&&performance.now()?performance.now():Date.now(),E())}function p(){if(H){var a=!1,g=b.pitch,q=b.yaw,d=b.hfov,e;e="undefined"!==typeof performance&&performance.now()?performance.now():Date.now();da===k&&(da=e);var f=(e-da)*b.hfov/1200,f=Math.min(f,10);s[0]&&!0===b.keyboardZoom&&(c(b.hfov+(0.8*x.hfov+0.4)*f),a=!0);s[1]&&!0===b.keyboardZoom&&(c(b.hfov+(0.8*x.hfov-0.2)*f),a=!0);if(s[2]||s[6])b.pitch+=(0.8*x.pitch+0.2)*f,a=!0;if(s[3]||s[7])b.pitch+=
(0.8*x.pitch-0.2)*f,a=!0;if(s[4]||s[8])b.yaw+=(0.8*x.yaw-0.2)*f,a=!0;if(s[5]||s[9])b.yaw+=(0.8*x.yaw+0.2)*f,a=!0;a&&(O=Date.now());if(b.autoRotate){if(0.001<e-da){var a=(e-da)/1E3,h=(x.yaw/a*f-0.2*b.autoRotate)*a,h=(0<-b.autoRotate?1:-1)*Math.min(Math.abs(b.autoRotate*a),Math.abs(h));b.yaw+=h}b.autoRotateStopDelay&&(b.autoRotateStopDelay-=e-da,0>=b.autoRotateStopDelay&&(b.autoRotateStopDelay=!1,Z=b.autoRotate,b.autoRotate=0))}P.pitch&&(D("pitch"),g=b.pitch);P.yaw&&(D("yaw"),q=b.yaw);P.hfov&&(D("hfov"),
d=b.hfov);0<f&&!b.autoRotate&&(a=1-b.friction,s[4]||s[5]||s[8]||s[9]||P.yaw||(b.yaw+=x.yaw*f*a),s[2]||s[3]||s[6]||s[7]||P.pitch||(b.pitch+=x.pitch*f*a),s[0]||s[1]||P.hfov||(90<b.hfov&&(a*=1-(b.hfov-90)/90),c(b.hfov+x.hfov*f*a)));da=e;0<f&&(x.yaw=0.8*x.yaw+(b.yaw-q)/f*0.2,x.pitch=0.8*x.pitch+(b.pitch-g)/f*0.2,x.hfov=0.8*x.hfov+(b.hfov-d)/f*0.2,g=b.autoRotate?Math.abs(b.autoRotate):5,x.yaw=Math.min(g,Math.max(x.yaw,-g)),x.pitch=Math.min(g,Math.max(x.pitch,-g)),x.hfov=Math.min(g,Math.max(x.hfov,-g)));
s[0]&&s[1]&&(x.hfov=0);(s[2]||s[6])&&(s[3]||s[7])&&(x.pitch=0);(s[4]||s[8])&&(s[5]||s[9])&&(x.yaw=0)}}function D(a){var g=P[a],q=Math.min(1,Math.max((Date.now()-g.startTime)/1E3/(g.duration/1E3),0)),q=g.startPosition+b.animationTimingFunction(q)*(g.endPosition-g.startPosition);if(g.endPosition>g.startPosition&&q>=g.endPosition||g.endPosition<g.startPosition&&q<=g.endPosition||g.endPosition===g.startPosition)q=g.endPosition,x[a]=0,delete P[a];b[a]=q}function ga(){B("resize")}function E(){Za||(Za=!0,
ha())}function ha(){if(!db)if(Ia(),Wa&&clearTimeout(Wa),ma||!0===Y)requestAnimationFrame(ha);else if(s[0]||s[1]||s[2]||s[3]||s[4]||s[5]||s[6]||s[7]||s[8]||s[9]||b.autoRotate||P.pitch||P.yaw||P.hfov||0.01<Math.abs(x.yaw)||0.01<Math.abs(x.pitch)||0.01<Math.abs(x.hfov))p(),0<=b.autoRotateInactivityDelay&&Z&&Date.now()-O>b.autoRotateInactivityDelay&&!b.autoRotate&&(b.autoRotate=Z,F.lookAt(Ka,k,wa,3E3)),requestAnimationFrame(ha);else if(w&&(w.isLoading()||!0===b.dynamic&&Ra))requestAnimationFrame(ha);
else{F.getPitch&&F.getYaw&&F.getHfov&&A("animatefinished",{pitch:F.getPitch(),yaw:F.getYaw(),hfov:F.getHfov()});Za=!1;da=k;var a=b.autoRotateInactivityDelay-(Date.now()-O);0<a?Wa=setTimeout(function(){b.autoRotate=Z;F.lookAt(Ka,k,wa,3E3);E()},a):0<=b.autoRotateInactivityDelay&&Z&&(b.autoRotate=Z,F.lookAt(Ka,k,wa,3E3),E())}}function Ia(){var a;if(H){var g=w.getCanvas();!1!==b.autoRotate&&(360<b.yaw?b.yaw-=360:-360>b.yaw&&(b.yaw+=360));a=b.yaw;var q=0;if(b.avoidShowingBackground){var c=b.hfov/2,d=180*
Math.atan2(Math.tan(c/180*Math.PI),g.width/g.height)/Math.PI;b.vaov>b.haov?Math.min(Math.cos((b.pitch-c)/180*Math.PI),Math.cos((b.pitch+c)/180*Math.PI)):q=c*(1-Math.min(Math.cos((b.pitch-d)/180*Math.PI),Math.cos((b.pitch+d)/180*Math.PI)))}var c=b.maxYaw-b.minYaw,d=-180,e=180;360>c&&(d=b.minYaw+b.hfov/2+q,e=b.maxYaw-b.hfov/2-q,c<b.hfov&&(d=e=(d+e)/2),b.yaw=Math.max(d,Math.min(e,b.yaw)));!1===b.autoRotate&&(360<b.yaw?b.yaw-=360:-360>b.yaw&&(b.yaw+=360));!1!==b.autoRotate&&a!=b.yaw&&da!==k&&(b.autoRotate*=
-1);a=2*Math.atan(Math.tan(b.hfov/180*Math.PI*0.5)/(g.width/g.height))/Math.PI*180;g=b.minPitch+a/2;q=b.maxPitch-a/2;b.maxPitch-b.minPitch<a&&(g=q=(g+q)/2);isNaN(g)&&(g=-90);isNaN(q)&&(q=90);b.pitch=Math.max(g,Math.min(q,b.pitch));w.render(b.pitch*Math.PI/180,b.yaw*Math.PI/180,b.hfov*Math.PI/180,{roll:b.roll*Math.PI/180});b.hotSpots.forEach(la);b.compass&&(Ma.style.transform="rotate("+(-b.yaw-b.northOffset)+"deg)",Ma.style.webkitTransform="rotate("+(-b.yaw-b.northOffset)+"deg)")}}function aa(a,b,
c,d){this.w=a;this.x=b;this.y=c;this.z=d}function ea(a){var g;g=a.alpha;var c=a.beta;a=a.gamma;c=[c?c*Math.PI/180/2:0,a?a*Math.PI/180/2:0,g?g*Math.PI/180/2:0];g=[Math.cos(c[0]),Math.cos(c[1]),Math.cos(c[2])];c=[Math.sin(c[0]),Math.sin(c[1]),Math.sin(c[2])];g=new aa(g[0]*g[1]*g[2]-c[0]*c[1]*c[2],c[0]*g[1]*g[2]-g[0]*c[1]*c[2],g[0]*c[1]*g[2]+c[0]*g[1]*c[2],g[0]*g[1]*c[2]+c[0]*c[1]*g[2]);g=g.multiply(new aa(Math.sqrt(0.5),-Math.sqrt(0.5),0,0));c=C.orientation?-C.orientation*Math.PI/180/2:0;g=g.multiply(new aa(Math.cos(c),
0,-Math.sin(c),0)).toEulerAngles();"number"==typeof Y&&10>Y?Y+=1:10===Y?(eb=g[2]/Math.PI*180+b.yaw,Y=!0,requestAnimationFrame(ha)):(b.pitch=g[0]/Math.PI*180,b.roll=-g[1]/Math.PI*180,b.yaw=-g[2]/Math.PI*180+eb)}function Ja(){try{var a={};b.horizonPitch!==k&&(a.horizonPitch=b.horizonPitch*Math.PI/180);b.horizonRoll!==k&&(a.horizonRoll=b.horizonRoll*Math.PI/180);b.backgroundColor!==k&&(a.backgroundColor=b.backgroundColor);w.init(K,b.type,b.dynamic,b.haov*Math.PI/180,b.vaov*Math.PI/180,b.vOffset*Math.PI/
180,ba,a);!0!==b.dynamic&&(K=k)}catch(g){if("webgl error"==g.type||"no webgl"==g.type)L();else if("webgl size error"==g.type)L(b.strings.textureSizeError.replace("%s",g.width).replace("%s",g.maxWidth));else throw L(b.strings.unknownError),g;}}function ba(){if(b.sceneFadeDuration&&w.fadeImg!==k){w.fadeImg.style.opacity=0;var a=w.fadeImg;delete w.fadeImg;setTimeout(function(){N.removeChild(a);A("scenechangefadedone")},b.sceneFadeDuration)}Ma.style.display=b.compass?"inline":"none";ib();n.load.box.style.display=
"none";sa!==k&&(N.removeChild(sa),sa=k);H=!0;E();A("load")}function Pa(a){a.pitch=Number(a.pitch)||0;a.yaw=Number(a.yaw)||0;var g=h.createElement("div");g.className="pnlm-hotspot-base";g.className=a.cssClass?g.className+(" "+a.cssClass):g.className+(" pnlm-hotspot pnlm-sprite pnlm-"+u(a.type));var c=h.createElement("span");a.text&&(c.innerHTML=u(a.text));var d;if(a.video){d=h.createElement("video");var e=a.video;b.basePath&&!ua(e)&&(e=b.basePath+e);d.src=ja(e);d.controls=!0;d.style.width=a.width+
"px";N.appendChild(g);c.appendChild(d)}else if(a.image){e=a.image;b.basePath&&!ua(e)&&(e=b.basePath+e);d=h.createElement("a");d.href=ja(a.URL?a.URL:e,!0);b.targetBlank&&(d.target="_blank",d.rel="noopener");c.appendChild(d);var f=h.createElement("img");f.src=ja(e);f.style.width=a.width+"px";f.style.paddingTop="5px";N.appendChild(g);d.appendChild(f);c.style.maxWidth="initial"}else if(a.URL){d=h.createElement("a");d.href=ja(a.URL,!0);if(a.attributes)for(e in a.attributes)d.setAttribute(e,a.attributes[e]);
else b.targetBlank&&(d.target="_blank",d.rel="noopener");N.appendChild(d);g.className+=" pnlm-pointer";c.className+=" pnlm-pointer";d.appendChild(g)}else a.sceneId&&(g.onclick=g.ontouchend=function(){g.clicked||(g.clicked=!0,y(a.sceneId,a.targetPitch,a.targetYaw,a.targetHfov));return!1},g.className+=" pnlm-pointer",c.className+=" pnlm-pointer"),N.appendChild(g);if(a.createTooltipFunc)a.createTooltipFunc(g,a.createTooltipArgs);else if(a.text||a.video||a.image)g.classList.add("pnlm-tooltip"),g.appendChild(c),
c.style.width=c.scrollWidth-20+"px",c.style.marginLeft=-(c.scrollWidth-g.offsetWidth)/2+"px",c.style.marginTop=-c.scrollHeight-12+"px";a.clickHandlerFunc&&(g.addEventListener("click",function(b){a.clickHandlerFunc(b,a.clickHandlerArgs)},"false"),""===h.documentElement.style.pointerAction&&""===h.documentElement.style.touchAction?g.addEventListener("pointerup",function(b){a.clickHandlerFunc(b,a.clickHandlerArgs)},!1):g.addEventListener("touchend",function(b){a.clickHandlerFunc(b,a.clickHandlerArgs)},
!1),g.className+=" pnlm-pointer",c.className+=" pnlm-pointer");a.draggable&&(g.addEventListener("mousedown",function(b){a.dragHandlerFunc&&a.dragHandlerFunc(b,a.dragHandlerArgs);J=a}),""===h.documentElement.style.pointerAction&&""===h.documentElement.style.touchAction&&g.addEventListener("pointerdown",function(b){a.dragHandlerFunc&&a.dragHandlerFunc(b,a.dragHandlerArgs);J=a}),g.addEventListener("touchmove",function(b){va(a,b.targetTouches[0])}),g.addEventListener("touchend",function(b){a.dragHandlerFunc&&
a.dragHandlerFunc(b,a.dragHandlerArgs);J=null}));a.div=g}function va(a,b){var c=ra(b);a.pitch=c[0];a.yaw=c[1];la(a)}function ib(){$a||(b.hotSpots?(b.hotSpots=b.hotSpots.sort(function(a,b){return a.pitch<b.pitch}),b.hotSpots.forEach(Pa)):b.hotSpots=[],$a=!0,b.hotSpots.forEach(la))}function Qa(){var a=b.hotSpots;$a=!1;delete b.hotSpots;if(a)for(var g=0;g<a.length;g++){var c=a[g].div;if(c){for(;c.parentNode&&c.parentNode!=N;)c=c.parentNode;N.removeChild(c)}delete a[g].div}}function la(a){var c=Math.sin(a.pitch*
Math.PI/180),d=Math.cos(a.pitch*Math.PI/180),e=Math.sin(b.pitch*Math.PI/180),f=Math.cos(b.pitch*Math.PI/180),h=Math.cos((-a.yaw+b.yaw)*Math.PI/180),k=c*e+d*h*f;if(90>=a.yaw&&-90<a.yaw&&0>=k||(90<a.yaw||-90>=a.yaw)&&0>=k)a.div.style.visibility="hidden";else{var l=Math.sin((-a.yaw+b.yaw)*Math.PI/180),m=Math.tan(b.hfov*Math.PI/360);a.div.style.visibility="visible";var p=w.getCanvas(),n=p.clientWidth,p=p.clientHeight,c=[-n/m*l*d/k/2,-n/m*(c*f-d*h*e)/k/2],d=Math.sin(b.roll*Math.PI/180),e=Math.cos(b.roll*
Math.PI/180),c=[c[0]*e-c[1]*d,c[0]*d+c[1]*e];c[0]+=(n-a.div.offsetWidth)/2;c[1]+=(p-a.div.offsetHeight)/2;n="translate("+c[0]+"px, "+c[1]+"px) translateZ(9999px) rotate("+b.roll+"deg)";a.scale&&(n+=" scale("+wa/b.hfov/k+")");a.div.style.webkitTransform=n;a.div.style.MozTransform=n;a.div.style.transform=n}}function G(a){b={};var c,d,e="haov vaov vOffset northOffset horizonPitch horizonRoll".split(" ");T=[];for(c in ab)ab.hasOwnProperty(c)&&(b[c]=ab[c]);for(c in r.default)if(r.default.hasOwnProperty(c))if("strings"==
c)for(d in r.default.strings)r.default.strings.hasOwnProperty(d)&&(b.strings[d]=u(r.default.strings[d]));else b[c]=r.default[c],0<=e.indexOf(c)&&T.push(c);if(null!==a&&""!==a&&r.scenes&&r.scenes[a]){var f=r.scenes[a];for(c in f)if(f.hasOwnProperty(c))if("strings"==c)for(d in f.strings)f.strings.hasOwnProperty(d)&&(b.strings[d]=u(f.strings[d]));else b[c]=f[c],0<=e.indexOf(c)&&T.push(c);b.scene=a}for(c in r)if(r.hasOwnProperty(c))if("strings"==c)for(d in r.strings)r.strings.hasOwnProperty(d)&&(b.strings[d]=
u(r.strings[d]));else b[c]=r[c],0<=e.indexOf(c)&&T.push(c)}function d(a){if((a=a?a:!1)&&"preview"in b){var d=b.preview;b.basePath&&!ua(d)&&(d=b.basePath+d);sa=h.createElement("div");sa.className="pnlm-preview-img";sa.style.backgroundImage="url('"+ja(d).replace(/"/g,"%22").replace(/'/g,"%27")+"')";N.appendChild(sa)}var d=b.title,e=b.author;a&&("previewTitle"in b&&(b.title=b.previewTitle),"previewAuthor"in b&&(b.author=b.previewAuthor));b.hasOwnProperty("title")||(n.title.innerHTML="");b.hasOwnProperty("author")||
(n.author.innerHTML="");b.hasOwnProperty("title")||b.hasOwnProperty("author")||(n.container.style.display="none");b.targetBlank&&(Na.rel="noopener",Na.target="_blank");v.load.innerHTML="<div><p>"+b.strings.loadButtonLabel+"</p></div>";n.load.boxp.innerHTML=b.strings.loadingLabel;for(var f in b)if(b.hasOwnProperty(f))switch(f){case "title":n.title.innerHTML=u(b[f]);n.container.style.display="inline";break;case "author":var l=u(b[f]);b.authorURL&&(l=h.createElement("a"),l.href=ja(b.authorURL,!0),b.targetBlank&&
(l.target="_blank",l.rel="noopener"),l.innerHTML=u(b[f]),l=l.outerHTML);n.author.innerHTML=b.strings.bylineLabel.replace("%s",l);n.container.style.display="inline";break;case "fallback":l=h.createElement("a");l.href=ja(b[f],!0);b.targetBlank&&(l.target="_blank",l.rel="noopener");l.textContent="Click here to view this panorama in an alternative viewer.";var m=h.createElement("p");m.textContent="Your browser does not support WebGL.";m.appendChild(h.createElement("br"));m.appendChild(l);n.errorMsg.innerHTML=
"";n.errorMsg.appendChild(m);break;case "hfov":c(Number(b[f]));break;case "autoLoad":!0===b[f]&&w===k&&(n.load.box.style.display="inline",v.load.style.display="none",ta());break;case "showZoomCtrl":v.zoom.style.display=b[f]&&!1!=b.showControls?"block":"none";break;case "showFullscreenCtrl":v.fullscreen.style.display=b[f]&&!1!=b.showControls&&("fullscreen"in h||"mozFullScreen"in h||"webkitIsFullScreen"in h||"msFullscreenElement"in h)?"block":"none";break;case "hotSpotDebug":bb.style.display=b[f]?"block":
"none";break;case "showControls":b[f]||(v.orientation.style.display="none",v.zoom.style.display="none",v.fullscreen.style.display="none");break;case "orientationOnByDefault":b[f]&&Xa()}a&&(d?b.title=d:delete b.title,e?b.author=e:delete b.author)}function Ea(){if(H&&!Ta)if(Ca)h.exitFullscreen?h.exitFullscreen():h.mozCancelFullScreen?h.mozCancelFullScreen():h.webkitCancelFullScreen?h.webkitCancelFullScreen():h.msExitFullscreen&&h.msExitFullscreen();else try{l.requestFullscreen?l.requestFullscreen():
l.mozRequestFullScreen?l.mozRequestFullScreen():l.msRequestFullscreen?l.msRequestFullscreen():l.webkitRequestFullScreen()}catch(a){}}function B(a){h.fullscreenElement||h.fullscreen||h.mozFullScreen||h.webkitIsFullScreen||h.msFullscreenElement?(v.fullscreen.classList.add("pnlm-fullscreen-toggle-button-active"),Ca=!0):(v.fullscreen.classList.remove("pnlm-fullscreen-toggle-button-active"),Ca=!1);"resize"!==a&&A("fullscreenchange",Ca);w.resize();c(b.hfov);E()}function m(a){var c=b.minHfov;"multires"==
b.type&&w&&!b.multiResMinHfov&&(c=Math.min(c,w.getCanvas().width/(b.multiRes.cubeResolution/90*0.9)));if(c>b.maxHfov)return console.log("HFOV bounds do not make sense (minHfov > maxHfov)."),b.hfov;var d=b.hfov,d=a<c?c:a>b.maxHfov?b.maxHfov:a;b.avoidShowingBackground&&w&&!isNaN(b.maxPitch-b.minPitch)&&(a=w.getCanvas(),d=Math.min(d,360*Math.atan(Math.tan((b.maxPitch-b.minPitch)/360*Math.PI)/a.height*a.width)/Math.PI));return d}function c(a){b.hfov=m(a);A("zoomchange",b.hfov)}function f(){P={};Z=b.autoRotate?
b.autoRotate:Z;b.autoRotate=!1}function M(){Ta&&(n.load.box.style.display="none",n.errorMsg.style.display="none",Ta=!1,N.style.display="block",A("errorcleared"));H=!1;pa();v.load.style.display="none";n.load.box.style.display="inline";ta()}function y(a,c,e,f,l){H||(l=!0);H=!1;P={};var m,n,p;if(b.sceneFadeDuration&&!l&&(l=w.render(b.pitch*Math.PI/180,b.yaw*Math.PI/180,b.hfov*Math.PI/180,{returnImage:"ImageBitmap"}),l!==k)){m=l.then?h.createElement("canvas"):new Image;m.className="pnlm-fade-img";m.style.transition=
"opacity "+b.sceneFadeDuration/1E3+"s";m.style.width="100%";m.style.height="100%";l.then?l.then(function(b){m.width=b.width;m.height=b.height;m.getContext("2d").drawImage(b,0,0);y(a,c,e,f,!0)}):(m.onload=function(){y(a,c,e,f,!0)},m.src=l);N.appendChild(m);w.fadeImg=m;return}l="same"===c?b.pitch:c;n="same"===e?b.yaw:"sameAzimuth"===e?b.yaw+(b.northOffset||0)-(r.scenes[a].northOffset||0):e;p="same"===f?b.hfov:f;Qa();G(a);x.yaw=x.pitch=x.hfov=0;d();l!==k&&(b.pitch=l);n!==k&&(b.yaw=n);p!==k&&(b.hfov=
p);A("scenechange",a);M()}function t(){C.removeEventListener("deviceorientation",ea);v.orientation.classList.remove("pnlm-orientation-button-active");Y=!1}function Xa(){cb&&("undefined"!==typeof DeviceMotionEvent&&"function"===typeof DeviceMotionEvent.requestPermission?DeviceOrientationEvent.requestPermission().then(function(a){"granted"==a&&(Y=1,C.addEventListener("deviceorientation",ea),v.orientation.classList.add("pnlm-orientation-button-active"))}):(Y=1,C.addEventListener("deviceorientation",
ea),v.orientation.classList.add("pnlm-orientation-button-active")))}function u(a){return r.escapeHTML?String(a).split(/&/g).join("&amp;").split('"').join("&quot;").split("'").join("&#39;").split("<").join("&lt;").split(">").join("&gt;").split("/").join("&#x2f;").split("\n").join("<br>"):String(a).split("\n").join("<br>")}function ja(a,b){try{var c=decodeURIComponent(gb(a)).replace(/[^\w:]/g,"").toLowerCase()}catch(d){return"about:blank"}return 0===c.indexOf("javascript:")||0===c.indexOf("vbscript:")?
(console.log("Script URL removed."),"about:blank"):b&&0===c.indexOf("data:")?(console.log("Data URI removed from link."),"about:blank"):a}function gb(a){return a.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,function(a,b){b=b.toLowerCase();return"colon"===b?":":"#"===b.charAt(0)?"x"===b.charAt(1)?String.fromCharCode(parseInt(b.substring(2),16)):String.fromCharCode(+b.substring(1)):""})}function A(a){if(a in U)for(var b=U[a].length;0<b;b--)U[a][U[a].length-b].apply(null,[].slice.call(arguments,
1))}var F=this,b,w,sa,J,ma=!1,O=Date.now(),xa=0,ya=0,La=-1,Ua=0,Va=0,s=Array(10),Ca=!1,H,Ta=!1,Ya=!1,K,da,x={yaw:0,pitch:0,hfov:0},Za=!1,Y=!1,eb=0,Wa,Z=0,wa,Ka,P={},U={},T=[],Ra=!1,Sa,$a=!1,db=!1,ab={hfov:100,minHfov:50,multiResMinHfov:!1,maxHfov:120,pitch:0,minPitch:k,maxPitch:k,yaw:0,minYaw:-180,maxYaw:180,roll:0,haov:360,vaov:180,vOffset:0,autoRotate:!1,autoRotateInactivityDelay:-1,autoRotateStopDelay:k,type:"equirectangular",northOffset:0,showFullscreenCtrl:!0,dynamic:!1,dynamicUpdate:!1,doubleClickZoom:!0,
keyboardZoom:!0,mouseZoom:"ctrl",showZoomCtrl:!0,autoLoad:!1,showControls:!0,orientationOnByDefault:!1,hotSpotDebug:!1,backgroundColor:[0,0,0],avoidShowingBackground:!1,animationTimingFunction:function(a){return 0.5>a?2*a*a:-1+(4-2*a)*a},draggable:!0,dragConfirm:"pitch",disableKeyboardCtrl:!1,crossOrigin:"anonymous",targetBlank:!1,touchPanSpeedCoeffFactor:1,capturedKeyNumbers:[16,17,27,37,38,39,40,61,65,68,83,87,107,109,173,187,189],friction:0.15,strings:{loadButtonLabel:"Click to<br>Load<br>Panorama",
loadingLabel:"Loading...",bylineLabel:"by %s",noPanoramaError:"No panorama image was specified.",fileAccessError:"The file %s could not be accessed.",malformedURLError:"There is something wrong with the panorama URL.",iOS8WebGLError:"Due to iOS 8's broken WebGL implementation, only progressive encoded JPEGs work for your device (this panorama uses standard encoding).",genericWebGLError:"Your browser does not have the necessary WebGL support to display this panorama.",textureSizeError:"This panorama is too big for your device! It's %spx wide, but your device only supports images up to %spx wide. Try another device. (If you're the author, try scaling down the image.)",
unknownError:"Unknown error. Check developer console.",twoTouchActivate:"Use two fingers to pan the panorama.",twoTouchXActivate:"Use two fingers together to yaw the panorama.",twoTouchYActivate:"Use two fingers together to pitch the panorama.",ctrlZoomActivate:"Hold down the Ctrl key while using the mouse wheel to change zoom."}};l="string"===typeof l?h.getElementById(l):l;l.classList.add("pnlm-container");l.tabIndex=0;var I=h.createElement("div");I.className="pnlm-ui";l.appendChild(I);var N=h.createElement("div");
N.className="pnlm-render-container";l.appendChild(N);var X=h.createElement("div");X.className="pnlm-dragfix";I.appendChild(X);var ca=h.createElement("span");ca.className="pnlm-about-msg";var Na=h.createElement("a");Na.href="https://pannellum.org/";Na.textContent="Pannellum";ca.appendChild(Na);var fb=h.createElement("span");fb.textContent=" 40ffc37";ca.appendChild(fb);I.appendChild(ca);X.addEventListener("contextmenu",Q);var n={},bb=h.createElement("div");bb.className="pnlm-sprite pnlm-hot-spot-debug-indicator";
I.appendChild(bb);n.container=h.createElement("div");n.container.className="pnlm-panorama-info";n.title=h.createElement("div");n.title.className="pnlm-title-box";n.container.appendChild(n.title);n.author=h.createElement("div");n.author.className="pnlm-author-box";n.container.appendChild(n.author);I.appendChild(n.container);n.load={};n.load.box=h.createElement("div");n.load.box.className="pnlm-load-box";n.load.boxp=h.createElement("p");n.load.box.appendChild(n.load.boxp);n.load.lbox=h.createElement("div");
n.load.lbox.className="pnlm-lbox";n.load.lbox.innerHTML='<div class="pnlm-loading"></div>';n.load.box.appendChild(n.load.lbox);n.load.lbar=h.createElement("div");n.load.lbar.className="pnlm-lbar";n.load.lbarFill=h.createElement("div");n.load.lbarFill.className="pnlm-lbar-fill";n.load.lbar.appendChild(n.load.lbarFill);n.load.box.appendChild(n.load.lbar);n.load.msg=h.createElement("p");n.load.msg.className="pnlm-lmsg";n.load.box.appendChild(n.load.msg);I.appendChild(n.load.box);n.errorMsg=h.createElement("div");
n.errorMsg.className="pnlm-error-msg pnlm-info-box";I.appendChild(n.errorMsg);n.interactionMsg=h.createElement("p");n.interactionMsg.className="pnlm-interaction-msg pnlm-info-box";I.appendChild(n.interactionMsg);var v={};v.container=h.createElement("div");v.container.className="pnlm-controls-container";I.appendChild(v.container);v.load=h.createElement("button");v.load.className="pnlm-load-button";v.load.addEventListener("click",function(){d();M()});I.appendChild(v.load);v.zoom=h.createElement("div");
v.zoom.className="pnlm-zoom-controls pnlm-controls";v.zoomIn=h.createElement("div");v.zoomIn.className="pnlm-zoom-in pnlm-sprite pnlm-control";v.zoomIn.addEventListener("click",function(){H&&(c(b.hfov-5),E())});v.zoom.appendChild(v.zoomIn);v.zoomOut=h.createElement("div");v.zoomOut.className="pnlm-zoom-out pnlm-sprite pnlm-control";v.zoomOut.addEventListener("click",function(){H&&(c(b.hfov+5),E())});v.zoom.appendChild(v.zoomOut);v.container.appendChild(v.zoom);v.fullscreen=h.createElement("div");
v.fullscreen.addEventListener("click",Ea);v.fullscreen.className="pnlm-fullscreen-toggle-button pnlm-sprite pnlm-fullscreen-toggle-button-inactive pnlm-controls pnlm-control";(h.fullscreenEnabled||h.mozFullScreenEnabled||h.webkitFullscreenEnabled||h.msFullscreenEnabled)&&v.container.appendChild(v.fullscreen);v.orientation=h.createElement("div");v.orientation.addEventListener("click",function(a){Y?t():Xa()});v.orientation.addEventListener("mousedown",function(a){a.stopPropagation()});v.orientation.addEventListener("touchstart",
function(a){a.stopPropagation()});v.orientation.addEventListener("pointerdown",function(a){a.stopPropagation()});v.orientation.className="pnlm-orientation-button pnlm-orientation-button-inactive pnlm-sprite pnlm-controls pnlm-control";var cb=!1;C.DeviceOrientationEvent&&"https:"==location.protocol&&0<=navigator.userAgent.toLowerCase().indexOf("mobi")&&(v.container.appendChild(v.orientation),cb=!0);var Ma=h.createElement("div");Ma.className="pnlm-compass pnlm-controls pnlm-control";I.appendChild(Ma);
r.firstScene?G(r.firstScene):r.default&&r.default.firstScene?G(r.default.firstScene):G(null);d(!0);var na=[],Ba=[];aa.prototype.multiply=function(a){return new aa(this.w*a.w-this.x*a.x-this.y*a.y-this.z*a.z,this.x*a.w+this.w*a.x+this.y*a.z-this.z*a.y,this.y*a.w+this.w*a.y+this.z*a.x-this.x*a.z,this.z*a.w+this.w*a.z+this.x*a.y-this.y*a.x)};aa.prototype.toEulerAngles=function(){var a=Math.atan2(2*(this.w*this.x+this.y*this.z),1-2*(this.x*this.x+this.y*this.y)),b=Math.asin(2*(this.w*this.y-this.z*this.x)),
c=Math.atan2(2*(this.w*this.z+this.x*this.y),1-2*(this.y*this.y+this.z*this.z));return[a,b,c]};this.isLoaded=function(){return Boolean(H)};this.getPitch=function(){return b.pitch};this.setPitch=function(a,c,d,e){O=Date.now();if(1E-6>=Math.abs(a-b.pitch))return"function"==typeof d&&d(e),this;(c=c==k?1E3:Number(c))?(P.pitch={startTime:Date.now(),startPosition:b.pitch,endPosition:a,duration:c},"function"==typeof d&&setTimeout(function(){d(e)},c)):b.pitch=a;E();return this};this.getPitchBounds=function(){return[b.minPitch,
b.maxPitch]};this.setPitchBounds=function(a){b.minPitch=Math.max(-90,Math.min(a[0],90));b.maxPitch=Math.max(-90,Math.min(a[1],90));return this};this.getYaw=function(){return(b.yaw+540)%360-180};this.setYaw=function(a,c,d,e){O=Date.now();if(1E-6>=Math.abs(a-b.yaw))return"function"==typeof d&&d(e),this;c=c==k?1E3:Number(c);a=(a+180)%360-180;c?(180<b.yaw-a?a+=360:180<a-b.yaw&&(a-=360),P.yaw={startTime:Date.now(),startPosition:b.yaw,endPosition:a,duration:c},"function"==typeof d&&setTimeout(function(){d(e)},
c)):b.yaw=a;E();return this};this.getYawBounds=function(){return[b.minYaw,b.maxYaw]};this.setYawBounds=function(a){b.minYaw=Math.max(-360,Math.min(a[0],360));b.maxYaw=Math.max(-360,Math.min(a[1],360));return this};this.getHfov=function(){return b.hfov};this.setHfov=function(a,d,e,f){O=Date.now();if(1E-6>=Math.abs(a-b.hfov))return"function"==typeof e&&e(f),this;(d=d==k?1E3:Number(d))?(P.hfov={startTime:Date.now(),startPosition:b.hfov,endPosition:m(a),duration:d},"function"==typeof e&&setTimeout(function(){e(f)},
d)):c(a);E();return this};this.getHfovBounds=function(){return[b.minHfov,b.maxHfov]};this.setHfovBounds=function(a){b.minHfov=Math.max(0,a[0]);b.maxHfov=Math.max(0,a[1]);return this};this.lookAt=function(a,c,d,e,f,h){e=e==k?1E3:Number(e);a!==k&&1E-6<Math.abs(a-b.pitch)&&(this.setPitch(a,e,f,h),f=k);c!==k&&1E-6<Math.abs(c-b.yaw)&&(this.setYaw(c,e,f,h),f=k);d!==k&&1E-6<Math.abs(d-b.hfov)&&(this.setHfov(d,e,f,h),f=k);"function"==typeof f&&f(h);return this};this.getNorthOffset=function(){return b.northOffset};
this.setNorthOffset=function(a){b.northOffset=Math.min(360,Math.max(0,a));E();return this};this.getHorizonRoll=function(){return b.horizonRoll};this.setHorizonRoll=function(a){b.horizonRoll=Math.min(90,Math.max(-90,a));w.setPose(b.horizonPitch*Math.PI/180,b.horizonRoll*Math.PI/180);E();return this};this.getHorizonPitch=function(){return b.horizonPitch};this.setHorizonPitch=function(a){b.horizonPitch=Math.min(90,Math.max(-90,a));w.setPose(b.horizonPitch*Math.PI/180,b.horizonRoll*Math.PI/180);E();return this};
this.startAutoRotate=function(a,c,d,e){a=a||Z||1;c=c===k?Ka:c;d=d===k?wa:d;b.autoRotate=a;e!==k&&(b.autoRotateInactivityDelay=e);F.lookAt(c,k,d,3E3);E();return this};this.stopAutoRotate=function(){Z=b.autoRotate?b.autoRotate:Z;b.autoRotate=!1;b.autoRotateInactivityDelay=-1;return this};this.stopMovement=function(){f();x={yaw:0,pitch:0,hfov:0}};this.getRenderer=function(){return w};this.setUpdate=function(a){Ra=!0===a;w===k?ka():E();return this};this.mouseEventToCoords=function(a){return ra(a)};this.loadScene=
function(a,b,c,d){!1!==H&&y(a,b,c,d);return this};this.getScene=function(){return b.scene};this.addScene=function(a,b){r.scenes[a]=b;return this};this.removeScene=function(a){if(b.scene===a||!r.scenes.hasOwnProperty(a))return!1;delete r.scenes[a];return!0};this.toggleFullscreen=function(){Ea();return this};this.getConfig=function(){return b};this.getContainer=function(){return l};this.addHotSpot=function(a,c){if(c===k&&b.scene===k)b.hotSpots.push(a);else{var d=c!==k?c:b.scene;if(r.scenes.hasOwnProperty(d))r.scenes[d].hasOwnProperty("hotSpots")||
(r.scenes[d].hotSpots=[],d==b.scene&&(b.hotSpots=r.scenes[d].hotSpots)),r.scenes[d].hotSpots.push(a);else throw"Invalid scene ID!";}if(c===k||b.scene==c)Pa(a),H&&la(a);return this};this.removeHotSpot=function(a,c){if(c===k||b.scene==c){if(!b.hotSpots)return!1;for(var d=0;d<b.hotSpots.length;d++)if(b.hotSpots[d].hasOwnProperty("id")&&b.hotSpots[d].id===a){for(var e=b.hotSpots[d].div;e.parentNode!=N;)e=e.parentNode;N.removeChild(e);delete b.hotSpots[d].div;b.hotSpots.splice(d,1);return!0}}else if(r.scenes.hasOwnProperty(c)){if(!r.scenes[c].hasOwnProperty("hotSpots"))return!1;
for(d=0;d<r.scenes[c].hotSpots.length;d++)if(r.scenes[c].hotSpots[d].hasOwnProperty("id")&&r.scenes[c].hotSpots[d].id===a)return r.scenes[c].hotSpots.splice(d,1),!0}else return!1};this.resize=function(){w&&ga()};this.isLoaded=function(){return H};this.isOrientationSupported=function(){return cb||!1};this.stopOrientation=function(){t()};this.startOrientation=function(){Xa()};this.isOrientationActive=function(){return Boolean(Y)};this.on=function(a,b){U[a]=U[a]||[];U[a].push(b);return this};this.off=
function(a,b){if(!a)return U={},this;if(b){var c=U[a].indexOf(b);0<=c&&U[a].splice(c,1);0==U[a].length&&delete U[a]}else delete U[a];return this};this.destroy=function(){db=!0;clearTimeout(Wa);w&&w.destroy();Ya&&(h.removeEventListener("mousemove",Ga,!1),h.removeEventListener("mouseup",za,!1),l.removeEventListener("mozfullscreenchange",B,!1),l.removeEventListener("webkitfullscreenchange",B,!1),l.removeEventListener("msfullscreenchange",B,!1),l.removeEventListener("fullscreenchange",B,!1),Sa?Sa.disconnect():
(C.removeEventListener("resize",ga,!1),C.removeEventListener("orientationchange",ga,!1)),l.removeEventListener("keydown",$,!1),l.removeEventListener("keyup",Aa,!1),l.removeEventListener("blur",S,!1),h.removeEventListener("mouseleave",za,!1));l.innerHTML="";l.classList.remove("pnlm-container")}}return{viewer:function(h,k){return new oa(h,k)}}}(window,document);

Loading…
Cancel
Save