@panoramax/web-viewer 3.0.2-develop-a8ea8e60-develop-ac07ac0a → 3.0.2-develop-a8ea8e60-develop-10c06f44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -8,7 +8,7 @@ Before _2.0.0_, Viewer was embed in the [API repository](https://gitlab.com/pano
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
- ⚠️ Library has been renamed on NPM into `@panoramax/web-viewer`, you are invited to change your dependencies to keep track of new updates.
11
+ ⚠️ Library has been renamed on NPM into `@panoramax/web-viewer`, you are invited to change your dependencies to keep track of new updates. Also, default import `GeoVisio` has been renamed into `Panoramax`, so you have to update your code as well.
12
12
 
13
13
  ### Added
14
14
  - Support for 🇨🇳 traditionnal Chinese language (`zh_Hant`) thanks to [Kevin32950](https://gitlab.com/kevinlin18)
package/build/index.js CHANGED
@@ -9,7 +9,7 @@
9
9
  * LICENSE file in the root directory of this source tree.
10
10
  *
11
11
  */
12
- !function(C,Rn){"object"===typeof exports&&"object"===typeof module?module.exports=Rn():"function"===typeof define&&define.amd?define("Panoramax",[],Rn):"object"===typeof exports?exports.Panoramax=Rn():C.Panoramax=Rn()}(this,(()=>(()=>{var C={2244:(C,Rn,or)=>{"use strict";or.d(Rn,{Z:()=>Editor});or(2325);var So=or(6792),To=or(2093),Ro=or(2354),Uo=or(4133),Oo=or(7832),Ho=or(7457),qo=or(3406),dl=or(3114);const ml="sequence-headings";class Editor extends So.Z{constructor(C,Rn){let or=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};super(C,Rn,Object.assign(or,{users:[]})),this._selectedSeqId||this._loader.dismiss({},"No sequence is selected"),this.psvContainer=document.createElement("div"),this.mapContainer=document.createElement("div"),this.container.appendChild(this.psvContainer),this.container.appendChild(this.mapContainer);try{this.psv=new Ro.ZP(this,this.psvContainer),this.psv._myVTour.datasource.nodeResolver=this._getNode.bind(this)}catch(So){let C=dl.we.isWebGLSupported?this._t.gvs.error_psv:this._t.gvs.error_webgl;this._loader.dismiss(So,C)}this._api.onceReady().then((()=>{try{this.map=new To.Z(this,this.mapContainer,{raster:or.raster,background:or.background,supplementaryStyle:this._createMapStyle()}),(0,Ho.bk)(this),this._loadSequence(),this.map.once("load",(()=>{this.map.setPaintProperty("geovisio_editor_sequences","line-color",this.map._getLayerColorStyle("sequences")),this.map.setPaintProperty("geovisio_editor_pictures","circle-color",this.map._getLayerColorStyle("pictures")),this.map.setLayoutProperty("geovisio_editor_sequences","visibility","visible"),this.map.setLayoutProperty("geovisio_editor_pictures","visibility","visible"),or.raster&&this._addMapBackgroundWidget(),this._bindPicturesEvents()}));const C=this.map._picMarker.setRotation.bind(this.map._picMarker);this.map._picMarker.setRotation=Rn=>(Rn=void 0===this._lastRelHeading?Rn:Rn+this._lastRelHeading-this.psv.getPictureRelativeHeading(),C(Rn))}catch(So){this._loader.dismiss(So,this._t.gvs.error_psv)}})),this.addEventListener("select",this._onSelect.bind(this))}getClassName(){return"Editor"}_createMapStyle(){return{sources:{geovisio_editor_sequences:{type:"geojson",data:{type:"FeatureCollection",features:[]}}},layers:[{id:"geovisio_editor_sequences",type:"line",source:"geovisio_editor_sequences",layout:{...qo.lg.SEQUENCES.layout},paint:{...qo.lg.SEQUENCES.paint}},{id:"geovisio_editor_pictures",type:"circle",source:"geovisio_editor_sequences",layout:{...qo.lg.PICTURES.layout},paint:{...qo.lg.PICTURES.paint}}]}}_bindPicturesEvents(){this.map.on("mousemove","geovisio_editor_pictures",(()=>{this.map.getCanvas().style.cursor="pointer"})),this.map.on("mouseleave","geovisio_editor_pictures",(()=>{this.map.getCanvas().style.cursor=""})),this.map.on("click","geovisio_editor_pictures",this.map._onPictureClick.bind(this.map))}_loadSequence(){return this._api.getSequenceItems(this._selectedSeqId).then((C=>{this._sequenceData=C.features,this.map.getSource("geovisio_editor_sequences").setData({type:"FeatureCollection",features:[{type:"Feature",properties:{id:this._selectedSeqId},geometry:{type:"LineString",coordinates:C.features.map((C=>C.geometry.coordinates))}},...C.features.map((C=>(C.properties.id=C.id,C.properties.sequences=[this._selectedSeqId],C)))]});const onMapLoad=()=>{if(this._selectedPicId){const Rn=C.features.find((C=>C.id===this._selectedPicId));Rn?(this.select(this._selectedSeqId,this._selectedPicId,!0),this.map.jumpTo({center:Rn.geometry.coordinates,zoom:18})):console.log("Picture with ID",Rn,"was not found")}else{const Rn=[...C.features[0].geometry.coordinates,...C.features[0].geometry.coordinates];for(let or=1;or<C.features.length;or++){const So=C.features[or].geometry.coordinates;So[0]<Rn[0]&&(Rn[0]=So[0]),So[1]<Rn[1]&&(Rn[1]=So[1]),So[0]>Rn[2]&&(Rn[2]=So[0]),So[1]>Rn[3]&&(Rn[3]=So[1])}this.map.fitBounds(Rn,{animate:!1})}this._loader.dismiss()};this.map.loaded()?onMapLoad():this.map.once("load",onMapLoad)})).catch((C=>this._loader.dismiss(C,this._t.gvs.error_api)))}_getNode(C){const Rn=this._sequenceData.find((Rn=>Rn.properties.id===C)),or=Rn?(0,Ho.FF)(Rn,this._t,this._isInternetFast):null;return or&&delete or.links,or}_addMapBackgroundWidget(){const C=document.createElement("div");C.id="gvs-map-bg",C.classList.add("gvs-panel","gvs-widget-bg","gvs-input-group");const onBgChange=C=>this.map.setBackground(C.target.value),Rn=document.createElement("input");Rn.id="gvs-map-bg-streets",Rn.setAttribute("type","radio"),Rn.setAttribute("name","gvs-map-bg"),Rn.setAttribute("value","streets"),Rn.addEventListener("change",onBgChange),C.appendChild(Rn);const or=document.createElement("label");or.setAttribute("for",Rn.id);const So=document.createElement("img");So.src=Oo,or.appendChild(So),or.appendChild(document.createTextNode(this._t.gvs.map_background_streets)),C.appendChild(or);const To=document.createElement("input");To.id="gvs-map-bg-aerial",To.setAttribute("type","radio"),To.setAttribute("name","gvs-map-bg"),To.setAttribute("value","aerial"),To.addEventListener("change",onBgChange),C.appendChild(To);const Ro=document.createElement("label");Ro.setAttribute("for",To.id);const Ho=document.createElement("img");Ho.src=Uo,Ro.appendChild(Ho),Ro.appendChild(document.createTextNode(this._t.gvs.map_background_aerial)),C.appendChild(Ro),this.mapContainer.appendChild(C);const onMapBgChange=C=>{"aerial"===C?To.checked=!0:Rn.checked=!0};this.addEventListener("map:background-changed",(C=>onMapBgChange(C.detail.background))),onMapBgChange(this.map.getBackground())}previewSequenceHeadingChange(C){const Rn=void 0!==this.map.getLayer(ml);if(this.map._picMarkerPreview.remove(),void 0===C)return delete this._lastRelHeading,Rn&&this.map.setLayoutProperty(ml,"visibility","none"),void(this._selectedPicId&&this.map._picMarker.setRotation(this.psv.getXY().x));this._lastRelHeading=C,Rn||this.map.addLayer({id:ml,type:"symbol",source:"geovisio_editor_sequences",layout:{"icon-image":"gvs-marker","icon-overlap":"always","icon-size":.8}});const or=-this.psv.getPictureRelativeHeading();this.map.setLayoutProperty(ml,"visibility","visible"),this.map.setLayoutProperty(ml,"icon-rotate",["+",["get","view:azimuth"],or,C]);const So=[["==",["geometry-type"],"Point"]];this._selectedPicId&&So.push(["!=",["get","id"],this._selectedPicId]),this.map.setFilter(ml,["all",...So]),this._selectedPicId&&this.map._picMarker.setRotation(this.psv.getXY().x)}_onSelect(){void 0!==this._lastRelHeading&&this.previewSequenceHeadingChange(this._lastRelHeading)}}},9323:(C,Rn,or)=>{"use strict";or.d(Rn,{Z:()=>Oo});var So=or(6792),To=or(2093),Ro=or(3406),Uo=or(4307);class StandaloneMap extends So.Z{constructor(C,Rn){super(C,Rn,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),this.mapContainer=document.createElement("div"),this.container.appendChild(this.mapContainer),this._api.onceReady().then((()=>this._initMap())),this.addEventListener("map:picture-click",(C=>this.select(C.detail.seqId,C.detail.picId))),this.addEventListener("map:sequence-click",(C=>this.select(C.detail.seqId))),this.addEventListener("select",this._onSelect.bind(this))}getClassName(){return"Map"}destroy(){super.destroy(),this.map.destroy(),delete this.map,this.mapContainer.remove(),this.container.innerHTML="",this.container.classList.remove(...[...this.container.classList].filter((C=>C.startsWith("gvs"))))}_initMap(){this._options.hash=!0;class MyMap extends To.Z{_getLayerStyleProperties(C){return"pictures_symbols"===C?{layout:{visibility:"none"}}:super._getLayerStyleProperties(C)}}this.map=new MyMap(this,this.mapContainer,this._options),this.map.addControl(new Uo.NavigationControl({showCompass:!1})),this.map.on("load",(()=>{this.map.reloadLayersStyles(),this._loader.dismiss()}))}_onSelect(C){if(C.detail.picId||C.detail.seqId){const Rn=C.detail.picId?"pictures":"sequences",or=this.map.queryRenderedFeatures({layers:[...this.map._userLayers].map((C=>(0,Ro.lh)(C,Rn))),filter:["==",["get","id"],C.detail.picId||C.detail.seqId]});or.length>=0&&null!=or[0]&&this.map._attachPreviewToPictures({features:or},Rn)}}}const Oo=StandaloneMap},1707:(C,Rn,or)=>{"use strict";or.d(Rn,{O_:()=>Ho.O_,ZP:()=>Viewer,ns:()=>vl,q7:()=>Ho.q7});or(2411);var So=or(3114),To=or(9705),Ro=or(9204),Uo=or(7457),Oo=or(6792),Ho=or(2354),qo=or(2093),dl=or(3406),ml=or(4824),fl=or(6899);const vl=20,bl=Math.PI/6,kl=100,Ll="http://127.0.0.1:8111",Dl={DEFAULT:"default",AGE:"age",TYPE:"type"};class Viewer extends Oo.Z{constructor(C,Rn){var or;let Uo,Oo=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(super(C,Rn,Oo),null==this._options.map&&(this._options.map={}),null==this._options.widgets&&(this._options.widgets={}),this._sequencePlaying=!1,this._prevSequence=null,this._mapTheme=(null===Oo||void 0===Oo||null===(or=Oo.map)||void 0===or?void 0:or.theme)||Dl.DEFAULT,this._picNav=(null===Oo||void 0===Oo?void 0:Oo.picturesNavigation)||"any",this._options.testing)return;if(!0===this._options.hash||void 0===this._options.hash){if(this._hash=new Ro.Z(this),Uo=this._hash._getCurrentHash(),"none"===Uo.map&&(this._options.map=!1),"object"===typeof this._options.map&&(this._options.map.hash=!1),this._options.map&&Uo.focus&&(this._options.map.startWide="map"===Uo.focus),this._options.map&&Uo.background&&(this._options.map.background=Uo.background),this._options.map&&Uo.users&&(this._options.users=[...new Set(Uo.users.split(","))]),Uo.xyz){const C=this._hash.getXyzOptionsFromHashString(Uo.xyz);this.addEventListener("psv:picture-loaded",(()=>{this.psv.setXYZ(C.x,C.y,C.z)}),{once:!0})}if(this._options.map&&"string"===typeof Uo.map){const C=this._hash.getMapOptionsFromHashString(Uo.map);C&&(this._options.map=Object.assign({},this._options.map,C))}if(this._options.map&&this.setFilters(this._hash.getMapFiltersFromHashVals(Uo),!0),Uo.pic){const C=Uo.pic.split(";");C.length>1&&console.warn("Multiple picture IDs passed in URL, only first one kept"),this._options.selectedPicture=C[0]}"string"===typeof Uo.speed&&(this._options.transition=parseInt(Uo.speed)),Uo.nav&&(this._picNav=Uo.nav)}this._initContainerStructure();try{this.psv=new Ho.ZP(this,this.psvContainer,{transitionDuration:this._options.transition,shouldGoFast:this._psvShouldGoFast.bind(this),keyboard:"always",keyboardActions:{...So.Of.keyboardActions,8:"ROTATE_UP",2:"ROTATE_DOWN",4:"ROTATE_LEFT",6:"ROTATE_RIGHT",PageUp:()=>this.psv.goToNextPicture(),9:()=>this.psv.goToNextPicture(),PageDown:()=>this.psv.goToPrevPicture(),3:()=>this.psv.goToPrevPicture(),5:()=>this.moveCenter(),"*":()=>this.moveCenter(),Home:()=>this.toggleFocus(),7:()=>this.toggleFocus(),End:()=>this.toggleUnfocusedVisible(),1:()=>this.toggleUnfocusedVisible()," ":()=>this.toggleSequencePlaying(),0:()=>this.toggleSequencePlaying()}}),this.psv.addEventListener("dblclick",(()=>{this.map&&this.isMapWide()&&this.setFocus("pic")}))}catch(qo){let C=So.we.isWebGLSupported?this._t.gvs.error_psv:this._t.gvs.error_webgl;this._loader.dismiss(qo,C)}const onceStuffReady=()=>{this._widgets=new To.Z(this,this._options.widgets),this.map&&this.isWidthSmall()&&this.setUnfocusedVisible(!1),this._options.selectedPicture?(this.select(null,this._options.selectedPicture,!0),this.addEventListener("psv:picture-loaded",(()=>{var C;this.map&&this._options.map&&this.map.jumpTo(this._options.map),"meta"===(null===(C=Uo)||void 0===C?void 0:C.focus)&&this._widgets._showPictureMetadataPopup(),this._loader.dismiss()}),{once:!0})):this._loader.dismiss(),this._options.position&&this.goToPosition(...this._options.position).catch((C=>this._loader.dismiss(C,this._t.gvs.error_nopic))),this._hash&&this.map&&(this.map._attribution._container.classList.add("gvs-hidden"),this._hash.bindMapEvents(),this._mapFilters&&this.setFilters(this._mapFilters,!0),Uo.users&&Promise.all(this.map.getVisibleUsers().filter((C=>"geovisio"!=C)).map((C=>this._api.getUserName(C)))).then((C=>{C=C.filter((C=>null!=C)).join(", ");const Rn=document.getElementById("gvs-filter-search-user").querySelector("input");Rn&&Rn.setItem(C)})).catch((C=>console.warn("Error when looking up for user names",C))))};this._api.onceReady().then((()=>{this._options.map?(void 0===this._options.map.doubleClickZoom&&(this._options.map.doubleClickZoom=!1),this._initMap().then(onceStuffReady).catch((C=>this._loader.dismiss(C,this._t.gvs.error_api_compatibility)))):onceStuffReady()}))}getClassName(){return"Viewer"}destroy(){super.destroy(),this._widgets.destroy(),delete this._widgets,this._hash.destroy(),delete this._hash,this.map.destroy(),delete this.map,delete this._mapFilters,this.psv.destroy(),delete this.psv,this.miniContainer.remove(),this.mainContainer.remove(),this.mapContainer.remove(),this.psvContainer.remove(),this.popupContainer.remove(),this.container.innerHTML="",this.container.classList.remove(...[...this.container.classList].filter((C=>C.startsWith("gvs"))))}_initContainerStructure(){this.miniContainer=document.createElement("div"),this.miniContainer.classList.add("gvs-mini"),this.mainContainer=document.createElement("div"),this.mainContainer.classList.add("gvs-main"),this.popupContainer=document.createElement("div"),this.popupContainer.classList.add("gvs-popup","gvs-hidden"),this.psvContainer=document.createElement("div"),this.mainContainer.appendChild(this.psvContainer),this.mapContainer=document.createElement("div"),this.miniContainer.appendChild(this.mapContainer),this.container.appendChild(this.mainContainer),this.container.appendChild(this.miniContainer),this.container.appendChild(this.popupContainer)}async _initMap(){await new Promise((C=>{this.map=new qo.Z(this,this.mapContainer,this._options.map),this.map._getLayerColorStyle=this._getLayerColorStyle.bind(this),this.map._getLayerSortStyle=this._getLayerSortStyle.bind(this),this.addEventListener("map:users-changed",C,{once:!0}),this.container.classList.add("gvs-has-mini"),this.map.on("dblclick",(()=>{this.isMapWide()||this.setFocus("map")})),"object"===typeof this._options.map&&this._options.map.startWide?this.setFocus("map",!0):this.setFocus("pic",!0)})),this._initMapKeyboardHandler(),(0,Uo.bk)(this)}_initMapKeyboardHandler(){const C=this;this.map.keyboard.keydown=function(Rn){if(Rn.altKey||Rn.ctrlKey||Rn.metaKey)return;switch(Rn.key){case"*":case"5":return void C.moveCenter();case"PageUp":case"9":return void C.psv.goToNextPicture();case"PageDown":case"3":return void C.psv.goToPrevPicture();case"Home":case"7":return Rn.stopPropagation(),void C.toggleFocus();case"End":case"1":return void C.toggleUnfocusedVisible();case" ":case"0":return void C.toggleSequencePlaying()}let or=0,So=0,To=0,Ro=0,Uo=0;switch(Rn.keyCode){case 61:case 107:case 171:case 187:or=1;break;case 189:case 109:case 173:or=-1;break;case 37:case 100:Rn.shiftKey?So=-1:(Rn.preventDefault(),Ro=-1);break;case 39:case 102:Rn.shiftKey?So=1:(Rn.preventDefault(),Ro=1);break;case 38:case 104:Rn.shiftKey?To=1:(Rn.preventDefault(),Uo=-1);break;case 40:case 98:Rn.shiftKey?To=-1:(Rn.preventDefault(),Uo=1);break;default:return}return this._rotationDisabled&&(So=0,To=0),{cameraAnimation:C=>{const Oo=this._tr;C.easeTo({duration:300,easeId:"keyboardHandler",easing:C=>C*(2-C),zoom:or?Math.round(Oo.zoom)+or*(Rn.shiftKey?2:1):Oo.zoom,bearing:Oo.bearing+So*this._bearingStep,pitch:Oo.pitch+To*this._pitchStep,offset:[-Ro*this._panStep,-Uo*this._panStep],center:Oo.center},{originalEvent:Rn})}}}.bind(this.map.keyboard)}_psvShouldGoFast(){return this._sequencePlaying&&this.psv.getTransitionDuration()<1e3||this.map&&this.isMapWide()}refreshPSV(){var C;const Rn=this.psv._myVTour.getCurrentNode();if(Rn&&Rn.panorama.baseUrl!==(null===Rn||void 0===Rn||null===(C=Rn.panorama)||void 0===C?void 0:C.origBaseUrl)){const C=this.psv.getZoomLevel(),or=this.psv.getPosition();this.psv._myVTour.state.currentNode=null,this.psv._myVTour.setCurrentNode(Rn.id,{zoomTo:C,rotateTo:or,fadeIn:!1,speed:0,rotation:!1})}Rn&&Rn.panorama.rows>1&&this.psv.adapter.__refresh()}setPopup(C){let Rn=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(C)if(Rn){this.psv.stopKeyboardControl(),this.popupContainer.innerHTML="";const C=document.createElement("div");C.classList.add("gvs-popup-backdrop"),C.addEventListener("click",(()=>this.setPopup(!1)));const or=document.createElement("div");or.classList.add("gvs-widget-bg"),"string"===typeof Rn?or.innerHTML=Rn:Array.isArray(Rn)&&Rn.forEach((C=>or.appendChild(C)));const So=document.createElement("button");So.id="gvs-popup-btn-close",So.classList.add("gvs-btn","gvs-widget-bg"),So.appendChild((0,ml.fa)(fl.g8)),So.addEventListener("click",(()=>this.setPopup(!1))),or.insertBefore(So,or.firstChild),this.popupContainer.appendChild(C),this.popupContainer.appendChild(or),this.popupContainer.classList.remove("gvs-hidden"),(0,ml.QO)(this.popupContainer,this._t)}else this.popupContainer.classList.remove("gvs-hidden");else this.popupContainer.classList.add("gvs-hidden"),this.setFocus("pic"),this.psv.startKeyboardControl()}playSequence(){this._sequencePlaying=!0;const C=new Event("sequence-playing");this.dispatchEvent(C);const nextPicturePlay=()=>{if(this._sequencePlaying){this.addEventListener("psv:picture-loaded",(()=>{this._playTimer=setTimeout((()=>{nextPicturePlay()}),this.psv.getTransitionDuration())}),{once:!0});try{this.psv.goToNextPicture()}catch(C){this.stopSequence()}}};this.psv.addEventListener("click",(()=>{this.stopSequence()})),nextPicturePlay()}stopSequence(){this._sequencePlaying=!1,this._playTimer&&(clearTimeout(this._playTimer),delete this._playTimer),this.refreshPSV();const C=new Event("sequence-stopped");this.dispatchEvent(C)}isSequencePlaying(){return this._sequencePlaying}toggleSequencePlaying(){this.isSequencePlaying()?this.stopSequence():this.playSequence()}moveCenter(){const C=this.psv.getPictureMetadata();C&&(this.map&&this.isMapWide()?this.map.flyTo({center:C.gps,zoom:20}):this._psvAnimate({speed:Ho.O_,yaw:0,pitch:0,zoom:Ho.Se}))}moveLeft(){this._moveToDirection("left")}moveRight(){this._moveToDirection("right")}moveUp(){this._moveToDirection("up")}moveDown(){this._moveToDirection("down")}_moveToDirection(C){if(this.map&&this.isMapWide()){let Rn;switch(C){case"up":Rn=[0,-100];break;case"left":Rn=[-100,0];break;case"down":Rn=[0,kl];break;case"right":Rn=[kl,0]}this.map.panBy(Rn)}else{let Rn=this.psv.getPosition();switch(C){case"up":Rn.pitch+=bl;break;case"left":Rn.yaw-=bl;break;case"down":Rn.pitch-=bl;break;case"right":Rn.yaw+=bl}this._psvAnimate({speed:Ho.O_,...Rn})}}_psvAnimate(C){this._lastPsvAnim&&this._lastPsvAnim.cancel(),this._lastPsvAnim=this.psv.animate(C)}isMapWide(){if(!this.map)throw new Error("Map is not enabled");return this.mapContainer.parentNode==this.mainContainer}_getDatesForLayerColors(){const C=864e5,Rn=Date.now();return[Rn-30*C,Rn-365*C,Rn-730*C].map((C=>new Date(C).toISOString().split("T")[0]))}_getLayerColorStyle(C){var Rn,or,So,To,Ro;const Oo=["case",["==",["get","hidden"],!0],Uo.DM.HIDDEN],Ho=(null===(Rn=this.psv._myVTour)||void 0===Rn||null===(or=Rn.state)||void 0===or?void 0:or.loadingNode)||(null===(So=this.psv._myVTour)||void 0===So||null===(To=So.state)||void 0===To||null===(Ro=To.currentNode)||void 0===Ro?void 0:Ro.id),qo=Ho?this.psv._picturesSequences[Ho]:null;if("sequences"==C&&qo?Oo.push(["==",["get","id"],qo],Uo.DM.SELECTED):"pictures"==C&&qo&&Oo.push(["in",qo,["get","sequences"]],Uo.DM.SELECTED),this._mapTheme==Dl.AGE){const Rn="sequences"==C?"date":"ts",or=this._getDatesForLayerColors();Oo.push(["!",["has",Rn]],Uo.DM.BASE,[">=",["get",Rn],or[0]],Uo.DM.PALETTE_4,[">=",["get",Rn],or[1]],Uo.DM.PALETTE_3,[">=",["get",Rn],or[2]],Uo.DM.PALETTE_2,Uo.DM.PALETTE_1)}else this._mapTheme==Dl.TYPE?Oo.push(["!",["has","type"]],Uo.DM.BASE,["==",["get","type"],"equirectangular"],Uo.DM.QUALI_1,Uo.DM.QUALI_2):Oo.push(Uo.DM.BASE);return Oo}_getLayerSortStyle(C){var Rn,or,So,To,Ro;const Uo=["case",["==",["get","hidden"],!0],90],Oo=(null===(Rn=this.psv._myVTour)||void 0===Rn||null===(or=Rn.state)||void 0===or?void 0:or.loadingNode)||(null===(So=this.psv._myVTour)||void 0===So||null===(To=So.state)||void 0===To||null===(Ro=To.currentNode)||void 0===Ro?void 0:Ro.id),Ho=Oo?this.psv._picturesSequences[Oo]:null;if("sequences"==C&&Ho?Uo.push(["==",["get","id"],Ho],100):"pictures"==C&&Ho&&Uo.push(["in",Ho,["get","sequences"]],100),this._mapTheme==Dl.AGE){const Rn="sequences"==C?"date":"ts",or=this._getDatesForLayerColors();Uo.push(["!",["has",Rn]],0,[">=",["get",Rn],or[0]],50,[">=",["get",Rn],or[1]],49,[">=",["get",Rn],or[2]],48)}else this._mapTheme==Dl.TYPE&&Uo.push(["!",["has","type"]],0,["==",["get","type"],"equirectangular"],50);return Uo.push(10),Uo}getPicturesNavigation(){return this._picNav}setPicturesNavigation(C){this._picNav=C;const Rn=new CustomEvent("pictures-navigation-changed",{detail:{value:C}});this.dispatchEvent(Rn)}_picturesNavFilter(C){switch(this._picNav){case"seq":return["next","prev"].includes(C.rel);case"pic":return!1;default:return!0}}toggleJOSMLive(C){if(C){const C=new CustomEvent("josm-live-enabled");return this.dispatchEvent(C),fetch(Ll+"/version").catch((C=>{throw this.dispatchEvent(new CustomEvent("josm-live-disabled")),C})).then((()=>{const C=(0,Uo.Iu)(this.psv.getPictureMetadata());if(C){const Rn="".concat(Ll,"/load_and_zoom?").concat(C);fetch(Rn).catch((C=>{console.warn(C),this.toggleJOSMLive(!1)}))}this._josmListener=()=>{const C=(0,Uo.Iu)(this.psv.getPictureMetadata());if(C){const Rn="".concat(Ll,"/zoom?").concat(C);fetch(Rn).catch((C=>{console.warn(C),this.toggleJOSMLive(!1)}))}},this.addEventListener("psv:picture-loaded",this._josmListener),this.addEventListener("psv:picture-loading",this._josmListener)}))}{const C=new CustomEvent("josm-live-disabled");return this.dispatchEvent(C),this._josmListener&&(this.removeEventListener("picture-loading",this._josmListener),this.removeEventListener("picture-loaded",this._josmListener),delete this._josmListener),Promise.resolve()}}setFocus(C){var Rn,or,So;let To=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("map"===C&&!this.map)throw new Error("Map is not enabled");if(!["map","pic"].includes(C))throw new Error("Invalid focus value (should be pic or map)");var Ro;(null===(Rn=this.mapContainer.parentElement)||void 0===Rn||Rn.removeChild(this.mapContainer),null===(or=this.psvContainer.parentElement)||void 0===or||or.removeChild(this.psvContainer),"map"===C)?(this.psv.stopKeyboardControl(),this.map.keyboard.enable(),this.container.classList.add("gvs-focus-map"),this.mainContainer.appendChild(this.mapContainer),this.miniContainer.appendChild(this.psvContainer),this.map.getCanvas().focus()):(null===this||void 0===this||null===(Ro=this.map)||void 0===Ro||Ro.keyboard.disable(),this.psv.startKeyboardControl(),this.container.classList.remove("gvs-focus-map"),this.mainContainer.appendChild(this.psvContainer),this.miniContainer.appendChild(this.mapContainer),this.psvContainer.focus());if(null===this||void 0===this||null===(So=this.map)||void 0===So||So.resize(),this.psv.autoSize(),this.refreshPSV(),!To){const Rn=new CustomEvent("focus-changed",{detail:{focus:C}});this.dispatchEvent(Rn)}}toggleFocus(){if(!this.map)throw new Error("Map is not enabled");this.setFocus(this.isMapWide()?"pic":"map")}setUnfocusedVisible(C){if(!this.map)throw new Error("Map is not enabled");C?this.container.classList.remove("gvs-mini-hidden"):this.container.classList.add("gvs-mini-hidden"),this.map.resize(),this.psv.autoSize()}toggleUnfocusedVisible(){if(!this.map)throw new Error("Map is not enabled");this.setUnfocusedVisible(this.container.classList.contains("gvs-mini-hidden"))}setFilters(C){let Rn=arguments.length>1&&void 0!==arguments[1]&&arguments[1],or=[],So=[];if(this._mapFilters={},C.minDate&&""!==C.minDate&&(this._mapFilters.minDate=C.minDate,or.push([">=",["get","date"],C.minDate]),So.push([">=",["get","ts"],C.minDate])),C.maxDate&&""!==C.maxDate){this._mapFilters.maxDate=C.maxDate,or.push(["<=",["get","date"],C.maxDate]);let Rn=new Date(C.maxDate);Rn.setDate(Rn.getDate()+1),Rn=Rn.toISOString().split("T")[0],So.push(["<=",["get","ts"],Rn])}if(C.type&&""!==C.type&&(this._mapFilters.type=C.type,or.push(["==",["get","type"],C.type]),So.push(["==",["get","type"],C.type])),C.camera&&""!==C.camera){this._mapFilters.camera=C.camera;const Rn=C.camera.toLowerCase().trim()+" ",To=C.camera.toLowerCase().trim()+"zzzzzzzzzzzzzzzzzzzz",Ro=["collator",{"case-sensitive":!1,"diacritic-sensitive":!1}];or.push([">=",["get","model"],Rn,Ro]),or.push(["<=",["get","model"],To,Ro]),So.push([">=",["get","model"],Rn,Ro]),So.push(["<=",["get","model"],To,Ro])}if(C.theme&&Object.values(Dl).includes(C.theme)&&(this._mapFilters.theme=C.theme,this.map&&(this._mapTheme=this._mapFilters.theme,this.map.reloadLayersStyles())),0==or.length?or=null:or.unshift("all"),0==So.length?So=null:(So.unshift("all"),So=["step",["zoom"],!0,dl.Lh,So]),this.map){const C=this.map.getVisibleUsers().includes("geovisio");or&&C&&(or=["step",["zoom"],!0,7,or]),this.map.filterUserLayersContent("sequences",or),this.map.filterUserLayersContent("pictures",So),!Rn&&(null!==or||null!==So||null!==this._mapFilters.theme&&this._mapFilters.theme!==Dl.DEFAULT)&&C&&this.map.getZoom()<7&&this.map.easeTo({zoom:7})}const To=new CustomEvent("filters-changed",{detail:Object.assign({},this._mapFilters)});this.dispatchEvent(To)}}},6792:(C,Rn,or)=>{"use strict";or.d(Rn,{Z:()=>CoreView});or(9835);var So=or(937),To=or(7586),Ro=or(3406),Uo=or(7457),Oo=or(4147),Ho=or(8152);class CoreView extends EventTarget{constructor(C,Rn){var or;let qo=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(super(),this._options=qo,null==this._options&&(this._options={}),this._options.users||(this._options.users=["geovisio"]),"string"===typeof this._options.users&&(this._options.users=[this._options.users]),this._options.style||(this._options.style=Ro.wL),this._options.testing||console.info("\ud83d\udcf7 Panoramax ".concat(this.getClassName()," - Version ").concat(Oo.i8," (").concat("ac07ac0",")\n\n\ud83c\udd98 Issues can be reported at ").concat(Oo.cj.H)),this._t=(0,To.F)(this._options.lang),this._isInternetFast=null,(0,Uo.EF)().then((C=>this._isInternetFast=C)),this._selectedSeqId=this._options.selectedSequence||null,this._selectedPicId=this._options.selectedPicture||null,this.container="string"===typeof C?document.getElementById(C):C,!(this.container instanceof Element))throw new Error("Container is not a valid HTML element, does it exist in your page ?");this.container.classList.add("gvs","gvs-".concat(this.getClassName().toLocaleLowerCase())),(0,Uo.zd)()&&this.container.classList.add("gvs-iframed"),this.loaderContainer=document.createElement("div"),this.container.appendChild(this.loaderContainer),this._loader=new Ho.Z(this,this.loaderContainer),Rn=Rn.replace("/api/search","/api"),this._api=new So.Z(Rn,{users:this._options.users,fetch:null===(or=this._options)||void 0===or?void 0:or.fetchOptions,style:this._options.style}),this._api.onceReady().then((()=>console.info('\ud83c\udf10 Connected to API "'.concat(this._api._metadata.name,'" (').concat(this._api._endpoint,")\n\u2139\ufe0f API runs STAC ").concat(this._api._metadata.stac_version," & GeoVisio ").concat(this._api._metadata.geovisio_version)))).catch((C=>this._loader.dismiss(C,this._t.gvs.error_api)))}getClassName(){return"CoreView"}destroy(){delete this._options,delete this._t,delete this._api,delete this._loader,this.loaderContainer.remove(),delete this.loaderContainer}isWidthSmall(){var C;return(null===(C=this.container)||void 0===C?void 0:C.offsetWidth)<576}isHeightSmall(){var C;return(null===(C=this.container)||void 0===C?void 0:C.offsetHeight)<400}select(){let C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,Rn=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,or=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const So=this._selectedSeqId||null,To=this._selectedPicId||null;(or||To!=Rn)&&(this._selectedSeqId=C,this._selectedPicId=Rn,this.dispatchEvent(new CustomEvent("select",{detail:{seqId:C,picId:Rn,prevSeqId:So,prevPicId:To}})))}}},8152:(C,Rn,or)=>{"use strict";or.d(Rn,{Z:()=>Loader});or(2007);var So=or(3505),To=or(9836);class Loader{constructor(C,Rn){this._parent=C,this.container=Rn,this.container.classList.add("gvs-loader","gvs-loader-visible");const or=document.createElement("img");or.src=To,or.title=this._parent._t.map.loading,or.classList.add("gvs-loader-img"),this.container.appendChild(or);const So=document.createElement("div"),Ro=document.createElement("span"),nextLabelFun=()=>this._parent._t.gvs.loading_labels_fun[Math.floor(Math.random()*this._parent._t.gvs.loading_labels_fun.length)];Ro.innerHTML=this._parent._t.gvs.loading_labels_serious[Math.floor(Math.random()*this._parent._t.gvs.loading_labels_serious.length)];const nextLabelFct=()=>setTimeout((()=>{Ro.innerHTML=nextLabelFun(),this._loaderLabelChanger=nextLabelFct()}),500+1e3*Math.random());this._loaderLabelChanger=nextLabelFct(),So.appendChild(Ro),this.container.appendChild(So)}isVisible(){return this.container.classList.contains("gvs-loader-visible")}dismiss(){let C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,Rn=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,or=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(clearTimeout(this._loaderLabelChanger),C){!0!==C&&console.error(C),this.container.children[0].src=So,this.container.children[0].style.width="200px",this.container.children[0].style.animation="unset";let To="<small>".concat(or?this._parent._t.gvs.error_click:this._parent._t.gvs.error_retry,"</small>");Rn&&(To=Rn+"<br />"+To),this.container.children[1].innerHTML="".concat(this._parent._t.gvs.error,"<br />").concat(To),or&&this.container.addEventListener("click",or);const Ro=Rn||"Panoramax JS had a blocking exception",Uo=new CustomEvent("broken",{detail:{error:Ro}});throw this._parent.dispatchEvent(Uo),new Error(Ro)}{this.container.classList.remove("gvs-loader-visible"),setTimeout((()=>this.container.remove()),2e3);const C=new CustomEvent("ready");this._parent.dispatchEvent(C),or&&or()}}}},2093:(C,Rn,or)=>{"use strict";or.d(Rn,{Z:()=>Map});or(1786);var So=or(3406),To=or(7457),Ro=or(9836),Uo=or(2506),Oo=or(6812),Ho=or(3732),qo=(or(262),or(4307)),dl=or.n(qo),ml=or(2609),fl=or.n(ml),vl=or(6351);dl().workerClass=fl(),dl().addProtocol("pmtiles",(new vl.b$).tile);const bl=["antialias","attributionControl","bearing","bearingSnap","bounds","boxZoom","center","clickTolerance","collectResourceTiming","cooperativeGestures","crossSourceCollisions","doubleClickZoom","dragPan","dragRotate","fadeDuration","failIfMajorPerformanceCaveat","fitBoundsOptions","hash","interactive","keyboard","localIdeographFontFamily","locale","logoPosition","maplibreLogo","maxBounds","maxCanvasSize","maxPitch","maxTileCacheSize","maxTileCacheZoomLevels","maxZoom","minPitch","minZoom","pitch","pitchWithRotate","pixelRatio","preserveDrawingBuffer","refreshExpiredTiles","renderWorldCopies","scrollZoom","touchPitch","touchZoomRotate","trackResize","transformCameraUpdate","transformRequest","validateStyle","zoom"];class Map extends dl().Map{constructor(C,Rn){let or=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var To;super({container:Rn,style:(0,So.Ec)(C,or),center:[0,0],zoom:0,maxZoom:24,attributionControl:!1,dragRotate:!1,pitchWithRotate:!1,preserveDrawingBuffer:!C.isWidthSmall(),transformRequest:C._api._getMapRequestTransform(),locale:C._t.maplibre,...(To=or,Object.fromEntries(Object.entries(To).filter((C=>{let[Rn]=C;return bl.includes(Rn)}))))}),this._loadMarkerImages(),this._parent=C,this._options=or,this.getContainer().classList.add("gvs-map"),this._options.raster&&(this._options.background=this._options.background||"streets"),this._attribution=new(dl().AttributionControl)({compact:!1}),this.addControl(this._attribution),this._initGeocoder(),this._initMapPosition(),this._picMarker=this._getPictureMarker(),this._picMarkerPreview=this._getPictureMarker(!1),this._picThumbUrl={},this._seqPictures={},this._userLayers=new Set,this.on("mousemove","sequences",this._onSequenceHover.bind(this)),this._parent.addEventListener("select",this.reloadLayersStyles.bind(this)),this.on("load",(async()=>{await this.setVisibleUsers(this._parent._options.users),this.reloadLayersStyles(),this.resize()}))}destroy(){this.remove(),delete this._parent,delete this._options,delete this._attribution,delete this._picMarker,delete this._picMarkerPreview,delete this._picThumbUrl,delete this._seqPictures,delete this._userLayers}_initMapPosition(){this._options.center&&this._options.center!=[0,0]||this._options.zoom&&0!==this._options.zoom||this._options.hash||this._parent._api.onceReady().then((()=>{var C,Rn;let or=null===(C=this._parent)||void 0===C||null===(Rn=C._api)||void 0===Rn?void 0:Rn.getDataBbox();if(or)try{or=new(dl().LngLatBounds)(or),this.loaded()?this.fitBounds(or,{animate:!1}):this.on("load",(()=>this.fitBounds(or,{animate:!1})))}catch(So){console.warn("Received invalid bbox: "+or)}}))}_initGeocoder(){var C,Rn;const or={ban:So.uD,nominatim:So.g8},To=(null===(C=this._options)||void 0===C||null===(Rn=C.geocoder)||void 0===Rn?void 0:Rn.engine)||"nominatim";this.geocoder=or[To],this._geolocate=new(dl().GeolocateControl)({positionOptions:{enableHighAccuracy:!0,timeout:6e4,maximumAge:3e5},showAccuracyCircle:!0,showUserLocation:!0,trackUserLocation:!0}).onAdd(this)}_loadMarkerImages(){[{id:"gvs-marker",img:Ro},{id:"gvs-arrow-flat",img:Oo},{id:"gvs-arrow-360",img:Ho}].forEach((C=>{const Rn=new Image(64,64);Rn.onload=()=>this.addImage(C.id,Rn),Rn.src=C.img}))}reloadVectorTiles(){[...this._userLayers].forEach((C=>{const Rn=this.getSource((0,So.eY)(C));Rn.setTiles(Rn.tiles)}))}hasTwoBackgrounds(){return void 0!==this.getLayer(So.Ws)}getBackground(){if(!this.getLayer(So.Ws))return"streets";return"visible"==this.getLayoutProperty(So.Ws,"visibility")?"aerial":"streets"}setBackground(C){if(!this.getLayer(So.Ws)&&"aerial"===C)throw new Error("No aerial imagery available");if(this.getLayer(So.Ws)){this.setLayoutProperty(So.Ws,"visibility","aerial"===C?"visible":"none");const Rn=new CustomEvent("map:background-changed",{detail:{background:C||"streets"}});this._parent.dispatchEvent(Rn)}}getVisibleUsers(){return[...this._userLayers].filter((C=>"visible"===this.getLayoutProperty((0,So.lh)(C,"pictures"),"visibility")))}async setVisibleUsers(){let C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];"string"===typeof C&&(C=[C]),await Promise.all(C.filter((C=>""!=C&&!this._userLayers.has(C))).map((C=>this._createPicturesTilesLayer(C))));const Rn=["pictures","sequences","sequences_plus","grid","pictures_symbols"];[...this._userLayers].forEach((or=>{Rn.forEach((Rn=>{const To=(0,So.lh)(or,Rn);this.getLayer(To)&&this.setLayoutProperty(To,"visibility",C.includes(or)?"visible":"none")}))}));const or=new CustomEvent("map:users-changed",{detail:{usersIds:C}});this._parent.dispatchEvent(or)}filterUserLayersContent(C,Rn){[...this._userLayers].forEach((or=>{this.setFilter((0,So.lh)(or,C),Rn),"sequences"===C&&this.setFilter((0,So.lh)(or,"sequences_plus"),Rn),"pictures"===C&&this.setFilter((0,So.lh)(or,"pictures_symbols"),Rn)}))}displayPictureMarker(C,Rn,or){this._picMarkerPreview.remove(),this._picMarker.setLngLat([C,Rn]).setRotation(or).addTo(this),this.reloadLayersStyles(),this.flyTo({center:[C,Rn],zoom:this.getZoom()<So.Lh+2?So.Lh+2:this.getZoom(),maxDuration:2e3})}reloadLayersStyles(){const updateStyle=(C,Rn)=>{[...this._userLayers].forEach((or=>{for(let To in Rn.layout)this.setLayoutProperty((0,So.lh)(or,C),To,Rn.layout[To]);for(let To in Rn.paint)this.setPaintProperty((0,So.lh)(or,C),To,Rn.paint[To])}))};["pictures","pictures_symbols","sequences"].forEach((C=>{updateStyle(C,this._getLayerStyleProperties(C))}))}async _createPicturesTilesLayer(C){this._userLayers.add(C);const Rn=this.getStyle().layers.find(So.RF);if("geovisio"!==C&&!this.getSource("geovisio_".concat(C))){const or=await this._parent._api.getUserMapStyle(C);Object.entries(or.sources).forEach((C=>{let[Rn,or]=C;return this.addSource(Rn,or)})),or.layers=or.layers||[];or.layers.concat((0,So.FS)(or.sources,or.layers)).forEach((C=>this.addLayer(C,null===Rn||void 0===Rn?void 0:Rn.id)))}this._picPreviewTimer=null,this._picPopup=new(dl().Popup)({closeButton:!1,closeOnClick:!this._parent.isWidthSmall(),offset:3}),this._picPopup.on("close",(()=>{delete this._picPopup._picId}));const or=(0,So.lh)(C,"pictures");this.on("mousemove",or,(C=>{this.getCanvas().style.cursor="pointer";const Rn=Object.assign({},C);clearTimeout(this._picPreviewTimer),this._picPreviewTimer=setTimeout((()=>this._attachPreviewToPictures(Rn,or)),100)})),this.on("mouseleave",or,(()=>{clearTimeout(this._picPreviewTimer),this.getCanvas().style.cursor="",this._picPopup._picId,this._picPopup.remove()})),this.on("click",or,this._onPictureClick.bind(this));const To=(0,So.lh)(C,"sequences_plus");this.on("mousemove",To,(C=>{if(this.getZoom()<=So.Lh+1&&(this.getCanvas().style.cursor="pointer",C.features[0].properties.id)){const Rn=Object.assign({},C);clearTimeout(this._picPreviewTimer),this._picPreviewTimer=setTimeout((()=>this._attachPreviewToPictures(Rn,To)),100)}})),this.on("mouseleave",To,(()=>{clearTimeout(this._picPreviewTimer),this.getCanvas().style.cursor="",this._picPopup._picId,this._picPopup.remove()})),this.on("click",To,(C=>{C.preventDefault(),this.getZoom()<=So.Lh+1&&this._onSequenceClick(C)})),"geovisio"===C&&this.getLayer("geovisio_grid")&&(this.on("mousemove","geovisio_grid",(C=>{if(this.getZoom()<=So.Lh+1){this.getCanvas().style.cursor="pointer";const Rn=Object.assign({},C);clearTimeout(this._picPreviewTimer),this._picPreviewTimer=setTimeout((()=>this._attachPreviewToPictures(Rn,"geovisio_grid")),100)}})),this.on("mouseleave","geovisio_grid",(()=>{clearTimeout(this._picPreviewTimer),this.getCanvas().style.cursor="",this._picPopup._picId,this._picPopup.remove()})),this.on("click","geovisio_grid",(C=>{C.preventDefault(),this.flyTo({center:C.lngLat,zoom:So.Lh-6})}))),this.on("click",(C=>{!1===C.defaultPrevented&&(clearTimeout(this._picPreviewTimer),this._picPopup.remove())}))}_getLayerStyleProperties(C){if("pictures_symbols"===C)return{paint:{},layout:{"icon-image":["case",["==",["get","id"],this._parent._selectedPicId],"",["==",["get","type"],"equirectangular"],"gvs-arrow-360","gvs-arrow-flat"],"symbol-sort-key":this._getLayerSortStyle(C)}};{const Rn={pictures:"circle",sequences:"line"};return{paint:Object.assign({["".concat(Rn[C],"-color")]:this._getLayerColorStyle(C)},So.lg[C.toUpperCase()].paint),layout:Object.assign({["".concat(Rn[C],"-sort-key")]:this._getLayerSortStyle(C)},So.lg[C.toUpperCase()].layout)}}}_getLayerColorStyle(C){const Rn=["case",["==",["get","hidden"],!0],To.DM.HIDDEN,["==",["get","geovisio:status"],"hidden"],To.DM.HIDDEN],or=this._parent._selectedSeqId;return"sequences"==C&&or?Rn.push(["==",["get","id"],or],To.DM.SELECTED):C.startsWith("pictures")&&or&&Rn.push(["in",or,["get","sequences"]],To.DM.SELECTED),Rn.push(To.DM.BASE),Rn}_getLayerSortStyle(C){const Rn=["case",["==",["get","hidden"],!0],90],or=this._parent._selectedSeqId;return"sequences"==C&&or?Rn.push(["==",["get","id"],or],100):C.startsWith("pictures")&&or&&Rn.push(["in",or,["get","sequences"]],100),Rn.push(10),Rn}_attachPreviewToPictures(C,Rn){let or=C.features.pop();if(!or||or.properties.id==this._picPopup._picId)return;let To=null;if(Rn.endsWith("pictures")?To=or.geometry.coordinates.slice():C.lngLat&&(To=[C.lngLat.lng,C.lngLat.lat]),!To){const C="LineString"===or.geometry.type?[or.geometry.coordinates]:or.geometry.coordinates;let Rn=null;const So=this.getBounds(),Ro=So.getCenter();for(let or=0;or<C.length;or++)for(let Uo=0;Uo<C[or].length;Uo++)if(So.contains(C[or][Uo])){let So=Ro.distanceTo(new(dl().LngLat)(...C[or][Uo]));(null===Rn||So<Rn)&&(To=C[or][Uo],Rn=So)}if(!To)return}this._picPopup.setLngLat(To).addTo(this),this._picThumbUrl[or.properties.id]||this._picPopup.setDOMContent((0,So.sl)(this._parent._t)),this._picPopup._loading=or.properties.id,this._picPopup._picId=or.properties.id;const displayThumb=C=>{if(this._picPopup._loading===or.properties.id)if(delete this._picPopup._loading,C){let Rn=document.createElement("img");Rn.classList.add("gvs-map-thumb"),Rn.alt=this._parent._t.thumbnail;let So=new Image;if(So.src=C,So.addEventListener("load",(()=>{or.properties.hidden?Rn.children[0].src=So.src:Rn.src=So.src,this._picPopup.setDOMContent(Rn)})),or.properties.hidden){const C=document.createElement("div");C.classList.add("gvs-map-thumb-legend"),C.appendChild(document.createTextNode(this._parent._t.map.not_public));const or=document.createElement("div");or.appendChild(Rn),or.appendChild(C),Rn=or}}else this._picPopup.setHTML("<i>".concat(this._parent._t.no_thumbnail,"</i>"))};Rn.endsWith("pictures")?this._getPictureThumbURL(or.properties.id).then(displayThumb):Rn.endsWith("grid")?this._getThumbURL(To).then(displayThumb):this._getSequenceThumbURL(or.properties.id,new(dl().LngLat)(...To)).then(displayThumb)}_getThumbURL(C){return this._parent._api.getPicturesAroundCoordinates(C[1],C[0],.1,1).then((C=>{var Rn;const or=null===C||void 0===C||null===(Rn=C.features)||void 0===Rn?void 0:Rn.pop();return or?this._parent._api.findThumbnailInPictureFeature(or):null}))}_getSequenceThumbURL(C,Rn){return Rn?this._parent._api.getPicturesAroundCoordinates(Rn.lat,Rn.lng,1,1,C).then((Rn=>{var or;return(null===Rn||void 0===Rn||null===(or=Rn.features)||void 0===or?void 0:or.length)>0?this._parent._api.findThumbnailInPictureFeature(Rn.features[0]):this._parent._api.getPictureThumbnailURLForSequence(C)})):this._parent._api.getPictureThumbnailURLForSequence(C)}_getPictureThumbURL(C,Rn){let or=null;return C&&(void 0!==this._picThumbUrl[C]?or="string"===typeof this._picThumbUrl[C]?Promise.resolve(this._picThumbUrl[C]):this._picThumbUrl[C]:(this._picThumbUrl[C]=this._parent._api.getPictureThumbnailURL(C,Rn).then((Rn=>Rn?(this._picThumbUrl[C]=Rn,Rn):(this._picThumbUrl[C]=null,null))).catch((()=>{this._picThumbUrl[C]=null})),or=this._picThumbUrl[C])),or}_getPictureMarker(){let C=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const Rn=document.createElement("img");return Rn.src=C?Uo:Ro,new(dl().Marker)({element:Rn})}_onSequenceHover(C){var Rn;C.preventDefault(),C.features.length>0&&null!==(Rn=C.features[0].properties)&&void 0!==Rn&&Rn.id&&this._parent.dispatchEvent(new CustomEvent("map:sequence-hover",{detail:{seqId:C.features[0].properties.id}}))}_onSequenceClick(C){var Rn;C.preventDefault(),C.features.length>0&&null!==(Rn=C.features[0].properties)&&void 0!==Rn&&Rn.id&&this._parent.dispatchEvent(new CustomEvent("map:sequence-click",{detail:{seqId:C.features[0].properties.id,coordinates:C.lngLat}}))}_onPictureClick(C){var Rn,or;C.preventDefault();const So=(null===C||void 0===C||null===(Rn=C.features)||void 0===Rn?void 0:Rn.length)>0?C.features[0]:null;if(null!==So&&void 0!==So&&null!==(or=So.properties)&&void 0!==or&&or.id){let Rn=null;try{So.properties.sequences&&(Array.isArray(So.properties.sequences)||(So.properties.sequences=JSON.parse(So.properties.sequences)),Rn=So.properties.sequences.pop())}catch(C){console.log("Sequence ID is not available in vector tiles for picture "+So.properties.id)}this._parent.dispatchEvent(new CustomEvent("map:picture-click",{detail:{picId:So.properties.id,seqId:Rn,feature:So}}))}}}},2354:(C,Rn,or)=>{"use strict";or.d(Rn,{O_:()=>ml,Se:()=>dl,ZP:()=>Photo,q7:()=>fl});or(9154);var So=or(9364),To=or(3505),Ro=or(7457),Uo=(or(1066),or(8386),or(9254),or(2825),or(3114)),Oo=or(2188),Ho=or(5856);const qo={baseUrl:So,width:1280,cols:2,rows:1,tileUrl:()=>null},dl=30,ml=250,fl=3e3;Uo.AE.useNewAnglesOrder=!0;class Photo extends Uo.AE{constructor(C,Rn){var or,So,To,Ro;let Uo=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};super({container:Rn,adapter:[Ho.Z,{showErrorTile:!1,baseBlur:!1,resolution:C.isWidthSmall()?32:64,shouldGoFast:Uo.shouldGoFast}],withCredentials:"include"==(null===(or=C._options)||void 0===or||null===(So=or.fetchOptions)||void 0===So?void 0:So.credentials),requestHeaders:null===(To=C._options)||void 0===To||null===(Ro=To.fetchOptions)||void 0===Ro?void 0:Ro.headers,panorama:qo,lang:C._t.psv,minFov:5,loadingTxt:"&nbsp;",navbar:null,rendererParameters:{preserveDrawingBuffer:!C.isWidthSmall()},plugins:[[Oo.P,{dataMode:"server",positionMode:"gps",renderMode:"3d",preload:!0,getNode:()=>{},transitionOptions:()=>{},arrowsPosition:{linkOverlapAngle:Math.PI/6}}]],...Uo}),this._parent=C,Rn.classList.add("gvs-psv"),this._shouldGoFast=(null===Uo||void 0===Uo?void 0:Uo.shouldGoFast)||(()=>!1),this._transitionDuration=(null===Uo||void 0===Uo?void 0:Uo.transitionDuration)||ml,this._myVTour=this.getPlugin(Oo.P),this._myVTour.datasource.nodeResolver=this._getNodeFromAPI.bind(this),this._myVTour.config.transitionOptions=this._psvNodeTransition.bind(this),this._clearArrows=this._myVTour.arrowsRenderer.clear.bind(this._myVTour.arrowsRenderer),this._myVTour.arrowsRenderer.clear=()=>{},this._picturesSequences={},this._myVTour.addEventListener("enter-arrow",this._onEnterArrow.bind(this)),this._myVTour.addEventListener("leave-arrow",this._onLeaveArrow.bind(this)),this._myVTour.addEventListener("node-changed",this._onNodeChanged.bind(this)),this.addEventListener("position-updated",this._onPositionUpdated.bind(this)),this.addEventListener("zoom-updated",this._onZoomUpdated.bind(this)),this._parent.addEventListener("select",this._onSelect.bind(this)),this.loader.size=150,this.loader.color="rgba(61, 61, 61, 0.5)",this.loader.textColor="rgba(255, 255, 255, 0.7)",this.loader.border=5,this.loader.thickness=10,this.loader.canvas.setAttribute("viewBox","0 0 150 150"),this.loader.__updateContent()}async _getNodeFromAPI(C){var Rn,or,So;if(!C)return;const To=await fetch(this._parent._api.getPictureMetadataUrl(C,this._picturesSequences[C]),this._parent._api._getFetchOptions());let Uo=await To.json();if(Uo.features&&(Uo=Uo.features.pop()),!Uo||0===Object.keys(Uo).length||!To.ok)throw this._parent._loader&&this._parent._loader.dismiss(!0,this._parent._t.gvs.error_pic),new Error("Picture with ID "+C+" was not found");this._picturesSequences[C]=Uo.collection;const Oo=(0,Ro.FF)(Uo,this._parent._t,this._parent._isInternetFast,null===(Rn=this._parent._picturesNavFilter)||void 0===Rn?void 0:Rn.bind(this._parent));var Ho,qo;null!==Oo&&void 0!==Oo&&null!==(or=Oo.sequence)&&void 0!==or&&or.prevPic&&(this._picturesSequences[null===Oo||void 0===Oo||null===(Ho=Oo.sequence)||void 0===Ho?void 0:Ho.prevPic]=Uo.collection);null!==Oo&&void 0!==Oo&&null!==(So=Oo.sequence)&&void 0!==So&&So.nextPic&&(this._picturesSequences[null===Oo||void 0===Oo||null===(qo=Oo.sequence)||void 0===qo?void 0:qo.nextPic]=Uo.collection);return Oo}_psvNodeTransition(C,Rn,or){var So,To;let Uo={};const Oo=this._shouldGoFast()?0:Math.min(ml,this._transitionDuration),Ho=Oo>100,qo=null!=(or||(null===Rn||void 0===Rn?void 0:Rn.links.find((Rn=>Rn.nodeId==C.id)))),fl=Rn&&C.sequence.id===Rn.sequence.id,vl=((null===Rn||void 0===Rn||null===(So=Rn.properties)||void 0===So?void 0:So["view:azimuth"])||0)*(Math.PI/180),bl=((null===C||void 0===C||null===(To=C.properties)||void 0===To?void 0:To["view:azimuth"])||0)*(Math.PI/180);this.setOption("maxFov",Math.min(3*C.horizontalFov/4,90));const kl={speed:0,fadeIn:!1,rotation:!1,rotateTo:{pitch:0,yaw:0},zoomTo:dl};if(360==C.horizontalFov)Rn?(0,Ro.Sp)(Rn.gps,C.gps)>=.001?Uo=kl:(Uo={speed:Oo,fadeIn:qo&&Ho,rotation:qo&&fl&&Ho,rotateTo:this.getPosition()},Uo.rotateTo.yaw+=vl-bl):Uo=kl;else if(fl){const C=this.getPosition().yaw,or=Rn.horizontalFov*(Math.PI/180)/2,So=C<=or||C>=2*Math.PI-or,To=Math.abs(vl-bl)<=Math.PI/4;Uo={speed:Oo,fadeIn:qo&&To&&Ho,rotation:qo&&To&&Ho,rotateTo:So?this.getPosition():{pitch:0,yaw:0},zoomTo:So?this.getZoomLevel():dl}}else Uo=kl;Uo.fadeIn&&Uo.speed>=150?setTimeout(this._clearArrows,Uo.speed-100):this._clearArrows();const Ll=new CustomEvent("psv:picture-loading",{detail:{...Object.assign({},this.getXYZ(),Uo.rotateTo?{x:180*(bl+Uo.rotateTo.yaw)/Math.PI}:null,Uo.zoomTo?{z:Uo.zoomTo}:null),picId:C.id,lon:C.gps[0],lat:C.gps[1]}});return this._parent.dispatchEvent(Ll),Uo}_onEnterArrow(C){const Rn=C.link,or=C.node;let So;or&&(So=360===or.horizontalFov?(this.getPictureOriginalHeading()+180*this.getPosition().yaw/Math.PI)%360:this.getPictureOriginalHeading());const To=new CustomEvent("psv:picture-preview-started",{detail:{picId:Rn.nodeId,coordinates:Rn.gps,direction:So}});this._parent.dispatchEvent(To)}_onLeaveArrow(C){const Rn=C.link,or=new CustomEvent("psv:picture-preview-stopped",{detail:{picId:Rn.nodeId}});this._parent.dispatchEvent(or)}_onPositionUpdated(C){let{position:Rn}=C;const or=(0,Ro.wW)(Rn,this.getZoomLevel());or.x+=this.getPictureOriginalHeading(),or.x=or.x%360;const So=new CustomEvent("psv:view-rotated",{detail:or});this._parent.dispatchEvent(So),this._onTilesStartLoading()}_onZoomUpdated(C){let{zoomLevel:Rn}=C;const or=new CustomEvent("psv:view-rotated",{detail:{...this.getXY(),z:Rn}});this._parent.dispatchEvent(or),this._onTilesStartLoading()}_onNodeChanged(C){for(let So of document.getElementsByClassName("gvs-psv-tour-arrows"))So.classList.remove("gvs-clicked");if(C.node.id){var Rn,or;this._parent.select(null===(Rn=C.node)||void 0===Rn||null===(or=Rn.sequence)||void 0===or?void 0:or.id,C.node.id);const So=this.getPictureMetadata();if(!So)return;this._prevSequence=So.sequence.id;const To=new CustomEvent("psv:picture-loaded",{detail:{...this.getXYZ(),picId:C.node.id,lon:So.gps[0],lat:So.gps[1]}});this._parent.dispatchEvent(To),So.panorama.hdUrl?(this.setOption("downloadUrl",So.panorama.hdUrl),this.setOption("downloadName",C.node.id+".jpg")):this.setOption("downloadUrl",null)}this._onTilesStartLoading()}_onTilesStartLoading(){this._tilesQueueTimer&&(clearInterval(this._tilesQueueTimer),delete this._tilesQueueTimer),this._tilesQueueTimer=setInterval((()=>{if(0===Object.keys(this.adapter.queue.tasks).length){if(this._myVTour.state.currentNode){const C=new Event("psv:picture-tiles-loaded",{picId:this._myVTour.state.currentNode.id});this._parent.dispatchEvent(C)}clearInterval(this._tilesQueueTimer),delete this._tilesQueueTimer}}),100)}getPictureMetadata(){return this._myVTour.state.currentNode?Object.assign({},this._myVTour.state.currentNode):null}_onSelect(C){var Rn;C.detail.seqId&&(this._picturesSequences[C.detail.picId]=C.detail.seqId),(null===(Rn=this._myVTour.getCurrentNode())||void 0===Rn?void 0:Rn.id)!==C.detail.picId&&(this.loader.show(),this._myVTour.setCurrentNode(C.detail.picId).catch((C=>{this.showErrorOverlay(C,this._parent._t.gvs.error_pic,!0)})))}goToNextPicture(){if(!this.getPictureMetadata())throw new Error("No picture currently selected");const C=this.getPictureMetadata().sequence.nextPic;if(!C)throw new Error("No next picture available");this._parent.select(this.getPictureMetadata().sequence.id,C)}goToPrevPicture(){if(!this.getPictureMetadata())throw new Error("No picture currently selected");const C=this.getPictureMetadata().sequence.prevPic;if(!C)throw new Error("No previous picture available");this._parent.select(this.getPictureMetadata().sequence.id,C)}async goToPosition(C,Rn){return this._parent._api.getPicturesAroundCoordinates(C,Rn).then((C=>{if(C.features.length>0){const Rn=C.features.pop();return this._parent.select(null===Rn||void 0===Rn?void 0:Rn.collection,Rn.id),Rn.id}return Promise.reject(new Error("No picture found nearby given coordinates"))}))}getXY(){const C=(0,Ro.wW)(this.getPosition());return C.x=(C.x+this.getPictureOriginalHeading())%360,C}getXYZ(){const C=this.getXY();return C.z=this.getZoomLevel(),C}getPictureOriginalHeading(){var C,Rn;return(null===(C=this.getPictureMetadata())||void 0===C||null===(Rn=C.properties)||void 0===Rn?void 0:Rn["view:azimuth"])||0}getPictureRelativeHeading(){return(0,Ro.r)(this.getPictureMetadata())}clearPictureMetadataCache(){var C,Rn,or,So;const To=null===(C=this.getPictureMetadata())||void 0===C?void 0:C.id,Ro=null===(Rn=this.getPictureMetadata())||void 0===Rn||null===(or=Rn.sequence)||void 0===or?void 0:or.id;null===(So=this._myVTour.state.currentTooltip)||void 0===So||So.hide(),this._myVTour.state.currentTooltip=null,this._myVTour.state.currentNode=null,this._myVTour.state.preload={},this._myVTour.datasource.nodes={},To&&this._parent.select(Ro,To)}setXYZ(C,Rn,or){const So=(0,Ro.J9)(C-this.getPictureOriginalHeading(),Rn,or);this.rotate({yaw:So.yaw,pitch:So.pitch}),this.zoom(So.zoom)}setHigherContrast(C){this.renderer.renderer.toneMapping=C?3:0,this.renderer.renderer.toneMappingExposure=C?2:1,this.needsUpdate()}getTransitionDuration(){return this._transitionDuration}setTransitionDuration(C){if((C=parseFloat(C))<100||C>fl)throw new Error("Invalid transition duration (should be between 100 and "+fl+")");this._transitionDuration=C;const Rn=new CustomEvent("psv:transition-duration-changed",{detail:{value:C}});this._parent.dispatchEvent(Rn)}setPanorama(C,Rn){const onFailure=C=>this.showErrorOverlay(C,this._parent._t.gvs.error_pic,!0);try{return super.setPanorama(C,Rn).catch(onFailure)}catch(or){onFailure(or)}}showErrorOverlay(C,Rn,or){this._parent._loader.isVisible()||!this.overlay.isVisible()?this._parent._loader.dismiss(C,Rn,or?()=>{this._parent._loader.dismiss(),this.overlay.hide()}:void 0):(console.error(C),this.overlay.show({image:'<img style="width: 200px" src="'.concat(To,'" />'),title:this._parent._t.gvs.error,text:Rn+"<br />"+this._parent._t.gvs.error_click,dissmisable:or}))}}},937:(C,Rn,or)=>{"use strict";or.d(Rn,{Z:()=>API});var So=or(3406);class API{constructor(C){let Rn=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null===C||void 0===C||"string"!==typeof C)throw new Error("endpoint parameter is empty or not a valid string");if(C.startsWith("/")&&(C=window.location.href.split("/").slice(0,3).join("/")+C),!API.isValidHttpUrl(C))throw new Error("endpoint parameter is not a valid URL: ".concat(C));this._endpoint=C,this._isReady=0,this._dataBbox=null,this._fetchOpts=(null===Rn||void 0===Rn?void 0:Rn.fetch)||{},this._metadata={},Rn.skipReadLanding||(this._readLanding=fetch(C,this._getFetchOptions()).then((C=>C.json())).then((C=>this._parseLanding(C,Rn))).catch((C=>(this._isReady=-1,console.error(C),Promise.reject("Viewer failed to communicate with API")))).then((()=>this._loadMapStyles(Rn.style,Rn.users))).then((()=>(this._isReady=1,"API is ready"))))}onceReady(){return-1==this._isReady?Promise.reject("Viewer failed to communicate with API"):1==this._isReady?Promise.resolve("API is ready"):this._readLanding}isReady(){return 1==this._isReady}_parseLanding(C,Rn){var or,So;if(this._endpoints={collections:null,search:null,style:null,user_style:null,tiles:(null===Rn||void 0===Rn?void 0:Rn.tiles)||null,user_tiles:null,user_search:null,collection_preview:null,item_preview:null,rss:null,report:null},!C||!C.links||!Array.isArray(C.links))throw new Error("API Landing page doesn't contain 'links' list");if(!C.stac_version.startsWith("1.0"))throw new Error("API is not in a supported STAC version (Panoramax viewer supports only 1.0, API is ".concat(C.stac_version,")"));this._metadata.name=C.title||"Unnamed",this._metadata.stac_version=C.stac_version,this._metadata.geovisio_version=C.geovisio_version||"Unknown";const To=[],Ro=[];if([{rel:"search",type:"application/geo+json",endpointId:"search",mandatory:!0,missingIssue:"No direct access to pictures metadata."},{rel:"data",type:"application/json",endpointId:"collections",mandatory:!0,missingIssue:"No way for viewer to access sequences."},{rel:"data",type:"application/rss+xml",endpointId:"rss"},{rel:"xyz",type:"application/vnd.mapbox-vector-tile",endpointId:"tiles"},{rel:"xyz-style",type:"application/json",endpointId:"style"},{rel:"user-xyz-style",type:"application/json",endpointId:"user_style"},{rel:"user-xyz",type:"application/vnd.mapbox-vector-tile",endpointId:"user_tiles"},{rel:"user-search",type:"application/json",endpointId:"user_search",missingIssue:"Filter map data by user name will not be available."},{rel:"collection-preview",type:"image/jpeg",endpointId:"collection_preview",missingIssue:"Display of thumbnail could be slower."},{rel:"item-preview",type:"image/jpeg",endpointId:"item_preview",missingIssue:"Display of thumbnail could be slower."},{rel:"report",type:"application/json",endpointId:"report"}].forEach((Rn=>{const or=C.links.find((C=>C.rel==Rn.rel&&C.type==Rn.type));if(or){if(!API.isValidHttpUrl(or.href))throw new Error("API endpoint '".concat(or.rel,"' (").concat(or.type,") is not a valid URL: ").concat(or.href));this._endpoints[Rn.endpointId]||(this._endpoints[Rn.endpointId]=or.href)}else if(!this._endpoints[Rn.endpointId]){let C="API doesn't offer a '".concat(Rn.rel,"' (").concat(Rn.type,") endpoint in its links");Rn.missingIssue&&(C+="\n".concat(Rn.missingIssue)),Rn.mandatory?To.push(C):Rn.missingIssue&&Ro.push(C)}})),this._endpoints.style||this._endpoints.tiles||Ro.push("API doesn't offer 'xyz' or 'xyz-style' endpoints in its links.\nMap widget will not be available."),this._endpoints.user_style||this._endpoints.user_tiles||Ro.push("API doesn't offer 'user-xyz' or 'user-xyz-style' endpoints in its links.\nFilter map data by user ID will not be available."),Ro.forEach((C=>console.warn(C))),To.length>0)throw new Error(To.join("\n"));const Uo=null===C||void 0===C||null===(or=C.extent)||void 0===or||null===(So=or.spatial)||void 0===So?void 0:So.bbox;this._dataBbox=Uo&&Array.isArray(Uo)&&Uo.length>0&&Array.isArray(Uo[0])&&4===Uo[0].length?[[Uo[0][0],Uo[0][1]],[Uo[0][2],Uo[0][3]]]:null}_loadMapStyles(C,Rn){const or=new Set(Rn||[]);this.mapStyle={version:8,sources:{},layers:[]};const So=[this.getMapStyle()];if("string"===typeof C){const Rn=C.startsWith(this._endpoint)?this._getFetchOptions():void 0;So.push(fetch(C,Rn).then((C=>C.json())))}else"object"===typeof C&&So.push(Promise.resolve(C));return[...or].filter((C=>"geovisio"!==C)).forEach((C=>{So.push(this.getUserMapStyle(C,!0))})),Promise.all(So).then((C=>{const Rn=["bearing","center","glyphs","light","metadata","name","pitch","sky","sprite","terrain","transition","zoom"];C.forEach((C=>{Rn.forEach((Rn=>{C[Rn]&&(this.mapStyle[Rn]=C[Rn]||this.mapStyle[Rn])})),Object.assign(this.mapStyle.sources,(null===C||void 0===C?void 0:C.sources)||{}),this.mapStyle.layers=this.mapStyle.layers.concat((null===C||void 0===C?void 0:C.layers)||[])}))})).catch((C=>console.error(C)))}_getFetchOptions(){return Object.assign({},this._fetchOpts)}_getMapRequestTransform(){if(Object.keys(this._getFetchOptions()).length>0)return C=>{if(C.startsWith(this._endpoint))return{url:C,...this._getFetchOptions()}}}async getSequenceItems(C){if(!this.isReady())throw new Error("API is not ready to use");try{return API.isIdValid(C),fetch("".concat(this._endpoints.collections,"/").concat(C,"/items"),this._getFetchOptions()).then((C=>C.json()))}catch(Rn){return Promise.reject(Rn)}}getPicturesAroundCoordinatesUrl(C,Rn){let or=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e-4,So=arguments.length>3?arguments[3]:void 0,To=arguments.length>4?arguments[4]:void 0;if(!this.isReady())throw new Error("API is not ready to use");if(isNaN(parseFloat(C))||isNaN(parseFloat(Rn)))throw new Error("lat and lon parameters should be valid numbers");const Ro=[Rn-or,C-or,Rn+or,C+or].map((C=>C.toFixed(4))).join(","),Uo=So?"&limit=".concat(So):"",Oo=To?"&collections=".concat(To):"";return"".concat(this._endpoints.search,"?bbox=").concat(Ro).concat(Uo).concat(Oo)}getPicturesAroundCoordinates(C,Rn,or,So,To){return fetch(this.getPicturesAroundCoordinatesUrl(C,Rn,or,So,To),this._getFetchOptions()).then((C=>C.json()))}getPictureMetadataUrl(C,Rn){if(!this.isReady())throw new Error("API is not ready to use");if(API.isIdValid(C))return Rn?"".concat(this._endpoints.collections,"/").concat(Rn,"/items/").concat(C):"".concat(this._endpoints.search,"?ids=").concat(C)}getMapStyle(){if(this.isReady())return this.mapStyle;let C;return C=this._endpoints.style?this._endpoints.style:this._endpoints.tiles?{version:8,sources:{geovisio:{type:"vector",tiles:[this._endpoints.tiles],minzoom:0,maxzoom:So.Lh}}}:fetch("".concat(this._endpoint,"/map/14/0/0.mvt"),this._getFetchOptions()).then((()=>(this._endpoints.tiles="".concat(this._endpoint,"/map/{z}/{x}/{y}.mvt"),console.log("Using fallback endpoint for vector tiles"),this.getMapStyle()))).catch((C=>(console.error(C),Promise.reject(new Error("API doesn't offer a vector tiles endpoint"))))),"string"===typeof C?fetch(C,this._getFetchOptions()).then((C=>C.json())):Promise.resolve(C)}getUserMapStyle(C){let Rn;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]||this.isReady()?C?(this._endpoints.user_style?Rn=this._endpoints.user_style.replace(/\{userId\}/g,C):this._endpoints.user_tiles&&(Rn={version:8,sources:{["geovisio_".concat(C)]:{type:"vector",tiles:[this._endpoints.user_tiles.replace(/\{userId\}/g,C)],minzoom:0,maxzoom:So.Lh}}}),Rn?"string"===typeof Rn?fetch(Rn,this._getFetchOptions()).then((C=>C.json())):Promise.resolve(Rn):Promise.reject(new Error("API doesn't offer map style for specific user"))):Promise.reject(new Error("Parameter userId is empty")):Promise.reject(new Error("API is not ready to use"))}findThumbnailInPictureFeature(C){if(!this.isReady())throw new Error("API is not ready to use");if(!C||!C.assets)return null;let Rn=null;for(let or of Object.values(C.assets)){if(or.roles.includes("thumbnail")&&"image/jpeg"==or.type&&API.isValidHttpUrl(or.href))return or.href;or.roles.includes("visual")&&"image/jpeg"==or.type&&API.isValidHttpUrl(or.href)&&(Rn=or.href)}return Rn}getPictureThumbnailURLForSequence(C,Rn){if(!this.isReady())throw new Error("API is not ready to use");if(this._endpoints.collection_preview)return Promise.resolve(this._endpoints.collection_preview.replace("{id}",C));if(Rn&&Array.isArray(Rn.links)&&Rn.links.length>0){let C=Rn.links.find((C=>"preview"===C.rel&&"image/jpeg"===C.type));if(C&&API.isValidHttpUrl(C.href))return Promise.resolve(C.href)}const or="".concat(this._endpoints.search,"?limit=1&collections=").concat(C);return fetch(or,this._getFetchOptions()).then((C=>C.json())).then((C=>Array.isArray(C.features)&&0!=C.features.length?this.findThumbnailInPictureFeature(C.features.pop()):null))}getPictureThumbnailURL(C,Rn){if(!this.isReady())throw new Error("API is not ready to use");return C?this._endpoints.item_preview?Promise.resolve(this._endpoints.item_preview.replace("{id}",C)):C&&Rn?fetch("".concat(this._endpoints.collections,"/").concat(Rn,"/items/").concat(C),this._getFetchOptions()).then((C=>C.json())).then((C=>C?this.findThumbnailInPictureFeature(C):null)):fetch("".concat(this._endpoints.search,"?ids=").concat(C),this._getFetchOptions()).then((C=>C.json())).then((C=>C&&Array.isArray(C.features)&&0!=C.features.length?this.findThumbnailInPictureFeature(C.features.pop()):null)):Promise.resolve(null)}getRSSURL(C){if(!this.isReady())throw new Error("API is not ready to use");if(this._endpoints.rss){let Rn=this._endpoints.rss;return C&&(Rn+=Rn.includes("?")?"&":"?",Rn+="bbox="+[C.getWest(),C.getSouth(),C.getEast(),C.getNorth()].join(",")),Rn}return null}getSequenceMetadataUrl(C){if(!this.isReady())throw new Error("API is not ready to use");return"".concat(this._endpoints.collections,"/").concat(C)}getDataBbox(){if(!this.isReady())throw new Error("API is not ready to use");return this._dataBbox}searchUsers(C){if(!this.isReady())throw new Error("API is not ready to use");if(!this._endpoints.user_search)throw new Error("User search is not available");return fetch("".concat(this._endpoints.user_search,"?q=").concat(C),this._getFetchOptions()).then((C=>C.json())).then((C=>(null===C||void 0===C?void 0:C.features)||null))}getUserName(C){if(!this.isReady())throw new Error("API is not ready to use");if(!this._endpoints.user_search)throw new Error("User search is not available");return fetch(this._endpoints.user_search.replace(/\/search$/,"/".concat(C)),this._getFetchOptions()).then((C=>C.json())).then((C=>(null===C||void 0===C?void 0:C.name)||null))}sendReport(C){if(!this.isReady())throw new Error("API is not ready to use");if(!this._endpoints.report)throw new Error("Report sending is not available");const Rn={...this._getFetchOptions(),method:"POST",body:JSON.stringify(C),headers:{"Content-Type":"application/json"}};return fetch(this._endpoints.report,Rn).then((async C=>{if(C.status>=400){let or=await C.text();try{or=JSON.parse(or).message}catch(Rn){}return Promise.reject(or)}return C.json()}))}static isValidHttpUrl(C){let Rn;try{Rn=new URL(C)}catch(or){return!1}return"http:"===Rn.protocol||"https:"===Rn.protocol}static isIdValid(C){if(!C||"string"!==typeof C||0===C.length)throw new Error("id should be a valid picture unique identifier");return!0}}},8139:(C,Rn,or)=>{"use strict";function getExifFloat(C){if(!([null,void 0,""].includes(C)||"string"===typeof C&&""===C.trim())){if("number"===typeof C)return C;if("string"!==typeof C);else{if(/^-?\d+(\.\d+)?\/-?\d+(\.\d+)?$/.test(C)){const Rn=C.split("/").map((C=>parseFloat(C)));return Rn[0]/Rn[1]}try{return parseFloat(C)}catch(Rn){}}}}function getGPSPrecision(C){var Rn,or,So,To;let Ro="unknown";const Uo=getExifFloat(null===C||void 0===C||null===(Rn=C.properties)||void 0===Rn||null===(or=Rn.exif)||void 0===or?void 0:or["Exif.GPSInfo.GPSHPositioningError"]),Oo=getExifFloat(null===C||void 0===C||null===(So=C.properties)||void 0===So||null===(To=So.exif)||void 0===To?void 0:To["Exif.GPSInfo.GPSDOP"]);return void 0!==Uo?Ro=Uo<.5?"ideal":Uo<1?"excellent":Uo<3?"good":Uo<7?"moderate":Uo<10?"fair":"poor":void 0!==Oo&&(Ro=Oo<1?"ideal":Oo<2?"excellent":Oo<5?"good":Oo<10?"moderate":Oo<20?"fair":"poor"),Ro}function getSphereCorrection(C){var Rn,or,So,To;let Ro=null===(Rn=C.properties)||void 0===Rn?void 0:Rn["view:azimuth"];if(void 0===Ro){var Uo,Oo;const Rn=getExifFloat(null===(Uo=C.properties)||void 0===Uo||null===(Oo=Uo.exif)||void 0===Oo?void 0:Oo["Exif.GPSInfo.GPSImgDirection"]);void 0!==Rn&&(Ro=Rn)}Ro=Ro||0;let Ho=null===(or=C.properties)||void 0===or?void 0:or["pers:yaw"],qo=["Xmp.GPano.PoseHeadingDegrees","Xmp.Camera.Yaw","Exif.MpfInfo.MPFYawAngle"];if(void 0===Ho)for(let Nc of qo){var dl,ml;const Rn=getExifFloat(null===(dl=C.properties)||void 0===dl||null===(ml=dl.exif)||void 0===ml?void 0:ml[Nc]);if(void 0!==Rn){Ho=Rn;break}}Ho=Ho||0,Math.round(Ro)===Math.round(Ho)&&Ho>0&&console.warn("Picture with UUID",C.id,"has same GPS Image direction and Yaw, could cause rendering issues");let fl=null===(So=C.properties)||void 0===So?void 0:So["pers:pitch"];if(qo=["Xmp.GPano.PosePitchDegrees","Xmp.Camera.Pitch","Exif.MpfInfo.MPFPitchAngle"],void 0===fl)for(let Nc of qo){var vl,bl;const Rn=getExifFloat(null===(vl=C.properties)||void 0===vl||null===(bl=vl.exif)||void 0===bl?void 0:bl[Nc]);if(void 0!==Rn){fl=Rn;break}}fl=fl||0;let kl=null===(To=C.properties)||void 0===To?void 0:To["pers:roll"];if(qo=["Xmp.GPano.PoseRollDegrees","Xmp.Camera.Roll","Exif.MpfInfo.MPFRollAngle"],void 0===kl)for(let Nc of qo){var Ll,Dl;const Rn=getExifFloat(null===(Ll=C.properties)||void 0===Ll||null===(Dl=Ll.exif)||void 0===Dl?void 0:Dl[Nc]);if(void 0!==Rn){kl=Rn;break}}return kl=kl||0,{pan:Ho*Math.PI/180,tilt:fl*Math.PI/180,roll:kl*Math.PI/180}}function getCroppedPanoData(C){var Rn,or;let So;var To,Ro;if(null!==(Rn=C.properties)&&void 0!==Rn&&Rn["pers:interior_orientation"]&&(null!==(To=C.properties["pers:interior_orientation"])&&void 0!==To&&To.visible_area&&null!==(Ro=C.properties["pers:interior_orientation"])&&void 0!==Ro&&Ro.sensor_array_dimensions)){const Rn=C.properties["pers:interior_orientation"].visible_area,or=C.properties["pers:interior_orientation"].sensor_array_dimensions;try{So={fullWidth:parseInt(or[0]),fullHeight:parseInt(or[1]),croppedX:parseInt(Rn[0]),croppedY:parseInt(Rn[1]),croppedWidth:parseInt(or[0])-parseInt(Rn[2])-parseInt(Rn[0]),croppedHeight:parseInt(or[1])-parseInt(Rn[3])-parseInt(Rn[1])}}catch(fl){console.warn("Invalid pers:interior_orientation values for cropped panorama "+C.id)}}if(!So&&null!==(or=C.properties)&&void 0!==or&&or.exif)try{var Uo,Oo,Ho,qo,dl,ml;So={fullWidth:parseInt(null===(Uo=C.properties.exif)||void 0===Uo?void 0:Uo["Xmp.GPano.FullPanoWidthPixels"]),fullHeight:parseInt(null===(Oo=C.properties.exif)||void 0===Oo?void 0:Oo["Xmp.GPano.FullPanoHeightPixels"]),croppedX:parseInt(null===(Ho=C.properties.exif)||void 0===Ho?void 0:Ho["Xmp.GPano.CroppedAreaLeftPixels"]),croppedY:parseInt(null===(qo=C.properties.exif)||void 0===qo?void 0:qo["Xmp.GPano.CroppedAreaTopPixels"]),croppedWidth:parseInt(null===(dl=C.properties.exif)||void 0===dl?void 0:dl["Xmp.GPano.CroppedAreaImageWidthPixels"]),croppedHeight:parseInt(null===(ml=C.properties.exif)||void 0===ml?void 0:ml["Xmp.GPano.CroppedAreaImageHeightPixels"])}}catch(fl){console.warn("Invalid XMP.GPano values for cropped panorama "+C.id)}return So&&(So=Object.fromEntries(Object.entries(So||{}).filter((C=>!isNaN(C[1])))),So.fullWidth==So.croppedWidth&&So.fullHeight==So.croppedHeight&&(So={})),So||{}}or.d(Rn,{Cf:()=>getSphereCorrection,Z1:()=>getCroppedPanoData,j$:()=>getGPSPrecision})},7586:(C,Rn,or)=>{"use strict";or.d(Rn,{F:()=>getTranslations});var So=or(3517),To=or(1700),Ro=or(6980),Uo=or(6493),Oo=or(6254),Ho=or(1392);const qo={de:So,en:To,es:Ro,fr:Uo,hu:Oo,zh_Hant:Ho},autoDetectLocale=()=>{for(const C of window.navigator.languages){let Rn=C;switch(Rn){case"zh-TW":case"zh-HK":case"zh-MO":Rn="zh_Hant";break;case"zh-CN":case"zh-SG":Rn="zh_Hans";break;default:Rn.length>2&&(Rn=C.substring(0,2))}const or=Object.entries(qo).find((C=>C[0]===Rn));if(or)return or[0]}return"en"};function getTranslations(){let C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const Rn=JSON.parse(JSON.stringify(To));let or;if(C||(C=autoDetectLocale()),qo[C]&&"en"!==C&&(or=qo[C]),C.length>2){const Rn=C.substring(0,2);qo[Rn]&&(or=qo[Rn])}return or&&Object.entries(or).forEach((C=>{let[or,So]=C;Object.assign(Rn[or],So)})),Rn}},3406:(C,Rn,or)=>{"use strict";or.d(Rn,{Ec:()=>combineStyles,FS:()=>getMissingLayerStyles,Lh:()=>qo,RF:()=>isLabelLayer,Ws:()=>Ho,eY:()=>getUserSourceId,g8:()=>forwardGeocodingNominatim,lg:()=>dl,lh:()=>getUserLayerId,sl:()=>getThumbGif,uD:()=>forwardGeocodingBAN,wL:()=>Oo});var So=or(4307),To=or.n(So),Ro=or(9836),Uo=or(7457);const Oo="https://panoramax.openstreetmap.fr/pmtiles/basic.json",Ho="gvs-aerial",qo=15,dl={PICTURES:{paint:{"circle-radius":["interpolate",["linear"],["zoom"],qo,4.5,18,6,24,12],"circle-opacity":["interpolate",["linear"],["zoom"],qo,0,qo+1,1],"circle-stroke-color":"#ffffff","circle-stroke-width":["interpolate",["linear"],["zoom"],qo+1,0,qo+2,1,18,1.5,24,3]},layout:{}},PICTURES_SYMBOLS:{paint:{"icon-opacity":["interpolate",["linear"],["zoom"],18,0,19,1]},layout:{"icon-image":["case",["==",["get","type"],"equirectangular"],"gvs-arrow-360","gvs-arrow-flat"],"icon-size":["interpolate",["linear"],["zoom"],18,.5,24,1],"icon-rotate":["to-number",["get","heading"]],"icon-allow-overlap":!0}},SEQUENCES:{paint:{"line-width":["interpolate",["linear"],["zoom"],0,.5,10,2,14,4,16,5,22,3]},layout:{"line-cap":"square"}},SEQUENCES_PLUS:{paint:{"line-width":["interpolate",["linear"],["zoom"],0,15,qo+1,30,qo+2,0],"line-opacity":0,"line-color":"#ff0000"},layout:{"line-cap":"square"}}};function getThumbGif(C){const Rn=document.createElement("img");return Rn.src=Ro,Rn.alt=C.loading,Rn.title=C.loading,Rn.classList.add("gvs-map-thumb","gvs-map-thumb-loader"),Rn}function isLabelLayer(C){var Rn;return"symbol"===C.type&&(null===C||void 0===C||null===(Rn=C.layout)||void 0===Rn?void 0:Rn["text-field"])&&(void 0===C.minzoom||C.minzoom<15)}function combineStyles(C,Rn){var or,So;const To=C._api.getMapStyle();return To.layers=To.layers.concat(getMissingLayerStyles(To.sources,To.layers)),Rn.supplementaryStyle&&(Object.assign(To.sources,Rn.supplementaryStyle.sources||{}),To.layers=To.layers.concat(Rn.supplementaryStyle.layers||[])),Rn.raster&&(To.sources["gvs-aerial"]=Rn.raster,To.layers.push({id:Ho,type:"raster",source:"gvs-aerial",layout:{visibility:"aerial"===Rn.background?"visible":"none"}})),null!==(or=C._options)&&void 0!==or&&null!==(So=or.users)&&void 0!==So&&So.includes("geovisio")||To.layers.forEach((C=>{"geovisio"===C.source&&(C.layout||(C.layout={}),C.layout.visibility="none")})),To.layers.sort(((C,Rn)=>isLabelLayer(C)&&!isLabelLayer(Rn)?1:!isLabelLayer(C)&&isLabelLayer(Rn)?-1:C.id.startsWith("geovisio")&&!Rn.id.startsWith("geovisio")?1:!C.id.startsWith("geovisio")&&Rn.id.startsWith("geovisio")?-1:C.id.endsWith("_pictures")&&!Rn.id.endsWith("_pictures")?1:!C.id.endsWith("_pictures")&&Rn.id.endsWith("_pictures")?-1:0)),To}function getMissingLayerStyles(C,Rn){const or=[];return Object.keys(C).filter((C=>void 0===Rn.find((Rn=>(null===Rn||void 0===Rn?void 0:Rn.source)===C)))).forEach((C=>{C.startsWith("geovisio")&&(or.push({id:"".concat(C,"_sequences"),type:"line",source:C,"source-layer":"sequences",layout:{...dl.SEQUENCES.layout},paint:{...dl.SEQUENCES.paint,"line-color":Uo.DM.BASE}}),or.push({id:"".concat(C,"_sequences_plus"),type:"line",source:C,"source-layer":"sequences",layout:{...dl.SEQUENCES_PLUS.layout},paint:{...dl.SEQUENCES_PLUS.paint}}),or.push({id:"".concat(C,"_pictures_symbols"),type:"symbol",source:C,"source-layer":"pictures",...dl.PICTURES_SYMBOLS}),or.push({id:"".concat(C,"_pictures_symbols"),type:"symbol",source:C,"source-layer":"pictures",...dl.PICTURES_SYMBOLS}),or.push({id:"".concat(C,"_pictures"),type:"circle",source:C,"source-layer":"pictures",layout:{...dl.PICTURES.layout},paint:{...dl.PICTURES.paint,"circle-color":Uo.DM.BASE}}))})),Rn.filter((C=>{var or;return(null===C||void 0===C||null===(or=C.id)||void 0===or?void 0:or.endsWith("_sequences"))&&void 0===Rn.find((Rn=>(null===Rn||void 0===Rn?void 0:Rn.id)===C.id+"_plus"))})).forEach((C=>{or.push({id:"".concat(C.id,"_plus"),type:"line",source:C.source,"source-layer":C["source-layer"],layout:{...dl.SEQUENCES_PLUS.layout},paint:{...dl.SEQUENCES_PLUS.paint}})})),Rn.filter((C=>{var or;return(null===C||void 0===C||null===(or=C.id)||void 0===or?void 0:or.endsWith("_pictures"))&&void 0===Rn.find((Rn=>(null===Rn||void 0===Rn?void 0:Rn.id)===C.id+"_symbols"))})).forEach((C=>{or.unshift({id:"".concat(C.id,"_symbols"),type:"symbol",source:C.source,"source-layer":"pictures",...dl.PICTURES_SYMBOLS}),C.paint=Object.assign(C.paint||{},dl.PICTURES.paint),C.layout=Object.assign(C.layout||{},dl.PICTURES.layout)})),or}function getUserLayerId(C,Rn){return"".concat(getUserSourceId(C),"_").concat(Rn)}function getUserSourceId(C){return"geovisio"===C?"geovisio":"geovisio_"+C}function geocoderParamsToURLString(C){let Rn={};return Object.entries(C).filter((C=>void 0!==C[1]&&null!==C[1])).forEach((C=>Rn[C[0]]=C[1])),new URLSearchParams(Rn).toString()}function forwardGeocodingNominatim(C){const Rn={q:C.query,countrycodes:C.countries,limit:C.limit,viewbox:C.bbox};return fetch("https://nominatim.openstreetmap.org/search?".concat(geocoderParamsToURLString(Rn),"&format=geojson&polygon_geojson=1&addressdetails=1")).then((C=>C.json())).then((C=>{const Rn={features:[]},or=[];return C.features.forEach((C=>{or.includes(C.properties.display_name)||(Rn.features.push({place_type:["place"],place_name:C.properties.display_name,bounds:new(To().LngLatBounds)(C.bbox)}),or.push(C.properties.display_name))})),Rn}))}function forwardGeocodingBAN(C){const Rn={q:C.query,limit:C.limit};if("string"===typeof C.proximity){const[or,So]=C.proximity.split(",").map((C=>parseFloat(C.trim())));Rn.lat=or,Rn.lon=So}const or={housenumber:20,street:18,locality:15,municipality:12};return fetch("https://api-adresse.data.gouv.fr/search/?".concat(geocoderParamsToURLString(Rn))).then((C=>C.json())).then((C=>(C.features=C.features.map((C=>{return{place_type:["place"],place_name:(Rn=C.properties,[Rn.name,Rn.district,Rn.city].filter((C=>C)).join(", ")),center:new(To().LngLat)(...C.geometry.coordinates),zoom:or[C.properties.type]};var Rn})),C)))}},5856:(C,Rn,or)=>{"use strict";or.d(Rn,{Z:()=>PhotoAdapter});var So=or(9771);class PhotoAdapter extends So.k{constructor(C,Rn){super(C,Rn),this._shouldGoFast=Rn.shouldGoFast||(()=>!0)}loadTexture(C,Rn){return C.origBaseUrl?C.baseUrl=C.origBaseUrl:C.origBaseUrl=C.baseUrl,this._shouldGoFast()&&C.thumbUrl&&!C.hdLoaded&&1==C.rows&&(C.baseUrl=C.thumbUrl),super.loadTexture(C,Rn).then((Rn=>(C.baseUrl===C.origBaseUrl&&(C.hdLoaded=!0),Rn)))}__loadTiles(C){this._shouldGoFast()||super.__loadTiles(C)}}},7457:(C,Rn,or)=>{"use strict";or.d(Rn,{DM:()=>Uo,EF:()=>isInternetFast,FF:()=>apiFeatureToPSVNode,Iu:()=>josmBboxParameters,J9:()=>xyzToPosition,Sp:()=>getDistance,bk:()=>linkMapAndPhoto,iE:()=>getUserAccount,r:()=>getRelativeHeading,wW:()=>positionToXYZ,zd:()=>isInIframe});var So=or(8139),To=or(9341),Ro=or(2893);const Uo={BASE:"#FF6F00",SELECTED:"#1E88E5",HIDDEN:"#34495E",NEXT:"#ffab40",QUALI_1:"#00695C",QUALI_2:"#fd8d3c",PALETTE_1:"#fecc5c",PALETTE_2:"#fd8d3c",PALETTE_3:"#f03b20",PALETTE_4:"#bd0026"},Oo=(Object.fromEntries(Object.entries(Uo).map((C=>(C[1]=parseInt(C[1].slice(1),16),C)))),svgToPSVLink(To,"white")),Ho=svgToPSVLink(Ro,Uo.NEXT);function getDistance(C,Rn){const or=C[0]-Rn[0],So=C[1]-Rn[1];return Math.sqrt(or*or+So*So)}function sortPicturesInDirection(C){return(Rn,or)=>"related"!=Rn.rel&&"related"!=or.rel?0:"related"!=Rn.rel?-1:"related"!=or.rel?1:Rn.date==or.date?getDistance(C,Rn.geometry.coordinates)-getDistance(C,or.geometry.coordinates):or.date.localeCompare(Rn.date)}function svgToPSVLink(C,Rn){try{const or=atob(C.replace(/^data:image\/svg\+xml;base64,/,"")),So=(new DOMParser).parseFromString(or,"image/svg+xml").childNodes[0],To=document.createElement("button");return To.appendChild(So),To.classList.add("gvs-psv-tour-arrows"),To.style.color=Rn,To}catch(or){const Rn=document.createElement("img");return Rn.src=C,Rn}}function getArrow(C){const Rn=C.cloneNode(!0);return Rn.addEventListener("pointerup",(()=>Rn.classList.add("gvs-clicked"))),Rn}function getAzimuth(C,Rn){return(Math.atan2(Rn[0]-C[0],Rn[1]-C[1])*(180/Math.PI)+360)%360}function getRelativeHeading(C){var Rn,or;if(!C)throw new Error("No picture selected");let So,To;const Ro=C.properties["view:azimuth"];if(null!==C&&void 0!==C&&null!==(Rn=C.sequence)&&void 0!==Rn&&Rn.prevPic){var Uo;const Rn=null===C||void 0===C||null===(Uo=C.links)||void 0===Uo?void 0:Uo.find((Rn=>Rn.nodeId===C.sequence.prevPic));Rn&&(So=(Ro-getAzimuth(Rn.gps,C.gps)+180)%360-180)}if(null!==C&&void 0!==C&&null!==(or=C.sequence)&&void 0!==or&&or.nextPic){var Oo;const Rn=null===C||void 0===C||null===(Oo=C.links)||void 0===Oo?void 0:Oo.find((Rn=>Rn.nodeId===C.sequence.nextPic));Rn&&(To=(Ro-getAzimuth(C.gps,Rn.gps)+180)%360-180)}return void 0!==So?So:void 0!==To?To:0}function getSimplifiedAngle(C,Rn){const or=Math.atan2(Rn[0]-C[0],Rn[1]-C[1])*(180/Math.PI);return Math.abs(or)<30?"N":or>=30&&or<90?"ENE":or>=90&&or<150?"ESE":Math.abs(or)>=150?"S":or<=-30&&or>-90?"WNW":or<=-90&&or>-150?"WSW":void 0}function positionToXYZ(C){let Rn=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;const or={x:C.yaw*(180/Math.PI),y:C.pitch*(180/Math.PI)};return void 0!==Rn&&(or.z=Rn),or}function xyzToPosition(C,Rn,or){return{yaw:C/(180/Math.PI),pitch:Rn/(180/Math.PI),zoom:or}}function getNodeCaption(C,Rn){var or,So,To;const Ro={};if(null!==C&&void 0!==C&&null!==(or=C.properties)&&void 0!==or&&or.datetimetz?Ro.date=new Date(C.properties.datetimetz):null!==C&&void 0!==C&&null!==(So=C.properties)&&void 0!==So&&So.datetime&&(Ro.date=new Date(C.properties.datetime)),null!==C&&void 0!==C&&C.providers){var Uo;const Rn=null===C||void 0===C||null===(Uo=C.providers)||void 0===Uo?void 0:Uo.filter((C=>{var Rn;return null===C||void 0===C||null===(Rn=C.roles)||void 0===Rn?void 0:Rn.includes("producer")}));if((null===Rn||void 0===Rn?void 0:Rn.length)>=0){const C={};Rn.map((C=>C.name)).forEach((Rn=>{const or=Rn.toLowerCase().replace(/\s/g,"");C[or]?C[or].push(Rn):C[or]=[Rn]})),Ro.producer=[],Object.values(C).forEach((C=>{const Rn=C[0],or=C.find((C=>C.toLowerCase()!=C));Ro.producer.push(or||Rn)})),Ro.producer=Ro.producer.join(", ")}}if(null!==C&&void 0!==C&&null!==(To=C.properties)&&void 0!==To&&To.license&&(Ro.license=C.properties.license,null!==C&&void 0!==C&&C.links)){const or=C.links.find((C=>"license"===(null===C||void 0===C?void 0:C.rel)));or&&(Ro.license='<a href="'.concat(or.href,'" title="').concat(Rn.gvs.metadata_general_license_link,'" target="_blank">').concat(Ro.license,"</a>"))}return Ro}function linkMapAndPhoto(C){const onPicLoad=Rn=>C.map.displayPictureMarker(Rn.detail.lon,Rn.detail.lat,C.psv.getXY().x);C.addEventListener("psv:picture-loading",onPicLoad),C.addEventListener("psv:picture-loaded",onPicLoad),C.addEventListener("psv:view-rotated",(()=>{let Rn=C.psv.getPosition().yaw*(180/Math.PI);Rn+=C.psv.getPictureOriginalHeading(),C.map._picMarker.setRotation(Rn)})),C.addEventListener("psv:picture-preview-started",(Rn=>{C.map._picMarkerPreview.setLngLat(Rn.detail.coordinates).setRotation(Rn.detail.direction||0).addTo(C.map)})),C.addEventListener("psv:picture-preview-stopped",(()=>{C.map._picMarkerPreview.remove()})),C.addEventListener("psv:picture-loaded",(Rn=>{C.isWidthSmall()&&C._picPopup&&Rn.detail.picId==C._picPopup._picId&&C._picPopup.remove()})),C.addEventListener("map:picture-click",(Rn=>{C.select(Rn.detail.seqId,Rn.detail.picId),!C.psv._myVTour.state.currentNode&&null!==C&&void 0!==C&&C.setFocus&&C.setFocus("pic")})),C.addEventListener("map:sequence-click",(Rn=>{C._api.getPicturesAroundCoordinates(Rn.detail.coordinates.lat,Rn.detail.coordinates.lng,1,1,Rn.detail.seqId).then((Rn=>{var or,So;(null===Rn||void 0===Rn||null===(or=Rn.features)||void 0===or?void 0:or.length)>0&&(C.select(null===(So=Rn.features[0])||void 0===So?void 0:So.collection,Rn.features[0].id),!C.psv.getPictureMetadata()&&null!==C&&void 0!==C&&C.setFocus&&C.setFocus("pic"))}))}))}function apiFeatureToPSVNode(C,Rn){var or,To,Ro,Uo,Oo,Ho,qo;let dl=arguments.length>2&&void 0!==arguments[2]&&arguments[2],ml=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const fl=null!=(null===(or=C.properties)||void 0===or||null===(To=or["pers:interior_orientation"])||void 0===To?void 0:To.field_of_view);let vl=fl?parseInt(C.properties["pers:interior_orientation"].field_of_view):70;const bl=360===vl,kl=(Object.values(C.assets).find((C=>{var Rn;return null===C||void 0===C||null===(Rn=C.roles)||void 0===Rn?void 0:Rn.includes("data")}))||{}).href,Ll=null===C||void 0===C||null===(Ro=C.properties)||void 0===Ro||null===(Uo=Ro["tiles:tile_matrix_sets"])||void 0===Uo?void 0:Uo.geovisio,Dl=C.links.find((C=>"prev"===(null===C||void 0===C?void 0:C.rel)&&"application/geo+json"===(null===C||void 0===C?void 0:C.type))),Nc=C.links.find((C=>"next"===(null===C||void 0===C?void 0:C.rel)&&"application/geo+json"===(null===C||void 0===C?void 0:C.type))),jc=Object.values(C.assets).find((C=>{var Rn;return(null===(Rn=C.roles)||void 0===Rn?void 0:Rn.includes("visual"))&&"image/webp"===C.type})),Zc=Object.values(C.assets).find((C=>{var Rn;return(null===(Rn=C.roles)||void 0===Rn?void 0:Rn.includes("visual"))&&"image/jpeg"===C.type})),eu=(jc||Zc).href,Ku=null===(Oo=Object.values(C.assets).find((C=>{var Rn;return(null===(Rn=C.roles)||void 0===Rn?void 0:Rn.includes("thumbnail"))&&"image/jpeg"===C.type})))||void 0===Oo?void 0:Oo.href,Yu=(null===C||void 0===C||null===(Ho=C.asset_templates)||void 0===Ho?void 0:Ho.tiles_webp)||(null===C||void 0===C||null===(qo=C.asset_templates)||void 0===qo?void 0:qo.tiles),Eh=(0,So.Z1)(C);let Th;return Th=Object.keys(Eh).length>0?{baseUrl:dl?kl:eu,origBaseUrl:dl?kl:eu,hdUrl:kl,thumbUrl:Ku,basePanoData:Eh,cols:2,rows:1,width:2,tileUrl:()=>null}:bl?{baseUrl:eu,origBaseUrl:eu,basePanoData:C=>({fullWidth:C.width,fullHeight:C.height}),hdUrl:kl,thumbUrl:Ku,cols:Ll&&Ll.tileMatrix[0].matrixWidth,rows:Ll&&Ll.tileMatrix[0].matrixHeight,width:Ll&&Ll.tileMatrix[0].matrixWidth*Ll.tileMatrix[0].tileWidth,tileUrl:Ll&&((C,Rn)=>Yu.href.replace(/\{TileCol\}/g,C).replace(/\{TileRow\}/g,Rn))}:{baseUrl:dl?kl:eu,origBaseUrl:dl?kl:eu,hdUrl:kl,thumbUrl:Ku,basePanoData:C=>{C.width<C.height&&!fl&&(vl=35);const Rn=vl*C.height/C.width,or=360*C.width/vl,So=180*C.height/Rn;return{fullWidth:or,fullHeight:So,croppedWidth:C.width,croppedHeight:C.height,croppedX:(or-C.width)/2,croppedY:(So-C.height)/2}},cols:2,rows:1,width:2,tileUrl:()=>null},{id:C.id,caption:getNodeCaption(C,Rn),panorama:Th,links:filterRelatedPicsLinks(C,ml),gps:C.geometry.coordinates,sequence:{id:C.collection,nextPic:Nc?Nc.id:void 0,prevPic:Dl?Dl.id:void 0},sphereCorrection:(0,So.Cf)(C),horizontalFov:vl,properties:C.properties}}function filterRelatedPicsLinks(C){var Rn;let or=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const So=C.links.filter((C=>["next","prev","related"].includes(null===C||void 0===C?void 0:C.rel)&&"application/geo+json"===(null===C||void 0===C?void 0:C.type))).filter((C=>!or||or(C))).map((C=>(C.datetime&&(C.date=C.datetime.split("T")[0]),C))),To=C.geometry.coordinates,Ro=[],Uo={N:[],ENE:[],ESE:[],S:[],WSW:[],WNW:[]};for(let Oo of So){Uo[getSimplifiedAngle(To,Oo.geometry.coordinates)].push(Oo)}for(let Oo in Uo){const C=Uo[Oo];0!=C.length&&(C.sort(sortPicturesInDirection(To)),Ro.push(C.shift()))}let arrowStyle=C=>"related"===C.rel?{element:getArrow(Ho),size:{width:128/3,height:128}}:{element:getArrow(Oo),size:{width:75,height:75}};const qo=-((null===(Rn=C.properties)||void 0===Rn?void 0:Rn["view:azimuth"])||0)*(Math.PI/180);return Ro.map((C=>({nodeId:C.id,gps:C.geometry.coordinates,arrowStyle:arrowStyle(C),linkOffset:{yaw:qo}})))}function josmBboxParameters(C){if(C){var Rn;const or=C.gps,So=null===C||void 0===C||null===(Rn=C.properties)||void 0===Rn?void 0:Rn["view:azimuth"],To=2e-4,Ro={left:or[0]-(null===So||So>=180?To:0),right:or[0]+(null===So||So<=180?To:0),top:or[1]+(null===So||So<=90||So>=270?To:0),bottom:or[1]-(null===So||So>=90&&So<=270?To:0),changeset_source:"Panoramax"};return Object.entries(Ro).map((C=>C.join("="))).join("&")}return null}function isInIframe(){try{return window.self!==window.top}catch(C){return!0}}const qo=10,dl="gvs-internet-fast",ml="https://panoramax.openstreetmap.fr/images/05/ca/2c/98/0111-4baf-b6f3-587bb8847d2e.jpg";function isInternetFast(){try{const C=navigator.connection.downlink;return Promise.resolve(C>=qo)}catch(C){const Rn=sessionStorage.getItem(dl);if(["true","false"].includes(Rn))return Promise.resolve("true"===Rn);const or=(new Date).getTime();return fetch(ml+"?nocache="+or).then((async C=>[C,await C.blob()])).then((C=>{let[Rn,So]=C;const To=8*parseInt(Rn.headers.get("Content-Length")||So.size)/1024/1024/(((new Date).getTime()-or)/1e3)>=qo;return sessionStorage.setItem(dl,To?"true":"false"),To})).catch((C=>(console.warn("Failed to run speedtest",C),!1)))}}function getCookie(C){var Rn,or,So;const To=null===(Rn=document.cookie)||void 0===Rn||null===(or=Rn.split(";"))||void 0===or||null===(So=or.find((Rn=>Rn.trimStart().startsWith("".concat(C,"=")))))||void 0===So?void 0:So.split("=");if(To)return To.shift(),To.join("=")}function getUserAccount(){const C=getCookie("session"),Rn=getCookie("user_id"),or=getCookie("user_name");return C&&Rn&&or?{id:Rn,name:or}:null}},4824:(C,Rn,or)=>{"use strict";or.d(Rn,{C:()=>createButtonSpan,Fl:()=>createSearchBar,Mr:()=>enableButton,Nk:()=>fat,QO:()=>enableCopyButton,Qr:()=>disableButton,VQ:()=>closeOtherPanels,WD:()=>createExpandableButton,W_:()=>createTable,_:()=>createLabel,ax:()=>createButton,dc:()=>createHeader,fa:()=>fa,gJ:()=>createLinkCell,sS:()=>createGroup,wf:()=>createPanel});var So=or(942),To=or(6899),Ro=or(4671),Uo=or(7361),Oo=or(4666),Ho=or(8455),qo=or(6565),dl=or(6087);function createButton(C){let Rn=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,or=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,So=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];const To=document.createElement("button");return Rn&&(Rn instanceof HTMLElement||Rn instanceof Node?To.appendChild(Rn):To.innerHTML=Rn),To.id=C,Array.isArray(So)&&(So=So.filter((C=>null!=C&&C.length>0))),To.classList.add("gvs-btn","gvs-widget-bg",...So),or&&(To.title=or),To}function createExpandableButton(C,Rn,or,So){let To=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const Ro=document.createElement("button");return Ro.id=C,Ro.appendChild(fa(Rn)),So._viewer.isWidthSmall()?Ro.title=or:(Ro.appendChild(document.createTextNode(or)),Ro.appendChild(fa(Uo.pt))),Ro.classList.add("gvs-btn","gvs-widget-bg","gvs-btn-expandable",...To),Ro}function createSearchBar(C,Rn,or,So,Uo){let qo=arguments.length>5&&void 0!==arguments[5]&&arguments[5],dl=arguments.length>6&&void 0!==arguments[6]&&arguments[6],ml=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;const fl=document.createElement("div");fl.classList.add("gvs-widget-bg","gvs-search-bar"),fl.id=C,dl&&fl.classList.add("gvs-search-bar-reducable"),ml&&fl.appendChild(ml);const vl=document.createElement("input");vl.type="text",vl.placeholder=Rn,fl.appendChild(vl);const extendInput=()=>{fl.classList.remove("gvs-search-bar-reduced")},reduceInput=()=>{fl.classList.add("gvs-search-bar-reduced")};dl&&reduceInput();const bl=document.createElement("span");bl.classList.add("gvs-search-bar-icon");const kl=fa(Oo.Y$),Ll=fa(Ho.IJ,{classes:["fa-spin"]}),Dl=fa(To.g8),Nc=fa(Ro.xH);bl.appendChild(kl),fl.appendChild(bl);const jc=createPanel(Uo,fl,[],["gvs-search-bar-results"],qo);fl.appendChild(jc);const switchIcon=C=>{bl.innerHTML="",bl.appendChild(C)},resetSearch=()=>{fl._throttler&&clearTimeout(fl._throttler),vl.value="",jc.innerHTML="",jc._toggle(!1),delete fl._lastSearch,switchIcon(kl),So(null),dl&&reduceInput()};fl.resetSearch=resetSearch;vl.setItem=C=>{fl._throttler&&clearTimeout(fl._throttler),vl.value=C,jc.innerHTML="",jc._toggle(!1),switchIcon(Dl),dl&&extendInput()};const goSearch=()=>{if(fl._throttler&&clearTimeout(fl._throttler),0===vl.value.length)return jc.innerHTML="",void jc._toggle(!1);fl._throttler=setTimeout((()=>{jc.innerHTML="",jc._toggle(!1),switchIcon(Ll),or(vl.value).then((C=>{switchIcon(Dl),jc._toggle(!0),C&&0!=C.length?!0!==C?C.forEach((C=>{const Rn=document.createElement("div");Rn.classList.add("gvs-search-bar-result"),Rn.innerHTML="".concat(C.title,"<br /><small>").concat((null===C||void 0===C?void 0:C.subtitle)||"","</small>"),jc.appendChild(Rn),Rn.addEventListener("click",(()=>(C=>{dl?(So(C),resetSearch()):(fl._throttler&&clearTimeout(fl._throttler),vl.value=C.title,jc.innerHTML="",jc._toggle(!1),So(C))})(C)))})):jc._toggle(!1):jc.innerHTML='<div class="gvs-search-empty">'.concat(Uo._t.gvs.search_empty,"</li>")})).catch((C=>{console.error(C),switchIcon(Nc)}))}),250)};return vl.addEventListener("change",goSearch),vl.addEventListener("keypress",goSearch),vl.addEventListener("paste",goSearch),vl.addEventListener("input",goSearch),bl.addEventListener("click",(()=>{bl.firstChild!=Dl&&bl.firstChild!=Nc||resetSearch(),dl&&bl.firstChild==kl&&(fl.classList.contains("gvs-search-bar-reduced")?extendInput():reduceInput())})),fl}function createPanel(C,Rn){let or=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],So=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],To=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const Ro=document.createElement("div");Ro.id=Rn.id+"-panel",Array.isArray(So)&&(So=So.filter((C=>null!=C&&C.length>0))),Ro.classList.add("gvs-panel","gvs-widget-bg","gvs-hidden",...So);for(let Uo of or)Ro.appendChild(Uo);const togglePanel=(Rn,or)=>{Rn&&Rn.stopPropagation(),!0===or?Ro.classList.remove("gvs-hidden"):!1===or?Ro.classList.add("gvs-hidden"):(Ro.classList.toggle("gvs-hidden"),or=!Ro.classList.contains("gvs-hidden")),or&&!To&&closeOtherPanels(Ro,C._viewer.container)};return Ro._toggle=C=>togglePanel(null,C),"BUTTON"==Rn.tagName&&(Rn.addEventListener("click",togglePanel),Rn.addEventListener("hover",togglePanel)),Ro}function closeOtherPanels(C,Rn){var or;const isPanel=C=>C.classList.contains("gvs-panel")||C.classList.contains("gvs-search-bar-result")||C.classList.contains("gvs-search-empty")||C.classList.contains("gvs-search-bar-reducable");if(!isPanel(C)&&null!==(or=C)&&void 0!==or&&or.parentNode)for(C=C.parentNode;C instanceof Element&&!isPanel(C);)C=C.parentNode;for(const So of Rn.getElementsByClassName("gvs-panel"))So==C||So.contains(C)||So.classList.contains("gvs-hidden")||So.classList.add("gvs-hidden");for(const So of Rn.getElementsByClassName("gvs-search-bar-reducable"))So==C||So.contains(C)||So.classList.contains("gvs-search-bar-reduced")||So.resetSearch()}function createGroup(C,Rn,or){let So=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],To=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const Ro=document.createElement("div");Ro.id=C,Array.isArray(To)&&(To=To.filter((C=>null!=C&&C.length>0))),Ro.classList.add("gvs-group",...To);for(let Uo of So)Ro.appendChild(Uo);return or._corners[Rn].appendChild(Ro),Ro}function enableCopyButton(C,Rn){for(let or of C.getElementsByTagName("button")){const C=or.getAttribute("data-input"),So=or.getAttribute("data-copy");(C||So)&&or.addEventListener("click",(()=>{let To;if(C){const Rn=document.getElementById(C);To=Rn.innerText||Rn.value}else So&&(To=or.getAttribute("data-copy"));navigator.clipboard.writeText(To);const Ro=or.innerHTML;or.innerHTML="".concat(Rn.gvs.copied," ").concat(fat(qo.LE)),or.classList.add("gvs-btn-active"),setTimeout((()=>{or.innerHTML=Ro,or.classList.remove("gvs-btn-active")}),2e3)}))}}function enableButton(C){C.removeAttribute("disabled")}function disableButton(C){C.setAttribute("disabled","")}function fa(C,Rn){return(0,So.qv)(C,Rn).node[0]}function fat(C,Rn){return(0,So.qv)(C,Rn).html[0]}function createLinkCell(C,Rn,or,So){const To=document.createElement("a");To.href=Rn,To.target="_blank",To.title=or,To.textContent=C;return[To,createButtonSpan("".concat(fat(dl.kZ)," ").concat(So),C)]}function createTable(C,Rn){const or=document.createElement("table");return or.className=C,Rn.forEach((C=>{let{section:Rn,value:So,values:To,classes:Ro}=C;const Uo=document.createElement("tr"),Oo=document.createElement("th");Oo.scope="row",Oo.textContent=Rn,Uo.appendChild(Oo);const Ho=document.createElement("td");Ro&&Ho.classList.add(...Ro),To?To.forEach((C=>Ho.appendChild(C))):So instanceof HTMLElement?Ho.appendChild(So):Ho.innerHTML=So,Uo.appendChild(Ho),or.appendChild(Uo)})),or}function createHeader(C,Rn){const or=document.createElement(C);return or.innerHTML=Rn,or}function createButtonSpan(C){let Rn=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const or=document.createElement("button");or.innerHTML=C,Rn&&or.setAttribute("data-copy",Rn);const So=document.createElement("span");return So.className="gvs-input-btn",So.appendChild(or),So}function createLabel(C,Rn){let or=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const So=document.createElement("label");return So.htmlFor=C,or&&So.appendChild(fa(or)),So.appendChild(document.createTextNode(Rn)),So}},9204:(C,Rn,or)=>{"use strict";or.d(Rn,{Z:()=>URLHash});const So={minDate:"date_from",maxDate:"date_to",type:"pic_type",camera:"camera",theme:"theme"},To=Object.fromEntries(Object.entries(So).map((C=>[C[1],C[0]]))),Ro=["psv:view-rotated","psv:picture-loaded","focus-changed","filters-changed","psv:transition-duration-changed","map:background-changed","map:users-changed","pictures-navigation-changed"];class URLHash extends EventTarget{constructor(C){super(),this._viewer=C,this._delay=null,this._hashChangeHandler=this._onHashChange.bind(this),C.addEventListener("ready",(()=>{window.addEventListener("hashchange",this._hashChangeHandler,!1),Ro.forEach((C=>this._viewer.addEventListener(C,this._updateHash.bind(this))))}),{once:!0})}destroy(){var C,Rn;window.removeEventListener("hashchange",this._hashChangeHandler),delete this._hashChangeHandler,null===(C=this._viewer)||void 0===C||null===(Rn=C.map)||void 0===Rn||Rn.off("moveend",this._updateHash),Ro.forEach((C=>this._viewer.removeEventListener(C,this._updateHash))),delete this._viewer,this._updateHash()}bindMapEvents(){this._viewer.map.on("moveend",this._updateHash.bind(this))}getHashString(){let C="",Rn={};"number"==typeof this._viewer.psv.getTransitionDuration()&&(Rn.speed=this._viewer.psv.getTransitionDuration()),[null,"any"].includes(this._viewer.getPicturesNavigation())||(Rn.nav=this._viewer.getPicturesNavigation());const or=this._viewer.psv.getPictureMetadata();if(or&&(Rn.pic=or.id,Rn.xyz=this._getXyzHashString()),this._viewer.map){Rn.map=this._getMapHashString(),Rn.focus="pic",this._viewer.isMapWide()&&(Rn.focus="map"),this._viewer.popupContainer.classList.contains("gvs-hidden")||(Rn.focus="meta"),this._viewer.map.hasTwoBackgrounds()&&this._viewer.map.getBackground()&&(Rn.background=this._viewer.map.getBackground());const C=this._viewer.map.getVisibleUsers();if((C.length>1||!C.includes("geovisio"))&&(Rn.users=C.join(",")),this._viewer._mapFilters)for(let or in So)this._viewer._mapFilters[or]&&(Rn[So[or]]=this._viewer._mapFilters[or])}else Rn.map="none";return Object.entries(Rn).sort(((C,Rn)=>C[0].localeCompare(Rn[0]))).forEach((Rn=>{let[or,So]=Rn,To=!1;const Ro=C.split("&").map((C=>{const Rn=C.split("=")[0];return Rn===or?(To=!0,"".concat(Rn,"=").concat(So)):C})).filter((C=>C));To||Ro.push("".concat(or,"=").concat(So)),C="".concat(Ro.join("&"))})),"#".concat(C).replace(/^#+/,"#")}_getCurrentHash(){const C=window.location.hash.replace("#","");let Rn={};return C.split("&").map((C=>C.split("="))).filter((C=>void 0!==C[0]&&C[0].length>0)).forEach((C=>{Rn[C[0]]=C[1]})),Rn}_getMapHashString(){const C=this._viewer.map.getCenter(),Rn=Math.round(100*this._viewer.map.getZoom())/100,or=Math.ceil((Rn*Math.LN2+Math.log(512/360/.5))/Math.LN10),So=Math.pow(10,or),To=Math.round(C.lng*So)/So,Ro=Math.round(C.lat*So)/So,Uo=this._viewer.map.getBearing(),Oo=this._viewer.map.getPitch();let Ho="".concat(Rn,"/").concat(Ro,"/").concat(To);return(Uo||Oo)&&(Ho+="/".concat(Math.round(10*Uo)/10)),Oo&&(Ho+="/".concat(Math.round(Oo))),Ho}_getXyzHashString(){const C=this._viewer.psv.getXYZ(),Rn=C.x.toFixed(2),or=C.y.toFixed(2),So=Math.round(C.z||0);return"".concat(Rn,"/").concat(or,"/").concat(So)}_onHashChange(){const C=this._getCurrentHash();if(C.pic){const Rn=C.pic.split(";");Rn.length>1&&console.warn("Multiple picture IDs passed in URL, only first one kept"),this._viewer.select(null,Rn[0])}if(C.focus&&["map","pic"].includes(C.focus)&&this._viewer.setFocus(C.focus),C.focus&&"meta"==C.focus&&this._viewer._widgets._showPictureMetadataPopup(),void 0!==C.speed&&this._viewer.psv.setTransitionDuration(C.speed),C.map&&this._viewer.map){const Rn=this.getMapOptionsFromHashString(C.map);Rn&&this._viewer.map.jumpTo(Rn);let or=(C.users||"").split(",");(0===or.length||1===or.length&&""===or[0].trim())&&(or=["geovisio"]),this._viewer.map.setVisibleUsers(or)}if(C.xyz){const Rn=this.getXyzOptionsFromHashString(C.xyz);this._viewer.psv.setXYZ(Rn.x,Rn.y,Rn.z)}this._viewer.setFilters(this.getMapFiltersFromHashVals(C)),["aerial","streets"].includes(C.background)&&this._viewer.map.setBackground(C.background),["pic","any","seq"].includes(C.nav)&&this._viewer.setPicturesNavigation(C.nav)}getMapFiltersFromHashVals(C){const Rn={};for(let or in To)C[or]&&(Rn[To[or]]=C[or]);return Rn}getMapOptionsFromHashString(C){const Rn=C.split("/");if(Rn.length>=3&&!Rn.some((C=>isNaN(C)))){const C={center:[+Rn[2],+Rn[1]],zoom:+Rn[0],pitch:+(Rn[4]||0)};return this._viewer.map&&(C.bearing=this._viewer.map.dragRotate.isEnabled()&&this._viewer.map.touchZoomRotate.isEnabled()?+(Rn[3]||0):this._viewer.map.getBearing()),C}return null}getXyzOptionsFromHashString(C){const Rn=C.split("/");if(3!==Rn.length||Rn.some((C=>isNaN(C))))return null;return{x:+Rn[0],y:+Rn[1],z:+Rn[2]}}_updateHash(){this._delay&&(clearTimeout(this._delay),this._delay=null),this._delay=setTimeout((()=>{const C=window.location.href.replace(/(#.+)?$/,this._viewer?this.getHashString():"");try{if(window.history.replaceState(window.history.state,null,C),this._viewer){const Rn=new CustomEvent("url-changed",{detail:{url:C}});this.dispatchEvent(Rn)}}catch(Rn){}}),500)}}},9705:(C,Rn,or)=>{"use strict";or.d(Rn,{Z:()=>Widgets});or(8193);var So=or(1707),To=or(4824),Ro=or(7457),Uo=or(1679),Oo=or(5608),Ho=or(4133),qo=or(7832),dl=or(8139),ml=or(4229),fl=or(5974),vl=or(8818),bl=or(3911),kl=or(8402),Ll=or(4422),Dl=or(4038),Nc=or(1788),jc=or(4056),Zc=or(5218),eu=or(2482),Ku=or(5163),Yu=or(4873),Eh=or(779),Th=or(625),Ch=or(6666),Lh=or(953),Dh=or(1445),Rh=or(8117),Nh=or(5088),Uh=or(4480),Bh=or(1658),Fh=or(4470),Oh=or(3650),Vh=or(2155),jh=or(3299),Gh=or(939),Hh=or(3701),Zh=or(5476),Wh=or(6580),qh=or(847),Kh=or(6087),Qh=or(8381),Xh=or(7711),Yh=or(3630),Jh=or(4411),$h=or(421);class Widgets{constructor(C){var Rn;let or=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};null==or&&(or={}),null==or.editIdUrl&&(or.editIdUrl="https://www.openstreetmap.org/edit"),this._viewer=C,this._t=this._viewer._t,this._options=or;const So=void 0!==this._viewer.map;this._corners={};const Uo=So?["main","mini"]:["main"],Oo=["top","bottom"],Ho=["left","middle","right"];for(let To of Uo)for(let C of Oo){const Rn=document.createElement("div");Rn.id="gvs-corner-".concat(To,"-").concat(C),Rn.classList.add("gvs-corner-space");for(let or of Ho){const So=document.createElement("div");So.id="".concat(Rn.id,"-").concat(or),So.classList.add("gvs-corner"),this._corners["".concat(To,"-").concat(C,"-").concat(or)]=So,Rn.appendChild(So)}"main"==To?this._viewer.mainContainer.appendChild(Rn):"mini"==To&&this._viewer.miniContainer.appendChild(Rn)}if((0,Ro.zd)()||this._initWidgetPlayer(So),this._initWidgetLegend(So,null===(Rn=or)||void 0===Rn?void 0:Rn.mapAttribution),So&&(this._initWidgetMiniActions(),(0,Ro.zd)()||(this._initWidgetSearch(),this._initWidgetFilters(null!==this._viewer._api._endpoints.user_search&&null!==this._viewer._api._endpoints.user_tiles),this._initWidgetMapLayers(),this._listenMapFiltersChanges())),this._viewer.isWidthSmall()||this._initWidgetShare(),or.customWidget){const C=this._corners["main-bottom-right"];switch(typeof or.customWidget){case"string":for(let Rn of(new DOMParser).parseFromString(or.customWidget,"text/html").body.children)C.appendChild(Rn);break;case"object":Array.isArray(or.customWidget)?or.customWidget.forEach((Rn=>C.appendChild(Rn))):C.appendChild(or.customWidget)}}this._initWidgetZoom(So),this._viewer.container.addEventListener("click",(C=>(0,To.VQ)(C.target,this._viewer.container)))}destroy(){Object.values(this._corners).forEach((C=>C.remove())),delete this._corners,delete this._t,delete this._viewer}_initWidgetZoom(C){this._lastWantedZoom=this._viewer.psv.getZoomLevel();const Rn=(0,To.ax)("gvs-zoom-in",(0,To.fa)(ml.r8),this._t.gvs.zoomIn),or=(0,To.ax)("gvs-zoom-out",(0,To.fa)(fl.Kl),this._t.gvs.zoomOut);(0,To.sS)("gvs-widget-zoom","main-bottom-right",this,[Rn,or],["gvs-group-vertical","gvs-mobile-hidden","gvs-print-hidden"]);const zoomFct=(Rn,or)=>{if(C&&this._viewer.isMapWide())or?this._viewer.map.zoomIn({},{originalEvent:Rn}):this._viewer.map.zoomOut({},{originalEvent:Rn});else{this._viewer.lastPsvAnim&&this._viewer.lastPsvAnim.cancel();const C=or?Math.min(100,this._lastWantedZoom+So.ns):Math.max(0,this._lastWantedZoom-So.ns);this._viewer.lastPsvAnim=this._viewer.psv.animate({speed:So.O_,zoom:C}),this._lastWantedZoom=C}};Rn.addEventListener("click",(C=>zoomFct(C,!0))),or.addEventListener("click",(C=>zoomFct(C,!1)))}_initWidgetPlayer(C){const Rn=(0,To.ax)("gvs-player-prev",(0,To.fa)(jc.DY),this._t.gvs.sequence_prev),or=(0,To.ax)("gvs-player-play"),Ro=(0,To.ax)("gvs-player-next",(0,To.fa)(Zc.ir),this._t.gvs.sequence_next),Uo=(0,To.ax)("gvs-player-more",(0,To.fa)(Dh.Uw),this._t.gvs.sequence_more,["gvs-xs-hidden"]),Oo=(0,To.wf)(this,Uo,[],["gvs-player-options"]);Oo.innerHTML='\n\t\t\t<div class="gvs-input-range" title="'.concat(this._t.gvs.sequence_speed,'">\n\t\t\t\t').concat((0,To.Nk)(Bh.uY),'\n\t\t\t\t<input\n\t\t\t\t\tid="gvs-player-speed"\n\t\t\t\t\ttype="range" name="speed"\n\t\t\t\t\tmin="0" max="').concat(So.q7-100,'"\n\t\t\t\t\tvalue="').concat(So.q7-this._viewer.psv.getTransitionDuration(),'"\n\t\t\t\t\ttitle="').concat(this._t.gvs.sequence_speed,'"\n\t\t\t\t\tstyle="width: 100%;" />\n\t\t\t\t').concat((0,To.Nk)(Rh.tM),'\n\t\t\t</div>\n\t\t\t<button title="').concat(this._t.gvs.contrast,'" id="gvs-player-contrast">\n\t\t\t\t').concat((0,To.Nk)(Uh.X8),"\n\t\t\t</button>\n\t\t");const Ho=(0,To.sS)("gvs-widget-player",C?"main-top-middle":"main-top-left",this,[Rn,or,Ro].concat(this._viewer.isWidthSmall()?[]:[Oo,Uo]),["gvs-group-horizontal","gvs-only-psv","gvs-print-hidden",this._viewer.psv.getPictureMetadata()?"":"gvs-hidden"]),toggleBtnPlay=C=>{or.innerHTML=C?(0,To.Nk)(eu.XQ):(0,To.Nk)(Nc.zc),or.title=C?this._t.gvs.sequence_pause:this._t.gvs.sequence_play};toggleBtnPlay(!1);const updatePlayBtn=()=>{var C,So,Uo,Oo;"pic"===this._viewer.getPicturesNavigation()?((0,To.Qr)(Ro),(0,To.Qr)(or),(0,To.Qr)(Rn)):(null!=(null===(C=this._viewer.psv.getPictureMetadata())||void 0===C||null===(So=C.sequence)||void 0===So?void 0:So.prevPic)?(0,To.Mr)(Rn):(0,To.Qr)(Rn),null!=(null===(Uo=this._viewer.psv.getPictureMetadata())||void 0===Uo||null===(Oo=Uo.sequence)||void 0===Oo?void 0:Oo.nextPic)?((0,To.Mr)(Ro),(0,To.Mr)(or)):((0,To.Qr)(Ro),(0,To.Qr)(or)))};if(updatePlayBtn(),this._viewer.addEventListener("sequence-playing",(()=>toggleBtnPlay(!0))),this._viewer.addEventListener("sequence-stopped",(()=>toggleBtnPlay(!1))),this._viewer.addEventListener("psv:picture-loaded",(()=>Ho.classList.remove("gvs-hidden")),{once:!0}),this._viewer.addEventListener("psv:picture-loaded",updatePlayBtn),this._viewer.addEventListener("pictures-navigation-changed",updatePlayBtn),!this._viewer.isWidthSmall()){const C=Oo.children[0].children[1];this._viewer.addEventListener("psv:transition-duration-changed",(Rn=>{C.value=So.q7-Rn.detail.value})),C.addEventListener("change",(C=>{const Rn=So.q7-C.target.value;this._viewer.psv.setTransitionDuration(Rn)}))}Rn.addEventListener("click",(()=>this._viewer.psv.goToPrevPicture())),Ro.addEventListener("click",(()=>this._viewer.psv.goToNextPicture())),or.addEventListener("click",(()=>{this._viewer.isSequencePlaying()?(toggleBtnPlay(!1),this._viewer.stopSequence()):(toggleBtnPlay(!0),this._viewer.playSequence())}));const qo=document.getElementById("gvs-player-contrast");qo&&qo.addEventListener("click",(()=>{qo.classList.contains("gvs-btn-active")?(qo.classList.remove("gvs-btn-active"),this._viewer.psv.setHigherContrast(!1)):(qo.classList.add("gvs-btn-active"),this._viewer.psv.setHigherContrast(!0))}))}_initWidgetLegend(C,Rn){const or=(0,To.sS)("gvs-widget-legend",C?"main-bottom-right":"main-bottom-left",this,[],["gvs-widget-bg"]);let So,Uo,Oo;C&&(So=(0,To.sS)("gvs-widget-mini-legend","mini-bottom-right",this,[],["gvs-widget-bg","gvs-only-mini","gvs-mobile-hidden"])),this._viewer.isWidthSmall()&&(Uo=document.createElement("button"),Uo.id="gvs-legend-toggle",Uo.classList.add("gvs-btn","gvs-widget-bg","gvs-print-hidden"),Uo.appendChild((0,To.fa)(Gh.DB)),Oo=()=>{"hidden"===or.style.visibility?(or.style.visibility="visible",toggleLegend(!!C&&this._viewer.isMapWide())):(or.innerHTML="",or.style.visibility="hidden",or.appendChild(Uo))},Uo.addEventListener("click",(C=>{C.stopPropagation(),Oo()})));const toggleLegend=Oo=>{var Ho,qo,dl;let ml=Rn||(null===(Ho=this._viewer.map)||void 0===Ho||null===(qo=Ho._attribution)||void 0===qo?void 0:qo._attribHTML)||"",fl="<a href='https://panoramax.fr/' target='_blank'>Panoramax</a>";const vl=null===(dl=this._viewer.psv.getPictureMetadata())||void 0===dl?void 0:dl.caption;let bl;!(0,Ro.zd)()&&vl&&(fl="",vl.producer&&(fl+='<span style="font-weight: bold">&copy; '.concat(vl.producer,"</span>")),vl.date&&(vl.producer&&(fl+="&nbsp;-&nbsp;"),fl+=vl.date.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})),bl=(0,To.fa)(Xh.FD),bl.style.marginLeft="5px"),Oo?(or.innerHTML=ml,(0,Ro.zd)()&&(or.innerHTML="<a href='https://panoramax.fr/' target='_blank'>Panoramax</a><br />"+or.innerHTML),or.style.cursor=null,or.onclick=null,So.innerHTML=fl):(or.innerHTML=fl,bl?(or.appendChild(bl),or.style.cursor="pointer",or.onclick=(0,Ro.zd)()?()=>window.open(window.location.href,"_blank"):this._showPictureMetadataPopup.bind(this)):(or.style.cursor=null,or.onclick=null),C&&(So.innerHTML=ml)),Uo&&or.appendChild(Uo)};Uo?(or.appendChild(Uo),or.style.visibility="hidden"):toggleLegend(!!C&&this._viewer.isMapWide()),this._viewer.addEventListener("focus-changed",(C=>toggleLegend("map"==C.detail.focus))),this._viewer.addEventListener("psv:picture-loaded",(()=>toggleLegend(C&&this._viewer.isMapWide())))}_showPictureMetadataPopup(){var C,Rn,or,So,Ro,Uo,Oo,Ho,qo,ml,fl,vl,bl,kl,Ll,Dl,Nc;const jc=this._viewer.psv.getPictureMetadata();if(!jc)throw new Error("No picture currently selected");const Zc=[];if(Zc.push((0,To.dc)("h4","".concat((0,To.Nk)(Gh.DB)," ").concat(this._t.gvs.metadata))),this._viewer._api._endpoints.report){const C=(0,To.C)("".concat((0,To.Nk)(Qh.ik)," ").concat(this._t.gvs.report));C.firstChild.addEventListener("click",this._showReportForm.bind(this)),Zc.push(C)}const eu=[{section:this._t.gvs.metadata_general_picid,classes:["gvs-td-with-id"],values:(0,To.gJ)(jc.id,this._viewer._api.getPictureMetadataUrl(jc.id,null===jc||void 0===jc||null===(C=jc.sequence)||void 0===C?void 0:C.id),this._t.gvs.metadata_general_picid_link,this._t.gvs.copy)},{section:this._t.gvs.metadata_general_seqid,classes:["gvs-td-with-id"],values:(0,To.gJ)(null===jc||void 0===jc||null===(Rn=jc.sequence)||void 0===Rn?void 0:Rn.id,this._viewer._api.getSequenceMetadataUrl(null===jc||void 0===jc||null===(or=jc.sequence)||void 0===or?void 0:or.id),this._t.gvs.metadata_general_seqid_link,this._t.gvs.copy)},{section:this._t.gvs.metadata_general_author,value:null===jc||void 0===jc||null===(So=jc.caption)||void 0===So?void 0:So.producer},{section:this._t.gvs.metadata_general_license,value:null===jc||void 0===jc||null===(Ro=jc.caption)||void 0===Ro?void 0:Ro.license},{section:this._t.gvs.metadata_general_date,value:null===jc||void 0===jc||null===(Uo=jc.caption)||void 0===Uo||null===(Oo=Uo.date)||void 0===Oo?void 0:Oo.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",fractionalSecondDigits:3,timeZoneName:"short"})}];Zc.push((0,To.W_)("gvs-table-light",eu)),Zc.push((0,To.dc)("h4","".concat((0,To.Nk)(Eh._j)," ").concat(this._t.gvs.metadata_camera)));const Ku=null!==jc&&void 0!==jc&&null!==(Ho=jc.properties)&&void 0!==Ho&&null!==(qo=Ho["pers:interior_orientation"])&&void 0!==qo&&qo.focal_length?"".concat(null===jc||void 0===jc||null===(ml=jc.properties)||void 0===ml||null===(fl=ml["pers:interior_orientation"])||void 0===fl?void 0:fl.focal_length," mm"):"unknown",Yu=[{section:this._t.gvs.metadata_camera_make,value:null===jc||void 0===jc||null===(vl=jc.properties)||void 0===vl||null===(bl=vl["pers:interior_orientation"])||void 0===bl?void 0:bl.camera_manufacturer},{section:this._t.gvs.metadata_camera_model,value:null===jc||void 0===jc||null===(kl=jc.properties)||void 0===kl||null===(Ll=kl["pers:interior_orientation"])||void 0===Ll?void 0:Ll.camera_model},{section:this._t.gvs.metadata_camera_type,value:360===(null===jc||void 0===jc?void 0:jc.horizontalFov)?this._t.gvs.picture_360:this._t.gvs.picture_flat},{section:this._t.gvs.metadata_camera_focal_length,value:Ku}];Zc.push((0,To.W_)("gvs-table-light",Yu)),Zc.push((0,To.dc)("h4","".concat((0,To.Nk)(Zh.op)," ").concat(this._t.gvs.metadata_location)));const Th=void 0!==(null===jc||void 0===jc||null===(Dl=jc.properties)||void 0===Dl?void 0:Dl["view:azimuth"])?"".concat(jc.properties["view:azimuth"],"\xb0"):"unknown",Ch=(0,dl.j$)(jc),Lh=[{section:this._t.gvs.metadata_location_longitude,value:jc.gps[0]},{section:this._t.gvs.metadata_location_latitude,value:jc.gps[1]},{section:this._t.gvs.metadata_location_orientation,value:Th},{section:this._t.gvs.metadata_location_precision,value:Ch}];if(Zc.push((0,To.W_)("gvs-table-light",Lh)),null!==(Nc=jc.properties)&&void 0!==Nc&&Nc.exif){const C=document.createElement("details");C.appendChild((0,To.dc)("summary","".concat((0,To.Nk)(Hh.gr)," ").concat(this._t.gvs.metadata_exif)));const Rn=Object.entries(jc.properties.exif).sort().map((C=>{let[Rn,or]=C;return{section:Rn,value:or}}));C.appendChild((0,To.W_)("",Rn)),Zc.push(C)}this._viewer.setPopup(!0,Zc),this._viewer.dispatchEvent(new CustomEvent("focus-changed",{detail:{focus:"meta"}}))}_showReportForm(){const C=this._viewer.psv.getPictureMetadata();if(!C)throw new Error("No picture currently selected");const Rn=[];Rn.push((0,To.dc)("h4","".concat((0,To.Nk)(Qh.ik)," ").concat(this._t.gvs.report)));const or=(0,Ro.iE)();if(or){const C=document.createElement("p");C.appendChild(document.createTextNode(this._t.gvs.report_auth.replace("{a}",or.name))),Rn.push(C)}const So=document.createElement("form");Rn.push(So);const Uo=document.createElement("div");Uo.classList.add("gvs-input-group");const Oo=(0,To._)("gvs-report-issue",this._t.gvs.report_nature_label,Gh.DB),Ho=document.createElement("select");Ho.name="gvs-report-issue",Ho.required=!0;["","blur_missing","blur_excess","inappropriate","privacy","picture_low_quality","mislocated","copyright","other"].forEach((C=>{const Rn=document.createElement("option");Rn.value=C,Rn.textContent=this._t.gvs.report_nature[C],""===C&&(Rn.setAttribute("disabled",""),Rn.setAttribute("selected",""),Rn.setAttribute("hidden","")),Ho.appendChild(Rn)})),Uo.appendChild(Oo),Uo.appendChild(Ho),So.appendChild(Uo);const qo=document.createElement("div");qo.classList.add("gvs-input-group","gvs-input-group-inline");const dl=document.createElement("input");dl.id="gvs-report-whole-sequence",dl.name="gvs-report-whole-sequence",dl.type="checkbox";const ml=(0,To._)("gvs-report-whole-sequence",this._t.gvs.report_whole_sequence);qo.appendChild(dl),qo.appendChild(ml),So.appendChild(qo);const fl=document.createElement("div");fl.classList.add("gvs-input-group");const vl=(0,To._)("gvs-report-details",this._t.gvs.report_details,Yh.Z6),bl=document.createElement("textarea");let kl;if(bl.name="gvs-report-details",bl.placeholder=this._t.gvs.report_details_placeholder,fl.appendChild(vl),fl.appendChild(bl),So.appendChild(fl),!or){const C=document.createElement("div");C.classList.add("gvs-input-group");const Rn=(0,To._)("email",this._t.gvs.report_email,Jh.IB);kl=document.createElement("input"),kl.type="email",kl.name="email",kl.placeholder=this._t.gvs.report_email_placeholder,C.appendChild(Rn),C.appendChild(kl),So.appendChild(C)}const Ll=document.createElement("div");Ll.classList.add("gvs-input-btn");const Dl=document.createElement("button");Dl.type="submit",Dl.appendChild((0,To.fa)($h.XC)),Dl.appendChild(document.createTextNode(this._t.gvs.report_submit)),Ll.appendChild(Dl),So.appendChild(Ll),So.addEventListener("submit",(Rn=>{var or;Rn.preventDefault(),this._viewer._api.sendReport({issue:Ho.value,picture_id:dl.checked?null:C.id,reporter_comments:bl.value,reporter_email:null===(or=kl)||void 0===or?void 0:or.value,sequence_id:C.sequence.id}).then((()=>{this._viewer.setPopup(!0,[(0,To.dc)("h4","".concat((0,To.Nk)(Qh.ik)," ").concat(this._t.gvs.report)),document.createTextNode(this._t.gvs.report_success)])})).catch((C=>{console.error(C),this._viewer.setPopup(!0,[(0,To.dc)("h4","".concat((0,To.Nk)(Qh.ik)," ").concat(this._t.gvs.report)),document.createTextNode(this._t.gvs.report_failure.replace("{e}",C))])}))})),this._viewer.setPopup(!0,Rn),this._viewer.dispatchEvent(new CustomEvent("focus-changed",{detail:{focus:"meta"}}))}_initWidgetMiniActions(){const C=document.createElement("img");C.src=Uo;const Rn=document.createElement("span");Rn.classList.add("gvs-mobile-hidden"),Rn.appendChild(document.createTextNode(this._t.gvs.expand));const or=(0,To.ax)("gvs-mini-expand",Rn,this._t.gvs.expand_info,["gvs-only-mini","gvs-print-hidden"]);or.appendChild(C),this._corners["mini-top-right"].appendChild(or),or.addEventListener("click",(()=>{this._viewer.setFocus(this._viewer.isMapWide()?"pic":"map")}));const So=document.createElement("img");So.src=Oo;const Ho=(0,To.ax)("gvs-mini-hide",So,this._t.gvs.minimize,["gvs-only-mini","gvs-print-hidden"]);this._corners["mini-bottom-left"].appendChild(Ho),Ho.addEventListener("click",(()=>{this._viewer.setUnfocusedVisible(!1)}));const qo=(0,To.ax)("gvs-mini-show",null,null,["gvs-btn-large","gvs-only-mini-hidden","gvs-print-hidden"]);this._corners["main-bottom-left"].appendChild(qo),qo.addEventListener("click",(()=>{(0,Ro.zd)()?this._viewer.setFocus(this._viewer.isMapWide()?"pic":"map"):this._viewer.setUnfocusedVisible(!0)}));const miniBtnRendering=()=>{this._viewer.map&&this._viewer.isMapWide()?(qo.title=this._t.gvs.show_psv,qo.innerHTML=(0,To.Nk)(Dl.UH)):(qo.title=this._t.gvs.show_map,qo.innerHTML=(0,To.Nk)(kl.Wx))};miniBtnRendering(),this._viewer.addEventListener("focus-changed",miniBtnRendering)}_initWidgetSearch(){const C=(0,To.Fl)("gvs-widget-search-bar",this._t.gvs.search_address,(C=>{const Rn=C.match(/([-+]?\d{1,2}\.\d+),\s*([-+]?\d{1,3}\.\d+)/);if(Rn){const C=parseFloat(Rn[1]),or=parseFloat(Rn[2]);return this._viewer.map.flyTo({center:[or,C],zoom:16}),Promise.resolve(!0)}return this._viewer.map.geocoder({query:C,limit:3,bbox:this._viewer.map.getBounds().toArray().map((C=>C.join(","))).join(","),proximity:this._viewer.map.getCenter().lat+","+this._viewer.map.getCenter().lng}).then((C=>C=C.features.map((C=>({title:C.place_name.split(",")[0],subtitle:C.place_name.split(",").slice(1).join(", "),data:C})))))}),(C=>{C&&(C.data.bounds?this._viewer.map.fitBounds(C.data.bounds):this._viewer.map.flyTo({center:C.data.center,zoom:C.data.zoom||13}))}),this,void 0,this._viewer.isWidthSmall(),this._viewer.map._geolocate);(0,To.sS)("gvs-widget-search",this._viewer.isWidthSmall()?"main-top-right":"main-top-left",this,[C],["gvs-only-map","gvs-print-hidden"])}_initWidgetMapLayers(){const C=(0,To.WD)("gvs-map-layers",Oh.Kr,this._t.gvs.layers,this),Rn=(0,To.wf)(this,C,[]);(0,To.sS)("gvs-widget-map-layers","main-top-right",this,[C,Rn],["gvs-group-large","gvs-group-btnpanel","gvs-only-map","gvs-print-hidden"]),this._viewer.map.hasTwoBackgrounds()&&(Rn.innerHTML="\n\t\t\t\t<h4>".concat((0,To.Nk)(Vh.ye)," ").concat(this._t.gvs.map_background,'</h4>\n\t\t\t\t<div id="gvs-map-bg" class="gvs-input-group">\n\t\t\t\t\t<input type="radio" id="gvs-map-bg-streets" name="gvs-map-bg" value="streets" />\n\t\t\t\t\t<label for="gvs-map-bg-streets">\n\t\t\t\t\t\t<img id="gvs-map-bg-streets-img" />\n\t\t\t\t\t\t').concat(this._t.gvs.map_background_streets,'\n\t\t\t\t\t</label>\n\t\t\t\t\t<input type="radio" id="gvs-map-bg-aerial" name="gvs-map-bg" value="aerial" />\n\t\t\t\t\t<label for="gvs-map-bg-aerial">\n\t\t\t\t\t\t<img id="gvs-map-bg-aerial-img" />\n\t\t\t\t\t\t').concat(this._t.gvs.map_background_aerial,"\n\t\t\t\t\t</label>\n\t\t\t\t</div>")),Rn.innerHTML+="\n\t\t\t<h4>".concat((0,To.Nk)(Nh.q2)," ").concat(this._t.gvs.map_theme,'</h4>\n\t\t\t<div class="gvs-input-group">\n\t\t\t\t<select id="gvs-map-theme" style="width: 100%;">\n\t\t\t\t\t<option value="default">').concat(this._t.gvs.map_theme_default,'</option>\n\t\t\t\t\t<option value="age">').concat(this._t.gvs.map_theme_age,'</option>\n\t\t\t\t\t<option value="type">').concat(this._t.gvs.map_theme_type,'</option>\n\t\t\t\t</select>\n\t\t\t</div>\n\t\t\t<div>\n\t\t\t\t<div id="gvs-map-theme-legend-age" class="gvs-map-theme-legend gvs-hidden">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<div class="gvs-map-theme-legend-entry">\n\t\t\t\t\t\t\t<span class="gvs-map-theme-color" style="background-color: ').concat(Ro.DM.PALETTE_4,'"></span>\n\t\t\t\t\t\t\t').concat(this._t.gvs.map_theme_age_4,'\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="gvs-map-theme-legend-entry">\n\t\t\t\t\t\t\t<span class="gvs-map-theme-color" style="background-color: ').concat(Ro.DM.PALETTE_3,'"></span>\n\t\t\t\t\t\t\t').concat(this._t.gvs.map_theme_age_3,'\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<div class="gvs-map-theme-legend-entry">\n\t\t\t\t\t\t\t<span class="gvs-map-theme-color" style="background-color: ').concat(Ro.DM.PALETTE_2,'"></span>\n\t\t\t\t\t\t\t').concat(this._t.gvs.map_theme_age_2,'\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="gvs-map-theme-legend-entry">\n\t\t\t\t\t\t\t<span class="gvs-map-theme-color" style="background-color: ').concat(Ro.DM.PALETTE_1,'"></span>\n\t\t\t\t\t\t\t').concat(this._t.gvs.map_theme_age_1,'\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div id="gvs-map-theme-legend-type" class="gvs-map-theme-legend gvs-hidden">\n\t\t\t\t\t<div class="gvs-map-theme-legend-entry">\n\t\t\t\t\t\t<span class="gvs-map-theme-color" style="background-color: ').concat(Ro.DM.QUALI_1,'"></span>\n\t\t\t\t\t\t').concat(this._t.gvs.picture_360,'\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="gvs-map-theme-legend-entry">\n\t\t\t\t\t\t<span class="gvs-map-theme-color" style="background-color: ').concat(Ro.DM.QUALI_2,'"></span>\n\t\t\t\t\t\t').concat(this._t.gvs.picture_flat,"\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>");const or=Rn.querySelector("#gvs-map-theme"),onChange=()=>{this._onMapThemeChange(),this._onMapFiltersChange()};if(or.addEventListener("change",onChange),or.addEventListener("keypress",onChange),or.addEventListener("paste",onChange),or.addEventListener("input",onChange),this._viewer.map.hasTwoBackgrounds()){Rn.querySelector("#gvs-map-bg-aerial-img").src=Ho;Rn.querySelector("#gvs-map-bg-streets-img").src=qo;const C=Rn.querySelector("#gvs-map-bg-aerial"),or=Rn.querySelector("#gvs-map-bg-streets"),onBgChange=C=>{this._viewer.map.setBackground(C.target.value)};C.addEventListener("change",onBgChange),or.addEventListener("change",onBgChange),this._viewer.addEventListener("map:background-changed",(C=>this._onMapBackgroundChange(C.detail.background))),this._onMapBackgroundChange(this._viewer.map.getBackground())}}_onMapBackgroundChange(C){const Rn=document.getElementById("gvs-map-bg-aerial"),or=document.getElementById("gvs-map-bg-streets");"aerial"===C?Rn.checked=!0:or.checked=!0}_onMapThemeChange(){const C=document.getElementById("gvs-map-theme").value;for(let Rn of document.getElementsByClassName("gvs-map-theme-legend"))Rn.id=="gvs-map-theme-legend-"+C?Rn.classList.remove("gvs-hidden"):Rn.classList.add("gvs-hidden")}_initWidgetFilters(C){const Rn=(0,To.WD)("gvs-filter",Fh.cR,this._t.gvs.filters,this),or=(0,To.wf)(this,Rn,[]);if(or.innerHTML='\n\t\t\t<form id="gvs-filter-form">\n\t\t\t\t<div id="gvs-filter-zoomin">'.concat((0,To.Nk)(Qh.ik)," ").concat(this._t.gvs.filter_zoom_in,"</div>\n\t\t\t\t<h4>").concat((0,To.Nk)(Ku.fT)," ").concat(this._t.gvs.filter_date,'</h4>\n\t\t\t\t<div class="gvs-input-group">\n\t\t\t\t\t<input type="date" id="gvs-filter-date-from" />\n\t\t\t\t\t').concat((0,To.Nk)(Yu.eF),'\n\t\t\t\t\t<input type="date" id="gvs-filter-date-end" />\n\t\t\t\t</div>\n\t\t\t\t<h4>').concat((0,To.Nk)(Ll.Vm)," ").concat(this._t.gvs.filter_picture,'</h4>\n\t\t\t\t<div class="gvs-input-group" style="justify-content: center;">\n\t\t\t\t\t<input type="checkbox" id="gvs-filter-type-flat" name="flat" checked />\n\t\t\t\t\t<label for="gvs-filter-type-flat" style="margin-right: 20px">').concat(this._t.gvs.picture_flat,'</label>\n\t\t\t\t\t<input type="checkbox" id="gvs-filter-type-360" name="360" checked />\n\t\t\t\t\t<label for="gvs-filter-type-360">').concat(this._t.gvs.picture_360,"</label>\n\t\t\t\t</div>\n\t\t\t\t\x3c!--h4>").concat((0,To.Nk)(Eh._j)," ").concat(this._t.gvs.filter_camera_model,'</h4>\n\t\t\t\t<div class="gvs-input-group" id="gvs-filter-model"></div--\x3e\n\t\t\t</form>\n\t\t'),(0,To.sS)("gvs-widget-filter",this._viewer.isWidthSmall()?"main-top-right":"main-top-left",this,[Rn,or],["gvs-group-large","gvs-group-btnpanel","gvs-only-map","gvs-print-hidden"]),this._viewer.isWidthSmall()&&(or.style.width="".concat(this._viewer.container.offsetWidth-70,"px")),C){const C=or.querySelector("#gvs-filter-form"),Rn=document.createElement("h4");Rn.innerHTML="".concat((0,To.Nk)(jh.IL)," ").concat(this._t.gvs.filter_user),C.appendChild(Rn);const So=document.createElement("div");So.id="gvs-filter-user",So.classList.add("gvs-input-group");const Ro=(0,To.Fl)("gvs-filter-search-user",this._t.gvs.search_user,(C=>this._viewer._api.searchUsers(C).then((C=>(C||[]).map((C=>({title:C.label,data:C})))))),(C=>this._viewer.map.setVisibleUsers(C?[C.data.id]:["geovisio"])),this,!0);So.appendChild(Ro),C.appendChild(So)}const So=or.children[0];this._formDelay=null;const onFormChange=()=>{this._formDelay&&clearTimeout(this._formDelay),this._formDelay=setTimeout((()=>{this._onMapFiltersChange()}),250)};So.addEventListener("change",onFormChange),So.addEventListener("reset",onFormChange),So.addEventListener("submit",(C=>(onFormChange(),C.preventDefault(),!1)),!0);for(let To of So.getElementsByTagName("input"))To.addEventListener("change",onFormChange),To.addEventListener("keypress",onFormChange),To.addEventListener("paste",onFormChange),To.addEventListener("input",onFormChange)}_onMapFiltersChange(){const C=document.getElementById("gvs-filter-date-from"),Rn=document.getElementById("gvs-filter-date-end"),or=document.getElementById("gvs-filter-type-flat"),So=document.getElementById("gvs-filter-type-360"),To=document.getElementById("gvs-map-theme");let Ro="";So.checked&&!or.checked&&(Ro="equirectangular"),!So.checked&&or.checked&&(Ro="flat");const Uo={minDate:C.value,maxDate:Rn.value,type:Ro,theme:To.value};this._viewer.setFilters(Uo)}_listenMapFiltersChanges(){const C=document.getElementById("gvs-filter-date-from"),Rn=document.getElementById("gvs-filter-date-end"),or=document.getElementById("gvs-filter-type-flat"),So=document.getElementById("gvs-filter-type-360"),To=document.getElementById("gvs-map-theme");this._viewer.addEventListener("filters-changed",(Ro=>{Ro.detail.minDate&&(C.value=Ro.detail.minDate),Ro.detail.maxDate&&(Rn.value=Ro.detail.maxDate),Ro.detail.theme&&(To.value=Ro.detail.theme),Ro.detail.type&&(So.checked=["","equirectangular"].includes(Ro.detail.type),or.checked=["","flat"].includes(Ro.detail.type)),this._onMapThemeChange()}));const Ro=document.getElementById("gvs-filter-zoomin"),changeLblZoomInDisplay=()=>{this._viewer.map.getZoom()<7?Ro.style.display=null:Ro.style.display="none"};changeLblZoomInDisplay(),this._viewer.map.on("zoomend",changeLblZoomInDisplay)}_initWidgetShare(){var C,Rn;const or=(0,To.ax)("gvs-share",(0,To.fa)(vl.M6),this._t.gvs.share,["gvs-btn-large"]),So=(0,To.wf)(this,or,[]);So.innerHTML='\n\t\t\t<div class="gvs-hidden">\n\t\t\t\t<p id="gvs-share-license" style="margin: 0 0 10px 0;"></p>\n\t\t\t</div>\n\t\t\t<h4 style="margin-top: 0">'.concat((0,To.Nk)(bl.nN)," ").concat(this._t.gvs.share_links,'</h4>\n\t\t\t<div id="gvs-share-links" class="gvs-input-btn">\n\t\t\t\t<a id="gvs-share-image" class="gvs-link-btn gvs-hidden" download target="_blank">').concat((0,To.Nk)(qh.zo)," ").concat(this._t.gvs.share_image,'</a>\n\t\t\t\t<button id="gvs-share-url" data-copy="true" style="flex-basis: 100%; flex-grow: 2; flex-shrink: 2;">').concat((0,To.Nk)(Kh.kZ)," ").concat(this._t.gvs.share_page,'</button>\n\t\t\t\t<button id="gvs-share-print" style="flex-basis: 100%; flex-grow: 2; flex-shrink: 2;">').concat((0,To.Nk)(Ch.wf)," ").concat(this._t.gvs.share_print,"</button>\n\t\t\t</div>\n\t\t\t<h4>\n\t\t\t\t").concat((0,To.Nk)(kl.Wx)," ").concat(this._t.gvs.share_embed,'\n\t\t\t\t<a href="https://docs.panoramax.fr/web-viewer/03_URL_settings/"\n\t\t\t\t\ttitle="').concat(this._t.gvs.share_embed_docs,'"\n\t\t\t\t\ttarget="_blank"\n\t\t\t\t\tstyle="vertical-align: middle">\n\t\t\t\t\t').concat((0,To.Nk)(Gh.DB),'\n\t\t\t\t</a>\n\t\t\t</h4>\n\t\t\t<div class="gvs-input-btn">\n\t\t\t\t<textarea id="gvs-share-iframe" readonly></textarea>\n\t\t\t\t<button data-input="gvs-share-iframe">').concat((0,To.Nk)(Kh.kZ)," ").concat(this._t.gvs.copy,'</button>\n\t\t\t</div>\n\t\t\t<h4 class="gvs-hidden">').concat((0,To.Nk)(Th.Iw)," ").concat(this._t.gvs.edit_osm,'</h4>\n\t\t\t<div class="gvs-input-btn gvs-hidden" style="justify-content: center">\n\t\t\t\t<a id="gvs-edit-id" class="gvs-link-btn" target="_blank">').concat((0,To.Nk)(Zh.op)," ").concat(this._t.gvs.id,'</a>\n\t\t\t\t<button id="gvs-edit-josm" title="').concat(this._t.gvs.josm_live,'">').concat((0,To.Nk)(Lh.QN)," ").concat(this._t.gvs.josm,"</button>\n\t\t\t</div>\n\t\t"),(0,To.sS)("gvs-widget-share","main-bottom-right",this,[or,So],["gvs-group-large","gvs-group-btnpanel","gvs-mobile-hidden","gvs-print-hidden"]);const Ro=document.getElementById("gvs-share-links"),Uo=document.getElementById("gvs-share-image"),Oo=document.getElementById("gvs-share-url");if(this._viewer._api.getRSSURL()){const C=document.createElement("a");C.id="gvs-share-rss",C.classList.add("gvs-link-btn"),C.setAttribute("target","_blank"),C.setAttribute("title",this._t.gvs.share_rss_title),C.appendChild((0,To.fa)(Wh.mW)),C.appendChild(document.createTextNode(this._t.gvs.share_rss)),Ro.insertBefore(C,Oo)}this._viewer.addEventListener("psv:picture-loaded",(()=>{var C;const Rn=this._viewer.psv.getPictureMetadata();Uo.href=Rn.panorama.hdUrl;for(document.getElementById("gvs-share-license").innerHTML=null!==Rn&&void 0!==Rn&&null!==(C=Rn.caption)&&void 0!==C&&C.license?this._t.gvs.legend_license.replace("{l}",Rn.caption.license):"";So.getElementsByClassName("gvs-hidden").length>0;){So.getElementsByClassName("gvs-hidden")[0].classList.remove("gvs-hidden")}}));const updateLinks=C=>{var Rn;const or=(null===C||void 0===C||null===(Rn=C.detail)||void 0===Rn?void 0:Rn.url)||window.location.href.replace(/\/$/,""),To=this._options.iframeBaseURL?this._options.iframeBaseURL+window.location.hash:or,Ro=So.querySelector("#gvs-share-url"),Uo=So.querySelector("#gvs-share-iframe"),Oo=So.querySelector("#gvs-edit-id"),Ho=So.querySelector("#gvs-share-rss");Ro.setAttribute("data-copy",or),Uo.innerText='<iframe src="'.concat(To,'" style="border: none; width: 500px; height: 300px"></iframe>');const qo=this._viewer.psv.getPictureMetadata();if(qo){const C={map:"19/".concat(qo.gps[1],"/").concat(qo.gps[0]),source:"Panoramax",photo_overlay:"panoramax",photo:"panoramax/".concat(qo.id)};Oo.setAttribute("href","".concat(this._options.editIdUrl,"#").concat(new URLSearchParams(C).toString()))}var dl,ml;Ho&&Ho.setAttribute("href",this._viewer._api.getRSSURL(null===(dl=this._viewer)||void 0===dl||null===(ml=dl.map)||void 0===ml?void 0:ml.getBounds()))};updateLinks(),null===(C=this._viewer)||void 0===C||null===(Rn=C._hash)||void 0===Rn||Rn.addEventListener("url-changed",updateLinks),(0,To.QO)(So,this._viewer._t);const Ho=So.querySelector("#gvs-edit-josm");Ho.addEventListener("click",(()=>{Ho.classList.contains("gvs-btn-active")?this._viewer.toggleJOSMLive(!1):this._viewer.toggleJOSMLive(!0).catch((C=>{console.warn(C),alert(this._t.gvs.error_josm)}))})),this._viewer.addEventListener("josm-live-enabled",(()=>Ho.classList.add("gvs-btn-active"))),this._viewer.addEventListener("josm-live-disabled",(()=>Ho.classList.remove("gvs-btn-active")));So.querySelector("#gvs-share-print").addEventListener("click",window.print.bind(window))}}},4873:(C,Rn)=>{"use strict";var or="arrow-right",So=[8594],To="f061",Ro="M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z";Rn.DF={prefix:"fas",iconName:or,icon:[448,512,So,To,Ro]},Rn.eF=Rn.DF},4411:(C,Rn)=>{"use strict";var or=[61946],So="M256 64C150 64 64 150 64 256s86 192 192 192c17.7 0 32 14.3 32 32s-14.3 32-32 32C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256v32c0 53-43 96-96 96c-29.3 0-55.6-13.2-73.2-33.9C320 371.1 289.5 384 256 384c-70.7 0-128-57.3-128-128s57.3-128 128-128c27.9 0 53.7 8.9 74.7 24.1c5.7-5 13.1-8.1 21.3-8.1c17.7 0 32 14.3 32 32v80 32c0 17.7 14.3 32 32 32s32-14.3 32-32V256c0-106-86-192-192-192zm64 192a64 64 0 1 0 -128 0 64 64 0 1 0 128 0z";Rn.DF={prefix:"fas",iconName:"at",icon:[512,512,or,"40",So]},Rn.IB=Rn.DF},4056:(C,Rn)=>{"use strict";var or="backward",So=[9194],To="f04a",Ro="M459.5 440.6c9.5 7.9 22.8 9.7 34.1 4.4s18.4-16.6 18.4-29V96c0-12.4-7.2-23.7-18.4-29s-24.5-3.6-34.1 4.4L288 214.3V256v41.7L459.5 440.6zM256 352V256 128 96c0-12.4-7.2-23.7-18.4-29s-24.5-3.6-34.1 4.4l-192 160C4.2 237.5 0 246.5 0 256s4.2 18.5 11.5 24.6l192 160c9.5 7.9 22.8 9.7 34.1 4.4s18.4-16.6 18.4-29V352z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.DY=Rn.DF},5163:(C,Rn)=>{"use strict";var or="calendar",So=[128197,128198],To="f133",Ro="M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z";Rn.DF={prefix:"fas",iconName:or,icon:[448,512,So,To,Ro]},Rn.fT=Rn.DF},779:(C,Rn)=>{"use strict";var or="camera",So=[62258,"camera-alt"],To="f030",Ro="M149.1 64.8L138.7 96H64C28.7 96 0 124.7 0 160V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V160c0-35.3-28.7-64-64-64H373.3L362.9 64.8C356.4 45.2 338.1 32 317.4 32H194.6c-20.7 0-39 13.2-45.5 32.8zM256 192a96 96 0 1 1 0 192 96 96 0 1 1 0-192z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn._j=Rn.DF},6565:(C,Rn)=>{"use strict";var or="check",So=[10003,10004],To="f00c",Ro="M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z";Rn.DF={prefix:"fas",iconName:or,icon:[448,512,So,To,Ro]},Rn.LE=Rn.DF},7361:(C,Rn)=>{"use strict";var or="chevron-down",So=[],To="f078",Ro="M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.pt=Rn.DF},4671:(C,Rn)=>{"use strict";var or="circle-exclamation",So=["exclamation-circle"],To="f06a",Ro="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24V264c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.xH=Rn.DF},939:(C,Rn)=>{"use strict";var or="circle-info",So=["info-circle"],To="f05a",Ro="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.DB=Rn.DF},8455:(C,Rn)=>{"use strict";var or="circle-notch",So=[],To="f1ce",Ro="M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8C121.8 95.6 64 169.1 64 256c0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1c-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256c0 141.4-114.6 256-256 256S0 397.4 0 256C0 140 77.1 42.1 182.9 10.6c16.9-5 34.8 4.6 39.8 21.5z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.IJ=Rn.DF},7711:(C,Rn)=>{"use strict";var or="circle-question",So=[62108,"question-circle"],To="f059",Ro="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3h58.3c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24V250.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1H222.6c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.FD=Rn.DF},847:(C,Rn)=>{"use strict";var or="cloud-arrow-down",So=[62337,"cloud-download","cloud-download-alt"],To="f0ed",Ro="M144 480C64.5 480 0 415.5 0 336c0-62.8 40.2-116.2 96.2-135.9c-.1-2.7-.2-5.4-.2-8.1c0-88.4 71.6-160 160-160c59.3 0 111 32.2 138.7 80.2C409.9 102 428.3 96 448 96c53 0 96 43 96 96c0 12.2-2.3 23.8-6.4 34.6C596 238.4 640 290.1 640 352c0 70.7-57.3 128-128 128H144zm79-167l80 80c9.4 9.4 24.6 9.4 33.9 0l80-80c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-39 39V184c0-13.3-10.7-24-24-24s-24 10.7-24 24V318.1l-39-39c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9z";Rn.DF={prefix:"fas",iconName:or,icon:[640,512,So,To,Ro]},Rn.zo=Rn.DF},3630:(C,Rn)=>{"use strict";var or="comment-dots",So=[128172,62075,"commenting"],To="f4ad",Ro="M256 448c141.4 0 256-93.1 256-208S397.4 32 256 32S0 125.1 0 240c0 45.1 17.7 86.8 47.7 120.9c-1.9 24.5-11.4 46.3-21.4 62.9c-5.5 9.2-11.1 16.6-15.2 21.6c-2.1 2.5-3.7 4.4-4.9 5.7c-.6 .6-1 1.1-1.3 1.4l-.3 .3 0 0 0 0 0 0 0 0c-4.6 4.6-5.9 11.4-3.4 17.4c2.5 6 8.3 9.9 14.8 9.9c28.7 0 57.6-8.9 81.6-19.3c22.9-10 42.4-21.9 54.3-30.6c31.8 11.5 67 17.9 104.1 17.9zM128 208a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm128 0a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm96 32a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.Z6=Rn.DF},6087:(C,Rn)=>{"use strict";var or="copy",So=[],To="f0c5",Ro="M272 0H396.1c12.7 0 24.9 5.1 33.9 14.1l67.9 67.9c9 9 14.1 21.2 14.1 33.9V336c0 26.5-21.5 48-48 48H272c-26.5 0-48-21.5-48-48V48c0-26.5 21.5-48 48-48zM48 128H192v64H64V448H256V416h64v48c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V176c0-26.5 21.5-48 48-48z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.kZ=Rn.DF},2155:(C,Rn)=>{"use strict";var or="earth-europe",So=["globe-europe"],To="f7a2",Ro="M266.3 48.3L232.5 73.6c-5.4 4-8.5 10.4-8.5 17.1v9.1c0 6.8 5.5 12.3 12.3 12.3c2.4 0 4.8-.7 6.8-2.1l41.8-27.9c2-1.3 4.4-2.1 6.8-2.1h1c6.2 0 11.3 5.1 11.3 11.3c0 3-1.2 5.9-3.3 8l-19.9 19.9c-5.8 5.8-12.9 10.2-20.7 12.8l-26.5 8.8c-5.8 1.9-9.6 7.3-9.6 13.4c0 3.7-1.5 7.3-4.1 10l-17.9 17.9c-6.4 6.4-9.9 15-9.9 24v4.3c0 16.4 13.6 29.7 29.9 29.7c11 0 21.2-6.2 26.1-16l4-8.1c2.4-4.8 7.4-7.9 12.8-7.9c4.5 0 8.7 2.1 11.4 5.7l16.3 21.7c2.1 2.9 5.5 4.5 9.1 4.5c8.4 0 13.9-8.9 10.1-16.4l-1.1-2.3c-3.5-7 0-15.5 7.5-18l21.2-7.1c7.6-2.5 12.7-9.6 12.7-17.6c0-10.3 8.3-18.6 18.6-18.6H400c8.8 0 16 7.2 16 16s-7.2 16-16 16H379.3c-7.2 0-14.2 2.9-19.3 8l-4.7 4.7c-2.1 2.1-3.3 5-3.3 8c0 6.2 5.1 11.3 11.3 11.3h11.3c6 0 11.8 2.4 16 6.6l6.5 6.5c1.8 1.8 2.8 4.3 2.8 6.8s-1 5-2.8 6.8l-7.5 7.5C386 262 384 266.9 384 272s2 10 5.7 13.7L408 304c10.2 10.2 24.1 16 38.6 16H454c6.5-20.2 10-41.7 10-64c0-111.4-87.6-202.4-197.7-207.7zm172 307.9c-3.7-2.6-8.2-4.1-13-4.1c-6 0-11.8-2.4-16-6.6L396 332c-7.7-7.7-18-12-28.9-12c-9.7 0-19.2-3.5-26.6-9.8L314 287.4c-11.6-9.9-26.4-15.4-41.7-15.4H251.4c-12.6 0-25 3.7-35.5 10.7L188.5 301c-17.8 11.9-28.5 31.9-28.5 53.3v3.2c0 17 6.7 33.3 18.7 45.3l16 16c8.5 8.5 20 13.3 32 13.3H248c13.3 0 24 10.7 24 24c0 2.5 .4 5 1.1 7.3c71.3-5.8 132.5-47.6 165.2-107.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM187.3 100.7c-6.2-6.2-16.4-6.2-22.6 0l-32 32c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0l32-32c6.2-6.2 6.2-16.4 0-22.6z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.ye=Rn.DF},1445:(C,Rn)=>{"use strict";var or="ellipsis-vertical",So=["ellipsis-v"],To="f142",Ro="M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z";Rn.DF={prefix:"fas",iconName:or,icon:[128,512,So,To,Ro]},Rn.Uw=Rn.DF},5218:(C,Rn)=>{"use strict";var or="forward",So=[9193],To="f04e",Ro="M52.5 440.6c-9.5 7.9-22.8 9.7-34.1 4.4S0 428.4 0 416V96C0 83.6 7.2 72.3 18.4 67s24.5-3.6 34.1 4.4L224 214.3V256v41.7L52.5 440.6zM256 352V256 128 96c0-12.4 7.2-23.7 18.4-29s24.5-3.6 34.1 4.4l192 160c7.3 6.1 11.5 15.1 11.5 24.6s-4.2 18.5-11.5 24.6l-192 160c-9.5 7.9-22.8 9.7-34.1 4.4s-18.4-16.6-18.4-29V352z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.ir=Rn.DF},3701:(C,Rn)=>{"use strict";var or="gear",So=[9881,"cog"],To="f013",Ro="M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4L83.1 425.9c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4C64.6 273.1 64 264.6 64 256s.6-17.1 1.7-25.4L22.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.gr=Rn.DF},4422:(C,Rn)=>{"use strict";var or="image",So=[],To="f03e",Ro="M0 96C0 60.7 28.7 32 64 32H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6h96 32H424c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.Vm=Rn.DF},3650:(C,Rn)=>{"use strict";var or="layer-group",So=[],To="f5fd",Ro="M264.5 5.2c14.9-6.9 32.1-6.9 47 0l218.6 101c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 149.8C37.4 145.8 32 137.3 32 128s5.4-17.9 13.9-21.8L264.5 5.2zM476.9 209.6l53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 277.8C37.4 273.8 32 265.3 32 256s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0l152-70.2zm-152 198.2l152-70.2 53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 405.8C37.4 401.8 32 393.3 32 384s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0z";Rn.DF={prefix:"fas",iconName:or,icon:[576,512,So,To,Ro]},Rn.Kr=Rn.DF},4480:(C,Rn)=>{"use strict";var or="lightbulb",So=[128161],To="f0eb",Ro="M272 384c9.6-31.9 29.5-59.1 49.2-86.2l0 0c5.2-7.1 10.4-14.2 15.4-21.4c19.8-28.5 31.4-63 31.4-100.3C368 78.8 289.2 0 192 0S16 78.8 16 176c0 37.3 11.6 71.9 31.4 100.3c5 7.2 10.2 14.3 15.4 21.4l0 0c19.8 27.1 39.7 54.4 49.2 86.2H272zM192 512c44.2 0 80-35.8 80-80V416H112v16c0 44.2 35.8 80 80 80zM112 176c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-61.9 50.1-112 112-112c8.8 0 16 7.2 16 16s-7.2 16-16 16c-44.2 0-80 35.8-80 80z";Rn.DF={prefix:"fas",iconName:or,icon:[384,512,So,To,Ro]},Rn.X8=Rn.DF},3911:(C,Rn)=>{"use strict";var or="link",So=[128279,"chain"],To="f0c1",Ro="M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z";Rn.DF={prefix:"fas",iconName:or,icon:[640,512,So,To,Ro]},Rn.nN=Rn.DF},5476:(C,Rn)=>{"use strict";var or="location-dot",So=["map-marker-alt"],To="f3c5",Ro="M215.7 499.2C267 435 384 279.4 384 192C384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2c12.3 15.3 35.1 15.3 47.4 0zM192 128a64 64 0 1 1 0 128 64 64 0 1 1 0-128z";Rn.DF={prefix:"fas",iconName:or,icon:[384,512,So,To,Ro]},Rn.op=Rn.DF},4666:(C,Rn)=>{"use strict";var or="magnifying-glass",So=[128269,"search"],To="f002",Ro="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.Y$=Rn.DF},8402:(C,Rn)=>{"use strict";var or=[128506,62072],So="f279",To="M384 476.1L192 421.2V35.9L384 90.8V476.1zm32-1.2V88.4L543.1 37.5c15.8-6.3 32.9 5.3 32.9 22.3V394.6c0 9.8-6 18.6-15.1 22.3L416 474.8zM15.1 95.1L160 37.2V423.6L32.9 474.5C17.1 480.8 0 469.2 0 452.2V117.4c0-9.8 6-18.6 15.1-22.3z";Rn.DF={prefix:"fas",iconName:"map",icon:[576,512,or,So,To]},Rn.Wx=Rn.DF},5974:(C,Rn)=>{"use strict";var or="minus",So=[8211,8722,10134,"subtract"],To="f068",Ro="M432 256c0 17.7-14.3 32-32 32L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l352 0c17.7 0 32 14.3 32 32z";Rn.DF={prefix:"fas",iconName:or,icon:[448,512,So,To,Ro]},Rn.Kl=Rn.DF},5088:(C,Rn)=>{"use strict";var or="palette",So=[127912],To="f53f",Ro="M512 256c0 .9 0 1.8 0 2.7c-.4 36.5-33.6 61.3-70.1 61.3H344c-26.5 0-48 21.5-48 48c0 3.4 .4 6.7 1 9.9c2.1 10.2 6.5 20 10.8 29.9c6.1 13.8 12.1 27.5 12.1 42c0 31.8-21.6 60.7-53.4 62c-3.5 .1-7 .2-10.6 .2C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0-96a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 96a32 32 0 1 0 0-64 32 32 0 1 0 0 64z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.q2=Rn.DF},4038:(C,Rn)=>{"use strict";var or="panorama",So=[],To="e209",Ro="M45.6 32C20.4 32 0 52.4 0 77.6V434.4C0 459.6 20.4 480 45.6 480c5.1 0 10-.8 14.7-2.4C74.6 472.8 177.6 440 320 440s245.4 32.8 259.6 37.6c4.7 1.6 9.7 2.4 14.7 2.4c25.2 0 45.6-20.4 45.6-45.6V77.6C640 52.4 619.6 32 594.4 32c-5 0-10 .8-14.7 2.4C565.4 39.2 462.4 72 320 72S74.6 39.2 60.4 34.4C55.6 32.8 50.7 32 45.6 32zM96 160a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm272 0c7.9 0 15.4 3.9 19.8 10.5L512.3 353c5.4 8 5.6 18.4 .4 26.5s-14.7 12.3-24.2 10.7C442.7 382.4 385.2 376 320 376c-65.6 0-123.4 6.5-169.3 14.4c-9.8 1.7-19.7-2.9-24.7-11.5s-4.3-19.4 1.9-27.2L197.3 265c4.6-5.7 11.4-9 18.7-9s14.2 3.3 18.7 9l26.4 33.1 87-127.6c4.5-6.6 11.9-10.5 19.8-10.5z";Rn.DF={prefix:"fas",iconName:or,icon:[640,512,So,To,Ro]},Rn.UH=Rn.DF},421:(C,Rn)=>{"use strict";var or="paper-plane",So=[61913],To="f1d8",Ro="M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480V396.4c0-4 1.5-7.8 4.2-10.7L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.XC=Rn.DF},2482:(C,Rn)=>{"use strict";var or="pause",So=[9208],To="f04c",Ro="M48 64C21.5 64 0 85.5 0 112V400c0 26.5 21.5 48 48 48H80c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48H48zm192 0c-26.5 0-48 21.5-48 48V400c0 26.5 21.5 48 48 48h32c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48H240z";Rn.DF={prefix:"fas",iconName:or,icon:[320,512,So,To,Ro]},Rn.XQ=Rn.DF},625:(C,Rn)=>{"use strict";var or=[128394],So="f304",To="M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z";Rn.DF={prefix:"fas",iconName:"pen",icon:[512,512,or,So,To]},Rn.Iw=Rn.DF},1658:(C,Rn)=>{"use strict";var or="person-biking",So=[128692,"biking"],To="f84a",Ro="M400 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm27.2 64l-61.8-48.8c-17.3-13.6-41.7-13.8-59.1-.3l-83.1 64.2c-30.7 23.8-28.5 70.8 4.3 91.6L288 305.1V416c0 17.7 14.3 32 32 32s32-14.3 32-32V288c0-10.7-5.3-20.7-14.2-26.6L295 232.9l60.3-48.5L396 217c5.7 4.5 12.7 7 20 7h64c17.7 0 32-14.3 32-32s-14.3-32-32-32H427.2zM56 384a72 72 0 1 1 144 0A72 72 0 1 1 56 384zm200 0A128 128 0 1 0 0 384a128 128 0 1 0 256 0zm184 0a72 72 0 1 1 144 0 72 72 0 1 1 -144 0zm200 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0z";Rn.DF={prefix:"fas",iconName:or,icon:[640,512,So,To,Ro]},Rn.uY=Rn.DF},1788:(C,Rn)=>{"use strict";var or="play",So=[9654],To="f04b",Ro="M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80V432c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9L361 297c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z";Rn.DF={prefix:"fas",iconName:or,icon:[384,512,So,To,Ro]},Rn.zc=Rn.DF},4229:(C,Rn)=>{"use strict";var or="plus",So=[10133,61543,"add"],To="M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z";Rn.DF={prefix:"fas",iconName:or,icon:[448,512,So,"2b",To]},Rn.r8=Rn.DF},6666:(C,Rn)=>{"use strict";var or="print",So=[128424,128438,9113],To="f02f",Ro="M128 0C92.7 0 64 28.7 64 64v96h64V64H354.7L384 93.3V160h64V93.3c0-17-6.7-33.3-18.7-45.3L400 18.7C388 6.7 371.7 0 354.7 0H128zM384 352v32 64H128V384 368 352H384zm64 32h32c17.7 0 32-14.3 32-32V256c0-35.3-28.7-64-64-64H64c-35.3 0-64 28.7-64 64v96c0 17.7 14.3 32 32 32H64v64c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V384zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.wf=Rn.DF},8117:(C,Rn)=>{"use strict";var or="rocket",So=[],To="f135",Ro="M156.6 384.9L125.7 354c-8.5-8.5-11.5-20.8-7.7-32.2c3-8.9 7-20.5 11.8-33.8L24 288c-8.6 0-16.6-4.6-20.9-12.1s-4.2-16.7 .2-24.1l52.5-88.5c13-21.9 36.5-35.3 61.9-35.3l82.3 0c2.4-4 4.8-7.7 7.2-11.3C289.1-4.1 411.1-8.1 483.9 5.3c11.6 2.1 20.6 11.2 22.8 22.8c13.4 72.9 9.3 194.8-111.4 276.7c-3.5 2.4-7.3 4.8-11.3 7.2v82.3c0 25.4-13.4 49-35.3 61.9l-88.5 52.5c-7.4 4.4-16.6 4.5-24.1 .2s-12.1-12.2-12.1-20.9V380.8c-14.1 4.9-26.4 8.9-35.7 11.9c-11.2 3.6-23.4 .5-31.8-7.8zM384 168a40 40 0 1 0 0-80 40 40 0 1 0 0 80z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.tM=Rn.DF},953:(C,Rn)=>{"use strict";var or="satellite-dish",So=[128225],To="f7c0",Ro="M192 32c0-17.7 14.3-32 32-32C383.1 0 512 128.9 512 288c0 17.7-14.3 32-32 32s-32-14.3-32-32C448 164.3 347.7 64 224 64c-17.7 0-32-14.3-32-32zM60.6 220.6L164.7 324.7l28.4-28.4c-.7-2.6-1.1-5.4-1.1-8.3c0-17.7 14.3-32 32-32s32 14.3 32 32s-14.3 32-32 32c-2.9 0-5.6-.4-8.3-1.1l-28.4 28.4L291.4 451.4c14.5 14.5 11.8 38.8-7.3 46.3C260.5 506.9 234.9 512 208 512C93.1 512 0 418.9 0 304c0-26.9 5.1-52.5 14.4-76.1c7.5-19 31.8-21.8 46.3-7.3zM224 96c106 0 192 86 192 192c0 17.7-14.3 32-32 32s-32-14.3-32-32c0-70.7-57.3-128-128-128c-17.7 0-32-14.3-32-32s14.3-32 32-32z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.QN=Rn.DF},8818:(C,Rn)=>{"use strict";var or="share-nodes",So=["share-alt"],To="f1e0",Ro="M352 224c53 0 96-43 96-96s-43-96-96-96s-96 43-96 96c0 4 .2 8 .7 11.9l-94.1 47C145.4 170.2 121.9 160 96 160c-53 0-96 43-96 96s43 96 96 96c25.9 0 49.4-10.2 66.6-26.9l94.1 47c-.5 3.9-.7 7.8-.7 11.9c0 53 43 96 96 96s96-43 96-96s-43-96-96-96c-25.9 0-49.4 10.2-66.6 26.9l-94.1-47c.5-3.9 .7-7.8 .7-11.9s-.2-8-.7-11.9l94.1-47C302.6 213.8 326.1 224 352 224z";Rn.DF={prefix:"fas",iconName:or,icon:[448,512,So,To,Ro]},Rn.M6=Rn.DF},4470:(C,Rn)=>{"use strict";var or="sliders",So=["sliders-h"],To="f1de",Ro="M0 416c0 17.7 14.3 32 32 32l54.7 0c12.3 28.3 40.5 48 73.3 48s61-19.7 73.3-48L480 448c17.7 0 32-14.3 32-32s-14.3-32-32-32l-246.7 0c-12.3-28.3-40.5-48-73.3-48s-61 19.7-73.3 48L32 384c-17.7 0-32 14.3-32 32zm128 0a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zM320 256a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm32-80c-32.8 0-61 19.7-73.3 48L32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l246.7 0c12.3 28.3 40.5 48 73.3 48s61-19.7 73.3-48l54.7 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-54.7 0c-12.3-28.3-40.5-48-73.3-48zM192 128a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm73.3-64C253 35.7 224.8 16 192 16s-61 19.7-73.3 48L32 64C14.3 64 0 78.3 0 96s14.3 32 32 32l86.7 0c12.3 28.3 40.5 48 73.3 48s61-19.7 73.3-48L480 128c17.7 0 32-14.3 32-32s-14.3-32-32-32L265.3 64z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.cR=Rn.DF},6580:(C,Rn)=>{"use strict";var or="square-rss",So=["rss-square"],To="f143",Ro="M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zM96 136c0-13.3 10.7-24 24-24c137 0 248 111 248 248c0 13.3-10.7 24-24 24s-24-10.7-24-24c0-110.5-89.5-200-200-200c-13.3 0-24-10.7-24-24zm0 96c0-13.3 10.7-24 24-24c83.9 0 152 68.1 152 152c0 13.3-10.7 24-24 24s-24-10.7-24-24c0-57.4-46.6-104-104-104c-13.3 0-24-10.7-24-24zm0 120a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z";Rn.DF={prefix:"fas",iconName:or,icon:[448,512,So,To,Ro]},Rn.mW=Rn.DF},8381:(C,Rn)=>{"use strict";var or="triangle-exclamation",So=[9888,"exclamation-triangle","warning"],To="f071",Ro="M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.ik=Rn.DF},3299:(C,Rn)=>{"use strict";var or="user",So=[128100,62144],To="f007",Ro="M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512H418.3c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304H178.3z";Rn.DF={prefix:"fas",iconName:or,icon:[448,512,So,To,Ro]},Rn.IL=Rn.DF},6899:(C,Rn)=>{"use strict";var or="xmark",So=[128473,10005,10006,10060,215,"close","multiply","remove","times"],To="f00d",Ro="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z";Rn.DF={prefix:"fas",iconName:or,icon:[384,512,So,To,Ro]},Rn.g8=Rn.DF},3114:(C,Rn,or)=>{"use strict";or.d(Rn,{$N:()=>Hh,AE:()=>im,F6:()=>ep,Il:()=>Eh,Of:()=>Sp,P6:()=>Yu,U3:()=>Gh,Yc:()=>Mp,k8:()=>op,rq:()=>ap,tl:()=>Ro,we:()=>ip});var So=or(7760),To=Object.defineProperty,__export=(C,Rn)=>{for(var or in Rn)To(C,or,{get:Rn[or],enumerable:!0})},Ro={};
12
+ !function(C,Rn){"object"===typeof exports&&"object"===typeof module?module.exports=Rn():"function"===typeof define&&define.amd?define("Panoramax",[],Rn):"object"===typeof exports?exports.Panoramax=Rn():C.Panoramax=Rn()}(this,(()=>(()=>{var C={2244:(C,Rn,or)=>{"use strict";or.d(Rn,{Z:()=>Editor});or(2325);var So=or(6792),To=or(2093),Ro=or(2354),Uo=or(4133),Oo=or(7832),Ho=or(7457),qo=or(3406),dl=or(3114);const ml="sequence-headings";class Editor extends So.Z{constructor(C,Rn){let or=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};super(C,Rn,Object.assign(or,{users:[]})),this._selectedSeqId||this._loader.dismiss({},"No sequence is selected"),this.psvContainer=document.createElement("div"),this.mapContainer=document.createElement("div"),this.container.appendChild(this.psvContainer),this.container.appendChild(this.mapContainer);try{this.psv=new Ro.ZP(this,this.psvContainer),this.psv._myVTour.datasource.nodeResolver=this._getNode.bind(this)}catch(So){let C=dl.we.isWebGLSupported?this._t.gvs.error_psv:this._t.gvs.error_webgl;this._loader.dismiss(So,C)}this._api.onceReady().then((()=>{try{this.map=new To.Z(this,this.mapContainer,{raster:or.raster,background:or.background,supplementaryStyle:this._createMapStyle()}),(0,Ho.bk)(this),this._loadSequence(),this.map.once("load",(()=>{this.map.setPaintProperty("geovisio_editor_sequences","line-color",this.map._getLayerColorStyle("sequences")),this.map.setPaintProperty("geovisio_editor_pictures","circle-color",this.map._getLayerColorStyle("pictures")),this.map.setLayoutProperty("geovisio_editor_sequences","visibility","visible"),this.map.setLayoutProperty("geovisio_editor_pictures","visibility","visible"),or.raster&&this._addMapBackgroundWidget(),this._bindPicturesEvents()}));const C=this.map._picMarker.setRotation.bind(this.map._picMarker);this.map._picMarker.setRotation=Rn=>(Rn=void 0===this._lastRelHeading?Rn:Rn+this._lastRelHeading-this.psv.getPictureRelativeHeading(),C(Rn))}catch(So){this._loader.dismiss(So,this._t.gvs.error_psv)}})),this.addEventListener("select",this._onSelect.bind(this))}getClassName(){return"Editor"}_createMapStyle(){return{sources:{geovisio_editor_sequences:{type:"geojson",data:{type:"FeatureCollection",features:[]}}},layers:[{id:"geovisio_editor_sequences",type:"line",source:"geovisio_editor_sequences",layout:{...qo.lg.SEQUENCES.layout},paint:{...qo.lg.SEQUENCES.paint}},{id:"geovisio_editor_pictures",type:"circle",source:"geovisio_editor_sequences",layout:{...qo.lg.PICTURES.layout},paint:{...qo.lg.PICTURES.paint}}]}}_bindPicturesEvents(){this.map.on("mousemove","geovisio_editor_pictures",(()=>{this.map.getCanvas().style.cursor="pointer"})),this.map.on("mouseleave","geovisio_editor_pictures",(()=>{this.map.getCanvas().style.cursor=""})),this.map.on("click","geovisio_editor_pictures",this.map._onPictureClick.bind(this.map))}_loadSequence(){return this._api.getSequenceItems(this._selectedSeqId).then((C=>{this._sequenceData=C.features,this.map.getSource("geovisio_editor_sequences").setData({type:"FeatureCollection",features:[{type:"Feature",properties:{id:this._selectedSeqId},geometry:{type:"LineString",coordinates:C.features.map((C=>C.geometry.coordinates))}},...C.features.map((C=>(C.properties.id=C.id,C.properties.sequences=[this._selectedSeqId],C)))]});const onMapLoad=()=>{if(this._selectedPicId){const Rn=C.features.find((C=>C.id===this._selectedPicId));Rn?(this.select(this._selectedSeqId,this._selectedPicId,!0),this.map.jumpTo({center:Rn.geometry.coordinates,zoom:18})):console.log("Picture with ID",Rn,"was not found")}else{const Rn=[...C.features[0].geometry.coordinates,...C.features[0].geometry.coordinates];for(let or=1;or<C.features.length;or++){const So=C.features[or].geometry.coordinates;So[0]<Rn[0]&&(Rn[0]=So[0]),So[1]<Rn[1]&&(Rn[1]=So[1]),So[0]>Rn[2]&&(Rn[2]=So[0]),So[1]>Rn[3]&&(Rn[3]=So[1])}this.map.fitBounds(Rn,{animate:!1})}this._loader.dismiss()};this.map.loaded()?onMapLoad():this.map.once("load",onMapLoad)})).catch((C=>this._loader.dismiss(C,this._t.gvs.error_api)))}_getNode(C){const Rn=this._sequenceData.find((Rn=>Rn.properties.id===C)),or=Rn?(0,Ho.FF)(Rn,this._t,this._isInternetFast):null;return or&&delete or.links,or}_addMapBackgroundWidget(){const C=document.createElement("div");C.id="gvs-map-bg",C.classList.add("gvs-panel","gvs-widget-bg","gvs-input-group");const onBgChange=C=>this.map.setBackground(C.target.value),Rn=document.createElement("input");Rn.id="gvs-map-bg-streets",Rn.setAttribute("type","radio"),Rn.setAttribute("name","gvs-map-bg"),Rn.setAttribute("value","streets"),Rn.addEventListener("change",onBgChange),C.appendChild(Rn);const or=document.createElement("label");or.setAttribute("for",Rn.id);const So=document.createElement("img");So.src=Oo,or.appendChild(So),or.appendChild(document.createTextNode(this._t.gvs.map_background_streets)),C.appendChild(or);const To=document.createElement("input");To.id="gvs-map-bg-aerial",To.setAttribute("type","radio"),To.setAttribute("name","gvs-map-bg"),To.setAttribute("value","aerial"),To.addEventListener("change",onBgChange),C.appendChild(To);const Ro=document.createElement("label");Ro.setAttribute("for",To.id);const Ho=document.createElement("img");Ho.src=Uo,Ro.appendChild(Ho),Ro.appendChild(document.createTextNode(this._t.gvs.map_background_aerial)),C.appendChild(Ro),this.mapContainer.appendChild(C);const onMapBgChange=C=>{"aerial"===C?To.checked=!0:Rn.checked=!0};this.addEventListener("map:background-changed",(C=>onMapBgChange(C.detail.background))),onMapBgChange(this.map.getBackground())}previewSequenceHeadingChange(C){const Rn=void 0!==this.map.getLayer(ml);if(this.map._picMarkerPreview.remove(),void 0===C)return delete this._lastRelHeading,Rn&&this.map.setLayoutProperty(ml,"visibility","none"),void(this._selectedPicId&&this.map._picMarker.setRotation(this.psv.getXY().x));this._lastRelHeading=C,Rn||this.map.addLayer({id:ml,type:"symbol",source:"geovisio_editor_sequences",layout:{"icon-image":"gvs-marker","icon-overlap":"always","icon-size":.8}});const or=-this.psv.getPictureRelativeHeading();this.map.setLayoutProperty(ml,"visibility","visible"),this.map.setLayoutProperty(ml,"icon-rotate",["+",["get","view:azimuth"],or,C]);const So=[["==",["geometry-type"],"Point"]];this._selectedPicId&&So.push(["!=",["get","id"],this._selectedPicId]),this.map.setFilter(ml,["all",...So]),this._selectedPicId&&this.map._picMarker.setRotation(this.psv.getXY().x)}_onSelect(){void 0!==this._lastRelHeading&&this.previewSequenceHeadingChange(this._lastRelHeading)}}},9323:(C,Rn,or)=>{"use strict";or.d(Rn,{Z:()=>Oo});var So=or(6792),To=or(2093),Ro=or(3406),Uo=or(4307);class StandaloneMap extends So.Z{constructor(C,Rn){super(C,Rn,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),this.mapContainer=document.createElement("div"),this.container.appendChild(this.mapContainer),this._api.onceReady().then((()=>this._initMap())),this.addEventListener("map:picture-click",(C=>this.select(C.detail.seqId,C.detail.picId))),this.addEventListener("map:sequence-click",(C=>this.select(C.detail.seqId))),this.addEventListener("select",this._onSelect.bind(this))}getClassName(){return"Map"}destroy(){super.destroy(),this.map.destroy(),delete this.map,this.mapContainer.remove(),this.container.innerHTML="",this.container.classList.remove(...[...this.container.classList].filter((C=>C.startsWith("gvs"))))}_initMap(){this._options.hash=!0;class MyMap extends To.Z{_getLayerStyleProperties(C){return"pictures_symbols"===C?{layout:{visibility:"none"}}:super._getLayerStyleProperties(C)}}this.map=new MyMap(this,this.mapContainer,this._options),this.map.addControl(new Uo.NavigationControl({showCompass:!1})),this.map.on("load",(()=>{this.map.reloadLayersStyles(),this._loader.dismiss()}))}_onSelect(C){if(C.detail.picId||C.detail.seqId){const Rn=C.detail.picId?"pictures":"sequences",or=this.map.queryRenderedFeatures({layers:[...this.map._userLayers].map((C=>(0,Ro.lh)(C,Rn))),filter:["==",["get","id"],C.detail.picId||C.detail.seqId]});or.length>=0&&null!=or[0]&&this.map._attachPreviewToPictures({features:or},Rn)}}}const Oo=StandaloneMap},1707:(C,Rn,or)=>{"use strict";or.d(Rn,{O_:()=>Ho.O_,ZP:()=>Viewer,ns:()=>vl,q7:()=>Ho.q7});or(2411);var So=or(3114),To=or(9705),Ro=or(9204),Uo=or(7457),Oo=or(6792),Ho=or(2354),qo=or(2093),dl=or(3406),ml=or(4824),fl=or(6899);const vl=20,bl=Math.PI/6,kl=100,Ll="http://127.0.0.1:8111",Dl={DEFAULT:"default",AGE:"age",TYPE:"type"};class Viewer extends Oo.Z{constructor(C,Rn){var or;let Uo,Oo=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(super(C,Rn,Oo),null==this._options.map&&(this._options.map={}),null==this._options.widgets&&(this._options.widgets={}),this._sequencePlaying=!1,this._prevSequence=null,this._mapTheme=(null===Oo||void 0===Oo||null===(or=Oo.map)||void 0===or?void 0:or.theme)||Dl.DEFAULT,this._picNav=(null===Oo||void 0===Oo?void 0:Oo.picturesNavigation)||"any",this._options.testing)return;if(!0===this._options.hash||void 0===this._options.hash){if(this._hash=new Ro.Z(this),Uo=this._hash._getCurrentHash(),"none"===Uo.map&&(this._options.map=!1),"object"===typeof this._options.map&&(this._options.map.hash=!1),this._options.map&&Uo.focus&&(this._options.map.startWide="map"===Uo.focus),this._options.map&&Uo.background&&(this._options.map.background=Uo.background),this._options.map&&Uo.users&&(this._options.users=[...new Set(Uo.users.split(","))]),Uo.xyz){const C=this._hash.getXyzOptionsFromHashString(Uo.xyz);this.addEventListener("psv:picture-loaded",(()=>{this.psv.setXYZ(C.x,C.y,C.z)}),{once:!0})}if(this._options.map&&"string"===typeof Uo.map){const C=this._hash.getMapOptionsFromHashString(Uo.map);C&&(this._options.map=Object.assign({},this._options.map,C))}if(this._options.map&&this.setFilters(this._hash.getMapFiltersFromHashVals(Uo),!0),Uo.pic){const C=Uo.pic.split(";");C.length>1&&console.warn("Multiple picture IDs passed in URL, only first one kept"),this._options.selectedPicture=C[0]}"string"===typeof Uo.speed&&(this._options.transition=parseInt(Uo.speed)),Uo.nav&&(this._picNav=Uo.nav)}this._initContainerStructure();try{this.psv=new Ho.ZP(this,this.psvContainer,{transitionDuration:this._options.transition,shouldGoFast:this._psvShouldGoFast.bind(this),keyboard:"always",keyboardActions:{...So.Of.keyboardActions,8:"ROTATE_UP",2:"ROTATE_DOWN",4:"ROTATE_LEFT",6:"ROTATE_RIGHT",PageUp:()=>this.psv.goToNextPicture(),9:()=>this.psv.goToNextPicture(),PageDown:()=>this.psv.goToPrevPicture(),3:()=>this.psv.goToPrevPicture(),5:()=>this.moveCenter(),"*":()=>this.moveCenter(),Home:()=>this.toggleFocus(),7:()=>this.toggleFocus(),End:()=>this.toggleUnfocusedVisible(),1:()=>this.toggleUnfocusedVisible()," ":()=>this.toggleSequencePlaying(),0:()=>this.toggleSequencePlaying()}}),this.psv.addEventListener("dblclick",(()=>{this.map&&this.isMapWide()&&this.setFocus("pic")}))}catch(qo){let C=So.we.isWebGLSupported?this._t.gvs.error_psv:this._t.gvs.error_webgl;this._loader.dismiss(qo,C)}const onceStuffReady=()=>{this._widgets=new To.Z(this,this._options.widgets),this.map&&this.isWidthSmall()&&this.setUnfocusedVisible(!1),this._options.selectedPicture?(this.select(null,this._options.selectedPicture,!0),this.addEventListener("psv:picture-loaded",(()=>{var C;this.map&&this._options.map&&this.map.jumpTo(this._options.map),"meta"===(null===(C=Uo)||void 0===C?void 0:C.focus)&&this._widgets._showPictureMetadataPopup(),this._loader.dismiss()}),{once:!0})):this._loader.dismiss(),this._options.position&&this.goToPosition(...this._options.position).catch((C=>this._loader.dismiss(C,this._t.gvs.error_nopic))),this._hash&&this.map&&(this.map._attribution._container.classList.add("gvs-hidden"),this._hash.bindMapEvents(),this._mapFilters&&this.setFilters(this._mapFilters,!0),Uo.users&&Promise.all(this.map.getVisibleUsers().filter((C=>"geovisio"!=C)).map((C=>this._api.getUserName(C)))).then((C=>{C=C.filter((C=>null!=C)).join(", ");const Rn=document.getElementById("gvs-filter-search-user").querySelector("input");Rn&&Rn.setItem(C)})).catch((C=>console.warn("Error when looking up for user names",C))))};this._api.onceReady().then((()=>{this._options.map?(void 0===this._options.map.doubleClickZoom&&(this._options.map.doubleClickZoom=!1),this._initMap().then(onceStuffReady).catch((C=>this._loader.dismiss(C,this._t.gvs.error_api_compatibility)))):onceStuffReady()}))}getClassName(){return"Viewer"}destroy(){super.destroy(),this._widgets.destroy(),delete this._widgets,this._hash.destroy(),delete this._hash,this.map.destroy(),delete this.map,delete this._mapFilters,this.psv.destroy(),delete this.psv,this.miniContainer.remove(),this.mainContainer.remove(),this.mapContainer.remove(),this.psvContainer.remove(),this.popupContainer.remove(),this.container.innerHTML="",this.container.classList.remove(...[...this.container.classList].filter((C=>C.startsWith("gvs"))))}_initContainerStructure(){this.miniContainer=document.createElement("div"),this.miniContainer.classList.add("gvs-mini"),this.mainContainer=document.createElement("div"),this.mainContainer.classList.add("gvs-main"),this.popupContainer=document.createElement("div"),this.popupContainer.classList.add("gvs-popup","gvs-hidden"),this.psvContainer=document.createElement("div"),this.mainContainer.appendChild(this.psvContainer),this.mapContainer=document.createElement("div"),this.miniContainer.appendChild(this.mapContainer),this.container.appendChild(this.mainContainer),this.container.appendChild(this.miniContainer),this.container.appendChild(this.popupContainer)}async _initMap(){await new Promise((C=>{this.map=new qo.Z(this,this.mapContainer,this._options.map),this.map._getLayerColorStyle=this._getLayerColorStyle.bind(this),this.map._getLayerSortStyle=this._getLayerSortStyle.bind(this),this.addEventListener("map:users-changed",C,{once:!0}),this.container.classList.add("gvs-has-mini"),this.map.on("dblclick",(()=>{this.isMapWide()||this.setFocus("map")})),"object"===typeof this._options.map&&this._options.map.startWide?this.setFocus("map",!0):this.setFocus("pic",!0)})),this._initMapKeyboardHandler(),(0,Uo.bk)(this)}_initMapKeyboardHandler(){const C=this;this.map.keyboard.keydown=function(Rn){if(Rn.altKey||Rn.ctrlKey||Rn.metaKey)return;switch(Rn.key){case"*":case"5":return void C.moveCenter();case"PageUp":case"9":return void C.psv.goToNextPicture();case"PageDown":case"3":return void C.psv.goToPrevPicture();case"Home":case"7":return Rn.stopPropagation(),void C.toggleFocus();case"End":case"1":return void C.toggleUnfocusedVisible();case" ":case"0":return void C.toggleSequencePlaying()}let or=0,So=0,To=0,Ro=0,Uo=0;switch(Rn.keyCode){case 61:case 107:case 171:case 187:or=1;break;case 189:case 109:case 173:or=-1;break;case 37:case 100:Rn.shiftKey?So=-1:(Rn.preventDefault(),Ro=-1);break;case 39:case 102:Rn.shiftKey?So=1:(Rn.preventDefault(),Ro=1);break;case 38:case 104:Rn.shiftKey?To=1:(Rn.preventDefault(),Uo=-1);break;case 40:case 98:Rn.shiftKey?To=-1:(Rn.preventDefault(),Uo=1);break;default:return}return this._rotationDisabled&&(So=0,To=0),{cameraAnimation:C=>{const Oo=this._tr;C.easeTo({duration:300,easeId:"keyboardHandler",easing:C=>C*(2-C),zoom:or?Math.round(Oo.zoom)+or*(Rn.shiftKey?2:1):Oo.zoom,bearing:Oo.bearing+So*this._bearingStep,pitch:Oo.pitch+To*this._pitchStep,offset:[-Ro*this._panStep,-Uo*this._panStep],center:Oo.center},{originalEvent:Rn})}}}.bind(this.map.keyboard)}_psvShouldGoFast(){return this._sequencePlaying&&this.psv.getTransitionDuration()<1e3||this.map&&this.isMapWide()}refreshPSV(){var C;const Rn=this.psv._myVTour.getCurrentNode();if(Rn&&Rn.panorama.baseUrl!==(null===Rn||void 0===Rn||null===(C=Rn.panorama)||void 0===C?void 0:C.origBaseUrl)){const C=this.psv.getZoomLevel(),or=this.psv.getPosition();this.psv._myVTour.state.currentNode=null,this.psv._myVTour.setCurrentNode(Rn.id,{zoomTo:C,rotateTo:or,fadeIn:!1,speed:0,rotation:!1})}Rn&&Rn.panorama.rows>1&&this.psv.adapter.__refresh()}setPopup(C){let Rn=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(C)if(Rn){this.psv.stopKeyboardControl(),this.popupContainer.innerHTML="";const C=document.createElement("div");C.classList.add("gvs-popup-backdrop"),C.addEventListener("click",(()=>this.setPopup(!1)));const or=document.createElement("div");or.classList.add("gvs-widget-bg"),"string"===typeof Rn?or.innerHTML=Rn:Array.isArray(Rn)&&Rn.forEach((C=>or.appendChild(C)));const So=document.createElement("button");So.id="gvs-popup-btn-close",So.classList.add("gvs-btn","gvs-widget-bg"),So.appendChild((0,ml.fa)(fl.g8)),So.addEventListener("click",(()=>this.setPopup(!1))),or.insertBefore(So,or.firstChild),this.popupContainer.appendChild(C),this.popupContainer.appendChild(or),this.popupContainer.classList.remove("gvs-hidden"),(0,ml.QO)(this.popupContainer,this._t)}else this.popupContainer.classList.remove("gvs-hidden");else this.popupContainer.classList.add("gvs-hidden"),this.setFocus("pic"),this.psv.startKeyboardControl()}playSequence(){this._sequencePlaying=!0;const C=new Event("sequence-playing");this.dispatchEvent(C);const nextPicturePlay=()=>{if(this._sequencePlaying){this.addEventListener("psv:picture-loaded",(()=>{this._playTimer=setTimeout((()=>{nextPicturePlay()}),this.psv.getTransitionDuration())}),{once:!0});try{this.psv.goToNextPicture()}catch(C){this.stopSequence()}}};this.psv.addEventListener("click",(()=>{this.stopSequence()})),nextPicturePlay()}stopSequence(){this._sequencePlaying=!1,this._playTimer&&(clearTimeout(this._playTimer),delete this._playTimer),this.refreshPSV();const C=new Event("sequence-stopped");this.dispatchEvent(C)}isSequencePlaying(){return this._sequencePlaying}toggleSequencePlaying(){this.isSequencePlaying()?this.stopSequence():this.playSequence()}moveCenter(){const C=this.psv.getPictureMetadata();C&&(this.map&&this.isMapWide()?this.map.flyTo({center:C.gps,zoom:20}):this._psvAnimate({speed:Ho.O_,yaw:0,pitch:0,zoom:Ho.Se}))}moveLeft(){this._moveToDirection("left")}moveRight(){this._moveToDirection("right")}moveUp(){this._moveToDirection("up")}moveDown(){this._moveToDirection("down")}_moveToDirection(C){if(this.map&&this.isMapWide()){let Rn;switch(C){case"up":Rn=[0,-100];break;case"left":Rn=[-100,0];break;case"down":Rn=[0,kl];break;case"right":Rn=[kl,0]}this.map.panBy(Rn)}else{let Rn=this.psv.getPosition();switch(C){case"up":Rn.pitch+=bl;break;case"left":Rn.yaw-=bl;break;case"down":Rn.pitch-=bl;break;case"right":Rn.yaw+=bl}this._psvAnimate({speed:Ho.O_,...Rn})}}_psvAnimate(C){this._lastPsvAnim&&this._lastPsvAnim.cancel(),this._lastPsvAnim=this.psv.animate(C)}isMapWide(){if(!this.map)throw new Error("Map is not enabled");return this.mapContainer.parentNode==this.mainContainer}_getDatesForLayerColors(){const C=864e5,Rn=Date.now();return[Rn-30*C,Rn-365*C,Rn-730*C].map((C=>new Date(C).toISOString().split("T")[0]))}_getLayerColorStyle(C){var Rn,or,So,To,Ro;const Oo=["case",["==",["get","hidden"],!0],Uo.DM.HIDDEN],Ho=(null===(Rn=this.psv._myVTour)||void 0===Rn||null===(or=Rn.state)||void 0===or?void 0:or.loadingNode)||(null===(So=this.psv._myVTour)||void 0===So||null===(To=So.state)||void 0===To||null===(Ro=To.currentNode)||void 0===Ro?void 0:Ro.id),qo=Ho?this.psv._picturesSequences[Ho]:null;if("sequences"==C&&qo?Oo.push(["==",["get","id"],qo],Uo.DM.SELECTED):"pictures"==C&&qo&&Oo.push(["in",qo,["get","sequences"]],Uo.DM.SELECTED),this._mapTheme==Dl.AGE){const Rn="sequences"==C?"date":"ts",or=this._getDatesForLayerColors();Oo.push(["!",["has",Rn]],Uo.DM.BASE,[">=",["get",Rn],or[0]],Uo.DM.PALETTE_4,[">=",["get",Rn],or[1]],Uo.DM.PALETTE_3,[">=",["get",Rn],or[2]],Uo.DM.PALETTE_2,Uo.DM.PALETTE_1)}else this._mapTheme==Dl.TYPE?Oo.push(["!",["has","type"]],Uo.DM.BASE,["==",["get","type"],"equirectangular"],Uo.DM.QUALI_1,Uo.DM.QUALI_2):Oo.push(Uo.DM.BASE);return Oo}_getLayerSortStyle(C){var Rn,or,So,To,Ro;const Uo=["case",["==",["get","hidden"],!0],90],Oo=(null===(Rn=this.psv._myVTour)||void 0===Rn||null===(or=Rn.state)||void 0===or?void 0:or.loadingNode)||(null===(So=this.psv._myVTour)||void 0===So||null===(To=So.state)||void 0===To||null===(Ro=To.currentNode)||void 0===Ro?void 0:Ro.id),Ho=Oo?this.psv._picturesSequences[Oo]:null;if("sequences"==C&&Ho?Uo.push(["==",["get","id"],Ho],100):"pictures"==C&&Ho&&Uo.push(["in",Ho,["get","sequences"]],100),this._mapTheme==Dl.AGE){const Rn="sequences"==C?"date":"ts",or=this._getDatesForLayerColors();Uo.push(["!",["has",Rn]],0,[">=",["get",Rn],or[0]],50,[">=",["get",Rn],or[1]],49,[">=",["get",Rn],or[2]],48)}else this._mapTheme==Dl.TYPE&&Uo.push(["!",["has","type"]],0,["==",["get","type"],"equirectangular"],50);return Uo.push(10),Uo}getPicturesNavigation(){return this._picNav}setPicturesNavigation(C){this._picNav=C;const Rn=new CustomEvent("pictures-navigation-changed",{detail:{value:C}});this.dispatchEvent(Rn)}_picturesNavFilter(C){switch(this._picNav){case"seq":return["next","prev"].includes(C.rel);case"pic":return!1;default:return!0}}toggleJOSMLive(C){if(C){const C=new CustomEvent("josm-live-enabled");return this.dispatchEvent(C),fetch(Ll+"/version").catch((C=>{throw this.dispatchEvent(new CustomEvent("josm-live-disabled")),C})).then((()=>{const C=(0,Uo.Iu)(this.psv.getPictureMetadata());if(C){const Rn="".concat(Ll,"/load_and_zoom?").concat(C);fetch(Rn).catch((C=>{console.warn(C),this.toggleJOSMLive(!1)}))}this._josmListener=()=>{const C=(0,Uo.Iu)(this.psv.getPictureMetadata());if(C){const Rn="".concat(Ll,"/zoom?").concat(C);fetch(Rn).catch((C=>{console.warn(C),this.toggleJOSMLive(!1)}))}},this.addEventListener("psv:picture-loaded",this._josmListener),this.addEventListener("psv:picture-loading",this._josmListener)}))}{const C=new CustomEvent("josm-live-disabled");return this.dispatchEvent(C),this._josmListener&&(this.removeEventListener("picture-loading",this._josmListener),this.removeEventListener("picture-loaded",this._josmListener),delete this._josmListener),Promise.resolve()}}setFocus(C){var Rn,or,So;let To=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("map"===C&&!this.map)throw new Error("Map is not enabled");if(!["map","pic"].includes(C))throw new Error("Invalid focus value (should be pic or map)");var Ro;(null===(Rn=this.mapContainer.parentElement)||void 0===Rn||Rn.removeChild(this.mapContainer),null===(or=this.psvContainer.parentElement)||void 0===or||or.removeChild(this.psvContainer),"map"===C)?(this.psv.stopKeyboardControl(),this.map.keyboard.enable(),this.container.classList.add("gvs-focus-map"),this.mainContainer.appendChild(this.mapContainer),this.miniContainer.appendChild(this.psvContainer),this.map.getCanvas().focus()):(null===this||void 0===this||null===(Ro=this.map)||void 0===Ro||Ro.keyboard.disable(),this.psv.startKeyboardControl(),this.container.classList.remove("gvs-focus-map"),this.mainContainer.appendChild(this.psvContainer),this.miniContainer.appendChild(this.mapContainer),this.psvContainer.focus());if(null===this||void 0===this||null===(So=this.map)||void 0===So||So.resize(),this.psv.autoSize(),this.refreshPSV(),!To){const Rn=new CustomEvent("focus-changed",{detail:{focus:C}});this.dispatchEvent(Rn)}}toggleFocus(){if(!this.map)throw new Error("Map is not enabled");this.setFocus(this.isMapWide()?"pic":"map")}setUnfocusedVisible(C){if(!this.map)throw new Error("Map is not enabled");C?this.container.classList.remove("gvs-mini-hidden"):this.container.classList.add("gvs-mini-hidden"),this.map.resize(),this.psv.autoSize()}toggleUnfocusedVisible(){if(!this.map)throw new Error("Map is not enabled");this.setUnfocusedVisible(this.container.classList.contains("gvs-mini-hidden"))}setFilters(C){let Rn=arguments.length>1&&void 0!==arguments[1]&&arguments[1],or=[],So=[];if(this._mapFilters={},C.minDate&&""!==C.minDate&&(this._mapFilters.minDate=C.minDate,or.push([">=",["get","date"],C.minDate]),So.push([">=",["get","ts"],C.minDate])),C.maxDate&&""!==C.maxDate){this._mapFilters.maxDate=C.maxDate,or.push(["<=",["get","date"],C.maxDate]);let Rn=new Date(C.maxDate);Rn.setDate(Rn.getDate()+1),Rn=Rn.toISOString().split("T")[0],So.push(["<=",["get","ts"],Rn])}if(C.type&&""!==C.type&&(this._mapFilters.type=C.type,or.push(["==",["get","type"],C.type]),So.push(["==",["get","type"],C.type])),C.camera&&""!==C.camera){this._mapFilters.camera=C.camera;const Rn=C.camera.toLowerCase().trim()+" ",To=C.camera.toLowerCase().trim()+"zzzzzzzzzzzzzzzzzzzz",Ro=["collator",{"case-sensitive":!1,"diacritic-sensitive":!1}];or.push([">=",["get","model"],Rn,Ro]),or.push(["<=",["get","model"],To,Ro]),So.push([">=",["get","model"],Rn,Ro]),So.push(["<=",["get","model"],To,Ro])}if(C.theme&&Object.values(Dl).includes(C.theme)&&(this._mapFilters.theme=C.theme,this.map&&(this._mapTheme=this._mapFilters.theme,this.map.reloadLayersStyles())),0==or.length?or=null:or.unshift("all"),0==So.length?So=null:(So.unshift("all"),So=["step",["zoom"],!0,dl.Lh,So]),this.map){const C=this.map.getVisibleUsers().includes("geovisio");or&&C&&(or=["step",["zoom"],!0,7,or]),this.map.filterUserLayersContent("sequences",or),this.map.filterUserLayersContent("pictures",So),!Rn&&(null!==or||null!==So||null!==this._mapFilters.theme&&this._mapFilters.theme!==Dl.DEFAULT)&&C&&this.map.getZoom()<7&&this.map.easeTo({zoom:7})}const To=new CustomEvent("filters-changed",{detail:Object.assign({},this._mapFilters)});this.dispatchEvent(To)}}},6792:(C,Rn,or)=>{"use strict";or.d(Rn,{Z:()=>CoreView});or(9835);var So=or(937),To=or(7586),Ro=or(3406),Uo=or(7457),Oo=or(4147),Ho=or(8152);class CoreView extends EventTarget{constructor(C,Rn){var or;let qo=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(super(),this._options=qo,null==this._options&&(this._options={}),this._options.users||(this._options.users=["geovisio"]),"string"===typeof this._options.users&&(this._options.users=[this._options.users]),this._options.style||(this._options.style=Ro.wL),this._options.testing||console.info("\ud83d\udcf7 Panoramax ".concat(this.getClassName()," - Version ").concat(Oo.i8," (").concat("10c06f4",")\n\n\ud83c\udd98 Issues can be reported at ").concat(Oo.cj.H)),this._t=(0,To.F)(this._options.lang),this._isInternetFast=null,(0,Uo.EF)().then((C=>this._isInternetFast=C)),this._selectedSeqId=this._options.selectedSequence||null,this._selectedPicId=this._options.selectedPicture||null,this.container="string"===typeof C?document.getElementById(C):C,!(this.container instanceof Element))throw new Error("Container is not a valid HTML element, does it exist in your page ?");this.container.classList.add("gvs","gvs-".concat(this.getClassName().toLocaleLowerCase())),(0,Uo.zd)()&&this.container.classList.add("gvs-iframed"),this.loaderContainer=document.createElement("div"),this.container.appendChild(this.loaderContainer),this._loader=new Ho.Z(this,this.loaderContainer),Rn=Rn.replace("/api/search","/api"),this._api=new So.Z(Rn,{users:this._options.users,fetch:null===(or=this._options)||void 0===or?void 0:or.fetchOptions,style:this._options.style}),this._api.onceReady().then((()=>console.info('\ud83c\udf10 Connected to API "'.concat(this._api._metadata.name,'" (').concat(this._api._endpoint,")\n\u2139\ufe0f API runs STAC ").concat(this._api._metadata.stac_version," & GeoVisio ").concat(this._api._metadata.geovisio_version)))).catch((C=>this._loader.dismiss(C,this._t.gvs.error_api)))}getClassName(){return"CoreView"}destroy(){delete this._options,delete this._t,delete this._api,delete this._loader,this.loaderContainer.remove(),delete this.loaderContainer}isWidthSmall(){var C;return(null===(C=this.container)||void 0===C?void 0:C.offsetWidth)<576}isHeightSmall(){var C;return(null===(C=this.container)||void 0===C?void 0:C.offsetHeight)<400}select(){let C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,Rn=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,or=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const So=this._selectedSeqId||null,To=this._selectedPicId||null;(or||To!=Rn)&&(this._selectedSeqId=C,this._selectedPicId=Rn,this.dispatchEvent(new CustomEvent("select",{detail:{seqId:C,picId:Rn,prevSeqId:So,prevPicId:To}})))}}},8152:(C,Rn,or)=>{"use strict";or.d(Rn,{Z:()=>Loader});or(2007);var So=or(3505),To=or(9836);class Loader{constructor(C,Rn){this._parent=C,this.container=Rn,this.container.classList.add("gvs-loader","gvs-loader-visible");const or=document.createElement("img");or.src=To,or.title=this._parent._t.map.loading,or.classList.add("gvs-loader-img"),this.container.appendChild(or);const So=document.createElement("div"),Ro=document.createElement("span"),nextLabelFun=()=>this._parent._t.gvs.loading_labels_fun[Math.floor(Math.random()*this._parent._t.gvs.loading_labels_fun.length)];Ro.innerHTML=this._parent._t.gvs.loading_labels_serious[Math.floor(Math.random()*this._parent._t.gvs.loading_labels_serious.length)];const nextLabelFct=()=>setTimeout((()=>{Ro.innerHTML=nextLabelFun(),this._loaderLabelChanger=nextLabelFct()}),500+1e3*Math.random());this._loaderLabelChanger=nextLabelFct(),So.appendChild(Ro),this.container.appendChild(So)}isVisible(){return this.container.classList.contains("gvs-loader-visible")}dismiss(){let C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,Rn=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,or=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(clearTimeout(this._loaderLabelChanger),C){!0!==C&&console.error(C),this.container.children[0].src=So,this.container.children[0].style.width="200px",this.container.children[0].style.animation="unset";let To="<small>".concat(or?this._parent._t.gvs.error_click:this._parent._t.gvs.error_retry,"</small>");Rn&&(To=Rn+"<br />"+To),this.container.children[1].innerHTML="".concat(this._parent._t.gvs.error,"<br />").concat(To),or&&this.container.addEventListener("click",or);const Ro=Rn||"Panoramax JS had a blocking exception",Uo=new CustomEvent("broken",{detail:{error:Ro}});throw this._parent.dispatchEvent(Uo),new Error(Ro)}{this.container.classList.remove("gvs-loader-visible"),setTimeout((()=>this.container.remove()),2e3);const C=new CustomEvent("ready");this._parent.dispatchEvent(C),or&&or()}}}},2093:(C,Rn,or)=>{"use strict";or.d(Rn,{Z:()=>Map});or(1786);var So=or(3406),To=or(7457),Ro=or(9836),Uo=or(2506),Oo=or(6812),Ho=or(3732),qo=(or(262),or(4307)),dl=or.n(qo),ml=or(2609),fl=or.n(ml),vl=or(6351);dl().workerClass=fl(),dl().addProtocol("pmtiles",(new vl.b$).tile);const bl=["antialias","attributionControl","bearing","bearingSnap","bounds","boxZoom","center","clickTolerance","collectResourceTiming","cooperativeGestures","crossSourceCollisions","doubleClickZoom","dragPan","dragRotate","fadeDuration","failIfMajorPerformanceCaveat","fitBoundsOptions","hash","interactive","keyboard","localIdeographFontFamily","locale","logoPosition","maplibreLogo","maxBounds","maxCanvasSize","maxPitch","maxTileCacheSize","maxTileCacheZoomLevels","maxZoom","minPitch","minZoom","pitch","pitchWithRotate","pixelRatio","preserveDrawingBuffer","refreshExpiredTiles","renderWorldCopies","scrollZoom","touchPitch","touchZoomRotate","trackResize","transformCameraUpdate","transformRequest","validateStyle","zoom"];class Map extends dl().Map{constructor(C,Rn){let or=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var To;super({container:Rn,style:(0,So.Ec)(C,or),center:[0,0],zoom:0,maxZoom:24,attributionControl:!1,dragRotate:!1,pitchWithRotate:!1,preserveDrawingBuffer:!C.isWidthSmall(),transformRequest:C._api._getMapRequestTransform(),locale:C._t.maplibre,...(To=or,Object.fromEntries(Object.entries(To).filter((C=>{let[Rn]=C;return bl.includes(Rn)}))))}),this._loadMarkerImages(),this._parent=C,this._options=or,this.getContainer().classList.add("gvs-map"),this._options.raster&&(this._options.background=this._options.background||"streets"),this._attribution=new(dl().AttributionControl)({compact:!1}),this.addControl(this._attribution),this._initGeocoder(),this._initMapPosition(),this._picMarker=this._getPictureMarker(),this._picMarkerPreview=this._getPictureMarker(!1),this._picThumbUrl={},this._seqPictures={},this._userLayers=new Set,this.on("mousemove","sequences",this._onSequenceHover.bind(this)),this._parent.addEventListener("select",this.reloadLayersStyles.bind(this)),this.on("load",(async()=>{await this.setVisibleUsers(this._parent._options.users),this.reloadLayersStyles(),this.resize()}))}destroy(){this.remove(),delete this._parent,delete this._options,delete this._attribution,delete this._picMarker,delete this._picMarkerPreview,delete this._picThumbUrl,delete this._seqPictures,delete this._userLayers}_initMapPosition(){this._options.center&&this._options.center!=[0,0]||this._options.zoom&&0!==this._options.zoom||this._options.hash||this._parent._api.onceReady().then((()=>{var C,Rn;let or=null===(C=this._parent)||void 0===C||null===(Rn=C._api)||void 0===Rn?void 0:Rn.getDataBbox();if(or)try{or=new(dl().LngLatBounds)(or),this.loaded()?this.fitBounds(or,{animate:!1}):this.on("load",(()=>this.fitBounds(or,{animate:!1})))}catch(So){console.warn("Received invalid bbox: "+or)}}))}_initGeocoder(){var C,Rn;const or={ban:So.uD,nominatim:So.g8},To=(null===(C=this._options)||void 0===C||null===(Rn=C.geocoder)||void 0===Rn?void 0:Rn.engine)||"nominatim";this.geocoder=or[To],this._geolocate=new(dl().GeolocateControl)({positionOptions:{enableHighAccuracy:!0,timeout:6e4,maximumAge:3e5},showAccuracyCircle:!0,showUserLocation:!0,trackUserLocation:!0}).onAdd(this)}_loadMarkerImages(){[{id:"gvs-marker",img:Ro},{id:"gvs-arrow-flat",img:Oo},{id:"gvs-arrow-360",img:Ho}].forEach((C=>{const Rn=new Image(64,64);Rn.onload=()=>this.addImage(C.id,Rn),Rn.src=C.img}))}reloadVectorTiles(){[...this._userLayers].forEach((C=>{const Rn=this.getSource((0,So.eY)(C));Rn.setTiles(Rn.tiles)}))}hasTwoBackgrounds(){return void 0!==this.getLayer(So.Ws)}getBackground(){if(!this.getLayer(So.Ws))return"streets";return"visible"==this.getLayoutProperty(So.Ws,"visibility")?"aerial":"streets"}setBackground(C){if(!this.getLayer(So.Ws)&&"aerial"===C)throw new Error("No aerial imagery available");if(this.getLayer(So.Ws)){this.setLayoutProperty(So.Ws,"visibility","aerial"===C?"visible":"none");const Rn=new CustomEvent("map:background-changed",{detail:{background:C||"streets"}});this._parent.dispatchEvent(Rn)}}getVisibleUsers(){return[...this._userLayers].filter((C=>"visible"===this.getLayoutProperty((0,So.lh)(C,"pictures"),"visibility")))}async setVisibleUsers(){let C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];"string"===typeof C&&(C=[C]),await Promise.all(C.filter((C=>""!=C&&!this._userLayers.has(C))).map((C=>this._createPicturesTilesLayer(C))));const Rn=["pictures","sequences","sequences_plus","grid","pictures_symbols"];[...this._userLayers].forEach((or=>{Rn.forEach((Rn=>{const To=(0,So.lh)(or,Rn);this.getLayer(To)&&this.setLayoutProperty(To,"visibility",C.includes(or)?"visible":"none")}))}));const or=new CustomEvent("map:users-changed",{detail:{usersIds:C}});this._parent.dispatchEvent(or)}filterUserLayersContent(C,Rn){[...this._userLayers].forEach((or=>{this.setFilter((0,So.lh)(or,C),Rn),"sequences"===C&&this.setFilter((0,So.lh)(or,"sequences_plus"),Rn),"pictures"===C&&this.setFilter((0,So.lh)(or,"pictures_symbols"),Rn)}))}displayPictureMarker(C,Rn,or){this._picMarkerPreview.remove(),this._picMarker.setLngLat([C,Rn]).setRotation(or).addTo(this),this.reloadLayersStyles(),this.flyTo({center:[C,Rn],zoom:this.getZoom()<So.Lh+2?So.Lh+2:this.getZoom(),maxDuration:2e3})}reloadLayersStyles(){const updateStyle=(C,Rn)=>{[...this._userLayers].forEach((or=>{for(let To in Rn.layout)this.setLayoutProperty((0,So.lh)(or,C),To,Rn.layout[To]);for(let To in Rn.paint)this.setPaintProperty((0,So.lh)(or,C),To,Rn.paint[To])}))};["pictures","pictures_symbols","sequences"].forEach((C=>{updateStyle(C,this._getLayerStyleProperties(C))}))}async _createPicturesTilesLayer(C){this._userLayers.add(C);const Rn=this.getStyle().layers.find(So.RF);if("geovisio"!==C&&!this.getSource("geovisio_".concat(C))){const or=await this._parent._api.getUserMapStyle(C);Object.entries(or.sources).forEach((C=>{let[Rn,or]=C;return this.addSource(Rn,or)})),or.layers=or.layers||[];or.layers.concat((0,So.FS)(or.sources,or.layers)).forEach((C=>this.addLayer(C,null===Rn||void 0===Rn?void 0:Rn.id)))}this._picPreviewTimer=null,this._picPopup=new(dl().Popup)({closeButton:!1,closeOnClick:!this._parent.isWidthSmall(),offset:3}),this._picPopup.on("close",(()=>{delete this._picPopup._picId}));const or=(0,So.lh)(C,"pictures");this.on("mousemove",or,(C=>{this.getCanvas().style.cursor="pointer";const Rn=Object.assign({},C);clearTimeout(this._picPreviewTimer),this._picPreviewTimer=setTimeout((()=>this._attachPreviewToPictures(Rn,or)),100)})),this.on("mouseleave",or,(()=>{clearTimeout(this._picPreviewTimer),this.getCanvas().style.cursor="",this._picPopup._picId,this._picPopup.remove()})),this.on("click",or,this._onPictureClick.bind(this));const To=(0,So.lh)(C,"sequences_plus");this.on("mousemove",To,(C=>{if(this.getZoom()<=So.Lh+1&&(this.getCanvas().style.cursor="pointer",C.features[0].properties.id)){const Rn=Object.assign({},C);clearTimeout(this._picPreviewTimer),this._picPreviewTimer=setTimeout((()=>this._attachPreviewToPictures(Rn,To)),100)}})),this.on("mouseleave",To,(()=>{clearTimeout(this._picPreviewTimer),this.getCanvas().style.cursor="",this._picPopup._picId,this._picPopup.remove()})),this.on("click",To,(C=>{C.preventDefault(),this.getZoom()<=So.Lh+1&&this._onSequenceClick(C)})),"geovisio"===C&&this.getLayer("geovisio_grid")&&(this.on("mousemove","geovisio_grid",(C=>{if(this.getZoom()<=So.Lh+1){this.getCanvas().style.cursor="pointer";const Rn=Object.assign({},C);clearTimeout(this._picPreviewTimer),this._picPreviewTimer=setTimeout((()=>this._attachPreviewToPictures(Rn,"geovisio_grid")),100)}})),this.on("mouseleave","geovisio_grid",(()=>{clearTimeout(this._picPreviewTimer),this.getCanvas().style.cursor="",this._picPopup._picId,this._picPopup.remove()})),this.on("click","geovisio_grid",(C=>{C.preventDefault(),this.flyTo({center:C.lngLat,zoom:So.Lh-6})}))),this.on("click",(C=>{!1===C.defaultPrevented&&(clearTimeout(this._picPreviewTimer),this._picPopup.remove())}))}_getLayerStyleProperties(C){if("pictures_symbols"===C)return{paint:{},layout:{"icon-image":["case",["==",["get","id"],this._parent._selectedPicId],"",["==",["get","type"],"equirectangular"],"gvs-arrow-360","gvs-arrow-flat"],"symbol-sort-key":this._getLayerSortStyle(C)}};{const Rn={pictures:"circle",sequences:"line"};return{paint:Object.assign({["".concat(Rn[C],"-color")]:this._getLayerColorStyle(C)},So.lg[C.toUpperCase()].paint),layout:Object.assign({["".concat(Rn[C],"-sort-key")]:this._getLayerSortStyle(C)},So.lg[C.toUpperCase()].layout)}}}_getLayerColorStyle(C){const Rn=["case",["==",["get","hidden"],!0],To.DM.HIDDEN,["==",["get","geovisio:status"],"hidden"],To.DM.HIDDEN],or=this._parent._selectedSeqId;return"sequences"==C&&or?Rn.push(["==",["get","id"],or],To.DM.SELECTED):C.startsWith("pictures")&&or&&Rn.push(["in",or,["get","sequences"]],To.DM.SELECTED),Rn.push(To.DM.BASE),Rn}_getLayerSortStyle(C){const Rn=["case",["==",["get","hidden"],!0],90],or=this._parent._selectedSeqId;return"sequences"==C&&or?Rn.push(["==",["get","id"],or],100):C.startsWith("pictures")&&or&&Rn.push(["in",or,["get","sequences"]],100),Rn.push(10),Rn}_attachPreviewToPictures(C,Rn){let or=C.features.pop();if(!or||or.properties.id==this._picPopup._picId)return;let To=null;if(Rn.endsWith("pictures")?To=or.geometry.coordinates.slice():C.lngLat&&(To=[C.lngLat.lng,C.lngLat.lat]),!To){const C="LineString"===or.geometry.type?[or.geometry.coordinates]:or.geometry.coordinates;let Rn=null;const So=this.getBounds(),Ro=So.getCenter();for(let or=0;or<C.length;or++)for(let Uo=0;Uo<C[or].length;Uo++)if(So.contains(C[or][Uo])){let So=Ro.distanceTo(new(dl().LngLat)(...C[or][Uo]));(null===Rn||So<Rn)&&(To=C[or][Uo],Rn=So)}if(!To)return}this._picPopup.setLngLat(To).addTo(this),this._picThumbUrl[or.properties.id]||this._picPopup.setDOMContent((0,So.sl)(this._parent._t)),this._picPopup._loading=or.properties.id,this._picPopup._picId=or.properties.id;const displayThumb=C=>{if(this._picPopup._loading===or.properties.id)if(delete this._picPopup._loading,C){let Rn=document.createElement("img");Rn.classList.add("gvs-map-thumb"),Rn.alt=this._parent._t.thumbnail;let So=new Image;if(So.src=C,So.addEventListener("load",(()=>{or.properties.hidden?Rn.children[0].src=So.src:Rn.src=So.src,this._picPopup.setDOMContent(Rn)})),or.properties.hidden){const C=document.createElement("div");C.classList.add("gvs-map-thumb-legend"),C.appendChild(document.createTextNode(this._parent._t.map.not_public));const or=document.createElement("div");or.appendChild(Rn),or.appendChild(C),Rn=or}}else this._picPopup.setHTML("<i>".concat(this._parent._t.no_thumbnail,"</i>"))};Rn.endsWith("pictures")?this._getPictureThumbURL(or.properties.id).then(displayThumb):Rn.endsWith("grid")?this._getThumbURL(To).then(displayThumb):this._getSequenceThumbURL(or.properties.id,new(dl().LngLat)(...To)).then(displayThumb)}_getThumbURL(C){return this._parent._api.getPicturesAroundCoordinates(C[1],C[0],.1,1).then((C=>{var Rn;const or=null===C||void 0===C||null===(Rn=C.features)||void 0===Rn?void 0:Rn.pop();return or?this._parent._api.findThumbnailInPictureFeature(or):null}))}_getSequenceThumbURL(C,Rn){return Rn?this._parent._api.getPicturesAroundCoordinates(Rn.lat,Rn.lng,1,1,C).then((Rn=>{var or;return(null===Rn||void 0===Rn||null===(or=Rn.features)||void 0===or?void 0:or.length)>0?this._parent._api.findThumbnailInPictureFeature(Rn.features[0]):this._parent._api.getPictureThumbnailURLForSequence(C)})):this._parent._api.getPictureThumbnailURLForSequence(C)}_getPictureThumbURL(C,Rn){let or=null;return C&&(void 0!==this._picThumbUrl[C]?or="string"===typeof this._picThumbUrl[C]?Promise.resolve(this._picThumbUrl[C]):this._picThumbUrl[C]:(this._picThumbUrl[C]=this._parent._api.getPictureThumbnailURL(C,Rn).then((Rn=>Rn?(this._picThumbUrl[C]=Rn,Rn):(this._picThumbUrl[C]=null,null))).catch((()=>{this._picThumbUrl[C]=null})),or=this._picThumbUrl[C])),or}_getPictureMarker(){let C=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const Rn=document.createElement("img");return Rn.src=C?Uo:Ro,new(dl().Marker)({element:Rn})}_onSequenceHover(C){var Rn;C.preventDefault(),C.features.length>0&&null!==(Rn=C.features[0].properties)&&void 0!==Rn&&Rn.id&&this._parent.dispatchEvent(new CustomEvent("map:sequence-hover",{detail:{seqId:C.features[0].properties.id}}))}_onSequenceClick(C){var Rn;C.preventDefault(),C.features.length>0&&null!==(Rn=C.features[0].properties)&&void 0!==Rn&&Rn.id&&this._parent.dispatchEvent(new CustomEvent("map:sequence-click",{detail:{seqId:C.features[0].properties.id,coordinates:C.lngLat}}))}_onPictureClick(C){var Rn,or;C.preventDefault();const So=(null===C||void 0===C||null===(Rn=C.features)||void 0===Rn?void 0:Rn.length)>0?C.features[0]:null;if(null!==So&&void 0!==So&&null!==(or=So.properties)&&void 0!==or&&or.id){let Rn=null;try{So.properties.sequences&&(Array.isArray(So.properties.sequences)||(So.properties.sequences=JSON.parse(So.properties.sequences)),Rn=So.properties.sequences.pop())}catch(C){console.log("Sequence ID is not available in vector tiles for picture "+So.properties.id)}this._parent.dispatchEvent(new CustomEvent("map:picture-click",{detail:{picId:So.properties.id,seqId:Rn,feature:So}}))}}}},2354:(C,Rn,or)=>{"use strict";or.d(Rn,{O_:()=>ml,Se:()=>dl,ZP:()=>Photo,q7:()=>fl});or(9154);var So=or(9364),To=or(3505),Ro=or(7457),Uo=(or(1066),or(8386),or(9254),or(2825),or(3114)),Oo=or(2188),Ho=or(5856);const qo={baseUrl:So,width:1280,cols:2,rows:1,tileUrl:()=>null},dl=30,ml=250,fl=3e3;Uo.AE.useNewAnglesOrder=!0;class Photo extends Uo.AE{constructor(C,Rn){var or,So,To,Ro;let Uo=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};super({container:Rn,adapter:[Ho.Z,{showErrorTile:!1,baseBlur:!1,resolution:C.isWidthSmall()?32:64,shouldGoFast:Uo.shouldGoFast}],withCredentials:"include"==(null===(or=C._options)||void 0===or||null===(So=or.fetchOptions)||void 0===So?void 0:So.credentials),requestHeaders:null===(To=C._options)||void 0===To||null===(Ro=To.fetchOptions)||void 0===Ro?void 0:Ro.headers,panorama:qo,lang:C._t.psv,minFov:5,loadingTxt:"&nbsp;",navbar:null,rendererParameters:{preserveDrawingBuffer:!C.isWidthSmall()},plugins:[[Oo.P,{dataMode:"server",positionMode:"gps",renderMode:"3d",preload:!0,getNode:()=>{},transitionOptions:()=>{},arrowsPosition:{linkOverlapAngle:Math.PI/6}}]],...Uo}),this._parent=C,Rn.classList.add("gvs-psv"),this._shouldGoFast=(null===Uo||void 0===Uo?void 0:Uo.shouldGoFast)||(()=>!1),this._transitionDuration=(null===Uo||void 0===Uo?void 0:Uo.transitionDuration)||ml,this._myVTour=this.getPlugin(Oo.P),this._myVTour.datasource.nodeResolver=this._getNodeFromAPI.bind(this),this._myVTour.config.transitionOptions=this._psvNodeTransition.bind(this),this._clearArrows=this._myVTour.arrowsRenderer.clear.bind(this._myVTour.arrowsRenderer),this._myVTour.arrowsRenderer.clear=()=>{},this._picturesSequences={},this._myVTour.addEventListener("enter-arrow",this._onEnterArrow.bind(this)),this._myVTour.addEventListener("leave-arrow",this._onLeaveArrow.bind(this)),this._myVTour.addEventListener("node-changed",this._onNodeChanged.bind(this)),this.addEventListener("position-updated",this._onPositionUpdated.bind(this)),this.addEventListener("zoom-updated",this._onZoomUpdated.bind(this)),this._parent.addEventListener("select",this._onSelect.bind(this)),this.loader.size=150,this.loader.color="rgba(61, 61, 61, 0.5)",this.loader.textColor="rgba(255, 255, 255, 0.7)",this.loader.border=5,this.loader.thickness=10,this.loader.canvas.setAttribute("viewBox","0 0 150 150"),this.loader.__updateContent()}async _getNodeFromAPI(C){var Rn,or,So;if(!C)return;const To=await fetch(this._parent._api.getPictureMetadataUrl(C,this._picturesSequences[C]),this._parent._api._getFetchOptions());let Uo=await To.json();if(Uo.features&&(Uo=Uo.features.pop()),!Uo||0===Object.keys(Uo).length||!To.ok)throw this._parent._loader&&this._parent._loader.dismiss(!0,this._parent._t.gvs.error_pic),new Error("Picture with ID "+C+" was not found");this._picturesSequences[C]=Uo.collection;const Oo=(0,Ro.FF)(Uo,this._parent._t,this._parent._isInternetFast,null===(Rn=this._parent._picturesNavFilter)||void 0===Rn?void 0:Rn.bind(this._parent));var Ho,qo;null!==Oo&&void 0!==Oo&&null!==(or=Oo.sequence)&&void 0!==or&&or.prevPic&&(this._picturesSequences[null===Oo||void 0===Oo||null===(Ho=Oo.sequence)||void 0===Ho?void 0:Ho.prevPic]=Uo.collection);null!==Oo&&void 0!==Oo&&null!==(So=Oo.sequence)&&void 0!==So&&So.nextPic&&(this._picturesSequences[null===Oo||void 0===Oo||null===(qo=Oo.sequence)||void 0===qo?void 0:qo.nextPic]=Uo.collection);return Oo}_psvNodeTransition(C,Rn,or){var So,To;let Uo={};const Oo=this._shouldGoFast()?0:Math.min(ml,this._transitionDuration),Ho=Oo>100,qo=null!=(or||(null===Rn||void 0===Rn?void 0:Rn.links.find((Rn=>Rn.nodeId==C.id)))),fl=Rn&&C.sequence.id===Rn.sequence.id,vl=((null===Rn||void 0===Rn||null===(So=Rn.properties)||void 0===So?void 0:So["view:azimuth"])||0)*(Math.PI/180),bl=((null===C||void 0===C||null===(To=C.properties)||void 0===To?void 0:To["view:azimuth"])||0)*(Math.PI/180);this.setOption("maxFov",Math.min(3*C.horizontalFov/4,90));const kl={speed:0,fadeIn:!1,rotation:!1,rotateTo:{pitch:0,yaw:0},zoomTo:dl};if(360==C.horizontalFov)Rn?(0,Ro.Sp)(Rn.gps,C.gps)>=.001?Uo=kl:(Uo={speed:Oo,fadeIn:qo&&Ho,rotation:qo&&fl&&Ho,rotateTo:this.getPosition()},Uo.rotateTo.yaw+=vl-bl):Uo=kl;else if(fl){const C=this.getPosition().yaw,or=Rn.horizontalFov*(Math.PI/180)/2,So=C<=or||C>=2*Math.PI-or,To=Math.abs(vl-bl)<=Math.PI/4;Uo={speed:Oo,fadeIn:qo&&To&&Ho,rotation:qo&&To&&Ho,rotateTo:So?this.getPosition():{pitch:0,yaw:0},zoomTo:So?this.getZoomLevel():dl}}else Uo=kl;Uo.fadeIn&&Uo.speed>=150?setTimeout(this._clearArrows,Uo.speed-100):this._clearArrows();const Ll=new CustomEvent("psv:picture-loading",{detail:{...Object.assign({},this.getXYZ(),Uo.rotateTo?{x:180*(bl+Uo.rotateTo.yaw)/Math.PI}:null,Uo.zoomTo?{z:Uo.zoomTo}:null),picId:C.id,lon:C.gps[0],lat:C.gps[1]}});return this._parent.dispatchEvent(Ll),Uo}_onEnterArrow(C){const Rn=C.link,or=C.node;let So;or&&(So=360===or.horizontalFov?(this.getPictureOriginalHeading()+180*this.getPosition().yaw/Math.PI)%360:this.getPictureOriginalHeading());const To=new CustomEvent("psv:picture-preview-started",{detail:{picId:Rn.nodeId,coordinates:Rn.gps,direction:So}});this._parent.dispatchEvent(To)}_onLeaveArrow(C){const Rn=C.link,or=new CustomEvent("psv:picture-preview-stopped",{detail:{picId:Rn.nodeId}});this._parent.dispatchEvent(or)}_onPositionUpdated(C){let{position:Rn}=C;const or=(0,Ro.wW)(Rn,this.getZoomLevel());or.x+=this.getPictureOriginalHeading(),or.x=or.x%360;const So=new CustomEvent("psv:view-rotated",{detail:or});this._parent.dispatchEvent(So),this._onTilesStartLoading()}_onZoomUpdated(C){let{zoomLevel:Rn}=C;const or=new CustomEvent("psv:view-rotated",{detail:{...this.getXY(),z:Rn}});this._parent.dispatchEvent(or),this._onTilesStartLoading()}_onNodeChanged(C){for(let So of document.getElementsByClassName("gvs-psv-tour-arrows"))So.classList.remove("gvs-clicked");if(C.node.id){var Rn,or;this._parent.select(null===(Rn=C.node)||void 0===Rn||null===(or=Rn.sequence)||void 0===or?void 0:or.id,C.node.id);const So=this.getPictureMetadata();if(!So)return;this._prevSequence=So.sequence.id;const To=new CustomEvent("psv:picture-loaded",{detail:{...this.getXYZ(),picId:C.node.id,lon:So.gps[0],lat:So.gps[1]}});this._parent.dispatchEvent(To),So.panorama.hdUrl?(this.setOption("downloadUrl",So.panorama.hdUrl),this.setOption("downloadName",C.node.id+".jpg")):this.setOption("downloadUrl",null)}this._onTilesStartLoading()}_onTilesStartLoading(){this._tilesQueueTimer&&(clearInterval(this._tilesQueueTimer),delete this._tilesQueueTimer),this._tilesQueueTimer=setInterval((()=>{if(0===Object.keys(this.adapter.queue.tasks).length){if(this._myVTour.state.currentNode){const C=new Event("psv:picture-tiles-loaded",{picId:this._myVTour.state.currentNode.id});this._parent.dispatchEvent(C)}clearInterval(this._tilesQueueTimer),delete this._tilesQueueTimer}}),100)}getPictureMetadata(){return this._myVTour.state.currentNode?Object.assign({},this._myVTour.state.currentNode):null}_onSelect(C){var Rn;C.detail.seqId&&(this._picturesSequences[C.detail.picId]=C.detail.seqId),(null===(Rn=this._myVTour.getCurrentNode())||void 0===Rn?void 0:Rn.id)!==C.detail.picId&&(this.loader.show(),this._myVTour.setCurrentNode(C.detail.picId).catch((C=>{this.showErrorOverlay(C,this._parent._t.gvs.error_pic,!0)})))}goToNextPicture(){if(!this.getPictureMetadata())throw new Error("No picture currently selected");const C=this.getPictureMetadata().sequence.nextPic;if(!C)throw new Error("No next picture available");this._parent.select(this.getPictureMetadata().sequence.id,C)}goToPrevPicture(){if(!this.getPictureMetadata())throw new Error("No picture currently selected");const C=this.getPictureMetadata().sequence.prevPic;if(!C)throw new Error("No previous picture available");this._parent.select(this.getPictureMetadata().sequence.id,C)}async goToPosition(C,Rn){return this._parent._api.getPicturesAroundCoordinates(C,Rn).then((C=>{if(C.features.length>0){const Rn=C.features.pop();return this._parent.select(null===Rn||void 0===Rn?void 0:Rn.collection,Rn.id),Rn.id}return Promise.reject(new Error("No picture found nearby given coordinates"))}))}getXY(){const C=(0,Ro.wW)(this.getPosition());return C.x=(C.x+this.getPictureOriginalHeading())%360,C}getXYZ(){const C=this.getXY();return C.z=this.getZoomLevel(),C}getPictureOriginalHeading(){var C,Rn;return(null===(C=this.getPictureMetadata())||void 0===C||null===(Rn=C.properties)||void 0===Rn?void 0:Rn["view:azimuth"])||0}getPictureRelativeHeading(){return(0,Ro.r)(this.getPictureMetadata())}clearPictureMetadataCache(){var C,Rn,or,So;const To=null===(C=this.getPictureMetadata())||void 0===C?void 0:C.id,Ro=null===(Rn=this.getPictureMetadata())||void 0===Rn||null===(or=Rn.sequence)||void 0===or?void 0:or.id;null===(So=this._myVTour.state.currentTooltip)||void 0===So||So.hide(),this._myVTour.state.currentTooltip=null,this._myVTour.state.currentNode=null,this._myVTour.state.preload={},this._myVTour.datasource.nodes={},To&&this._parent.select(Ro,To)}setXYZ(C,Rn,or){const So=(0,Ro.J9)(C-this.getPictureOriginalHeading(),Rn,or);this.rotate({yaw:So.yaw,pitch:So.pitch}),this.zoom(So.zoom)}setHigherContrast(C){this.renderer.renderer.toneMapping=C?3:0,this.renderer.renderer.toneMappingExposure=C?2:1,this.needsUpdate()}getTransitionDuration(){return this._transitionDuration}setTransitionDuration(C){if((C=parseFloat(C))<100||C>fl)throw new Error("Invalid transition duration (should be between 100 and "+fl+")");this._transitionDuration=C;const Rn=new CustomEvent("psv:transition-duration-changed",{detail:{value:C}});this._parent.dispatchEvent(Rn)}setPanorama(C,Rn){const onFailure=C=>this.showErrorOverlay(C,this._parent._t.gvs.error_pic,!0);try{return super.setPanorama(C,Rn).catch(onFailure)}catch(or){onFailure(or)}}showErrorOverlay(C,Rn,or){this._parent._loader.isVisible()||!this.overlay.isVisible()?this._parent._loader.dismiss(C,Rn,or?()=>{this._parent._loader.dismiss(),this.overlay.hide()}:void 0):(console.error(C),this.overlay.show({image:'<img style="width: 200px" src="'.concat(To,'" />'),title:this._parent._t.gvs.error,text:Rn+"<br />"+this._parent._t.gvs.error_click,dissmisable:or}))}}},937:(C,Rn,or)=>{"use strict";or.d(Rn,{Z:()=>API});var So=or(3406);class API{constructor(C){let Rn=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null===C||void 0===C||"string"!==typeof C)throw new Error("endpoint parameter is empty or not a valid string");if(C.startsWith("/")&&(C=window.location.href.split("/").slice(0,3).join("/")+C),!API.isValidHttpUrl(C))throw new Error("endpoint parameter is not a valid URL: ".concat(C));this._endpoint=C,this._isReady=0,this._dataBbox=null,this._fetchOpts=(null===Rn||void 0===Rn?void 0:Rn.fetch)||{},this._metadata={},Rn.skipReadLanding||(this._readLanding=fetch(C,this._getFetchOptions()).then((C=>C.json())).then((C=>this._parseLanding(C,Rn))).catch((C=>(this._isReady=-1,console.error(C),Promise.reject("Viewer failed to communicate with API")))).then((()=>this._loadMapStyles(Rn.style,Rn.users))).then((()=>(this._isReady=1,"API is ready"))))}onceReady(){return-1==this._isReady?Promise.reject("Viewer failed to communicate with API"):1==this._isReady?Promise.resolve("API is ready"):this._readLanding}isReady(){return 1==this._isReady}_parseLanding(C,Rn){var or,So;if(this._endpoints={collections:null,search:null,style:null,user_style:null,tiles:(null===Rn||void 0===Rn?void 0:Rn.tiles)||null,user_tiles:null,user_search:null,collection_preview:null,item_preview:null,rss:null,report:null},!C||!C.links||!Array.isArray(C.links))throw new Error("API Landing page doesn't contain 'links' list");if(!C.stac_version.startsWith("1.0"))throw new Error("API is not in a supported STAC version (Panoramax viewer supports only 1.0, API is ".concat(C.stac_version,")"));this._metadata.name=C.title||"Unnamed",this._metadata.stac_version=C.stac_version,this._metadata.geovisio_version=C.geovisio_version||"Unknown";const To=[],Ro=[];if([{rel:"search",type:"application/geo+json",endpointId:"search",mandatory:!0,missingIssue:"No direct access to pictures metadata."},{rel:"data",type:"application/json",endpointId:"collections",mandatory:!0,missingIssue:"No way for viewer to access sequences."},{rel:"data",type:"application/rss+xml",endpointId:"rss"},{rel:"xyz",type:"application/vnd.mapbox-vector-tile",endpointId:"tiles"},{rel:"xyz-style",type:"application/json",endpointId:"style"},{rel:"user-xyz-style",type:"application/json",endpointId:"user_style"},{rel:"user-xyz",type:"application/vnd.mapbox-vector-tile",endpointId:"user_tiles"},{rel:"user-search",type:"application/json",endpointId:"user_search",missingIssue:"Filter map data by user name will not be available."},{rel:"collection-preview",type:"image/jpeg",endpointId:"collection_preview",missingIssue:"Display of thumbnail could be slower."},{rel:"item-preview",type:"image/jpeg",endpointId:"item_preview",missingIssue:"Display of thumbnail could be slower."},{rel:"report",type:"application/json",endpointId:"report"}].forEach((Rn=>{const or=C.links.find((C=>C.rel==Rn.rel&&C.type==Rn.type));if(or){if(!API.isValidHttpUrl(or.href))throw new Error("API endpoint '".concat(or.rel,"' (").concat(or.type,") is not a valid URL: ").concat(or.href));this._endpoints[Rn.endpointId]||(this._endpoints[Rn.endpointId]=or.href)}else if(!this._endpoints[Rn.endpointId]){let C="API doesn't offer a '".concat(Rn.rel,"' (").concat(Rn.type,") endpoint in its links");Rn.missingIssue&&(C+="\n".concat(Rn.missingIssue)),Rn.mandatory?To.push(C):Rn.missingIssue&&Ro.push(C)}})),this._endpoints.style||this._endpoints.tiles||Ro.push("API doesn't offer 'xyz' or 'xyz-style' endpoints in its links.\nMap widget will not be available."),this._endpoints.user_style||this._endpoints.user_tiles||Ro.push("API doesn't offer 'user-xyz' or 'user-xyz-style' endpoints in its links.\nFilter map data by user ID will not be available."),Ro.forEach((C=>console.warn(C))),To.length>0)throw new Error(To.join("\n"));const Uo=null===C||void 0===C||null===(or=C.extent)||void 0===or||null===(So=or.spatial)||void 0===So?void 0:So.bbox;this._dataBbox=Uo&&Array.isArray(Uo)&&Uo.length>0&&Array.isArray(Uo[0])&&4===Uo[0].length?[[Uo[0][0],Uo[0][1]],[Uo[0][2],Uo[0][3]]]:null}_loadMapStyles(C,Rn){const or=new Set(Rn||[]);this.mapStyle={version:8,sources:{},layers:[]};const So=[this.getMapStyle()];if("string"===typeof C){const Rn=C.startsWith(this._endpoint)?this._getFetchOptions():void 0;So.push(fetch(C,Rn).then((C=>C.json())))}else"object"===typeof C&&So.push(Promise.resolve(C));return[...or].filter((C=>"geovisio"!==C)).forEach((C=>{So.push(this.getUserMapStyle(C,!0))})),Promise.all(So).then((C=>{const Rn=["bearing","center","glyphs","light","metadata","name","pitch","sky","sprite","terrain","transition","zoom"];C.forEach((C=>{Rn.forEach((Rn=>{C[Rn]&&(this.mapStyle[Rn]=C[Rn]||this.mapStyle[Rn])})),Object.assign(this.mapStyle.sources,(null===C||void 0===C?void 0:C.sources)||{}),this.mapStyle.layers=this.mapStyle.layers.concat((null===C||void 0===C?void 0:C.layers)||[])}))})).catch((C=>console.error(C)))}_getFetchOptions(){return Object.assign({},this._fetchOpts)}_getMapRequestTransform(){if(Object.keys(this._getFetchOptions()).length>0)return C=>{if(C.startsWith(this._endpoint))return{url:C,...this._getFetchOptions()}}}async getSequenceItems(C){if(!this.isReady())throw new Error("API is not ready to use");try{return API.isIdValid(C),fetch("".concat(this._endpoints.collections,"/").concat(C,"/items"),this._getFetchOptions()).then((C=>C.json()))}catch(Rn){return Promise.reject(Rn)}}getPicturesAroundCoordinatesUrl(C,Rn){let or=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e-4,So=arguments.length>3?arguments[3]:void 0,To=arguments.length>4?arguments[4]:void 0;if(!this.isReady())throw new Error("API is not ready to use");if(isNaN(parseFloat(C))||isNaN(parseFloat(Rn)))throw new Error("lat and lon parameters should be valid numbers");const Ro=[Rn-or,C-or,Rn+or,C+or].map((C=>C.toFixed(4))).join(","),Uo=So?"&limit=".concat(So):"",Oo=To?"&collections=".concat(To):"";return"".concat(this._endpoints.search,"?bbox=").concat(Ro).concat(Uo).concat(Oo)}getPicturesAroundCoordinates(C,Rn,or,So,To){return fetch(this.getPicturesAroundCoordinatesUrl(C,Rn,or,So,To),this._getFetchOptions()).then((C=>C.json()))}getPictureMetadataUrl(C,Rn){if(!this.isReady())throw new Error("API is not ready to use");if(API.isIdValid(C))return Rn?"".concat(this._endpoints.collections,"/").concat(Rn,"/items/").concat(C):"".concat(this._endpoints.search,"?ids=").concat(C)}getMapStyle(){if(this.isReady())return this.mapStyle;let C;return C=this._endpoints.style?this._endpoints.style:this._endpoints.tiles?{version:8,sources:{geovisio:{type:"vector",tiles:[this._endpoints.tiles],minzoom:0,maxzoom:So.Lh}}}:fetch("".concat(this._endpoint,"/map/14/0/0.mvt"),this._getFetchOptions()).then((()=>(this._endpoints.tiles="".concat(this._endpoint,"/map/{z}/{x}/{y}.mvt"),console.log("Using fallback endpoint for vector tiles"),this.getMapStyle()))).catch((C=>(console.error(C),Promise.reject(new Error("API doesn't offer a vector tiles endpoint"))))),"string"===typeof C?fetch(C,this._getFetchOptions()).then((C=>C.json())):Promise.resolve(C)}getUserMapStyle(C){let Rn;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]||this.isReady()?C?(this._endpoints.user_style?Rn=this._endpoints.user_style.replace(/\{userId\}/g,C):this._endpoints.user_tiles&&(Rn={version:8,sources:{["geovisio_".concat(C)]:{type:"vector",tiles:[this._endpoints.user_tiles.replace(/\{userId\}/g,C)],minzoom:0,maxzoom:So.Lh}}}),Rn?"string"===typeof Rn?fetch(Rn,this._getFetchOptions()).then((C=>C.json())):Promise.resolve(Rn):Promise.reject(new Error("API doesn't offer map style for specific user"))):Promise.reject(new Error("Parameter userId is empty")):Promise.reject(new Error("API is not ready to use"))}findThumbnailInPictureFeature(C){if(!this.isReady())throw new Error("API is not ready to use");if(!C||!C.assets)return null;let Rn=null;for(let or of Object.values(C.assets)){if(or.roles.includes("thumbnail")&&"image/jpeg"==or.type&&API.isValidHttpUrl(or.href))return or.href;or.roles.includes("visual")&&"image/jpeg"==or.type&&API.isValidHttpUrl(or.href)&&(Rn=or.href)}return Rn}getPictureThumbnailURLForSequence(C,Rn){if(!this.isReady())throw new Error("API is not ready to use");if(this._endpoints.collection_preview)return Promise.resolve(this._endpoints.collection_preview.replace("{id}",C));if(Rn&&Array.isArray(Rn.links)&&Rn.links.length>0){let C=Rn.links.find((C=>"preview"===C.rel&&"image/jpeg"===C.type));if(C&&API.isValidHttpUrl(C.href))return Promise.resolve(C.href)}const or="".concat(this._endpoints.search,"?limit=1&collections=").concat(C);return fetch(or,this._getFetchOptions()).then((C=>C.json())).then((C=>Array.isArray(C.features)&&0!=C.features.length?this.findThumbnailInPictureFeature(C.features.pop()):null))}getPictureThumbnailURL(C,Rn){if(!this.isReady())throw new Error("API is not ready to use");return C?this._endpoints.item_preview?Promise.resolve(this._endpoints.item_preview.replace("{id}",C)):C&&Rn?fetch("".concat(this._endpoints.collections,"/").concat(Rn,"/items/").concat(C),this._getFetchOptions()).then((C=>C.json())).then((C=>C?this.findThumbnailInPictureFeature(C):null)):fetch("".concat(this._endpoints.search,"?ids=").concat(C),this._getFetchOptions()).then((C=>C.json())).then((C=>C&&Array.isArray(C.features)&&0!=C.features.length?this.findThumbnailInPictureFeature(C.features.pop()):null)):Promise.resolve(null)}getRSSURL(C){if(!this.isReady())throw new Error("API is not ready to use");if(this._endpoints.rss){let Rn=this._endpoints.rss;return C&&(Rn+=Rn.includes("?")?"&":"?",Rn+="bbox="+[C.getWest(),C.getSouth(),C.getEast(),C.getNorth()].join(",")),Rn}return null}getSequenceMetadataUrl(C){if(!this.isReady())throw new Error("API is not ready to use");return"".concat(this._endpoints.collections,"/").concat(C)}getDataBbox(){if(!this.isReady())throw new Error("API is not ready to use");return this._dataBbox}searchUsers(C){if(!this.isReady())throw new Error("API is not ready to use");if(!this._endpoints.user_search)throw new Error("User search is not available");return fetch("".concat(this._endpoints.user_search,"?q=").concat(C),this._getFetchOptions()).then((C=>C.json())).then((C=>(null===C||void 0===C?void 0:C.features)||null))}getUserName(C){if(!this.isReady())throw new Error("API is not ready to use");if(!this._endpoints.user_search)throw new Error("User search is not available");return fetch(this._endpoints.user_search.replace(/\/search$/,"/".concat(C)),this._getFetchOptions()).then((C=>C.json())).then((C=>(null===C||void 0===C?void 0:C.name)||null))}sendReport(C){if(!this.isReady())throw new Error("API is not ready to use");if(!this._endpoints.report)throw new Error("Report sending is not available");const Rn={...this._getFetchOptions(),method:"POST",body:JSON.stringify(C),headers:{"Content-Type":"application/json"}};return fetch(this._endpoints.report,Rn).then((async C=>{if(C.status>=400){let or=await C.text();try{or=JSON.parse(or).message}catch(Rn){}return Promise.reject(or)}return C.json()}))}static isValidHttpUrl(C){let Rn;try{Rn=new URL(C)}catch(or){return!1}return"http:"===Rn.protocol||"https:"===Rn.protocol}static isIdValid(C){if(!C||"string"!==typeof C||0===C.length)throw new Error("id should be a valid picture unique identifier");return!0}}},8139:(C,Rn,or)=>{"use strict";function getExifFloat(C){if(!([null,void 0,""].includes(C)||"string"===typeof C&&""===C.trim())){if("number"===typeof C)return C;if("string"!==typeof C);else{if(/^-?\d+(\.\d+)?\/-?\d+(\.\d+)?$/.test(C)){const Rn=C.split("/").map((C=>parseFloat(C)));return Rn[0]/Rn[1]}try{return parseFloat(C)}catch(Rn){}}}}function getGPSPrecision(C){var Rn,or,So,To;let Ro="unknown";const Uo=getExifFloat(null===C||void 0===C||null===(Rn=C.properties)||void 0===Rn||null===(or=Rn.exif)||void 0===or?void 0:or["Exif.GPSInfo.GPSHPositioningError"]),Oo=getExifFloat(null===C||void 0===C||null===(So=C.properties)||void 0===So||null===(To=So.exif)||void 0===To?void 0:To["Exif.GPSInfo.GPSDOP"]);return void 0!==Uo?Ro=Uo<.5?"ideal":Uo<1?"excellent":Uo<3?"good":Uo<7?"moderate":Uo<10?"fair":"poor":void 0!==Oo&&(Ro=Oo<1?"ideal":Oo<2?"excellent":Oo<5?"good":Oo<10?"moderate":Oo<20?"fair":"poor"),Ro}function getSphereCorrection(C){var Rn,or,So,To;let Ro=null===(Rn=C.properties)||void 0===Rn?void 0:Rn["view:azimuth"];if(void 0===Ro){var Uo,Oo;const Rn=getExifFloat(null===(Uo=C.properties)||void 0===Uo||null===(Oo=Uo.exif)||void 0===Oo?void 0:Oo["Exif.GPSInfo.GPSImgDirection"]);void 0!==Rn&&(Ro=Rn)}Ro=Ro||0;let Ho=null===(or=C.properties)||void 0===or?void 0:or["pers:yaw"],qo=["Xmp.GPano.PoseHeadingDegrees","Xmp.Camera.Yaw","Exif.MpfInfo.MPFYawAngle"];if(void 0===Ho)for(let Nc of qo){var dl,ml;const Rn=getExifFloat(null===(dl=C.properties)||void 0===dl||null===(ml=dl.exif)||void 0===ml?void 0:ml[Nc]);if(void 0!==Rn){Ho=Rn;break}}Ho=Ho||0,Math.round(Ro)===Math.round(Ho)&&Ho>0&&console.warn("Picture with UUID",C.id,"has same GPS Image direction and Yaw, could cause rendering issues");let fl=null===(So=C.properties)||void 0===So?void 0:So["pers:pitch"];if(qo=["Xmp.GPano.PosePitchDegrees","Xmp.Camera.Pitch","Exif.MpfInfo.MPFPitchAngle"],void 0===fl)for(let Nc of qo){var vl,bl;const Rn=getExifFloat(null===(vl=C.properties)||void 0===vl||null===(bl=vl.exif)||void 0===bl?void 0:bl[Nc]);if(void 0!==Rn){fl=Rn;break}}fl=fl||0;let kl=null===(To=C.properties)||void 0===To?void 0:To["pers:roll"];if(qo=["Xmp.GPano.PoseRollDegrees","Xmp.Camera.Roll","Exif.MpfInfo.MPFRollAngle"],void 0===kl)for(let Nc of qo){var Ll,Dl;const Rn=getExifFloat(null===(Ll=C.properties)||void 0===Ll||null===(Dl=Ll.exif)||void 0===Dl?void 0:Dl[Nc]);if(void 0!==Rn){kl=Rn;break}}return kl=kl||0,{pan:Ho*Math.PI/180,tilt:fl*Math.PI/180,roll:kl*Math.PI/180}}function getCroppedPanoData(C){var Rn,or;let So;var To,Ro;if(null!==(Rn=C.properties)&&void 0!==Rn&&Rn["pers:interior_orientation"]&&(null!==(To=C.properties["pers:interior_orientation"])&&void 0!==To&&To.visible_area&&null!==(Ro=C.properties["pers:interior_orientation"])&&void 0!==Ro&&Ro.sensor_array_dimensions)){const Rn=C.properties["pers:interior_orientation"].visible_area,or=C.properties["pers:interior_orientation"].sensor_array_dimensions;try{So={fullWidth:parseInt(or[0]),fullHeight:parseInt(or[1]),croppedX:parseInt(Rn[0]),croppedY:parseInt(Rn[1]),croppedWidth:parseInt(or[0])-parseInt(Rn[2])-parseInt(Rn[0]),croppedHeight:parseInt(or[1])-parseInt(Rn[3])-parseInt(Rn[1])}}catch(fl){console.warn("Invalid pers:interior_orientation values for cropped panorama "+C.id)}}if(!So&&null!==(or=C.properties)&&void 0!==or&&or.exif)try{var Uo,Oo,Ho,qo,dl,ml;So={fullWidth:parseInt(null===(Uo=C.properties.exif)||void 0===Uo?void 0:Uo["Xmp.GPano.FullPanoWidthPixels"]),fullHeight:parseInt(null===(Oo=C.properties.exif)||void 0===Oo?void 0:Oo["Xmp.GPano.FullPanoHeightPixels"]),croppedX:parseInt(null===(Ho=C.properties.exif)||void 0===Ho?void 0:Ho["Xmp.GPano.CroppedAreaLeftPixels"]),croppedY:parseInt(null===(qo=C.properties.exif)||void 0===qo?void 0:qo["Xmp.GPano.CroppedAreaTopPixels"]),croppedWidth:parseInt(null===(dl=C.properties.exif)||void 0===dl?void 0:dl["Xmp.GPano.CroppedAreaImageWidthPixels"]),croppedHeight:parseInt(null===(ml=C.properties.exif)||void 0===ml?void 0:ml["Xmp.GPano.CroppedAreaImageHeightPixels"])}}catch(fl){console.warn("Invalid XMP.GPano values for cropped panorama "+C.id)}return So&&(So=Object.fromEntries(Object.entries(So||{}).filter((C=>!isNaN(C[1])))),So.fullWidth==So.croppedWidth&&So.fullHeight==So.croppedHeight&&(So={})),So||{}}or.d(Rn,{Cf:()=>getSphereCorrection,Z1:()=>getCroppedPanoData,j$:()=>getGPSPrecision})},7586:(C,Rn,or)=>{"use strict";or.d(Rn,{F:()=>getTranslations});var So=or(3517),To=or(1700),Ro=or(6980),Uo=or(6493),Oo=or(6254),Ho=or(1392);const qo={de:So,en:To,es:Ro,fr:Uo,hu:Oo,zh_Hant:Ho},autoDetectLocale=()=>{for(const C of window.navigator.languages){let Rn=C;switch(Rn){case"zh-TW":case"zh-HK":case"zh-MO":Rn="zh_Hant";break;case"zh-CN":case"zh-SG":Rn="zh_Hans";break;default:Rn.length>2&&(Rn=C.substring(0,2))}const or=Object.entries(qo).find((C=>C[0]===Rn));if(or)return or[0]}return"en"};function getTranslations(){let C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const Rn=JSON.parse(JSON.stringify(To));let or;if(C||(C=autoDetectLocale()),qo[C]&&"en"!==C&&(or=qo[C]),C.length>2){const Rn=C.substring(0,2);qo[Rn]&&(or=qo[Rn])}return or&&Object.entries(or).forEach((C=>{let[or,So]=C;Object.assign(Rn[or],So)})),Rn}},3406:(C,Rn,or)=>{"use strict";or.d(Rn,{Ec:()=>combineStyles,FS:()=>getMissingLayerStyles,Lh:()=>qo,RF:()=>isLabelLayer,Ws:()=>Ho,eY:()=>getUserSourceId,g8:()=>forwardGeocodingNominatim,lg:()=>dl,lh:()=>getUserLayerId,sl:()=>getThumbGif,uD:()=>forwardGeocodingBAN,wL:()=>Oo});var So=or(4307),To=or.n(So),Ro=or(9836),Uo=or(7457);const Oo="https://panoramax.openstreetmap.fr/pmtiles/basic.json",Ho="gvs-aerial",qo=15,dl={PICTURES:{paint:{"circle-radius":["interpolate",["linear"],["zoom"],qo,4.5,18,6,24,12],"circle-opacity":["interpolate",["linear"],["zoom"],qo,0,qo+1,1],"circle-stroke-color":"#ffffff","circle-stroke-width":["interpolate",["linear"],["zoom"],qo+1,0,qo+2,1,18,1.5,24,3]},layout:{}},PICTURES_SYMBOLS:{paint:{"icon-opacity":["interpolate",["linear"],["zoom"],18,0,19,1]},layout:{"icon-image":["case",["==",["get","type"],"equirectangular"],"gvs-arrow-360","gvs-arrow-flat"],"icon-size":["interpolate",["linear"],["zoom"],18,.5,24,1],"icon-rotate":["to-number",["get","heading"]],"icon-allow-overlap":!0}},SEQUENCES:{paint:{"line-width":["interpolate",["linear"],["zoom"],0,.5,10,2,14,4,16,5,22,3]},layout:{"line-cap":"square"}},SEQUENCES_PLUS:{paint:{"line-width":["interpolate",["linear"],["zoom"],0,15,qo+1,30,qo+2,0],"line-opacity":0,"line-color":"#ff0000"},layout:{"line-cap":"square"}}};function getThumbGif(C){const Rn=document.createElement("img");return Rn.src=Ro,Rn.alt=C.loading,Rn.title=C.loading,Rn.classList.add("gvs-map-thumb","gvs-map-thumb-loader"),Rn}function isLabelLayer(C){var Rn;return"symbol"===C.type&&(null===C||void 0===C||null===(Rn=C.layout)||void 0===Rn?void 0:Rn["text-field"])&&(void 0===C.minzoom||C.minzoom<15)}function combineStyles(C,Rn){var or,So;const To=C._api.getMapStyle();return To.layers=To.layers.concat(getMissingLayerStyles(To.sources,To.layers)),Rn.supplementaryStyle&&(Object.assign(To.sources,Rn.supplementaryStyle.sources||{}),To.layers=To.layers.concat(Rn.supplementaryStyle.layers||[])),Rn.raster&&(To.sources["gvs-aerial"]=Rn.raster,To.layers.push({id:Ho,type:"raster",source:"gvs-aerial",layout:{visibility:"aerial"===Rn.background?"visible":"none"}})),null!==(or=C._options)&&void 0!==or&&null!==(So=or.users)&&void 0!==So&&So.includes("geovisio")||To.layers.forEach((C=>{"geovisio"===C.source&&(C.layout||(C.layout={}),C.layout.visibility="none")})),To.layers.sort(((C,Rn)=>isLabelLayer(C)&&!isLabelLayer(Rn)?1:!isLabelLayer(C)&&isLabelLayer(Rn)?-1:C.id.startsWith("geovisio")&&!Rn.id.startsWith("geovisio")?1:!C.id.startsWith("geovisio")&&Rn.id.startsWith("geovisio")?-1:C.id.endsWith("_pictures")&&!Rn.id.endsWith("_pictures")?1:!C.id.endsWith("_pictures")&&Rn.id.endsWith("_pictures")?-1:0)),To}function getMissingLayerStyles(C,Rn){const or=[];return Object.keys(C).filter((C=>void 0===Rn.find((Rn=>(null===Rn||void 0===Rn?void 0:Rn.source)===C)))).forEach((C=>{C.startsWith("geovisio")&&(or.push({id:"".concat(C,"_sequences"),type:"line",source:C,"source-layer":"sequences",layout:{...dl.SEQUENCES.layout},paint:{...dl.SEQUENCES.paint,"line-color":Uo.DM.BASE}}),or.push({id:"".concat(C,"_sequences_plus"),type:"line",source:C,"source-layer":"sequences",layout:{...dl.SEQUENCES_PLUS.layout},paint:{...dl.SEQUENCES_PLUS.paint}}),or.push({id:"".concat(C,"_pictures_symbols"),type:"symbol",source:C,"source-layer":"pictures",...dl.PICTURES_SYMBOLS}),or.push({id:"".concat(C,"_pictures_symbols"),type:"symbol",source:C,"source-layer":"pictures",...dl.PICTURES_SYMBOLS}),or.push({id:"".concat(C,"_pictures"),type:"circle",source:C,"source-layer":"pictures",layout:{...dl.PICTURES.layout},paint:{...dl.PICTURES.paint,"circle-color":Uo.DM.BASE}}))})),Rn.filter((C=>{var or;return(null===C||void 0===C||null===(or=C.id)||void 0===or?void 0:or.endsWith("_sequences"))&&void 0===Rn.find((Rn=>(null===Rn||void 0===Rn?void 0:Rn.id)===C.id+"_plus"))})).forEach((C=>{or.push({id:"".concat(C.id,"_plus"),type:"line",source:C.source,"source-layer":C["source-layer"],layout:{...dl.SEQUENCES_PLUS.layout},paint:{...dl.SEQUENCES_PLUS.paint}})})),Rn.filter((C=>{var or;return(null===C||void 0===C||null===(or=C.id)||void 0===or?void 0:or.endsWith("_pictures"))&&void 0===Rn.find((Rn=>(null===Rn||void 0===Rn?void 0:Rn.id)===C.id+"_symbols"))})).forEach((C=>{or.unshift({id:"".concat(C.id,"_symbols"),type:"symbol",source:C.source,"source-layer":"pictures",...dl.PICTURES_SYMBOLS}),C.paint=Object.assign(C.paint||{},dl.PICTURES.paint),C.layout=Object.assign(C.layout||{},dl.PICTURES.layout)})),or}function getUserLayerId(C,Rn){return"".concat(getUserSourceId(C),"_").concat(Rn)}function getUserSourceId(C){return"geovisio"===C?"geovisio":"geovisio_"+C}function geocoderParamsToURLString(C){let Rn={};return Object.entries(C).filter((C=>void 0!==C[1]&&null!==C[1])).forEach((C=>Rn[C[0]]=C[1])),new URLSearchParams(Rn).toString()}function forwardGeocodingNominatim(C){const Rn={q:C.query,countrycodes:C.countries,limit:C.limit,viewbox:C.bbox};return fetch("https://nominatim.openstreetmap.org/search?".concat(geocoderParamsToURLString(Rn),"&format=geojson&polygon_geojson=1&addressdetails=1")).then((C=>C.json())).then((C=>{const Rn={features:[]},or=[];return C.features.forEach((C=>{or.includes(C.properties.display_name)||(Rn.features.push({place_type:["place"],place_name:C.properties.display_name,bounds:new(To().LngLatBounds)(C.bbox)}),or.push(C.properties.display_name))})),Rn}))}function forwardGeocodingBAN(C){const Rn={q:C.query,limit:C.limit};if("string"===typeof C.proximity){const[or,So]=C.proximity.split(",").map((C=>parseFloat(C.trim())));Rn.lat=or,Rn.lon=So}const or={housenumber:20,street:18,locality:15,municipality:12};return fetch("https://api-adresse.data.gouv.fr/search/?".concat(geocoderParamsToURLString(Rn))).then((C=>C.json())).then((C=>(C.features=C.features.map((C=>{return{place_type:["place"],place_name:(Rn=C.properties,[Rn.name,Rn.district,Rn.city].filter((C=>C)).join(", ")),center:new(To().LngLat)(...C.geometry.coordinates),zoom:or[C.properties.type]};var Rn})),C)))}},5856:(C,Rn,or)=>{"use strict";or.d(Rn,{Z:()=>PhotoAdapter});var So=or(9771);class PhotoAdapter extends So.k{constructor(C,Rn){super(C,Rn),this._shouldGoFast=Rn.shouldGoFast||(()=>!0)}loadTexture(C,Rn){return C.origBaseUrl?C.baseUrl=C.origBaseUrl:C.origBaseUrl=C.baseUrl,this._shouldGoFast()&&C.thumbUrl&&!C.hdLoaded&&1==C.rows&&(C.baseUrl=C.thumbUrl),super.loadTexture(C,Rn).then((Rn=>(C.baseUrl===C.origBaseUrl&&(C.hdLoaded=!0),Rn)))}__loadTiles(C){this._shouldGoFast()||super.__loadTiles(C)}}},7457:(C,Rn,or)=>{"use strict";or.d(Rn,{DM:()=>Uo,EF:()=>isInternetFast,FF:()=>apiFeatureToPSVNode,Iu:()=>josmBboxParameters,J9:()=>xyzToPosition,Sp:()=>getDistance,bk:()=>linkMapAndPhoto,iE:()=>getUserAccount,r:()=>getRelativeHeading,wW:()=>positionToXYZ,zd:()=>isInIframe});var So=or(8139),To=or(9341),Ro=or(2893);const Uo={BASE:"#FF6F00",SELECTED:"#1E88E5",HIDDEN:"#34495E",NEXT:"#ffab40",QUALI_1:"#00695C",QUALI_2:"#fd8d3c",PALETTE_1:"#fecc5c",PALETTE_2:"#fd8d3c",PALETTE_3:"#f03b20",PALETTE_4:"#bd0026"},Oo=(Object.fromEntries(Object.entries(Uo).map((C=>(C[1]=parseInt(C[1].slice(1),16),C)))),svgToPSVLink(To,"white")),Ho=svgToPSVLink(Ro,Uo.NEXT);function getDistance(C,Rn){const or=C[0]-Rn[0],So=C[1]-Rn[1];return Math.sqrt(or*or+So*So)}function sortPicturesInDirection(C){return(Rn,or)=>"related"!=Rn.rel&&"related"!=or.rel?0:"related"!=Rn.rel?-1:"related"!=or.rel?1:Rn.date==or.date?getDistance(C,Rn.geometry.coordinates)-getDistance(C,or.geometry.coordinates):or.date.localeCompare(Rn.date)}function svgToPSVLink(C,Rn){try{const or=atob(C.replace(/^data:image\/svg\+xml;base64,/,"")),So=(new DOMParser).parseFromString(or,"image/svg+xml").childNodes[0],To=document.createElement("button");return To.appendChild(So),To.classList.add("gvs-psv-tour-arrows"),To.style.color=Rn,To}catch(or){const Rn=document.createElement("img");return Rn.src=C,Rn}}function getArrow(C){const Rn=C.cloneNode(!0);return Rn.addEventListener("pointerup",(()=>Rn.classList.add("gvs-clicked"))),Rn}function getAzimuth(C,Rn){return(Math.atan2(Rn[0]-C[0],Rn[1]-C[1])*(180/Math.PI)+360)%360}function getRelativeHeading(C){var Rn,or;if(!C)throw new Error("No picture selected");let So,To;const Ro=C.properties["view:azimuth"];if(null!==C&&void 0!==C&&null!==(Rn=C.sequence)&&void 0!==Rn&&Rn.prevPic){var Uo;const Rn=null===C||void 0===C||null===(Uo=C.links)||void 0===Uo?void 0:Uo.find((Rn=>Rn.nodeId===C.sequence.prevPic));Rn&&(So=(Ro-getAzimuth(Rn.gps,C.gps)+180)%360-180)}if(null!==C&&void 0!==C&&null!==(or=C.sequence)&&void 0!==or&&or.nextPic){var Oo;const Rn=null===C||void 0===C||null===(Oo=C.links)||void 0===Oo?void 0:Oo.find((Rn=>Rn.nodeId===C.sequence.nextPic));Rn&&(To=(Ro-getAzimuth(C.gps,Rn.gps)+180)%360-180)}return void 0!==So?So:void 0!==To?To:0}function getSimplifiedAngle(C,Rn){const or=Math.atan2(Rn[0]-C[0],Rn[1]-C[1])*(180/Math.PI);return Math.abs(or)<30?"N":or>=30&&or<90?"ENE":or>=90&&or<150?"ESE":Math.abs(or)>=150?"S":or<=-30&&or>-90?"WNW":or<=-90&&or>-150?"WSW":void 0}function positionToXYZ(C){let Rn=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;const or={x:C.yaw*(180/Math.PI),y:C.pitch*(180/Math.PI)};return void 0!==Rn&&(or.z=Rn),or}function xyzToPosition(C,Rn,or){return{yaw:C/(180/Math.PI),pitch:Rn/(180/Math.PI),zoom:or}}function getNodeCaption(C,Rn){var or,So,To;const Ro={};if(null!==C&&void 0!==C&&null!==(or=C.properties)&&void 0!==or&&or.datetimetz?Ro.date=new Date(C.properties.datetimetz):null!==C&&void 0!==C&&null!==(So=C.properties)&&void 0!==So&&So.datetime&&(Ro.date=new Date(C.properties.datetime)),null!==C&&void 0!==C&&C.providers){var Uo;const Rn=null===C||void 0===C||null===(Uo=C.providers)||void 0===Uo?void 0:Uo.filter((C=>{var Rn;return null===C||void 0===C||null===(Rn=C.roles)||void 0===Rn?void 0:Rn.includes("producer")}));if((null===Rn||void 0===Rn?void 0:Rn.length)>=0){const C={};Rn.map((C=>C.name)).forEach((Rn=>{const or=Rn.toLowerCase().replace(/\s/g,"");C[or]?C[or].push(Rn):C[or]=[Rn]})),Ro.producer=[],Object.values(C).forEach((C=>{const Rn=C[0],or=C.find((C=>C.toLowerCase()!=C));Ro.producer.push(or||Rn)})),Ro.producer=Ro.producer.join(", ")}}if(null!==C&&void 0!==C&&null!==(To=C.properties)&&void 0!==To&&To.license&&(Ro.license=C.properties.license,null!==C&&void 0!==C&&C.links)){const or=C.links.find((C=>"license"===(null===C||void 0===C?void 0:C.rel)));or&&(Ro.license='<a href="'.concat(or.href,'" title="').concat(Rn.gvs.metadata_general_license_link,'" target="_blank">').concat(Ro.license,"</a>"))}return Ro}function linkMapAndPhoto(C){const onPicLoad=Rn=>C.map.displayPictureMarker(Rn.detail.lon,Rn.detail.lat,C.psv.getXY().x);C.addEventListener("psv:picture-loading",onPicLoad),C.addEventListener("psv:picture-loaded",onPicLoad),C.addEventListener("psv:view-rotated",(()=>{let Rn=C.psv.getPosition().yaw*(180/Math.PI);Rn+=C.psv.getPictureOriginalHeading(),C.map._picMarker.setRotation(Rn)})),C.addEventListener("psv:picture-preview-started",(Rn=>{C.map._picMarkerPreview.setLngLat(Rn.detail.coordinates).setRotation(Rn.detail.direction||0).addTo(C.map)})),C.addEventListener("psv:picture-preview-stopped",(()=>{C.map._picMarkerPreview.remove()})),C.addEventListener("psv:picture-loaded",(Rn=>{C.isWidthSmall()&&C._picPopup&&Rn.detail.picId==C._picPopup._picId&&C._picPopup.remove()})),C.addEventListener("map:picture-click",(Rn=>{C.select(Rn.detail.seqId,Rn.detail.picId),!C.psv._myVTour.state.currentNode&&null!==C&&void 0!==C&&C.setFocus&&C.setFocus("pic")})),C.addEventListener("map:sequence-click",(Rn=>{C._api.getPicturesAroundCoordinates(Rn.detail.coordinates.lat,Rn.detail.coordinates.lng,1,1,Rn.detail.seqId).then((Rn=>{var or,So;(null===Rn||void 0===Rn||null===(or=Rn.features)||void 0===or?void 0:or.length)>0&&(C.select(null===(So=Rn.features[0])||void 0===So?void 0:So.collection,Rn.features[0].id),!C.psv.getPictureMetadata()&&null!==C&&void 0!==C&&C.setFocus&&C.setFocus("pic"))}))}))}function apiFeatureToPSVNode(C,Rn){var or,To,Ro,Uo,Oo,Ho,qo;let dl=arguments.length>2&&void 0!==arguments[2]&&arguments[2],ml=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const fl=null!=(null===(or=C.properties)||void 0===or||null===(To=or["pers:interior_orientation"])||void 0===To?void 0:To.field_of_view);let vl=fl?parseInt(C.properties["pers:interior_orientation"].field_of_view):70;const bl=360===vl,kl=(Object.values(C.assets).find((C=>{var Rn;return null===C||void 0===C||null===(Rn=C.roles)||void 0===Rn?void 0:Rn.includes("data")}))||{}).href,Ll=null===C||void 0===C||null===(Ro=C.properties)||void 0===Ro||null===(Uo=Ro["tiles:tile_matrix_sets"])||void 0===Uo?void 0:Uo.geovisio,Dl=C.links.find((C=>"prev"===(null===C||void 0===C?void 0:C.rel)&&"application/geo+json"===(null===C||void 0===C?void 0:C.type))),Nc=C.links.find((C=>"next"===(null===C||void 0===C?void 0:C.rel)&&"application/geo+json"===(null===C||void 0===C?void 0:C.type))),jc=Object.values(C.assets).find((C=>{var Rn;return(null===(Rn=C.roles)||void 0===Rn?void 0:Rn.includes("visual"))&&"image/webp"===C.type})),Zc=Object.values(C.assets).find((C=>{var Rn;return(null===(Rn=C.roles)||void 0===Rn?void 0:Rn.includes("visual"))&&"image/jpeg"===C.type})),eu=(jc||Zc).href,Ku=null===(Oo=Object.values(C.assets).find((C=>{var Rn;return(null===(Rn=C.roles)||void 0===Rn?void 0:Rn.includes("thumbnail"))&&"image/jpeg"===C.type})))||void 0===Oo?void 0:Oo.href,Yu=(null===C||void 0===C||null===(Ho=C.asset_templates)||void 0===Ho?void 0:Ho.tiles_webp)||(null===C||void 0===C||null===(qo=C.asset_templates)||void 0===qo?void 0:qo.tiles),Eh=(0,So.Z1)(C);let Th;return Th=Object.keys(Eh).length>0?{baseUrl:dl?kl:eu,origBaseUrl:dl?kl:eu,hdUrl:kl,thumbUrl:Ku,basePanoData:Eh,cols:2,rows:1,width:2,tileUrl:()=>null}:bl?{baseUrl:eu,origBaseUrl:eu,basePanoData:C=>({fullWidth:C.width,fullHeight:C.height}),hdUrl:kl,thumbUrl:Ku,cols:Ll&&Ll.tileMatrix[0].matrixWidth,rows:Ll&&Ll.tileMatrix[0].matrixHeight,width:Ll&&Ll.tileMatrix[0].matrixWidth*Ll.tileMatrix[0].tileWidth,tileUrl:Ll&&((C,Rn)=>Yu.href.replace(/\{TileCol\}/g,C).replace(/\{TileRow\}/g,Rn))}:{baseUrl:dl?kl:eu,origBaseUrl:dl?kl:eu,hdUrl:kl,thumbUrl:Ku,basePanoData:C=>{C.width<C.height&&!fl&&(vl=35);const Rn=vl*C.height/C.width,or=360*C.width/vl,So=180*C.height/Rn;return{fullWidth:or,fullHeight:So,croppedWidth:C.width,croppedHeight:C.height,croppedX:(or-C.width)/2,croppedY:(So-C.height)/2}},cols:2,rows:1,width:2,tileUrl:()=>null},{id:C.id,caption:getNodeCaption(C,Rn),panorama:Th,links:filterRelatedPicsLinks(C,ml),gps:C.geometry.coordinates,sequence:{id:C.collection,nextPic:Nc?Nc.id:void 0,prevPic:Dl?Dl.id:void 0},sphereCorrection:(0,So.Cf)(C),horizontalFov:vl,properties:C.properties}}function filterRelatedPicsLinks(C){var Rn;let or=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const So=C.links.filter((C=>["next","prev","related"].includes(null===C||void 0===C?void 0:C.rel)&&"application/geo+json"===(null===C||void 0===C?void 0:C.type))).filter((C=>!or||or(C))).map((C=>(C.datetime&&(C.date=C.datetime.split("T")[0]),C))),To=C.geometry.coordinates,Ro=[],Uo={N:[],ENE:[],ESE:[],S:[],WSW:[],WNW:[]};for(let Oo of So){Uo[getSimplifiedAngle(To,Oo.geometry.coordinates)].push(Oo)}for(let Oo in Uo){const C=Uo[Oo];0!=C.length&&(C.sort(sortPicturesInDirection(To)),Ro.push(C.shift()))}let arrowStyle=C=>"related"===C.rel?{element:getArrow(Ho),size:{width:128/3,height:128}}:{element:getArrow(Oo),size:{width:75,height:75}};const qo=-((null===(Rn=C.properties)||void 0===Rn?void 0:Rn["view:azimuth"])||0)*(Math.PI/180);return Ro.map((C=>({nodeId:C.id,gps:C.geometry.coordinates,arrowStyle:arrowStyle(C),linkOffset:{yaw:qo}})))}function josmBboxParameters(C){if(C){var Rn;const or=C.gps,So=null===C||void 0===C||null===(Rn=C.properties)||void 0===Rn?void 0:Rn["view:azimuth"],To=2e-4,Ro={left:or[0]-(null===So||So>=180?To:0),right:or[0]+(null===So||So<=180?To:0),top:or[1]+(null===So||So<=90||So>=270?To:0),bottom:or[1]-(null===So||So>=90&&So<=270?To:0),changeset_source:"Panoramax"};return Object.entries(Ro).map((C=>C.join("="))).join("&")}return null}function isInIframe(){try{return window.self!==window.top}catch(C){return!0}}const qo=10,dl="gvs-internet-fast",ml="https://panoramax.openstreetmap.fr/images/05/ca/2c/98/0111-4baf-b6f3-587bb8847d2e.jpg";function isInternetFast(){try{const C=navigator.connection.downlink;return Promise.resolve(C>=qo)}catch(C){const Rn=sessionStorage.getItem(dl);if(["true","false"].includes(Rn))return Promise.resolve("true"===Rn);const or=(new Date).getTime();return fetch(ml+"?nocache="+or).then((async C=>[C,await C.blob()])).then((C=>{let[Rn,So]=C;const To=8*parseInt(Rn.headers.get("Content-Length")||So.size)/1024/1024/(((new Date).getTime()-or)/1e3)>=qo;return sessionStorage.setItem(dl,To?"true":"false"),To})).catch((C=>(console.warn("Failed to run speedtest",C),!1)))}}function getCookie(C){var Rn,or,So;const To=null===(Rn=document.cookie)||void 0===Rn||null===(or=Rn.split(";"))||void 0===or||null===(So=or.find((Rn=>Rn.trimStart().startsWith("".concat(C,"=")))))||void 0===So?void 0:So.split("=");if(To)return To.shift(),To.join("=")}function getUserAccount(){const C=getCookie("session"),Rn=getCookie("user_id"),or=getCookie("user_name");return C&&Rn&&or?{id:Rn,name:or}:null}},4824:(C,Rn,or)=>{"use strict";or.d(Rn,{C:()=>createButtonSpan,Fl:()=>createSearchBar,Mr:()=>enableButton,Nk:()=>fat,QO:()=>enableCopyButton,Qr:()=>disableButton,VQ:()=>closeOtherPanels,WD:()=>createExpandableButton,W_:()=>createTable,_:()=>createLabel,ax:()=>createButton,dc:()=>createHeader,fa:()=>fa,gJ:()=>createLinkCell,sS:()=>createGroup,wf:()=>createPanel});var So=or(942),To=or(6899),Ro=or(4671),Uo=or(7361),Oo=or(4666),Ho=or(8455),qo=or(6565),dl=or(6087);function createButton(C){let Rn=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,or=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,So=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];const To=document.createElement("button");return Rn&&(Rn instanceof HTMLElement||Rn instanceof Node?To.appendChild(Rn):To.innerHTML=Rn),To.id=C,Array.isArray(So)&&(So=So.filter((C=>null!=C&&C.length>0))),To.classList.add("gvs-btn","gvs-widget-bg",...So),or&&(To.title=or),To}function createExpandableButton(C,Rn,or,So){let To=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const Ro=document.createElement("button");return Ro.id=C,Ro.appendChild(fa(Rn)),So._viewer.isWidthSmall()?Ro.title=or:(Ro.appendChild(document.createTextNode(or)),Ro.appendChild(fa(Uo.pt))),Ro.classList.add("gvs-btn","gvs-widget-bg","gvs-btn-expandable",...To),Ro}function createSearchBar(C,Rn,or,So,Uo){let qo=arguments.length>5&&void 0!==arguments[5]&&arguments[5],dl=arguments.length>6&&void 0!==arguments[6]&&arguments[6],ml=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;const fl=document.createElement("div");fl.classList.add("gvs-widget-bg","gvs-search-bar"),fl.id=C,dl&&fl.classList.add("gvs-search-bar-reducable"),ml&&fl.appendChild(ml);const vl=document.createElement("input");vl.type="text",vl.placeholder=Rn,fl.appendChild(vl);const extendInput=()=>{fl.classList.remove("gvs-search-bar-reduced")},reduceInput=()=>{fl.classList.add("gvs-search-bar-reduced")};dl&&reduceInput();const bl=document.createElement("span");bl.classList.add("gvs-search-bar-icon");const kl=fa(Oo.Y$),Ll=fa(Ho.IJ,{classes:["fa-spin"]}),Dl=fa(To.g8),Nc=fa(Ro.xH);bl.appendChild(kl),fl.appendChild(bl);const jc=createPanel(Uo,fl,[],["gvs-search-bar-results"],qo);fl.appendChild(jc);const switchIcon=C=>{bl.innerHTML="",bl.appendChild(C)},resetSearch=()=>{fl._throttler&&clearTimeout(fl._throttler),vl.value="",jc.innerHTML="",jc._toggle(!1),delete fl._lastSearch,switchIcon(kl),So(null),dl&&reduceInput()};fl.resetSearch=resetSearch;vl.setItem=C=>{fl._throttler&&clearTimeout(fl._throttler),vl.value=C,jc.innerHTML="",jc._toggle(!1),switchIcon(Dl),dl&&extendInput()};const goSearch=()=>{if(fl._throttler&&clearTimeout(fl._throttler),0===vl.value.length)return jc.innerHTML="",void jc._toggle(!1);fl._throttler=setTimeout((()=>{jc.innerHTML="",jc._toggle(!1),switchIcon(Ll),or(vl.value).then((C=>{switchIcon(Dl),jc._toggle(!0),C&&0!=C.length?!0!==C?C.forEach((C=>{const Rn=document.createElement("div");Rn.classList.add("gvs-search-bar-result"),Rn.innerHTML="".concat(C.title,"<br /><small>").concat((null===C||void 0===C?void 0:C.subtitle)||"","</small>"),jc.appendChild(Rn),Rn.addEventListener("click",(()=>(C=>{dl?(So(C),resetSearch()):(fl._throttler&&clearTimeout(fl._throttler),vl.value=C.title,jc.innerHTML="",jc._toggle(!1),So(C))})(C)))})):jc._toggle(!1):jc.innerHTML='<div class="gvs-search-empty">'.concat(Uo._t.gvs.search_empty,"</li>")})).catch((C=>{console.error(C),switchIcon(Nc)}))}),250)};return vl.addEventListener("change",goSearch),vl.addEventListener("keypress",goSearch),vl.addEventListener("paste",goSearch),vl.addEventListener("input",goSearch),bl.addEventListener("click",(()=>{bl.firstChild!=Dl&&bl.firstChild!=Nc||resetSearch(),dl&&bl.firstChild==kl&&(fl.classList.contains("gvs-search-bar-reduced")?extendInput():reduceInput())})),fl}function createPanel(C,Rn){let or=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],So=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],To=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const Ro=document.createElement("div");Ro.id=Rn.id+"-panel",Array.isArray(So)&&(So=So.filter((C=>null!=C&&C.length>0))),Ro.classList.add("gvs-panel","gvs-widget-bg","gvs-hidden",...So);for(let Uo of or)Ro.appendChild(Uo);const togglePanel=(Rn,or)=>{Rn&&Rn.stopPropagation(),!0===or?Ro.classList.remove("gvs-hidden"):!1===or?Ro.classList.add("gvs-hidden"):(Ro.classList.toggle("gvs-hidden"),or=!Ro.classList.contains("gvs-hidden")),or&&!To&&closeOtherPanels(Ro,C._viewer.container)};return Ro._toggle=C=>togglePanel(null,C),"BUTTON"==Rn.tagName&&(Rn.addEventListener("click",togglePanel),Rn.addEventListener("hover",togglePanel)),Ro}function closeOtherPanels(C,Rn){var or;const isPanel=C=>C.classList.contains("gvs-panel")||C.classList.contains("gvs-search-bar-result")||C.classList.contains("gvs-search-empty")||C.classList.contains("gvs-search-bar-reducable");if(!isPanel(C)&&null!==(or=C)&&void 0!==or&&or.parentNode)for(C=C.parentNode;C instanceof Element&&!isPanel(C);)C=C.parentNode;for(const So of Rn.getElementsByClassName("gvs-panel"))So==C||So.contains(C)||So.classList.contains("gvs-hidden")||So.classList.add("gvs-hidden");for(const So of Rn.getElementsByClassName("gvs-search-bar-reducable"))So==C||So.contains(C)||So.classList.contains("gvs-search-bar-reduced")||So.resetSearch()}function createGroup(C,Rn,or){let So=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],To=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const Ro=document.createElement("div");Ro.id=C,Array.isArray(To)&&(To=To.filter((C=>null!=C&&C.length>0))),Ro.classList.add("gvs-group",...To);for(let Uo of So)Ro.appendChild(Uo);return or._corners[Rn].appendChild(Ro),Ro}function enableCopyButton(C,Rn){for(let or of C.getElementsByTagName("button")){const C=or.getAttribute("data-input"),So=or.getAttribute("data-copy");(C||So)&&or.addEventListener("click",(()=>{let To;if(C){const Rn=document.getElementById(C);To=Rn.innerText||Rn.value}else So&&(To=or.getAttribute("data-copy"));navigator.clipboard.writeText(To);const Ro=or.innerHTML;or.innerHTML="".concat(Rn.gvs.copied," ").concat(fat(qo.LE)),or.classList.add("gvs-btn-active"),setTimeout((()=>{or.innerHTML=Ro,or.classList.remove("gvs-btn-active")}),2e3)}))}}function enableButton(C){C.removeAttribute("disabled")}function disableButton(C){C.setAttribute("disabled","")}function fa(C,Rn){return(0,So.qv)(C,Rn).node[0]}function fat(C,Rn){return(0,So.qv)(C,Rn).html[0]}function createLinkCell(C,Rn,or,So){const To=document.createElement("a");To.href=Rn,To.target="_blank",To.title=or,To.textContent=C;return[To,createButtonSpan("".concat(fat(dl.kZ)," ").concat(So),C)]}function createTable(C,Rn){const or=document.createElement("table");return or.className=C,Rn.forEach((C=>{let{section:Rn,value:So,values:To,classes:Ro}=C;const Uo=document.createElement("tr"),Oo=document.createElement("th");Oo.scope="row",Oo.textContent=Rn,Uo.appendChild(Oo);const Ho=document.createElement("td");Ro&&Ho.classList.add(...Ro),To?To.forEach((C=>Ho.appendChild(C))):So instanceof HTMLElement?Ho.appendChild(So):Ho.innerHTML=So,Uo.appendChild(Ho),or.appendChild(Uo)})),or}function createHeader(C,Rn){const or=document.createElement(C);return or.innerHTML=Rn,or}function createButtonSpan(C){let Rn=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const or=document.createElement("button");or.innerHTML=C,Rn&&or.setAttribute("data-copy",Rn);const So=document.createElement("span");return So.className="gvs-input-btn",So.appendChild(or),So}function createLabel(C,Rn){let or=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const So=document.createElement("label");return So.htmlFor=C,or&&So.appendChild(fa(or)),So.appendChild(document.createTextNode(Rn)),So}},9204:(C,Rn,or)=>{"use strict";or.d(Rn,{Z:()=>URLHash});const So={minDate:"date_from",maxDate:"date_to",type:"pic_type",camera:"camera",theme:"theme"},To=Object.fromEntries(Object.entries(So).map((C=>[C[1],C[0]]))),Ro=["psv:view-rotated","psv:picture-loaded","focus-changed","filters-changed","psv:transition-duration-changed","map:background-changed","map:users-changed","pictures-navigation-changed"];class URLHash extends EventTarget{constructor(C){super(),this._viewer=C,this._delay=null,this._hashChangeHandler=this._onHashChange.bind(this),C.addEventListener("ready",(()=>{window.addEventListener("hashchange",this._hashChangeHandler,!1),Ro.forEach((C=>this._viewer.addEventListener(C,this._updateHash.bind(this))))}),{once:!0})}destroy(){var C,Rn;window.removeEventListener("hashchange",this._hashChangeHandler),delete this._hashChangeHandler,null===(C=this._viewer)||void 0===C||null===(Rn=C.map)||void 0===Rn||Rn.off("moveend",this._updateHash),Ro.forEach((C=>this._viewer.removeEventListener(C,this._updateHash))),delete this._viewer,this._updateHash()}bindMapEvents(){this._viewer.map.on("moveend",this._updateHash.bind(this))}getHashString(){let C="",Rn={};"number"==typeof this._viewer.psv.getTransitionDuration()&&(Rn.speed=this._viewer.psv.getTransitionDuration()),[null,"any"].includes(this._viewer.getPicturesNavigation())||(Rn.nav=this._viewer.getPicturesNavigation());const or=this._viewer.psv.getPictureMetadata();if(or&&(Rn.pic=or.id,Rn.xyz=this._getXyzHashString()),this._viewer.map){Rn.map=this._getMapHashString(),Rn.focus="pic",this._viewer.isMapWide()&&(Rn.focus="map"),this._viewer.popupContainer.classList.contains("gvs-hidden")||(Rn.focus="meta"),this._viewer.map.hasTwoBackgrounds()&&this._viewer.map.getBackground()&&(Rn.background=this._viewer.map.getBackground());const C=this._viewer.map.getVisibleUsers();if((C.length>1||!C.includes("geovisio"))&&(Rn.users=C.join(",")),this._viewer._mapFilters)for(let or in So)this._viewer._mapFilters[or]&&(Rn[So[or]]=this._viewer._mapFilters[or])}else Rn.map="none";return Object.entries(Rn).sort(((C,Rn)=>C[0].localeCompare(Rn[0]))).forEach((Rn=>{let[or,So]=Rn,To=!1;const Ro=C.split("&").map((C=>{const Rn=C.split("=")[0];return Rn===or?(To=!0,"".concat(Rn,"=").concat(So)):C})).filter((C=>C));To||Ro.push("".concat(or,"=").concat(So)),C="".concat(Ro.join("&"))})),"#".concat(C).replace(/^#+/,"#")}_getCurrentHash(){const C=window.location.hash.replace("#","");let Rn={};return C.split("&").map((C=>C.split("="))).filter((C=>void 0!==C[0]&&C[0].length>0)).forEach((C=>{Rn[C[0]]=C[1]})),Rn}_getMapHashString(){const C=this._viewer.map.getCenter(),Rn=Math.round(100*this._viewer.map.getZoom())/100,or=Math.ceil((Rn*Math.LN2+Math.log(512/360/.5))/Math.LN10),So=Math.pow(10,or),To=Math.round(C.lng*So)/So,Ro=Math.round(C.lat*So)/So,Uo=this._viewer.map.getBearing(),Oo=this._viewer.map.getPitch();let Ho="".concat(Rn,"/").concat(Ro,"/").concat(To);return(Uo||Oo)&&(Ho+="/".concat(Math.round(10*Uo)/10)),Oo&&(Ho+="/".concat(Math.round(Oo))),Ho}_getXyzHashString(){const C=this._viewer.psv.getXYZ(),Rn=C.x.toFixed(2),or=C.y.toFixed(2),So=Math.round(C.z||0);return"".concat(Rn,"/").concat(or,"/").concat(So)}_onHashChange(){const C=this._getCurrentHash();if(C.pic){const Rn=C.pic.split(";");Rn.length>1&&console.warn("Multiple picture IDs passed in URL, only first one kept"),this._viewer.select(null,Rn[0])}if(C.focus&&["map","pic"].includes(C.focus)&&this._viewer.setFocus(C.focus),C.focus&&"meta"==C.focus&&this._viewer._widgets._showPictureMetadataPopup(),void 0!==C.speed&&this._viewer.psv.setTransitionDuration(C.speed),C.map&&this._viewer.map){const Rn=this.getMapOptionsFromHashString(C.map);Rn&&this._viewer.map.jumpTo(Rn);let or=(C.users||"").split(",");(0===or.length||1===or.length&&""===or[0].trim())&&(or=["geovisio"]),this._viewer.map.setVisibleUsers(or)}if(C.xyz){const Rn=this.getXyzOptionsFromHashString(C.xyz);this._viewer.psv.setXYZ(Rn.x,Rn.y,Rn.z)}this._viewer.setFilters(this.getMapFiltersFromHashVals(C)),["aerial","streets"].includes(C.background)&&this._viewer.map.setBackground(C.background),["pic","any","seq"].includes(C.nav)&&this._viewer.setPicturesNavigation(C.nav)}getMapFiltersFromHashVals(C){const Rn={};for(let or in To)C[or]&&(Rn[To[or]]=C[or]);return Rn}getMapOptionsFromHashString(C){const Rn=C.split("/");if(Rn.length>=3&&!Rn.some((C=>isNaN(C)))){const C={center:[+Rn[2],+Rn[1]],zoom:+Rn[0],pitch:+(Rn[4]||0)};return this._viewer.map&&(C.bearing=this._viewer.map.dragRotate.isEnabled()&&this._viewer.map.touchZoomRotate.isEnabled()?+(Rn[3]||0):this._viewer.map.getBearing()),C}return null}getXyzOptionsFromHashString(C){const Rn=C.split("/");if(3!==Rn.length||Rn.some((C=>isNaN(C))))return null;return{x:+Rn[0],y:+Rn[1],z:+Rn[2]}}_updateHash(){this._delay&&(clearTimeout(this._delay),this._delay=null),this._delay=setTimeout((()=>{const C=window.location.href.replace(/(#.+)?$/,this._viewer?this.getHashString():"");try{if(window.history.replaceState(window.history.state,null,C),this._viewer){const Rn=new CustomEvent("url-changed",{detail:{url:C}});this.dispatchEvent(Rn)}}catch(Rn){}}),500)}}},9705:(C,Rn,or)=>{"use strict";or.d(Rn,{Z:()=>Widgets});or(8193);var So=or(1707),To=or(4824),Ro=or(7457),Uo=or(1679),Oo=or(5608),Ho=or(4133),qo=or(7832),dl=or(8139),ml=or(4229),fl=or(5974),vl=or(8818),bl=or(3911),kl=or(8402),Ll=or(4422),Dl=or(4038),Nc=or(1788),jc=or(4056),Zc=or(5218),eu=or(2482),Ku=or(5163),Yu=or(4873),Eh=or(779),Th=or(625),Ch=or(6666),Lh=or(953),Dh=or(1445),Rh=or(8117),Nh=or(5088),Uh=or(4480),Bh=or(1658),Fh=or(4470),Oh=or(3650),Vh=or(2155),jh=or(3299),Gh=or(939),Hh=or(3701),Zh=or(5476),Wh=or(6580),qh=or(847),Kh=or(6087),Qh=or(8381),Xh=or(7711),Yh=or(3630),Jh=or(4411),$h=or(421);class Widgets{constructor(C){var Rn;let or=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};null==or&&(or={}),null==or.editIdUrl&&(or.editIdUrl="https://www.openstreetmap.org/edit"),this._viewer=C,this._t=this._viewer._t,this._options=or;const So=void 0!==this._viewer.map;this._corners={};const Uo=So?["main","mini"]:["main"],Oo=["top","bottom"],Ho=["left","middle","right"];for(let To of Uo)for(let C of Oo){const Rn=document.createElement("div");Rn.id="gvs-corner-".concat(To,"-").concat(C),Rn.classList.add("gvs-corner-space");for(let or of Ho){const So=document.createElement("div");So.id="".concat(Rn.id,"-").concat(or),So.classList.add("gvs-corner"),this._corners["".concat(To,"-").concat(C,"-").concat(or)]=So,Rn.appendChild(So)}"main"==To?this._viewer.mainContainer.appendChild(Rn):"mini"==To&&this._viewer.miniContainer.appendChild(Rn)}if((0,Ro.zd)()||this._initWidgetPlayer(So),this._initWidgetLegend(So,null===(Rn=or)||void 0===Rn?void 0:Rn.mapAttribution),So&&(this._initWidgetMiniActions(),(0,Ro.zd)()||(this._initWidgetSearch(),this._initWidgetFilters(null!==this._viewer._api._endpoints.user_search&&null!==this._viewer._api._endpoints.user_tiles),this._initWidgetMapLayers(),this._listenMapFiltersChanges())),this._viewer.isWidthSmall()||this._initWidgetShare(),or.customWidget){const C=this._corners["main-bottom-right"];switch(typeof or.customWidget){case"string":for(let Rn of(new DOMParser).parseFromString(or.customWidget,"text/html").body.children)C.appendChild(Rn);break;case"object":Array.isArray(or.customWidget)?or.customWidget.forEach((Rn=>C.appendChild(Rn))):C.appendChild(or.customWidget)}}this._initWidgetZoom(So),this._viewer.container.addEventListener("click",(C=>(0,To.VQ)(C.target,this._viewer.container)))}destroy(){Object.values(this._corners).forEach((C=>C.remove())),delete this._corners,delete this._t,delete this._viewer}_initWidgetZoom(C){this._lastWantedZoom=this._viewer.psv.getZoomLevel();const Rn=(0,To.ax)("gvs-zoom-in",(0,To.fa)(ml.r8),this._t.gvs.zoomIn),or=(0,To.ax)("gvs-zoom-out",(0,To.fa)(fl.Kl),this._t.gvs.zoomOut);(0,To.sS)("gvs-widget-zoom","main-bottom-right",this,[Rn,or],["gvs-group-vertical","gvs-mobile-hidden","gvs-print-hidden"]);const zoomFct=(Rn,or)=>{if(C&&this._viewer.isMapWide())or?this._viewer.map.zoomIn({},{originalEvent:Rn}):this._viewer.map.zoomOut({},{originalEvent:Rn});else{this._viewer.lastPsvAnim&&this._viewer.lastPsvAnim.cancel();const C=or?Math.min(100,this._lastWantedZoom+So.ns):Math.max(0,this._lastWantedZoom-So.ns);this._viewer.lastPsvAnim=this._viewer.psv.animate({speed:So.O_,zoom:C}),this._lastWantedZoom=C}};Rn.addEventListener("click",(C=>zoomFct(C,!0))),or.addEventListener("click",(C=>zoomFct(C,!1)))}_initWidgetPlayer(C){const Rn=(0,To.ax)("gvs-player-prev",(0,To.fa)(jc.DY),this._t.gvs.sequence_prev),or=(0,To.ax)("gvs-player-play"),Ro=(0,To.ax)("gvs-player-next",(0,To.fa)(Zc.ir),this._t.gvs.sequence_next),Uo=(0,To.ax)("gvs-player-more",(0,To.fa)(Dh.Uw),this._t.gvs.sequence_more,["gvs-xs-hidden"]),Oo=(0,To.wf)(this,Uo,[],["gvs-player-options"]);Oo.innerHTML='\n\t\t\t<div class="gvs-input-range" title="'.concat(this._t.gvs.sequence_speed,'">\n\t\t\t\t').concat((0,To.Nk)(Bh.uY),'\n\t\t\t\t<input\n\t\t\t\t\tid="gvs-player-speed"\n\t\t\t\t\ttype="range" name="speed"\n\t\t\t\t\tmin="0" max="').concat(So.q7-100,'"\n\t\t\t\t\tvalue="').concat(So.q7-this._viewer.psv.getTransitionDuration(),'"\n\t\t\t\t\ttitle="').concat(this._t.gvs.sequence_speed,'"\n\t\t\t\t\tstyle="width: 100%;" />\n\t\t\t\t').concat((0,To.Nk)(Rh.tM),'\n\t\t\t</div>\n\t\t\t<button title="').concat(this._t.gvs.contrast,'" id="gvs-player-contrast">\n\t\t\t\t').concat((0,To.Nk)(Uh.X8),"\n\t\t\t</button>\n\t\t");const Ho=(0,To.sS)("gvs-widget-player",C?"main-top-middle":"main-top-left",this,[Rn,or,Ro].concat(this._viewer.isWidthSmall()?[]:[Oo,Uo]),["gvs-group-horizontal","gvs-only-psv","gvs-print-hidden",this._viewer.psv.getPictureMetadata()?"":"gvs-hidden"]),toggleBtnPlay=C=>{or.innerHTML=C?(0,To.Nk)(eu.XQ):(0,To.Nk)(Nc.zc),or.title=C?this._t.gvs.sequence_pause:this._t.gvs.sequence_play};toggleBtnPlay(!1);const updatePlayBtn=()=>{var C,So,Uo,Oo;"pic"===this._viewer.getPicturesNavigation()?((0,To.Qr)(Ro),(0,To.Qr)(or),(0,To.Qr)(Rn)):(null!=(null===(C=this._viewer.psv.getPictureMetadata())||void 0===C||null===(So=C.sequence)||void 0===So?void 0:So.prevPic)?(0,To.Mr)(Rn):(0,To.Qr)(Rn),null!=(null===(Uo=this._viewer.psv.getPictureMetadata())||void 0===Uo||null===(Oo=Uo.sequence)||void 0===Oo?void 0:Oo.nextPic)?((0,To.Mr)(Ro),(0,To.Mr)(or)):((0,To.Qr)(Ro),(0,To.Qr)(or)))};if(updatePlayBtn(),this._viewer.addEventListener("sequence-playing",(()=>toggleBtnPlay(!0))),this._viewer.addEventListener("sequence-stopped",(()=>toggleBtnPlay(!1))),this._viewer.addEventListener("psv:picture-loaded",(()=>Ho.classList.remove("gvs-hidden")),{once:!0}),this._viewer.addEventListener("psv:picture-loaded",updatePlayBtn),this._viewer.addEventListener("pictures-navigation-changed",updatePlayBtn),!this._viewer.isWidthSmall()){const C=Oo.children[0].children[1];this._viewer.addEventListener("psv:transition-duration-changed",(Rn=>{C.value=So.q7-Rn.detail.value})),C.addEventListener("change",(C=>{const Rn=So.q7-C.target.value;this._viewer.psv.setTransitionDuration(Rn)}))}Rn.addEventListener("click",(()=>this._viewer.psv.goToPrevPicture())),Ro.addEventListener("click",(()=>this._viewer.psv.goToNextPicture())),or.addEventListener("click",(()=>{this._viewer.isSequencePlaying()?(toggleBtnPlay(!1),this._viewer.stopSequence()):(toggleBtnPlay(!0),this._viewer.playSequence())}));const qo=document.getElementById("gvs-player-contrast");qo&&qo.addEventListener("click",(()=>{qo.classList.contains("gvs-btn-active")?(qo.classList.remove("gvs-btn-active"),this._viewer.psv.setHigherContrast(!1)):(qo.classList.add("gvs-btn-active"),this._viewer.psv.setHigherContrast(!0))}))}_initWidgetLegend(C,Rn){const or=(0,To.sS)("gvs-widget-legend",C?"main-bottom-right":"main-bottom-left",this,[],["gvs-widget-bg"]);let So,Uo,Oo;C&&(So=(0,To.sS)("gvs-widget-mini-legend","mini-bottom-right",this,[],["gvs-widget-bg","gvs-only-mini","gvs-mobile-hidden"])),this._viewer.isWidthSmall()&&(Uo=document.createElement("button"),Uo.id="gvs-legend-toggle",Uo.classList.add("gvs-btn","gvs-widget-bg","gvs-print-hidden"),Uo.appendChild((0,To.fa)(Gh.DB)),Oo=()=>{"hidden"===or.style.visibility?(or.style.visibility="visible",toggleLegend(!!C&&this._viewer.isMapWide())):(or.innerHTML="",or.style.visibility="hidden",or.appendChild(Uo))},Uo.addEventListener("click",(C=>{C.stopPropagation(),Oo()})));const toggleLegend=Oo=>{var Ho,qo,dl;let ml=Rn||(null===(Ho=this._viewer.map)||void 0===Ho||null===(qo=Ho._attribution)||void 0===qo?void 0:qo._attribHTML)||"",fl="<a href='https://panoramax.fr/' target='_blank'>Panoramax</a>";const vl=null===(dl=this._viewer.psv.getPictureMetadata())||void 0===dl?void 0:dl.caption;let bl;!(0,Ro.zd)()&&vl&&(fl="",vl.producer&&(fl+='<span style="font-weight: bold">&copy; '.concat(vl.producer,"</span>")),vl.date&&(vl.producer&&(fl+="&nbsp;-&nbsp;"),fl+=vl.date.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})),bl=(0,To.fa)(Xh.FD),bl.style.marginLeft="5px"),Oo?(or.innerHTML=ml,(0,Ro.zd)()&&(or.innerHTML="<a href='https://panoramax.fr/' target='_blank'>Panoramax</a><br />"+or.innerHTML),or.style.cursor=null,or.onclick=null,So.innerHTML=fl):(or.innerHTML=fl,bl?(or.appendChild(bl),or.style.cursor="pointer",or.onclick=(0,Ro.zd)()?()=>window.open(window.location.href,"_blank"):this._showPictureMetadataPopup.bind(this)):(or.style.cursor=null,or.onclick=null),C&&(So.innerHTML=ml)),Uo&&or.appendChild(Uo)};Uo?(or.appendChild(Uo),or.style.visibility="hidden"):toggleLegend(!!C&&this._viewer.isMapWide()),this._viewer.addEventListener("focus-changed",(C=>toggleLegend("map"==C.detail.focus))),this._viewer.addEventListener("psv:picture-loaded",(()=>toggleLegend(C&&this._viewer.isMapWide())))}_showPictureMetadataPopup(){var C,Rn,or,So,Ro,Uo,Oo,Ho,qo,ml,fl,vl,bl,kl,Ll,Dl,Nc;const jc=this._viewer.psv.getPictureMetadata();if(!jc)throw new Error("No picture currently selected");const Zc=[];if(Zc.push((0,To.dc)("h4","".concat((0,To.Nk)(Gh.DB)," ").concat(this._t.gvs.metadata))),this._viewer._api._endpoints.report){const C=(0,To.C)("".concat((0,To.Nk)(Qh.ik)," ").concat(this._t.gvs.report));C.firstChild.addEventListener("click",this._showReportForm.bind(this)),Zc.push(C)}const eu=[{section:this._t.gvs.metadata_general_picid,classes:["gvs-td-with-id"],values:(0,To.gJ)(jc.id,this._viewer._api.getPictureMetadataUrl(jc.id,null===jc||void 0===jc||null===(C=jc.sequence)||void 0===C?void 0:C.id),this._t.gvs.metadata_general_picid_link,this._t.gvs.copy)},{section:this._t.gvs.metadata_general_seqid,classes:["gvs-td-with-id"],values:(0,To.gJ)(null===jc||void 0===jc||null===(Rn=jc.sequence)||void 0===Rn?void 0:Rn.id,this._viewer._api.getSequenceMetadataUrl(null===jc||void 0===jc||null===(or=jc.sequence)||void 0===or?void 0:or.id),this._t.gvs.metadata_general_seqid_link,this._t.gvs.copy)},{section:this._t.gvs.metadata_general_author,value:null===jc||void 0===jc||null===(So=jc.caption)||void 0===So?void 0:So.producer},{section:this._t.gvs.metadata_general_license,value:null===jc||void 0===jc||null===(Ro=jc.caption)||void 0===Ro?void 0:Ro.license},{section:this._t.gvs.metadata_general_date,value:null===jc||void 0===jc||null===(Uo=jc.caption)||void 0===Uo||null===(Oo=Uo.date)||void 0===Oo?void 0:Oo.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",fractionalSecondDigits:3,timeZoneName:"short"})}];Zc.push((0,To.W_)("gvs-table-light",eu)),Zc.push((0,To.dc)("h4","".concat((0,To.Nk)(Eh._j)," ").concat(this._t.gvs.metadata_camera)));const Ku=null!==jc&&void 0!==jc&&null!==(Ho=jc.properties)&&void 0!==Ho&&null!==(qo=Ho["pers:interior_orientation"])&&void 0!==qo&&qo.focal_length?"".concat(null===jc||void 0===jc||null===(ml=jc.properties)||void 0===ml||null===(fl=ml["pers:interior_orientation"])||void 0===fl?void 0:fl.focal_length," mm"):"unknown",Yu=[{section:this._t.gvs.metadata_camera_make,value:null===jc||void 0===jc||null===(vl=jc.properties)||void 0===vl||null===(bl=vl["pers:interior_orientation"])||void 0===bl?void 0:bl.camera_manufacturer},{section:this._t.gvs.metadata_camera_model,value:null===jc||void 0===jc||null===(kl=jc.properties)||void 0===kl||null===(Ll=kl["pers:interior_orientation"])||void 0===Ll?void 0:Ll.camera_model},{section:this._t.gvs.metadata_camera_type,value:360===(null===jc||void 0===jc?void 0:jc.horizontalFov)?this._t.gvs.picture_360:this._t.gvs.picture_flat},{section:this._t.gvs.metadata_camera_focal_length,value:Ku}];Zc.push((0,To.W_)("gvs-table-light",Yu)),Zc.push((0,To.dc)("h4","".concat((0,To.Nk)(Zh.op)," ").concat(this._t.gvs.metadata_location)));const Th=void 0!==(null===jc||void 0===jc||null===(Dl=jc.properties)||void 0===Dl?void 0:Dl["view:azimuth"])?"".concat(jc.properties["view:azimuth"],"\xb0"):"unknown",Ch=(0,dl.j$)(jc),Lh=[{section:this._t.gvs.metadata_location_longitude,value:jc.gps[0]},{section:this._t.gvs.metadata_location_latitude,value:jc.gps[1]},{section:this._t.gvs.metadata_location_orientation,value:Th},{section:this._t.gvs.metadata_location_precision,value:Ch}];if(Zc.push((0,To.W_)("gvs-table-light",Lh)),null!==(Nc=jc.properties)&&void 0!==Nc&&Nc.exif){const C=document.createElement("details");C.appendChild((0,To.dc)("summary","".concat((0,To.Nk)(Hh.gr)," ").concat(this._t.gvs.metadata_exif)));const Rn=Object.entries(jc.properties.exif).sort().map((C=>{let[Rn,or]=C;return{section:Rn,value:or}}));C.appendChild((0,To.W_)("",Rn)),Zc.push(C)}this._viewer.setPopup(!0,Zc),this._viewer.dispatchEvent(new CustomEvent("focus-changed",{detail:{focus:"meta"}}))}_showReportForm(){const C=this._viewer.psv.getPictureMetadata();if(!C)throw new Error("No picture currently selected");const Rn=[];Rn.push((0,To.dc)("h4","".concat((0,To.Nk)(Qh.ik)," ").concat(this._t.gvs.report)));const or=(0,Ro.iE)();if(or){const C=document.createElement("p");C.appendChild(document.createTextNode(this._t.gvs.report_auth.replace("{a}",or.name))),Rn.push(C)}const So=document.createElement("form");Rn.push(So);const Uo=document.createElement("div");Uo.classList.add("gvs-input-group");const Oo=(0,To._)("gvs-report-issue",this._t.gvs.report_nature_label,Gh.DB),Ho=document.createElement("select");Ho.name="gvs-report-issue",Ho.required=!0;["","blur_missing","blur_excess","inappropriate","privacy","picture_low_quality","mislocated","copyright","other"].forEach((C=>{const Rn=document.createElement("option");Rn.value=C,Rn.textContent=this._t.gvs.report_nature[C],""===C&&(Rn.setAttribute("disabled",""),Rn.setAttribute("selected",""),Rn.setAttribute("hidden","")),Ho.appendChild(Rn)})),Uo.appendChild(Oo),Uo.appendChild(Ho),So.appendChild(Uo);const qo=document.createElement("div");qo.classList.add("gvs-input-group","gvs-input-group-inline");const dl=document.createElement("input");dl.id="gvs-report-whole-sequence",dl.name="gvs-report-whole-sequence",dl.type="checkbox";const ml=(0,To._)("gvs-report-whole-sequence",this._t.gvs.report_whole_sequence);qo.appendChild(dl),qo.appendChild(ml),So.appendChild(qo);const fl=document.createElement("div");fl.classList.add("gvs-input-group");const vl=(0,To._)("gvs-report-details",this._t.gvs.report_details,Yh.Z6),bl=document.createElement("textarea");let kl;if(bl.name="gvs-report-details",bl.placeholder=this._t.gvs.report_details_placeholder,fl.appendChild(vl),fl.appendChild(bl),So.appendChild(fl),!or){const C=document.createElement("div");C.classList.add("gvs-input-group");const Rn=(0,To._)("email",this._t.gvs.report_email,Jh.IB);kl=document.createElement("input"),kl.type="email",kl.name="email",kl.placeholder=this._t.gvs.report_email_placeholder,C.appendChild(Rn),C.appendChild(kl),So.appendChild(C)}const Ll=document.createElement("div");Ll.classList.add("gvs-input-btn");const Dl=document.createElement("button");Dl.type="submit",Dl.appendChild((0,To.fa)($h.XC)),Dl.appendChild(document.createTextNode(this._t.gvs.report_submit)),Ll.appendChild(Dl),So.appendChild(Ll),So.addEventListener("submit",(Rn=>{var or;Rn.preventDefault(),this._viewer._api.sendReport({issue:Ho.value,picture_id:dl.checked?null:C.id,reporter_comments:bl.value,reporter_email:null===(or=kl)||void 0===or?void 0:or.value,sequence_id:C.sequence.id}).then((()=>{this._viewer.setPopup(!0,[(0,To.dc)("h4","".concat((0,To.Nk)(Qh.ik)," ").concat(this._t.gvs.report)),document.createTextNode(this._t.gvs.report_success)])})).catch((C=>{console.error(C),this._viewer.setPopup(!0,[(0,To.dc)("h4","".concat((0,To.Nk)(Qh.ik)," ").concat(this._t.gvs.report)),document.createTextNode(this._t.gvs.report_failure.replace("{e}",C))])}))})),this._viewer.setPopup(!0,Rn),this._viewer.dispatchEvent(new CustomEvent("focus-changed",{detail:{focus:"meta"}}))}_initWidgetMiniActions(){const C=document.createElement("img");C.src=Uo;const Rn=document.createElement("span");Rn.classList.add("gvs-mobile-hidden"),Rn.appendChild(document.createTextNode(this._t.gvs.expand));const or=(0,To.ax)("gvs-mini-expand",Rn,this._t.gvs.expand_info,["gvs-only-mini","gvs-print-hidden"]);or.appendChild(C),this._corners["mini-top-right"].appendChild(or),or.addEventListener("click",(()=>{this._viewer.setFocus(this._viewer.isMapWide()?"pic":"map")}));const So=document.createElement("img");So.src=Oo;const Ho=(0,To.ax)("gvs-mini-hide",So,this._t.gvs.minimize,["gvs-only-mini","gvs-print-hidden"]);this._corners["mini-bottom-left"].appendChild(Ho),Ho.addEventListener("click",(()=>{this._viewer.setUnfocusedVisible(!1)}));const qo=(0,To.ax)("gvs-mini-show",null,null,["gvs-btn-large","gvs-only-mini-hidden","gvs-print-hidden"]);this._corners["main-bottom-left"].appendChild(qo),qo.addEventListener("click",(()=>{(0,Ro.zd)()?this._viewer.setFocus(this._viewer.isMapWide()?"pic":"map"):this._viewer.setUnfocusedVisible(!0)}));const miniBtnRendering=()=>{this._viewer.map&&this._viewer.isMapWide()?(qo.title=this._t.gvs.show_psv,qo.innerHTML=(0,To.Nk)(Dl.UH)):(qo.title=this._t.gvs.show_map,qo.innerHTML=(0,To.Nk)(kl.Wx))};miniBtnRendering(),this._viewer.addEventListener("focus-changed",miniBtnRendering)}_initWidgetSearch(){const C=(0,To.Fl)("gvs-widget-search-bar",this._t.gvs.search_address,(C=>{const Rn=C.match(/([-+]?\d{1,2}\.\d+),\s*([-+]?\d{1,3}\.\d+)/);if(Rn){const C=parseFloat(Rn[1]),or=parseFloat(Rn[2]);return this._viewer.map.flyTo({center:[or,C],zoom:16}),Promise.resolve(!0)}return this._viewer.map.geocoder({query:C,limit:3,bbox:this._viewer.map.getBounds().toArray().map((C=>C.join(","))).join(","),proximity:this._viewer.map.getCenter().lat+","+this._viewer.map.getCenter().lng}).then((C=>C=C.features.map((C=>({title:C.place_name.split(",")[0],subtitle:C.place_name.split(",").slice(1).join(", "),data:C})))))}),(C=>{C&&(C.data.bounds?this._viewer.map.fitBounds(C.data.bounds):this._viewer.map.flyTo({center:C.data.center,zoom:C.data.zoom||13}))}),this,void 0,this._viewer.isWidthSmall(),this._viewer.map._geolocate);(0,To.sS)("gvs-widget-search",this._viewer.isWidthSmall()?"main-top-right":"main-top-left",this,[C],["gvs-only-map","gvs-print-hidden"])}_initWidgetMapLayers(){const C=(0,To.WD)("gvs-map-layers",Oh.Kr,this._t.gvs.layers,this),Rn=(0,To.wf)(this,C,[]);(0,To.sS)("gvs-widget-map-layers","main-top-right",this,[C,Rn],["gvs-group-large","gvs-group-btnpanel","gvs-only-map","gvs-print-hidden"]),this._viewer.map.hasTwoBackgrounds()&&(Rn.innerHTML="\n\t\t\t\t<h4>".concat((0,To.Nk)(Vh.ye)," ").concat(this._t.gvs.map_background,'</h4>\n\t\t\t\t<div id="gvs-map-bg" class="gvs-input-group">\n\t\t\t\t\t<input type="radio" id="gvs-map-bg-streets" name="gvs-map-bg" value="streets" />\n\t\t\t\t\t<label for="gvs-map-bg-streets">\n\t\t\t\t\t\t<img id="gvs-map-bg-streets-img" />\n\t\t\t\t\t\t').concat(this._t.gvs.map_background_streets,'\n\t\t\t\t\t</label>\n\t\t\t\t\t<input type="radio" id="gvs-map-bg-aerial" name="gvs-map-bg" value="aerial" />\n\t\t\t\t\t<label for="gvs-map-bg-aerial">\n\t\t\t\t\t\t<img id="gvs-map-bg-aerial-img" />\n\t\t\t\t\t\t').concat(this._t.gvs.map_background_aerial,"\n\t\t\t\t\t</label>\n\t\t\t\t</div>")),Rn.innerHTML+="\n\t\t\t<h4>".concat((0,To.Nk)(Nh.q2)," ").concat(this._t.gvs.map_theme,'</h4>\n\t\t\t<div class="gvs-input-group">\n\t\t\t\t<select id="gvs-map-theme" style="width: 100%;">\n\t\t\t\t\t<option value="default">').concat(this._t.gvs.map_theme_default,'</option>\n\t\t\t\t\t<option value="age">').concat(this._t.gvs.map_theme_age,'</option>\n\t\t\t\t\t<option value="type">').concat(this._t.gvs.map_theme_type,'</option>\n\t\t\t\t</select>\n\t\t\t</div>\n\t\t\t<div>\n\t\t\t\t<div id="gvs-map-theme-legend-age" class="gvs-map-theme-legend gvs-hidden">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<div class="gvs-map-theme-legend-entry">\n\t\t\t\t\t\t\t<span class="gvs-map-theme-color" style="background-color: ').concat(Ro.DM.PALETTE_4,'"></span>\n\t\t\t\t\t\t\t').concat(this._t.gvs.map_theme_age_4,'\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="gvs-map-theme-legend-entry">\n\t\t\t\t\t\t\t<span class="gvs-map-theme-color" style="background-color: ').concat(Ro.DM.PALETTE_3,'"></span>\n\t\t\t\t\t\t\t').concat(this._t.gvs.map_theme_age_3,'\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<div class="gvs-map-theme-legend-entry">\n\t\t\t\t\t\t\t<span class="gvs-map-theme-color" style="background-color: ').concat(Ro.DM.PALETTE_2,'"></span>\n\t\t\t\t\t\t\t').concat(this._t.gvs.map_theme_age_2,'\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="gvs-map-theme-legend-entry">\n\t\t\t\t\t\t\t<span class="gvs-map-theme-color" style="background-color: ').concat(Ro.DM.PALETTE_1,'"></span>\n\t\t\t\t\t\t\t').concat(this._t.gvs.map_theme_age_1,'\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div id="gvs-map-theme-legend-type" class="gvs-map-theme-legend gvs-hidden">\n\t\t\t\t\t<div class="gvs-map-theme-legend-entry">\n\t\t\t\t\t\t<span class="gvs-map-theme-color" style="background-color: ').concat(Ro.DM.QUALI_1,'"></span>\n\t\t\t\t\t\t').concat(this._t.gvs.picture_360,'\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="gvs-map-theme-legend-entry">\n\t\t\t\t\t\t<span class="gvs-map-theme-color" style="background-color: ').concat(Ro.DM.QUALI_2,'"></span>\n\t\t\t\t\t\t').concat(this._t.gvs.picture_flat,"\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>");const or=Rn.querySelector("#gvs-map-theme"),onChange=()=>{this._onMapThemeChange(),this._onMapFiltersChange()};if(or.addEventListener("change",onChange),or.addEventListener("keypress",onChange),or.addEventListener("paste",onChange),or.addEventListener("input",onChange),this._viewer.map.hasTwoBackgrounds()){Rn.querySelector("#gvs-map-bg-aerial-img").src=Ho;Rn.querySelector("#gvs-map-bg-streets-img").src=qo;const C=Rn.querySelector("#gvs-map-bg-aerial"),or=Rn.querySelector("#gvs-map-bg-streets"),onBgChange=C=>{this._viewer.map.setBackground(C.target.value)};C.addEventListener("change",onBgChange),or.addEventListener("change",onBgChange),this._viewer.addEventListener("map:background-changed",(C=>this._onMapBackgroundChange(C.detail.background))),this._onMapBackgroundChange(this._viewer.map.getBackground())}}_onMapBackgroundChange(C){const Rn=document.getElementById("gvs-map-bg-aerial"),or=document.getElementById("gvs-map-bg-streets");"aerial"===C?Rn.checked=!0:or.checked=!0}_onMapThemeChange(){const C=document.getElementById("gvs-map-theme").value;for(let Rn of document.getElementsByClassName("gvs-map-theme-legend"))Rn.id=="gvs-map-theme-legend-"+C?Rn.classList.remove("gvs-hidden"):Rn.classList.add("gvs-hidden")}_initWidgetFilters(C){const Rn=(0,To.WD)("gvs-filter",Fh.cR,this._t.gvs.filters,this),or=(0,To.wf)(this,Rn,[]);if(or.innerHTML='\n\t\t\t<form id="gvs-filter-form">\n\t\t\t\t<div id="gvs-filter-zoomin">'.concat((0,To.Nk)(Qh.ik)," ").concat(this._t.gvs.filter_zoom_in,"</div>\n\t\t\t\t<h4>").concat((0,To.Nk)(Ku.fT)," ").concat(this._t.gvs.filter_date,'</h4>\n\t\t\t\t<div class="gvs-input-group">\n\t\t\t\t\t<input type="date" id="gvs-filter-date-from" />\n\t\t\t\t\t').concat((0,To.Nk)(Yu.eF),'\n\t\t\t\t\t<input type="date" id="gvs-filter-date-end" />\n\t\t\t\t</div>\n\t\t\t\t<h4>').concat((0,To.Nk)(Ll.Vm)," ").concat(this._t.gvs.filter_picture,'</h4>\n\t\t\t\t<div class="gvs-input-group" style="justify-content: center;">\n\t\t\t\t\t<input type="checkbox" id="gvs-filter-type-flat" name="flat" checked />\n\t\t\t\t\t<label for="gvs-filter-type-flat" style="margin-right: 20px">').concat(this._t.gvs.picture_flat,'</label>\n\t\t\t\t\t<input type="checkbox" id="gvs-filter-type-360" name="360" checked />\n\t\t\t\t\t<label for="gvs-filter-type-360">').concat(this._t.gvs.picture_360,"</label>\n\t\t\t\t</div>\n\t\t\t\t\x3c!--h4>").concat((0,To.Nk)(Eh._j)," ").concat(this._t.gvs.filter_camera_model,'</h4>\n\t\t\t\t<div class="gvs-input-group" id="gvs-filter-model"></div--\x3e\n\t\t\t</form>\n\t\t'),(0,To.sS)("gvs-widget-filter",this._viewer.isWidthSmall()?"main-top-right":"main-top-left",this,[Rn,or],["gvs-group-large","gvs-group-btnpanel","gvs-only-map","gvs-print-hidden"]),this._viewer.isWidthSmall()&&(or.style.width="".concat(this._viewer.container.offsetWidth-70,"px")),C){const C=or.querySelector("#gvs-filter-form"),Rn=document.createElement("h4");Rn.innerHTML="".concat((0,To.Nk)(jh.IL)," ").concat(this._t.gvs.filter_user),C.appendChild(Rn);const So=document.createElement("div");So.id="gvs-filter-user",So.classList.add("gvs-input-group");const Ro=(0,To.Fl)("gvs-filter-search-user",this._t.gvs.search_user,(C=>this._viewer._api.searchUsers(C).then((C=>(C||[]).map((C=>({title:C.label,data:C})))))),(C=>this._viewer.map.setVisibleUsers(C?[C.data.id]:["geovisio"])),this,!0);So.appendChild(Ro),C.appendChild(So)}const So=or.children[0];this._formDelay=null;const onFormChange=()=>{this._formDelay&&clearTimeout(this._formDelay),this._formDelay=setTimeout((()=>{this._onMapFiltersChange()}),250)};So.addEventListener("change",onFormChange),So.addEventListener("reset",onFormChange),So.addEventListener("submit",(C=>(onFormChange(),C.preventDefault(),!1)),!0);for(let To of So.getElementsByTagName("input"))To.addEventListener("change",onFormChange),To.addEventListener("keypress",onFormChange),To.addEventListener("paste",onFormChange),To.addEventListener("input",onFormChange)}_onMapFiltersChange(){const C=document.getElementById("gvs-filter-date-from"),Rn=document.getElementById("gvs-filter-date-end"),or=document.getElementById("gvs-filter-type-flat"),So=document.getElementById("gvs-filter-type-360"),To=document.getElementById("gvs-map-theme");let Ro="";So.checked&&!or.checked&&(Ro="equirectangular"),!So.checked&&or.checked&&(Ro="flat");const Uo={minDate:C.value,maxDate:Rn.value,type:Ro,theme:To.value};this._viewer.setFilters(Uo)}_listenMapFiltersChanges(){const C=document.getElementById("gvs-filter-date-from"),Rn=document.getElementById("gvs-filter-date-end"),or=document.getElementById("gvs-filter-type-flat"),So=document.getElementById("gvs-filter-type-360"),To=document.getElementById("gvs-map-theme");this._viewer.addEventListener("filters-changed",(Ro=>{Ro.detail.minDate&&(C.value=Ro.detail.minDate),Ro.detail.maxDate&&(Rn.value=Ro.detail.maxDate),Ro.detail.theme&&(To.value=Ro.detail.theme),Ro.detail.type&&(So.checked=["","equirectangular"].includes(Ro.detail.type),or.checked=["","flat"].includes(Ro.detail.type)),this._onMapThemeChange()}));const Ro=document.getElementById("gvs-filter-zoomin"),changeLblZoomInDisplay=()=>{this._viewer.map.getZoom()<7?Ro.style.display=null:Ro.style.display="none"};changeLblZoomInDisplay(),this._viewer.map.on("zoomend",changeLblZoomInDisplay)}_initWidgetShare(){var C,Rn;const or=(0,To.ax)("gvs-share",(0,To.fa)(vl.M6),this._t.gvs.share,["gvs-btn-large"]),So=(0,To.wf)(this,or,[]);So.innerHTML='\n\t\t\t<div class="gvs-hidden">\n\t\t\t\t<p id="gvs-share-license" style="margin: 0 0 10px 0;"></p>\n\t\t\t</div>\n\t\t\t<h4 style="margin-top: 0">'.concat((0,To.Nk)(bl.nN)," ").concat(this._t.gvs.share_links,'</h4>\n\t\t\t<div id="gvs-share-links" class="gvs-input-btn">\n\t\t\t\t<a id="gvs-share-image" class="gvs-link-btn gvs-hidden" download target="_blank">').concat((0,To.Nk)(qh.zo)," ").concat(this._t.gvs.share_image,'</a>\n\t\t\t\t<button id="gvs-share-url" data-copy="true" style="flex-basis: 100%; flex-grow: 2; flex-shrink: 2;">').concat((0,To.Nk)(Kh.kZ)," ").concat(this._t.gvs.share_page,'</button>\n\t\t\t\t<button id="gvs-share-print" style="flex-basis: 100%; flex-grow: 2; flex-shrink: 2;">').concat((0,To.Nk)(Ch.wf)," ").concat(this._t.gvs.share_print,"</button>\n\t\t\t</div>\n\t\t\t<h4>\n\t\t\t\t").concat((0,To.Nk)(kl.Wx)," ").concat(this._t.gvs.share_embed,'\n\t\t\t\t<a href="https://docs.panoramax.fr/web-viewer/03_URL_settings/"\n\t\t\t\t\ttitle="').concat(this._t.gvs.share_embed_docs,'"\n\t\t\t\t\ttarget="_blank"\n\t\t\t\t\tstyle="vertical-align: middle">\n\t\t\t\t\t').concat((0,To.Nk)(Gh.DB),'\n\t\t\t\t</a>\n\t\t\t</h4>\n\t\t\t<div class="gvs-input-btn">\n\t\t\t\t<textarea id="gvs-share-iframe" readonly></textarea>\n\t\t\t\t<button data-input="gvs-share-iframe">').concat((0,To.Nk)(Kh.kZ)," ").concat(this._t.gvs.copy,'</button>\n\t\t\t</div>\n\t\t\t<h4 class="gvs-hidden">').concat((0,To.Nk)(Th.Iw)," ").concat(this._t.gvs.edit_osm,'</h4>\n\t\t\t<div class="gvs-input-btn gvs-hidden" style="justify-content: center">\n\t\t\t\t<a id="gvs-edit-id" class="gvs-link-btn" target="_blank">').concat((0,To.Nk)(Zh.op)," ").concat(this._t.gvs.id,'</a>\n\t\t\t\t<button id="gvs-edit-josm" title="').concat(this._t.gvs.josm_live,'">').concat((0,To.Nk)(Lh.QN)," ").concat(this._t.gvs.josm,"</button>\n\t\t\t</div>\n\t\t"),(0,To.sS)("gvs-widget-share","main-bottom-right",this,[or,So],["gvs-group-large","gvs-group-btnpanel","gvs-mobile-hidden","gvs-print-hidden"]);const Ro=document.getElementById("gvs-share-links"),Uo=document.getElementById("gvs-share-image"),Oo=document.getElementById("gvs-share-url");if(this._viewer._api.getRSSURL()){const C=document.createElement("a");C.id="gvs-share-rss",C.classList.add("gvs-link-btn"),C.setAttribute("target","_blank"),C.setAttribute("title",this._t.gvs.share_rss_title),C.appendChild((0,To.fa)(Wh.mW)),C.appendChild(document.createTextNode(this._t.gvs.share_rss)),Ro.insertBefore(C,Oo)}this._viewer.addEventListener("psv:picture-loaded",(()=>{var C;const Rn=this._viewer.psv.getPictureMetadata();Uo.href=Rn.panorama.hdUrl;for(document.getElementById("gvs-share-license").innerHTML=null!==Rn&&void 0!==Rn&&null!==(C=Rn.caption)&&void 0!==C&&C.license?this._t.gvs.legend_license.replace("{l}",Rn.caption.license):"";So.getElementsByClassName("gvs-hidden").length>0;){So.getElementsByClassName("gvs-hidden")[0].classList.remove("gvs-hidden")}}));const updateLinks=C=>{var Rn;const or=(null===C||void 0===C||null===(Rn=C.detail)||void 0===Rn?void 0:Rn.url)||window.location.href.replace(/\/$/,""),To=this._options.iframeBaseURL?this._options.iframeBaseURL+window.location.hash:or,Ro=So.querySelector("#gvs-share-url"),Uo=So.querySelector("#gvs-share-iframe"),Oo=So.querySelector("#gvs-edit-id"),Ho=So.querySelector("#gvs-share-rss");Ro.setAttribute("data-copy",or),Uo.innerText='<iframe src="'.concat(To,'" style="border: none; width: 500px; height: 300px"></iframe>');const qo=this._viewer.psv.getPictureMetadata();if(qo){const C={map:"19/".concat(qo.gps[1],"/").concat(qo.gps[0]),source:"Panoramax",photo_overlay:"panoramax",photo:"panoramax/".concat(qo.id)};Oo.setAttribute("href","".concat(this._options.editIdUrl,"#").concat(new URLSearchParams(C).toString()))}var dl,ml;Ho&&Ho.setAttribute("href",this._viewer._api.getRSSURL(null===(dl=this._viewer)||void 0===dl||null===(ml=dl.map)||void 0===ml?void 0:ml.getBounds()))};updateLinks(),null===(C=this._viewer)||void 0===C||null===(Rn=C._hash)||void 0===Rn||Rn.addEventListener("url-changed",updateLinks),(0,To.QO)(So,this._viewer._t);const Ho=So.querySelector("#gvs-edit-josm");Ho.addEventListener("click",(()=>{Ho.classList.contains("gvs-btn-active")?this._viewer.toggleJOSMLive(!1):this._viewer.toggleJOSMLive(!0).catch((C=>{console.warn(C),alert(this._t.gvs.error_josm)}))})),this._viewer.addEventListener("josm-live-enabled",(()=>Ho.classList.add("gvs-btn-active"))),this._viewer.addEventListener("josm-live-disabled",(()=>Ho.classList.remove("gvs-btn-active")));So.querySelector("#gvs-share-print").addEventListener("click",window.print.bind(window))}}},4873:(C,Rn)=>{"use strict";var or="arrow-right",So=[8594],To="f061",Ro="M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z";Rn.DF={prefix:"fas",iconName:or,icon:[448,512,So,To,Ro]},Rn.eF=Rn.DF},4411:(C,Rn)=>{"use strict";var or=[61946],So="M256 64C150 64 64 150 64 256s86 192 192 192c17.7 0 32 14.3 32 32s-14.3 32-32 32C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256v32c0 53-43 96-96 96c-29.3 0-55.6-13.2-73.2-33.9C320 371.1 289.5 384 256 384c-70.7 0-128-57.3-128-128s57.3-128 128-128c27.9 0 53.7 8.9 74.7 24.1c5.7-5 13.1-8.1 21.3-8.1c17.7 0 32 14.3 32 32v80 32c0 17.7 14.3 32 32 32s32-14.3 32-32V256c0-106-86-192-192-192zm64 192a64 64 0 1 0 -128 0 64 64 0 1 0 128 0z";Rn.DF={prefix:"fas",iconName:"at",icon:[512,512,or,"40",So]},Rn.IB=Rn.DF},4056:(C,Rn)=>{"use strict";var or="backward",So=[9194],To="f04a",Ro="M459.5 440.6c9.5 7.9 22.8 9.7 34.1 4.4s18.4-16.6 18.4-29V96c0-12.4-7.2-23.7-18.4-29s-24.5-3.6-34.1 4.4L288 214.3V256v41.7L459.5 440.6zM256 352V256 128 96c0-12.4-7.2-23.7-18.4-29s-24.5-3.6-34.1 4.4l-192 160C4.2 237.5 0 246.5 0 256s4.2 18.5 11.5 24.6l192 160c9.5 7.9 22.8 9.7 34.1 4.4s18.4-16.6 18.4-29V352z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.DY=Rn.DF},5163:(C,Rn)=>{"use strict";var or="calendar",So=[128197,128198],To="f133",Ro="M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z";Rn.DF={prefix:"fas",iconName:or,icon:[448,512,So,To,Ro]},Rn.fT=Rn.DF},779:(C,Rn)=>{"use strict";var or="camera",So=[62258,"camera-alt"],To="f030",Ro="M149.1 64.8L138.7 96H64C28.7 96 0 124.7 0 160V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V160c0-35.3-28.7-64-64-64H373.3L362.9 64.8C356.4 45.2 338.1 32 317.4 32H194.6c-20.7 0-39 13.2-45.5 32.8zM256 192a96 96 0 1 1 0 192 96 96 0 1 1 0-192z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn._j=Rn.DF},6565:(C,Rn)=>{"use strict";var or="check",So=[10003,10004],To="f00c",Ro="M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z";Rn.DF={prefix:"fas",iconName:or,icon:[448,512,So,To,Ro]},Rn.LE=Rn.DF},7361:(C,Rn)=>{"use strict";var or="chevron-down",So=[],To="f078",Ro="M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.pt=Rn.DF},4671:(C,Rn)=>{"use strict";var or="circle-exclamation",So=["exclamation-circle"],To="f06a",Ro="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24V264c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.xH=Rn.DF},939:(C,Rn)=>{"use strict";var or="circle-info",So=["info-circle"],To="f05a",Ro="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.DB=Rn.DF},8455:(C,Rn)=>{"use strict";var or="circle-notch",So=[],To="f1ce",Ro="M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8C121.8 95.6 64 169.1 64 256c0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1c-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256c0 141.4-114.6 256-256 256S0 397.4 0 256C0 140 77.1 42.1 182.9 10.6c16.9-5 34.8 4.6 39.8 21.5z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.IJ=Rn.DF},7711:(C,Rn)=>{"use strict";var or="circle-question",So=[62108,"question-circle"],To="f059",Ro="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3h58.3c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24V250.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1H222.6c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.FD=Rn.DF},847:(C,Rn)=>{"use strict";var or="cloud-arrow-down",So=[62337,"cloud-download","cloud-download-alt"],To="f0ed",Ro="M144 480C64.5 480 0 415.5 0 336c0-62.8 40.2-116.2 96.2-135.9c-.1-2.7-.2-5.4-.2-8.1c0-88.4 71.6-160 160-160c59.3 0 111 32.2 138.7 80.2C409.9 102 428.3 96 448 96c53 0 96 43 96 96c0 12.2-2.3 23.8-6.4 34.6C596 238.4 640 290.1 640 352c0 70.7-57.3 128-128 128H144zm79-167l80 80c9.4 9.4 24.6 9.4 33.9 0l80-80c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-39 39V184c0-13.3-10.7-24-24-24s-24 10.7-24 24V318.1l-39-39c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9z";Rn.DF={prefix:"fas",iconName:or,icon:[640,512,So,To,Ro]},Rn.zo=Rn.DF},3630:(C,Rn)=>{"use strict";var or="comment-dots",So=[128172,62075,"commenting"],To="f4ad",Ro="M256 448c141.4 0 256-93.1 256-208S397.4 32 256 32S0 125.1 0 240c0 45.1 17.7 86.8 47.7 120.9c-1.9 24.5-11.4 46.3-21.4 62.9c-5.5 9.2-11.1 16.6-15.2 21.6c-2.1 2.5-3.7 4.4-4.9 5.7c-.6 .6-1 1.1-1.3 1.4l-.3 .3 0 0 0 0 0 0 0 0c-4.6 4.6-5.9 11.4-3.4 17.4c2.5 6 8.3 9.9 14.8 9.9c28.7 0 57.6-8.9 81.6-19.3c22.9-10 42.4-21.9 54.3-30.6c31.8 11.5 67 17.9 104.1 17.9zM128 208a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm128 0a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm96 32a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.Z6=Rn.DF},6087:(C,Rn)=>{"use strict";var or="copy",So=[],To="f0c5",Ro="M272 0H396.1c12.7 0 24.9 5.1 33.9 14.1l67.9 67.9c9 9 14.1 21.2 14.1 33.9V336c0 26.5-21.5 48-48 48H272c-26.5 0-48-21.5-48-48V48c0-26.5 21.5-48 48-48zM48 128H192v64H64V448H256V416h64v48c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V176c0-26.5 21.5-48 48-48z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.kZ=Rn.DF},2155:(C,Rn)=>{"use strict";var or="earth-europe",So=["globe-europe"],To="f7a2",Ro="M266.3 48.3L232.5 73.6c-5.4 4-8.5 10.4-8.5 17.1v9.1c0 6.8 5.5 12.3 12.3 12.3c2.4 0 4.8-.7 6.8-2.1l41.8-27.9c2-1.3 4.4-2.1 6.8-2.1h1c6.2 0 11.3 5.1 11.3 11.3c0 3-1.2 5.9-3.3 8l-19.9 19.9c-5.8 5.8-12.9 10.2-20.7 12.8l-26.5 8.8c-5.8 1.9-9.6 7.3-9.6 13.4c0 3.7-1.5 7.3-4.1 10l-17.9 17.9c-6.4 6.4-9.9 15-9.9 24v4.3c0 16.4 13.6 29.7 29.9 29.7c11 0 21.2-6.2 26.1-16l4-8.1c2.4-4.8 7.4-7.9 12.8-7.9c4.5 0 8.7 2.1 11.4 5.7l16.3 21.7c2.1 2.9 5.5 4.5 9.1 4.5c8.4 0 13.9-8.9 10.1-16.4l-1.1-2.3c-3.5-7 0-15.5 7.5-18l21.2-7.1c7.6-2.5 12.7-9.6 12.7-17.6c0-10.3 8.3-18.6 18.6-18.6H400c8.8 0 16 7.2 16 16s-7.2 16-16 16H379.3c-7.2 0-14.2 2.9-19.3 8l-4.7 4.7c-2.1 2.1-3.3 5-3.3 8c0 6.2 5.1 11.3 11.3 11.3h11.3c6 0 11.8 2.4 16 6.6l6.5 6.5c1.8 1.8 2.8 4.3 2.8 6.8s-1 5-2.8 6.8l-7.5 7.5C386 262 384 266.9 384 272s2 10 5.7 13.7L408 304c10.2 10.2 24.1 16 38.6 16H454c6.5-20.2 10-41.7 10-64c0-111.4-87.6-202.4-197.7-207.7zm172 307.9c-3.7-2.6-8.2-4.1-13-4.1c-6 0-11.8-2.4-16-6.6L396 332c-7.7-7.7-18-12-28.9-12c-9.7 0-19.2-3.5-26.6-9.8L314 287.4c-11.6-9.9-26.4-15.4-41.7-15.4H251.4c-12.6 0-25 3.7-35.5 10.7L188.5 301c-17.8 11.9-28.5 31.9-28.5 53.3v3.2c0 17 6.7 33.3 18.7 45.3l16 16c8.5 8.5 20 13.3 32 13.3H248c13.3 0 24 10.7 24 24c0 2.5 .4 5 1.1 7.3c71.3-5.8 132.5-47.6 165.2-107.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM187.3 100.7c-6.2-6.2-16.4-6.2-22.6 0l-32 32c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0l32-32c6.2-6.2 6.2-16.4 0-22.6z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.ye=Rn.DF},1445:(C,Rn)=>{"use strict";var or="ellipsis-vertical",So=["ellipsis-v"],To="f142",Ro="M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z";Rn.DF={prefix:"fas",iconName:or,icon:[128,512,So,To,Ro]},Rn.Uw=Rn.DF},5218:(C,Rn)=>{"use strict";var or="forward",So=[9193],To="f04e",Ro="M52.5 440.6c-9.5 7.9-22.8 9.7-34.1 4.4S0 428.4 0 416V96C0 83.6 7.2 72.3 18.4 67s24.5-3.6 34.1 4.4L224 214.3V256v41.7L52.5 440.6zM256 352V256 128 96c0-12.4 7.2-23.7 18.4-29s24.5-3.6 34.1 4.4l192 160c7.3 6.1 11.5 15.1 11.5 24.6s-4.2 18.5-11.5 24.6l-192 160c-9.5 7.9-22.8 9.7-34.1 4.4s-18.4-16.6-18.4-29V352z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.ir=Rn.DF},3701:(C,Rn)=>{"use strict";var or="gear",So=[9881,"cog"],To="f013",Ro="M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4L83.1 425.9c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4C64.6 273.1 64 264.6 64 256s.6-17.1 1.7-25.4L22.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.gr=Rn.DF},4422:(C,Rn)=>{"use strict";var or="image",So=[],To="f03e",Ro="M0 96C0 60.7 28.7 32 64 32H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6h96 32H424c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.Vm=Rn.DF},3650:(C,Rn)=>{"use strict";var or="layer-group",So=[],To="f5fd",Ro="M264.5 5.2c14.9-6.9 32.1-6.9 47 0l218.6 101c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 149.8C37.4 145.8 32 137.3 32 128s5.4-17.9 13.9-21.8L264.5 5.2zM476.9 209.6l53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 277.8C37.4 273.8 32 265.3 32 256s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0l152-70.2zm-152 198.2l152-70.2 53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 405.8C37.4 401.8 32 393.3 32 384s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0z";Rn.DF={prefix:"fas",iconName:or,icon:[576,512,So,To,Ro]},Rn.Kr=Rn.DF},4480:(C,Rn)=>{"use strict";var or="lightbulb",So=[128161],To="f0eb",Ro="M272 384c9.6-31.9 29.5-59.1 49.2-86.2l0 0c5.2-7.1 10.4-14.2 15.4-21.4c19.8-28.5 31.4-63 31.4-100.3C368 78.8 289.2 0 192 0S16 78.8 16 176c0 37.3 11.6 71.9 31.4 100.3c5 7.2 10.2 14.3 15.4 21.4l0 0c19.8 27.1 39.7 54.4 49.2 86.2H272zM192 512c44.2 0 80-35.8 80-80V416H112v16c0 44.2 35.8 80 80 80zM112 176c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-61.9 50.1-112 112-112c8.8 0 16 7.2 16 16s-7.2 16-16 16c-44.2 0-80 35.8-80 80z";Rn.DF={prefix:"fas",iconName:or,icon:[384,512,So,To,Ro]},Rn.X8=Rn.DF},3911:(C,Rn)=>{"use strict";var or="link",So=[128279,"chain"],To="f0c1",Ro="M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z";Rn.DF={prefix:"fas",iconName:or,icon:[640,512,So,To,Ro]},Rn.nN=Rn.DF},5476:(C,Rn)=>{"use strict";var or="location-dot",So=["map-marker-alt"],To="f3c5",Ro="M215.7 499.2C267 435 384 279.4 384 192C384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2c12.3 15.3 35.1 15.3 47.4 0zM192 128a64 64 0 1 1 0 128 64 64 0 1 1 0-128z";Rn.DF={prefix:"fas",iconName:or,icon:[384,512,So,To,Ro]},Rn.op=Rn.DF},4666:(C,Rn)=>{"use strict";var or="magnifying-glass",So=[128269,"search"],To="f002",Ro="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.Y$=Rn.DF},8402:(C,Rn)=>{"use strict";var or=[128506,62072],So="f279",To="M384 476.1L192 421.2V35.9L384 90.8V476.1zm32-1.2V88.4L543.1 37.5c15.8-6.3 32.9 5.3 32.9 22.3V394.6c0 9.8-6 18.6-15.1 22.3L416 474.8zM15.1 95.1L160 37.2V423.6L32.9 474.5C17.1 480.8 0 469.2 0 452.2V117.4c0-9.8 6-18.6 15.1-22.3z";Rn.DF={prefix:"fas",iconName:"map",icon:[576,512,or,So,To]},Rn.Wx=Rn.DF},5974:(C,Rn)=>{"use strict";var or="minus",So=[8211,8722,10134,"subtract"],To="f068",Ro="M432 256c0 17.7-14.3 32-32 32L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l352 0c17.7 0 32 14.3 32 32z";Rn.DF={prefix:"fas",iconName:or,icon:[448,512,So,To,Ro]},Rn.Kl=Rn.DF},5088:(C,Rn)=>{"use strict";var or="palette",So=[127912],To="f53f",Ro="M512 256c0 .9 0 1.8 0 2.7c-.4 36.5-33.6 61.3-70.1 61.3H344c-26.5 0-48 21.5-48 48c0 3.4 .4 6.7 1 9.9c2.1 10.2 6.5 20 10.8 29.9c6.1 13.8 12.1 27.5 12.1 42c0 31.8-21.6 60.7-53.4 62c-3.5 .1-7 .2-10.6 .2C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0-96a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 96a32 32 0 1 0 0-64 32 32 0 1 0 0 64z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.q2=Rn.DF},4038:(C,Rn)=>{"use strict";var or="panorama",So=[],To="e209",Ro="M45.6 32C20.4 32 0 52.4 0 77.6V434.4C0 459.6 20.4 480 45.6 480c5.1 0 10-.8 14.7-2.4C74.6 472.8 177.6 440 320 440s245.4 32.8 259.6 37.6c4.7 1.6 9.7 2.4 14.7 2.4c25.2 0 45.6-20.4 45.6-45.6V77.6C640 52.4 619.6 32 594.4 32c-5 0-10 .8-14.7 2.4C565.4 39.2 462.4 72 320 72S74.6 39.2 60.4 34.4C55.6 32.8 50.7 32 45.6 32zM96 160a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm272 0c7.9 0 15.4 3.9 19.8 10.5L512.3 353c5.4 8 5.6 18.4 .4 26.5s-14.7 12.3-24.2 10.7C442.7 382.4 385.2 376 320 376c-65.6 0-123.4 6.5-169.3 14.4c-9.8 1.7-19.7-2.9-24.7-11.5s-4.3-19.4 1.9-27.2L197.3 265c4.6-5.7 11.4-9 18.7-9s14.2 3.3 18.7 9l26.4 33.1 87-127.6c4.5-6.6 11.9-10.5 19.8-10.5z";Rn.DF={prefix:"fas",iconName:or,icon:[640,512,So,To,Ro]},Rn.UH=Rn.DF},421:(C,Rn)=>{"use strict";var or="paper-plane",So=[61913],To="f1d8",Ro="M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480V396.4c0-4 1.5-7.8 4.2-10.7L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.XC=Rn.DF},2482:(C,Rn)=>{"use strict";var or="pause",So=[9208],To="f04c",Ro="M48 64C21.5 64 0 85.5 0 112V400c0 26.5 21.5 48 48 48H80c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48H48zm192 0c-26.5 0-48 21.5-48 48V400c0 26.5 21.5 48 48 48h32c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48H240z";Rn.DF={prefix:"fas",iconName:or,icon:[320,512,So,To,Ro]},Rn.XQ=Rn.DF},625:(C,Rn)=>{"use strict";var or=[128394],So="f304",To="M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z";Rn.DF={prefix:"fas",iconName:"pen",icon:[512,512,or,So,To]},Rn.Iw=Rn.DF},1658:(C,Rn)=>{"use strict";var or="person-biking",So=[128692,"biking"],To="f84a",Ro="M400 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm27.2 64l-61.8-48.8c-17.3-13.6-41.7-13.8-59.1-.3l-83.1 64.2c-30.7 23.8-28.5 70.8 4.3 91.6L288 305.1V416c0 17.7 14.3 32 32 32s32-14.3 32-32V288c0-10.7-5.3-20.7-14.2-26.6L295 232.9l60.3-48.5L396 217c5.7 4.5 12.7 7 20 7h64c17.7 0 32-14.3 32-32s-14.3-32-32-32H427.2zM56 384a72 72 0 1 1 144 0A72 72 0 1 1 56 384zm200 0A128 128 0 1 0 0 384a128 128 0 1 0 256 0zm184 0a72 72 0 1 1 144 0 72 72 0 1 1 -144 0zm200 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0z";Rn.DF={prefix:"fas",iconName:or,icon:[640,512,So,To,Ro]},Rn.uY=Rn.DF},1788:(C,Rn)=>{"use strict";var or="play",So=[9654],To="f04b",Ro="M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80V432c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9L361 297c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z";Rn.DF={prefix:"fas",iconName:or,icon:[384,512,So,To,Ro]},Rn.zc=Rn.DF},4229:(C,Rn)=>{"use strict";var or="plus",So=[10133,61543,"add"],To="M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z";Rn.DF={prefix:"fas",iconName:or,icon:[448,512,So,"2b",To]},Rn.r8=Rn.DF},6666:(C,Rn)=>{"use strict";var or="print",So=[128424,128438,9113],To="f02f",Ro="M128 0C92.7 0 64 28.7 64 64v96h64V64H354.7L384 93.3V160h64V93.3c0-17-6.7-33.3-18.7-45.3L400 18.7C388 6.7 371.7 0 354.7 0H128zM384 352v32 64H128V384 368 352H384zm64 32h32c17.7 0 32-14.3 32-32V256c0-35.3-28.7-64-64-64H64c-35.3 0-64 28.7-64 64v96c0 17.7 14.3 32 32 32H64v64c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V384zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.wf=Rn.DF},8117:(C,Rn)=>{"use strict";var or="rocket",So=[],To="f135",Ro="M156.6 384.9L125.7 354c-8.5-8.5-11.5-20.8-7.7-32.2c3-8.9 7-20.5 11.8-33.8L24 288c-8.6 0-16.6-4.6-20.9-12.1s-4.2-16.7 .2-24.1l52.5-88.5c13-21.9 36.5-35.3 61.9-35.3l82.3 0c2.4-4 4.8-7.7 7.2-11.3C289.1-4.1 411.1-8.1 483.9 5.3c11.6 2.1 20.6 11.2 22.8 22.8c13.4 72.9 9.3 194.8-111.4 276.7c-3.5 2.4-7.3 4.8-11.3 7.2v82.3c0 25.4-13.4 49-35.3 61.9l-88.5 52.5c-7.4 4.4-16.6 4.5-24.1 .2s-12.1-12.2-12.1-20.9V380.8c-14.1 4.9-26.4 8.9-35.7 11.9c-11.2 3.6-23.4 .5-31.8-7.8zM384 168a40 40 0 1 0 0-80 40 40 0 1 0 0 80z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.tM=Rn.DF},953:(C,Rn)=>{"use strict";var or="satellite-dish",So=[128225],To="f7c0",Ro="M192 32c0-17.7 14.3-32 32-32C383.1 0 512 128.9 512 288c0 17.7-14.3 32-32 32s-32-14.3-32-32C448 164.3 347.7 64 224 64c-17.7 0-32-14.3-32-32zM60.6 220.6L164.7 324.7l28.4-28.4c-.7-2.6-1.1-5.4-1.1-8.3c0-17.7 14.3-32 32-32s32 14.3 32 32s-14.3 32-32 32c-2.9 0-5.6-.4-8.3-1.1l-28.4 28.4L291.4 451.4c14.5 14.5 11.8 38.8-7.3 46.3C260.5 506.9 234.9 512 208 512C93.1 512 0 418.9 0 304c0-26.9 5.1-52.5 14.4-76.1c7.5-19 31.8-21.8 46.3-7.3zM224 96c106 0 192 86 192 192c0 17.7-14.3 32-32 32s-32-14.3-32-32c0-70.7-57.3-128-128-128c-17.7 0-32-14.3-32-32s14.3-32 32-32z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.QN=Rn.DF},8818:(C,Rn)=>{"use strict";var or="share-nodes",So=["share-alt"],To="f1e0",Ro="M352 224c53 0 96-43 96-96s-43-96-96-96s-96 43-96 96c0 4 .2 8 .7 11.9l-94.1 47C145.4 170.2 121.9 160 96 160c-53 0-96 43-96 96s43 96 96 96c25.9 0 49.4-10.2 66.6-26.9l94.1 47c-.5 3.9-.7 7.8-.7 11.9c0 53 43 96 96 96s96-43 96-96s-43-96-96-96c-25.9 0-49.4 10.2-66.6 26.9l-94.1-47c.5-3.9 .7-7.8 .7-11.9s-.2-8-.7-11.9l94.1-47C302.6 213.8 326.1 224 352 224z";Rn.DF={prefix:"fas",iconName:or,icon:[448,512,So,To,Ro]},Rn.M6=Rn.DF},4470:(C,Rn)=>{"use strict";var or="sliders",So=["sliders-h"],To="f1de",Ro="M0 416c0 17.7 14.3 32 32 32l54.7 0c12.3 28.3 40.5 48 73.3 48s61-19.7 73.3-48L480 448c17.7 0 32-14.3 32-32s-14.3-32-32-32l-246.7 0c-12.3-28.3-40.5-48-73.3-48s-61 19.7-73.3 48L32 384c-17.7 0-32 14.3-32 32zm128 0a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zM320 256a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm32-80c-32.8 0-61 19.7-73.3 48L32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l246.7 0c12.3 28.3 40.5 48 73.3 48s61-19.7 73.3-48l54.7 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-54.7 0c-12.3-28.3-40.5-48-73.3-48zM192 128a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm73.3-64C253 35.7 224.8 16 192 16s-61 19.7-73.3 48L32 64C14.3 64 0 78.3 0 96s14.3 32 32 32l86.7 0c12.3 28.3 40.5 48 73.3 48s61-19.7 73.3-48L480 128c17.7 0 32-14.3 32-32s-14.3-32-32-32L265.3 64z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.cR=Rn.DF},6580:(C,Rn)=>{"use strict";var or="square-rss",So=["rss-square"],To="f143",Ro="M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zM96 136c0-13.3 10.7-24 24-24c137 0 248 111 248 248c0 13.3-10.7 24-24 24s-24-10.7-24-24c0-110.5-89.5-200-200-200c-13.3 0-24-10.7-24-24zm0 96c0-13.3 10.7-24 24-24c83.9 0 152 68.1 152 152c0 13.3-10.7 24-24 24s-24-10.7-24-24c0-57.4-46.6-104-104-104c-13.3 0-24-10.7-24-24zm0 120a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z";Rn.DF={prefix:"fas",iconName:or,icon:[448,512,So,To,Ro]},Rn.mW=Rn.DF},8381:(C,Rn)=>{"use strict";var or="triangle-exclamation",So=[9888,"exclamation-triangle","warning"],To="f071",Ro="M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z";Rn.DF={prefix:"fas",iconName:or,icon:[512,512,So,To,Ro]},Rn.ik=Rn.DF},3299:(C,Rn)=>{"use strict";var or="user",So=[128100,62144],To="f007",Ro="M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512H418.3c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304H178.3z";Rn.DF={prefix:"fas",iconName:or,icon:[448,512,So,To,Ro]},Rn.IL=Rn.DF},6899:(C,Rn)=>{"use strict";var or="xmark",So=[128473,10005,10006,10060,215,"close","multiply","remove","times"],To="f00d",Ro="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z";Rn.DF={prefix:"fas",iconName:or,icon:[384,512,So,To,Ro]},Rn.g8=Rn.DF},3114:(C,Rn,or)=>{"use strict";or.d(Rn,{$N:()=>Hh,AE:()=>im,F6:()=>ep,Il:()=>Eh,Of:()=>Sp,P6:()=>Yu,U3:()=>Gh,Yc:()=>Mp,k8:()=>op,rq:()=>ap,tl:()=>Ro,we:()=>ip});var So=or(7760),To=Object.defineProperty,__export=(C,Rn)=>{for(var or in Rn)To(C,or,{get:Rn[or],enumerable:!0})},Ro={};
13
13
  /*!
14
14
  * Photo Sphere Viewer 5.10.0
15
15
  * @copyright 2014-2015 Jérémy Heleine
package/docs/02_Usage.md CHANGED
@@ -15,7 +15,7 @@
15
15
 
16
16
  **Extends EventTarget**
17
17
 
18
- Core view is an abstract class used for setting up any of the main Panoramax view components.
18
+ Core view is an abstract class used for setting up any of the main Panoramax JS view components.
19
19
 
20
20
  It is used to prepare API, internationalization, options checks... for Viewer, StandaloneMap and Editor classes.
21
21
 
@@ -41,6 +41,13 @@ It is used to prepare API, internationalization, options checks... for Viewer, S
41
41
  * `_options` **[object][12]** The stored options
42
42
  * `container` **[Element][10]** The DOM container
43
43
 
44
+ ### getClassName
45
+
46
+ This allows to retrieve an always correct class name.
47
+ This is crap, but avoids issues with Webpack & so on.
48
+
49
+ Each inheriting class must override this method.
50
+
44
51
  ### destroy
45
52
 
46
53
  Ends all form of life in this object.
@@ -453,6 +460,16 @@ Changes the duration of stay on a picture during a sequence play.
453
460
 
454
461
  * `value` **[number][17]** The new duration (in milliseconds, between 100 and 3000)
455
462
 
463
+ ### showErrorOverlay
464
+
465
+ Display an error message to user on screen
466
+
467
+ #### Parameters
468
+
469
+ * `e` **[object][12]** The initial error
470
+ * `label` **str** The main error label to display
471
+ * `dissmisable` **[boolean][16]** Is error dissmisable
472
+
456
473
  ## Editor
457
474
 
458
475
  **Extends CoreView**
@@ -545,7 +562,7 @@ Returns **[object][12]** Object like {"id", "name"} or null if no authenticated
545
562
 
546
563
  **Extends CoreView**
547
564
 
548
- Viewer is the main component of the library, showing pictures and map.
565
+ Viewer is the main component of Panoramax JS library, showing pictures and map.
549
566
 
550
567
  Note that you can use any of the [CoreView][25] class functions as well.
551
568
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panoramax/web-viewer",
3
- "version": "3.0.2-develop-a8ea8e60-develop-ac07ac0a",
3
+ "version": "3.0.2-develop-a8ea8e60-develop-10c06f44",
4
4
  "description": "Panoramax web viewer for geolocated pictures",
5
5
  "main": "build/index.js",
6
6
  "author": "Panoramax team",