SimplePanoramaViewer/embed/js/photo-sphere-viewer.min.js
2023-11-06 21:41:19 +01:00

40 lines
No EOL
102 KiB
JavaScript

/**
* Minified by jsDelivr using Terser v5.14.1.
* Original file: /npm/photo-sphere-viewer@4.7.1/dist/photo-sphere-viewer.js
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
/*!
* Photo Sphere Viewer 4.7.1
* @copyright 2014-2015 Jérémy Heleine
* @copyright 2015-2022 Damien "Mistic" Sorel
* @licence MIT (https://opensource.org/licenses/MIT)
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("three"),require("uevent")):"function"==typeof define&&define.amd?define(["exports","three","uevent"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).PhotoSphereViewer={},t.THREE,t.uEvent)}(this,(function(t,e,o){"use strict";function i(t){this.message=t,"captureStackTrace"in Error?Error.captureStackTrace(this,i):this.stack=(new Error).stack}i.prototype=Object.create(Error.prototype),i.prototype.name="PSVError",i.prototype.constructor=i;var n=function(){function t(t){this.psv=t}var o=t.prototype;return o.destroy=function(){delete this.psv},o.supportsTransition=function(t){return!1},o.supportsPreload=function(t){return!1},o.loadTexture=function(t,e,o){throw new i("loadTexture not implemented")},o.createMesh=function(t){throw new i("createMesh not implemented")},o.setTexture=function(t,e,o){throw new i("setTexture not implemented")},o.setTextureOpacity=function(t,e){throw new i("setTextureOpacity not implemented")},o.disposeTexture=function(t){throw new i("disposeTexture not implemented")},o.setOverlay=function(t,e,o){throw new i("setOverlay not implemented")},t.createOverlayMaterial=function(){var o;return new e.ShaderMaterial({uniforms:(o={},o[t.OVERLAY_UNIFORMS.panorama]={value:new e.Texture},o[t.OVERLAY_UNIFORMS.overlay]={value:new e.Texture},o[t.OVERLAY_UNIFORMS.globalOpacity]={value:1},o[t.OVERLAY_UNIFORMS.overlayOpacity]={value:1},o),vertexShader:"\nvarying vec2 vUv;\n\nvoid main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",fragmentShader:"\nuniform sampler2D "+t.OVERLAY_UNIFORMS.panorama+";\nuniform sampler2D "+t.OVERLAY_UNIFORMS.overlay+";\nuniform float "+t.OVERLAY_UNIFORMS.globalOpacity+";\nuniform float "+t.OVERLAY_UNIFORMS.overlayOpacity+";\n\nvarying vec2 vUv;\n\nvoid main() {\n vec4 tColor1 = texture2D( "+t.OVERLAY_UNIFORMS.panorama+", vUv );\n vec4 tColor2 = texture2D( "+t.OVERLAY_UNIFORMS.overlay+", vUv );\n gl_FragColor = vec4( \n mix( tColor1.rgb, tColor2.rgb, tColor2.a * "+t.OVERLAY_UNIFORMS.overlayOpacity+" ), \n "+t.OVERLAY_UNIFORMS.globalOpacity+"\n );\n}"})},t}();function r(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function s(t,e,o){return e&&r(t.prototype,e),o&&r(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function a(){return a=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(t[i]=o[i])}return t},a.apply(this,arguments)}function c(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,h(t,e)}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.id=null,n.supportsDownload=!1,n.supportsOverlay=!1,n.OVERLAY_UNIFORMS={panorama:"panorama",overlay:"overlay",globalOpacity:"globalOpacity",overlayOpacity:"overlayOpacity"};var p=10,u="photoSphereViewer",d="psvSphere",v={ROTATE_LAT_UP:"rotateLatitudeUp",ROTATE_LAT_DOWN:"rotateLatitudeDown",ROTATE_LONG_RIGHT:"rotateLongitudeRight",ROTATE_LONG_LEFT:"rotateLongitudeLeft",ZOOM_IN:"zoomIn",ZOOM_OUT:"zoomOut",TOGGLE_AUTOROTATE:"toggleAutorotate"},f={AUTOROTATE:"autorotate",BEFORE_RENDER:"before-render",BEFORE_ROTATE:"before-rotate",CLICK:"click",CLOSE_PANEL:"close-panel",CONFIG_CHANGED:"config-changed",DOUBLE_CLICK:"dblclick",FULLSCREEN_UPDATED:"fullscreen-updated",HIDE_NOTIFICATION:"hide-notification",HIDE_OVERLAY:"hide-overlay",HIDE_TOOLTIP:"hide-tooltip",KEY_PRESS:"key-press",LOAD_PROGRESS:"load-progress",OPEN_PANEL:"open-panel",PANORAMA_LOADED:"panorama-loaded",POSITION_UPDATED:"position-updated",READY:"ready",RENDER:"render",SHOW_NOTIFICATION:"show-notification",SHOW_OVERLAY:"show-overlay",SHOW_TOOLTIP:"show-tooltip",SIZE_UPDATED:"size-updated",STOP_ALL:"stop-all",ZOOM_UPDATED:"zoom-updated"},m={GET_ANIMATE_POSITION:"get-animate-position",GET_ROTATE_POSITION:"get-rotate-position"},g={ENTER_OBJECT:"enter-object",HOVER_OBJECT:"hover-object",LEAVE_OBJECT:"leave-object"},_={MENU:"menu",TWO_FINGERS:"twoFingers",CTRL_ZOOM:"ctrlZoom",ERROR:"error",DESCRIPTION:"description"},w={linear:function(t){return t},inQuad:function(t){return t*t},outQuad:function(t){return t*(2-t)},inOutQuad:function(t){return t<.5?2*t*t:(4-2*t)*t-1},inCubic:function(t){return t*t*t},outCubic:function(t){return--t*t*t+1},inOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},inQuart:function(t){return t*t*t*t},outQuart:function(t){return 1- --t*t*t*t},inOutQuart:function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},inQuint:function(t){return t*t*t*t*t},outQuint:function(t){return 1+--t*t*t*t*t},inOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t},inSine:function(t){return 1-Math.cos(t*(Math.PI/2))},outSine:function(t){return Math.sin(t*(Math.PI/2))},inOutSine:function(t){return.5-.5*Math.cos(Math.PI*t)},inExpo:function(t){return Math.pow(2,10*(t-1))},outExpo:function(t){return 1-Math.pow(2,-10*t)},inOutExpo:function(t){return(t=2*t-1)<0?.5*Math.pow(2,10*t):1-.5*Math.pow(2,-10*t)},inCirc:function(t){return 1-Math.sqrt(1-t*t)},outCirc:function(t){return Math.sqrt(1-(t-1)*(t-1))},inOutCirc:function(t){return(t*=2)<1?.5-.5*Math.sqrt(1-t*t):.5+.5*Math.sqrt(1-(t-=2)*t)}},y={Enter:"Enter",Control:"Control",Escape:"Escape",Space:" ",PageUp:"PageUp",PageDown:"PageDown",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown",Delete:"Delete",Plus:"+",Minus:"-"},E=Object.freeze({__proto__:null,DEFAULT_TRANSITION:1500,MOVE_THRESHOLD:4,DBLCLICK_DELAY:300,LONGTOUCH_DELAY:500,TWOFINGERSOVERLAY_DELAY:100,CTRLZOOM_TIMEOUT:2e3,INERTIA_WINDOW:300,SPHERE_RADIUS:p,VIEWER_DATA:u,MESH_USER_DATA:d,ACTIONS:v,EVENTS:f,CHANGE_EVENTS:m,OBJECT_EVENTS:g,IDS:_,EASINGS:w,KEY_CODES:y}),T=u+"_touchSupport",b={loaded:!1,pixelRatio:1,isWebGLSupported:!1,isTouchEnabled:null,maxTextureWidth:0,mouseWheelEvent:null,fullscreenEvent:null};b.load=function(){if(!b.loaded){var t=function(){var t=document.createElement("canvas"),e=["webgl","experimental-webgl","moz-webgl","webkit-3d"],o=null;if(!t.getContext)return null;return e.some((function(e){try{return null!==(o=t.getContext(e))}catch(t){return!1}}))?o:null}();b.loaded=!0,b.pixelRatio=window.devicePixelRatio||1,b.isWebGLSupported=null!=t,b.isTouchEnabled=function(){var t="ontouchstart"in window||navigator.maxTouchPoints>0;T in localStorage&&(t="true"===localStorage[T]);var e=new Promise((function(e){var o,i=function(){o(),localStorage[T]=!1,e(!1)},n=function(){o(),localStorage[T]=!0,e(!0)},r=function(){o(),localStorage[T]=t,e(t)};window.addEventListener("mousedown",i,!1),window.addEventListener("touchstart",n,!1);var s=setTimeout(r,1e4);o=function(){window.removeEventListener("mousedown",i),window.removeEventListener("touchstart",n),clearTimeout(s)}}));return{initial:t,promise:e}}(),b.maxTextureWidth=function(t){return null!==t?t.getParameter(t.MAX_TEXTURE_SIZE):0}(t),b.mouseWheelEvent="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",b.fullscreenEvent=(e=Object.keys(M).filter((function(t){return t in document}))).length?M[e[0]]:null}var e};var O=null;b.getMaxCanvasWidth=function(){return null===O&&(O=function(t){var e=document.createElement("canvas"),o=e.getContext("2d");e.width=t,e.height=t/2;for(;e.width>1024;){o.fillStyle="white",o.fillRect(0,0,1,1);try{if(o.getImageData(0,0,1,1).data[0]>0)return e.width}catch(t){}e.width/=2,e.height/=2}throw new i("Unable to detect system capabilities")}(b.maxTextureWidth)),O};var M={exitFullscreen:"fullscreenchange",webkitExitFullscreen:"webkitfullscreenchange",mozCancelFullScreen:"mozfullscreenchange",msExitFullscreen:"MSFullscreenChange"};function L(t,e,o){void 0===o?t.classList.toggle(e):o?t.classList.add(e):o||t.classList.remove(e)}function x(t,e){var o;(o=t.classList).add.apply(o,e.split(" "))}function C(t,e){if(!t.matches)return null;var o=t;do{if(o.matches(e))return o;o=o instanceof SVGElement?o.parentNode:o.parentElement}while(o);return null}function P(t){for(var e=0,o=0,i=t;i;)e+=i.offsetLeft-i.scrollLeft+i.clientLeft,o+=i.offsetTop-i.scrollTop+i.clientTop,i=i.offsetParent;return{left:e,top:o}}function A(t){return(document.fullscreenElement||document.webkitFullscreenElement)===t}function I(t){(t.requestFullscreen||t.webkitRequestFullscreen).call(t)}function S(){(document.exitFullscreen||document.webkitExitFullscreen).call(document)}function R(t,e){return window.getComputedStyle(t,null)[e]}
/**
* @summary Normalize mousewheel values accross browsers
* @memberOf PSV.utils
* @description From Facebook's Fixed Data Table
* {@link https://github.com/facebookarchive/fixed-data-table/blob/master/src/vendor_upstream/dom/normalizeWheel.js}
* @copyright Facebook
* @param {WheelEvent} event
* @returns {{spinX: number, spinY: number, pixelX: number, pixelY: number}}
*/function k(t){var e=0,o=0,i=0,n=0;return"detail"in t&&(o=t.detail),"wheelDelta"in t&&(o=-t.wheelDelta/120),"wheelDeltaY"in t&&(o=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=o,o=0),i=10*e,n=10*o,"deltaY"in t&&(n=t.deltaY),"deltaX"in t&&(i=t.deltaX),(i||n)&&t.deltaMode&&(1===t.deltaMode?(i*=40,n*=40):(i*=800,n*=800)),i&&!e&&(e=i<1?-1:1),n&&!o&&(o=n<1?-1:1),{spinX:e,spinY:o,pixelX:i,pixelY:n}}function D(t,e){var o=t%e;return o<0&&(o+=e),o}function N(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function U(t,e){return[0,2*Math.PI,2*-Math.PI].reduce((function(o,i){var n=e-t+i;return Math.abs(n)<Math.abs(o)?n:o}),1/0)}function H(t,e){return Math.acos(Math.cos(t.latitude)*Math.cos(e.latitude)*Math.cos(t.longitude-e.longitude)+Math.sin(t.latitude)*Math.sin(e.latitude))}function z(t){return t.replace(/[A-Z](?:(?=[^A-Z])|[A-Z]*(?=[A-Z][^A-Z]|$))/g,(function(t,e){return(e>0?"-":"")+t.toLowerCase()}))}
/**
* @summary Returns a function, that, when invoked, will only be triggered at most once during a given window of time.
* @memberOf PSV.utils
* @copyright underscore.js - modified by Clément Prévost {@link http://stackoverflow.com/a/27078401}
* @param {Function} func
* @param {number} wait
* @returns {Function}
*/function F(t,e){var o,i,n,r,s=0,a=function(){s=Date.now(),r=void 0,n=t.apply(o,i),r||(o=i=null)};return function(){var c=Date.now();s||(s=c);var h=e-(c-s);return o=this,i=arguments,h<=0||h>e?(r&&(clearTimeout(r),r=void 0),s=c,n=t.apply(o,i),r||(o=i=null)):r||(r=setTimeout(a,h)),n}}function V(t){if("object"==typeof t&&null!==t){if("function"==typeof Object.getPrototypeOf){var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}return"[object Object]"===Object.prototype.toString.call(t)}return!1}
/**
* @summary Merges the enumerable attributes of two objects
* @memberOf PSV.utils
* @description Replaces arrays and alters the target object.
* @copyright Nicholas Fisher <nfisher110@gmail.com>
* @param {Object} target
* @param {Object} src
* @returns {Object} target
*/function W(t,e){var o=e;return function t(e,i){return Array.isArray(i)?(e&&Array.isArray(e)?e.length=0:e=[],i.forEach((function(o,i){e[i]=t(null,o)}))):"object"==typeof i?(e&&!Array.isArray(e)||(e={}),Object.keys(i).forEach((function(n){"object"==typeof i[n]&&i[n]&&V(i[n])?i[n]!=o&&(e[n]?t(e[n],i[n]):e[n]=t(null,i[n])):e[n]=i[n]}))):e=i,e}(t,e)}function Y(t){return W(null,t)}function j(t){return!t||0===Object.keys(t).length&&t.constructor===Object}function Z(t,e){Object.keys(t).forEach((function(o){e(t[o],o)}))}function X(t){return null==t}function B(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];for(var i=0,n=e;i<n.length;i++){var r=n[i];if(!X(r))return r}}function G(t){return"object"==typeof t&&null!=t}function q(t,e){if(t)for(var o=0,i=[["_",t]].concat(Object.entries(t));o<i.length;o++){var n=i[o][1];if(n.prototype instanceof e)return n}return null}function K(){var t=new Error("Loading was aborted.");return t.name="AbortError",t}function Q(t){return"AbortError"===(null==t?void 0:t.name)}function $(t){console.warn("PhotoSphereViewer: "+t)}function J(t){return[["x","y"],["longitude","latitude"]].some((function(e){var o=e[0],i=e[1];return void 0!==t[o]&&void 0!==t[i]}))}function tt(t,e){var o=t.match("<GPano:"+e+">(.*)</GPano:"+e+">");if(null!==o){var i=parseInt(o[1],10);return isNaN(i)?null:i}if(null!==(o=t.match("GPano:"+e+'="(.*?)"'))){var n=parseInt(o[1],10);return isNaN(n)?null:n}return null}var et={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"};function ot(t){if(!t)return{x:.5,y:.5};if("object"==typeof t)return t;var e=t.toLocaleLowerCase().split(" ").slice(0,2);1===e.length&&(e=void 0!==et[e[0]]?[e[0],"center"]:[e[0],e[0]]);var o="left"!==e[1]&&"right"!==e[1]&&"top"!==e[0]&&"bottom"!==e[0];e=e.map((function(t){return et[t]||t})),o||e.reverse();var i=e.join(" ").match(/^([0-9.]+)% ([0-9.]+)%$/);return i?{x:parseFloat(i[1])/100,y:parseFloat(i[2])/100}:{x:.5,y:.5}}var it={0:"left",.5:"center",1:"right"},nt={0:"top",.5:"center",1:"bottom"};function rt(t,e){if(void 0===e&&(e=!0),"string"==typeof t){var o=ot(t);if(!(o.x in it)||!(o.y in nt))throw new i('Unable to parse position "'+t+'"');t=[nt[o.y],it[o.x]]}if(!e&&"center"===t[0]&&"center"===t[1])throw new i('Unable to parse position "center center"');return t}function st(t){var o;if("string"==typeof t){var n=t.toString().trim(),r=parseFloat(n.replace(/^(-?[0-9]+(?:\.[0-9]*)?).*$/,"$1")),s=n.replace(/^-?[0-9]+(?:\.[0-9]*)?(.*)$/,"$1").trim();switch(s.match(/(pm|per minute)$/)&&(r/=60),s){case"dpm":case"degrees per minute":case"dps":case"degrees per second":o=e.MathUtils.degToRad(r);break;case"rdpm":case"radians per minute":case"rdps":case"radians per second":o=r;break;case"rpm":case"revolutions per minute":case"rps":case"revolutions per second":o=r*Math.PI*2;break;default:throw new i('Unknown speed unit "'+s+'"')}}else o=t;return o}function at(t,o,n){var r;if(void 0===o&&(o=!1),void 0===n&&(n=o),"string"==typeof t){var s=t.toLowerCase().trim().match(/^(-?[0-9]+(?:\.[0-9]*)?)(.*)$/);if(!s)throw new i('Unknown angle "'+t+'"');var a=parseFloat(s[1]),c=s[2];if(c)switch(c){case"deg":case"degs":r=e.MathUtils.degToRad(a);break;case"rad":case"rads":r=a;break;default:throw new i('Unknown angle unit "'+c+'"')}else r=a}else{if("number"!=typeof t||isNaN(t))throw new i('Unknown angle "'+t+'"');r=t}return r=D(o?r+Math.PI:r,2*Math.PI),o?e.MathUtils.clamp(r-Math.PI,-Math.PI/(n?2:1),Math.PI/(n?2:1)):r}function ct(t){var o=new e.Texture(t);return o.needsUpdate=!0,o.minFilter=e.LinearFilter,o.generateMipmaps=!1,o}var ht=new e.Quaternion;function lt(t,e){ht.setFromEuler(e).invert(),t.applyQuaternion(ht)}var pt=function(){function t(t){var e=this;this.__callbacks=[],t?(t.easing&&"string"!=typeof t.easing||(t.easing=w[t.easing||"linear"]),this.__start=null,this.options=t,t.delay?this.__delayTimeout=setTimeout((function(){e.__delayTimeout=null,e.__animationFrame=window.requestAnimationFrame((function(t){return e.__run(t)}))}),t.delay):this.__animationFrame=window.requestAnimationFrame((function(t){return e.__run(t)}))):this.__resolved=!0}var e=t.prototype;return e.__run=function(t){var e=this;null===this.__start&&(this.__start=t);var o=(t-this.__start)/this.options.duration,i={};o<1?(Z(this.options.properties,(function(t,n){t&&(i[n]=t.start+(t.end-t.start)*e.options.easing(o))})),this.options.onTick(i,o),this.__animationFrame=window.requestAnimationFrame((function(t){return e.__run(t)}))):(Z(this.options.properties,(function(t,e){t&&(i[e]=t.end)})),this.options.onTick(i,1),this.__animationFrame=window.requestAnimationFrame((function(){e.__resolved=!0,e.__resolve(!0)})))},e.__resolve=function(t){this.__callbacks.forEach((function(e){return e(t)})),this.__callbacks.length=0},e.then=function(t){var e=this;return this.__resolved||this.__cancelled?Promise.resolve(this.__resolved).then(t):new Promise((function(t){e.__callbacks.push(t)})).then(t)},e.cancel=function(){this.__cancelled||this.__resolved||(this.__cancelled=!0,this.__resolve(!1),this.__delayTimeout&&(window.clearTimeout(this.__delayTimeout),this.__delayTimeout=null),this.__animationFrame&&(window.cancelAnimationFrame(this.__animationFrame),this.__animationFrame=null))},t}(),ut=function(){function t(e,o,n,r,s){if(void 0===o&&(o=0),void 0===n&&(n=-1/0),void 0===r&&(r=1/0),void 0===s&&(s=!1),this.fn=e,this.mode=t.STOP,this.speed=0,this.speedMult=1,this.currentSpeed=0,this.target=0,this.current=o,this.min=n,this.max=r,this.loopValue=s,s&&0!==n)throw new i("invalid config");this.fn&&this.fn(o)}var o=t.prototype;return o.setSpeed=function(t){this.speed=t},o.goto=function(o,i){void 0===i&&(i=1),this.mode=t.POSITION,this.target=this.loopValue?D(o,this.max):e.MathUtils.clamp(o,this.min,this.max),this.speedMult=i},o.step=function(e,o){void 0===o&&(o=1),this.mode!==t.POSITION&&(this.target=this.current),this.goto(this.target+e,o)},o.roll=function(e,o){void 0===e&&(e=!1),void 0===o&&(o=1),this.mode=t.INFINITE,this.target=e?-1/0:1/0,this.speedMult=o},o.stop=function(){this.mode=t.STOP},o.setValue=function(o){return this.target=this.loopValue?D(o,this.max):e.MathUtils.clamp(o,this.min,this.max),this.mode=t.STOP,this.target!==this.current&&(this.current=this.target,this.fn&&this.fn(this.current),!0)},o.update=function(o){if(this.mode===t.POSITION){this.loopValue&&Math.abs(this.target-this.current)>this.max/2&&(this.current=this.current<this.target?this.current+this.max:this.current-this.max);var i=this.currentSpeed*this.currentSpeed/(this.speed*this.speedMult*4);Math.abs(this.target-this.current)<=i&&(this.mode=t.STOP)}var n=this.mode===t.STOP?0:this.speed*this.speedMult;this.target<this.current&&(n=-n),this.currentSpeed<n?this.currentSpeed=Math.min(n,this.currentSpeed+o/1e3*this.speed*this.speedMult*2):this.currentSpeed>n&&(this.currentSpeed=Math.max(n,this.currentSpeed-o/1e3*this.speed*this.speedMult*2));var r=null;return this.current>this.target&&this.currentSpeed?r=Math.max(this.target,this.current+this.currentSpeed*o/1e3):this.current<this.target&&this.currentSpeed&&(r=Math.min(this.target,this.current+this.currentSpeed*o/1e3)),null!==r&&(r=this.loopValue?D(r,this.max):e.MathUtils.clamp(r,this.min,this.max))!==this.current&&(this.current=r,this.fn&&this.fn(this.current),!0)},t}();ut.STOP=0,ut.INFINITE=1,ut.POSITION=2;var dt=function(){function t(t,e){this.fn=e,this.dynamics=t,this.fn&&this.fn(this.current)}var e=t.prototype;return e.setSpeed=function(t){Z(this.dynamics,(function(e){e.setSpeed(t)}))},e.goto=function(t,e){var o=this;void 0===e&&(e=1),Z(t,(function(t,i){o.dynamics[i].goto(t,e)}))},e.step=function(t,e){var o=this;void 0===e&&(e=1),Z(t,(function(t,i){o.dynamics[i].step(t,e)}))},e.roll=function(t,e){var o=this;void 0===e&&(e=1),Z(t,(function(t,i){o.dynamics[i].roll(t,e)}))},e.stop=function(){Z(this.dynamics,(function(t){return t.stop()}))},e.setValue=function(t){var e=this,o=!1;return Z(t,(function(t,i){o|=e.dynamics[i].setValue(t)})),o&&this.fn&&this.fn(this.current),o},e.update=function(t){var e=!1;return Z(this.dynamics,(function(o){e|=o.update(t)})),e&&this.fn&&this.fn(this.current),e},s(t,[{key:"current",get:function(){var t={};return Z(this.dynamics,(function(e,o){t[o]=e.current})),t}}]),t}(),vt=function(t){function e(e){var o,i=e.psv,n=e.container,r=e.direction,s=e.onUpdate;return(o=t.call(this)||this).psv=i,o.container=n,o.prop={onUpdate:s,direction:r,mousedown:!1,mouseover:!1},o.container.addEventListener("click",l(o)),o.container.addEventListener("mousedown",l(o)),o.container.addEventListener("mouseenter",l(o)),o.container.addEventListener("mouseleave",l(o)),o.container.addEventListener("touchstart",l(o)),o.container.addEventListener("mousemove",l(o),!0),o.container.addEventListener("touchmove",l(o),!0),window.addEventListener("mouseup",l(o)),window.addEventListener("touchend",l(o)),o}c(e,t);var o=e.prototype;return o.destroy=function(){window.removeEventListener("mouseup",this),window.removeEventListener("touchend",this)},o.handleEvent=function(t){switch(t.type){case"click":t.stopPropagation();break;case"mousedown":this.__onMouseDown(t);break;case"mouseenter":this.__onMouseEnter(t);break;case"mouseleave":this.__onMouseLeave(t);break;case"touchstart":this.__onTouchStart(t);break;case"mousemove":this.__onMouseMove(t);break;case"touchmove":this.__onTouchMove(t);break;case"mouseup":this.__onMouseUp(t);break;case"touchend":this.__onTouchEnd(t)}},o.__onMouseDown=function(t){this.prop.mousedown=!0,this.__update(t,!0)},o.__onMouseEnter=function(t){this.prop.mouseover=!0,this.__update(t,!0)},o.__onTouchStart=function(t){this.prop.mouseover=!0,this.prop.mousedown=!0,this.__update(t.changedTouches[0],!0)},o.__onMouseMove=function(t){(this.prop.mousedown||this.prop.mouseover)&&(t.stopPropagation(),this.__update(t,!0))},o.__onTouchMove=function(t){(this.prop.mousedown||this.prop.mouseover)&&(t.stopPropagation(),this.__update(t.changedTouches[0],!0))},o.__onMouseUp=function(t){this.prop.mousedown&&(this.prop.mousedown=!1,this.__update(t,!1))},o.__onMouseLeave=function(t){this.prop.mouseover&&(this.prop.mouseover=!1,this.__update(t,!0))},o.__onTouchEnd=function(t){this.prop.mousedown&&(this.prop.mouseover=!1,this.prop.mousedown=!1,this.__update(t.changedTouches[0],!1))},o.__update=function(t,e){var o=this.container.getBoundingClientRect(),i=t[this.vertical?"clientY":"clientX"],n=o[this.vertical?"bottom":"left"],r=o[this.vertical?"height":"width"],s=Math.abs((n-i)/r);this.prop.onUpdate({value:s,click:!e,mousedown:this.prop.mousedown,mouseover:this.prop.mouseover,cursor:t})},s(e,[{key:"vertical",get:function(){return this.prop.direction===e.VERTICAL}}]),e}(o.EventEmitter);vt.VERTICAL=1,vt.HORIZONTAL=2;var ft=Object.freeze({__proto__:null,toggleClass:L,addClasses:x,removeClasses:function(t,e){var o;(o=t.classList).remove.apply(o,e.split(" "))},hasParent:function(t,e){var o=t;do{if(o===e)return!0;o=o.parentNode}while(o);return!1},getClosest:C,getPosition:P,isFullscreenEnabled:A,requestFullscreen:I,exitFullscreen:S,getStyle:R,normalizeWheel:k,bound:function(t,o,i){return e.MathUtils.clamp(t,o,i)},loop:D,isPowerOfTwo:function(t){return e.MathUtils.isPowerOfTwo(t)},sum:function(t){return t.reduce((function(t,e){return t+e}),0)},distance:N,getShortestArc:U,getAngle:H,greatArcDistance:function(t,e){var o=t[0],i=t[1],n=e[0],r=e[1],s=(n-o)*Math.cos((i+r)/2),a=r-i;return Math.sqrt(s*s+a*a)},dasherize:z,throttle:F,isPlainObject:V,deepmerge:W,clone:Y,isEmpty:j,each:Z,isNil:X,firstNonNull:B,deepEqual:function t(e,o){if(e===o)return!0;if(G(e)&&G(o)){if(Object.keys(e).length!==Object.keys(o).length)return!1;for(var i=0,n=Object.keys(e);i<n.length;i++){var r=n[i];if(!t(e[r],o[r]))return!1}return!0}return!1},pluginInterop:q,getAbortError:K,isAbortError:Q,logWarn:$,isExtendedPosition:J,getXMPValue:tt,parsePosition:ot,cleanPosition:rt,parseSpeed:st,parseAngle:at,createTexture:ct,applyEulerInverse:lt,Animation:pt,Dynamic:ut,MultiDynamic:dt,Slider:vt}),mt=function(t){function o(o,n){var r;if((r=t.call(this,o)||this).config=a({resolution:64},n),!e.MathUtils.isPowerOfTwo(r.config.resolution))throw new i("EquirectangularAdapter resolution must be power of two");return r.SPHERE_SEGMENTS=r.config.resolution,r.SPHERE_HORIZONTAL_SEGMENTS=r.SPHERE_SEGMENTS/2,r}c(o,t);var r=o.prototype;return r.supportsTransition=function(){return!0},r.supportsPreload=function(){return!0},r.loadTexture=function(t,e,o){var n=this;return void 0===o&&(o=this.psv.config.useXmpData),"string"!=typeof t?((Array.isArray(t)||"object"==typeof t&&t.left)&&$("Cubemap support now requires an additional adapter, see https://photo-sphere-viewer.js.org/guide/adapters"),Promise.reject(new i("Invalid panorama url, are you using the right adapter?"))):(o?this.__loadXMP(t,(function(t){return n.psv.loader.setProgress(t)})).then((function(e){return n.psv.textureLoader.loadImage(t).then((function(t){return{img:t,xmpPanoData:e}}))})):this.psv.textureLoader.loadImage(t,(function(t){return n.psv.loader.setProgress(t)})).then((function(t){return{img:t,xmpPanoData:null}}))).then((function(o){var i,r,s,a,c,h,l,p,u,d=o.img,v=o.xmpPanoData;"function"==typeof e&&(e=e(d));var f={fullWidth:B(null==(i=e)?void 0:i.fullWidth,null==v?void 0:v.fullWidth,d.width),fullHeight:B(null==(r=e)?void 0:r.fullHeight,null==v?void 0:v.fullHeight,d.height),croppedWidth:B(null==(s=e)?void 0:s.croppedWidth,null==v?void 0:v.croppedWidth,d.width),croppedHeight:B(null==(a=e)?void 0:a.croppedHeight,null==v?void 0:v.croppedHeight,d.height),croppedX:B(null==(c=e)?void 0:c.croppedX,null==v?void 0:v.croppedX,0),croppedY:B(null==(h=e)?void 0:h.croppedY,null==v?void 0:v.croppedY,0),poseHeading:B(null==(l=e)?void 0:l.poseHeading,null==v?void 0:v.poseHeading,0),posePitch:B(null==(p=e)?void 0:p.posePitch,null==v?void 0:v.posePitch,0),poseRoll:B(null==(u=e)?void 0:u.poseRoll,null==v?void 0:v.poseRoll,0)};f.croppedWidth===d.width&&f.croppedHeight===d.height||$("Invalid panoData, croppedWidth and/or croppedHeight is not coherent with loaded image.\n panoData: "+f.croppedWidth+"x"+f.croppedHeight+", image: "+d.width+"x"+d.height),(e||v)&&f.fullWidth!==2*f.fullHeight&&$("Invalid panoData, fullWidth should be twice fullHeight");var m=n.__createEquirectangularTexture(d,f);return{panorama:t,texture:m,panoData:f}}))},r.__loadXMP=function(t,e){var o=this;return this.psv.textureLoader.loadFile(t,e).then((function(t){return o.__loadBlobAsString(t)})).then((function(t){var e=t.indexOf("<x:xmpmeta"),o=t.indexOf("</x:xmpmeta>"),i=t.substring(e,o);return-1!==e&&-1!==o&&i.includes("GPano:")?{fullWidth:tt(i,"FullPanoWidthPixels"),fullHeight:tt(i,"FullPanoHeightPixels"),croppedWidth:tt(i,"CroppedAreaImageWidthPixels"),croppedHeight:tt(i,"CroppedAreaImageHeightPixels"),croppedX:tt(i,"CroppedAreaLeftPixels"),croppedY:tt(i,"CroppedAreaTopPixels"),poseHeading:tt(i,"PoseHeadingDegrees"),posePitch:tt(i,"PosePitchDegrees"),poseRoll:tt(i,"PoseRollDegrees")}:null}))},r.__loadBlobAsString=function(t){return new Promise((function(e,o){var i=new FileReader;i.onload=function(){return e(i.result)},i.onerror=o,i.readAsText(t)}))},r.__createEquirectangularTexture=function(t,e){if(e.fullWidth>b.maxTextureWidth||e.croppedWidth!==e.fullWidth||e.croppedHeight!==e.fullHeight){var o=b.getMaxCanvasWidth()/e.fullWidth,i=a({},e);o<1&&(i.fullWidth*=o,i.fullHeight*=o,i.croppedWidth*=o,i.croppedHeight*=o,i.croppedX*=o,i.croppedY*=o);var n=document.createElement("canvas");return n.width=i.fullWidth,n.height=i.fullHeight,n.getContext("2d").drawImage(t,i.croppedX,i.croppedY,i.croppedWidth,i.croppedHeight),ct(n)}return ct(t)},r.createMesh=function(t){void 0===t&&(t=1);var o=new e.SphereGeometry(p*t,this.SPHERE_SEGMENTS,this.SPHERE_HORIZONTAL_SEGMENTS,-Math.PI/2).scale(-1,1,1),i=n.createOverlayMaterial();return new e.Mesh(o,i)},r.setTexture=function(t,e){this.__setUniform(t,n.OVERLAY_UNIFORMS.panorama,e.texture),this.setOverlay(t,null)},r.setOverlay=function(t,o,i){this.__setUniform(t,n.OVERLAY_UNIFORMS.overlayOpacity,i),o?this.__setUniform(t,n.OVERLAY_UNIFORMS.overlay,o.texture):this.__setUniform(t,n.OVERLAY_UNIFORMS.overlay,new e.Texture)},r.setTextureOpacity=function(t,e){this.__setUniform(t,n.OVERLAY_UNIFORMS.globalOpacity,e),t.material.transparent=e<1},r.disposeTexture=function(t){var e;null==(e=t.texture)||e.dispose()},r.__setUniform=function(t,o,i){t.material.uniforms[o].value instanceof e.Texture&&t.material.uniforms[o].value.dispose(),t.material.uniforms[o].value=i},o}(n);mt.id="equirectangular",mt.supportsDownload=!0,mt.supportsOverlay=!0;var gt=function(){function t(t,e){this.psv=t.psv||t,this.parent=t,this.parent.children.push(this),this.children=[],this.prop={visible:!0},this.container=document.createElement("div"),this.container.className=e,this.parent.container.appendChild(this.container)}var e=t.prototype;return e.destroy=function(){this.parent.container.removeChild(this.container);var t=this.parent.children.indexOf(this);-1!==t&&this.parent.children.splice(t,1),this.children.slice().forEach((function(t){return t.destroy()})),this.children.length=0,delete this.container,delete this.parent,delete this.psv,delete this.prop},e.refreshUi=function(){var t=this;this.children.every((function(e){return e.refreshUi(),!0===t.psv.prop.uiRefresh}))},e.toggle=function(){this.isVisible()?this.hide():this.show()},e.hide=function(){this.container.style.display="none",this.prop.visible=!1},e.show=function(){this.container.style.display="",this.prop.visible=!0},e.isVisible=function(){return this.prop.visible},t}(),_t=function(t){function e(e,o,i,n){var r;return void 0===o&&(o=""),void 0===i&&(i=!1),void 0===n&&(n=!0),(r=t.call(this,e,"psv-button "+o)||this).prop=a({},r.prop,{id:r.constructor.id,collapsable:i,enabled:!0,supported:!0,collapsed:!1,active:!1,width:r.container.offsetWidth}),r.constructor.icon&&r.__setIcon(r.constructor.icon),r.prop.id&&r.psv.config.lang[r.prop.id]&&(r.container.title=r.psv.config.lang[r.prop.id]),n&&(r.container.tabIndex=0),r.container.addEventListener("click",(function(t){r.prop.enabled&&r.onClick(),t.stopPropagation()})),r.container.addEventListener("keydown",(function(t){t.key===y.Enter&&r.prop.enabled&&(r.onClick(),t.stopPropagation())})),r}c(e,t);var o=e.prototype;return o.checkSupported=function(){var t=this,e=this.isSupported();V(e)?(!1===e.initial&&(this.hide(),this.prop.supported=!1),e.promise.then((function(e){t.prop&&(t.prop.supported=e,e?t.show():t.hide())}))):(this.prop.supported=e,e||this.hide())},o.isSupported=function(){return!0},o.toggleActive=function(t){this.prop.active=void 0!==t?t:!this.prop.active,L(this.container,"psv-button--active",this.prop.active),this.constructor.iconActive&&this.__setIcon(this.prop.active?this.constructor.iconActive:this.constructor.icon)},o.show=function(t){void 0===t&&(t=!0),this.isVisible()||(this.prop.visible=!0,this.prop.collapsed||(this.container.style.display=""),t&&this.psv.refreshUi("show button "+this.prop.id))},o.hide=function(t){void 0===t&&(t=!0),this.isVisible()&&(this.prop.visible=!1,this.container.style.display="none",t&&this.psv.refreshUi("hide button "+this.prop.id))},o.disable=function(){this.container.classList.add("psv-button--disabled"),this.prop.enabled=!1},o.enable=function(){this.container.classList.remove("psv-button--disabled"),this.prop.enabled=!0},o.collapse=function(){this.prop.collapsed=!0,this.container.style.display="none"},o.uncollapse=function(){this.prop.collapsed=!1,this.prop.visible&&(this.container.style.display="")},o.__setIcon=function(t,e){void 0===e&&(e=this.container),t?(e.innerHTML=t,e.querySelector("svg").classList.add("psv-button-svg")):e.innerHTML=""},o.onClick=function(){throw new i('onClick not implemented for button "'+this.prop.id+'".')},e}(gt);_t.id=null,_t.groupId=null,_t.icon=null,_t.iconActive=null;var wt=function(t){function e(e){var o;return(o=t.call(this,e,"psv-button--hover-scale psv-autorotate-button",!0)||this).psv.on(f.AUTOROTATE,l(o)),o}c(e,t);var o=e.prototype;return o.destroy=function(){this.psv.off(f.AUTOROTATE,this),t.prototype.destroy.call(this)},o.handleEvent=function(t){if(t.type===f.AUTOROTATE)this.toggleActive(t.args[0])},o.onClick=function(){this.psv.isAutorotateEnabled()&&(this.psv.config.autorotateIdle=!1,this.psv.resetIdleTimer()),this.psv.toggleAutorotate()},e}(_t);wt.id="autorotate",wt.icon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 41 41"><path fill="currentColor" d="M40.5 14.1c-.1-.1-1.2-.5-2.899-1-.101 0-.2-.1-.2-.2C34.5 6.5 28 2 20.5 2S6.6 6.5 3.7 12.9c0 .1-.1.1-.2.2-1.7.6-2.8 1-2.9 1l-.6.3v12.1l.6.2c.1 0 1.1.4 2.7.9.1 0 .2.1.2.199C6.3 34.4 12.9 39 20.5 39c7.601 0 14.101-4.6 16.9-11.1 0-.101.1-.101.2-.2 1.699-.6 2.699-1 2.8-1l.6-.3V14.3l-.5-.2zM20.5 4c5.8 0 10.9 3 13.8 7.5.2.3-.1.6-.399.5-3.8-1-8.8-2-13.6-2-4.7 0-9.5 1-13.2 2-.3.1-.5-.2-.4-.5C9.7 7 14.8 4 20.5 4zm0 33c-5.9 0-11.1-3.1-14-7.899-.2-.301.1-.601.4-.5 3.9 1 8.9 2.1 13.6 2.1 5 0 9.9-1 13.601-2 .3-.1.5.2.399.5A16.422 16.422 0 0 1 20.5 37zm18.601-12.1c0 .1-.101.3-.2.3-2.5.9-10.4 3.6-18.4 3.6-7.1 0-15.6-2.699-18.3-3.6C2.1 25.2 2 25 2 24.9V16c0-.1.1-.3.2-.3 2.6-.9 10.6-3.6 18.2-3.6 7.5 0 15.899 2.7 18.5 3.6.1 0 .2.2.2.3v8.9z"/><path fill="currentColor" d="M18.7 24l6.4-3.7c.3-.2.3-.7 0-.8l-6.4-3.8c-.3-.2-.7 0-.7.4v7.4c0 .5.4.7.7.5z"/>\x3c!--Created by Nick Bluth from the Noun Project--\x3e</svg>\n',wt.iconActive='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 41 41"><path fill="currentColor" d="M40.5 14.1c-.1-.1-1.2-.5-2.898-1-.102 0-.202-.1-.202-.2C34.5 6.5 28 2 20.5 2S6.6 6.5 3.7 12.9c0 .1-.1.1-.2.2-1.7.6-2.8 1-2.9 1l-.6.3v12.1l.6.2c.1 0 1.1.399 2.7.899.1 0 .2.101.2.199C6.3 34.4 12.9 39 20.5 39c7.602 0 14.102-4.6 16.9-11.1 0-.102.1-.102.199-.2 1.699-.601 2.699-1 2.801-1l.6-.3V14.3l-.5-.2zM6.701 11.5C9.7 7 14.8 4 20.5 4c5.8 0 10.9 3 13.8 7.5.2.3-.1.6-.399.5-3.799-1-8.799-2-13.6-2-4.7 0-9.5 1-13.2 2-.3.1-.5-.2-.4-.5zM25.1 20.3L18.7 24c-.3.2-.7 0-.7-.5v-7.4c0-.4.4-.6.7-.4l6.399 3.8c.301.1.301.6.001.8zm9.4 8.901A16.421 16.421 0 0 1 20.5 37c-5.9 0-11.1-3.1-14-7.898-.2-.302.1-.602.4-.5 3.9 1 8.9 2.1 13.6 2.1 5 0 9.9-1 13.602-2 .298-.1.5.198.398.499z"/>\x3c!--Created by Nick Bluth from the Noun Project--\x3e</svg>\n';var yt=function(t){function e(e,o){var i;return(i=t.call(this,e,"psv-custom-button",!1!==o.collapsable,!1!==o.tabbable)||this).config=o,i.config.id?i.prop.id=i.config.id:i.prop.id="psvButton-"+Math.random().toString(36).substr(2,9),i.config.className&&x(i.container,i.config.className),i.config.title&&(i.container.title=i.config.title),i.config.content&&(i.container.innerHTML=i.config.content),i.prop.width=i.container.offsetWidth,!1===i.config.enabled&&i.disable(),!1===i.config.visible&&i.hide(),i}c(e,t);var o=e.prototype;return o.destroy=function(){delete this.config,t.prototype.destroy.call(this)},o.onClick=function(){this.config.onClick&&this.config.onClick.call(this.psv,this.psv)},e}(_t),Et=function(t){function e(e){var o;return(o=t.call(this,e,"psv-button--hover-scale psv-description-button")||this).prop=a({},o.prop,{mode:null}),o.psv.on(f.HIDE_NOTIFICATION,l(o)),o.psv.on(f.SHOW_NOTIFICATION,l(o)),o.psv.on(f.CLOSE_PANEL,l(o)),o.psv.on(f.OPEN_PANEL,l(o)),o}c(e,t);var o=e.prototype;return o.destroy=function(){this.psv.off(f.HIDE_NOTIFICATION,this),this.psv.off(f.SHOW_NOTIFICATION,this),this.psv.off(f.CLOSE_PANEL,this),this.psv.off(f.OPEN_PANEL,this),t.prototype.destroy.call(this)},o.handleEvent=function(t){if(this.prop.mode){var e=!1;switch(t.type){case f.HIDE_NOTIFICATION:e=1===this.prop.mode;break;case f.SHOW_NOTIFICATION:e=1===this.prop.mode&&t.args[0]!==_.DESCRIPTION;break;case f.CLOSE_PANEL:e=2===this.prop.mode;break;case f.OPEN_PANEL:e=2===this.prop.mode&&t.args[0]!==_.DESCRIPTION}e&&(this.toggleActive(!1),this.prop.mode=null)}},o.hide=function(e){t.prototype.hide.call(this,e),this.prop.mode&&this.__close()},o.refreshUi=function(t){if(void 0===t&&(t=!1),t){var e=this.psv.navbar.getButton("caption",!1),o=e&&!e.isVisible(),i=!!this.psv.config.description;o||i?this.show(!1):this.hide(!1)}},o.onClick=function(){this.prop.mode?this.__close():this.__open()},o.__close=function(){switch(this.prop.mode){case 1:this.psv.notification.hide(_.DESCRIPTION);break;case 2:this.psv.panel.hide(_.DESCRIPTION)}},o.__open=function(){this.toggleActive(!0),this.psv.config.description?(this.prop.mode=2,this.psv.panel.show({id:_.DESCRIPTION,content:(this.psv.config.caption?"<p>"+this.psv.config.caption+"</p>":"")+this.psv.config.description})):(this.prop.mode=1,this.psv.notification.show({id:_.DESCRIPTION,content:this.psv.config.caption}))},e}(_t);Et.id="description",Et.icon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path fill="currentColor" d="M28.3 26.1c-1 2.6-1.9 4.8-2.6 7-2.5 7.4-5 14.7-7.2 22-1.3 4.4.5 7.2 4.3 7.8 1.3.2 2.8.2 4.2-.1 8.2-2 11.9-8.6 15.7-15.2l-2.2 2a18.8 18.8 0 0 1-7.4 5.2 2 2 0 0 1-1.6-.2c-.2-.1 0-1 0-1.4l.8-1.8L41.9 28c.5-1.4.9-3 .7-4.4-.2-2.6-3-4.4-6.3-4.4-8.8.2-15 4.5-19.5 11.8-.2.3-.2.6-.3 1.3 3.7-2.8 6.8-6.1 11.8-6.2z"/><circle fill="currentColor" cx="39.3" cy="9.2" r="8.2"/>\x3c!--Created by Arafat Uddin from the Noun Project--\x3e</svg>\n';var Tt=function(t){function e(e){return t.call(this,e,"psv-button--hover-scale psv-download-button",!0)||this}c(e,t);var o=e.prototype;return o.onClick=function(){var t=this,e=document.createElement("a");e.href=this.psv.config.downloadUrl||this.psv.config.panorama,e.download=e.href.split("/").pop(),this.psv.container.appendChild(e),e.click(),setTimeout((function(){t.psv.container.removeChild(e)}),100)},o.refreshUi=function(){var t=this.psv.adapter.constructor.supportsDownload||this.psv.config.downloadUrl;t&&!this.prop.visible?this.show():!t&&this.prop.visible&&this.hide()},e}(_t);Tt.id="download",Tt.icon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="currentColor" d="M83.3 35.6h-17V3H32.2v32.6H16.6l33.6 32.7 33-32.7z"/><path fill="currentColor" d="M83.3 64.2v16.3H16.6V64.2H-.1v32.6H100V64.2H83.3z"/>\x3c!--Created by Michael Zenaty from the Noun Project--\x3e</svg>\n';var bt=function(t){function e(e){var o;return(o=t.call(this,e,"psv-button--hover-scale psv-fullscreen-button")||this).psv.on(f.FULLSCREEN_UPDATED,l(o)),o}c(e,t);var o=e.prototype;return o.destroy=function(){this.psv.off(f.FULLSCREEN_UPDATED,this),t.prototype.destroy.call(this)},o.handleEvent=function(t){if(t.type===f.FULLSCREEN_UPDATED)this.toggleActive(t.args[0])},o.onClick=function(){this.psv.toggleFullscreen()},e}(_t);bt.id="fullscreen",bt.icon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="currentColor" d="M100 40H87.1V18.8h-21V6H100zM100 93.2H66V80.3h21.1v-21H100zM34 93.2H0v-34h12.9v21.1h21zM12.9 40H0V6h34v12.9H12.8z"/>\x3c!--Created by Garrett Knoll from the Noun Project--\x3e</svg>\n',bt.iconActive='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="currentColor" d="M66 7h13v21h21v13H66zM66 60.3h34v12.9H79v21H66zM0 60.3h34v34H21V73.1H0zM21 7h13v34H0V28h21z"/>\x3c!--Created by Garrett Knoll from the Noun Project--\x3e</svg>\n';var Ot='<svg xmlns="http://www.w3.org/2000/svg" viewBox="10 10 80 80"><g fill="currentColor"><circle r="10" cx="20" cy="20"/><circle r="10" cx="50" cy="20"/><circle r="10" cx="80" cy="20"/><circle r="10" cx="20" cy="50"/><circle r="10" cx="50" cy="50"/><circle r="10" cx="80" cy="50"/><circle r="10" cx="20" cy="80"/><circle r="10" cx="50" cy="80"/><circle r="10" cx="80" cy="80"/></g>\x3c!-- Created by Richard Kunák from the Noun Project--\x3e</svg>\n',Mt=function(t){function e(e){var o;return(o=t.call(this,e,"psv-button--hover-scale psv-menu-button")||this).psv.on(f.OPEN_PANEL,l(o)),o.psv.on(f.CLOSE_PANEL,l(o)),t.prototype.hide.call(l(o)),o}c(e,t);var o=e.prototype;return o.destroy=function(){this.psv.off(f.OPEN_PANEL,this),this.psv.off(f.CLOSE_PANEL,this),t.prototype.destroy.call(this)},o.handleEvent=function(t){switch(t.type){case f.OPEN_PANEL:this.toggleActive(t.args[0]===_.MENU);break;case f.CLOSE_PANEL:this.toggleActive(!1)}},o.hide=function(e){t.prototype.hide.call(this,e),this.__hideMenu()},o.show=function(e){t.prototype.show.call(this,e),this.prop.active&&this.__showMenu()},o.onClick=function(){this.prop.active?this.__hideMenu():this.__showMenu()},o.__showMenu=function(){var t=this;this.psv.panel.show({id:_.MENU,content:e.MENU_TEMPLATE(this.parent.collapsed,this.psv,z(e.BUTTON_DATA)),noMargin:!0,clickHandler:function(o){var i=o.target?C(o.target,"li"):void 0,n=i?i.dataset[e.BUTTON_DATA]:void 0;n&&(t.parent.getButton(n).onClick(),t.__hideMenu())}})},o.__hideMenu=function(){this.psv.panel.hide(_.MENU)},e}(_t);Mt.id="menu",Mt.icon=Ot,Mt.BUTTON_DATA="psvButton",Mt.MENU_TEMPLATE=function(t,e,o){return'\n<div class="psv-panel-menu psv-panel-menu--stripped">\n <h1 class="psv-panel-menu-title">'+Ot+" "+e.config.lang.menu+'</h1>\n <ul class="psv-panel-menu-list">\n '+t.map((function(t){return"\n <li data-"+o+'="'+t.prop.id+'" class="psv-panel-menu-item" tabindex="0">\n <span class="psv-panel-menu-item-icon">'+t.container.innerHTML+'</span>\n <span class="psv-panel-menu-item-label">'+t.container.title+"</span>\n </li>\n "})).join("")+"\n </ul>\n</div>\n"};var Lt=function(){function t(t){void 0===t&&(t=200),this.delay=t,this.time=0,this.timeout=null}var e=t.prototype;return e.down=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.time=(new Date).getTime()},e.up=function(t){var e=this;this.time&&((new Date).getTime()-this.time<this.delay?this.timeout=setTimeout((function(){t(),e.timeout=null,e.time=0}),this.delay):(t(),this.time=0))},t}();function xt(t){var e=0;switch(t){case"up":e=90;break;case"right":e=180;break;case"down":e=-90;break;default:e=0}return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="40 40 432 432"><g transform="rotate(0, 256, 256)"><path fill="currentColor" d="M425.23 210.55H227.39a5 5 0 01-3.53-8.53l56.56-56.57a45.5 45.5 0 000-64.28 45.15 45.15 0 00-32.13-13.3 45.15 45.15 0 00-32.14 13.3L41.32 256l174.83 174.83a45.15 45.15 0 0032.14 13.3 45.15 45.15 0 0032.13-13.3 45.5 45.5 0 000-64.28l-56.57-56.57a5 5 0 013.54-8.53h197.84c25.06 0 45.45-20.39 45.45-45.45s-20.4-45.45-45.45-45.45z"/></g>\x3c!-- Created by Flatart from the Noun Project --\x3e</svg>\n'.replace("rotate(0","rotate("+e)}var Ct=function(t){function e(e,o){var i;return(i=t.call(this,e,"psv-button--hover-scale psv-move-button")||this).container.title=i.psv.config.lang.move,i.prop=a({},i.prop,{value:o,handler:new Lt}),i.container.addEventListener("mousedown",l(i)),i.container.addEventListener("keydown",l(i)),i.container.addEventListener("keyup",l(i)),i.psv.container.addEventListener("mouseup",l(i)),i.psv.container.addEventListener("touchend",l(i)),i}c(e,t);var o=e.prototype;return o.destroy=function(){this.__onMouseUp(),this.psv.container.removeEventListener("mouseup",this),this.psv.container.removeEventListener("touchend",this),t.prototype.destroy.call(this)},o.handleEvent=function(t){switch(t.type){case"mousedown":this.__onMouseDown();break;case"mouseup":case"touchend":this.__onMouseUp();break;case"keydown":t.key===y.Enter&&this.__onMouseDown();break;case"keyup":t.key===y.Enter&&this.__onMouseUp()}},o.isSupported=function(){return{initial:!b.isTouchEnabled.initial,promise:b.isTouchEnabled.promise.then((function(t){return!t}))}},o.onClick=function(){},o.__onMouseDown=function(){this.prop.enabled&&(this.psv.__stopAll(),this.psv.dynamics.position.roll(this.prop.value),this.prop.handler.down())},o.__onMouseUp=function(){var t=this;this.prop.enabled&&this.prop.handler.up((function(){t.psv.dynamics.position.stop(),t.psv.resetIdleTimer()}))},e}(_t);Ct.groupId="move";var Pt=function(t){function e(e){return t.call(this,e,{latitude:!0})||this}return c(e,t),e}(Ct);Pt.id="moveDown",Pt.icon=xt("down");var At=function(t){function e(e){return t.call(this,e,{longitude:!0})||this}return c(e,t),e}(Ct);At.id="moveLeft",At.icon=xt("left");var It=function(t){function e(e){return t.call(this,e,{longitude:!1})||this}return c(e,t),e}(Ct);It.id="moveRight",It.icon=xt("right");var St=function(t){function e(e){return t.call(this,e,{latitude:!1})||this}return c(e,t),e}(Ct);St.id="moveUp",St.icon=xt("up");var Rt=function(t){function e(e,o){var i;return(i=t.call(this,e,"psv-button--hover-scale psv-zoom-button")||this).prop=a({},i.prop,{value:o,handler:new Lt}),i.container.addEventListener("mousedown",l(i)),i.container.addEventListener("keydown",l(i)),i.container.addEventListener("keyup",l(i)),i.psv.container.addEventListener("mouseup",l(i)),i.psv.container.addEventListener("touchend",l(i)),i}c(e,t);var o=e.prototype;return o.destroy=function(){this.__onMouseUp(),this.psv.container.removeEventListener("mouseup",this),this.psv.container.removeEventListener("touchend",this),t.prototype.destroy.call(this)},o.handleEvent=function(t){switch(t.type){case"mousedown":this.__onMouseDown();break;case"mouseup":case"touchend":this.__onMouseUp();break;case"keydown":t.key===y.Enter&&this.__onMouseDown();break;case"keyup":t.key===y.Enter&&this.__onMouseUp()}},o.isSupported=function(){return{initial:!b.isTouchEnabled.initial,promise:b.isTouchEnabled.promise.then((function(t){return!t}))}},o.onClick=function(){},o.__onMouseDown=function(){this.prop.enabled&&(this.psv.dynamics.zoom.roll(this.prop.value),this.prop.handler.down())},o.__onMouseUp=function(){var t=this;this.prop.enabled&&this.prop.handler.up((function(){return t.psv.dynamics.zoom.stop()}))},e}(_t);Rt.groupId="zoom";var kt=function(t){function e(e){return t.call(this,e,!1)||this}return c(e,t),e}(Rt);kt.id="zoomIn",kt.icon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="currentColor" d="M14.043 12.22a7.738 7.738 0 1 0-1.823 1.822l4.985 4.985c.503.504 1.32.504 1.822 0a1.285 1.285 0 0 0 0-1.822l-4.984-4.985zm-6.305 1.043a5.527 5.527 0 1 1 0-11.053 5.527 5.527 0 0 1 0 11.053z"/><path fill="currentColor" d="M8.728 4.009H6.744v2.737H4.006V8.73h2.738v2.736h1.984V8.73h2.737V6.746H8.728z"/>\x3c!--Created by Ryan Canning from the Noun Project--\x3e</svg>\n';var Dt=function(t){function e(e){return t.call(this,e,!0)||this}return c(e,t),e}(Rt);Dt.id="zoomOut",Dt.icon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="currentColor" d="M14.043 12.22a7.738 7.738 0 1 0-1.823 1.822l4.985 4.985c.503.504 1.32.504 1.822 0a1.285 1.285 0 0 0 0-1.822l-4.984-4.985zm-6.305 1.043a5.527 5.527 0 1 1 0-11.053 5.527 5.527 0 0 1 0 11.053z"/><path fill="currentColor" d="M4.006 6.746h7.459V8.73H4.006z"/>\x3c!--Created by Ryan Canning from the Noun Project--\x3e</svg>\n';var Nt=function(t){function e(e){var o;return(o=t.call(this,e,"psv-zoom-range",!1,!1)||this).prop=a({},o.prop,{mediaMinWidth:0}),o.zoomRange=document.createElement("div"),o.zoomRange.className="psv-zoom-range-line",o.container.appendChild(o.zoomRange),o.zoomValue=document.createElement("div"),o.zoomValue.className="psv-zoom-range-handle",o.zoomRange.appendChild(o.zoomValue),o.slider=new vt({container:o.container,direction:vt.HORIZONTAL,onUpdate:function(t){return o.__onSliderUpdate(t)}}),o.prop.mediaMinWidth=parseInt(R(o.container,"maxWidth"),10),o.psv.on(f.ZOOM_UPDATED,l(o)),o.psv.prop.ready?o.__moveZoomValue(o.psv.getZoomLevel()):o.psv.once(f.READY,l(o)),o.refreshUi(),o}c(e,t);var o=e.prototype;return o.destroy=function(){this.slider.destroy(),delete this.zoomRange,delete this.zoomValue,this.psv.off(f.ZOOM_UPDATED,this),this.psv.off(f.READY,this),t.prototype.destroy.call(this)},o.handleEvent=function(t){switch(t.type){case f.ZOOM_UPDATED:this.__moveZoomValue(t.args[0]);break;case f.READY:this.__moveZoomValue(this.psv.getZoomLevel())}},o.isSupported=function(){return{initial:!b.isTouchEnabled.initial,promise:b.isTouchEnabled.promise.then((function(t){return!t}))}},o.refreshUi=function(){this.prop.supported&&(this.psv.prop.size.width<=this.prop.mediaMinWidth&&this.prop.visible?this.hide():this.psv.prop.size.width>this.prop.mediaMinWidth&&!this.prop.visible&&this.show())},o.onClick=function(){},o.__moveZoomValue=function(t){this.zoomValue.style.left=t/100*this.zoomRange.offsetWidth-this.zoomValue.offsetWidth/2+"px"},o.__onSliderUpdate=function(t){t.mousedown&&this.psv.zoom(100*t.value)},e}(_t);Nt.id="zoomRange",Nt.groupId="zoom";var Ut,Ht=function(t){function e(e){var o;return(o=t.call(this)||this).psv=e,o}c(e,t);var o=e.prototype;return o.init=function(){},o.destroy=function(){delete this.psv},e}(o.EventEmitter);Ht.id=null;var zt={panorama:null,overlay:null,overlayOpacity:1,container:null,adapter:null,plugins:[],caption:null,description:null,downloadUrl:null,loadingImg:null,loadingTxt:"Loading...",size:null,fisheye:!1,minFov:30,maxFov:90,defaultZoomLvl:50,defaultLong:0,defaultLat:0,sphereCorrection:null,moveSpeed:1,zoomSpeed:1,autorotateDelay:null,autorotateIdle:!1,autorotateSpeed:"2rpm",autorotateLat:null,moveInertia:!0,mousewheel:!0,mousemove:!0,captureCursor:!1,mousewheelCtrlKey:!1,touchmoveTwoFingers:!1,useXmpData:!0,panoData:null,requestHeaders:null,canvasBackground:"#000",withCredentials:!1,navbar:["autorotate","zoom","move","download","description","caption","fullscreen"],lang:{autorotate:"Automatic rotation",zoom:"Zoom",zoomOut:"Zoom out",zoomIn:"Zoom in",move:"Move",download:"Download",fullscreen:"Fullscreen",menu:"Menu",twoFingers:"Use two fingers to navigate",ctrlZoom:"Use ctrl + scroll to zoom the image",loadError:"The panorama can't be loaded"},keyboard:(Ut={},Ut[y.ArrowUp]=v.ROTATE_LAT_UP,Ut[y.ArrowDown]=v.ROTATE_LAT_DOWN,Ut[y.ArrowRight]=v.ROTATE_LONG_RIGHT,Ut[y.ArrowLeft]=v.ROTATE_LONG_LEFT,Ut[y.PageUp]=v.ZOOM_IN,Ut[y.PageDown]=v.ZOOM_OUT,Ut[y.Plus]=v.ZOOM_IN,Ut[y.Minus]=v.ZOOM_OUT,Ut[y.Space]=v.TOGGLE_AUTOROTATE,Ut)},Ft={panorama:"Use setPanorama method to change the panorama",panoData:"Use setPanorama method to change the panorama",container:"Cannot change viewer container",adapter:"Cannot change adapter",plugins:"Cannot change plugins"},Vt={zoomButtonIncrement:"zoomButtonIncrement is deprecated, use zoomSpeed",mousewheelSpeed:"mousewheelSpeed is deprecated, use zoomSpeed",sphereCorrectionReorder:"sphereCorrectionReorder is deprecated"},Wt={container:function(t){if(!t)throw new i("No value given for container.");return t},adapter:function(t){if(!(t=t?Array.isArray(t)?[q(t[0],n),t[1]]:[q(t,n)]:[mt])[0])throw new i("Un undefined value with given for adapter.");return t},overlayOpacity:function(t){return e.MathUtils.clamp(t,0,1)},defaultLong:function(t){return at(t)},defaultLat:function(t){return at(t,!0)},minFov:function(t,o){return o.maxFov<t&&($("maxFov cannot be lower than minFov"),t=o.maxFov),e.MathUtils.clamp(t,1,179)},maxFov:function(t,o){return t<o.minFov&&(t=o.minFov),e.MathUtils.clamp(t,1,179)},lang:function(t){return Array.isArray(t.twoFingers)&&($("lang.twoFingers must not be an array"),t.twoFingers=t.twoFingers[0]),a({},zt.lang,t)},keyboard:function(t){return!0===t?Y(zt.keyboard):t},autorotateLat:function(t,e){return at(null===t?e.defaultLat:t,!0)},autorotateSpeed:function(t){return st(t)},autorotateIdle:function(t,e){return t&&X(e.autorotateDelay)?($("autorotateIdle requires a non null autorotateDelay"),!1):t},fisheye:function(t){return!0===t?1:!1===t?0:t},plugins:function(t){return t.map((function(t){if(!(t=Array.isArray(t)?[q(t[0],Ht),t[1]]:[q(t,Ht)])[0])throw new i("Un undefined value was given for plugins.");return t}))}};var Yt=function(t){function e(e,o){var i;return(i=t.call(this,e,"psv-caption")||this).prop=a({},i.prop,{id:i.constructor.id,collapsable:!1,width:0,contentWidth:0}),i.content=document.createElement("div"),i.content.className="psv-caption-content",i.container.appendChild(i.content),i.setCaption(o),i}c(e,t);var o=e.prototype;return o.destroy=function(){delete this.content,t.prototype.destroy.call(this)},o.setCaption=function(t){this.show(),this.content.innerHTML=t,this.prop.contentWidth=t?this.content.offsetWidth:0,this.refreshUi()},o.refreshUi=function(){var t=this.container.offsetWidth;t>=this.prop.contentWidth?this.show():t<this.prop.contentWidth&&this.hide(),this.__refreshButton()},o.hide=function(){this.content.style.display="none",this.prop.visible=!1},o.show=function(){this.content.style.display="",this.prop.visible=!0},o.__refreshButton=function(){var t;null==(t=this.psv.navbar.getButton(Et.id,!1))||t.refreshUi(!0)},e}(gt);Yt.id="caption";var jt={},Zt={};function Xt(t,e){if(!t.id)throw new i("Button ID is required");if(jt[t.id]=t,t.groupId&&(Zt[t.groupId]=Zt[t.groupId]||[],Zt[t.groupId].push(t)),"string"==typeof e)switch(e){case"start":zt.navbar.unshift(t.id);break;case"end":zt.navbar.push(t.id);break;default:var o=e.split(":"),n=o[0],r=o[1];zt.navbar.splice(zt.navbar.indexOf(n)+("right"===r?1:0),0,t.id)}}[wt,Dt,Nt,kt,Et,Tt,bt,At,It,St,Pt].forEach(Xt);var Bt=function(t){function e(e){var o;return(o=t.call(this,e,"psv-navbar psv--capture-event")||this).children=[],o.collapsed=[],o}c(e,t);var o=e.prototype;return o.setButtons=function(t){var e=this;this.children.slice().forEach((function(t){return t.destroy()})),this.children.length=0;var o=this.__cleanButtons(t);-1!==o.indexOf(Yt.id)&&-1===o.indexOf(Et.id)&&o.splice(o.indexOf(Yt.id),0,Et.id),o.forEach((function(t){if("object"==typeof t)new yt(e,t);else if(jt[t])new jt[t](e);else if(Zt[t])Zt[t].forEach((function(t){return new t(e)}));else{if(t!==Yt.id)throw new i("Unknown button "+t);new Yt(e,e.psv.config.caption)}})),new Mt(this),this.children.forEach((function(t){"function"==typeof t.checkSupported&&t.checkSupported()}))},o.setCaption=function(t){var e=this.getButton(Yt.id,!1);null==e||e.setCaption(t)},o.getButton=function(t,e){void 0===e&&(e=!0);var o=null;return this.children.some((function(e){return e.prop.id===t&&(o=e,!0)})),!o&&e&&$('button "'+t+'" not found in the navbar'),o},o.show=function(){this.container.classList.add("psv-navbar--open"),this.prop.visible=!0},o.hide=function(){this.container.classList.remove("psv-navbar--open"),this.prop.visible=!1},o.refreshUi=function(){if(t.prototype.refreshUi.call(this),!0===this.psv.prop.uiRefresh){var e=this.container.offsetWidth,o=0,i=[],n=[];if(this.children.forEach((function(t){t.prop.visible&&(o+=t.prop.width,i.push(t),t.prop.collapsable&&n.push(t))})),!i.length)return;e<o&&n.length>0?(n.forEach((function(t){return t.collapse()})),this.collapsed=n,this.getButton(Mt.id).show(!1)):e>=o&&this.collapsed.length>0&&(this.collapsed.forEach((function(t){return t.uncollapse()})),this.collapsed=[],this.getButton(Mt.id).hide(!1));var r=this.getButton(Yt.id,!1);r&&r.refreshUi()}},o.__cleanButtons=function(t){return!0===t?Y(zt.navbar):"string"==typeof t?t.split(/[ ,]/):t||[]},e}(gt),Gt=function(t){function o(e){var o;return(o=t.call(this,e,"psv-loader-container")||this).loader=document.createElement("div"),o.loader.className="psv-loader",o.container.appendChild(o.loader),o.canvas=document.createElement("canvas"),o.canvas.className="psv-loader-canvas",o.canvas.width=o.loader.clientWidth*b.pixelRatio,o.canvas.height=o.loader.clientWidth*b.pixelRatio,o.loader.appendChild(o.canvas),o.prop=a({},o.prop,{tickness:(o.loader.offsetWidth-o.loader.clientWidth)/2*b.pixelRatio,current:null}),o.refreshUi(),o.hide(),o}c(o,t);var i=o.prototype;return i.destroy=function(){delete this.loader,delete this.canvas,t.prototype.destroy.call(this)},i.refreshUi=function(){if(this.prop.current!==(this.psv.config.loadingImg||this.psv.config.loadingTxt)){var t;if(this.prop.current&&this.loader.removeChild(this.loader.lastChild),this.psv.config.loadingImg?((t=document.createElement("img")).className="psv-loader-image",t.src=this.psv.config.loadingImg):this.psv.config.loadingTxt&&((t=document.createElement("div")).className="psv-loader-text",t.innerHTML=this.psv.config.loadingTxt),t){var e=Math.round(Math.sqrt(2*Math.pow((this.canvas.width/2-this.prop.tickness/2)/b.pixelRatio,2)));t.style.maxWidth=e+"px",t.style.maxHeight=e+"px",this.loader.appendChild(t)}this.prop.current=this.psv.config.loadingImg||this.psv.config.loadingTxt}},i.setProgress=function(t){var o=this.canvas.getContext("2d");o.clearRect(0,0,this.canvas.width,this.canvas.height),o.lineWidth=this.prop.tickness,o.strokeStyle=R(this.loader,"color"),o.beginPath(),o.arc(this.canvas.width/2,this.canvas.height/2,this.canvas.width/2-this.prop.tickness/2,-Math.PI/2,e.MathUtils.clamp(t,0,100)/100*2*Math.PI-Math.PI/2),o.stroke(),this.psv.trigger(f.LOAD_PROGRESS,Math.round(t))},o}(gt),qt=function(t){function e(e){var o;return(o=t.call(this,e,"psv-notification")||this).prop=a({},o.prop,{visible:!1,contentId:void 0,timeout:null}),o.content=document.createElement("div"),o.content.className="psv-notification-content",o.container.appendChild(o.content),o.content.addEventListener("click",(function(){return o.hide()})),o}c(e,t);var o=e.prototype;return o.destroy=function(){delete this.content,t.prototype.destroy.call(this)},o.isVisible=function(t){return this.prop.visible&&(!t||!this.prop.contentId||this.prop.contentId===t)},o.toggle=function(){throw new i("Notification cannot be toggled")},o.show=function(t){var e=this;this.prop.timeout&&(clearTimeout(this.prop.timeout),this.prop.timeout=null),"string"==typeof t&&(t={content:t}),this.prop.contentId=t.id,this.content.innerHTML=t.content,this.container.classList.add("psv-notification--visible"),this.prop.visible=!0,this.psv.trigger(f.SHOW_NOTIFICATION,t.id),t.timeout&&(this.prop.timeout=setTimeout((function(){return e.hide(t.id)}),t.timeout))},o.hide=function(t){if(this.isVisible(t)){var e=this.prop.contentId;this.container.classList.remove("psv-notification--visible"),this.prop.visible=!1,this.prop.contentId=void 0,this.psv.trigger(f.HIDE_NOTIFICATION,e)}},e}(gt),Kt=function(t){function e(e){var o;return(o=t.call(this,e,"psv-overlay")||this).prop=a({},o.prop,{contentId:void 0,dissmisable:!0}),o.image=document.createElement("div"),o.image.className="psv-overlay-image",o.container.appendChild(o.image),o.text=document.createElement("div"),o.text.className="psv-overlay-text",o.container.appendChild(o.text),o.subtext=document.createElement("div"),o.subtext.className="psv-overlay-subtext",o.container.appendChild(o.subtext),o.psv.on(f.CLICK,l(o)),o.psv.on(f.KEY_PRESS,l(o)),t.prototype.hide.call(l(o)),o}c(e,t);var o=e.prototype;return o.destroy=function(){this.psv.off(f.CLICK,this),this.psv.off(f.KEY_PRESS,this),delete this.image,delete this.text,delete this.subtext,t.prototype.destroy.call(this)},o.handleEvent=function(t){switch(t.type){case f.CLICK:this.isVisible()&&this.prop.dissmisable&&(this.hide(),t.stopPropagation());break;case f.KEY_PRESS:this.isVisible()&&this.prop.dissmisable&&t.args[0]===y.Escape&&(this.hide(),t.preventDefault())}},o.isVisible=function(t){return this.prop.visible&&(!t||!this.prop.contentId||this.prop.contentId===t)},o.toggle=function(){throw new i("Overlay cannot be toggled")},o.show=function(e){"string"==typeof e&&(e={text:e}),this.prop.contentId=e.id,this.prop.dissmisable=!1!==e.dissmisable,this.image.innerHTML=e.image||"",this.text.innerHTML=e.text||"",this.subtext.innerHTML=e.subtext||"",t.prototype.show.call(this),this.psv.trigger(f.SHOW_OVERLAY,e.id)},o.hide=function(e){if(this.isVisible(e)){var o=this.prop.contentId;t.prototype.hide.call(this),this.prop.contentId=void 0,this.psv.trigger(f.HIDE_OVERLAY,o)}},e}(gt),Qt=function(t){function e(e){var o;(o=t.call(this,e,"psv-panel psv--capture-event")||this).prop=a({},o.prop,{visible:!1,contentId:void 0,mouseX:0,mouseY:0,mousedown:!1,clickHandler:null,keyHandler:null,width:{}});var i=document.createElement("div");i.className="psv-panel-resizer",o.container.appendChild(i);var n=document.createElement("div");return n.className="psv-panel-close-button",o.container.appendChild(n),o.content=document.createElement("div"),o.content.className="psv-panel-content",o.container.appendChild(o.content),o.container.addEventListener(b.mouseWheelEvent,(function(t){return t.stopPropagation()})),n.addEventListener("click",(function(){return o.hide()})),i.addEventListener("mousedown",l(o)),i.addEventListener("touchstart",l(o)),o.psv.container.addEventListener("mouseup",l(o)),o.psv.container.addEventListener("touchend",l(o)),o.psv.container.addEventListener("mousemove",l(o)),o.psv.container.addEventListener("touchmove",l(o)),o.psv.on(f.KEY_PRESS,l(o)),o}c(e,t);var o=e.prototype;return o.destroy=function(){this.psv.off(f.KEY_PRESS,this),this.psv.container.removeEventListener("mousemove",this),this.psv.container.removeEventListener("touchmove",this),this.psv.container.removeEventListener("mouseup",this),this.psv.container.removeEventListener("touchend",this),delete this.prop,delete this.content,t.prototype.destroy.call(this)},o.handleEvent=function(t){switch(t.type){case"mousedown":this.__onMouseDown(t);break;case"touchstart":this.__onTouchStart(t);break;case"mousemove":this.__onMouseMove(t);break;case"touchmove":this.__onTouchMove(t);break;case"mouseup":case"touchend":this.__onMouseUp(t);break;case f.KEY_PRESS:this.isVisible()&&t.args[0]===y.Escape&&(this.hide(),t.preventDefault())}},o.isVisible=function(t){return this.prop.visible&&(!t||!this.prop.contentId||this.prop.contentId===t)},o.toggle=function(){throw new i("Panel cannot be toggled")},o.show=function(t){var e=this,o=this.isVisible(t.id);"string"==typeof t&&(t={content:t}),this.prop.contentId=t.id,this.prop.visible=!0,this.prop.clickHandler&&(this.content.removeEventListener("click",this.prop.clickHandler),this.content.removeEventListener("keydown",this.prop.keyHandler),this.prop.clickHandler=null,this.prop.keyHandler=null),t.id&&this.prop.width[t.id]?this.container.style.width=this.prop.width[t.id]:t.width?this.container.style.width=t.width:this.container.style.width=null,this.content.innerHTML=t.content,this.content.scrollTop=0,this.container.classList.add("psv-panel--open"),L(this.content,"psv-panel-content--no-margin",!0===t.noMargin),t.clickHandler&&(this.prop.clickHandler=t.clickHandler,this.prop.keyHandler=function(e){e.key===y.Enter&&t.clickHandler(e)},this.content.addEventListener("click",this.prop.clickHandler),this.content.addEventListener("keydown",this.prop.keyHandler),o||setTimeout((function(){var t;null==(t=e.content.querySelector("a,button,[tabindex]"))||t.focus()}),300)),this.psv.trigger(f.OPEN_PANEL,t.id)},o.hide=function(t){if(this.isVisible(t)){var e=this.prop.contentId;this.prop.visible=!1,this.prop.contentId=void 0,this.content.innerHTML=null,this.container.classList.remove("psv-panel--open"),this.prop.clickHandler&&(this.content.removeEventListener("click",this.prop.clickHandler),this.prop.clickHandler=null),this.psv.trigger(f.CLOSE_PANEL,e)}},o.__onMouseDown=function(t){t.stopPropagation(),this.__startResize(t)},o.__onTouchStart=function(t){t.stopPropagation(),this.__startResize(t.changedTouches[0])},o.__onMouseUp=function(t){this.prop.mousedown&&(t.stopPropagation(),this.prop.mousedown=!1,this.content.classList.remove("psv-panel-content--no-interaction"))},o.__onMouseMove=function(t){this.prop.mousedown&&(t.stopPropagation(),this.__resize(t))},o.__onTouchMove=function(t){this.prop.mousedown&&this.__resize(t.touches[0])},o.__startResize=function(t){this.prop.mouseX=t.clientX,this.prop.mouseY=t.clientY,this.prop.mousedown=!0,this.content.classList.add("psv-panel-content--no-interaction")},o.__resize=function(t){var e=t.clientX,o=t.clientY,i=Math.max(200,this.container.offsetWidth-(e-this.prop.mouseX))+"px";this.prop.contentId&&(this.prop.width[this.prop.contentId]=i),this.container.style.width=i,this.prop.mouseX=e,this.prop.mouseY=o},e}(gt),$t=function(){function t(t){this.psv=t,this.config=t.config,this.prop=t.prop}return t.prototype.destroy=function(){delete this.psv,delete this.config,delete this.prop},t}(),Jt=new e.Vector2,te=new e.Vector3,ee=new e.Euler(0,0,0,"ZXY"),oe=function(t){function o(e){return t.call(this,e)||this}c(o,t);var n=o.prototype;return n.fovToZoomLevel=function(t){var e=Math.round((t-this.config.minFov)/(this.config.maxFov-this.config.minFov)*100);return e-2*(e-50)},n.zoomLevelToFov=function(t){return this.config.maxFov+t/100*(this.config.minFov-this.config.maxFov)},n.vFovToHFov=function(t){return e.MathUtils.radToDeg(2*Math.atan(Math.tan(e.MathUtils.degToRad(t)/2)*this.prop.aspect))},n.speedToDuration=function(t,e){if(t&&"number"==typeof t)return Math.abs(t);var o=t?st(t):this.config.autorotateSpeed;return e/Math.abs(o)*1e3},n.textureCoordsToSphericalCoords=function(t){var e=this.prop.panoData;if(!e)throw new i("Current adapter does not support texture coordinates.");var o=(t.x+e.croppedX)/e.fullWidth*Math.PI*2,n=(t.y+e.croppedY)/e.fullHeight*Math.PI,r={longitude:o>=Math.PI?o-Math.PI:o+Math.PI,latitude:Math.PI/2-n};return ee.equals(this.psv.renderer.mesh.rotation)&&ee.equals(this.psv.renderer.meshContainer.rotation)?r:(this.sphericalCoordsToVector3(r,te),te.applyEuler(this.psv.renderer.mesh.rotation),te.applyEuler(this.psv.renderer.meshContainer.rotation),this.vector3ToSphericalCoords(te))},n.sphericalCoordsToTextureCoords=function(t){var e=this.prop.panoData;if(!e)throw new i("Current adapter does not support texture coordinates.");ee.equals(this.psv.renderer.mesh.rotation)&&ee.equals(this.psv.renderer.meshContainer.rotation)||(this.sphericalCoordsToVector3(t,te),lt(te,this.psv.renderer.meshContainer.rotation),lt(te,this.psv.renderer.mesh.rotation),t=this.vector3ToSphericalCoords(te));var o=t.longitude/Math.PI/2*e.fullWidth,n=t.latitude/Math.PI*e.fullHeight;return{x:Math.round(t.longitude<Math.PI?o+e.fullWidth/2:o-e.fullWidth/2)-e.croppedX,y:Math.round(e.fullHeight/2-n)-e.croppedY}},n.sphericalCoordsToVector3=function(t,o){return o||(o=new e.Vector3),o.x=p*-Math.cos(t.latitude)*Math.sin(t.longitude),o.y=p*Math.sin(t.latitude),o.z=p*Math.cos(t.latitude)*Math.cos(t.longitude),o},n.vector3ToSphericalCoords=function(t){var e=Math.acos(t.y/Math.sqrt(t.x*t.x+t.y*t.y+t.z*t.z)),o=Math.atan2(t.x,t.z);return{longitude:o<0?-o:2*Math.PI-o,latitude:Math.PI/2-e}},n.viewerCoordsToVector3=function(t){var e=this.getIntersections(t).filter((function(t){return t.object.userData.psvSphere}));return e.length?e[0].point:null},n.vector3ToViewerCoords=function(t){var e=t.clone();return e.project(this.psv.renderer.camera),{x:Math.round((e.x+1)/2*this.prop.size.width),y:Math.round((1-e.y)/2*this.prop.size.height)}},n.sphericalCoordsToViewerCoords=function(t){return this.vector3ToViewerCoords(this.sphericalCoordsToVector3(t,te))},n.getIntersections=function(t){return Jt.x=2*t.x/this.prop.size.width-1,Jt.y=-2*t.y/this.prop.size.height+1,this.psv.renderer.raycaster.setFromCamera(Jt,this.psv.renderer.camera),this.psv.renderer.raycaster.intersectObjects(this.psv.renderer.scene.children,!0).filter((function(t){return!!t.object.userData}))},n.cleanPosition=function(t){return void 0!==t.x&&void 0!==t.y?this.textureCoordsToSphericalCoords(t):{longitude:at(t.longitude),latitude:at(t.latitude,!this.prop.littlePlanet)}},n.cleanSphereCorrection=function(t){return{pan:at((null==t?void 0:t.pan)||0),tilt:at((null==t?void 0:t.tilt)||0,!0),roll:at((null==t?void 0:t.roll)||0,!0,!1)}},n.cleanPanoramaPose=function(t){return{pan:e.MathUtils.degToRad((null==t?void 0:t.poseHeading)||0),tilt:e.MathUtils.degToRad((null==t?void 0:t.posePitch)||0),roll:e.MathUtils.degToRad((null==t?void 0:t.poseRoll)||0)}},o}($t),ie=function(t){function o(e){var o;return(o=t.call(this,e)||this).state={moveThreshold:4*b.pixelRatio,keyboardEnabled:!1,moving:!1,zooming:!1,startMouseX:0,startMouseY:0,mouseX:0,mouseY:0,mouseHistory:[],pinchDist:0,keyHandler:new Lt,ctrlKeyDown:!1,dblclickData:null,dblclickTimeout:null,longtouchTimeout:null,twofingersTimeout:null,ctrlZoomTimeout:null},o.__onResize=F((function(){return o.psv.autoSize()}),50),o}c(o,t);var i=o.prototype;return i.init=function(){window.addEventListener("resize",this),window.addEventListener("keydown",this),window.addEventListener("keyup",this),this.psv.container.addEventListener("mouseenter",this),this.psv.container.addEventListener("mousedown",this),this.psv.container.addEventListener("mouseleave",this),this.psv.container.addEventListener("mousemove",this),window.addEventListener("mouseup",this),this.psv.container.addEventListener("touchstart",this),this.psv.container.addEventListener("touchmove",this),window.addEventListener("touchend",this),this.psv.container.addEventListener(b.mouseWheelEvent,this),b.fullscreenEvent&&document.addEventListener(b.fullscreenEvent,this)},i.destroy=function(){window.removeEventListener("resize",this),window.removeEventListener("keydown",this),window.removeEventListener("keyup",this),this.psv.container.removeEventListener("mouseenter",this),this.psv.container.removeEventListener("mousedown",this),this.psv.container.removeEventListener("mouseleave",this),this.psv.container.removeEventListener("mousemove",this),window.removeEventListener("mouseup",this),this.psv.container.removeEventListener("touchstart",this),this.psv.container.removeEventListener("touchmove",this),window.removeEventListener("touchend",this),this.psv.container.removeEventListener(b.mouseWheelEvent,this),b.fullscreenEvent&&document.removeEventListener(b.fullscreenEvent,this),clearTimeout(this.state.dblclickTimeout),clearTimeout(this.state.longtouchTimeout),clearTimeout(this.state.twofingersTimeout),clearTimeout(this.state.ctrlZoomTimeout),delete this.state,t.prototype.destroy.call(this)},i.handleEvent=function(t){switch(t.type){case"resize":this.__onResize();break;case"keydown":this.__onKeyDown(t);break;case"keyup":this.__onKeyUp();break;case"mouseup":this.__onMouseUp(t);break;case"touchend":this.__onTouchEnd(t);break;case b.fullscreenEvent:this.__fullscreenToggled()}if(!C(t.target,".psv--capture-event"))switch(t.type){case"mousedown":this.__onMouseDown(t);break;case"mouseenter":this.__onMouseEnter(t);break;case"mouseleave":this.__onMouseLeave(t);break;case"mousemove":this.__onMouseMove(t);break;case"touchstart":this.__onTouchStart(t);break;case"touchmove":this.__onTouchMove(t);break;case b.mouseWheelEvent:this.__onMouseWheel(t)}},i.enableKeyboard=function(){this.state.keyboardEnabled=!0},i.disableKeyboard=function(){this.state.keyboardEnabled=!1},i.__onKeyDown=function(t){if(this.config.mousewheelCtrlKey&&(this.state.ctrlKeyDown=t.key===y.Control,this.state.ctrlKeyDown&&(clearTimeout(this.state.ctrlZoomTimeout),this.psv.overlay.hide(_.CTRL_ZOOM))),!this.psv.trigger(f.KEY_PRESS,t.key).isDefaultPrevented()&&this.state.keyboardEnabled){var e=this.config.keyboard[t.key];if(e===v.TOGGLE_AUTOROTATE)this.psv.toggleAutorotate();else if(e&&!this.state.keyHandler.time){switch(e!==v.ZOOM_IN&&e!==v.ZOOM_OUT&&this.psv.__stopAll(),e){case v.ROTATE_LAT_UP:this.psv.dynamics.position.roll({latitude:!1});break;case v.ROTATE_LAT_DOWN:this.psv.dynamics.position.roll({latitude:!0});break;case v.ROTATE_LONG_RIGHT:this.psv.dynamics.position.roll({longitude:!1});break;case v.ROTATE_LONG_LEFT:this.psv.dynamics.position.roll({longitude:!0});break;case v.ZOOM_IN:this.psv.dynamics.zoom.roll(!1);break;case v.ZOOM_OUT:this.psv.dynamics.zoom.roll(!0)}this.state.keyHandler.down()}}},i.__onKeyUp=function(){var t=this;this.state.ctrlKeyDown=!1,this.state.keyboardEnabled&&this.state.keyHandler.up((function(){t.psv.dynamics.position.stop(),t.psv.dynamics.zoom.stop(),t.psv.resetIdleTimer()}))},i.__onMouseDown=function(t){this.config.mousemove&&!this.config.captureCursor&&this.__startMove(t)},i.__onMouseEnter=function(t){this.config.mousemove&&this.config.captureCursor&&this.__startMove(t)},i.__onMouseUp=function(t){this.config.mousemove&&!this.config.captureCursor&&this.__stopMove(t)},i.__onMouseLeave=function(t){this.config.mousemove&&this.config.captureCursor&&this.__stopMove(t)},i.__onMouseMove=function(t){if(this.config.mousemove&&(0!==t.buttons?(t.preventDefault(),this.__move(t)):this.config.captureCursor&&this.__moveAbsolute(t)),!j(this.prop.objectsObservers)){var e=P(this.psv.container),o={x:t.clientX-e.left,y:t.clientY-e.top},i=this.psv.dataHelper.getIntersections(o),n=function(e,i,n){e.listener.handleEvent(new CustomEvent(n,{detail:{originalEvent:t,object:e.object,data:e.object.userData[i],viewerPoint:o}}))};Z(this.prop.objectsObservers,(function(t,e){var o=i.find((function(t){return t.object.userData[e]}));o?(t.object&&o.object!==t.object&&(n(t,e,g.LEAVE_OBJECT),delete t.object),t.object?n(t,e,g.HOVER_OBJECT):(t.object=o.object,n(t,e,g.ENTER_OBJECT))):t.object&&(n(t,e,g.LEAVE_OBJECT),delete t.object)}))}},i.__onTouchStart=function(t){var e=this;this.config.mousemove&&(1===t.touches.length?(this.config.touchmoveTwoFingers||(this.__startMove(t.touches[0]),t.preventDefault()),this.prop.longtouchTimeout||(this.prop.longtouchTimeout=setTimeout((function(){e.__click(t.touches[0],!0),e.prop.longtouchTimeout=null}),500))):2===t.touches.length&&(this.__cancelLongTouch(),this.__cancelTwoFingersOverlay(),this.__startMoveZoom(t),t.preventDefault()))},i.__onTouchEnd=function(t){this.config.mousemove&&(this.__cancelLongTouch(),this.__cancelTwoFingersOverlay(),1===t.touches.length?this.__stopMoveZoom():0===t.touches.length&&this.__stopMove(t.changedTouches[0]))},i.__onTouchMove=function(t){var e=this;this.config.mousemove&&(this.__cancelLongTouch(),1===t.touches.length?this.config.touchmoveTwoFingers?this.prop.twofingersTimeout||(this.prop.twofingersTimeout=setTimeout((function(){e.psv.overlay.show({id:_.TWO_FINGERS,image:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="currentColor" d="M33.38 33.2a1.96 1.96 0 0 0 1.5-3.23 10.61 10.61 0 0 1 7.18-17.51c.7-.06 1.31-.49 1.61-1.12a13.02 13.02 0 0 1 11.74-7.43c7.14 0 12.96 5.8 12.96 12.9 0 3.07-1.1 6.05-3.1 8.38-.7.82-.61 2.05.21 2.76.83.7 2.07.6 2.78-.22a16.77 16.77 0 0 0 4.04-10.91C72.3 7.54 64.72 0 55.4 0a16.98 16.98 0 0 0-14.79 8.7 14.6 14.6 0 0 0-12.23 14.36c0 3.46 1.25 6.82 3.5 9.45.4.45.94.69 1.5.69m45.74 43.55a22.13 22.13 0 0 1-5.23 12.4c-4 4.55-9.53 6.86-16.42 6.86-12.6 0-20.1-10.8-20.17-10.91a1.82 1.82 0 0 0-.08-.1c-5.3-6.83-14.55-23.82-17.27-28.87-.05-.1 0-.21.02-.23a6.3 6.3 0 0 1 8.24 1.85l9.38 12.59a1.97 1.97 0 0 0 3.54-1.17V25.34a4 4 0 0 1 1.19-2.87 3.32 3.32 0 0 1 2.4-.95c1.88.05 3.4 1.82 3.4 3.94v24.32a1.96 1.96 0 0 0 3.93 0v-33.1a3.5 3.5 0 0 1 7 0v35.39a1.96 1.96 0 0 0 3.93 0v-.44c.05-2.05 1.6-3.7 3.49-3.7 1.93 0 3.5 1.7 3.5 3.82v5.63c0 .24.04.48.13.71l.1.26a1.97 1.97 0 0 0 3.76-.37c.33-1.78 1.77-3.07 3.43-3.07 1.9 0 3.45 1.67 3.5 3.74l-1.77 18.1zM77.39 51c-1.25 0-2.45.32-3.5.9v-.15c0-4.27-3.33-7.74-7.42-7.74-1.26 0-2.45.33-3.5.9V16.69a7.42 7.42 0 0 0-14.85 0v1.86a7 7 0 0 0-3.28-.94 7.21 7.21 0 0 0-5.26 2.07 7.92 7.92 0 0 0-2.38 5.67v37.9l-5.83-7.82a10.2 10.2 0 0 0-13.35-2.92 4.1 4.1 0 0 0-1.53 5.48C20 64.52 28.74 80.45 34.07 87.34c.72 1.04 9.02 12.59 23.4 12.59 7.96 0 14.66-2.84 19.38-8.2a26.06 26.06 0 0 0 6.18-14.6l1.78-18.2v-.2c0-4.26-3.32-7.73-7.42-7.73z"/>\x3c!--Created by AomAm from the Noun Project--\x3e</svg>\n',text:e.config.lang.twoFingers})}),100)):(t.preventDefault(),this.__move(t.touches[0])):2===t.touches.length&&(t.preventDefault(),this.__moveZoom(t),this.__cancelTwoFingersOverlay()))},i.__cancelLongTouch=function(){this.prop.longtouchTimeout&&(clearTimeout(this.prop.longtouchTimeout),this.prop.longtouchTimeout=null)},i.__cancelTwoFingersOverlay=function(){this.prop.twofingersTimeout&&(clearTimeout(this.prop.twofingersTimeout),this.prop.twofingersTimeout=null),this.psv.overlay.hide(_.TWO_FINGERS)},i.__onMouseWheel=function(t){var e=this;if(this.config.mousewheel){if(this.config.mousewheelCtrlKey&&!this.state.ctrlKeyDown)return this.psv.overlay.show({id:_.CTRL_ZOOM,image:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="10 17 79 79"><path fill="currentColor" d="M38.1 29.27c-.24 0-.44.2-.44.45v10.7a.45.45 0 00.9 0v-10.7c0-.25-.2-.45-.45-.45zm10.2 26.66a11.54 11.54 0 01-8.48-6.14.45.45 0 10-.8.41 12.45 12.45 0 009.22 6.62.45.45 0 00.07-.9zm24.55-13.08a23.04 23.04 0 00-22.56-23v7.07l-.01.05a2.83 2.83 0 012.39 2.78v14.03l.09-.02h8.84v-9.22a.45.45 0 11.9 0v9.22h10.35v-.9zm0 27.33V44.66H62.5c-.02 2.01-.52 4-1.47 5.76a.45.45 0 01-.61.18.45.45 0 01-.19-.61 11.54 11.54 0 001.36-5.33h-8.83l-.1-.01a2.83 2.83 0 01-2.83 2.84h-.04-.04a2.83 2.83 0 01-2.83-2.83v-14.9a2.82 2.82 0 012.47-2.8v-7.11a23.04 23.04 0 00-22.57 23v.91h14.72V29.88a8.2 8.2 0 015.02-7.57c.22-.1.5.01.59.24.1.23-.01.5-.24.6a7.3 7.3 0 00-4.47 6.73v13.88h3.9a.45.45 0 110 .9h-3.9v.15a7.32 7.32 0 0011.23 6.17.45.45 0 01.49.76 8.22 8.22 0 01-12.62-6.93v-.15H26.82v25.52a23.04 23.04 0 0023.01 23.01 23.04 23.04 0 0023.02-23.01zm1.8-27.33v27.33A24.85 24.85 0 0149.84 95a24.85 24.85 0 01-24.82-24.82V42.85a24.85 24.85 0 0124.82-24.82 24.85 24.85 0 0124.83 24.82zM57.98 29.88v9.36a.45.45 0 11-.9 0v-9.36a7.28 7.28 0 00-3.4-6.17.45.45 0 01.49-.76 8.18 8.18 0 013.8 6.93z"/>\x3c!-- Created by Icon Island from the Noun Project --\x3e</svg>\n',text:this.config.lang.ctrlZoom}),clearTimeout(this.state.ctrlZoomTimeout),void(this.state.ctrlZoomTimeout=setTimeout((function(){return e.psv.overlay.hide(_.CTRL_ZOOM)}),2e3));t.preventDefault(),t.stopPropagation();var o=5*k(t).spinY*this.config.zoomSpeed;0!==o&&this.psv.dynamics.zoom.step(-o,5)}},i.__fullscreenToggled=function(t){this.prop.fullscreen=void 0!==t?t:A(this.psv.container),this.config.keyboard&&(this.prop.fullscreen?this.psv.startKeyboardControl():this.psv.stopKeyboardControl()),this.psv.trigger(f.FULLSCREEN_UPDATED,this.prop.fullscreen)},i.__startMove=function(t){var e=this;this.psv.__stopAll().then((function(){e.state.mouseX=t.clientX,e.state.mouseY=t.clientY,e.state.startMouseX=e.state.mouseX,e.state.startMouseY=e.state.mouseY,e.state.moving=!0,e.state.zooming=!1,e.state.mouseHistory.length=0,e.__logMouseMove(t)}))},i.__startMoveZoom=function(t){var e=this;this.psv.__stopAll().then((function(){var o={x:t.touches[0].clientX,y:t.touches[0].clientY},i={x:t.touches[1].clientX,y:t.touches[1].clientY};e.state.pinchDist=N(o,i),e.state.mouseX=(o.x+i.x)/2,e.state.mouseY=(o.y+i.y)/2,e.state.startMouseX=e.state.mouseX,e.state.startMouseY=e.state.mouseY,e.state.moving=!0,e.state.zooming=!0}))},i.__stopMove=function(t){if(this.psv.resetIdleTimer(),!C(t.target,".psv-container"))return this.state.moving=!1,void(this.state.mouseHistory.length=0);this.state.moving&&(Math.abs(t.clientX-this.state.startMouseX)<this.state.moveThreshold&&Math.abs(t.clientY-this.state.startMouseY)<this.state.moveThreshold?(this.__click(t),this.state.moving=!1):this.config.moveInertia?(this.__logMouseMove(t),this.__stopMoveInertia(t)):this.state.moving=!1,this.state.mouseHistory.length=0)},i.__stopMoveZoom=function(){this.psv.resetIdleTimer(),this.state.mouseHistory.length=0,this.state.moving=!1,this.state.zooming=!1},i.__stopMoveInertia=function(t){var o=this,i=new e.SplineCurve(this.state.mouseHistory.map((function(t){var o=t[1],i=t[2];return new e.Vector2(o,i)}))).getTangent(1),n=this.state.mouseHistory.slice(1).reduce((function(t,e){var o=t.total,i=t.prev;return{total:o+Math.sqrt(Math.pow(e[1]-i[1],2)+Math.pow(e[2]-i[2],2))/(e[0]-[i[0]]),prev:e}}),{total:0,prev:this.state.mouseHistory[0]}).total/this.state.mouseHistory.length,r={clientX:t.clientX,clientY:t.clientY};this.prop.animationPromise=new pt({properties:{speed:{start:n,end:0}},duration:1e3,easing:"outQuad",onTick:function(t){r.clientX+=t.speed*i.x*3*b.pixelRatio,r.clientY+=t.speed*i.y*3*b.pixelRatio,o.__move(r,!1)}}),this.prop.animationPromise.then((function(){o.state.moving=!1}))},i.__click=function(t,e){var o=this;void 0===e&&(e=!1);var i=this.psv.container.getBoundingClientRect(),n={rightclick:e||2===t.button,target:t.target,clientX:t.clientX,clientY:t.clientY,viewerX:t.clientX-i.left,viewerY:t.clientY-i.top},r=this.psv.dataHelper.getIntersections({x:n.viewerX,y:n.viewerY}),s=r.find((function(t){return t.object.userData.psvSphere}));if(s){var a=this.psv.dataHelper.vector3ToSphericalCoords(s.point);n.longitude=a.longitude,n.latitude=a.latitude,n.objects=r.map((function(t){return t.object})).filter((function(t){return!t.userData.psvSphere}));try{var c=this.psv.dataHelper.sphericalCoordsToTextureCoords(n);n.textureX=c.x,n.textureY=c.y}catch(t){n.textureX=NaN,n.textureY=NaN}this.state.dblclickTimeout?(Math.abs(this.state.dblclickData.clientX-n.clientX)<this.state.moveThreshold&&Math.abs(this.state.dblclickData.clientY-n.clientY)<this.state.moveThreshold&&this.psv.trigger(f.DOUBLE_CLICK,this.state.dblclickData),clearTimeout(this.state.dblclickTimeout),this.state.dblclickTimeout=null,this.state.dblclickData=null):(this.psv.trigger(f.CLICK,n),this.state.dblclickData=Y(n),this.state.dblclickTimeout=setTimeout((function(){o.state.dblclickTimeout=null,o.state.dblclickData=null}),300))}},i.__move=function(t,o){if(this.state.moving){var i=t.clientX,n=t.clientY,r={longitude:(i-this.state.mouseX)/this.prop.size.width*this.config.moveSpeed*e.MathUtils.degToRad(this.prop.hFov),latitude:(n-this.state.mouseY)/this.prop.size.height*this.config.moveSpeed*e.MathUtils.degToRad(this.prop.vFov)},s=this.psv.getPosition();this.psv.rotate({longitude:s.longitude-r.longitude,latitude:s.latitude+r.latitude}),this.state.mouseX=i,this.state.mouseY=n,!1!==o&&this.__logMouseMove(t)}},i.__moveAbsolute=function(t){if(this.state.moving){var e=this.psv.container.getBoundingClientRect();this.psv.dynamics.position.goto({longitude:((t.clientX-e.left)/e.width-.5)*Math.PI*2,latitude:-((t.clientY-e.top)/e.height-.5)*Math.PI},10)}},i.__moveZoom=function(t){if(this.state.zooming&&this.state.moving){var e={x:t.touches[0].clientX,y:t.touches[0].clientY},o={x:t.touches[1].clientX,y:t.touches[1].clientY},i=N(e,o),n=80*(i-this.state.pinchDist)/this.prop.size.width*this.config.zoomSpeed;this.psv.zoom(this.psv.getZoomLevel()+n),this.__move({clientX:(e.x+o.x)/2,clientY:(e.y+o.y)/2}),this.state.pinchDist=i}},i.__logMouseMove=function(t){var e=Date.now(),o=this.state.mouseHistory.length?this.state.mouseHistory[this.state.mouseHistory.length-1]:[0,-1,-1];o[1]===t.clientX&&o[2]===t.clientY?o[0]=e:e===o[0]?(o[1]=t.clientX,o[2]=t.clientY):this.state.mouseHistory.push([e,t.clientX,t.clientY]);for(var i=null,n=0;n<this.state.mouseHistory.length;)this.state.mouseHistory[n][0]<e-300?this.state.mouseHistory.splice(n,1):i&&this.state.mouseHistory[n][0]-i>30?(this.state.mouseHistory.splice(0,n),n=0,i=this.state.mouseHistory[n][0]):(i=this.state.mouseHistory[n][0],n++)},o}($t),ne=function(t){function o(o){var i,n;return(n=t.call(this,o)||this).renderer=new e.WebGLRenderer({alpha:!0,antialias:!0}),n.renderer.setPixelRatio(b.pixelRatio),n.renderer.domElement.className="psv-canvas",n.scene=new e.Scene,n.camera=new e.PerspectiveCamera(50,16/9,1,20),n.mesh=n.psv.adapter.createMesh(),n.mesh.userData=((i={}).psvSphere=!0,i),n.meshContainer=new e.Group,n.meshContainer.add(n.mesh),n.scene.add(n.meshContainer),n.raycaster=new e.Raycaster,n.timestamp=null,n.ready=!1,n.canvasContainer=document.createElement("div"),n.canvasContainer.className="psv-canvas-container",n.canvasContainer.style.background=n.psv.config.canvasBackground,n.canvasContainer.style.cursor=n.psv.config.mousemove?"move":"default",n.canvasContainer.appendChild(n.renderer.domElement),n.psv.container.appendChild(n.canvasContainer),o.on(f.SIZE_UPDATED,l(n)),o.on(f.ZOOM_UPDATED,l(n)),o.on(f.POSITION_UPDATED,l(n)),o.on(f.CONFIG_CHANGED,l(n)),n.hide(),n}c(o,t);var i=o.prototype;return i.destroy=function(){this.renderer.setAnimationLoop(null),this.__cleanTHREEScene(this.scene),this.psv.container.removeChild(this.canvasContainer),delete this.canvasContainer,delete this.renderer,delete this.scene,delete this.camera,delete this.mesh,delete this.meshContainer,delete this.raycaster,t.prototype.destroy.call(this)},i.handleEvent=function(t){switch(t.type){case f.SIZE_UPDATED:this.__onSizeUpdated();break;case f.ZOOM_UPDATED:this.__onZoomUpdated();break;case f.POSITION_UPDATED:this.__onPositionUpdated();break;case f.CONFIG_CHANGED:t.args[0].includes("fisheye")&&this.__onPositionUpdated(),t.args[0].includes("mousemove")&&(this.canvasContainer.style.cursor=this.psv.config.mousemove?"move":"default")}},i.hide=function(){this.canvasContainer.style.opacity=0},i.show=function(){this.canvasContainer.style.opacity=1},i.__onSizeUpdated=function(){this.renderer.setSize(this.prop.size.width,this.prop.size.height),this.camera.aspect=this.prop.aspect,this.camera.updateProjectionMatrix(),this.prop.needsUpdate=!0},i.__onZoomUpdated=function(){this.camera.fov=this.prop.vFov,this.camera.updateProjectionMatrix(),this.prop.needsUpdate=!0},i.__onPositionUpdated=function(){this.camera.position.set(0,0,0),this.camera.lookAt(this.prop.direction),this.config.fisheye&&this.camera.position.copy(this.prop.direction).multiplyScalar(this.config.fisheye/2).negate(),this.prop.needsUpdate=!0},i.__renderLoop=function(t){var e=null!==this.timestamp?t-this.timestamp:0;this.timestamp=t,this.psv.trigger(f.BEFORE_RENDER,t,e),Z(this.psv.dynamics,(function(t){return t.update(e)})),this.prop.idleTime>0&&t-this.prop.idleTime>this.config.autorotateDelay&&this.psv.startAutorotate(),this.prop.needsUpdate&&(this.render(),this.prop.needsUpdate=!1)},i.render=function(){this.renderer.render(this.scene,this.camera),this.psv.trigger(f.RENDER)},i.setTexture=function(t){var e=this;this.prop.panoData=t.panoData,this.psv.adapter.setTexture(this.mesh,t),this.ready||(this.renderer.setAnimationLoop((function(t){return e.__renderLoop(t)})),this.ready=!0),this.psv.needsUpdate(),this.psv.trigger(f.PANORAMA_LOADED,t)},i.setOverlay=function(t,e){this.psv.adapter.setOverlay(this.mesh,t,e),this.psv.needsUpdate()},i.setPanoramaPose=function(t,e){void 0===e&&(e=this.mesh);var o=this.psv.dataHelper.cleanPanoramaPose(t);e.rotation.set(-o.tilt,-o.pan,-o.roll,"ZXY")},i.setSphereCorrection=function(t,e){void 0===e&&(e=this.meshContainer);var o=this.psv.dataHelper.cleanSphereCorrection(t);e.rotation.set(o.tilt,o.pan,o.roll,"ZXY")},i.transition=function(t,o){var i=this,n=J(o),r="zoom"in o,s=new e.Group,a=this.psv.adapter.createMesh(.5);if(this.psv.adapter.setTexture(a,t,!0),this.psv.adapter.setTextureOpacity(a,0),this.setPanoramaPose(t.panoData,a),this.setSphereCorrection(o.sphereCorrection,s),n){var c=this.psv.dataHelper.cleanPosition(o),h=this.psv.getPosition(),l=new e.Vector3(0,1,0);s.rotateOnWorldAxis(l,c.longitude-h.longitude);var p=new e.Vector3(0,1,0).cross(this.camera.getWorldDirection(new e.Vector3)).normalize();s.rotateOnWorldAxis(p,c.latitude-h.latitude)}s.add(a),this.scene.add(s);var u=new pt({properties:{opacity:{start:0,end:1},zoom:r?{start:this.psv.getZoomLevel(),end:o.zoom}:void 0},duration:o.transition,easing:"outCubic",onTick:function(t){i.psv.adapter.setTextureOpacity(a,t.opacity),i.psv.adapter.setTextureOpacity(i.mesh,1-t.opacity),r&&i.psv.zoom(t.zoom),i.psv.needsUpdate()}});return u.then((function(e){e?(i.setTexture(t),i.psv.adapter.setTextureOpacity(i.mesh,1),i.setPanoramaPose(t.panoData),i.setSphereCorrection(o.sphereCorrection),n&&i.psv.rotate(o)):i.psv.adapter.disposeTexture(t),i.scene.remove(s),a.geometry.dispose(),a.geometry=null})),u},i.__cleanTHREEScene=function(t){var o=this;t.traverse((function(i){i.geometry&&i.geometry.dispose(),i.material&&(Array.isArray(i.material)?i.material.forEach((function(t){t.map&&t.map.dispose(),t.dispose()})):(i.material.map&&i.material.map.dispose(),i.material.dispose())),!i.dispose||i instanceof e.Scene||i.dispose(),i!==t&&o.__cleanTHREEScene(i)}))},o}($t),re=function(t){function o(o){var i;return(i=t.call(this,o)||this).loader=new e.FileLoader,i.loader.setResponseType("blob"),i.config.withCredentials&&i.loader.setWithCredentials(!0),i.config.requestHeaders&&"object"==typeof i.config.requestHeaders&&i.loader.setRequestHeader(i.config.requestHeaders),i}c(o,t);var i=o.prototype;return i.destroy=function(){this.abortLoading(),t.prototype.destroy.call(this)},i.loadTexture=function(t,e){return this.psv.adapter.loadTexture(t,e)},i.abortLoading=function(){},i.loadFile=function(t,e){var o=this;return this.config.requestHeaders&&"function"==typeof this.config.requestHeaders&&this.loader.setRequestHeader(this.config.requestHeaders(t)),new Promise((function(i,n){var r=0;e&&e(r),o.loader.load(t,(function(t){r=100,e&&e(r),i(t)}),(function(t){if(t.lengthComputable){var o=t.loaded/t.total*100;o>r&&(r=o,e&&e(r))}}),(function(t){n(t)}))}))},i.loadImage=function(t,e){return this.loadFile(t,e).then((function(t){return new Promise((function(e,o){var i=document.createElementNS("http://www.w3.org/1999/xhtml","img");i.onload=function(){URL.revokeObjectURL(i.src),e(i)},i.onerror=o,i.src=URL.createObjectURL(t)}))}))},i.preloadPanorama=function(t){return this.psv.adapter.supportsPreload(t)?this.psv.adapter.loadTexture(t):Promise.resolve()},o}($t),se=0,ae=1,ce=2,he=3,le=function(t){function e(e,o){var i;return(i=t.call(this,e,"psv-tooltip")||this).prop=a({},i.prop,o,{state:se,width:0,height:0,pos:"",config:null,data:null}),i.content=document.createElement("div"),i.content.className="psv-tooltip-content",i.container.appendChild(i.content),i.arrow=document.createElement("div"),i.arrow.className="psv-tooltip-arrow",i.container.appendChild(i.arrow),i.container.addEventListener("transitionend",l(i)),i.container.style.top="-1000px",i.container.style.left="-1000px",i}c(e,t);var o=e.prototype;return o.destroy=function(){delete this.arrow,delete this.content,t.prototype.destroy.call(this)},o.handleEvent=function(t){if("transitionend"===t.type)this.__onTransitionEnd(t)},o.toggle=function(){throw new i("Tooltip cannot be toggled")},o.show=function(t){if(this.prop.state!==se)throw new i("Initialized tooltip cannot be re-initialized");t.className&&x(this.container,t.className),this.content.innerHTML=t.content;var e=this.container.getBoundingClientRect();this.prop.width=e.right-e.left,this.prop.height=e.bottom-e.top,this.prop.state=he,this.move(t),this.prop.data=t.data,this.prop.state=ae,this.psv.trigger(f.SHOW_TOOLTIP,this.prop.data,this),this.__waitImages()},o.move=function(t){if(this.prop.state!==ae&&this.prop.state!==he)throw new i("Uninitialized tooltip cannot be moved");this.config=t;var e=this.container,o=this.arrow,n={posClass:t.position?rt(t.position,!1):["top","center"],width:this.prop.width,height:this.prop.height,top:0,left:0,arrowTop:0,arrowLeft:0};this.__computeTooltipPosition(n,t);var r=!1;n.top<this.prop.offset?(n.posClass[0]="bottom",r=!0):n.top+n.height>this.psv.prop.size.height-this.prop.offset&&(n.posClass[0]="top",r=!0),n.left<this.prop.offset?(n.posClass[1]="right",r=!0):n.left+n.width>this.psv.prop.size.width-this.prop.offset&&(n.posClass[1]="left",r=!0),r&&this.__computeTooltipPosition(n,t),e.style.top=n.top+"px",e.style.left=n.left+"px",o.style.top=n.arrowTop+"px",o.style.left=n.arrowLeft+"px";var s=n.posClass.join("-");s!==this.prop.pos&&(e.classList.remove("psv-tooltip--"+this.prop.pos),this.prop.pos=s,e.classList.add("psv-tooltip--"+this.prop.pos))},o.hide=function(){this.container.classList.remove("psv-tooltip--visible"),this.prop.state=ce,this.psv.trigger(f.HIDE_TOOLTIP,this.prop.data)},o.__onTransitionEnd=function(t){if("transform"===t.propertyName)switch(this.prop.state){case ae:this.container.classList.add("psv-tooltip--visible"),this.prop.state=he;break;case ce:this.prop.state=se,this.destroy()}},o.__computeTooltipPosition=function(t,e){var o=!1;switch(e.box||(e.box={width:0,height:0}),t.posClass[0]){case"bottom":t.top=e.top+e.box.height+this.prop.offset+this.prop.arrow,t.arrowTop=2*-this.prop.arrow,o=!0;break;case"center":t.top=e.top+e.box.height/2-t.height/2,t.arrowTop=t.height/2-this.prop.arrow;break;case"top":t.top=e.top-t.height-this.prop.offset-this.prop.arrow,t.arrowTop=t.height,o=!0}switch(t.posClass[1]){case"right":o?(t.left=e.left+e.box.width/2-this.prop.offset-this.prop.arrow,t.arrowLeft=this.prop.offset):(t.left=e.left+e.box.width+this.prop.offset+this.prop.arrow,t.arrowLeft=2*-this.prop.arrow);break;case"center":t.left=e.left+e.box.width/2-t.width/2,t.arrowLeft=t.width/2-this.prop.arrow;break;case"left":o?(t.left=e.left-t.width+e.box.width/2+this.prop.offset+this.prop.arrow,t.arrowLeft=t.width-this.prop.offset-2*this.prop.arrow):(t.left=e.left-t.width-this.prop.offset-this.prop.arrow,t.arrowLeft=t.width)}},o.__waitImages=function(){var t=this,e=this.content.querySelectorAll("img");if(e.length>0){var o=[];e.forEach((function(t){o.push(new Promise((function(e){t.onload=e,t.onerror=e})))})),Promise.all(o).then((function(){if(t.prop.state===ae||t.prop.state===he){var e=t.container.getBoundingClientRect();t.prop.width=e.right-e.left,t.prop.height=e.bottom-e.top,t.move(t.config)}}))}},e}(gt),pe=function(t){function e(e){var o;o=t.call(this,e)||this;var i=new le(o.psv);return o.size={arrow:parseInt(R(i.arrow,"borderTopWidth"),10),offset:parseInt(R(i.container,"outlineWidth"),10)},i.destroy(),o}c(e,t);var o=e.prototype;return o.destroy=function(){delete this.size,t.prototype.destroy.call(this)},o.create=function(t){var e=new le(this.psv,this.size);return e.show(t),e},e}($t);e.Cache.enabled=!0;var ue=function(t){function o(o){var n;if(n=t.call(this)||this,b.load(),!b.isWebGLSupported)throw new i("WebGL is not supported.");if(0===b.maxTextureWidth)throw new i("Unable to detect system capabilities");return n.prop={ready:!1,uiRefresh:!1,needsUpdate:!1,fullscreen:!1,direction:new e.Vector3(0,0,p),vFov:null,hFov:null,aspect:null,autorotateEnabled:!1,animationPromise:null,loadingPromise:null,littlePlanet:!1,idleTime:-1,objectsObservers:{},size:{width:0,height:0},panoData:{fullWidth:0,fullHeight:0,croppedWidth:0,croppedHeight:0,croppedX:0,croppedY:0,poseHeading:0,posePitch:0,poseRoll:0}},n.config=function(t){var e=Y(zt);W(e,t);var o={};return Z(e,(function(t,n){if(Vt[n])$(Vt[n]);else{if(!Object.prototype.hasOwnProperty.call(zt,n))throw new i("Unknown option "+n);Wt[n]?o[n]=Wt[n](t,e):o[n]=t}})),o}(o),n.parent="string"==typeof o.container?document.getElementById(o.container):o.container,n.parent[u]=l(n),n.container=document.createElement("div"),n.container.classList.add("psv-container"),n.parent.appendChild(n.container),n.adapter=new n.config.adapter[0](l(n),n.config.adapter[1]),n.children=[],n.plugins={},n.renderer=new ne(l(n)),n.textureLoader=new re(l(n)),n.eventsHandler=new ie(l(n)),n.dataHelper=new oe(l(n)),n.loader=new Gt(l(n)),n.navbar=new Bt(l(n)),n.panel=new Qt(l(n)),n.tooltip=new pe(l(n)),n.notification=new qt(l(n)),n.overlay=new Kt(l(n)),n.dynamics={zoom:new ut((function(t){n.prop.vFov=n.dataHelper.zoomLevelToFov(t),n.prop.hFov=n.dataHelper.vFovToHFov(n.prop.vFov),n.trigger(f.ZOOM_UPDATED,t)}),n.config.defaultZoomLvl,0,100),position:new dt({longitude:new ut(null,n.config.defaultLong,0,2*Math.PI,!0),latitude:n.prop.littlePlanet?new ut(null,n.config.defaultLat,0,2*Math.PI,!0):new ut(null,n.config.defaultLat,-Math.PI/2,Math.PI/2)},(function(t){n.dataHelper.sphericalCoordsToVector3(t,n.prop.direction),n.trigger(f.POSITION_UPDATED,t)}))},n.__updateSpeeds(),n.eventsHandler.init(),n.__resizeRefresh=F((function(){return n.refreshUi("resize")}),500),n.resize(n.config.size),n.config.plugins.forEach((function(t){var e=t[0],o=t[1];n.plugins[e.id]=new e(l(n),o)})),Z(n.plugins,(function(t){return null==t.init?void 0:t.init()})),n.navbar.setButtons(n.config.navbar),n.config.panorama&&n.setPanorama(n.config.panorama),L(n.container,"psv--is-touch",b.isTouchEnabled.initial),b.isTouchEnabled.promise.then((function(t){return L(n.container,"psv--is-touch",t)})),n.once(f.RENDER,(function(){n.config.navbar&&(n.container.classList.add("psv--has-navbar"),n.navbar.show()),X(n.config.autorotateDelay)||(n.prop.idleTime=performance.now()),n.prop.ready=!0,setTimeout((function(){n.refreshUi("init"),n.trigger(f.READY)}),0)})),n}c(o,t);var n=o.prototype;return n.destroy=function(){this.__stopAll(),this.stopKeyboardControl(),this.exitFullscreen(),Z(this.plugins,(function(t){return t.destroy()})),delete this.plugins,this.children.slice().forEach((function(t){return t.destroy()})),this.children.length=0,this.eventsHandler.destroy(),this.renderer.destroy(),this.textureLoader.destroy(),this.dataHelper.destroy(),this.adapter.destroy(),this.parent.removeChild(this.container),delete this.parent[u],delete this.parent,delete this.container,delete this.loader,delete this.navbar,delete this.panel,delete this.tooltip,delete this.notification,delete this.overlay,delete this.dynamics,delete this.config},n.refreshUi=function(t){var e=this;this.prop.ready&&(this.prop.uiRefresh?"new"!==this.prop.uiRefresh&&(this.prop.uiRefresh="new",setTimeout((function(){e.prop.uiRefresh=!1,e.refreshUi(t)}))):(this.prop.uiRefresh=!0,this.children.every((function(t){return t.refreshUi(),!0===e.prop.uiRefresh})),this.prop.uiRefresh=!1))},n.getPlugin=function(t){if("string"==typeof t)return this.plugins[t];var e=q(t,Ht);return e?this.plugins[e.id]:void 0},n.getPosition=function(){return this.dataHelper.cleanPosition(this.dynamics.position.current)},n.getZoomLevel=function(){return this.dynamics.zoom.current},n.getSize=function(){return a({},this.prop.size)},n.isAutorotateEnabled=function(){return this.prop.autorotateEnabled},n.isFullscreenEnabled=function(){return b.fullscreenEvent?A(this.container):this.prop.fullscreen},n.needsUpdate=function(){this.prop.needsUpdate=!0},n.autoSize=function(){this.container.clientWidth===this.prop.size.width&&this.container.clientHeight===this.prop.size.height||(this.prop.size.width=Math.round(this.container.clientWidth),this.prop.size.height=Math.round(this.container.clientHeight),this.prop.aspect=this.prop.size.width/this.prop.size.height,this.prop.hFov=this.dataHelper.vFovToHFov(this.prop.vFov),this.trigger(f.SIZE_UPDATED,this.getSize()),this.__resizeRefresh())},n.setPanorama=function(t,e){var o,i=this;void 0===e&&(e={}),this.textureLoader.abortLoading(),null==(o=this.prop.transitionAnimation)||o.cancel(),this.prop.ready||["sphereCorrection","panoData","overlay","overlayOpacity"].forEach((function(t){t in e||(e[t]=i.config[t])})),void 0!==e.transition&&!0!==e.transition||(e.transition=1500),void 0===e.showLoader&&(e.showLoader=!0),void 0===e.caption&&(e.caption=this.config.caption),void 0===e.description&&(e.description=this.config.description),e.panoData||"function"!=typeof this.config.panoData||(e.panoData=this.config.panoData);var n=J(e),r="zoom"in e;(n||r)&&this.__stopAll(),this.hideError(),this.config.panorama=t,this.config.caption=e.caption,this.config.description=e.description;var s=function(t){if(i.loader.hide(),i.prop.loadingPromise=null,Q(t))return!1;if(t)throw i.navbar.setCaption(""),i.showError(i.config.lang.loadError),console.error(t),t;return i.resetIdleTimer(),i.setOverlay(e.overlay,e.overlayOpacity),i.navbar.setCaption(i.config.caption),!0};this.navbar.setCaption("<em>"+(this.config.loadingTxt||"")+"</em>"),!e.showLoader&&this.prop.ready||this.loader.show();var a=this.adapter.loadTexture(this.config.panorama,e.panoData).then((function(t){if(t.panorama!==i.config.panorama)throw i.adapter.disposeTexture(t),K();return t}));return e.transition&&this.prop.ready&&this.adapter.supportsTransition(this.config.panorama)?this.prop.loadingPromise=a.then((function(t){return i.loader.hide(),i.prop.transitionAnimation=i.renderer.transition(t,e),i.prop.transitionAnimation})).then((function(t){if(i.prop.transitionAnimation=null,!t)throw K()})).then(s,s):this.prop.loadingPromise=a.then((function(t){i.renderer.show(),i.renderer.setTexture(t),i.renderer.setPanoramaPose(t.panoData),i.renderer.setSphereCorrection(e.sphereCorrection),r&&i.zoom(e.zoom),n&&i.rotate(e)})).then(s,s),this.prop.loadingPromise},n.setOverlay=function(t,e){var o=this;return void 0===e&&(e=1),this.adapter.constructor.supportsOverlay?t?this.adapter.loadTexture(t,(function(t){var e=o.prop.panoData,i=t.width/e.croppedWidth;return{fullWidth:i*e.fullWidth,fullHeight:i*e.fullHeight,croppedWidth:i*e.croppedWidth,croppedHeight:i*e.croppedHeight,croppedX:i*e.croppedX,croppedY:i*e.croppedY}}),!1).then((function(t){o.renderer.setOverlay(t,e)})):(this.renderer.setOverlay(null,0),Promise.resolve()):Promise.reject(new i(this.adapter.constructor.id+" adapter does not supports overlay"))},n.setOptions=function(t){var e=this,o=a({},this.config,t);Z(t,(function(t,n){if(Vt[n])$(Vt[n]);else{if(!Object.prototype.hasOwnProperty.call(zt,n))throw new i("Unknown option "+n);if(Ft[n])throw new i(Ft[n]);switch(Wt[n]?e.config[n]=Wt[n](t,o):e.config[n]=t,n){case"overlay":case"overlayOpacity":e.setOverlay(e.config.overlay,e.config.overlayOpacity);break;case"caption":case"description":e.navbar.setCaption(e.config.caption);break;case"size":e.resize(t);break;case"sphereCorrection":e.renderer.setSphereCorrection(t);break;case"navbar":case"lang":e.navbar.setButtons(e.config.navbar);break;case"moveSpeed":case"zoomSpeed":e.__updateSpeeds();break;case"minFov":case"maxFov":e.dynamics.zoom.setValue(e.dataHelper.fovToZoomLevel(e.prop.vFov)),e.trigger(f.ZOOM_UPDATED,e.getZoomLevel());break;case"canvasBackground":e.renderer.canvasContainer.style.background=e.config.canvasBackground;break;case"autorotateIdle":e.resetIdleTimer()}}})),this.needsUpdate(),this.refreshUi("set options"),this.trigger(f.CONFIG_CHANGED,Object.keys(t))},n.setOption=function(t,e){var o;this.setOptions(((o={})[t]=e,o))},n.resetIdleTimer=function(){this.prop.idleTime=this.config.autorotateIdle?performance.now():-1},n.disableIdleTimer=function(){this.prop.idleTime=-1},n.startAutorotate=function(t){void 0===t&&(t=!1),t&&!this.isAutorotateEnabled()||!t&&this.isAutorotateEnabled()||(t||this.__stopAll(),this.dynamics.position.roll({longitude:this.config.autorotateSpeed<0},Math.abs(this.config.autorotateSpeed/this.config.moveSpeed)),this.dynamics.position.goto({latitude:this.config.autorotateLat},Math.abs(this.config.autorotateSpeed/this.config.moveSpeed)),this.prop.autorotateEnabled=!0,t||this.trigger(f.AUTOROTATE,!0))},n.stopAutorotate=function(){this.isAutorotateEnabled()&&(this.dynamics.position.stop(),this.prop.autorotateEnabled=!1,this.trigger(f.AUTOROTATE,!1))},n.toggleAutorotate=function(){this.isAutorotateEnabled()?this.stopAutorotate():this.startAutorotate()},n.showError=function(t){this.overlay.show({id:_.ERROR,image:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="15 15 70 70"><path fill="currentColor" d="M50,16.2c-18.6,0-33.8,15.1-33.8,33.8S31.4,83.7,50,83.7S83.8,68.6,83.8,50S68.6,16.2,50,16.2z M50,80.2c-16.7,0-30.2-13.6-30.2-30.2S33.3,19.7,50,19.7S80.3,33.3,80.3,50S66.7,80.2,50,80.2z"/><rect fill="currentColor" x="48" y="31.7" width="4" height="28"/><rect fill="currentColor" x="48" y="63.2" width="4" height="5"/>\x3c!--Created by Shastry from the Noun Project--\x3e</svg>\n',text:t,dissmisable:!1})},n.hideError=function(){this.overlay.hide(_.ERROR)},n.rotate=function(t){if(!this.trigger(f.BEFORE_ROTATE,t).isDefaultPrevented()){var e=this.change(m.GET_ROTATE_POSITION,this.dataHelper.cleanPosition(t));this.dynamics.position.setValue(e)}},n.animate=function(t){var e=this;this.__stopAll();var o,i=J(t),n="zoom"in t,r={};if(i){var s=this.change(m.GET_ANIMATE_POSITION,this.dataHelper.cleanPosition(t)),a=this.getPosition(),c=U(a.longitude,s.longitude);r.longitude={start:a.longitude,end:a.longitude+c},r.latitude={start:a.latitude,end:s.latitude},o=this.dataHelper.speedToDuration(t.speed,H(a,s))}if(n){var h=Math.abs(t.zoom-this.getZoomLevel());r.zoom={start:this.getZoomLevel(),end:t.zoom},o||(o=this.dataHelper.speedToDuration(t.speed,Math.PI/4*h/100))}return o?(this.prop.animationPromise=new pt({properties:r,duration:o,easing:"inOutSine",onTick:function(t){i&&e.rotate(t),n&&e.zoom(t.zoom)}}),this.prop.animationPromise.then((function(){e.prop.animationPromise=null,e.resetIdleTimer()})),this.prop.animationPromise):(i&&this.rotate(t),n&&this.zoom(t.zoom),new pt)},n.stopAnimation=function(){var t=this;return this.prop.animationPromise?new Promise((function(e){t.prop.animationPromise.then(e),t.prop.animationPromise.cancel(),t.prop.animationPromise=null})):Promise.resolve()},n.zoom=function(t){this.dynamics.zoom.setValue(t)},n.zoomIn=function(t){void 0===t&&(t=1),this.dynamics.zoom.step(t)},n.zoomOut=function(t){void 0===t&&(t=1),this.dynamics.zoom.step(-t)},n.resize=function(t){var e=this;["width","height"].forEach((function(o){t&&t[o]&&(/^[0-9.]+$/.test(t[o])&&(t[o]+="px"),e.parent.style[o]=t[o])})),this.autoSize()},n.enterFullscreen=function(){b.fullscreenEvent?I(this.container):(this.container.classList.add("psv-container--fullscreen"),this.autoSize(),this.eventsHandler.__fullscreenToggled(!0))},n.exitFullscreen=function(){this.isFullscreenEnabled()&&(b.fullscreenEvent?S():(this.container.classList.remove("psv-container--fullscreen"),this.autoSize(),this.eventsHandler.__fullscreenToggled(!1)))},n.toggleFullscreen=function(){this.isFullscreenEnabled()?this.exitFullscreen():this.enterFullscreen()},n.startKeyboardControl=function(){this.eventsHandler.enableKeyboard()},n.stopKeyboardControl=function(){this.eventsHandler.disableKeyboard()},n.observeObjects=function(t,e){var o=this;return this.prop.objectsObservers[t]={listener:e},function(){delete o.prop.objectsObservers[t]}},n.__stopAll=function(){return this.trigger(f.STOP_ALL),this.disableIdleTimer(),this.stopAutorotate(),this.stopAnimation()},n.__updateSpeeds=function(){this.dynamics.zoom.setSpeed(50*this.config.zoomSpeed),this.dynamics.position.setSpeed(e.MathUtils.degToRad(50*this.config.moveSpeed))},o}(o.EventEmitter);t.AbstractAdapter=n,t.AbstractButton=_t,t.AbstractComponent=gt,t.AbstractPlugin=Ht,t.Animation=pt,t.CONSTANTS=E,t.DEFAULTS=zt,t.EquirectangularAdapter=mt,t.PSVError=i,t.SYSTEM=b,t.Viewer=ue,t.registerButton=Xt,t.utils=ft,Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=/sm/3711cd16151c12d984aa9d8c7a6d39223b65090654f0d64937f0d9c4005b15a8.map