"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8441],{47345:function(e,t,n){n.d(t,{AE:function(){return nF}});var i,o,r,a,s=n(27746),c=n(98317),u=n(20557),l=n(79126),h=n(53708),d=n(64645),v=n(15096),p=n(29467),f=n(77364),m=n(6738),w=n(46385),y=n(91315),g=n(76394),b=n.n(g),k=n(41053);function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach(function(t){(0,u.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,i=(0,f.Z)(e);return n=t?Reflect.construct(i,arguments,(0,f.Z)(this).constructor):i.apply(this,arguments),(0,p.Z)(this,n)}}/*!
 * Photo Sphere Viewer 5.9.0
 * @copyright 2014-2015 Jérémy Heleine
 * @copyright 2015-2024 Damien "Mistic" Sorel
 * @licence MIT (https://opensource.org/licenses/MIT)
 */var T=Object.defineProperty,M=function(e,t){for(var n in t)T(e,n,{get:t[n],enumerable:!0})};M({},{ACTIONS:function(){return D},ANIMATION_MIN_DURATION:function(){return x},CAPTURE_EVENTS_CLASS:function(){return A},CTRLZOOM_TIMEOUT:function(){return S},DBLCLICK_DELAY:function(){return O},DEFAULT_TRANSITION:function(){return C},EASINGS:function(){return V},ICONS:function(){return F},IDS:function(){return N},INERTIA_WINDOW:function(){return H},KEY_CODES:function(){return j},LONGTOUCH_DELAY:function(){return P},MOVE_THRESHOLD:function(){return L},SPHERE_RADIUS:function(){return z},TWOFINGERSOVERLAY_DELAY:function(){return I},VIEWER_DATA:function(){return R}});var C=1500,x=500,L=4,O=300,P=500,I=100,S=2e3,H=300,z=10,R="photoSphereViewer",A="psv--capture-event",D=((i=D||{}).ROTATE_UP="ROTATE_UP",i.ROTATE_DOWN="ROTATE_DOWN",i.ROTATE_RIGHT="ROTATE_RIGHT",i.ROTATE_LEFT="ROTATE_LEFT",i.ZOOM_IN="ZOOM_IN",i.ZOOM_OUT="ZOOM_OUT",i),N={MENU:"menu",TWO_FINGERS:"twoFingers",CTRL_ZOOM:"ctrlZoom",ERROR:"error",DESCRIPTION:"description"},j={Enter:"Enter",Control:"Control",Escape:"Escape",Space:" ",PageUp:"PageUp",PageDown:"PageDown",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown",Delete:"Delete",Plus:"+",Minus:"-"},F={arrow:'<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><!-- Created by Flatart from the Noun Project --></svg>\n',close:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><g fill="currentColor" transform=" translate(50, 50) rotate(45)"><rect x="-5" y="-65" width="10" height="130"/><rect x="-65" y="-5" width="130" height="10"/></g></svg>',download:'<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"/><!--Created by Michael Zenaty from the Noun Project--></svg>\n',fullscreenIn:'<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"/><!--Created by Garrett Knoll from the Noun Project--></svg>\n',fullscreenOut:'<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"/><!--Created by Garrett Knoll from the Noun Project--></svg>\n',info:'<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"/><!--Created by Arafat Uddin from the Noun Project--></svg>\n',menu:'<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><!-- Created by Richard Kun\xe1k from the Noun Project--></svg>\n',zoomIn:'<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"/><!--Created by Ryan Canning from the Noun Project--></svg>\n',zoomOut:'<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"/><!--Created by Ryan Canning from the Noun Project--></svg>\n'},V={linear:function(e){return e},inQuad:function(e){return e*e},outQuad:function(e){return e*(2-e)},inOutQuad:function(e){return e<.5?2*e*e:-1+(4-2*e)*e},inCubic:function(e){return e*e*e},outCubic:function(e){return--e*e*e+1},inOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},inQuart:function(e){return e*e*e*e},outQuart:function(e){return 1- --e*e*e*e},inOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},inQuint:function(e){return e*e*e*e*e},outQuint:function(e){return 1+--e*e*e*e*e},inOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e},inSine:function(e){return 1-Math.cos(Math.PI/2*e)},outSine:function(e){return Math.sin(Math.PI/2*e)},inOutSine:function(e){return .5-.5*Math.cos(Math.PI*e)},inExpo:function(e){return Math.pow(2,10*(e-1))},outExpo:function(e){return 1-Math.pow(2,-10*e)},inOutExpo:function(e){return(e=2*e-1)<0?.5*Math.pow(2,10*e):1-.5*Math.pow(2,-10*e)},inCirc:function(e){return 1-Math.sqrt(1-e*e)},outCirc:function(e){return Math.sqrt(1-(e-1)*(e-1))},inOutCirc:function(e){return(e*=2)<1?.5-.5*Math.sqrt(1-e*e):.5+.5*Math.sqrt(1-(e-=2)*e)}};function W(e,t){var n=e%t;return n<0&&(n+=t),n}function U(e){return e.reduce(function(e,t){return e+t},0)}function X(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Y(e,t){return Math.atan2(t.y-e.y,t.x-e.x)}function B(e,t){return[0,2*Math.PI,-(2*Math.PI)].reduce(function(n,i){var o=t-e+i;return Math.abs(o)<Math.abs(n)?o:n},1/0)}function q(e,t){return Math.acos(Math.cos(e.pitch)*Math.cos(t.pitch)*Math.cos(e.yaw-t.yaw)+Math.sin(e.pitch)*Math.sin(t.pitch))}function K(e,t){var n=(0,y.Z)(e,2),i=n[0],o=n[1],r=(0,y.Z)(t,2),a=r[0],s=r[1];i-a>Math.PI?i-=2*Math.PI:i-a<-Math.PI&&(i+=2*Math.PI);var c=(a-i)*Math.cos((o+s)/2),u=s-o;return Math.sqrt(c*c+u*u)}function G(e){return"string"==typeof e?e.match(/^[a-z]/i)?document.getElementById(e):document.querySelector(e):e}function $(e,t,n){void 0===n?e.classList.toggle(t):n?e.classList.add(t):n||e.classList.remove(t)}function Q(e,t){var n;(n=e.classList).add.apply(n,(0,w.Z)(t.split(" ").filter(function(e){return!!e})))}function J(e,t){var n;(n=e.classList).remove.apply(n,(0,w.Z)(t.split(" ").filter(function(e){return!!e})))}function ee(e,t){var n=e;do{if(n===t)return!0;n=n.parentElement}while(n);return!1}function et(e,t){if(!(null!=e&&e.matches))return null;var n=e;do{if(n.matches(t))return n;n=n.parentElement}while(n);return null}function en(e){for(var t=0,n=0,i=e;i;)t+=i.offsetLeft-i.scrollLeft+i.clientLeft,n+=i.offsetTop-i.scrollTop+i.clientTop,i=i.offsetParent;return{x:t,y:n}}function ei(e,t){return window.getComputedStyle(e).getPropertyValue(t)}function eo(e){if(e.touches.length<2)return null;var t={x:e.touches[0].clientX,y:e.touches[0].clientY},n={x:e.touches[1].clientX,y:e.touches[1].clientY};return{distance:X(t,n),angle:Y(t,n),center:{x:(t.x+n.x)/2,y:(t.y+n.y)/2}}}function er(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?e===a:document.fullscreenElement===e}function ea(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t?(a=e,e.classList.add("psv-fullscreen-emulation"),document.dispatchEvent(new Event("fullscreenchange"))):e.requestFullscreen()}function es(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e?(a.classList.remove("psv-fullscreen-emulation"),a=null,document.dispatchEvent(new Event("fullscreenchange"))):document.exitFullscreen()}function ec(e){return e.replace(/[A-Z](?:(?=[^A-Z])|[A-Z]*(?=[A-Z][^A-Z]|$))/g,function(e,t){return(t>0?"-":"")+e.toLowerCase()})}function eu(e,t){var n=!1;return function(){for(var i=this,o=arguments.length,r=Array(o),a=0;a<o;a++)r[a]=arguments[a];n||(n=!0,setTimeout(function(){e.apply(i,r),n=!1},t))}}function el(e){if("object"!=typeof e||null===e||"[object Object]"!==Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function eh(e,t){return function e(n,i){return Array.isArray(i)?(n&&Array.isArray(n)?n.length=0:n=[],i.forEach(function(t,i){n[i]=e(null,t)})):"object"==typeof i?((!n||Array.isArray(n))&&(n={}),Object.keys(i).forEach(function(o){"object"==typeof i[o]&&i[o]&&el(i[o])?i[o]!==t&&(n[o]?e(n[o],i[o]):n[o]=e(null,i[o])):n[o]=i[o]})):n=i,n}(e,t)}function ed(e){return eh(null,e)}function ev(e){return!e||0===Object.keys(e).length&&e.constructor===Object}function ep(e){return null==e}function ef(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var i=0;i<t.length;i++){var o=t[i];if(!ep(o))return o}return null}function em(e){return"object"==typeof e&&null!==e}M({},{Animation:function(){return eV},Dynamic:function(){return eW},MultiDynamic:function(){return eU},PressHandler:function(){return eX},Slider:function(){return eB},SliderDirection:function(){return eY},addClasses:function(){return Q},angle:function(){return Y},applyEulerInverse:function(){return eD},checkStylesheet:function(){return ej},checkVersion:function(){return eF},cleanCssPosition:function(){return eP},clone:function(){return ed},createTexture:function(){return eR},cssPositionIsOrdered:function(){return eI},dasherize:function(){return ec},deepEqual:function(){return function e(t,n){if(t===n)return!0;if(!(em(t)&&em(n))||Object.keys(t).length!==Object.keys(n).length)return!1;for(var i=0,o=Object.keys(t);i<o.length;i++){var r=o[i];if(!e(t[r],n[r]))return!1}return!0}},deepmerge:function(){return eh},distance:function(){return X},exitFullscreen:function(){return es},firstNonNull:function(){return ef},getAbortError:function(){return eb},getAngle:function(){return q},getClosest:function(){return et},getConfigParser:function(){return eN},getElement:function(){return G},getPosition:function(){return en},getShortestArc:function(){return B},getStyleProperty:function(){return ei},getTouchData:function(){return eo},getXMPValue:function(){return e_},greatArcDistance:function(){return K},hasParent:function(){return ee},invertResolvableBoolean:function(){return eg},isAbortError:function(){return ek},isEmpty:function(){return ev},isExtendedPosition:function(){return eZ},isFullscreenEnabled:function(){return er},isNil:function(){return ep},isPlainObject:function(){return el},logWarn:function(){return eE},parseAngle:function(){return ez},parsePoint:function(){return eO},parseSpeed:function(){return eS},removeClasses:function(){return J},requestFullscreen:function(){return ea},resolveBoolean:function(){return ey},speedToDuration:function(){return eH},sum:function(){return U},throttle:function(){return eu},toggleClass:function(){return $},wrap:function(){return W}});var ew=function(e){(0,v.Z)(n,e);var t=_(n);function n(e,i){var o,r;return(0,h.Z)(this,n),(r=t.call(this,i&&i instanceof Error?"".concat(e,": ").concat(i.message):e)).name="PSVError",null===(o=Error.captureStackTrace)||void 0===o||o.call(Error,(0,d.Z)(r),n),r}return(0,l.Z)(n)}((0,m.Z)(Error));function ey(e,t){el(e)?(t(e.initial,!0),e.promise.then(function(e){return t(e,!1)})):t(e,!0)}function eg(e){return{initial:!e.initial,promise:e.promise.then(function(e){return!e})}}function eb(){var e=Error("Loading was aborted.");return e.name="AbortError",e}function ek(e){return(null==e?void 0:e.name)==="AbortError"}function eE(e){console.warn("PhotoSphereViewer: ".concat(e))}function eZ(e){return!(!e||Array.isArray(e))&&[["textureX","textureY"],["yaw","pitch"]].some(function(t){var n=(0,y.Z)(t,2),i=n[0],o=n[1];return void 0!==e[i]&&void 0!==e[o]})}function e_(e,t){var n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=e.match("<GPano:"+t+">(.*)</GPano:"+t+">");if(null!==i){var o=n?parseInt(i[1],10):parseFloat(i[1]);return isNaN(o)?null:o}if(null!==(i=e.match("GPano:"+t+'="(.*?)"'))){var r=n?parseInt(i[1],10):parseFloat(i[1]);return isNaN(r)?null:r}return null}var eT={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},eM=["left","center","right"],eC=["top","center","bottom"],ex=[].concat(eM,eC),eL="center";function eO(e){if(!e)return{x:.5,y:.5};if("object"==typeof e)return e;var t=e.toLocaleLowerCase().split(" ").slice(0,2);1===t.length&&(t=eT[t[0]]?[t[0],eL]:[t[0],t[0]]);var n="left"!==t[1]&&"right"!==t[1]&&"top"!==t[0]&&"bottom"!==t[0];t=t.map(function(e){return eT[e]||e}),n||t.reverse();var i=t.join(" ").match(/^([0-9.]+)% ([0-9.]+)%$/);return i?{x:parseFloat(i[1])/100,y:parseFloat(i[2])/100}:{x:.5,y:.5}}function eP(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{allowCenter:!0,cssOrder:!0},n=t.allowCenter,i=t.cssOrder;return e?("string"==typeof e&&(e=e.split(" ")),1===e.length&&(e[0]===eL?e=[eL,eL]:-1!==eM.indexOf(e[0])?e=[eL,e[0]]:-1!==eC.indexOf(e[0])&&(e=[e[0],eL])),2!==e.length||-1===ex.indexOf(e[0])||-1===ex.indexOf(e[1]))?(eE("Unparsable position ".concat(e)),null):n||e[0]!==eL||e[1]!==eL?(i&&!eI(e)&&(e=[e[1],e[0]]),e[1]===eL&&-1!==eM.indexOf(e[0])&&(e=[eL,e[0]]),e[0]===eL&&-1!==eC.indexOf(e[1])&&(e=[e[1],eL]),e):(eE("Invalid position center center"),null):null}function eI(e){return -1!==eC.indexOf(e[0])&&-1!==eM.indexOf(e[1])}function eS(e){var t;if("string"==typeof e){var n=e.toString().trim(),i=parseFloat(n.replace(/^(-?[0-9]+(?:\.[0-9]*)?).*$/,"$1")),o=n.replace(/^-?[0-9]+(?:\.[0-9]*)?(.*)$/,"$1").trim();switch(o.match(/(pm|per minute)$/)&&(i/=60),o){case"dpm":case"degrees per minute":case"dps":case"degrees per second":t=k.M8C.degToRad(i);break;case"rdpm":case"radians per minute":case"rdps":case"radians per second":t=i;break;case"rpm":case"revolutions per minute":case"rps":case"revolutions per second":t=i*Math.PI*2;break;default:throw new ew('Unknown speed unit "'.concat(o,'"'))}}else t=e;return t}function eH(e,t){return"number"!=typeof e?t/Math.abs(eS(e))*1e3:Math.abs(e)}function ez(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;if("string"==typeof e){var o=e.toLowerCase().trim().match(/^(-?[0-9]+(?:\.[0-9]*)?)(.*)$/);if(!o)throw new ew('Unknown angle "'.concat(e,'"'));var r=parseFloat(o[1]),a=o[2];if(a)switch(a){case"deg":case"degs":t=k.M8C.degToRad(r);break;case"rad":case"rads":t=r;break;default:throw new ew('Unknown angle unit "'.concat(a,'"'))}else t=r}else if("number"!=typeof e||isNaN(e))throw new ew('Unknown angle "'.concat(e,'"'));else t=e;return t=W(n?t+Math.PI:t,2*Math.PI),n?k.M8C.clamp(t-Math.PI,-Math.PI/(i?2:1),Math.PI/(i?2:1)):t}function eR(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=new k.xEZ(e);return n.needsUpdate=!0,n.minFilter=t?k.D1R:k.wem,n.generateMipmaps=t,n.anisotropy=t?2:1,n}var eA=new k._fP;function eD(e,t){eA.setFromEuler(t).invert(),e.applyQuaternion(eA)}function eN(e,t){var n=function(n){for(var i=ed(Z(Z({},e),n)),o={},r=0,a=Object.entries(i);r<a.length;r++){var s=(0,y.Z)(a[r],2),c=s[0],u=s[1];if(t&&c in t)u=t[c](u,{rawConfig:i,defValue:e[c]});else if(!(c in e)){eE("Unknown option ".concat(c));continue}o[c]=u}return o};return n.defaults=e,n.parsers=t||{},n}function ej(e,t){"true"!==ei(e,"--psv-".concat(t,"-loaded"))&&console.error('PhotoSphereViewer: stylesheet "@photo-sphere-viewer/'.concat(t,'/index.css" is not loaded'))}function eF(e,t,n){t&&t!==n&&console.error("PhotoSphereViewer: @photo-sphere-viewer/".concat(e," is in version ").concat(t," but @photo-sphere-viewer/core is in version ").concat(n))}var eV=function(){function e(t){var n=this;(0,h.Z)(this,e),this.easing=V.linear,this.callbacks=[],this.resolved=!1,this.cancelled=!1,this.options=t,t?(t.easing&&(this.easing="function"==typeof t.easing?t.easing:V[t.easing]||V.linear),this.delayTimeout=setTimeout(function(){n.delayTimeout=void 0,n.animationFrame=window.requestAnimationFrame(function(e){return n.__run(e)})},t.delay||0)):this.resolved=!0}return(0,l.Z)(e,[{key:"__run",value:function(e){var t=this;if(!this.cancelled){this.start||(this.start=e);var n=(e-this.start)/this.options.duration,i={};if(n<1){for(var o=0,r=Object.entries(this.options.properties);o<r.length;o++){var a=(0,y.Z)(r[o],2),s=a[0],c=a[1];if(c){var u=c.start+(c.end-c.start)*this.easing(n);i[s]=u}}this.options.onTick(i,n),this.animationFrame=window.requestAnimationFrame(function(e){return t.__run(e)})}else{for(var l=0,h=Object.entries(this.options.properties);l<h.length;l++){var d=(0,y.Z)(h[l],2),v=d[0],p=d[1];p&&(i[v]=p.end)}this.options.onTick(i,1),this.__resolve(!0),this.animationFrame=void 0}}}},{key:"__resolve",value:function(e){e?this.resolved=!0:this.cancelled=!0,this.callbacks.forEach(function(t){return t(e)}),this.callbacks.length=0}},{key:"then",value:function(e){var t=this;return this.resolved||this.cancelled?Promise.resolve(this.resolved).then(e):new Promise(function(e){t.callbacks.push(e)}).then(e)}},{key:"cancel",value:function(){this.cancelled||this.resolved||(this.__resolve(!1),this.delayTimeout&&(window.clearTimeout(this.delayTimeout),this.delayTimeout=void 0),this.animationFrame&&(window.cancelAnimationFrame(this.animationFrame),this.animationFrame=void 0))}}]),e}(),eW=function(){function e(t,n){if((0,h.Z)(this,e),this.fn=t,this.mode=0,this.speed=0,this.speedMult=0,this.currentSpeed=0,this.target=0,this.__current=0,this.min=n.min,this.max=n.max,this.wrap=n.wrap,this.current=n.defaultValue,this.wrap&&0!==this.min)throw new ew("invalid config");this.fn&&this.fn(this.current)}return(0,l.Z)(e,[{key:"current",get:function(){return this.__current},set:function(e){this.__current=e}},{key:"setSpeed",value:function(e){this.speed=e}},{key:"goto",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.mode=2,this.target=this.wrap?W(e,this.max):k.M8C.clamp(e,this.min,this.max),this.speedMult=t}},{key:"step",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;0===t?this.setValue(this.current+e):(2!==this.mode&&(this.target=this.current),this.goto(this.target+e,t))}},{key:"roll",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.mode=1,this.target=e?-1/0:1/0,this.speedMult=t}},{key:"stop",value:function(){this.mode=0}},{key:"setValue",value:function(e){return this.target=this.wrap?W(e,this.max):k.M8C.clamp(e,this.min,this.max),this.mode=0,this.currentSpeed=0,this.target!==this.current&&(this.current=this.target,this.fn&&this.fn(this.current),!0)}},{key:"update",value:function(e){if(2===this.mode){this.wrap&&Math.abs(this.target-this.current)>this.max/2&&(this.current=this.current<this.target?this.current+this.max:this.current-this.max);var t=this.currentSpeed*this.currentSpeed/(this.speed*this.speedMult*4);Math.abs(this.target-this.current)<=t&&(this.mode=0)}var n=0===this.mode?0:this.speed*this.speedMult;this.target<this.current&&(n=-n),this.currentSpeed<n?this.currentSpeed=Math.min(n,this.currentSpeed+e/1e3*this.speed*this.speedMult*2):this.currentSpeed>n&&(this.currentSpeed=Math.max(n,this.currentSpeed-e/1e3*this.speed*this.speedMult*2));var i=null;return this.current>this.target&&this.currentSpeed?i=Math.max(this.target,this.current+this.currentSpeed*e/1e3):this.current<this.target&&this.currentSpeed&&(i=Math.min(this.target,this.current+this.currentSpeed*e/1e3)),null!==i&&(i=this.wrap?W(i,this.max):k.M8C.clamp(i,this.min,this.max))!==this.current&&(this.current=i,this.fn&&this.fn(this.current),!0)}}]),e}(),eU=function(){function e(t,n){(0,h.Z)(this,e),this.fn=t,this.dynamics=n,this.fn&&this.fn(this.current)}return(0,l.Z)(e,[{key:"current",get:function(){return Object.entries(this.dynamics).reduce(function(e,t){var n=(0,y.Z)(t,2),i=n[0],o=n[1];return e[i]=o.current,e},{})}},{key:"setSpeed",value:function(e){for(var t=0,n=Object.values(this.dynamics);t<n.length;t++)n[t].setSpeed(e)}},{key:"goto",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=0,i=Object.entries(e);n<i.length;n++){var o=(0,y.Z)(i[n],2),r=o[0],a=o[1];this.dynamics[r].goto(a,t)}}},{key:"step",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(0===n)this.setValue(Object.keys(e).reduce(function(n,i){return n[i]=e[i]+t.dynamics[i].current,n},{}));else for(var i=0,o=Object.entries(e);i<o.length;i++){var r=(0,y.Z)(o[i],2),a=r[0],s=r[1];this.dynamics[a].step(s,n)}}},{key:"roll",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=0,i=Object.entries(e);n<i.length;n++){var o=(0,y.Z)(i[n],2),r=o[0],a=o[1];this.dynamics[r].roll(a,t)}}},{key:"stop",value:function(){for(var e=0,t=Object.values(this.dynamics);e<t.length;e++)t[e].stop()}},{key:"setValue",value:function(e){for(var t=!1,n=0,i=Object.entries(e);n<i.length;n++){var o=(0,y.Z)(i[n],2),r=o[0],a=o[1];t=this.dynamics[r].setValue(a)||t}return t&&this.fn&&this.fn(this.current),t}},{key:"update",value:function(e){for(var t=!1,n=0,i=Object.values(this.dynamics);n<i.length;n++)t=i[n].update(e)||t;return t&&this.fn&&this.fn(this.current),t}}]),e}(),eX=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200;(0,h.Z)(this,e),this.delay=t,this.time=0,this.delay=t}return(0,l.Z)(e,[{key:"pending",get:function(){return 0!==this.time}},{key:"down",value:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0),this.time=new Date().getTime()}},{key:"up",value:function(e){var t=this;this.time&&(Date.now()-this.time<this.delay?this.timeout=setTimeout(function(){e(),t.timeout=void 0,t.time=0},this.delay):(e(),this.time=0))}}]),e}(),eY=((o=eY||{}).VERTICAL="VERTICAL",o.HORIZONTAL="HORIZONTAL",o),eB=function(){function e(t,n,i){(0,h.Z)(this,e),this.container=t,this.direction=n,this.listener=i,this.mousedown=!1,this.mouseover=!1,this.container.addEventListener("click",this),this.container.addEventListener("mousedown",this),this.container.addEventListener("mouseenter",this),this.container.addEventListener("mouseleave",this),this.container.addEventListener("touchstart",this),this.container.addEventListener("mousemove",this,!0),this.container.addEventListener("touchmove",this,!0),window.addEventListener("mouseup",this),window.addEventListener("touchend",this)}return(0,l.Z)(e,[{key:"isVertical",get:function(){return"VERTICAL"===this.direction}},{key:"isHorizontal",get:function(){return"HORIZONTAL"===this.direction}},{key:"destroy",value:function(){window.removeEventListener("mouseup",this),window.removeEventListener("touchend",this)}},{key:"handleEvent",value:function(e){switch(e.type){case"click":e.stopPropagation();break;case"mousedown":this.__onMouseDown(e);break;case"mouseenter":this.__onMouseEnter(e);break;case"mouseleave":this.__onMouseLeave(e);break;case"touchstart":this.__onTouchStart(e);break;case"mousemove":this.__onMouseMove(e);break;case"touchmove":this.__onTouchMove(e);break;case"mouseup":this.__onMouseUp(e);break;case"touchend":this.__onTouchEnd(e)}}},{key:"__onMouseDown",value:function(e){this.mousedown=!0,this.__update(e.clientX,e.clientY,!0)}},{key:"__onMouseEnter",value:function(e){this.mouseover=!0,this.__update(e.clientX,e.clientY,!0)}},{key:"__onTouchStart",value:function(e){this.mouseover=!0,this.mousedown=!0;var t=e.changedTouches[0];this.__update(t.clientX,t.clientY,!0)}},{key:"__onMouseMove",value:function(e){(this.mousedown||this.mouseover)&&(e.stopPropagation(),this.__update(e.clientX,e.clientY,!0))}},{key:"__onTouchMove",value:function(e){if(this.mousedown||this.mouseover){e.stopPropagation();var t=e.changedTouches[0];this.__update(t.clientX,t.clientY,!0)}}},{key:"__onMouseUp",value:function(e){this.mousedown&&(this.mousedown=!1,this.__update(e.clientX,e.clientY,!1))}},{key:"__onMouseLeave",value:function(e){this.mouseover&&(this.mouseover=!1,this.__update(e.clientX,e.clientY,!0))}},{key:"__onTouchEnd",value:function(e){if(this.mousedown){this.mouseover=!1,this.mousedown=!1;var t=e.changedTouches[0];this.__update(t.clientX,t.clientY,!1)}}},{key:"__update",value:function(e,t,n){var i=this.container.getBoundingClientRect(),o=this.isVertical?t:e,r=i[this.isVertical?"bottom":"left"],a=i[this.isVertical?"height":"width"];this.listener({value:Math.abs((r-o)/a),click:!n,mousedown:this.mousedown,mouseover:this.mouseover,cursor:{clientX:e,clientY:t}})}}]),e}();M({},{BeforeAnimateEvent:function(){return eQ},BeforeRenderEvent:function(){return e0},BeforeRotateEvent:function(){return e2},ClickEvent:function(){return e5},ConfigChangedEvent:function(){return e8},DoubleClickEvent:function(){return e6},FullscreenEvent:function(){return te},HideNotificationEvent:function(){return tn},HideOverlayEvent:function(){return to},HidePanelEvent:function(){return ta},HideTooltipEvent:function(){return tc},KeypressEvent:function(){return tl},LoadProgressEvent:function(){return td},ObjectEnterEvent:function(){return tW},ObjectEvent:function(){return tF},ObjectHoverEvent:function(){return tB},ObjectLeaveEvent:function(){return tX},PanoramaErrorEvent:function(){return ty},PanoramaLoadEvent:function(){return tp},PanoramaLoadedEvent:function(){return tm},PositionUpdatedEvent:function(){return tb},ReadyEvent:function(){return t_},RenderEvent:function(){return tM},RollUpdatedEvent:function(){return tE},ShowNotificationEvent:function(){return tx},ShowOverlayEvent:function(){return tO},ShowPanelEvent:function(){return tI},ShowTooltipEvent:function(){return tH},SizeUpdatedEvent:function(){return tR},StopAllEvent:function(){return tD},ViewerEvent:function(){return eG},ZoomUpdatedEvent:function(){return tj}});var eq=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,h.Z)(this,n),t.call(this,e,{cancelable:i})}return(0,l.Z)(n)}((0,m.Z)(Event)),eK=function(e){(0,v.Z)(n,e);var t=_(n);function n(){return(0,h.Z)(this,n),t.apply(this,arguments)}return(0,l.Z)(n,[{key:"dispatchEvent",value:function(e){return(0,c.Z)((0,f.Z)(n.prototype),"dispatchEvent",this).call(this,e)}},{key:"addEventListener",value:function(e,t,i){(0,c.Z)((0,f.Z)(n.prototype),"addEventListener",this).call(this,e,t,i)}},{key:"removeEventListener",value:function(e,t,i){(0,c.Z)((0,f.Z)(n.prototype),"removeEventListener",this).call(this,e,t,i)}}]),n}((0,m.Z)(EventTarget)),eG=function(e){(0,v.Z)(n,e);var t=_(n);function n(){return(0,h.Z)(this,n),t.apply(this,arguments)}return(0,l.Z)(n)}(eq),e$=function(e){(0,v.Z)(n,e);var t=_(n);function n(e,i){var o;return(0,h.Z)(this,n),(o=t.call(this,n.type,!0)).position=e,o.zoomLevel=i,o}return(0,l.Z)(n)}(eG);e$.type="before-animate";var eQ=e$,eJ=function(e){(0,v.Z)(n,e);var t=_(n);function n(e,i){var o;return(0,h.Z)(this,n),(o=t.call(this,n.type)).timestamp=e,o.elapsed=i,o}return(0,l.Z)(n)}(eG);eJ.type="before-render";var e0=eJ,e1=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,n.type,!0)).position=e,i}return(0,l.Z)(n)}(eG);e1.type="before-rotate";var e2=e1,e3=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,n.type)).data=e,i}return(0,l.Z)(n)}(eG);e3.type="click";var e5=e3,e4=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,n.type)).options=e,i}return(0,l.Z)(n,[{key:"containsOptions",value:function(){for(var e=this,t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];return n.some(function(t){return e.options.includes(t)})}}]),n}(eG);e4.type="config-changed";var e8=e4,e7=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,n.type)).data=e,i}return(0,l.Z)(n)}(eG);e7.type="dblclick";var e6=e7,e9=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,n.type)).fullscreenEnabled=e,i}return(0,l.Z)(n)}(eG);e9.type="fullscreen";var te=e9,tt=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,n.type)).notificationId=e,i}return(0,l.Z)(n)}(eG);tt.type="hide-notification";var tn=tt,ti=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,n.type)).overlayId=e,i}return(0,l.Z)(n)}(eG);ti.type="hide-overlay";var to=ti,tr=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,n.type)).panelId=e,i}return(0,l.Z)(n)}(eG);tr.type="hide-panel";var ta=tr,ts=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,n.type)).tooltipData=e,i}return(0,l.Z)(n)}(eG);ts.type="hide-tooltip";var tc=ts,tu=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,n.type,!0)).key=e,i}return(0,l.Z)(n)}(eG);tu.type="key-press";var tl=tu,th=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,n.type)).progress=e,i}return(0,l.Z)(n)}(eG);th.type="load-progress";var td=th,tv=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,n.type)).panorama=e,i}return(0,l.Z)(n)}(eG);tv.type="panorama-load";var tp=tv,tf=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,n.type)).data=e,i}return(0,l.Z)(n)}(eG);tf.type="panorama-loaded";var tm=tf,tw=function(e){(0,v.Z)(n,e);var t=_(n);function n(e,i){var o;return(0,h.Z)(this,n),(o=t.call(this,n.type)).panorama=e,o.error=i,o}return(0,l.Z)(n)}(eG);tw.type="panorama-error";var ty=tw,tg=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,n.type)).position=e,i}return(0,l.Z)(n)}(eG);tg.type="position-updated";var tb=tg,tk=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,n.type)).roll=e,i}return(0,l.Z)(n)}(eG);tk.type="roll-updated";var tE=tk,tZ=function(e){(0,v.Z)(n,e);var t=_(n);function n(){return(0,h.Z)(this,n),t.call(this,n.type)}return(0,l.Z)(n)}(eG);tZ.type="ready";var t_=tZ,tT=function(e){(0,v.Z)(n,e);var t=_(n);function n(){return(0,h.Z)(this,n),t.call(this,n.type)}return(0,l.Z)(n)}(eG);tT.type="render";var tM=tT,tC=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,n.type)).notificationId=e,i}return(0,l.Z)(n)}(eG);tC.type="show-notification";var tx=tC,tL=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,n.type)).overlayId=e,i}return(0,l.Z)(n)}(eG);tL.type="show-overlay";var tO=tL,tP=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,n.type)).panelId=e,i}return(0,l.Z)(n)}(eG);tP.type="show-panel";var tI=tP,tS=function(e){(0,v.Z)(n,e);var t=_(n);function n(e,i){var o;return(0,h.Z)(this,n),(o=t.call(this,n.type)).tooltip=e,o.tooltipData=i,o}return(0,l.Z)(n)}(eG);tS.type="show-tooltip";var tH=tS,tz=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,n.type)).size=e,i}return(0,l.Z)(n)}(eG);tz.type="size-updated";var tR=tz,tA=function(e){(0,v.Z)(n,e);var t=_(n);function n(){return(0,h.Z)(this,n),t.call(this,n.type)}return(0,l.Z)(n)}(eG);tA.type="stop-all";var tD=tA,tN=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,n.type)).zoomLevel=e,i}return(0,l.Z)(n)}(eG);tN.type="zoom-updated";var tj=tN,tF=function(e){(0,v.Z)(n,e);var t=_(n);function n(e,i,o,r,a){var s;return(0,h.Z)(this,n),(s=t.call(this,e)).originalEvent=i,s.object=o,s.viewerPoint=r,s.userDataKey=a,s}return(0,l.Z)(n)}(eG),tV=function(e){(0,v.Z)(n,e);var t=_(n);function n(e,i,o,r){return(0,h.Z)(this,n),t.call(this,n.type,e,i,o,r)}return(0,l.Z)(n)}(tF);tV.type="enter-object";var tW=tV,tU=function(e){(0,v.Z)(n,e);var t=_(n);function n(e,i,o,r){return(0,h.Z)(this,n),t.call(this,n.type,e,i,o,r)}return(0,l.Z)(n)}(tF);tU.type="leave-object";var tX=tU,tY=function(e){(0,v.Z)(n,e);var t=_(n);function n(e,i,o,r){return(0,h.Z)(this,n),t.call(this,n.type,e,i,o,r)}return(0,l.Z)(n)}(tF);tY.type="hover-object";var tB=tY,tq=function(){function e(t){(0,h.Z)(this,e),this.viewer=t}return(0,l.Z)(e,[{key:"init",value:function(){}},{key:"destroy",value:function(){}},{key:"supportsTransition",value:function(e){return!1}},{key:"supportsPreload",value:function(e){return!1}},{key:"textureCoordsToSphericalCoords",value:function(e,t){throw new ew("Current adapter does not support texture coordinates.")}},{key:"sphericalCoordsToTextureCoords",value:function(e,t){throw new ew("Current adapter does not support texture coordinates.")}}]),e}();function tK(e){if(e)for(var t=0,n=[["_",e]].concat((0,w.Z)(Object.entries(e)));t<n.length;t++){var i=(0,y.Z)(n[t],2)[1];if(i.prototype instanceof tq)return eF(i.id,i.VERSION,"5.9.0"),i}return null}tq.supportsDownload=!1;var tG="".concat(R,"_touchSupport"),t$={loaded:!1,pixelRatio:1,isWebGLSupported:!1,maxTextureWidth:0,isTouchEnabled:null,__maxCanvasWidth:null,isIphone:!1,get maxCanvasWidth(){return null===this.__maxCanvasWidth&&(this.__maxCanvasWidth=function(e){for(var t=e,n=!1;t>1024&&!n;){var i=document.createElement("canvas"),o=i.getContext("2d");i.width=t,i.height=t/2,o.fillStyle="white",o.fillRect(0,0,1,1);try{o.getImageData(0,0,1,1).data[0]>0&&(n=!0)}catch(e){}i.width=0,i.height=0,n||(t/=2)}if(n)return t;throw new ew("Unable to detect system capabilities")}(this.maxTextureWidth)),this.__maxCanvasWidth},load:function(){if(!this.loaded){var e,t,n=function(){try{return document.createElement("canvas").getContext("webgl2")}catch(e){return null}}();this.pixelRatio=window.devicePixelRatio||1,this.isWebGLSupported=!!n,this.maxTextureWidth=n?n.getParameter(n.MAX_TEXTURE_SIZE):0,this.isTouchEnabled=(e="ontouchstart"in window||navigator.maxTouchPoints>0,tG in localStorage&&(e="true"===localStorage[tG]),t=new Promise(function(t){var n=function(){window.removeEventListener("mousedown",i),window.removeEventListener("touchstart",o),clearTimeout(r)},i=function(){n(),localStorage[tG]=!1,t(!1)},o=function(){n(),localStorage[tG]=!0,t(!0)};window.addEventListener("mousedown",i,!1),window.addEventListener("touchstart",o,!1);var r=setTimeout(function(){n(),localStorage[tG]=e,t(e)},1e4)}),{initial:e,promise:t}),this.isIphone=/iPhone/i.test(navigator.userAgent),this.loaded=!0}if(!t$.isWebGLSupported)throw new ew("WebGL 2 is not supported.");if(0===t$.maxTextureWidth)throw new ew("Unable to detect system capabilities")}},tQ=URL.createObjectURL(new Blob(["(",(function(){function e(e){return"rgb(".concat(e.r,", ").concat(e.g,", ").concat(e.b,")")}function t(e,t){return{r:Math.round(e.r/2+t.r/2),g:Math.round(e.g/2+t.g/2),b:Math.round(e.b/2+t.b/2)}}function n(t,n,i,o,r){var a=t.createLinearGradient(n,0,i,0);return a.addColorStop(0,e(o)),a.addColorStop(1,e(r)),a}function i(e,t,n,i,o,r){r=Math.round(r);for(var a=0,s=0,c=0,u=0,l=e.getImageData(t,n,i,o),h=0;h<o;h+=r)for(var d=0;d<i;d+=r){var v=4*(h*i+d);a+=l.data[v],s+=l.data[v+1],c+=l.data[v+2],u++}return{r:a=Math.round(a/u),g:s=Math.round(s/u),b:c=Math.round(c/u)}}self.onmessage=function(o){var r=o.data.panoData,a=new OffscreenCanvas(r.fullWidth,r.fullHeight),s=a.getContext("2d",{willReadFrequently:!0}),c=new OffscreenCanvas(r.croppedWidth,r.croppedHeight);c.getContext("2d").putImageData(o.data.image,0,0),function(o,r,a){var s=a.fullHeight-a.croppedHeight-a.croppedY,c=a.fullWidth-a.croppedWidth-a.croppedX,u=a.croppedY+a.croppedHeight/2,l=o.width/32,h="blur(".concat(l,"px)"),d=o.getContext("2d");if(d.drawImage(r,a.croppedX,a.croppedY,a.croppedWidth,a.croppedHeight),a.croppedY>0){if(a.croppedX>0||c>0){d.filter="none";var v=i(d,a.croppedX,a.croppedY,10,10,2),p=i(d,o.width-c-11,a.croppedY,10,10,2),f=t(v,p);a.croppedX>0&&(d.fillStyle=n(d,0,a.croppedX,f,v),d.fillRect(-l,-l,a.croppedX+2*l,u+l)),c>0&&(d.fillStyle=n(d,o.width-c,o.width,p,f),d.fillRect(o.width-c-l,-l,c+2*l,u+l))}d.filter=h,d.drawImage(r,0,0,r.width,10,a.croppedX,-l,a.croppedWidth,a.croppedY+2*l),d.fillStyle=e(i(d,0,0,o.width,10,10)),d.fillRect(-l,-l,o.width+2*l,2*l)}if(s>0){if(a.croppedX>0||c>0){d.filter="none";var m=i(d,a.croppedX,o.height-s-1-10,10,10,2),w=i(d,o.width-c-1-10,o.height-s-1-10,10,10,2),y=t(m,w);a.croppedX>0&&(d.fillStyle=n(d,0,a.croppedX,y,m),d.fillRect(-l,u,a.croppedX+2*l,o.height-u+l)),c>0&&(d.fillStyle=n(d,o.width-c,o.width,w,y),d.fillRect(o.width-c-l,u,c+2*l,o.height-u+l))}d.filter=h,d.drawImage(r,0,r.height-10,r.width,10,a.croppedX,o.height-s-l,a.croppedWidth,s+2*l),d.fillStyle=e(i(d,0,o.height-1-10,o.width,10,10)),d.fillRect(-l,o.height-l,o.width+2*l,2*l)}a.croppedX>0&&(d.filter=h,d.drawImage(r,r.width-10,0,10,r.height,-l,a.croppedY,2*l,a.croppedHeight),d.drawImage(r,0,0,10,r.height,0,a.croppedY,a.croppedX+l,a.croppedHeight)),c>0&&(d.filter=h,d.drawImage(r,0,0,10,r.height,o.width-l,a.croppedY,2*l,a.croppedHeight),d.drawImage(r,r.width-10,0,10,r.height,o.width-c-l,a.croppedY,c+l,a.croppedHeight)),d.filter="none",d.drawImage(r,a.croppedX,a.croppedY,a.croppedWidth,a.croppedHeight)}(a,c,r),postMessage(s.getImageData(0,0,a.width,a.height))}}).toString(),")()"],{type:"application/javascript"})),tJ=eN({backgroundColor:"#000",interpolateBackground:!1,resolution:64,useXmpData:!0,blur:!1},{resolution:function(e){if(!e||!k.M8C.isPowerOfTwo(e))throw new ew("EquirectangularAdapter resolution must be power of two");return e}}),t0=function(e){(0,v.Z)(o,e);var t,n,i=_(o);function o(e,t){var n;return(0,h.Z)(this,o),(n=i.call(this,e)).config=tJ(t),n.config.interpolateBackground&&(window.Worker?n.interpolationWorker=new Worker(tQ,{name:"photo-sphere-viewer-interpolation"}):(eE("Web Worker API not available"),n.config.interpolateBackground=!1)),n.SPHERE_SEGMENTS=n.config.resolution,n.SPHERE_HORIZONTAL_SEGMENTS=n.SPHERE_SEGMENTS/2,n}return(0,l.Z)(o,[{key:"supportsTransition",value:function(){return!0}},{key:"supportsPreload",value:function(){return!0}},{key:"destroy",value:function(){var e;null===(e=this.interpolationWorker)||void 0===e||e.terminate(),(0,c.Z)((0,f.Z)(o.prototype),"destroy",this).call(this)}},{key:"textureCoordsToSphericalCoords",value:function(e,t){if(ep(e.textureX)||ep(e.textureY))throw new ew("Texture position is missing 'textureX' or 'textureY'");var n=(e.textureX+t.croppedX)/t.fullWidth*Math.PI*2;return{yaw:n>=Math.PI?n-Math.PI:n+Math.PI,pitch:Math.PI/2-(e.textureY+t.croppedY)/t.fullHeight*Math.PI}}},{key:"sphericalCoordsToTextureCoords",value:function(e,t){var n=e.yaw/Math.PI/2*t.fullWidth,i=e.pitch/Math.PI*t.fullHeight;return{textureX:Math.round(e.yaw<Math.PI?n+t.fullWidth/2:n-t.fullWidth/2)-t.croppedX,textureY:Math.round(t.fullHeight/2-i)-t.croppedY}}},{key:"loadTexture",value:(t=(0,s.Z)(b().mark(function e(t){var n,i,o,r,a,s,c,u,l,h,d,v,p,f,m,w,y,g=this,k=arguments;return b().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(h=!(k.length>1)||void 0===k[1]||k[1],d=k.length>2?k[2]:void 0,v=k.length>3&&void 0!==k[3]?k[3]:this.config.useXmpData,!("string"!=typeof t)){e.next=5;break}return e.abrupt("return",Promise.reject(new ew("Invalid panorama url, are you using the right adapter?")));case 5:return e.next=7,this.viewer.textureLoader.loadFile(t,h?function(e){return g.viewer.loader.setProgress(e)}:null,t);case 7:if(p=e.sent,!v){e.next=14;break}return e.next=11,this.loadXMP(p);case 11:e.t0=e.sent,e.next=15;break;case 14:e.t0=null;case 15:return f=e.t0,e.next=18,this.viewer.textureLoader.blobToImage(p);case 18:return m=e.sent,"function"==typeof d&&(d=d(m,f)),d||f||(d=this.__defaultPanoData(m)),((w={isEquirectangular:!0,fullWidth:ef(null===(n=d)||void 0===n?void 0:n.fullWidth,null==f?void 0:f.fullWidth,m.width),fullHeight:ef(null===(i=d)||void 0===i?void 0:i.fullHeight,null==f?void 0:f.fullHeight,m.height),croppedWidth:ef(null===(o=d)||void 0===o?void 0:o.croppedWidth,null==f?void 0:f.croppedWidth,m.width),croppedHeight:ef(null===(r=d)||void 0===r?void 0:r.croppedHeight,null==f?void 0:f.croppedHeight,m.height),croppedX:ef(null===(a=d)||void 0===a?void 0:a.croppedX,null==f?void 0:f.croppedX,0),croppedY:ef(null===(s=d)||void 0===s?void 0:s.croppedY,null==f?void 0:f.croppedY,0),poseHeading:ef(null===(c=d)||void 0===c?void 0:c.poseHeading,null==f?void 0:f.poseHeading,0),posePitch:ef(null===(u=d)||void 0===u?void 0:u.posePitch,null==f?void 0:f.posePitch,0),poseRoll:ef(null===(l=d)||void 0===l?void 0:l.poseRoll,null==f?void 0:f.poseRoll,0),initialHeading:null==f?void 0:f.initialHeading,initialPitch:null==f?void 0:f.initialPitch,initialFov:null==f?void 0:f.initialFov}).croppedWidth!==m.width||w.croppedHeight!==m.height)&&eE("Invalid panoData, croppedWidth/croppedHeight is not coherent with the loaded image.\n            panoData: ".concat(w.croppedWidth,"x").concat(w.croppedHeight,", image: ").concat(m.width,"x").concat(m.height)),Math.abs(w.fullWidth-2*w.fullHeight)>1&&(eE("Invalid panoData, fullWidth should be twice fullHeight"),w.fullWidth=2*w.fullHeight),w.croppedX+w.croppedWidth>w.fullWidth&&(eE("Invalid panoData, croppedX + croppedWidth > fullWidth"),w.croppedX=w.fullWidth-w.croppedWidth),w.croppedY+w.croppedHeight>w.fullHeight&&(eE("Invalid panoData, croppedY + croppedHeight > fullHeight"),w.croppedY=w.fullHeight-w.croppedHeight),y=this.createEquirectangularTexture(m,w),e.abrupt("return",{panorama:t,texture:y,panoData:w,cacheKey:t});case 28:case"end":return e.stop()}},e,this)})),function(e){return t.apply(this,arguments)})},{key:"loadXMP",value:(n=(0,s.Z)(b().mark(function e(t){var n,i,o,r;return b().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.loadBlobAsString(t);case 2:if(i=(n=e.sent).indexOf("<x:xmpmeta"),o=n.indexOf("</x:xmpmeta>"),r=n.substring(i,o),!(-1!==i&&-1!==o&&r.includes("GPano:"))){e.next=8;break}return e.abrupt("return",{isEquirectangular:!0,fullWidth:e_(r,"FullPanoWidthPixels"),fullHeight:e_(r,"FullPanoHeightPixels"),croppedWidth:e_(r,"CroppedAreaImageWidthPixels"),croppedHeight:e_(r,"CroppedAreaImageHeightPixels"),croppedX:e_(r,"CroppedAreaLeftPixels"),croppedY:e_(r,"CroppedAreaTopPixels"),poseHeading:e_(r,"PoseHeadingDegrees",!1),posePitch:e_(r,"PosePitchDegrees",!1),poseRoll:e_(r,"PoseRollDegrees",!1),initialHeading:e_(r,"InitialViewHeadingDegrees",!1),initialPitch:e_(r,"InitialViewPitchDegrees",!1),initialFov:e_(r,"InitialHorizontalFOVDegrees",!1)});case 8:return e.abrupt("return",null);case 9:case"end":return e.stop()}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"loadBlobAsString",value:function(e){return new Promise(function(t,n){var i=new FileReader;i.onload=function(){return t(i.result)},i.onerror=n,i.readAsText(e)})}},{key:"createEquirectangularTexture",value:function(e,t){var n=this;if(this.config.blur||t.fullWidth>t$.maxTextureWidth||t.croppedWidth!==t.fullWidth||t.croppedHeight!==t.fullHeight){var i=Math.min(1,t$.maxCanvasWidth/t.fullWidth),o={fullWidth:t.fullWidth*i,fullHeight:t.fullHeight*i,croppedWidth:t.croppedWidth*i,croppedHeight:t.croppedHeight*i,croppedX:t.croppedX*i,croppedY:t.croppedY*i},r=document.createElement("canvas");r.width=o.fullWidth,r.height=o.fullHeight;var a=r.getContext("2d");if(this.config.backgroundColor&&(a.fillStyle=this.config.backgroundColor,a.fillRect(0,0,r.width,r.height)),this.config.blur){var s=r.width/2048,c=Math.ceil(2*s);o.croppedWidth===r.width&&(a.drawImage(e,0,0,c/i,e.height,0,o.croppedY,c,o.croppedHeight),a.drawImage(e,e.width-c/i,0,c/i,e.height,r.width-c,o.croppedY,c,o.croppedHeight)),o.croppedHeight===r.height&&(a.drawImage(e,0,0,1,1,o.croppedX,0,o.croppedWidth,c),a.drawImage(e,0,e.height-1,1,1,o.croppedX,r.height-c,o.croppedWidth,c)),a.filter="blur(".concat(s,"px)")}a.drawImage(e,o.croppedX,o.croppedY,o.croppedWidth,o.croppedHeight);var u=eR(r);return this.config.interpolateBackground&&o.fullWidth<=8096&&(t.croppedWidth!==t.fullWidth||t.croppedHeight!==t.fullHeight)&&(this.interpolationWorker.postMessage({image:a.getImageData(o.croppedX,o.croppedY,o.croppedWidth,o.croppedHeight),panoData:o}),this.interpolationWorker.onmessage=function(e){a.putImageData(e.data,0,0),u.needsUpdate=!0,n.viewer.needsUpdate()}),u}return eR(e)}},{key:"createMesh",value:function(){var e=new k.xo$(z,this.SPHERE_SEGMENTS,this.SPHERE_HORIZONTAL_SEGMENTS,-Math.PI/2).scale(-1,1,1);return new k.Kj0(e)}},{key:"setTexture",value:function(e,t,n){var i=new k.vBJ;i.map=t.texture,n&&(i.depthTest=!1,i.depthWrite=!1),e.material=i}},{key:"setTextureOpacity",value:function(e,t){e.material.opacity=t,e.material.transparent=t<1}},{key:"disposeTexture",value:function(e){var t;null===(t=e.texture)||void 0===t||t.dispose()}},{key:"__defaultPanoData",value:function(e){var t=Math.max(e.width,2*e.height),n=Math.round(t/2),i=Math.round((t-e.width)/2),o=Math.round((n-e.height)/2);return{isEquirectangular:!0,fullWidth:t,fullHeight:n,croppedWidth:e.width,croppedHeight:e.height,croppedX:i,croppedY:o}}}]),o}(tq);t0.id="equirectangular",t0.VERSION="5.9.0",t0.supportsDownload=!0;var t1=function(e){(0,v.Z)(i,e);var t,n=_(i);function i(e,t){var o;return(0,h.Z)(this,i),n.call(this,e,{resolution:null!==(o=null==t?void 0:t.resolution)&&void 0!==o?o:64,interpolateBackground:!1,useXmpData:!1})}return(0,l.Z)(i,[{key:"loadTexture",value:(t=(0,s.Z)(b().mark(function e(t,n){var o;return b().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,c.Z)((0,f.Z)(i.prototype),"loadTexture",this).call(this,t,n,null,!1);case 2:return(o=e.sent).panoData=null,e.abrupt("return",o);case 5:case"end":return e.stop()}},e,this)})),function(e,n){return t.apply(this,arguments)})},{key:"createMesh",value:function(){for(var e=new k.xo$(z,this.SPHERE_SEGMENTS,this.SPHERE_HORIZONTAL_SEGMENTS).scale(-1,1,1).toNonIndexed(),t=e.getAttribute("uv"),n=e.getAttribute("normal"),i=0;i<t.count;i++)for(var o=0;o<3;o++){var r=3*i+o,a=n.getX(r),s=n.getY(r),c=n.getZ(r);if(i<t.count/6){var u=0===a&&0===c?1:Math.acos(s)/Math.sqrt(a*a+c*c)*(2/Math.PI);t.setXY(r,.23675*a*u+1/4,.4735*c*u+.5)}else{var l=0===a&&0===c?1:Math.acos(-s)/Math.sqrt(a*a+c*c)*(2/Math.PI);t.setXY(r,-(.23675*a)*l+3/4,.4735*c*l+.5)}}return e.rotateX(-Math.PI/2),e.rotateY(Math.PI),new k.Kj0(e,new k.vBJ)}}]),i}(t0);t1.id="dual-fisheye",t1.VERSION="5.9.0";var t2=function(){function e(t,n){(0,h.Z)(this,e),this.parent=t,this.children=[],this.container=document.createElement("div"),this.state={visible:!0},this.viewer=t instanceof e?t.viewer:t,this.container.className=n.className||"",this.parent.children.push(this),this.parent.container.appendChild(this.container)}return(0,l.Z)(e,[{key:"destroy",value:function(){this.parent.container.removeChild(this.container);var e=this.parent.children.indexOf(this);-1!==e&&this.parent.children.splice(e,1),this.children.slice().forEach(function(e){return e.destroy()}),this.children.length=0}},{key:"toggle",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!this.isVisible();e?this.show():this.hide()}},{key:"hide",value:function(e){this.container.style.display="none",this.state.visible=!1}},{key:"show",value:function(e){this.container.style.display="",this.state.visible=!0}},{key:"isVisible",value:function(){return this.state.visible}}]),e}(),t3=eN({id:null,className:null,title:null,hoverScale:!1,collapsable:!1,tabbable:!0,icon:null,iconActive:null}),t5=function(e){(0,v.Z)(n,e);var t=_(n);function n(e,i){var o;return(0,h.Z)(this,n),(o=t.call(this,e,{className:"psv-button ".concat(i.hoverScale?"psv-button--hover-scale":""," ").concat(i.className||"")})).state={visible:!0,enabled:!0,supported:!0,collapsed:!1,active:!1,width:0},o.config=t3(i),o.config.id=o.constructor.id,i.icon&&o.__setIcon(i.icon),o.state.width=o.container.offsetWidth,o.config.title?o.container.title=o.config.title:o.id&&o.id in o.viewer.config.lang&&(o.container.title=o.viewer.config.lang[o.id]),i.tabbable&&(o.container.tabIndex=0),o.container.addEventListener("click",function(e){o.state.enabled&&o.onClick(),e.stopPropagation()}),o.container.addEventListener("keydown",function(e){e.key===j.Enter&&o.state.enabled&&(o.onClick(),e.stopPropagation())}),o}return(0,l.Z)(n,[{key:"id",get:function(){return this.config.id}},{key:"title",get:function(){return this.container.title}},{key:"content",get:function(){return this.container.innerHTML}},{key:"width",get:function(){return this.state.width}},{key:"collapsable",get:function(){return this.config.collapsable}},{key:"show",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];!this.isVisible()&&(this.state.visible=!0,this.state.collapsed||(this.container.style.display=""),e&&this.viewer.navbar.autoSize())}},{key:"hide",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];this.isVisible()&&(this.state.visible=!1,this.container.style.display="none",e&&this.viewer.navbar.autoSize())}},{key:"checkSupported",value:function(){var e=this;ey(this.isSupported(),function(t,n){e.state&&(e.state.supported=t,n?t||e.hide():e.toggle(t))})}},{key:"autoSize",value:function(){}},{key:"isSupported",value:function(){return!0}},{key:"toggleActive",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!this.state.active;e!==this.state.active&&(this.state.active=e,$(this.container,"psv-button--active",this.state.active),this.config.iconActive&&this.__setIcon(this.state.active?this.config.iconActive:this.config.icon))}},{key:"disable",value:function(){this.container.classList.add("psv-button--disabled"),this.state.enabled=!1}},{key:"enable",value:function(){this.container.classList.remove("psv-button--disabled"),this.state.enabled=!0}},{key:"collapse",value:function(){this.state.collapsed=!0,this.container.style.display="none"}},{key:"uncollapse",value:function(){this.state.collapsed=!1,this.state.visible&&(this.container.style.display="")}},{key:"__setIcon",value:function(e){this.container.innerHTML=e,Q(this.container.querySelector("svg"),"psv-button-svg")}}]),n}(t2),t4=function(e){(0,v.Z)(n,e);var t=_(n);function n(e,i){var o,r,a;return(0,h.Z)(this,n),(o=t.call(this,e,{className:"psv-custom-button ".concat(i.className||""),hoverScale:!1,collapsable:!1!==i.collapsable,tabbable:!1!==i.tabbable,title:i.title})).customOnClick=i.onClick,i.id?o.config.id=i.id:o.config.id="psvButton-"+Math.random().toString(36).substring(2),i.content&&("string"==typeof i.content?o.container.innerHTML=i.content:(o.container.classList.add("psv-custom-button--no-padding"),i.content.style.height="100%",null===(r=(a=i.content).attachViewer)||void 0===r||r.call(a,o.viewer),o.container.appendChild(i.content))),o.state.width=o.container.offsetWidth,i.disabled&&o.disable(),!1===i.visible&&o.hide(),o}return(0,l.Z)(n,[{key:"onClick",value:function(){var e;null===(e=this.customOnClick)||void 0===e||e.call(this,this.viewer)}}]),n}(t5),t8=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,e,{className:"psv-description-button",hoverScale:!0,collapsable:!1,tabbable:!0,icon:F.info})).mode=0,i.viewer.addEventListener(tn.type,(0,d.Z)(i)),i.viewer.addEventListener(tx.type,(0,d.Z)(i)),i.viewer.addEventListener(ta.type,(0,d.Z)(i)),i.viewer.addEventListener(tI.type,(0,d.Z)(i)),i.viewer.addEventListener(e8.type,(0,d.Z)(i)),i}return(0,l.Z)(n,[{key:"destroy",value:function(){this.viewer.removeEventListener(tn.type,this),this.viewer.removeEventListener(tx.type,this),this.viewer.removeEventListener(ta.type,this),this.viewer.removeEventListener(tI.type,this),this.viewer.removeEventListener(e8.type,this),(0,c.Z)((0,f.Z)(n.prototype),"destroy",this).call(this)}},{key:"handleEvent",value:function(e){if(e instanceof e8){e.containsOptions("description")&&this.autoSize(!0);return}if(this.mode){var t=!1;e instanceof tn?t=1===this.mode:e instanceof tx?t=1===this.mode&&e.notificationId!==N.DESCRIPTION:e instanceof ta?t=2===this.mode:e instanceof tI&&(t=2===this.mode&&e.panelId!==N.DESCRIPTION),t&&(this.toggleActive(!1),this.mode=0)}}},{key:"onClick",value:function(){this.mode?this.__close():this.__open()}},{key:"hide",value:function(e){(0,c.Z)((0,f.Z)(n.prototype),"hide",this).call(this,e),this.mode&&this.__close()}},{key:"autoSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e){var t=this.viewer.navbar.getButton("caption",!1),n=t&&!t.isVisible(),i=!!this.viewer.config.description;n||i?this.show(!1):this.hide(!1)}}},{key:"__close",value:function(){switch(this.mode){case 1:this.viewer.notification.hide(N.DESCRIPTION);break;case 2:this.viewer.panel.hide(N.DESCRIPTION)}}},{key:"__open",value:function(){this.toggleActive(!0),this.viewer.config.description?(this.mode=2,this.viewer.panel.show({id:N.DESCRIPTION,content:(this.viewer.config.caption?"<p>".concat(this.viewer.config.caption,"</p>"):"")+this.viewer.config.description})):(this.mode=1,this.viewer.notification.show({id:N.DESCRIPTION,content:this.viewer.config.caption}))}}]),n}(t5);t8.id="description";var t7=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,e,{className:"psv-download-button",hoverScale:!0,collapsable:!0,tabbable:!0,icon:F.download})).viewer.addEventListener(e8.type,(0,d.Z)(i)),i}return(0,l.Z)(n,[{key:"destroy",value:function(){this.viewer.removeEventListener(e8.type,this),(0,c.Z)((0,f.Z)(n.prototype),"destroy",this).call(this)}},{key:"handleEvent",value:function(e){e instanceof e8&&e.containsOptions("downloadUrl")&&this.checkSupported()}},{key:"onClick",value:function(){var e=this,t=document.createElement("a");t.href=this.viewer.config.downloadUrl||this.viewer.config.panorama,t.href.startsWith("data:")&&!this.viewer.config.downloadName?t.download="panorama."+t.href.substring(0,t.href.indexOf(";")).split("/").pop():t.download=this.viewer.config.downloadName||t.href.split("/").pop(),t.target="_blank",this.viewer.container.appendChild(t),t.click(),setTimeout(function(){e.viewer.container.removeChild(t)},100)}},{key:"checkSupported",value:function(){this.viewer.adapter.constructor.supportsDownload||this.viewer.config.downloadUrl?this.show():this.hide()}}]),n}(t5);t7.id="download";var t6=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,e,{className:"psv-fullscreen-button",hoverScale:!0,collapsable:!1,tabbable:!0,icon:F.fullscreenIn,iconActive:F.fullscreenOut})).viewer.addEventListener(te.type,(0,d.Z)(i)),i}return(0,l.Z)(n,[{key:"destroy",value:function(){this.viewer.removeEventListener(te.type,this),(0,c.Z)((0,f.Z)(n.prototype),"destroy",this).call(this)}},{key:"handleEvent",value:function(e){e instanceof te&&this.toggleActive(e.fullscreenEnabled)}},{key:"onClick",value:function(){this.viewer.toggleFullscreen()}}]),n}(t5);t6.id="fullscreen";var t9=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i,o;return(0,h.Z)(this,n),(o=t.call(this,e,{className:"psv-menu-button",hoverScale:!0,collapsable:!1,tabbable:!0,icon:F.menu})).viewer.addEventListener(tI.type,(0,d.Z)(o)),o.viewer.addEventListener(ta.type,(0,d.Z)(o)),(0,c.Z)((i=(0,d.Z)(o),(0,f.Z)(n.prototype)),"hide",i).call(i),o}return(0,l.Z)(n,[{key:"destroy",value:function(){this.viewer.removeEventListener(tI.type,this),this.viewer.removeEventListener(ta.type,this),(0,c.Z)((0,f.Z)(n.prototype),"destroy",this).call(this)}},{key:"handleEvent",value:function(e){e instanceof tI?this.toggleActive(e.panelId===N.MENU):e instanceof ta&&this.toggleActive(!1)}},{key:"onClick",value:function(){this.state.active?this.__hideMenu():this.__showMenu()}},{key:"hide",value:function(e){(0,c.Z)((0,f.Z)(n.prototype),"hide",this).call(this,e),this.__hideMenu()}},{key:"show",value:function(e){(0,c.Z)((0,f.Z)(n.prototype),"show",this).call(this,e),this.state.active&&this.__showMenu()}},{key:"__showMenu",value:function(){var e,t,n=this;this.viewer.panel.show({id:N.MENU,content:(e=this.viewer.navbar.collapsed,t=this.viewer.config.lang.menu,'\n<div class="psv-panel-menu psv-panel-menu--stripped">\n  <h1 class="psv-panel-menu-title">'.concat(F.menu," ").concat(t,'</h1>\n  <ul class="psv-panel-menu-list">\n    ').concat(e.map(function(e){return'\n    <li data-psv-button="'.concat(e.id,'" class="psv-panel-menu-item" tabindex="0">\n      <span class="psv-panel-menu-item-icon">').concat(e.content,'</span>\n      <span class="psv-panel-menu-item-label">').concat(e.title,"</span>\n    </li>\n    ")}).join(""),"\n  </ul>\n</div>\n")),noMargin:!0,clickHandler:function(e){var t=e?et(e,"li"):void 0,i=t?t.dataset.psvButton:void 0;i&&(n.viewer.navbar.getButton(i).onClick(),n.__hideMenu())}})}},{key:"__hideMenu",value:function(){this.viewer.panel.hide(N.MENU)}}]),n}(t5);t9.id="menu";var ne=function(e){(0,v.Z)(n,e);var t=_(n);function n(e,i){var o;return(0,h.Z)(this,n),(o=t.call(this,e,{className:"psv-move-button",hoverScale:!0,collapsable:!1,tabbable:!0,icon:function(e){var t=0;switch(e){case 0:t=90;break;case 1:t=-90;break;case 3:t=180;break;default:t=0}return F.arrow.replace("rotate(0","rotate(".concat(t))}(i)})).direction=i,o.handler=new eX,o.container.addEventListener("mousedown",(0,d.Z)(o)),o.container.addEventListener("keydown",(0,d.Z)(o)),o.container.addEventListener("keyup",(0,d.Z)(o)),o.viewer.container.addEventListener("mouseup",(0,d.Z)(o)),o.viewer.container.addEventListener("touchend",(0,d.Z)(o)),o}return(0,l.Z)(n,[{key:"destroy",value:function(){this.__onMouseUp(),this.viewer.container.removeEventListener("mouseup",this),this.viewer.container.removeEventListener("touchend",this),(0,c.Z)((0,f.Z)(n.prototype),"destroy",this).call(this)}},{key:"handleEvent",value:function(e){switch(e.type){case"mousedown":this.__onMouseDown();break;case"mouseup":case"touchend":this.__onMouseUp();break;case"keydown":e.key===j.Enter&&this.__onMouseDown();break;case"keyup":e.key===j.Enter&&this.__onMouseUp()}}},{key:"onClick",value:function(){}},{key:"isSupported",value:function(){return eg(t$.isTouchEnabled)}},{key:"__onMouseDown",value:function(){if(this.state.enabled){var e={};switch(this.direction){case 0:e.pitch=!1;break;case 1:e.pitch=!0;break;case 3:e.yaw=!1;break;default:e.yaw=!0}this.viewer.stopAll(),this.viewer.dynamics.position.roll(e),this.handler.down()}}},{key:"__onMouseUp",value:function(){var e=this;this.state.enabled&&this.handler.up(function(){e.viewer.dynamics.position.stop(),e.viewer.resetIdleTimer()})}}]),n}(t5);ne.groupId="move";var nt=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){return(0,h.Z)(this,n),t.call(this,e,1)}return(0,l.Z)(n)}(ne);nt.id="moveDown";var nn=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){return(0,h.Z)(this,n),t.call(this,e,2)}return(0,l.Z)(n)}(ne);nn.id="moveLeft";var ni=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){return(0,h.Z)(this,n),t.call(this,e,3)}return(0,l.Z)(n)}(ne);ni.id="moveRight";var no=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){return(0,h.Z)(this,n),t.call(this,e,0)}return(0,l.Z)(n)}(ne);no.id="moveUp";var nr=function(e){(0,v.Z)(n,e);var t=_(n);function n(e,i,o){var r;return(0,h.Z)(this,n),(r=t.call(this,e,{className:"psv-zoom-button",hoverScale:!0,collapsable:!1,tabbable:!0,icon:i})).direction=o,r.handler=new eX,r.container.addEventListener("mousedown",(0,d.Z)(r)),r.container.addEventListener("keydown",(0,d.Z)(r)),r.container.addEventListener("keyup",(0,d.Z)(r)),r.viewer.container.addEventListener("mouseup",(0,d.Z)(r)),r.viewer.container.addEventListener("touchend",(0,d.Z)(r)),r}return(0,l.Z)(n,[{key:"destroy",value:function(){this.__onMouseUp(),this.viewer.container.removeEventListener("mouseup",this),this.viewer.container.removeEventListener("touchend",this),(0,c.Z)((0,f.Z)(n.prototype),"destroy",this).call(this)}},{key:"handleEvent",value:function(e){switch(e.type){case"mousedown":this.__onMouseDown();break;case"mouseup":case"touchend":this.__onMouseUp();break;case"keydown":e.key===j.Enter&&this.__onMouseDown();break;case"keyup":e.key===j.Enter&&this.__onMouseUp()}}},{key:"onClick",value:function(){}},{key:"isSupported",value:function(){return eg(t$.isTouchEnabled)}},{key:"__onMouseDown",value:function(){this.state.enabled&&(this.viewer.dynamics.zoom.roll(1===this.direction),this.handler.down())}},{key:"__onMouseUp",value:function(){var e=this;this.state.enabled&&this.handler.up(function(){return e.viewer.dynamics.zoom.stop()})}}]),n}(t5);nr.groupId="zoom";var na=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){return(0,h.Z)(this,n),t.call(this,e,F.zoomIn,0)}return(0,l.Z)(n)}(nr);na.id="zoomIn";var ns=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){return(0,h.Z)(this,n),t.call(this,e,F.zoomOut,1)}return(0,l.Z)(n)}(nr);ns.id="zoomOut";var nc=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,e,{className:"psv-zoom-range",hoverScale:!1,collapsable:!1,tabbable:!1})).zoomRange=document.createElement("div"),i.zoomRange.className="psv-zoom-range-line",i.container.appendChild(i.zoomRange),i.zoomValue=document.createElement("div"),i.zoomValue.className="psv-zoom-range-handle",i.zoomRange.appendChild(i.zoomValue),i.slider=new eB(i.container,"HORIZONTAL",function(e){return i.__onSliderUpdate(e)}),i.mediaMinWidth=parseInt(ei(i.container,"max-width"),10),i.viewer.addEventListener(tj.type,(0,d.Z)(i)),i.viewer.state.ready?i.__moveZoomValue(i.viewer.getZoomLevel()):i.viewer.addEventListener(t_.type,(0,d.Z)(i)),i}return(0,l.Z)(n,[{key:"destroy",value:function(){this.slider.destroy(),this.viewer.removeEventListener(tj.type,this),this.viewer.removeEventListener(t_.type,this),(0,c.Z)((0,f.Z)(n.prototype),"destroy",this).call(this)}},{key:"handleEvent",value:function(e){e instanceof tj?this.__moveZoomValue(e.zoomLevel):e instanceof t_&&this.__moveZoomValue(this.viewer.getZoomLevel())}},{key:"onClick",value:function(){}},{key:"isSupported",value:function(){return eg(t$.isTouchEnabled)}},{key:"autoSize",value:function(){this.state.supported&&(this.viewer.state.size.width<=this.mediaMinWidth&&this.state.visible?this.hide(!1):this.viewer.state.size.width>this.mediaMinWidth&&!this.state.visible&&this.show(!1))}},{key:"__moveZoomValue",value:function(e){this.zoomValue.style.left=e/100*this.zoomRange.offsetWidth-this.zoomValue.offsetWidth/2+"px"}},{key:"__onSliderUpdate",value:function(e){e.mousedown&&this.viewer.zoom(100*e.value)}}]),n}(t5);nc.id="zoomRange",nc.groupId="zoom";var nu=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this)).viewer=e,i}return(0,l.Z)(n,[{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),n}(eK);function nl(e){if(e)for(var t=0,n=[["_",e]].concat((0,w.Z)(Object.entries(e)));t<n.length;t++){var i=(0,y.Z)(n[t],2)[1];if(i.prototype instanceof nu)return eF(i.id,i.VERSION,"5.9.0"),i}return null}(function(e){(0,v.Z)(n,e);var t=_(n);function n(e,i){var o;return(0,h.Z)(this,n),(o=t.call(this,e)).config=o.constructor.configParser(i),o}return(0,l.Z)(n,[{key:"setOption",value:function(e,t){this.setOptions((0,u.Z)({},e,t))}},{key:"setOptions",value:function(e){for(var t=Z(Z({},this.config),e),n=this.constructor,i=n.configParser,o=n.readonlyOptions,r=n.id,a=0,s=Object.entries(e);a<s.length;a++){var c=(0,y.Z)(s[a],2),u=c[0],l=c[1];if(!(u in i.defaults)){eE("".concat(r,': Unknown option "').concat(u,'"'));continue}if(o.includes(u)){eE("".concat(r,': Option "').concat(u,'" cannot be updated'));continue}u in i.parsers&&(l=i.parsers[u](l,{rawConfig:t,defValue:i.defaults[u]})),this.config[u]=l}}}]),n})(nu).readonlyOptions=[];var nh={panorama:null,container:null,adapter:[t0,null],plugins:[],caption:null,description:null,downloadUrl:null,downloadName:null,loadingImg:null,loadingTxt:"",size:null,fisheye:0,minFov:30,maxFov:90,defaultZoomLvl:50,defaultYaw:0,defaultPitch:0,sphereCorrection:null,moveSpeed:1,zoomSpeed:1,moveInertia:!0,mousewheel:!0,mousemove:!0,mousewheelCtrlKey:!1,touchmoveTwoFingers:!1,panoData:null,requestHeaders:null,rendererParameters:{alpha:!0,antialias:!0},withCredentials:!1,navbar:["zoom","move","download","description","caption","fullscreen"],lang:{zoom:"Zoom",zoomOut:"Zoom out",zoomIn:"Zoom in",moveUp:"Move up",moveDown:"Move down",moveLeft:"Move left",moveRight:"Move right",description:"Description",download:"Download",fullscreen:"Fullscreen",loading:"Loading...",menu:"Menu",close:"Close",twoFingers:"Use two fingers to navigate",ctrlZoom:"Use ctrl + scroll to zoom the image",loadError:"The panorama cannot be loaded",webglError:"Your browser does not seem to support WebGL"},keyboard:"fullscreen",keyboardActions:(r={},(0,u.Z)(r,j.ArrowUp,"ROTATE_UP"),(0,u.Z)(r,j.ArrowDown,"ROTATE_DOWN"),(0,u.Z)(r,j.ArrowRight,"ROTATE_RIGHT"),(0,u.Z)(r,j.ArrowLeft,"ROTATE_LEFT"),(0,u.Z)(r,j.PageUp,"ZOOM_IN"),(0,u.Z)(r,j.PageDown,"ZOOM_OUT"),(0,u.Z)(r,j.Plus,"ZOOM_IN"),(0,u.Z)(r,j.Minus,"ZOOM_OUT"),r)},nd={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"},nv={container:function(e){if(!e)throw new ew("No value given for container.");return e},adapter:function(e,t){var n=t.defValue;if(!(e=e?Array.isArray(e)?[tK(e[0]),e[1]]:[tK(e),null]:n)[0])throw new ew("An undefined value was given for adapter.");if(!e[0].id)throw new ew("Adapter has no id.");return"little-planet"===e[0].id&&(eE("LittlePlanetAdapter support has been removed, use `{ fisheye: 2, maxFov: 130 }` to achieve similar effect."),e=n),e},defaultYaw:function(e){return ez(e)},defaultPitch:function(e){return ez(e,!0)},defaultZoomLvl:function(e){return k.M8C.clamp(e,0,100)},minFov:function(e,t){var n=t.rawConfig;return n.maxFov<e&&(eE("maxFov cannot be lower than minFov"),e=n.maxFov),k.M8C.clamp(e,1,179)},maxFov:function(e,t){var n=t.rawConfig;return e<n.minFov&&(e=n.minFov),k.M8C.clamp(e,1,179)},lang:function(e){return Z(Z({},nh.lang),e)},keyboard:function(e){return!!e&&("object"==typeof e?(eE("Use keyboardActions to configure the keyboard actions, keyboard option must be either true, false, 'fullscreen' or 'always'"),"fullscreen"):"always"===e?"always":"fullscreen")},keyboardActions:function(e,t){var n=t.rawConfig;return n.keyboard&&"object"==typeof n.keyboard?n.keyboard:e},fisheye:function(e){return!0===e?1:!1===e?0:e},requestHeaders:function(e){return e&&"object"==typeof e?function(){return e}:"function"==typeof e?e:null},rendererParameters:function(e,t){var n=t.defValue;return Z(Z({},e),n)},plugins:function(e){return e.map(function(e,t){if(!(e=Array.isArray(e)?[nl(e[0]),e[1]]:[nl(e),null])[0])throw new ew("An undefined value was given for plugin ".concat(t,"."));if(!e[0].id)throw new ew("Plugin ".concat(t," has no id."));return e})},navbar:function(e){return!1===e?null:!0===e?ed(nh.navbar):"string"==typeof e?e.split(/[ ,]/):e}},np=eN(nh,nv),nf=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,e,{className:"psv-caption",hoverScale:!1,collapsable:!1,tabbable:!0})).contentWidth=0,i.state.width=0,i.contentElt=document.createElement("div"),i.contentElt.className="psv-caption-content",i.container.appendChild(i.contentElt),i.setCaption(i.viewer.config.caption),i}return(0,l.Z)(n,[{key:"hide",value:function(){this.contentElt.style.display="none",this.state.visible=!1}},{key:"show",value:function(){this.contentElt.style.display="",this.state.visible=!0}},{key:"onClick",value:function(){}},{key:"setCaption",value:function(e){this.show(),this.contentElt.innerHTML=null!=e?e:"",this.contentElt.innerHTML?this.contentWidth=this.contentElt.offsetWidth:this.contentWidth=0,this.autoSize()}},{key:"autoSize",value:function(){this.toggle(this.container.offsetWidth>=this.contentWidth),this.__refreshButton()}},{key:"__refreshButton",value:function(){var e;null===(e=this.viewer.navbar.getButton(t8.id,!1))||void 0===e||e.autoSize(!0)}}]),n}(t5);nf.id="caption";var nm={},nw={};[ns,nc,na,t8,nf,t7,t6,nn,ni,no,nt].forEach(function(e){return function(e,t){if(!e.id)throw new ew("Button id is required");nm[e.id]=e,e.groupId&&(nw[e.groupId]=nw[e.groupId]||[]).push(e)}(e)});var ny=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,e,{className:"psv-navbar ".concat(A)})).collapsed=[],i.state.visible=!1,i}return(0,l.Z)(n,[{key:"show",value:function(){this.viewer.container.classList.add("psv--has-navbar"),this.container.classList.add("psv-navbar--open"),this.state.visible=!0}},{key:"hide",value:function(){this.viewer.container.classList.remove("psv--has-navbar"),this.container.classList.remove("psv-navbar--open"),this.state.visible=!1}},{key:"setButtons",value:function(e){var t=this;this.children.slice().forEach(function(e){return e.destroy()}),this.children.length=0,-1!==e.indexOf(nf.id)&&-1===e.indexOf(t8.id)&&e.splice(e.indexOf(nf.id),0,t8.id),e.forEach(function(e){"object"==typeof e?new t4(t,e):nm[e]?new nm[e](t):nw[e]?nw[e].forEach(function(e){new e(t)}):eE("Unknown button ".concat(e))}),new t9(this),this.children.forEach(function(e){e instanceof t5&&e.checkSupported()}),this.autoSize()}},{key:"setCaption",value:function(e){this.children.some(function(t){return t instanceof nf&&(t.setCaption(e),!0)})}},{key:"getButton",value:function(e){var t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=this.children.find(function(t){return t instanceof t5&&t.id===e});return!n&&t&&eE('button "'.concat(e,'" not found in the navbar')),n}},{key:"autoSize",value:function(){this.children.forEach(function(e){e instanceof t5&&e.autoSize()});var e,t=this.container.offsetWidth,n=0,i=[];this.children.forEach(function(e){e.isVisible()&&e instanceof t5&&(n+=e.width,e.collapsable&&i.push(e))}),0!==n&&(t<n&&i.length>0?(i.forEach(function(e){return e.collapse()}),this.collapsed=i,this.getButton(t9.id).show(!1)):t>=n&&this.collapsed.length>0&&(this.collapsed.forEach(function(e){return e.uncollapse()}),this.collapsed=[],this.getButton(t9.id).hide(!1)),null===(e=this.getButton(nf.id,!1))||void 0===e||e.autoSize())}}]),n}(t2);k.CtF.enabled=!1;var ng={enabled:!0,items:{},purgeInterval:null,init:function(){var e=this;k.CtF.enabled&&(eE("ThreeJS cache should be disabled"),k.CtF.enabled=!1),!this.purgeInterval&&this.enabled&&(this.purgeInterval=setInterval(function(){return e.purge()},6e4))},add:function(e,t,n){if(this.enabled&&t){var i;this.items[t]=null!==(i=this.items[t])&&void 0!==i?i:{files:{},lastAccess:null},this.items[t].files[e]=n,this.items[t].lastAccess=Date.now()}},get:function(e,t){if(this.enabled&&t&&this.items[t])return this.items[t].lastAccess=Date.now(),this.items[t].files[e]},remove:function(e,t){this.enabled&&t&&this.items[t]&&(delete this.items[t].files[e],0===Object.keys(this.items[t].files).length&&delete this.items[t])}},nb=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,e,{className:"psv-loader-container"})).loader=document.createElement("div"),i.loader.className="psv-loader",i.container.appendChild(i.loader),i.size=i.loader.offsetWidth,i.canvas=document.createElementNS("http://www.w3.org/2000/svg","svg"),i.canvas.setAttribute("class","psv-loader-canvas"),i.canvas.setAttribute("viewBox","0 0 ".concat(i.size," ").concat(i.size)),i.loader.appendChild(i.canvas),i.textColor=ei(i.loader,"color"),i.color=ei(i.canvas,"color"),i.border=parseInt(ei(i.loader,"--psv-loader-border"),10),i.thickness=parseInt(ei(i.loader,"--psv-loader-tickness"),10),i.viewer.addEventListener(e8.type,(0,d.Z)(i)),i.__updateContent(),i.hide(),i}return(0,l.Z)(n,[{key:"destroy",value:function(){this.viewer.removeEventListener(e8.type,this),(0,c.Z)((0,f.Z)(n.prototype),"destroy",this).call(this)}},{key:"handleEvent",value:function(e){e instanceof e8&&e.containsOptions("loadingImg","loadingTxt")&&this.__updateContent()}},{key:"setProgress",value:function(e){var t=Math.min(e,99.999)/100*Math.PI*2,n=this.size/2,i=this.thickness/2+this.border,o=(this.size-this.thickness)/2-this.border,r=Math.sin(t)*o+n,a=-Math.cos(t)*o+n;this.canvas.innerHTML='\n            <circle cx="'.concat(n,'" cy="').concat(n,'" r="').concat(n,'" fill="').concat(this.color,'"/>\n            <path d="M ').concat(n," ").concat(i," A ").concat(o," ").concat(o," 0 ").concat(e>50?"1":"0"," 1 ").concat(r," ").concat(a,'" \n                  fill="none" stroke="').concat(this.textColor,'" stroke-width="').concat(this.thickness,'" stroke-linecap="round"/>\n        '),this.viewer.dispatchEvent(new td(Math.round(e)))}},{key:"__updateContent",value:function(){var e,t=this.loader.querySelector(".psv-loader-image, .psv-loader-text");if(t&&this.loader.removeChild(t),this.viewer.config.loadingImg?((e=document.createElement("img")).className="psv-loader-image",e.src=this.viewer.config.loadingImg):null!==this.viewer.config.loadingTxt&&((e=document.createElement("div")).className="psv-loader-text",e.innerHTML=this.viewer.config.loadingTxt||this.viewer.config.lang.loading),e){var n=Math.round(Math.sqrt(2*Math.pow(this.size/2-this.thickness/2-this.border,2)));e.style.maxWidth=n+"px",e.style.maxHeight=n+"px",this.loader.appendChild(e)}}}]),n}(t2),nk=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,e,{className:"psv-notification"})).state={visible:!1,contentId:null,timeout:null},i.content=document.createElement("div"),i.content.className="psv-notification-content",i.container.appendChild(i.content),i.content.addEventListener("click",function(){return i.hide()}),i}return(0,l.Z)(n,[{key:"isVisible",value:function(e){return this.state.visible&&(!e||!this.state.contentId||this.state.contentId===e)}},{key:"toggle",value:function(){throw new ew("Notification cannot be toggled")}},{key:"show",value:function(e){var t=this;this.state.timeout&&(clearTimeout(this.state.timeout),this.state.timeout=null),"string"==typeof e&&(e={content:e}),this.state.contentId=e.id||null,this.content.innerHTML=e.content,this.container.classList.add("psv-notification--visible"),this.state.visible=!0,this.viewer.dispatchEvent(new tx(e.id)),e.timeout&&(this.state.timeout=setTimeout(function(){return t.hide(t.state.contentId)},e.timeout))}},{key:"hide",value:function(e){if(this.isVisible(e)){var t=this.state.contentId;this.container.classList.remove("psv-notification--visible"),this.state.visible=!1,this.state.contentId=null,this.viewer.dispatchEvent(new tn(t))}}}]),n}(t2),nE=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i,o;return(0,h.Z)(this,n),(o=t.call(this,e,{className:"psv-overlay ".concat(A)})).state={visible:!1,contentId:null,dissmisable:!0},o.image=document.createElement("div"),o.image.className="psv-overlay-image",o.container.appendChild(o.image),o.title=document.createElement("div"),o.title.className="psv-overlay-title",o.container.appendChild(o.title),o.text=document.createElement("div"),o.text.className="psv-overlay-text",o.container.appendChild(o.text),o.container.addEventListener("click",(0,d.Z)(o)),o.viewer.addEventListener(tl.type,(0,d.Z)(o)),(0,c.Z)((i=(0,d.Z)(o),(0,f.Z)(n.prototype)),"hide",i).call(i),o}return(0,l.Z)(n,[{key:"destroy",value:function(){this.viewer.removeEventListener(tl.type,this),(0,c.Z)((0,f.Z)(n.prototype),"destroy",this).call(this)}},{key:"handleEvent",value:function(e){"click"===e.type?this.isVisible()&&this.state.dissmisable&&(this.hide(),e.stopPropagation()):e instanceof tl&&this.isVisible()&&this.state.dissmisable&&e.key===j.Escape&&(this.hide(),e.preventDefault())}},{key:"isVisible",value:function(e){return this.state.visible&&(!e||!this.state.contentId||this.state.contentId===e)}},{key:"toggle",value:function(){throw new ew("Overlay cannot be toggled")}},{key:"show",value:function(e){"string"==typeof e&&(e={title:e}),this.state.contentId=e.id||null,this.state.dissmisable=!1!==e.dissmisable,this.image.innerHTML=e.image||"",this.title.innerHTML=e.title||"",this.text.innerHTML=e.text||"",(0,c.Z)((0,f.Z)(n.prototype),"show",this).call(this),this.viewer.dispatchEvent(new tO(e.id))}},{key:"hide",value:function(e){if(this.isVisible(e)){var t=this.state.contentId;(0,c.Z)((0,f.Z)(n.prototype),"hide",this).call(this),this.state.contentId=null,this.viewer.dispatchEvent(new to(t))}}}]),n}(t2),nZ="psv-panel-content--no-interaction",n_=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){(0,h.Z)(this,n),(i=t.call(this,e,{className:"psv-panel ".concat(A)})).state={visible:!1,contentId:null,mouseX:0,mouseY:0,mousedown:!1,clickHandler:null,keyHandler:null,width:{}};var i,o=document.createElement("div");o.className="psv-panel-resizer",i.container.appendChild(o);var r=document.createElement("div");return r.className="psv-panel-close-button",r.innerHTML=F.close,r.title=e.config.lang.close,i.container.appendChild(r),i.content=document.createElement("div"),i.content.className="psv-panel-content",i.container.appendChild(i.content),i.container.addEventListener("wheel",function(e){return e.stopPropagation()}),r.addEventListener("click",function(){return i.hide()}),o.addEventListener("mousedown",(0,d.Z)(i)),o.addEventListener("touchstart",(0,d.Z)(i)),i.viewer.container.addEventListener("mouseup",(0,d.Z)(i)),i.viewer.container.addEventListener("touchend",(0,d.Z)(i)),i.viewer.container.addEventListener("mousemove",(0,d.Z)(i)),i.viewer.container.addEventListener("touchmove",(0,d.Z)(i)),i.viewer.addEventListener(tl.type,(0,d.Z)(i)),i}return(0,l.Z)(n,[{key:"destroy",value:function(){this.viewer.removeEventListener(tl.type,this),this.viewer.container.removeEventListener("mousemove",this),this.viewer.container.removeEventListener("touchmove",this),this.viewer.container.removeEventListener("mouseup",this),this.viewer.container.removeEventListener("touchend",this),(0,c.Z)((0,f.Z)(n.prototype),"destroy",this).call(this)}},{key:"handleEvent",value:function(e){switch(e.type){case"mousedown":this.__onMouseDown(e);break;case"touchstart":this.__onTouchStart(e);break;case"mousemove":this.__onMouseMove(e);break;case"touchmove":this.__onTouchMove(e);break;case"mouseup":this.__onMouseUp(e);break;case"touchend":this.__onTouchEnd(e);break;case tl.type:this.__onKeyPress(e)}}},{key:"isVisible",value:function(e){return this.state.visible&&(!e||!this.state.contentId||this.state.contentId===e)}},{key:"toggle",value:function(){throw new ew("Panel cannot be toggled")}},{key:"show",value:function(e){var t=this;"string"==typeof e&&(e={content:e});var n=this.isVisible(e.id);this.state.contentId=e.id||null,this.state.visible=!0,this.state.clickHandler&&(this.content.removeEventListener("click",this.state.clickHandler),this.content.removeEventListener("keydown",this.state.keyHandler),this.state.clickHandler=null,this.state.keyHandler=null),e.id&&this.state.width[e.id]?this.container.style.width=this.state.width[e.id]:e.width?this.container.style.width=e.width:this.container.style.width=null,this.content.innerHTML=e.content,this.content.scrollTop=0,this.container.classList.add("psv-panel--open"),$(this.content,"psv-panel-content--no-margin",!0===e.noMargin),e.clickHandler&&(this.state.clickHandler=function(t){e.clickHandler(t.target)},this.state.keyHandler=function(t){t.key===j.Enter&&e.clickHandler(t.target)},this.content.addEventListener("click",this.state.clickHandler),this.content.addEventListener("keydown",this.state.keyHandler),n||setTimeout(function(){var e;null===(e=t.content.querySelector("a,button,[tabindex]"))||void 0===e||e.focus()},300)),this.viewer.dispatchEvent(new tI(e.id))}},{key:"hide",value:function(e){if(this.isVisible(e)){var t=this.state.contentId;this.state.visible=!1,this.state.contentId=null,this.content.innerHTML=null,this.container.classList.remove("psv-panel--open"),this.state.clickHandler&&(this.content.removeEventListener("click",this.state.clickHandler),this.state.clickHandler=null),this.viewer.dispatchEvent(new ta(t))}}},{key:"__onMouseDown",value:function(e){e.stopPropagation(),this.__startResize(e.clientX,e.clientY)}},{key:"__onTouchStart",value:function(e){if(e.stopPropagation(),1===e.touches.length){var t=e.touches[0];this.__startResize(t.clientX,t.clientY)}}},{key:"__onMouseUp",value:function(e){this.state.mousedown&&(e.stopPropagation(),this.state.mousedown=!1,this.content.classList.remove(nZ))}},{key:"__onTouchEnd",value:function(e){this.state.mousedown&&(e.stopPropagation(),0===e.touches.length&&(this.state.mousedown=!1,this.content.classList.remove(nZ)))}},{key:"__onMouseMove",value:function(e){this.state.mousedown&&(e.stopPropagation(),this.__resize(e.clientX,e.clientY))}},{key:"__onTouchMove",value:function(e){if(this.state.mousedown){var t=e.touches[0];this.__resize(t.clientX,t.clientY)}}},{key:"__onKeyPress",value:function(e){this.isVisible()&&e.key===j.Escape&&(this.hide(),e.preventDefault())}},{key:"__startResize",value:function(e,t){this.state.mouseX=e,this.state.mouseY=t,this.state.mousedown=!0,this.content.classList.add(nZ)}},{key:"__resize",value:function(e,t){var n=Math.max(200,this.container.offsetWidth-(e-this.state.mouseX))+"px";this.state.contentId&&(this.state.width[this.state.contentId]=n),this.container.style.width=n,this.state.mouseX=e,this.state.mouseY=t}}]),n}(t2),nT=function(e){(0,v.Z)(n,e);var t=_(n);function n(e,i){var o;return(0,h.Z)(this,n),(o=t.call(this,e,{className:"psv-tooltip"})).state={visible:!0,arrow:0,border:0,state:0,width:0,height:0,pos:"",config:null,data:null,hideTimeout:null},o.content=document.createElement("div"),o.content.className="psv-tooltip-content",o.container.appendChild(o.content),o.arrow=document.createElement("div"),o.arrow.className="psv-tooltip-arrow",o.container.appendChild(o.arrow),o.container.addEventListener("transitionend",(0,d.Z)(o)),o.container.addEventListener("touchdown",function(e){return e.stopPropagation()}),o.container.addEventListener("mousedown",function(e){return e.stopPropagation()}),o.container.style.top="-1000px",o.container.style.left="-1000px",o.show(i),o}return(0,l.Z)(n,[{key:"handleEvent",value:function(e){"transitionend"===e.type&&this.__onTransitionEnd(e)}},{key:"destroy",value:function(){clearTimeout(this.state.hideTimeout),delete this.state.data,(0,c.Z)((0,f.Z)(n.prototype),"destroy",this).call(this)}},{key:"toggle",value:function(){throw new ew("Tooltip cannot be toggled")}},{key:"show",value:function(e){if(0!==this.state.state)throw new ew("Initialized tooltip cannot be re-initialized");e.className&&Q(this.container,e.className),e.style&&Object.assign(this.container.style,e.style),this.state.state=3,this.update(e.content,e),this.state.data=e.data,this.state.state=1,this.viewer.dispatchEvent(new tH(this,this.state.data)),this.__waitImages()}},{key:"update",value:function(e,t){this.content.innerHTML=e;var n=this.container.getBoundingClientRect();this.state.width=n.right-n.left,this.state.height=n.bottom-n.top,this.state.arrow=parseInt(ei(this.arrow,"border-top-width"),10),this.state.border=parseInt(ei(this.container,"border-top-left-radius"),10),this.move(null!=t?t:this.state.config),this.__waitImages()}},{key:"move",value:function(e){if(1!==this.state.state&&3!==this.state.state)throw new ew("Uninitialized tooltip cannot be moved");e.box=null!==(t=null!==(n=e.box)&&void 0!==n?n:null===(i=this.state.config)||void 0===i?void 0:i.box)&&void 0!==t?t:{width:0,height:0},this.state.config=e;var t,n,i,o=this.container,r=this.arrow,a={posClass:eP(e.position,{allowCenter:!1,cssOrder:!1})||["top","center"],width:this.state.width,height:this.state.height,top:0,left:0,arrowTop:0,arrowLeft:0};this.__computeTooltipPosition(a,e);var s=null,c=null;if(a.top<0?s="bottom":a.top+a.height>this.viewer.state.size.height&&(s="top"),a.left<0?c="right":a.left+a.width>this.viewer.state.size.width&&(c="left"),c||s){var u=eI(a.posClass);s&&(a.posClass[u?0:1]=s),c&&(a.posClass[u?1:0]=c),this.__computeTooltipPosition(a,e)}o.style.top=a.top+"px",o.style.left=a.left+"px",r.style.top=a.arrowTop+"px",r.style.left=a.arrowLeft+"px";var l=a.posClass.join("-");l!==this.state.pos&&(o.classList.remove("psv-tooltip--".concat(this.state.pos)),this.state.pos=l,o.classList.add("psv-tooltip--".concat(this.state.pos)))}},{key:"hide",value:function(){var e=this;this.container.classList.remove("psv-tooltip--visible"),this.state.state=2,this.viewer.dispatchEvent(new tc(this.state.data));var t=parseFloat(ei(this.container,"transition-duration"));this.state.hideTimeout=setTimeout(function(){e.destroy()},2*t)}},{key:"__onTransitionEnd",value:function(e){if("transform"===e.propertyName)switch(this.state.state){case 1:this.container.classList.add("psv-tooltip--visible"),this.state.state=3;break;case 2:this.state.state=0,this.destroy()}}},{key:"__computeTooltipPosition",value:function(e,t){var n=this.state.arrow,i=t.top,o=e.height,r=t.left,a=e.width,s=n+this.state.border,c=t.box.width/2+2*n,u=t.box.height/2+2*n;switch(e.posClass.join("-")){case"top-left":e.top=i-u-o,e.left=r+s-a,e.arrowTop=o,e.arrowLeft=a-s-n;break;case"top-center":e.top=i-u-o,e.left=r-a/2,e.arrowTop=o,e.arrowLeft=a/2-n;break;case"top-right":e.top=i-u-o,e.left=r-s,e.arrowTop=o,e.arrowLeft=n;break;case"bottom-left":e.top=i+u,e.left=r+s-a,e.arrowTop=-(2*n),e.arrowLeft=a-s-n;break;case"bottom-center":e.top=i+u,e.left=r-a/2,e.arrowTop=-(2*n),e.arrowLeft=a/2-n;break;case"bottom-right":e.top=i+u,e.left=r-s,e.arrowTop=-(2*n),e.arrowLeft=n;break;case"left-top":e.top=i+s-o,e.left=r-c-a,e.arrowTop=o-s-n,e.arrowLeft=a;break;case"center-left":e.top=i-o/2,e.left=r-c-a,e.arrowTop=o/2-n,e.arrowLeft=a;break;case"left-bottom":e.top=i-s,e.left=r-c-a,e.arrowTop=n,e.arrowLeft=a;break;case"right-top":e.top=i+s-o,e.left=r+c,e.arrowTop=o-s-n,e.arrowLeft=-(2*n);break;case"center-right":e.top=i-o/2,e.left=r+c,e.arrowTop=o/2-n,e.arrowLeft=-(2*n);break;case"right-bottom":e.top=i-s,e.left=r+c,e.arrowTop=n,e.arrowLeft=-(2*n)}}},{key:"__waitImages",value:function(){var e=this,t=this.content.querySelectorAll("img");if(t.length>0){var n=[];t.forEach(function(e){e.complete||n.push(new Promise(function(t){e.onload=t,e.onerror=t}))}),n.length&&Promise.all(n).then(function(){if(1===e.state.state||3===e.state.state){var t=e.container.getBoundingClientRect();e.state.width=t.right-t.left,e.state.height=t.bottom-t.top,e.move(e.state.config)}})}}}]),n}(t2),nM=function(){function e(t){(0,h.Z)(this,e),this.viewer=t,this.config=t.config,this.state=t.state}return(0,l.Z)(e,[{key:"destroy",value:function(){}}]),e}(),nC=new k.Pa4,nx=new k.USm(0,0,0,"ZXY"),nL=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){return(0,h.Z)(this,n),t.call(this,e)}return(0,l.Z)(n,[{key:"fovToZoomLevel",value:function(e){var t=Math.round((e-this.config.minFov)/(this.config.maxFov-this.config.minFov)*100);return k.M8C.clamp(t-2*(t-50),0,100)}},{key:"zoomLevelToFov",value:function(e){return this.config.maxFov+e/100*(this.config.minFov-this.config.maxFov)}},{key:"vFovToHFov",value:function(e){return k.M8C.radToDeg(2*Math.atan(Math.tan(k.M8C.degToRad(e)/2)*this.state.aspect))}},{key:"hFovToVFov",value:function(e){return k.M8C.radToDeg(2*Math.atan(Math.tan(k.M8C.degToRad(e)/2)/this.state.aspect))}},{key:"getAnimationProperties",value:function(e,t,n){var i=!ep(t),o=!ep(n),r={},a=null;if(i){var s=this.viewer.getPosition(),c=B(s.yaw,t.yaw);r.yaw={start:s.yaw,end:s.yaw+c},r.pitch={start:s.pitch,end:t.pitch},a=eH(e,q(s,t))}if(o){var u=this.viewer.getZoomLevel(),l=Math.abs(n-u);r.zoom={start:u,end:n},null===a&&(a=eH(e,Math.PI/4*l/100))}return{duration:a=null===a?"number"==typeof e?e:x:Math.max(x,a),properties:r}}},{key:"textureCoordsToSphericalCoords",value:function(e){if(!(null!==(t=this.state.textureData)&&void 0!==t&&t.panoData))throw new ew("Current adapter does not support texture coordinates or no texture has been loaded");var t,n=this.viewer.adapter.textureCoordsToSphericalCoords(e,this.state.textureData.panoData);return nx.equals(this.viewer.renderer.panoramaPose)&&nx.equals(this.viewer.renderer.sphereCorrection)?n:(this.sphericalCoordsToVector3(n,nC),nC.applyEuler(this.viewer.renderer.panoramaPose),nC.applyEuler(this.viewer.renderer.sphereCorrection),this.vector3ToSphericalCoords(nC))}},{key:"sphericalCoordsToTextureCoords",value:function(e){var t;if(!(null!==(t=this.state.textureData)&&void 0!==t&&t.panoData))throw new ew("Current adapter does not support texture coordinates or no texture has been loaded");return nx.equals(this.viewer.renderer.panoramaPose)&&nx.equals(this.viewer.renderer.sphereCorrection)||(this.sphericalCoordsToVector3(e,nC),eD(nC,this.viewer.renderer.sphereCorrection),eD(nC,this.viewer.renderer.panoramaPose),e=this.vector3ToSphericalCoords(nC)),this.viewer.adapter.sphericalCoordsToTextureCoords(e,this.state.textureData.panoData)}},{key:"sphericalCoordsToVector3",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:z;return t||(t=new k.Pa4),t.x=-(n*Math.cos(e.pitch))*Math.sin(e.yaw),t.y=n*Math.sin(e.pitch),t.z=n*Math.cos(e.pitch)*Math.cos(e.yaw),t}},{key:"vector3ToSphericalCoords",value:function(e){var t=Math.acos(e.y/Math.sqrt(e.x*e.x+e.y*e.y+e.z*e.z)),n=Math.atan2(e.x,e.z);return{yaw:n<0?-n:2*Math.PI-n,pitch:Math.PI/2-t}}},{key:"viewerCoordsToVector3",value:function(e){var t=this.viewer.renderer.getIntersections(e).filter(function(e){return e.object.userData[R]});return t.length?t[0].point:null}},{key:"viewerCoordsToSphericalCoords",value:function(e){var t=this.viewerCoordsToVector3(e);return t?this.vector3ToSphericalCoords(t):null}},{key:"vector3ToViewerCoords",value:function(e){var t=e.clone();return t.project(this.viewer.renderer.camera),{x:Math.round((t.x+1)/2*this.state.size.width),y:Math.round((1-t.y)/2*this.state.size.height)}}},{key:"sphericalCoordsToViewerCoords",value:function(e){return this.sphericalCoordsToVector3(e,nC),this.vector3ToViewerCoords(nC)}},{key:"isPointVisible",value:function(e){var t,n;if(e instanceof k.Pa4)t=e,n=this.vector3ToViewerCoords(e);else{if(!eZ(e))return!1;t=this.sphericalCoordsToVector3(e,nC),n=this.vector3ToViewerCoords(t)}return t.dot(this.viewer.state.direction)>0&&n.x>=0&&n.x<=this.viewer.state.size.width&&n.y>=0&&n.y<=this.viewer.state.size.height}},{key:"cleanPosition",value:function(e){if(!("yaw"in e)&&!("pitch"in e))return this.textureCoordsToSphericalCoords(e);if(!("yaw"in e)||!("pitch"in e))throw new ew("Position is missing 'yaw' or 'pitch'");return{yaw:ez(e.yaw),pitch:ez(e.pitch,!0)}}},{key:"cleanSphereCorrection",value:function(e){return{pan:ez((null==e?void 0:e.pan)||0),tilt:ez((null==e?void 0:e.tilt)||0,!0),roll:ez((null==e?void 0:e.roll)||0,!0,!1)}}},{key:"cleanPanoramaPose",value:function(e){return{pan:k.M8C.degToRad((null==e?void 0:e.poseHeading)||0),tilt:k.M8C.degToRad((null==e?void 0:e.posePitch)||0),roll:k.M8C.degToRad((null==e?void 0:e.poseRoll)||0)}}},{key:"cleanPanoramaOptions",value:function(e,t){return null!=t&&t.isEquirectangular&&(ep(e.zoom)&&!ep(t.initialFov)&&(e=Z(Z({},e),{},{zoom:this.fovToZoomLevel(this.hFovToVFov(t.initialFov))})),!ep(e.position)||ep(t.initialHeading)||ep(t.initialPitch)||(e=Z(Z({},e),{},{position:{yaw:ez(t.initialHeading),pitch:ez(t.initialPitch,!0)}}))),e}}]),n}(nM),nO=function(){function e(){(0,h.Z)(this,e),this.$=e.IDLE}return(0,l.Z)(e,[{key:"is",value:function(){for(var e=this,t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];return n.some(function(t){return e.$&t})}},{key:"set",value:function(e){this.$=e}},{key:"add",value:function(e){this.$|=e}},{key:"remove",value:function(e){this.$&=~e}}]),e}();nO.IDLE=0,nO.CLICK=1,nO.MOVING=2,nO.INERTIA=4;var nP=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,e)).data={startMouseX:0,startMouseY:0,mouseX:0,mouseY:0,mouseHistory:[],pinchDist:0,ctrlKeyDown:!1,dblclickData:null,dblclickTimeout:null,longtouchTimeout:null,twofingersTimeout:null,ctrlZoomTimeout:null},i.step=new nO,i.keyHandler=new eX,i.resizeObserver=new ResizeObserver(eu(function(){return i.viewer.autoSize()},50)),i.moveThreshold=L*t$.pixelRatio,i}return(0,l.Z)(n,[{key:"init",value:function(){window.addEventListener("keydown",this,{passive:!1}),window.addEventListener("keyup",this),this.viewer.container.addEventListener("mousedown",this),window.addEventListener("mousemove",this,{passive:!1}),window.addEventListener("mouseup",this),this.viewer.container.addEventListener("touchstart",this,{passive:!1}),window.addEventListener("touchmove",this,{passive:!1}),window.addEventListener("touchend",this,{passive:!1}),this.viewer.container.addEventListener("wheel",this,{passive:!1}),document.addEventListener("fullscreenchange",this),this.resizeObserver.observe(this.viewer.container)}},{key:"destroy",value:function(){window.removeEventListener("keydown",this),window.removeEventListener("keyup",this),this.viewer.container.removeEventListener("mousedown",this),window.removeEventListener("mousemove",this),window.removeEventListener("mouseup",this),this.viewer.container.removeEventListener("touchstart",this),window.removeEventListener("touchmove",this),window.removeEventListener("touchend",this),this.viewer.container.removeEventListener("wheel",this),document.removeEventListener("fullscreenchange",this),this.resizeObserver.disconnect(),clearTimeout(this.data.dblclickTimeout),clearTimeout(this.data.longtouchTimeout),clearTimeout(this.data.twofingersTimeout),clearTimeout(this.data.ctrlZoomTimeout),(0,c.Z)((0,f.Z)(n.prototype),"destroy",this).call(this)}},{key:"handleEvent",value:function(e){switch(e.type){case"keydown":this.__onKeyDown(e);break;case"keyup":this.__onKeyUp();break;case"mousemove":this.__onMouseMove(e);break;case"mouseup":this.__onMouseUp(e);break;case"touchmove":this.__onTouchMove(e);break;case"touchend":this.__onTouchEnd(e);break;case"fullscreenchange":this.__onFullscreenChange()}if(!et(e.target,"."+A))switch(e.type){case"mousedown":this.__onMouseDown(e);break;case"touchstart":this.__onTouchStart(e);break;case"wheel":this.__onMouseWheel(e)}}},{key:"__onKeyDown",value:function(e){if(this.config.mousewheelCtrlKey&&(this.data.ctrlKeyDown=e.key===j.Control,this.data.ctrlKeyDown&&(clearTimeout(this.data.ctrlZoomTimeout),this.viewer.overlay.hide(N.CTRL_ZOOM))),this.viewer.dispatchEvent(new tl(e.key))&&this.state.keyboardEnabled){var t,n=null===(t=this.config.keyboardActions)||void 0===t?void 0:t[e.key];if("function"==typeof n)n(this.viewer),e.preventDefault();else if(n&&!this.keyHandler.pending){switch("ZOOM_IN"!==n&&"ZOOM_OUT"!==n&&this.viewer.stopAll(),n){case"ROTATE_UP":this.viewer.dynamics.position.roll({pitch:!1});break;case"ROTATE_DOWN":this.viewer.dynamics.position.roll({pitch:!0});break;case"ROTATE_RIGHT":this.viewer.dynamics.position.roll({yaw:!1});break;case"ROTATE_LEFT":this.viewer.dynamics.position.roll({yaw:!0});break;case"ZOOM_IN":this.viewer.dynamics.zoom.roll(!1);break;case"ZOOM_OUT":this.viewer.dynamics.zoom.roll(!0)}this.keyHandler.down(),e.preventDefault()}}}},{key:"__onKeyUp",value:function(){var e=this;this.data.ctrlKeyDown=!1,this.state.keyboardEnabled&&this.keyHandler.up(function(){e.viewer.dynamics.position.stop(),e.viewer.dynamics.zoom.stop(),e.viewer.resetIdleTimer()})}},{key:"__onMouseDown",value:function(e){this.step.add(nO.CLICK),this.data.startMouseX=e.clientX,this.data.startMouseY=e.clientY}},{key:"__onMouseUp",value:function(e){this.step.is(nO.CLICK,nO.MOVING)&&this.__stopMove(e.clientX,e.clientY,e.target,2===e.button)}},{key:"__onMouseMove",value:function(e){this.config.mousemove&&this.step.is(nO.CLICK,nO.MOVING)&&(e.preventDefault(),this.__doMove(e.clientX,e.clientY)),this.__handleObjectsEvents(e)}},{key:"__onTouchStart",value:function(e){var t=this;1===e.touches.length?(this.step.add(nO.CLICK),this.data.startMouseX=e.touches[0].clientX,this.data.startMouseY=e.touches[0].clientY,this.data.longtouchTimeout||(this.data.longtouchTimeout=setTimeout(function(){var n=e.touches[0];t.__stopMove(n.clientX,n.clientY,n.target,!0),t.data.longtouchTimeout=null},P))):2===e.touches.length&&(this.step.set(nO.IDLE),this.__cancelLongTouch(),this.config.mousemove&&(this.__cancelTwoFingersOverlay(),this.__startMoveZoom(e),e.preventDefault()))}},{key:"__onTouchEnd",value:function(e){if(this.__cancelLongTouch(),this.step.is(nO.CLICK,nO.MOVING)){if(e.preventDefault(),this.__cancelTwoFingersOverlay(),1===e.touches.length)this.__stopMove(this.data.mouseX,this.data.mouseY);else if(0===e.touches.length){var t=e.changedTouches[0];this.__stopMove(t.clientX,t.clientY,t.target)}}}},{key:"__onTouchMove",value:function(e){var t=this;if(this.__cancelLongTouch(),this.config.mousemove){if(1===e.touches.length){if(this.config.touchmoveTwoFingers)this.step.is(nO.CLICK)&&!this.data.twofingersTimeout&&(this.data.twofingersTimeout=setTimeout(function(){t.viewer.overlay.show({id:N.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"/><!--Created by AomAm from the Noun Project--></svg>\n',title:t.config.lang.twoFingers})},I));else if(this.step.is(nO.CLICK,nO.MOVING)){e.preventDefault();var n=e.touches[0];this.__doMove(n.clientX,n.clientY)}}else this.__doMoveZoom(e),this.__cancelTwoFingersOverlay()}}},{key:"__cancelLongTouch",value:function(){this.data.longtouchTimeout&&(clearTimeout(this.data.longtouchTimeout),this.data.longtouchTimeout=null)}},{key:"__cancelTwoFingersOverlay",value:function(){this.config.touchmoveTwoFingers&&(this.data.twofingersTimeout&&(clearTimeout(this.data.twofingersTimeout),this.data.twofingersTimeout=null),this.viewer.overlay.hide(N.TWO_FINGERS))}},{key:"__onMouseWheel",value:function(e){var t=this;if(this.config.mousewheel&&e.deltaY){if(this.config.mousewheelCtrlKey&&!this.data.ctrlKeyDown){this.viewer.overlay.show({id:N.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"/><!-- Created by Icon Island from the Noun Project --></svg>\n',title:this.config.lang.ctrlZoom}),clearTimeout(this.data.ctrlZoomTimeout),this.data.ctrlZoomTimeout=setTimeout(function(){return t.viewer.overlay.hide(N.CTRL_ZOOM)},S);return}e.preventDefault(),e.stopPropagation();var n=e.deltaY/Math.abs(e.deltaY)*5*this.config.zoomSpeed;0!==n&&this.viewer.dynamics.zoom.step(-n,5)}}},{key:"__onFullscreenChange",value:function(){var e=this.viewer.isFullscreenEnabled();"fullscreen"===this.config.keyboard&&(e?this.viewer.startKeyboardControl():this.viewer.stopKeyboardControl()),this.viewer.dispatchEvent(new te(e))}},{key:"__resetMove",value:function(){this.step.set(nO.IDLE),this.data.mouseX=0,this.data.mouseY=0,this.data.startMouseX=0,this.data.startMouseY=0,this.data.mouseHistory.length=0}},{key:"__startMoveZoom",value:function(e){this.viewer.stopAll(),this.__resetMove();var t=eo(e);this.step.set(nO.MOVING),this.data.pinchDist=t.distance;var n=t.center;this.data.mouseX=n.x,this.data.mouseY=n.y,this.__logMouseMove(this.data.mouseX,this.data.mouseY)}},{key:"__stopMove",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.step.is(nO.MOVING)?this.config.moveInertia?(this.__logMouseMove(e,t),this.__stopMoveInertia(e,t)):(this.__resetMove(),this.viewer.resetIdleTimer()):(this.step.is(nO.CLICK)&&!this.__moveThresholdReached(e,t)&&this.__doClick(e,t,n,i),this.step.remove(nO.CLICK),this.step.is(nO.INERTIA)||(this.__resetMove(),this.viewer.resetIdleTimer()))}},{key:"__stopMoveInertia",value:function(e,t){var n=this,i=new k.gti(this.data.mouseHistory.map(function(e){var t=(0,y.Z)(e,3),n=t[1],i=t[2];return new k.FM8(n,i)})).getTangent(1),o=this.data.mouseHistory.reduce(function(e,t){var n=e.total,i=e.prev;return{total:i?n+X({x:i[1],y:i[2]},{x:t[1],y:t[2]})/(t[0]-i[0]):0,prev:t}},{total:0,prev:null}).total/this.data.mouseHistory.length;if(!o){this.__resetMove(),this.viewer.resetIdleTimer();return}this.step.set(nO.INERTIA);var r=e,a=t;this.state.animation=new eV({properties:{speed:{start:o,end:0}},duration:1e3,easing:"outQuad",onTick:function(e){r+=e.speed*i.x*3*t$.pixelRatio,a+=e.speed*i.y*3*t$.pixelRatio,n.__applyMove(r,a)}}),this.state.animation.then(function(e){n.state.animation=null,e&&(n.__resetMove(),n.viewer.resetIdleTimer())})}},{key:"__doClick",value:function(e,t,n){var i=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=this.viewer.container.getBoundingClientRect(),a=e-r.left,s=t-r.top,c=this.viewer.renderer.getIntersections({x:a,y:s}),u=c.find(function(e){return e.object.userData[R]});if(u){var l=this.viewer.dataHelper.vector3ToSphericalCoords(u.point),h={rightclick:o,target:n,clientX:e,clientY:t,viewerX:a,viewerY:s,yaw:l.yaw,pitch:l.pitch,objects:c.map(function(e){return e.object}).filter(function(e){return!e.userData[R]})};try{var d=this.viewer.dataHelper.sphericalCoordsToTextureCoords(h);Object.assign(h,d)}catch(e){}this.data.dblclickTimeout?(Math.abs(this.data.dblclickData.clientX-h.clientX)<this.moveThreshold&&Math.abs(this.data.dblclickData.clientY-h.clientY)<this.moveThreshold&&this.viewer.dispatchEvent(new e6(this.data.dblclickData)),clearTimeout(this.data.dblclickTimeout),this.data.dblclickTimeout=null,this.data.dblclickData=null):(this.viewer.dispatchEvent(new e5(h)),this.data.dblclickData=ed(h),this.data.dblclickTimeout=setTimeout(function(){i.data.dblclickTimeout=null,i.data.dblclickData=null},O))}}},{key:"__handleObjectsEvents",value:function(e){var t=this;if(!ev(this.state.objectsObservers)&&ee(e.target,this.viewer.container))for(var n=en(this.viewer.container),i={x:e.clientX-n.x,y:e.clientY-n.y},o=this.viewer.renderer.getIntersections(i),r=function(n,o,r){t.viewer.dispatchEvent(new r(e,n,i,o))},a=0,s=Object.entries(this.state.objectsObservers);a<s.length;a++)!function(){var e=(0,y.Z)(s[a],2),n=e[0],i=e[1],c=o.find(function(e){return e.object.userData[n]});c?(i&&c.object!==i&&(r(i,n,tX),t.state.objectsObservers[n]=null),i?r(c.object,n,tB):(t.state.objectsObservers[n]=c.object,r(c.object,n,tW))):i&&(r(i,n,tX),t.state.objectsObservers[n]=null)}()}},{key:"__doMove",value:function(e,t){this.step.is(nO.CLICK)&&this.__moveThresholdReached(e,t)?(this.viewer.stopAll(),this.__resetMove(),this.step.set(nO.MOVING),this.data.mouseX=e,this.data.mouseY=t,this.__logMouseMove(e,t)):this.step.is(nO.MOVING)&&(this.__applyMove(e,t),this.__logMouseMove(e,t))}},{key:"__moveThresholdReached",value:function(e,t){return Math.abs(e-this.data.startMouseX)>=this.moveThreshold||Math.abs(t-this.data.startMouseY)>=this.moveThreshold}},{key:"__applyMove",value:function(e,t){var n=(e-this.data.mouseX)*Math.cos(this.state.roll)-(t-this.data.mouseY)*Math.sin(this.state.roll),i=(t-this.data.mouseY)*Math.cos(this.state.roll)+(e-this.data.mouseX)*Math.sin(this.state.roll),o={yaw:this.config.moveSpeed*(n/this.state.size.width)*k.M8C.degToRad(this.state.hFov),pitch:this.config.moveSpeed*(i/this.state.size.height)*k.M8C.degToRad(this.state.vFov)},r=this.viewer.getPosition();this.viewer.rotate({yaw:r.yaw-o.yaw,pitch:r.pitch+o.pitch}),this.data.mouseX=e,this.data.mouseY=t}},{key:"__doMoveZoom",value:function(e){if(this.step.is(nO.MOVING)){e.preventDefault();var t=eo(e),n=(t.distance-this.data.pinchDist)/t$.pixelRatio*this.config.zoomSpeed;this.viewer.zoom(this.viewer.getZoomLevel()+n),this.__doMove(t.center.x,t.center.y),this.data.pinchDist=t.distance}}},{key:"__logMouseMove",value:function(e,t){var n=Date.now(),i=this.data.mouseHistory.length?this.data.mouseHistory[this.data.mouseHistory.length-1]:[0,-1,-1];i[1]===e&&i[2]===t?i[0]=n:n===i[0]?(i[1]=e,i[2]=t):this.data.mouseHistory.push([n,e,t]);for(var o=null,r=0;r<this.data.mouseHistory.length;)this.data.mouseHistory[r][0]<n-H?this.data.mouseHistory.splice(r,1):o&&this.data.mouseHistory[r][0]-o>H/10?(this.data.mouseHistory.splice(0,r),r=0,o=this.data.mouseHistory[r][0]):(o=this.data.mouseHistory[r][0],r++)}}]),n}(nM);k.epp.enabled=!1;var nI=new k.FM8,nS=new k.yGw,nH=new k.ZzF,nz=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,e)).frustumNeedsUpdate=!0,i.renderer=new k.CP7(i.config.rendererParameters),i.renderer.setPixelRatio(t$.pixelRatio),i.renderer.outputColorSpace=k.GUF,i.renderer.domElement.className="psv-canvas",i.scene=new k.xsS,i.camera=new k.cPb(50,16/9,.1,2*z),i.camera.matrixAutoUpdate=!1,i.mesh=i.viewer.adapter.createMesh(),i.mesh.userData=(0,u.Z)({},R,!0),i.meshContainer=new k.ZAu,i.meshContainer.add(i.mesh),i.scene.add(i.meshContainer),i.raycaster=new k.iMs,i.frustum=new k.iWj,i.container=document.createElement("div"),i.container.className="psv-canvas-container",i.container.appendChild(i.renderer.domElement),i.viewer.container.appendChild(i.container),i.viewer.addEventListener(tR.type,(0,d.Z)(i)),i.viewer.addEventListener(tj.type,(0,d.Z)(i)),i.viewer.addEventListener(tb.type,(0,d.Z)(i)),i.viewer.addEventListener(tE.type,(0,d.Z)(i)),i.viewer.addEventListener(e8.type,(0,d.Z)(i)),i.hide(),i}return(0,l.Z)(n,[{key:"panoramaPose",get:function(){return this.mesh.rotation}},{key:"sphereCorrection",get:function(){return this.meshContainer.rotation}},{key:"init",value:function(){var e=this;this.show(),this.renderer.setAnimationLoop(function(t){return e.__renderLoop(t)})}},{key:"destroy",value:function(){this.renderer.setAnimationLoop(null),this.cleanScene(this.scene),this.viewer.container.removeChild(this.container),this.viewer.removeEventListener(tR.type,this),this.viewer.removeEventListener(tj.type,this),this.viewer.removeEventListener(tb.type,this),this.viewer.removeEventListener(tE.type,this),this.viewer.removeEventListener(e8.type,this),(0,c.Z)((0,f.Z)(n.prototype),"destroy",this).call(this)}},{key:"handleEvent",value:function(e){switch(e.type){case tR.type:this.__onSizeUpdated();break;case tj.type:this.__onZoomUpdated();break;case tb.type:case tE.type:this.__onPositionUpdated();break;case e8.type:e.containsOptions("fisheye")&&this.__onPositionUpdated()}}},{key:"hide",value:function(){this.container.style.opacity="0"}},{key:"show",value:function(){this.container.style.opacity="1"}},{key:"setCustomRenderer",value:function(e){e?this.customRenderer=e(this.renderer):this.customRenderer=null,this.viewer.needsUpdate()}},{key:"__onSizeUpdated",value:function(){this.renderer.setSize(this.state.size.width,this.state.size.height),this.camera.aspect=this.state.aspect,this.camera.updateProjectionMatrix(),this.viewer.needsUpdate(),this.frustumNeedsUpdate=!0}},{key:"__onZoomUpdated",value:function(){this.camera.fov=this.state.vFov,this.camera.updateProjectionMatrix(),this.viewer.needsUpdate(),this.frustumNeedsUpdate=!0}},{key:"__onPositionUpdated",value:function(){this.camera.position.set(0,0,0),this.camera.lookAt(this.state.direction),this.config.fisheye&&this.camera.position.copy(this.state.direction).multiplyScalar(this.config.fisheye/2).negate(),this.camera.rotateZ(-this.state.roll),this.camera.updateMatrix(),this.camera.updateMatrixWorld(),this.viewer.needsUpdate(),this.frustumNeedsUpdate=!0}},{key:"__renderLoop",value:function(e){var t=this.timestamp?e-this.timestamp:0;this.timestamp=e,this.viewer.dispatchEvent(new e0(e,t)),this.viewer.dynamics.update(t),(this.state.needsUpdate||this.state.continuousUpdateCount>0)&&(this.state.needsUpdate=!1,(this.customRenderer||this.renderer).render(this.scene,this.camera),this.viewer.dispatchEvent(new tM))}},{key:"setTexture",value:function(e){this.state.textureData&&this.viewer.adapter.disposeTexture(this.state.textureData),this.state.textureData=e,this.viewer.adapter.setTexture(this.mesh,e),this.viewer.needsUpdate()}},{key:"setPanoramaPose",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.mesh,n=this.viewer.dataHelper.cleanPanoramaPose(e);t.rotation.set(-n.tilt,-n.pan,-n.roll,"ZXY")}},{key:"setSphereCorrection",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.meshContainer,n=this.viewer.dataHelper.cleanSphereCorrection(e);t.rotation.set(n.tilt,n.pan,n.roll,"ZXY")}},{key:"transition",value:function(e,t){var n=this,i=!ep(t.position),o=!ep(t.zoom),r=new eQ(i?this.viewer.dataHelper.cleanPosition(t.position):void 0,t.zoom);this.viewer.dispatchEvent(r);var a=new k.ZAu,s=this.viewer.adapter.createMesh();if(this.viewer.adapter.setTexture(s,e,!0),this.viewer.adapter.setTextureOpacity(s,0),this.setPanoramaPose(e.panoData,s),this.setSphereCorrection(t.sphereCorrection,a),i&&"fade-only"===t.transition){var c=this.viewer.getPosition(),u=new k.Pa4(0,1,0);a.rotateOnWorldAxis(u,r.position.yaw-c.yaw);var l=new k.Pa4(0,1,0).cross(this.camera.getWorldDirection(new k.Pa4)).normalize();a.rotateOnWorldAxis(l,r.position.pitch-c.pitch)}a.add(s),this.scene.add(a),this.renderer.setRenderTarget(new k.dd2),this.renderer.render(this.scene,this.camera),this.renderer.setRenderTarget(null);var h=this.viewer.dataHelper.getAnimationProperties(t.speed,!0===t.transition?r.position:null,r.zoomLevel),d=h.duration,v=new eV({properties:Z(Z({},h.properties),{},{opacity:{start:0,end:1}}),duration:d,easing:"inOutCubic",onTick:function(e){n.viewer.adapter.setTextureOpacity(s,e.opacity),i&&!0===t.transition&&n.viewer.dynamics.position.setValue({yaw:e.yaw,pitch:e.pitch}),o&&n.viewer.dynamics.zoom.setValue(e.zoom),n.viewer.needsUpdate()}});return v.then(function(o){o?(n.setTexture(e),n.viewer.adapter.setTextureOpacity(n.mesh,1),n.setPanoramaPose(e.panoData),n.setSphereCorrection(t.sphereCorrection),i&&"fade-only"===t.transition&&n.viewer.rotate(t.position)):n.viewer.adapter.disposeTexture(e),n.scene.remove(a),s.geometry.dispose(),s.geometry=null}),v}},{key:"getIntersections",value:function(e){nI.x=2*e.x/this.state.size.width-1,nI.y=-2*e.y/this.state.size.height+1,this.raycaster.setFromCamera(nI,this.camera);var t,n=this.raycaster.intersectObjects(this.scene.children,!0).filter(function(e){return e.object.visible}).filter(function(e){return e.object.isMesh&&!!e.object.userData});return null!==(t=this.customRenderer)&&void 0!==t&&t.getIntersections&&n.push.apply(n,(0,w.Z)(this.customRenderer.getIntersections(this.raycaster,nI))),n}},{key:"isObjectVisible",value:function(e){return!!e&&((this.frustumNeedsUpdate&&(nS.multiplyMatrices(this.camera.projectionMatrix,this.camera.matrixWorldInverse),this.frustum.setFromProjectionMatrix(nS),this.frustumNeedsUpdate=!1),e.isVector3)?this.frustum.containsPoint(e):e.isMesh&&e.geometry?(e.geometry.boundingBox||e.geometry.computeBoundingBox(),nH.copy(e.geometry.boundingBox).applyMatrix4(e.matrixWorld),this.frustum.intersectsBox(nH)):!!e.isObject3D&&this.frustum.intersectsObject(e))}},{key:"addObject",value:function(e){this.scene.add(e)}},{key:"removeObject",value:function(e){this.scene.remove(e)}},{key:"cleanScene",value:function(e){var t=this,n=function(e){var t;null===(t=e.map)||void 0===t||t.dispose(),e.uniforms&&Object.values(e.uniforms).forEach(function(e){var t,n;null===(t=e.value)||void 0===t||null===(n=t.dispose)||void 0===n||n.call(t)}),e.dispose()};e.traverse(function(i){var o,r;null===(o=i.geometry)||void 0===o||o.dispose(),i.material&&(Array.isArray(i.material)?i.material.forEach(function(e){n(e)}):n(i.material)),i instanceof k.xsS||null===(r=i.dispose)||void 0===r||r.call(i),i!==e&&t.cleanScene(i)})}}]),n}(nM),nR=function(e){(0,v.Z)(n,e);var t=_(n);function n(){return(0,h.Z)(this,n),t.apply(this,arguments)}return(0,l.Z)(n,[{key:"load",value:function(e,t,n,i,o){fetch(new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),{signal:o}).then(function(e){if(200===e.status||0===e.status){var t=e.body.getReader(),o=e.headers.get("Content-Length")||e.headers.get("X-File-Size"),r=o?parseInt(o):0,a=0!==r,s=0;return new Response(new ReadableStream({start:function(e){(function o(){t.read().then(function(t){var i=t.done,c=t.value;i?e.close():(n(new ProgressEvent("progress",{lengthComputable:a,loaded:s+=c.byteLength,total:r})),e.enqueue(c),o())}).catch(function(e){i(e)})})()}}))}throw Error('fetch for "'.concat(e.url,'" responded with ').concat(e.status,": ").concat(e.statusText))}).then(function(e){return e.blob()}).then(function(e){t(e)}).catch(function(e){i(e)})}}]),n}(k.aNw),nA=function(e){(0,v.Z)(n,e);var t=_(n);function n(){return(0,h.Z)(this,n),t.apply(this,arguments)}return(0,l.Z)(n,[{key:"load",value:function(e,t,n,i){var o=document.createElement("img");function r(){c(),t(this)}function a(e){if(c(),null!=i&&i.aborted){var t=Error();t.name="AbortError",t.message="The operation was aborted.",n(t)}else n(e)}function s(){o.src=""}function c(){o.removeEventListener("load",r,!1),o.removeEventListener("error",a,!1),null==i||i.removeEventListener("abort",s,!1)}return o.addEventListener("load",r,!1),o.addEventListener("error",a,!1),null==i||i.addEventListener("abort",s,!1),e.startsWith("data:")||void 0===this.crossOrigin||(o.crossOrigin=this.crossOrigin),o.src=e,o}}]),n}(k.aNw),nD=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,e)).abortCtrl={},i.fileLoader=new nR,i.imageLoader=new nA,i.config.withCredentials&&(i.fileLoader.setWithCredentials(!0),i.imageLoader.setCrossOrigin("use-credentials")),i}return(0,l.Z)(n,[{key:"destroy",value:function(){this.abortLoading(),(0,c.Z)((0,f.Z)(n.prototype),"destroy",this).call(this)}},{key:"abortLoading",value:function(){Object.values(this.abortCtrl).forEach(function(e){return e.abort()}),this.abortCtrl={}}},{key:"loadFile",value:function(e,t,n){var i=this,o=ng.get(e,n);if(o){if(o instanceof Blob)return null==t||t(100),Promise.resolve(o);ng.remove(e,n)}return this.config.requestHeaders&&this.fileLoader.setRequestHeader(this.config.requestHeaders(e)),new Promise(function(o,r){var a=0;null==t||t(a),i.fileLoader.load(e,function(i){a=100,null==t||t(a),ng.add(e,n,i),o(i)},function(e){if(e.lengthComputable){var n=e.loaded/e.total*100;n>a&&(a=n,null==t||t(a))}},function(e){r(e)},i.__getAbortSignal(n))})}},{key:"loadImage",value:function(e,t,n){var i=this,o=ng.get(e,n);return o?(null==t||t(100),o instanceof Blob)?this.blobToImage(o):Promise.resolve(o):t||this.config.requestHeaders?this.loadFile(e,t,n).then(function(e){return i.blobToImage(e)}):new Promise(function(t,o){i.imageLoader.load(e,function(i){ng.add(e,n,i),t(i)},function(e){o(e)},i.__getAbortSignal(n))})}},{key:"blobToImage",value:function(e){return new Promise(function(t,n){var i=document.createElement("img");i.onload=function(){URL.revokeObjectURL(i.src),t(i)},i.onerror=n,i.src=URL.createObjectURL(e)})}},{key:"preloadPanorama",value:function(e){return this.viewer.adapter.supportsPreload(e)?this.viewer.adapter.loadTexture(e,!1):Promise.reject(new ew("Current adapter does not support preload"))}},{key:"__getAbortSignal",value:function(e){if(e){var t;return null!==(t=this.abortCtrl[e])&&void 0!==t&&t.signal.aborted&&delete this.abortCtrl[e],this.abortCtrl[e]||(this.abortCtrl[e]=new AbortController),this.abortCtrl[e].signal}return null}}]),n}(nM),nN=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){var i;return(0,h.Z)(this,n),(i=t.call(this,e)).zoom=new eW(function(e){i.viewer.state.vFov=i.viewer.dataHelper.zoomLevelToFov(e),i.viewer.state.hFov=i.viewer.dataHelper.vFovToHFov(i.viewer.state.vFov),i.viewer.dispatchEvent(new tj(e))},{defaultValue:i.viewer.config.defaultZoomLvl,min:0,max:100,wrap:!1}),i.position=new eU(function(e){i.viewer.dataHelper.sphericalCoordsToVector3(e,i.viewer.state.direction),i.viewer.dispatchEvent(new tb(e))},{yaw:new eW(null,{defaultValue:i.config.defaultYaw,min:0,max:2*Math.PI,wrap:!0}),pitch:new eW(null,{defaultValue:i.config.defaultPitch,min:-Math.PI/2,max:Math.PI/2,wrap:!1})}),i.roll=new eW(function(e){i.viewer.state.roll=e,i.viewer.dispatchEvent(new tE(e))},{defaultValue:0,min:-Math.PI,max:Math.PI,wrap:!1}),i.updateSpeeds(),i}return(0,l.Z)(n,[{key:"updateSpeeds",value:function(){this.zoom.setSpeed(50*this.config.zoomSpeed),this.position.setSpeed(k.M8C.degToRad(50*this.config.moveSpeed)),this.roll.setSpeed(k.M8C.degToRad(50*this.config.moveSpeed))}},{key:"update",value:function(e){this.zoom.update(e),this.position.update(e),this.roll.update(e)}}]),n}(nM),nj=(0,l.Z)(function e(){(0,h.Z)(this,e),this.ready=!1,this.needsUpdate=!1,this.continuousUpdateCount=0,this.keyboardEnabled=!1,this.direction=new k.Pa4(0,0,z),this.roll=0,this.vFov=60,this.hFov=60,this.aspect=1,this.animation=null,this.transitionAnimation=null,this.loadingPromise=null,this.idleTime=-1,this.objectsObservers={},this.size={width:0,height:0}}),nF=function(e){(0,v.Z)(n,e);var t=_(n);function n(e){if((0,h.Z)(this,n),(s=t.call(this)).plugins={},s.children=[],s.onResize=eu(function(){return s.navbar.autoSize()},500),s.parent=G(e.container),!s.parent)throw new ew('"container" element not found.');s.parent[R]=(0,d.Z)(s),s.container=document.createElement("div"),s.container.classList.add("psv-container"),s.parent.appendChild(s.container),ej(s.container,"core"),s.state=new nj,s.config=np(e),s.__setSize(s.config.size),s.overlay=new nE((0,d.Z)(s));try{t$.load()}catch(e){return console.error(e),s.showError(s.config.lang.webglError),(0,p.Z)(s)}ng.init(),s.adapter=new s.config.adapter[0]((0,d.Z)(s),s.config.adapter[1]),s.renderer=new nz((0,d.Z)(s)),s.textureLoader=new nD((0,d.Z)(s)),s.eventsHandler=new nP((0,d.Z)(s)),s.dataHelper=new nL((0,d.Z)(s)),s.dynamics=new nN((0,d.Z)(s)),null===(r=(a=s.adapter).init)||void 0===r||r.call(a),s.loader=new nb((0,d.Z)(s)),s.navbar=new ny((0,d.Z)(s)),s.panel=new n_((0,d.Z)(s)),s.notification=new nk((0,d.Z)(s)),s.autoSize(),s.setCursor(null),ey(t$.isTouchEnabled,function(e){$(s.container,"psv--is-touch",e)}),s.config.plugins.forEach(function(e){var t=(0,y.Z)(e,2),n=t[0],i=t[1];s.plugins[n.id]=new n((0,d.Z)(s),i)});for(var i=0,o=Object.values(s.plugins);i<o.length;i++){var r,a,s,c,u=o[i];null===(c=u.init)||void 0===c||c.call(u)}return s.config.navbar&&s.navbar.setButtons(s.config.navbar),s.state.loadingPromise||(s.config.panorama?s.setPanorama(s.config.panorama):s.loader.show()),s}return(0,l.Z)(n,[{key:"destroy",value:function(){var e,t,n,i,o,r;this.stopAll(),this.stopKeyboardControl(),this.exitFullscreen();for(var a=0,s=Object.entries(this.plugins);a<s.length;a++){var c=(0,y.Z)(s[a],2),u=c[0];c[1].destroy(),delete this.plugins[u]}this.children.slice().forEach(function(e){return e.destroy()}),this.children.length=0,null===(e=this.eventsHandler)||void 0===e||e.destroy(),null===(t=this.renderer)||void 0===t||t.destroy(),null===(n=this.textureLoader)||void 0===n||n.destroy(),null===(i=this.dataHelper)||void 0===i||i.destroy(),null===(o=this.adapter)||void 0===o||o.destroy(),null===(r=this.dynamics)||void 0===r||r.destroy(),this.parent.removeChild(this.container),delete this.parent[R]}},{key:"init",value:function(){this.eventsHandler.init(),this.renderer.init(),this.config.navbar&&this.navbar.show(),"always"===this.config.keyboard&&this.startKeyboardControl(),this.resetIdleTimer(),this.state.ready=!0,this.dispatchEvent(new t_)}},{key:"resetIdleTimer",value:function(){this.state.idleTime=performance.now()}},{key:"disableIdleTimer",value:function(){this.state.idleTime=-1}},{key:"getPlugin",value:function(e){if("string"==typeof e)return this.plugins[e];var t=nl(e);return t?this.plugins[t.id]:null}},{key:"getPosition",value:function(){return this.dataHelper.cleanPosition(this.dynamics.position.current)}},{key:"getZoomLevel",value:function(){return this.dynamics.zoom.current}},{key:"getSize",value:function(){return Z({},this.state.size)}},{key:"isFullscreenEnabled",value:function(){return er(this.parent,t$.isIphone)}},{key:"needsUpdate",value:function(){this.state.needsUpdate=!0}},{key:"needsContinuousUpdate",value:function(e){e?this.state.continuousUpdateCount++:this.state.continuousUpdateCount>0&&this.state.continuousUpdateCount--}},{key:"autoSize",value:function(){(this.container.clientWidth!==this.state.size.width||this.container.clientHeight!==this.state.size.height)&&(this.state.size.width=Math.round(this.container.clientWidth),this.state.size.height=Math.round(this.container.clientHeight),this.state.aspect=this.state.size.width/this.state.size.height,this.state.hFov=this.dataHelper.vFovToHFov(this.state.vFov),this.dispatchEvent(new tR(this.getSize())),this.onResize())}},{key:"setPanorama",value:function(e){var t,n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.textureLoader.abortLoading(),null===(t=this.state.transitionAnimation)||void 0===t||t.cancel(),this.state.ready||["sphereCorrection","panoData"].forEach(function(e){e in i||(i[e]=n.config[e])}),void 0===i.transition&&(i.transition=!0),void 0===i.speed&&(i.speed=C),void 0===i.showLoader&&(i.showLoader=!0),void 0===i.caption&&(i.caption=this.config.caption),void 0===i.description&&(i.description=this.config.description),i.panoData||"function"!=typeof this.config.panoData||(i.panoData=this.config.panoData),this.hideError(),this.resetIdleTimer(),this.config.panorama=e,this.config.caption=i.caption,this.config.description=i.description;var o=function(t){if(ek(t))return!1;if(n.loader.hide(),n.state.loadingPromise=null,!t)return n.navbar.setCaption(n.config.caption),!0;throw n.navbar.setCaption(""),n.showError(n.config.lang.loadError),console.error(t),n.dispatchEvent(new ty(e,t)),t};this.navbar.setCaption("<em>".concat(this.config.lang.loading,"</em>")),(i.showLoader||!this.state.ready)&&this.loader.show(),this.dispatchEvent(new tp(e));var r=this.adapter.loadTexture(this.config.panorama,!0,i.panoData).then(function(e){if(e.panorama!==n.config.panorama)throw n.adapter.disposeTexture(e),eb();var t=n.dataHelper.cleanPanoramaOptions(i,e.panoData);return ep(t.zoom)&&ep(t.position)||n.stopAll(),{textureData:e,cleanOptions:t}});return i.transition&&this.state.ready&&this.adapter.supportsTransition(this.config.panorama)?this.state.loadingPromise=r.then(function(e){var t=e.textureData,i=e.cleanOptions;return n.loader.hide(),n.dispatchEvent(new tm(t)),n.state.transitionAnimation=n.renderer.transition(t,i),n.state.transitionAnimation}).then(function(e){if(n.state.transitionAnimation=null,!e)throw eb()}).then(function(){return o()},function(e){return o(e)}):this.state.loadingPromise=r.then(function(e){var t=e.textureData,o=e.cleanOptions;n.renderer.show(),n.renderer.setTexture(t),n.renderer.setPanoramaPose(t.panoData),n.renderer.setSphereCorrection(i.sphereCorrection),n.state.ready||n.init(),n.dispatchEvent(new tm(t)),ep(o.zoom)||n.zoom(o.zoom),ep(o.position)||n.rotate(o.position)}).then(function(){return o()},function(e){return o(e)}),this.state.loadingPromise}},{key:"setOptions",value:function(e){for(var t=Z(Z({},this.config),e),n=0,i=Object.entries(e);n<i.length;n++){var o=(0,y.Z)(i[n],2),r=o[0],a=o[1];if(!(r in nh)){eE("Unknown option ".concat(r));continue}if(r in nd){eE(nd[r]);continue}switch(r in nv&&(a=nv[r](a,{rawConfig:t,defValue:nh[r]})),this.config[r]=a,r){case"mousemove":this.state.cursorOverride||this.setCursor(null);break;case"caption":this.navbar.setCaption(this.config.caption);break;case"size":this.resize(this.config.size);break;case"sphereCorrection":this.renderer.setSphereCorrection(this.config.sphereCorrection);break;case"navbar":case"lang":this.navbar.setButtons(this.config.navbar);break;case"moveSpeed":case"zoomSpeed":this.dynamics.updateSpeeds();break;case"minFov":case"maxFov":this.dynamics.zoom.setValue(this.dataHelper.fovToZoomLevel(this.state.vFov)),this.dispatchEvent(new tj(this.getZoomLevel()));break;case"keyboard":"always"===this.config.keyboard?this.startKeyboardControl():this.stopKeyboardControl()}}this.needsUpdate(),this.dispatchEvent(new e8(Object.keys(e)))}},{key:"setOption",value:function(e,t){this.setOptions((0,u.Z)({},e,t))}},{key:"showError",value:function(e){this.overlay.show({id:N.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"/><!--Created by Shastry from the Noun Project--></svg>\n',title:e,dissmisable:!1})}},{key:"hideError",value:function(){this.overlay.hide(N.ERROR)}},{key:"rotate",value:function(e){var t=new e2(this.dataHelper.cleanPosition(e));this.dispatchEvent(t),t.defaultPrevented||this.dynamics.position.setValue(t.position)}},{key:"zoom",value:function(e){this.dynamics.zoom.setValue(e)}},{key:"zoomIn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.dynamics.zoom.step(e)}},{key:"zoomOut",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.dynamics.zoom.step(-e)}},{key:"animate",value:function(e){var t=this,n=eZ(e),i=!ep(e.zoom),o=new eQ(n?this.dataHelper.cleanPosition(e):void 0,e.zoom);if(this.dispatchEvent(o),!o.defaultPrevented){this.stopAll();var r=this.dataHelper.getAnimationProperties(e.speed,o.position,o.zoomLevel),a=r.duration,s=r.properties;return a?(this.state.animation=new eV({properties:s,duration:a,easing:e.easing||"inOutSine",onTick:function(e){n&&t.dynamics.position.setValue({yaw:e.yaw,pitch:e.pitch}),i&&t.dynamics.zoom.setValue(e.zoom)}}),this.state.animation.then(function(){t.state.animation=null,t.resetIdleTimer()}),this.state.animation):(n&&this.rotate(o.position),i&&this.zoom(o.zoomLevel),new eV(null))}}},{key:"stopAnimation",value:function(){return this.state.animation?(this.state.animation.cancel(),this.state.animation):Promise.resolve()}},{key:"resize",value:function(e){this.__setSize(e),this.autoSize()}},{key:"__setSize",value:function(e){var t=this;["width","height"].forEach(function(n){e&&e[n]&&(/^[0-9.]+$/.test(e[n])&&(e[n]+="px"),t.parent.style[n]=e[n])})}},{key:"enterFullscreen",value:function(){this.isFullscreenEnabled()||ea(this.parent,t$.isIphone)}},{key:"exitFullscreen",value:function(){this.isFullscreenEnabled()&&es(t$.isIphone)}},{key:"toggleFullscreen",value:function(){this.isFullscreenEnabled()?this.exitFullscreen():this.enterFullscreen()}},{key:"startKeyboardControl",value:function(){this.state.keyboardEnabled=!0}},{key:"stopKeyboardControl",value:function(){this.state.keyboardEnabled=!1}},{key:"createTooltip",value:function(e){return new nT(this,e)}},{key:"setCursor",value:function(e){this.state.cursorOverride=e,e?this.container.style.cursor=e:this.container.style.cursor=this.config.mousemove?"move":"default"}},{key:"observeObjects",value:function(e){this.state.objectsObservers[e]||(this.state.objectsObservers[e]=null)}},{key:"unobserveObjects",value:function(e){delete this.state.objectsObservers[e]}},{key:"stopAll",value:function(){return this.dispatchEvent(new tD),this.disableIdleTimer(),this.stopAnimation()}}]),n}(eK)}}]);