diff --git a/angular.json b/angular.json index 784b4bfa7ca88a2a78e1fd36326e8fdff642cc8c..fb9aca5e0d7968287e9a663004949bd1b17cb75f 100644 --- a/angular.json +++ b/angular.json @@ -37,9 +37,15 @@ }, { "input": "src/global.scss" - } + }, + "src/assets/js/mapsjs-ui.css" ], - "scripts": [] + "scripts": [ + "./src/assets/js/mapsjs-core.js", + "./src/assets/js/mapsjs-mapevents.js", + "./src/assets/js/mapsjs-service.js", + "./src/assets/js/mapsjs-ui.js" + ] }, "configurations": { "production": { diff --git a/config.xml b/config.xml index de828b65d279cc8db905ea3a97cdeda72b235766..92d75afda32fe4cdb28821b00035400b010c43e5 100644 --- a/config.xml +++ b/config.xml @@ -1,6 +1,6 @@ - MyApp + AWADO An awesome Ionic/Cordova app. Ionic Framework Team diff --git a/src/app/auth/login/login.page.ts b/src/app/auth/login/login.page.ts index 74b06ec96280b621d660c3ae335893f18575065f..3435cc7954c3c5e525e0ffc4a3a1db81ded71d8e 100644 --- a/src/app/auth/login/login.page.ts +++ b/src/app/auth/login/login.page.ts @@ -1,11 +1,13 @@ import { Component, OnInit } from '@angular/core'; -import { Router } from '@angular/router'; +import { Router, LoadChildrenCallback } from '@angular/router'; import { Observable } from 'rxjs'; import { HttpClient } from '@angular/common/http'; import { RestService } from '../../rest.service'; import { UserService } from 'src/app/services/user.service'; +import { LocationService } from 'src/app/services/location.service'; +import { LoadingService } from 'src/app/services/loading.service'; @Component({ selector: 'app-login', @@ -15,12 +17,15 @@ import { UserService } from 'src/app/services/user.service'; export class LoginPage implements OnInit { username = ""; password = ""; - //username = ""; - //password = ""; correctCredentials = false; loginApi: Observable; - constructor(private router: Router, public httpClient: HttpClient, public restService: RestService,public userService: UserService) { + constructor(private router: Router, + public httpClient: HttpClient, + public restService: RestService, + public userService: UserService, + public locationService: LocationService, + public loadingService: LoadingService) { } @@ -37,6 +42,7 @@ export class LoginPage implements OnInit { "email": this.username, "password": this.password }); + this.loadingService.showLoader(); this.loginApi .subscribe((data) => { //console.log('my data: ', data); @@ -44,9 +50,11 @@ export class LoginPage implements OnInit { this.restService.isLoginPage = false; this.userService.setUsername(this.username); this.router.navigateByUrl('/home'); + this.loadingService.hideLoader(); }, (error) => { console.log(JSON.stringify(error)); this.correctCredentials = true; + this.loadingService.hideLoader(); }); } register() { diff --git a/src/app/components/here-map/here-map.component.html b/src/app/components/here-map/here-map.component.html index cb232138cc58e375f6693bb7a2bd52bd639f5747..e1ac575cf00a433154f4aa7ad4301d5f2d7e391a 100644 --- a/src/app/components/here-map/here-map.component.html +++ b/src/app/components/here-map/here-map.component.html @@ -1,6 +1,6 @@
- - - - - \ No newline at end of file + + + + + \ No newline at end of file diff --git a/src/app/components/here-map/here-map.component.ts b/src/app/components/here-map/here-map.component.ts index bfc6bf92e2cf3fd61fae3cfbed50ec8f0e179176..3553b68fcfe596e2ee8f21ba35833e3c566c663c 100644 --- a/src/app/components/here-map/here-map.component.ts +++ b/src/app/components/here-map/here-map.component.ts @@ -104,7 +104,7 @@ export class HereMapComponent implements OnInit { // needed if child gets re-created (eg on some model changes) // note that subsequent subscriptions on the same subject will fail // so the parent has to re-create parentSubject on changes - this.startRideSubject.unsubscribe(); + //this.startRideSubject.unsubscribe(); } onSuccess(result) { diff --git a/src/app/hirebike/hirebike.page.html b/src/app/hirebike/hirebike.page.html index a3a2cae519b9ddde3c3abe4d6703c642377b9418..f751de63af63648306a7f490a048a421954c5574 100644 --- a/src/app/hirebike/hirebike.page.html +++ b/src/app/hirebike/hirebike.page.html @@ -19,7 +19,13 @@ - + +
+ + + + +
diff --git a/src/app/hirebike/hirebike.page.ts b/src/app/hirebike/hirebike.page.ts index bd3f9bc6ec06b939e2ff604c95c499a0a06994ae..8b73db8ef25546f88eb7dff4a7415c169f8561b0 100644 --- a/src/app/hirebike/hirebike.page.ts +++ b/src/app/hirebike/hirebike.page.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, ViewChild, ElementRef } from '@angular/core'; +import { Component, OnInit, ViewChild, ElementRef, Input } from '@angular/core'; import { Geolocation } from '@ionic-native/geolocation/ngx'; import { RestService } from '../rest.service'; @@ -8,6 +8,8 @@ import { Storage } from '@ionic/storage'; import { ToastService } from '../services/toast.service'; import { Router } from '@angular/router'; import { MapDataService } from '../services/map-data.service'; +import { LocationService } from '../services/location.service'; +import { LoadingService } from '../services/loading.service'; declare var H: any; @Component({ @@ -33,16 +35,71 @@ export class HirebikePage implements OnInit { gotReservedBikeSubject: Subject = new Subject(); maneuverList: any = []; + @ViewChild("mapElement", { static: false }) + public mapElement: ElementRef; + + private map: any; + private ui: any; + private defaultLayers: any; + private locationsGroup: any; + + private currentUserPosition = { lat: 48.783480, lng: 9.180319 }; + private bikePosition = { lat: 48.783480, lng: 9.180319 }; + private destinationPosition = { lat: 48.783480, lng: 9.180319 }; + + public currentLocationMarker: any; + public destinationMarker: any; + + public rideStarted = false; + constructor(private geolocation: Geolocation, public restService: RestService, public httpClient: HttpClient, private storage: Storage, private toastService: ToastService, private router: Router, - private mapDataService: MapDataService) { + private mapDataService: MapDataService, + public locationService: LocationService, + public loadingService: LoadingService) { + this.platform = new H.service.Platform({ 'apikey': 'tiVTgBnPbgV1spie5U2MSy-obhD9r2sGiOCbBzFY2_k' }); + } + + ngOnInit() { + + } + + ngAfterViewInit() { + window.addEventListener('resize', () => this.map.getViewPort().resize()); + } + + ionViewWillEnter() { + this.currentUserPosition.lat = this.locationService.currentUserPosition.lat; + this.currentUserPosition.lng = this.locationService.currentUserPosition.lng; + + this.initializeMap(); + + //get user location + if (this.currentLocationMarker) { + this.currentLocationMarker.setGeometry({ lat: this.currentUserPosition.lat, lng: this.currentUserPosition.lng }) + } else { + this.showUserLocationOnMap(this.currentUserPosition.lat, this.currentUserPosition.lng); + } + + this.locationService.liveLocationSubject.subscribe((position) => { + console.log('got location inside home subscription'); + this.currentUserPosition.lat = position.lat; + this.currentUserPosition.lng = position.lng; + if (this.currentLocationMarker) { + this.currentLocationMarker.setGeometry({ lat: this.currentUserPosition.lat, lng: this.currentUserPosition.lng }) + } else { + this.showUserLocationOnMap(this.currentUserPosition.lat, this.currentUserPosition.lng); + } + }); + this.getReservedBike(); + this.mapDataService.mapDataSubject.subscribe(receiveddata => { console.log('data received '); console.log(receiveddata); @@ -58,14 +115,34 @@ export class HirebikePage implements OnInit { } this.wayPointsInfo = waypointLabels.join(' - '); }); - } - ngOnInit() { - this.getReservedBike(); - } + this.gotReservedBikeSubject.subscribe(bikeDetails => { + console.log('Got Bike in map'); + console.log(bikeDetails); + this.bikePosition.lat = bikeDetails.lat; + this.bikePosition.lng = bikeDetails.lon; + var img = ['../../../assets/images/100_percent.png', '../../../assets/images/75_percent.png', '../../../assets/images/50_percent.png', '../../../assets/images/25_percent.png', '../../../assets/images/0_percent.png']; + if (bikeDetails.batteryPercentage < 100 && bikeDetails.batteryPercentage >= 75) { + this.addMarker(Number(bikeDetails.lat), Number(bikeDetails.lon), img[0]); + } + else if (bikeDetails.batteryPercentage < 75 && bikeDetails.batteryPercentage >= 50) { + this.addMarker(Number(bikeDetails.lat), Number(bikeDetails.lon), img[1]); + } + else if (bikeDetails.batteryPercentage < 50 && bikeDetails.batteryPercentage >= 25) { + this.addMarker(Number(bikeDetails.lat), Number(bikeDetails.lon), img[2]); + } else if (bikeDetails.batteryPercentage < 25 && bikeDetails.batteryPercentage >= 0) { + this.addMarker(Number(bikeDetails.lat), Number(bikeDetails.lon), img[3]); + } - ngAfterViewInit() { + this.setZoomLevelToPointersGroup(); + }); + this.startRideSubject.subscribe(event => { + console.log('start ride'); + //remove event listener + this.rideStarted = true; + this.calculateRoute(); + }); } showRouteInfoPanel(route) { @@ -76,17 +153,6 @@ export class HirebikePage implements OnInit { // Get the next maneuver. let maneuver = route.leg[i].maneuver[j]; maneuverList.push(maneuver); - - // var li = document.createElement('li'), - // spanArrow = document.createElement('span'), - // spanInstruction = document.createElement('span'); - - // spanArrow.className = 'arrow ' + maneuver.action; - // spanInstruction.innerHTML = maneuver.instruction; - // li.appendChild(spanArrow); - // li.appendChild(spanInstruction); - - // nodeOL.appendChild(li); } } @@ -94,6 +160,7 @@ export class HirebikePage implements OnInit { } getReservedBike() { + this.loadingService.showLoader(); this.storage.get('token').then((token) => { const headers = new HttpHeaders().set("Authorization", "Bearer " + token); //call reserved bike api @@ -115,9 +182,16 @@ export class HirebikePage implements OnInit { //pass reserved bike subject here map this.gotReservedBikeSubject.next(resp.data); - }, (reservedBikeError) => console.log(reservedBikeError)); + this.loadingService.hideLoader(); + }, (reservedBikeError) => { + console.log(reservedBikeError); + this.loadingService.hideLoader(); + }); } - }, (bikeDetailsError) => console.log(bikeDetailsError)); + }, (bikeDetailsError) => { + console.log(bikeDetailsError); + this.loadingService.hideLoader(); + }); }); } @@ -128,11 +202,13 @@ export class HirebikePage implements OnInit { let bikeApi = this.httpClient.get(url, { headers }); bikeApi.subscribe((resp) => { console.log('my data: ', resp); + this.loadingService.hideLoader(); this.toastService.showToast("Trip Started"); this.isBikeHired = true; }, (error) => { - console.log(error) - this.toastService.showToast("This is ongoing Trip") + console.log(error); + this.loadingService.hideLoader(); + this.toastService.showToast("This is ongoing Trip"); }); }); @@ -144,19 +220,307 @@ export class HirebikePage implements OnInit { } CancelTrip() { + this.loadingService.showLoader(); this.storage.get('token').then((token) => { let url = 'http://193.196.52.237:8081/rent' + '?bikeId=' + this.bikeDetails.id; const headers = new HttpHeaders().set("Authorization", "Bearer " + token); let bikeApi = this.httpClient.delete(url, { headers }); bikeApi.subscribe((resp) => { console.log('my data: ', resp); + this.loadingService.hideLoader(); this.toastService.showToast("Trip Ended!"); }, (error) => { - console.log(error) + console.log(error); + this.loadingService.hideLoader(); this.toastService.showToast("No Ongong Trip to End") }); }); } + + ngOnDestroy() { + // needed if child gets re-created (eg on some model changes) + // note that subsequent subscriptions on the same subject will fail + // so the parent has to re-create parentSubject on changes + //this.startRideSubject.unsubscribe(); + } + + onSuccess(result) { + var route = result.response.route[0]; + /* + * The styling of the route response on the map is entirely under the developer's control. + * A representitive styling can be found the full JS + HTML code of this example + * in the functions below: + */ + this.addRouteShapeToMap(route); + this.addManueversToMap(route); + this.mapDataService.mapDataSubject.next(route); + + //addWaypointsToPanel(route.waypoint); + //addManueversToPanel(route); + //addSummaryToPanel(route.summary); + } + + /** + * This function will be called if a communication error occurs during the JSON-P request + * @param {Object} error The error message received. + */ + onError(error) { + alert('Can\'t reach the remote server'); + } + + bubble; + + /** + * Opens/Closes a infobubble + * @param {H.geo.Point} position The location on the map. + * @param {String} text The contents of the infobubble. + */ + openBubble(position, text) { + if (!this.bubble) { + this.bubble = new H.ui.InfoBubble( + position, + // The FO property holds the province name. + { content: text }); + this.ui.addBubble(this.bubble); + } else { + this.bubble.setPosition(position); + this.bubble.setContent(text); + this.bubble.open(); + } + } + + /** + * Creates a H.map.Polyline from the shape of the route and adds it to the map. + * @param {Object} route A route as received from the H.service.RoutingService + */ + addRouteShapeToMap(route) { + var lineString = new H.geo.LineString(), + routeShape = route.shape, + polyline; + + routeShape.forEach(function (point) { + var parts = point.split(','); + lineString.pushLatLngAlt(parts[0], parts[1]); + }); + + polyline = new H.map.Polyline(lineString, { + style: { + lineWidth: 4, + strokeColor: 'rgba(0, 128, 255, 0.7)' + } + }); + // Add the polyline to the map + this.map.addObject(polyline); + // And zoom to its bounding rectangle + this.map.getViewModel().setLookAtData({ + bounds: polyline.getBoundingBox() + }); + } + + /** + * Creates a series of H.map.Marker points from the route and adds them to the map. + * @param {Object} route A route as received from the H.service.RoutingService + */ + addManueversToMap(route) { + var svgMarkup = '' + + '' + + '', + dotIcon = new H.map.Icon(svgMarkup, { anchor: { x: 8, y: 8 } }), + group = new H.map.Group() + var group = new H.map.Group(); + + // Add a marker for each maneuver + for (let i = 0; i < route.leg.length; i += 1) { + for (let j = 0; j < route.leg[i].maneuver.length; j += 1) { + // Get the next maneuver. + var maneuver = route.leg[i].maneuver[j]; + // Add a marker to the maneuvers group + var marker = new H.map.Marker({ + lat: maneuver.position.latitude, + lng: maneuver.position.longitude + }, + { icon: dotIcon }); + marker.instruction = maneuver.instruction; + group.addObject(marker); + } + } + + group.addEventListener('tap', (evt) => { + this.map.setCenter(evt.target.getGeometry()); + this.openBubble( + evt.target.getGeometry(), evt.target.instruction); + }, false); + + // Add the maneuvers group to the map + this.map.addObject(group); + } + + calculateRoute() { + var waypoint0 = this.bikePosition.lat + ',' + this.bikePosition.lng; + var waypoint1 = this.destinationPosition.lat + ',' + this.destinationPosition.lng; + var router = this.platform.getRoutingService(), + routeRequestParams = { + mode: 'fastest;bicycle', + representation: 'display', + routeattributes: 'waypoints,summary,shape,legs', + maneuverattributes: 'direction,action', + waypoint0: waypoint0, // Brandenburg Gate + waypoint1: waypoint1 // Friedrichstraße Railway Station + }; + + router.calculateRoute( + routeRequestParams, + this.onSuccess.bind(this), + this.onError.bind(this) + ); + } + + + initializeMap() { + // Obtain the default map types from the platform object + this.defaultLayers = this.platform.createDefaultLayers(); + this.map = new H.Map( + this.mapElement.nativeElement, + this.defaultLayers.raster.normal.map, + { + center: { lat: this.locationService.preiousUserPosition.lat, lng: this.locationService.preiousUserPosition.lng }, + zoom: 17, + pixelRatio: window.devicePixelRatio || 1 + } + ); + + var behavior = new H.mapevents.Behavior(new H.mapevents.MapEvents(this.map)); + this.ui = H.ui.UI.createDefault(this.map, this.defaultLayers); + this.ui.removeControl("mapsettings"); + // create custom map settings (icons on map) + var customMapSettings = new H.ui.MapSettingsControl({ + baseLayers: [ + { + label: "3D", layer: this.defaultLayers.vector.normal.map + }, { + label: "Normal", layer: this.defaultLayers.raster.normal.map + }, { + label: "Satellite", layer: this.defaultLayers.raster.satellite.map + }, { + label: "Terrain", layer: this.defaultLayers.raster.terrain.map + } + ], + layers: [ + { + label: "layer.traffic", layer: this.defaultLayers.vector.normal.traffic + }, + { + label: "layer.incidents", layer: this.defaultLayers.vector.normal.trafficincidents + } + ] + }); + this.ui.addControl("custom-mapsettings", customMapSettings); + var mapSettings = this.ui.getControl('custom-mapsettings'); + var zoom = this.ui.getControl('zoom'); + mapSettings.setAlignment('top-right'); + zoom.setAlignment('right-top'); + + this.map.getViewPort().setPadding(30, 30, 30, 30); + + // Listen for base layer change event (eg. from satellite to 3D) + this.map.addEventListener('baselayerchange', (evt) => { + let mapConfig = this.map.getBaseLayer().getProvider().getStyleInternal().getConfig(); + if (mapConfig === null || (mapConfig && mapConfig.sources && mapConfig.sources.omv)) { + this.map.getViewModel().setLookAtData({ tilt: 60 }); + } else { + this.map.getViewModel().setLookAtData({ tilt: 0 }); + } + }); + + // listen for map click event + this.map.addEventListener('tap', this.mapClickedEvent.bind(this)); + + if(!this.locationsGroup) { + this.locationsGroup = new H.map.Group(); + } + this.map.addObject(this.locationsGroup); + } + + mapClickedEvent(event) { + if(this.rideStarted) { + return; + } + //console.log(event.type, event.currentPointer.type); + var coord = this.map.screenToGeo(event.currentPointer.viewportX, + event.currentPointer.viewportY); + console.log(coord.lat + ', ' + coord.lng); + + this.destinationPosition = { lat: coord.lat, lng: coord.lng }; + + if (this.destinationMarker) { + this.destinationMarker.setGeometry({ lat: coord.lat, lng: coord.lng }) + } else { + let icon = new H.map.Icon('../../../assets/images/current_location.png'); + // Create a marker using the previously instantiated icon: + this.destinationMarker = new H.map.Marker({ lat: coord.lat, lng: coord.lng }, { icon: icon }); + // Add the marker to the map: + if(!this.locationsGroup) { + this.locationsGroup = new H.map.Group(); + } + this.locationsGroup.addObjects([this.destinationMarker]); + this.setZoomLevelToPointersGroup(); + } + } + + //TODO change this logic + getCurrentPosition() { + if (!this.currentLocationMarker) { + this.showUserLocationOnMap(this.currentUserPosition.lat, this.currentUserPosition.lng); + } + this.map.setZoom(17); + this.map.setCenter({ lat: this.currentUserPosition.lat, lng: this.currentUserPosition.lng }); + } + + setZoomLevelToPointersGroup() { + this.map.getViewModel().setLookAtData({ + bounds: this.locationsGroup.getBoundingBox() + }); + } + + showUserLocationOnMap(lat, lng) { + let svgMarkup = '' + + '' + + ''; + let icon = new H.map.Icon(svgMarkup); + //let icon = new H.map.Icon('../../../assets/images/current_location.png'); + // Create a marker using the previously instantiated icon: + this.currentLocationMarker = new H.map.Marker({ lat: lat, lng: lng }, { icon: icon }); + // Add the marker to the map: + if(!this.locationsGroup) { + this.locationsGroup = new H.map.Group(); + } + this.locationsGroup.addObjects([this.currentLocationMarker]); + this.setZoomLevelToPointersGroup(); + + //this.map.addObject(marker); + //this.map.setCenter({ lat: lat, lng: lng }); + } + + addMarker(lat, lng, img) { + var icon = new H.map.Icon(img); + // Create a marker using the previously instantiated icon: + var marker = new H.map.Marker({ lat: lat, lng: lng }, { icon: icon }); + // Add the marker to the map: + //this.map.addObject(marker); + if(!this.locationsGroup) { + this.locationsGroup = new H.map.Group(); + } + this.locationsGroup.addObjects([marker]); + } + + enable3DMaps() { + this.map.setBaseLayer(this.defaultLayers.vector.normal.map); + } + reverseGeocode(platform, lat, lng) { var prox = lat + ',' + lng + ',56'; var geocoder = platform.getGeocodingService(), @@ -168,14 +532,11 @@ export class HirebikePage implements OnInit { }; geocoder.reverseGeocode(parameters, result => { - console.log(result); var streets = result.Response.View[0].Result[0].Location.Address.Street; var houseNumber = result.Response.View[0].Result[0].Location.Address.HouseNumber; var zipcode = result.Response.View[0].Result[0].Location.Address.PostalCode; - this.address = streets; - - + return streets + houseNumber + zipcode; }, (error) => { alert(error); }); diff --git a/src/app/home/home.page.ts b/src/app/home/home.page.ts index c5b2f4d4801efc94e8a980c1313f5674ac81a00a..660564dfa0b8cad15969a7e2a036bb7cef979c69 100644 --- a/src/app/home/home.page.ts +++ b/src/app/home/home.page.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, ViewChild, ElementRef } from '@angular/core'; +import { Component, OnInit, ViewChild, ElementRef, OnDestroy } from '@angular/core'; import { Geolocation } from '@ionic-native/geolocation/ngx'; import { RestService } from '../rest.service'; import { Observable } from 'rxjs'; @@ -6,6 +6,8 @@ import { HttpClient, HttpHeaders } from '@angular/common/http'; import { Storage } from '@ionic/storage'; import { ToastService } from '../services/toast.service'; import { Router } from '@angular/router'; +import { LocationService } from '../services/location.service'; +import { LoadingService } from '../services/loading.service'; declare var H: any; @@ -15,12 +17,12 @@ declare var H: any; styleUrls: ['home.page.scss'], }) -export class HomePage implements OnInit { +export class HomePage implements OnInit, OnDestroy { private platform: any; private map: any; private defaultLayers: any; private locationsGroup: any; - private currentUserPosition = {lat: 48.783480, lng: 9.180319}; + private currentUserPosition = { lat: 48.783480, lng: 9.180319 }; bikes = []; bikeApi: Observable; @@ -39,35 +41,43 @@ export class HomePage implements OnInit { public restService: RestService, public httpClient: HttpClient, private storage: Storage, - private toastService: ToastService) { + private toastService: ToastService, + public locationService: LocationService, + public loadingService: LoadingService) { this.platform = new H.service.Platform({ 'apikey': 'tiVTgBnPbgV1spie5U2MSy-obhD9r2sGiOCbBzFY2_k' }); - - let watch = this.geolocation.watchPosition({ enableHighAccuracy: true, maximumAge: 10000 }); - watch.subscribe((position) => { - console.log(position.coords.latitude); - console.log(position.coords.longitude); - this.currentUserPosition.lat = position.coords.latitude; - this.currentUserPosition.lng = position.coords.longitude; - this.currentLocationMarker.setGeometry( {lat:position.coords.latitude, lng:position.coords.longitude}) - }, (errorObj) => { - console.log(errorObj.code + ": " + errorObj.message); - }); } ngOnInit() { } ngAfterViewInit() { - this.initializeMap(); window.addEventListener('resize', () => this.map.getViewPort().resize()); - setTimeout(() => { - window.dispatchEvent(new Event('resize')); - },100); - this.getUserLocation(); + } + + ionViewWillEnter() { + this.currentUserPosition.lat = this.locationService.currentUserPosition.lat; + this.currentUserPosition.lng = this.locationService.currentUserPosition.lng; + this.initializeMap(); + if (this.currentLocationMarker) { + this.currentLocationMarker.setGeometry({ lat: this.currentUserPosition.lat, lng: this.currentUserPosition.lng }) + } else { + this.showUserLocationOnMap(this.currentUserPosition.lat, this.currentUserPosition.lng); + } this.getBikesList(); + + this.locationService.liveLocationSubject.subscribe((position) => { + console.log('got location inside home subscription'); + this.currentUserPosition.lat = position.lat; + this.currentUserPosition.lng = position.lng; + if (this.currentLocationMarker) { + this.currentLocationMarker.setGeometry({ lat: this.currentUserPosition.lat, lng: this.currentUserPosition.lng }) + } else { + this.showUserLocationOnMap(this.currentUserPosition.lat, this.currentUserPosition.lng); + } + }); } initializeMap() { @@ -77,6 +87,7 @@ export class HomePage implements OnInit { this.mapElement.nativeElement, this.defaultLayers.raster.normal.map, { + center: { lat: this.locationService.preiousUserPosition.lat, lng: this.locationService.preiousUserPosition.lng }, zoom: 17, pixelRatio: window.devicePixelRatio || 1 } @@ -126,7 +137,7 @@ export class HomePage implements OnInit { }); // listen for map click event - this.map.addEventListener('tap', (event) =>{ + this.map.addEventListener('tap', (event) => { console.log(event.type, event.currentPointer.type); }); @@ -134,34 +145,22 @@ export class HomePage implements OnInit { } getBikesList() { - this.geolocation.getCurrentPosition({ - maximumAge: 1000, timeout: 4000, - enableHighAccuracy: true - }).then((resp) => { - let lat = resp.coords.latitude; - let lng = resp.coords.longitude; - - this.currentUserPosition.lat = resp.coords.latitude; - this.currentUserPosition.lng = resp.coords.longitude; - - this.storage.get('token').then((token) => { - let url = 'http://193.196.52.237:8081/bikes' + '?lat=' + lat + '&lng=' + lng; - const headers = new HttpHeaders().set("Authorization", "Bearer " + token); - this.bikeApi = this.httpClient.get(url, { headers }); - this.bikeApi.subscribe((resp) => { - console.log("bikes response", resp); - this.bikes = resp; - for (let i = 0; i < this.bikes.length; i++) { - this.bikes[i].distance = this.bikes[i].distance.toFixed(2);; - this.reverseGeocode(this.platform, this.bikes[i].lat, this.bikes[i].lon, i); - } - this.showBikesOnMap(); - }, (error) => console.log(error)); - }); - }, er => { - //alert('Can not retrieve location'); - }).catch((error) => { - //alert('Error getting location - ' + JSON.stringify(error)); + this.loadingService.showLoader(); + this.storage.get('token').then((token) => { + let url = 'http://193.196.52.237:8081/bikes' + '?lat=' + this.currentUserPosition.lat + '&lng=' + this.currentUserPosition.lng; + const headers = new HttpHeaders().set("Authorization", "Bearer " + token); + this.bikeApi = this.httpClient.get(url, { headers }); + this.bikeApi.subscribe((resp) => { + console.log("bikes response", resp); + this.bikes = resp; + for (let i = 0; i < this.bikes.length; i++) { + this.bikes[i].distance = this.bikes[i].distance.toFixed(2);; + this.reverseGeocode(this.platform, this.bikes[i].lat, this.bikes[i].lon, i); + } + this.showBikesOnMap(); + this.loadingService.hideLoader(); + }, (error) => {console.log(error) + this.loadingService.hideLoader();}); }); } @@ -181,7 +180,7 @@ export class HomePage implements OnInit { } } - this.map.addObject(this.locationsGroup); + //this.map.addObject(this.locationsGroup); this.setZoomLevelToPointersGroup(); } @@ -197,39 +196,19 @@ export class HomePage implements OnInit { }); } - getUserLocation() { - this.geolocation.getCurrentPosition( - { - maximumAge: 1000, timeout: 4000, - enableHighAccuracy: true - } - ).then((resp) => { - let lat = resp.coords.latitude; - let lng = resp.coords.longitude; - this.currentUserPosition.lat = resp.coords.latitude; - this.currentUserPosition.lng = resp.coords.longitude; - this.showUserLocationOnMap(lat, lng); - }, er => { - //alert('Can not retrieve Location') - this.showUserLocationOnMap(this.currentUserPosition.lat, this.currentUserPosition.lng); - }).catch((error) => { - this.showUserLocationOnMap(this.currentUserPosition.lat, this.currentUserPosition.lng); - //alert('Error getting location - ' + JSON.stringify(error)) - }); - } - showUserLocationOnMap(lat, lng) { let svgMarkup = '' + - '' + + '' + - ''; + ''; let icon = new H.map.Icon(svgMarkup); //let icon = new H.map.Icon('../../../assets/images/current_location.png'); // Create a marker using the previously instantiated icon: this.currentLocationMarker = new H.map.Marker({ lat: lat, lng: lng }, { icon: icon }); // Add the marker to the map: this.locationsGroup.addObjects([this.currentLocationMarker]); + this.map.addObject(this.locationsGroup); this.setZoomLevelToPointersGroup(); //this.map.addObject(marker); @@ -281,6 +260,7 @@ export class HomePage implements OnInit { reserveBike() { //this.selectedBike=bikeS; + this.loadingService.showLoader(); this.storage.get('token').then((token) => { let url = 'http://193.196.52.237:8081/reservation' + '?bikeId=' + this.selectedBike.id; const headers = new HttpHeaders().set("Authorization", "Bearer " + token); @@ -290,11 +270,17 @@ export class HomePage implements OnInit { this.isBikeReserved = true; this.toastService.showToast("Reservation Successful!"); this.router.navigateByUrl('/myreservation'); + this.loadingService.hideLoader(); }, (error) => { - console.log(error) - this.toastService.showToast("Only one bike may be reserved or rented at a time") + console.log(error); + this.loadingService.hideLoader(); + this.toastService.showToast("Only one bike may be reserved or rented at a time"); }); }); } + ngOnDestroy(){ + //this.locationService.liveLocationSubject.unsubscribe(); + } + } diff --git a/src/app/myreservation/myreservation.page.html b/src/app/myreservation/myreservation.page.html index 341a202a6357ecb6e2ba3cd924f9754ddf036445..dc8c4e3bec0ef53bf1923041f387c15044ed5ada 100644 --- a/src/app/myreservation/myreservation.page.html +++ b/src/app/myreservation/myreservation.page.html @@ -10,16 +10,21 @@ - + No reservation found -
+
+ + + + +
-
+
diff --git a/src/app/myreservation/myreservation.page.ts b/src/app/myreservation/myreservation.page.ts index b0a6ec302bb10925d3d50e09dfac88bfe6c8e826..899d0539e80c1453432060836f553a338ecd5d5b 100644 --- a/src/app/myreservation/myreservation.page.ts +++ b/src/app/myreservation/myreservation.page.ts @@ -7,6 +7,8 @@ import { HttpClient, HttpHeaders } from '@angular/common/http'; import { Storage } from '@ionic/storage'; import { ToastService } from '../services/toast.service'; import { Router } from '@angular/router'; +import { LocationService } from '../services/location.service'; +import { LoadingService } from '../services/loading.service'; declare var H: any; @@ -20,14 +22,18 @@ export class MyreservationPage implements OnInit { private map: any; // Get an instance of the routing service: private mapRouter: any; + private ui: any; + private defaultLayers: any; reservedBike: any = {}; bikeDetails: any = {}; isBikeHired = false; - address="sample"; - noReservation = true; + address = "sample"; + isBikeReserved = true; - private currentLocation = { lat: 0, lng: 0 }; + private currentUserPosition = { lat: 48.783480, lng: 9.180319 }; + + public currentLocationMarker: any; // Create the parameters for the routing request: private routingParameters = { @@ -50,7 +56,9 @@ export class MyreservationPage implements OnInit { public httpClient: HttpClient, private storage: Storage, private toastService: ToastService, - private router: Router) { + private router: Router, + public locationService: LocationService, + public loadingService: LoadingService) { this.platform = new H.service.Platform({ 'apikey': 'tiVTgBnPbgV1spie5U2MSy-obhD9r2sGiOCbBzFY2_k' }); @@ -58,14 +66,72 @@ export class MyreservationPage implements OnInit { } ngOnInit() { - this.getReservedBike(); + } ngAfterViewInit() { } + ionViewWillEnter() { + this.currentUserPosition.lat = this.locationService.currentUserPosition.lat; + this.currentUserPosition.lng = this.locationService.currentUserPosition.lng; + + this.loadmap(); + + if (this.currentLocationMarker) { + this.currentLocationMarker.setGeometry({ lat: this.currentUserPosition.lat, lng: this.currentUserPosition.lng }) + } else { + this.showUserLocationOnMap(this.currentUserPosition.lat, this.currentUserPosition.lng); + } + + this.getReservedBike(); + + this.locationService.liveLocationSubject.subscribe((position) => { + console.log('got location inside home subscription'); + this.currentUserPosition.lat = position.lat; + this.currentUserPosition.lng = position.lng; + if (this.currentLocationMarker) { + this.currentLocationMarker.setGeometry({ lat: this.currentUserPosition.lat, lng: this.currentUserPosition.lng }) + } else { + this.showUserLocationOnMap(this.currentUserPosition.lat, this.currentUserPosition.lng); + } + }); + } + + showUserLocationOnMap(lat, lng) { + let svgMarkup = '' + + '' + + ''; + let icon = new H.map.Icon(svgMarkup); + //let icon = new H.map.Icon('../../../assets/images/current_location.png'); + // Create a marker using the previously instantiated icon: + this.currentLocationMarker = new H.map.Marker({ lat: lat, lng: lng }, { icon: icon }); + // Add the marker to the map: + this.map.addObject(this.currentLocationMarker); + + this.map.setCenter({ lat: lat, lng: lng }); + } + + addBikeOnMap() { + var img = ['../../../assets/images/100_percent.png', '../../../assets/images/75_percent.png', '../../../assets/images/50_percent.png', '../../../assets/images/25_percent.png', '../../../assets/images/0_percent.png']; + if (this.bikeDetails.batteryPercentage < 100 && this.bikeDetails.batteryPercentage >= 75) { + this.addMarker(Number(this.bikeDetails.lat), Number(this.bikeDetails.lon), img[0]); + } + else if (this.bikeDetails.batteryPercentage < 75 && this.bikeDetails.batteryPercentage >= 50) { + this.addMarker(Number(this.bikeDetails.lat), Number(this.bikeDetails.lon), img[1]); + } + else if (this.bikeDetails.batteryPercentage < 50 && this.bikeDetails.batteryPercentage >= 25) { + this.addMarker(Number(this.bikeDetails.lat), Number(this.bikeDetails.lon), img[2]); + } else if (this.bikeDetails.batteryPercentage < 25 && this.bikeDetails.batteryPercentage >= 0) { + this.addMarker(Number(this.bikeDetails.lat), Number(this.bikeDetails.lon), img[3]); + } + } + getReservedBike() { + this.loadingService.showLoader(); this.storage.get('token').then((token) => { const headers = new HttpHeaders().set("Authorization", "Bearer " + token); //call reserved bike api @@ -81,18 +147,32 @@ export class MyreservationPage implements OnInit { let bikeDetailsApi = this.httpClient.get(bikeDetailsUrl, { headers }); bikeDetailsApi.subscribe((resp: any) => { console.log('Bike Details', resp); + this.loadingService.hideLoader(); this.bikeDetails = resp.data; this.reverseGeocode(this.platform, this.bikeDetails.lat, this.bikeDetails.lon); - this.noReservation = false; - - // display map - setTimeout(() => { - this.loadmap(); - }, 1000); - window.addEventListener('resize', () => this.map.getViewPort().resize()); - }, (reservedBikeError) => console.log(reservedBikeError)); + this.isBikeReserved = true; + this.addBikeOnMap(); + + // set routing params + this.routingParameters.waypoint1 = 'geo!' + this.bikeDetails.lat + ',' + this.bikeDetails.lon; + this.routingParameters.waypoint0 = 'geo!' + this.currentUserPosition.lat + ',' + this.currentUserPosition.lng; + + // show route on map + this.mapRouter.calculateRoute(this.routingParameters, this.onResult.bind(this), + (error) => { + console.log(error.message); + }); + }, (reservedBikeError) => { + this.loadingService.hideLoader(); + console.log(reservedBikeError); + this.isBikeReserved = false; + }); } - }, (bikeDetailsError) => console.log(bikeDetailsError)); + }, (bikeDetailsError) => { + this.loadingService.hideLoader(); + console.log(bikeDetailsError) + this.isBikeReserved = false; + }); }); } @@ -110,88 +190,58 @@ export class MyreservationPage implements OnInit { } loadmap() { - var defaultLayers = this.platform.createDefaultLayers(); + this.defaultLayers = this.platform.createDefaultLayers(); this.map = new H.Map( this.mapElement.nativeElement, - defaultLayers.raster.normal.map, + this.defaultLayers.raster.normal.map, { + center: { lat: this.locationService.preiousUserPosition.lat, lng: this.locationService.preiousUserPosition.lng }, zoom: 17, pixelRatio: window.devicePixelRatio || 1 } ); var behavior = new H.mapevents.Behavior(new H.mapevents.MapEvents(this.map)); - var ui = H.ui.UI.createDefault(this.map, defaultLayers); - ui.removeControl("mapsettings"); + this.ui = H.ui.UI.createDefault(this.map, this.defaultLayers); + this.ui.removeControl("mapsettings"); // create custom one - var ms = new H.ui.MapSettingsControl({ + var customMapSettings = new H.ui.MapSettingsControl({ baseLayers: [{ - label: "3D", layer: defaultLayers.vector.normal.map + label: "3D", layer: this.defaultLayers.vector.normal.map }, { - label: "Normal", layer: defaultLayers.raster.normal.map + label: "Normal", layer: this.defaultLayers.raster.normal.map }, { - label: "Satellite", layer: defaultLayers.raster.satellite.map + label: "Satellite", layer: this.defaultLayers.raster.satellite.map }, { - label: "Terrain", layer: defaultLayers.raster.terrain.map + label: "Terrain", layer: this.defaultLayers.raster.terrain.map } ], layers: [{ - label: "layer.traffic", layer: defaultLayers.vector.normal.traffic + label: "layer.traffic", layer: this.defaultLayers.vector.normal.traffic }, { - label: "layer.incidents", layer: defaultLayers.vector.normal.trafficincidents + label: "layer.incidents", layer: this.defaultLayers.vector.normal.trafficincidents } ] }); - ui.addControl("customized", ms); - var mapSettings = ui.getControl('customized'); - var zoom = ui.getControl('zoom'); + this.ui.addControl("custom-mapsettings", customMapSettings); + var mapSettings = this.ui.getControl('custom-mapsettings'); + var zoom = this.ui.getControl('zoom'); mapSettings.setAlignment('top-right'); - zoom.setAlignment('left-top'); + zoom.setAlignment('right-top'); - //get user location - this.getLocation(this.map); + this.map.getViewPort().setPadding(30, 30, 30, 30); - var img = ['../../../assets/images/100_percent.png', '../../../assets/images/75_percent.png', '../../../assets/images/50_percent.png', '../../../assets/images/25_percent.png', '../../../assets/images/0_percent.png']; - if (this.bikeDetails.batteryPercentage < 100 && this.bikeDetails.batteryPercentage >= 75) { - this.addMarker(Number(this.bikeDetails.lat), Number(this.bikeDetails.lon), img[0]); - } - else if (this.bikeDetails.batteryPercentage < 75 && this.bikeDetails.batteryPercentage >= 50) { - this.addMarker(Number(this.bikeDetails.lat), Number(this.bikeDetails.lon), img[1]); - } - else if (this.bikeDetails.batteryPercentage < 50 && this.bikeDetails.batteryPercentage >= 25) { - this.addMarker(Number(this.bikeDetails.lat), Number(this.bikeDetails.lon), img[2]); - } else if (this.bikeDetails.batteryPercentage < 25 && this.bikeDetails.batteryPercentage >= 0) { - this.addMarker(Number(this.bikeDetails.lat), Number(this.bikeDetails.lon), img[3]); - } + this.map.getViewPort().setPadding(30, 30, 30, 30); } - getLocation(map) { - this.geolocation.getCurrentPosition( - { - maximumAge: 1000, timeout: 5000, - enableHighAccuracy: true - } - ).then((resp) => { - let lat = resp.coords.latitude - let lng = resp.coords.longitude - this.currentLocation.lat = resp.coords.latitude; - this.currentLocation.lng = resp.coords.longitude; - this.moveMapToGiven(map, lat, lng); - // set routing params - this.routingParameters.waypoint1 = 'geo!' + this.bikeDetails.lat + ',' + this.bikeDetails.lon; - this.routingParameters.waypoint0 = 'geo!' + this.currentLocation.lat + ',' + this.currentLocation.lng; - - // show route on map - this.mapRouter.calculateRoute(this.routingParameters, this.onResult.bind(this), - (error) => { - alert(error.message); - }); - }, er => { - console.log('Can not retrieve Location'); - }).catch((error) => { - console.log('Error getting location - ' + JSON.stringify(error)); - }); + //TODO change this logic + getCurrentPosition() { + if (!this.currentLocationMarker) { + this.showUserLocationOnMap(this.currentUserPosition.lat, this.currentUserPosition.lng); + } + this.map.setZoom(17); + this.map.setCenter({ lat: this.currentUserPosition.lat, lng: this.currentUserPosition.lng }); } moveMapToGiven(map, lat, lng) { @@ -225,9 +275,9 @@ export class MyreservationPage implements OnInit { var streets = result.Response.View[0].Result[0].Location.Address.Street; var houseNumber = result.Response.View[0].Result[0].Location.Address.HouseNumber; var zipcode = result.Response.View[0].Result[0].Location.Address.PostalCode; - + this.address = streets; - + }, (error) => { alert(error); diff --git a/src/app/services/loading.service.spec.ts b/src/app/services/loading.service.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..b6518ad6038a517cbf5029d82ce0746ba387f93c --- /dev/null +++ b/src/app/services/loading.service.spec.ts @@ -0,0 +1,12 @@ +import { TestBed } from '@angular/core/testing'; + +import { LoadingService } from './loading.service'; + +describe('LoadingService', () => { + beforeEach(() => TestBed.configureTestingModule({})); + + it('should be created', () => { + const service: LoadingService = TestBed.get(LoadingService); + expect(service).toBeTruthy(); + }); +}); diff --git a/src/app/services/loading.service.ts b/src/app/services/loading.service.ts new file mode 100644 index 0000000000000000000000000000000000000000..a183dd6a149ac5fdfee721350c7966377f676b9f --- /dev/null +++ b/src/app/services/loading.service.ts @@ -0,0 +1,30 @@ +import { Injectable } from '@angular/core'; +import { LoadingController } from '@ionic/angular'; + +@Injectable({ + providedIn: 'root' +}) +export class LoadingService { + loaderToShow: any; + + constructor( + public loadingController: LoadingController + ) { + } + + showLoader(message = 'loading...') { + this.loaderToShow = this.loadingController.create({ + message: message + }).then((res) => { + res.present(); + + res.onDidDismiss().then((dis) => { + console.log('Loading dismissed!'); + }); + }); + } + + hideLoader() { + this.loadingController.dismiss(); + } +} diff --git a/src/app/services/location.service.spec.ts b/src/app/services/location.service.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..6edba5d5f4c10f1eb5d1aa8ff1d807e97a729345 --- /dev/null +++ b/src/app/services/location.service.spec.ts @@ -0,0 +1,12 @@ +import { TestBed } from '@angular/core/testing'; + +import { LocationService } from './location.service'; + +describe('LocationService', () => { + beforeEach(() => TestBed.configureTestingModule({})); + + it('should be created', () => { + const service: LocationService = TestBed.get(LocationService); + expect(service).toBeTruthy(); + }); +}); diff --git a/src/app/services/location.service.ts b/src/app/services/location.service.ts new file mode 100644 index 0000000000000000000000000000000000000000..befbc9446e4094973744d2da8e3b71ca5c616c3c --- /dev/null +++ b/src/app/services/location.service.ts @@ -0,0 +1,54 @@ +import { Injectable } from '@angular/core'; +import { Geolocation } from '@ionic-native/geolocation/ngx'; +import { Subject } from 'rxjs'; +@Injectable({ + providedIn: 'root' +}) +export class LocationService { + public preiousUserPosition = { lat: 48.783480, lng: 9.180319 }; + public currentUserPosition = { lat: 48.783480, lng: 9.180319 }; + + liveLocationSubject = new Subject(); //Decalring new RxJs Subject + + constructor(private geolocation: Geolocation) { + let watch = this.geolocation.watchPosition({ enableHighAccuracy: true, maximumAge: 10000 }); + watch.subscribe((position) => { + console.log('IN WATCHER') + console.log('lat'+ position.coords.latitude); + console.log('lng'+ position.coords.longitude); + this.currentUserPosition.lat = position.coords.latitude; + this.currentUserPosition.lng = position.coords.longitude; + this.preiousUserPosition.lat = position.coords.latitude; + this.preiousUserPosition.lng = position.coords.longitude; + this.getUserLiveLocation(this.currentUserPosition); + }, (errorObj) => { + console.log('error getting live location, setting to previous location'); + this.getUserLiveLocation(this.preiousUserPosition); + }); + } + + getUserLocation(): Promise { + return new Promise((resolve, reject) => { + + this.geolocation.getCurrentPosition().then((resp) => { + let lat = resp.coords.latitude; + let lng = resp.coords.longitude; + this.currentUserPosition.lat = resp.coords.latitude; + this.currentUserPosition.lng = resp.coords.longitude; + this.preiousUserPosition.lat = resp.coords.latitude; + this.preiousUserPosition.lng = resp.coords.longitude; + resolve(this.currentUserPosition); + }, er => { + console.log('error getting location setting to previous location'); + resolve(this.preiousUserPosition); + }).catch((error) => { + console.log('error getting location setting to previous location'); + resolve(this.preiousUserPosition); + }); + }); + } + + getUserLiveLocation(location) { + this.liveLocationSubject.next(location); + } +} diff --git a/src/assets/js/mapsjs-core.js b/src/assets/js/mapsjs-core.js new file mode 100644 index 0000000000000000000000000000000000000000..c851f7afffe7236dcea7cdf3debe385fc7fa1efc --- /dev/null +++ b/src/assets/js/mapsjs-core.js @@ -0,0 +1,378 @@ + +/** + * The code below uses open source software. Please visit the URL below for an overview of the licenses: + * http://js.api.here.com/v3/3.1.8.1/HERE_NOTICE + */ + +(function(){var n,aa=[];function ba(a){return function(){return aa[a].apply(this,arguments)}}function ca(a,b){return aa[a]=b}var da="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ea="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this; +function fa(a,b){if(b){var c=ea;a=a.split(".");for(var d=0;dc&&(c=Math.max(0,b+c));if(null==d||d>b)d=b;d=Number(d);0>d&&(d=Math.max(0,b+d));for(c=Number(c||0);c>>0),ya=0;function za(a,b,c){return a.call.apply(a.bind,arguments)} +function Aa(a,b,c){if(!a)throw Error();if(2this.b&&(this.b++,a.next=this.a,this.a=a)};function Fa(){this.b=this.a=null}var Ia=new Ea(function(){return new Ha},function(a){a.reset()});Fa.prototype.add=function(a,b){var c=Ia.get();c.set(a,b);this.b?this.b.next=c:this.a=c;this.b=c};Fa.prototype.remove=function(){var a=null;this.a&&(a=this.a,this.a=this.a.next,this.a||(this.b=null),a.next=null);return a};function Ha(){this.next=this.b=this.a=null}Ha.prototype.set=function(a,b){this.a=a;this.b=b;this.next=null};Ha.prototype.reset=function(){this.next=this.b=this.a=null};function Ja(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return!0;return!1}function Ka(a){for(var b in a)return!1;return!0}function La(a){var b={},c;for(c in a)b[c]=a[c];return b}function Na(a){var b=ua(a);if("object"==b||"array"==b){if(r(a.clone))return a.clone();b="array"==b?[]:{};for(var c in a)b[c]=Na(a[c]);return b}return a}var Oa="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "); +function Pa(a,b){for(var c,d,e=1;eb?1:0};var Ta;a:{var Ua=oa.navigator;if(Ua){var Va=Ua.userAgent;if(Va){Ta=Va;break a}}Ta=""}function Wa(a){return Ra(Ta,a)};var Xa=Array.prototype.indexOf?function(a,b){return Array.prototype.indexOf.call(a,b,void 0)}:function(a,b){if(ra(a))return ra(b)&&1==b.length?a.indexOf(b,0):-1;for(var c=0;cXb.indexOf(a)&&Xb.push(a)}Yb(Xb); +function Nb(a,b,c,d){var e="",f=2>arguments.length,g;f&&(b={H:y.H},c="",d=Xb.slice());Zb(b,!0,function(b,f){try{if(g=b[f],f=$b(b,g),!(wa(g)&&g.window===g&&g.self===g||wa(g)&&0d.indexOf(g)&&(d.push(g),e=Nb(a,g,c+"."+f,d)))return!0}}catch(l){}});f&&(e=e?e.substr(1).replace("."+Kb[0]+".","#"):"~"+(r(a)?ac(a)+"()":Pb(a)));return e} +function $b(a,b){var c=[];Zb(a,!1,function(a,e){a[e]===b&&c.push(e)});return c.sort(bc)[0]}function bc(a,b){return b.length-a.length}var cc=Object[Kb[0]][Kb[2]];function Zb(a,b,c){var d;if(a){for(e in a)if((!b||cc.call(a,e))&&c(a,e,!0))return;for(d=Kb.length;d--;){var e=Kb[d];if((!b||cc.call(a,e))&&c(a,e,!1))break}}}function ac(a){return(a=/^\s*function ([^\( ]+)/.exec(a))?a[1]:"anonymous"}function dc(a,b,c){c[b]="#"+b}var ec=!!y.__karma__;function fc(){throw Error("unimplemented method");};function gc(a,b){b=b||{};"status"in b&&(this.status=+b.status);"statusText"in b&&(this.statusText=b.statusText);this.ok=200<=this.status&&300>this.status;this.bodyUsed=!1;a?"string"===typeof a?this.c=a:ArrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(a)||a.buffer)?this.a=a.buffer||a:Blob.prototype.isPrototypeOf(a)&&(this.b=a):this.c=""}u("H.net.Response",gc);gc.prototype.type="default";gc.prototype.type=gc.prototype.type;gc.prototype.status=200;gc.prototype.status=gc.prototype.status; +gc.prototype.statusText="OK";gc.prototype.statusText=gc.prototype.statusText;gc.a=function(a){if(a.bodyUsed)return qb(new TypeError("Already read"));a.bodyUsed=!0};gc.error=function(){gc.b||(gc.b=new gc(null,{status:0,statusText:""}),gc.b.type="error");return gc.b};gc.error=gc.error;gc.prototype.text=function(){var a=gc.a(this);a||(this.c?a=pb(this.c):this.a?a=gc.c(this.a):this.b?a=gc.g(this.b):a=qb("Unsupported response body"));return a};gc.prototype.json=function(){return this.text().then(y.JSON.parse)}; +gc.prototype.blob=function(){var a,b=gc.a(this);b||(this.b?a=this.b:this.a&&(a=new Blob([this.a],{type:"application/octet-stream"})));return b||pb(a)};gc.prototype.arrayBuffer=function(){return this.a?gc.a(this)||pb(this.a.slice(0)):this.blob().then(gc.f)};gc.f=function(a){var b=new FileReader;b.readAsArrayBuffer(a);return new gb(function(a,d){b.onload=function(){a(b.result)};b.onerror=function(){d(b.error)}})}; +gc.g=function(a){var b=new FileReader;b.readAsText(a);return new gb(function(a,d){b.onload=function(){a(b.result)};b.onerror=function(){d(b.error)}})};gc.c=function(a){a=new Uint8Array(a);var b=a.length,c=Array(b),d;for(d=0;d(c=a%b)===0>b?c:c+b}function kd(a,b,c){b-=c=c||0;a-=c;return a-Lc(a/b)*b+c}u("H.math.normalize",kd);function ld(a,b,c){return a>c?c:a=b-d&&a<=c+d:a>=c-d&&a<=b+d}function nd(a,b,c,d,e,f){return Pc(Qc((a-e)*(d-f)-(b-f)*(c-e),2)/(Qc(c-e,2)+Qc(d-f,2)))}var od={NONE:0,VERTEX:1,EDGE:2,SURFACE:3};u("H.math.CoverType",od); +function pd(a,b,c,d,e){for(var f=c.length,g=f,h,k,l,m=c[0],p=0,q=0,t=0,v=d/2||0,x=e?1:3;1!=p&&g>x;){h=c[--g];d=c[--g];l=c[g?g-1:(f+(g-1))%f];k=c[g?g-2:(f+(g-2))%f];if(d>=a-v&&d<=a+v&&h>=b-v&&h<=b+v||k>=a-v&&k<=a+v&&l>=b-v&&l<=b+v)p=1;else if(!p&&d===a)k===a&&(hb||h>b&&la||m>=a&&k=b?++q:++t),p=md(b,h,l,v)&&nd(a,b,d,h,k,l)<=v?2:0;else if(!p&&md(a,d,k,v)){if(da||d>a&&kb,t+=mthis.ae&&(this.qe(),this.fh().remove(this),this.ae=4)};function td(a){var b;this.a={};for(b in sd)this.a[sd[b]]=[];this.gg=a;this.gg.addEventListener("allocatable",A(this.b,this))}u("H.util.JobManager",td);var ud=Object.keys(sd).map(function(a){return sd[a]}).sort().reverse();td.prototype.add=function(a){C(a,qd,this.add,0);this.a[a.c].push(a);this.b()};td.prototype.contains=function(a){return-1parseFloat(Od)){Nd=String(Qd);break a}}Nd=Od}var Rd={},Sd;var Td=oa.document;Sd=Td&&Id?Md()||("CSS1Compat"==Td.compatMode?parseInt(Nd,10):5):void 0;var Ud;(Ud=!Id)||(Ud=9<=Number(Sd));var Vd=Ud,Wd; +if(Wd=Id){var Xd;if(Object.prototype.hasOwnProperty.call(Rd,"9"))Xd=Rd["9"];else{for(var Yd,Zd=0,$d=Qa(String(Nd)).split("."),ae=Qa("9").split("."),be=Math.max($d.length,ae.length),ce=0;0==Zd&&ce=a.keyCode)a.keyCode=-1}catch(b){}};var le="closure_lm_"+(1E6*Math.random()|0),me={},ne=0;function oe(a,b,c,d,e){if(d&&d.once)return pe(a,b,c,d,e);if("array"==ua(b)){for(var f=0;fd.keyCode||void 0!=d.returnValue)){a:{var e=!1;if(0==d.keyCode)try{d.keyCode=-1;break a}catch(g){e=!0}if(e||void 0==d.returnValue)d.returnValue=!0}d=[];for(e=b.currentTarget;e;e=e.parentNode)d.push(e);a=a.type;for(e=d.length-1;!b.a&&0<=e;e--){b.currentTarget=d[e];var f=ze(d[e],a,!0,b);c=c&&f}for(e=0;!b.a&&e>>0);function qe(a){if(r(a))return a;a[Be]||(a[Be]=function(b){return a.handleEvent(b)});return a[Be]};function G(){Ac.call(this);this.W=new Bd(this);this.pn=this;this.Sg=null}w(G,Ac);G.prototype[wd]=!0;n=G.prototype;n.fc=function(){return this.Sg};n.ba=function(a){this.Sg=a};n.addEventListener=function(a,b,c,d){oe(this,a,b,c,d)};n.removeEventListener=function(a,b,c,d){we(this,a,b,c,d)}; +n.dispatchEvent=function(a){var b,c=this.fc();if(c)for(b=[];c;c=c.fc())b.push(c);c=this.pn;var d=a.type||a;if(ra(a))a=new Ec(a,c);else if(a instanceof Ec)a.target=a.target||c;else{var e=a;a=new Ec(d,c);Pa(a,e)}e=!0;if(b)for(var f=b.length-1;!a.a&&0<=f;f--){var g=a.currentTarget=b[f];e=g.kd(d,!0,a)&&e}a.a||(g=a.currentTarget=c,e=g.kd(d,!0,a)&&e,a.a||(e=g.kd(d,!1,a)&&e));if(b)for(f=0;!a.a&&fb.status?a.resolve(b.json()):a.reject(b)},b)},"text/plain":function(){var a=this;return new hc(this.data,function(b){200<=b.status&&300>b.status?a.resolve(b.text()):a.reject(b)},ef(this.a))},image:function(){var a=y.document.createElement("img"),b=this,c=this.data;a.onload=A(this.resolve,this,a);a.onerror=function(){b.reject(gc.error())}; +a.crossOrigin=this.a.crossOrigin;a.src=c;return{abort:function(){a.onerror=a.onload=null;Le&&Ye(a)||a.removeAttribute("src")}}}}; +(function(){try{var a=new XMLHttpRequest;a.open("get","/",!0)}catch(b){a={}}"response"in a&&(cf.prototype.b.arraybuffer=function(){var a=new XMLHttpRequest,c=this,d=this.a,e=d.headers,f;a.open("GET",this.data);ff(a,d);a.responseType="arraybuffer";if(e)for(f in e)a.setRequestHeader(f,e[f]);a.onerror=a.ontimeout=function(){c.reject(gc.error())};a.onload=function(){c.resolve(new gc(a.response))};a.send();return a})})();var gf=new td(new af);cf.prototype.fh=function(){return gf};var df=y.document.createElement("a"); +function ef(a){var b=La(a);delete b.crossOrigin;ff(b,a);return b}function ff(a,b){a.withCredentials="use-credentials"===b.crossOrigin};function H(a,b){this.x=+a;this.y=+b}u("H.math.Point",H);H.prototype.set=H;H.prototype.set=H.prototype.set;H.prototype.clone=function(a){a?(a.x=this.x,a.y=this.y):a=new H(this.x,this.y);return a};H.prototype.clone=H.prototype.clone;H.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};H.prototype.add=H.prototype.add;H.prototype.sub=function(a){this.x-=a.x;this.y-=a.y;return this};H.prototype.sub=H.prototype.sub;H.prototype.scale=function(a,b){this.x*=a;this.y*=void 0===b?a:b;return this}; +H.prototype.scale=H.prototype.scale;H.prototype.round=function(){this.x=Kc(this.x);this.y=Kc(this.y);return this};H.prototype.round=H.prototype.round;H.prototype.floor=function(){this.x=Lc(this.x);this.y=Lc(this.y);return this};H.prototype.floor=H.prototype.floor;H.prototype.ceil=function(){this.x=Mc(this.x);this.y=Mc(this.y);return this};H.prototype.ceil=H.prototype.ceil;H.prototype.da=function(a){return!(!a||this.x!==a.x||this.y!==a.y)};H.prototype.equals=H.prototype.da; +H.prototype.xj=function(a,b){var c=b.x-a.x,d=b.y-a.y,e=a;if(c||d){var f=((this.x-a.x)*c+(this.y-a.y)*d)/(c*c+d*d);0>=f?e=a:1<=f?e=b:e=new H(a.x+f*c,a.y+f*d)}return e};H.prototype.getNearest=H.prototype.xj;H.prototype.bb=function(a){return Pc(Qc(this.x-a.x,2)+Qc(this.y-a.y,2))};H.prototype.distance=H.prototype.bb;function hf(a){if(!a)throw Error("invalid argument");return a instanceof H?a:new H(a.x,a.y)}H.fromIPoint=hf;function jf(a){var b=kf[a];if(!b)if(a in lf)b=kf[a]=a;else{b=mf.length;var c="",d=a.charAt(0).toUpperCase()+a.substr(1),e="",f=!1;nf&&(e=nf+d,f=e in lf);for(;b--&&!f;)c=mf[b],e=c+d,f=e in lf;f&&(nf=c);if(b=f?e:null)kf[a]=b;else throw Error("Could not find any variant of CSS property ["+a+"]");}return b}u("H.dom.cssPrefixer.prefix",jf);var mf=["O","Ms","ms","Moz","Webkit"],kf={},nf="",lf=document.createElement("span").style;function of(a,b,c,d){if(!a||!b||!c)throw new D(of,null,"Must specify name, version and revision parameter");this.name=a;this.version=b;this.revision=c;d&&Pa(this,d)}u("H.util.BuildInfo",of);of.prototype.toString=function(){var a,b=[];for(a in this)ra(this[a])&&b.push(this[a]);return b.join(";")};var pf={};function qf(a,b,c,d){if(!a)throw new D(qf,1,"Must specify a name parameter");return pf[a]||(pf[a]=new of(a,b,c,d))}of.get=qf;function rf(){rf.l.constructor.call(this);this.a=sf(this);this.f=Fb();this.c=A(this.c,this);this.a.addEventListener("message",this.c);this.b={}}w(rf,G);rf.prototype.s=function(){this.a.terminate()};rf.prototype.i=function(a){var b=a.type,c=!!this.f[b],d=a.data,e=tf++,f=d&&d.oo?d.oo:B,g=!0;c?(this.b[e]=a,uf(this,b,e,d&&d.message,f)):(a.reject(new D(this.i,0,"processor_not_found")),g=!1);return g}; +rf.prototype.c=function(a){a=a.data;var b=this.b[a.taskId],c=a.taskId,d=a.data,e=this;if(2===a.type)(new cf("arraybuffer",d)).then(function(a){return a.arrayBuffer()}).then(function(a){e.a.postMessage(["3",c,[a]],[a])},function(){e.a.postMessage(["3",c,[null,"ERROR"]])});else{if(b){switch(a.type){case 1:b.resolve(d);break;case 0:b.reject(d)}delete this.b[c]}this.dispatchEvent(new Ec(this.g.IDLE))}};var tf=0;function vf(a,b,c){var d=tf++,e;a.b[d]=e=rb();uf(a,b,d,c);return e.bi} +function uf(a,b,c,d,e){d===B||va(d)||(d=[d]);try{a.a.postMessage([b,c,d],e)}catch(f){a=a.b[c],a.reject(f.message)}}rf.prototype.g={IDLE:"idle",Mi:"error"};rf.prototype.j=function(a,b){var c=this.m||(this.m=new Ec(this.g.Mi));c.data=b;delete this.f[a];this.dispatchEvent(c)}; +function sf(a){var b=y.H.__bootstrap__;b=r(b)?(""+b).replace(/^[^{]+{((.|[\r\n])+?)}\s*$/,"$1"):""+b;if(y.Worker&&y.URL)try{var c=new y.Worker(y.URL.createObjectURL($e(b,"application/javascript")))}catch(d){}c||(a=new wf(a),function(){eval("var self = arguments[0];"+b)}(a),c=new xf(a));return c}function xf(a){G.call(this);this.a=a}w(xf,G);xf.prototype.postMessage=function(a){y.setTimeout(A(this.b,this,a),0)};xf.prototype.b=function(a){var b=new Ec("message");b.data=a;this.a.dispatchEvent(b)}; +xf.prototype.terminate=function(){this.a.F();this.F()};function wf(a){G.call(this);this.a=a;this.addEventListener=A(this.addEventListener,this);this.removeEventListener=A(this.removeEventListener,this);this.postMessage=A(this.postMessage,this);this.eval=A(eval,this)}w(wf,G);wf.prototype.postMessage=function(a){var b=new Ec("message");b.data=a;y.setTimeout(A(this.a.c,this.a,b),0)};function yf(){var a=zf;a||(a=zf=this,G.call(a),Af(this));return a}var zf;w(yf,G);yf.prototype.s=function(){yf.l.s.call(this);Af(this)};function Af(a){var b=a.b,c;if(b)for(c=b.length;c--;)b[c].F();a.b=[];Yb(a.b);a.c=Fb();a.f=Fb()} +yf.prototype.Eg=function(a){var b;a=a.type;if(b=this.f[a]){var c=this.b;var d=c[0];d||(d=c[0]=new rf,this.xb(Ca(Dc,d)),Ka(this.c)||(c=y.Object.keys(this.c),vf(d,"0",c)));c=d;c.f[a]||(c.f[a]=b,vf(c,"1",[a,r(b)?b+"":b]).then(vc,A(c.j,c,a)))}else throw new nc(this.Eg,'Unknown type "'+a+'"');return d};yf.prototype.Qg=function(){};yf.prototype.a=function(a,b){var c=this.f,d=c[a];if(d){if(b!==d)throw new nc(this.a,'Type "'+a+'" is already registered');}else c[a]=b};function Bf(a,b,c){qd.call(this,a,b,c)}var Cf;w(Bf,qd);Bf.prototype.fh=function(){Cf||(Cf=new td(new yf));return Cf};Bf.prototype.qe=function(){};Bf.prototype.qj=function(a){return a.i(this)};function Df(a,b,c){var d=ld(+a,-90,90);if(b&&F(d))throw new D(b,c,a);return d}function Ef(a,b,c){var d=+a;if(-180>d||180a^0>b)&&180ad&&(f=0ad?$c:0))%cd-$c)*fd):this};I.prototype.walk=I.prototype.rg;I.prototype.I=function(){return new J(this.lat,this.lng,this.lat,this.lng)};I.prototype.getBoundingBox=I.prototype.I;function If(a,b,c){var d=wa(a)&&!(F(a.lat=Df(a.lat))||F(a.lng=Ef(a.lng))||a.alt!==B&&F(a.alt=Ff(a.alt)));if(!d&&b)throw new D(b,c,a);return d}I.validate=If; +function Jf(a){if(!a)throw new D(Jf,0,a);return new I(a.lat,a.lng,a.alt)}I.fromIPoint=Jf;I.prototype.nb="Point";I.prototype.Oc=function(a){a.push("(",this.lng," ",this.lat,")");return a};I.prototype.uc=function(){return[this.lat,this.lng,this.alt||0]};function J(a,b,c,d){Lf(this,Df(a,J,0),Ef(b,J,1),Df(c,J,2),Ef(d,J,3))}w(J,Hf);u("H.geo.Rect",J);J.prototype.nb="Polygon";J.prototype.Oc=function(a){var b=this.oa,c=this.aa,d=this.ka,e=this.ea;a.push("(","(",c," ",b,",",e," ",b,",",e," ",d,",",c," ",d,",",c," ",b,")",")");return a};J.prototype.da=function(a){return this===a||!!a&&this.oa===a.oa&&this.aa===a.aa&&this.ka===a.ka&&this.ea===a.ea};J.prototype.equals=J.prototype.da;J.prototype.clone=function(){return new J(this.oa,this.aa,this.ka,this.ea)}; +J.prototype.clone=J.prototype.clone;function Lf(a,b,c,d,e){a.aa=c;a.ea=e;bthis.ea};J.prototype.isCDB=J.prototype.Gb;J.prototype.Nf=function(){return!this.Fb()&&!this.Od()};J.prototype.isEmpty=J.prototype.Nf;J.prototype.I=function(){return new J(this.oa,this.aa,this.ka,this.ea)};J.prototype.getBoundingBox=J.prototype.I; +J.prototype.vf=function(a,b,c){var d=this.lb();c||(a=Df(a,this.vf,0),b=Ef(b,this.vf,1));b=this.bd(a,b,c);a=b.lb();return a.lat===d.lat&&a.lng===d.lng&&this.Od()===b.Od()&&this.Fb()===b.Fb()};J.prototype.containsLatLng=J.prototype.vf;J.prototype.Gd=function(a,b){b||If(a,this.Gd,0);return this.vf(a.lat,a.lng,b)};J.prototype.containsPoint=J.prototype.Gd; +J.prototype.Kg=function(a,b){var c=this.lb();if(!b&&!C(a,J))throw new D(this.Kg,0,a);b=this.jc(a,b);a=b.lb();return a.lat===c.lat&&a.lng===c.lng&&this.Od()===b.Od()&&this.Fb()===b.Fb()};J.prototype.containsRect=J.prototype.Kg;J.prototype.bd=function(a,b,c,d){if(!c){if(F(a=Df(a)))throw new D(this.bd,0,a);if(F(b=Ef(b)))throw new D(this.bd,1,b);}return Of(this.oa,this.aa,this.ka,this.ea,a,b,a,b,d)};J.prototype.mergeLatLng=J.prototype.bd; +J.prototype.hk=function(a,b,c){b||If(a,this.hk,0);return this.bd(a.lat,a.lng,b,c)};J.prototype.mergePoint=J.prototype.hk;J.prototype.jc=function(a,b,c){if(!b&&!C(a,J))throw new D(this.jc,0,a);return Of(this.oa,this.aa,this.ka,this.ea,a.oa,a.aa,a.ka,a.ea,c)};J.prototype.mergeRect=J.prototype.jc;J.prototype.Fc=function(a,b,c,d,e,f){e||(a=Df(a,this.Fc,0),b=Ef(b,this.Fc,1),c=Df(c,this.Fc,2),d=Ef(d,this.Fc,3));return Of(this.oa,this.aa,this.ka,this.ea,a,b,c,d,f)};J.prototype.mergeTopLeftBottomRight=J.prototype.Fc; +J.prototype.Vd=function(a,b){var c=this.aa<=this.ea,d=a.aa<=a.ea,e=this.aaa?360:0)}function Mf(a,b){a+=b/2;return a-(180m-1E-6?360:0;if(180>m-1E-6){l=b;var p=h}else m=360-m,l=f,p=d;m=m+e/2+g/2;360<=m+5E-7?(l=-180,p=180):m-5E-7k?-(g+a.lng):k;a=c+(0>k?2*k:0);a=-180>a?360+a:a;e+=0h?f+2*h:f;-90>=f&&(f=-90);return b?Lf(b,d,a,f,e):new J(d,a,f,e)};J.prototype.resizeToCenter=J.prototype.Dk;J.prototype.U=function(){return this.uc()};J.prototype.uc=function(){return[this.oa,this.aa,this.ka,this.ea]};function Tf(a,b,c,d,e,f){Mb(this,Tf);this.c=a||10;this.b=this.a=null;this.f=d||0;this.g=e||0;this.i=b||1;this.j=c||1;this.u=!!f;this.flush()}var Uf={sl:0,tl:1,hl:2,il:3};function Vf(a){var b=a.b;if(a.u&&!b){var c=a.head;if(c.entries||c[0]||c[1]||c[2]||c[3])b=[c],b=Wf([b,b,b,b],[c[6],c[7],c[4],c[5]]),a.b=b}return b} +function Wf(a,b){var c,d,e,f,g=0;for(c=3;0<=c;c--){var h=c+4;var k=0m:tm:e[h]=d[e]:f<=d[e])if(c)d[e]=f;else{a.b=null;break}}} +Tf.prototype.remove=function(a){var b,c,d,e=!1;a&&(b=a.node)&&b.b===this&&(c=b.entries)&&0<=(d=c.indexOf(a))&&(c.splice(d,1),this.m(b),Xf(this,a,!1),e=!0);return e};Tf.prototype.flush=function(){var a=new Yf(null,NaN,this.f-this.i,this.g-this.j,this.f+this.i,this.g+this.j);a.b=this;this.head=this.a=a;this.b=null};function Zf(a,b){var c=a.head,d;if(b){var e=b;if(e!==c)for(c=e;e=e.parent;)if(e.entries||1(d=c.a);)if(d)c=e;else break;a.head=c} +Tf.prototype.Za=function(a,b,c,d){var e=[],f=this.head,g=this.a;a<=f[5]&&b<=f[6]&&c>f[7]&&d>f[4]&&$f(this,f,e,a,b,c,d,d>=g[6],c>=g[5]);return e}; +function $f(a,b,c,d,e,f,g,h,k){var l=b.entries,m=b[7],p=b[4],q=b[5],t=b[6],v=b[8],x=b[9],E;if(l){var O=l.length;if(e>p||d>m||g=e&&t>=d&&(qv&&(ex&&(E=b[Uf.il])&&$f(a,E,c,d,e,f,g,h,k));dx&&(E=b[Uf.hl])&&$f(a,E,c,d,e,f,g,h,k))}Tf.prototype.Pc=ba(1);var ag=0; +function Yf(a,b,c,d,e,f){this.c=b;a&&(this.parent=a,this.b=a.b,b&1?(c=a[8],e=a[5]):(c=a[7],e=a[8]),b&2?(d=a[9],f=a[6]):(d=a[4],f=a[9]));this[7]=c;this[5]=e;this[8]=(c+e)/2;this[4]=d;this[6]=f;this[9]=(d+f)/2}Yf.prototype.a=0;function bg(a,b){return a[b]||(++a.a,a[b]=new Yf(a,b))}Yf.prototype.removeChild=function(a){var b=a.c;this[b]===a&&(delete this[b],delete a.parent,--this.a)};Yf.prototype.Pc=ba(0);function cg(a,b){(a.entries||(a.entries=[])).push(b);b.node=a} +function dg(a,b,c,d,e){var f=a[5],g=a[6];return a[7]<=b&&a[4]<=c&&(f>d||f===d&&f===a.b.a[5])&&(g>e||g===e&&g===a.b.a[6])};function eg(a,b,c,d,e,f){eg.l.constructor.apply(this,arguments)}w(eg,Tf);eg.prototype.m=function(a){for(var b,c,d=this.head;a;){if(!(b=a.entries)||!b.length)if(b&&delete a.entries,!a.a&&(c=a.parent)){c.removeChild(a);d===a&&(d=c);a=c;continue}a=z}this.head!==d&&(this.head=d,Zf(this))};function fg(a,b,c,d,e){if(dg(a.a,b,c,d,e))return gg(a,a.a,b,c,d,e,a.c);throw Error("Coordinates out of bounds");}eg.prototype.Cc=function(a,b){return fg(this,a,b,a,b)}; +function gg(a,b,c,d,e,f,g){var h=b[8],k=b[9],l,m;g&&(e=h))&&(f=k))?c=gg(a,bg(b,l|m<<1),c,d,e,f,g-1):(cg(b,c=new hg(c,d,e,f)),Xf(a,c,!0),Zf(a,b));return c}function hg(a,b,c,d){this.id=ag++;this[0]=b;this[1]=c;this[2]=d;this[3]=a}hg.prototype.md=function(a){return this[a]};function ig(a){this.f=new eg(+a||10,180,90,0,0,!0);this.c=[];this.g=!1;this.a=this.b=this.N=null}u("H.geo.QuadTree",ig);n=ig.prototype;n.Dh=0;n.Yc=function(){return this.Dh};n.Gb=function(){return this.g}; +n.I=function(){var a,b;if(!this.N){var c=[];!this.b&&(a=Vf(this.f))&&(this.b=new J(-a[0],a[3],-a[2],a[1]));(b=this.b)&&c.push(b);var d,e,f;if(!this.a&&(f=(e=this.c).length)){a=90;var g=360;var h=-90;for(d=0;f--;){var k=e[f];a=Ic(a,k[0]);g=Ic(g,k[3]);h=Jc(h,k[2]);d=Jc(d,k[1])}this.a=new J(-a,g,-h,d-360)}(b=this.a)&&c.push(b);if(b=c[0])c[1]&&(b=b.jc(c[1],!0)),this.N=b}return this.N}; +function jg(a,b,c,d,e,f){f?(f=new hg(e,-b,c+360,-d),a.c.push(f),a.g=!0,a.a&&a.a.Fc(b,c,d,e,!0,a.a)):(f=fg(a.f,c,-b,e,-d),a.b&&a.b.Fc(b,c,d,e,!0,a.b));++a.Dh;a.N=null;return f}n.Cc=function(a){var b=a.lng;a=a.lat;return jg(this,a,b,a,b,!1)};n.Mj=function(a){var b=a.Qb(),c=a.Nb();return(a=a.Gb())?jg(this,b.lat,c.lng,c.lat,b.lng,a):jg(this,b.lat,b.lng,c.lat,c.lng,a)};ig.prototype.insertBoundingBox=ig.prototype.Mj; +ig.prototype.remove=function(a){var b;if(a.node){var c=this.f.remove(a);this.b=null}else if(a=(b=this.c).indexOf(a),c=0<=a)b.splice(a,1),this.g=0=b&&g>=c} +function mg(a,b){var c,d,e;if(c=b.length){var f=a.length;for(d={};f--;)d[a[f].id]=1;for(;c--;)(e=b[c]).id in d||a.push(e)}}ig.prototype.Mf=function(a){var b=this.f,c=a.Qb(),d=a.Nb(),e=-c.lat;c=c.lng;var f=-d.lat;d=d.lng;e===f||c===d?a=[]:a.Gb()?(a=b.Za(-180,e,d,f),mg(a,b.Za(c,e,180,f)),mg(a,kg(this,e,d,f,c+360))):(a=b.Za(c,e,d,f),mg(a,kg(this,e,c,f,d)));return a};ig.prototype.intersectBoundingBox=ig.prototype.Mf;function K(a){K.l.constructor.call(this);a&&ng(a,K,0);this.qa=a||[];this.a=og(this,0,this.qa.length)}w(K,Hf);u("H.geo.LineString",K);function og(a,b,c){a=a.qa;var d=0;b=Jc(b,0);c=Ic(c,a.length);c-=2;for(b+=1;be&&180k-e||eNc(e-k)){var l=k;k=e;e=l}hd+1){var E=[c[l],c[l+1]];e.push(E)}d=h;E.push(c[l+3],c[l+4])}if(a.a){c=[];d=e.length;for(b=0;bf?360:-360,k.push(E[a-2],f,h,l));c.push(k)}e=c}return e}K.prototype.nb="LineString";K.prototype.Oc=function(a){var b=this.qa,c=b.length,d;if(c){a.push("(");for(d=0;da[c]&&(a[c]+=360)}return a};function tg(a){tg.l.constructor.call(this);void 0!==a&&(this.data=a)}w(tg,G);u("H.map.Feature",tg);tg.prototype.getData=function(){return this.data};tg.prototype.getData=tg.prototype.getData;tg.prototype.s=function(){tg.l.s.call(this);delete this.data};function ug(){}u("H.map.provider.Invalidations",ug);ug.MARK_INITIAL=hd;ug.prototype.update=function(a,b){b!==vg.NONE&&(this.a=a,b&vg.SPATIAL&&(this.f=a),b&vg.VISUAL&&(this.g=a),b&vg.ADD&&(this.b=a),b&vg.REMOVE&&(this.c=a),b&vg.Z_ORDER&&(this.j=a),b&vg.VOLATILITY&&(this.i=a))};ug.prototype.update=ug.prototype.update;ug.prototype.Am=function(){return this.a};ug.prototype.getMark=ug.prototype.Am;ug.prototype.a=hd;ug.prototype.kn=function(a){return this.a>a};ug.prototype.isAny=ug.prototype.kn; +ug.prototype.g=hd;ug.prototype.Yd=function(a){return this.g>a};ug.prototype.isVisual=ug.prototype.Yd;ug.prototype.f=hd;ug.prototype.xh=function(a){return this.f>a};ug.prototype.isSpatial=ug.prototype.xh;ug.prototype.b=hd;ug.prototype.Oj=function(a){return this.b>a};ug.prototype.isAdd=ug.prototype.Oj;ug.prototype.c=hd;ug.prototype.Of=function(a){return this.c>a};ug.prototype.isRemove=ug.prototype.Of;ug.prototype.j=hd;ug.prototype.yh=function(a){return this.j>a};ug.prototype.isZOrder=ug.prototype.yh; +ug.prototype.i=hd;ug.prototype.on=function(a){return this.i>a};ug.prototype.isVolatility=ug.prototype.on;var vg={NONE:0,VISUAL:1,SPATIAL:2,ADD:4,REMOVE:8,Z_ORDER:16,VOLATILITY:32};ug.Flag=vg;function wg(a,b,c){wg.l.constructor.call(this,a);this.oldValue=c;this.newValue=b}w(wg,Ec);u("H.util.ChangeEvent",wg);function L(a){Mb(this,L);L.l.constructor.call(this,a?a.data:B);this.G=xg.next();if(a){var b="min";Tb(a[b])&&(this.o=a[b]);b="max";Tb(a[b])&&(this.u=a[b]);b="visibility";b in a&&(this.g=!!a[b]);b="volatility";b in a&&(this.D=!!a[b]);b="zIndex";b in a&&(this.m=+a[b]||0);b="provider";b in a&&(this.a=a[b],this.Aa(vg.ADD))}}w(L,tg);u("H.map.Object",L);var xg=new Oe(1),yg={ANY:0,OVERLAY:1,SPATIAL:2,MARKER:3,DOM_MARKER:4,GROUP:5};L.Type=yg;L.prototype.eb=function(){return this.G}; +L.prototype.getId=L.prototype.eb;L.prototype.o=-1/0;L.prototype.u=1/0;L.prototype.Bm=function(){return this.u};L.prototype.getMax=L.prototype.Bm;L.prototype.Dm=function(){return this.o};L.prototype.getMin=L.prototype.Dm;L.prototype.g=!0;L.prototype.wb=function(a){var b=this.g;(a=!!a)^b&&(this.g=a,this.invalidate(vg.VISUAL));return this};L.prototype.setVisibility=L.prototype.wb;L.prototype.Ac=function(a){for(var b=this,c;(c=b.g)&&a&&(b=b.Va););return c};L.prototype.getVisibility=L.prototype.Ac; +L.prototype.D=!1;L.prototype.Dj=function(a){for(var b=this,c;!(c=b.D)&&a&&(b=b.Va););return c};L.prototype.getVolatility=L.prototype.Dj;L.prototype.Uk=function(a){var b=this.D;b^a&&(this.D=!b,this.invalidate(vg.VOLATILITY));return this};L.prototype.setVolatility=L.prototype.Uk;L.prototype.m=B;L.prototype.Ej=function(){return this.m};L.prototype.getZIndex=L.prototype.Ej;L.prototype.ff=function(a){a!==this.m&&(this.Ze(),this.m=a,this.invalidate(vg.Z_ORDER));return this};L.prototype.setZIndex=L.prototype.ff; +L.prototype.B=B;function zg(a){var b=a.B,c,d;if(!b){var e=(c=a.m)!==B;(b=a.Va)?(b=zg(b).slice(),b[0]|=e):b=[e|0];b.push(c||0,0>(d=a.yi)?a.G:d);a.B=b}return b}L.prototype.Ze=function(){this.B=B};function Ag(a,b,c){var d,e;if(!c||a[0]|b[0]){var f=a.length;var g=b.length;var h=Ic(f,g);var k=1;for(e=1+c;k=a?+a:Gg},function(a){a=Gb(a);return"butt"===a||"square"===a||"round"===a||"arrow-head"===a||"arrow-tail"===a?a:Gg},function(a){return"round"===a||"bevel"===a||"miter"===a?a:Gg},function(a){return 0=a?+a:Gg},function(a){return a&&a.every&&a.every(Vb)?a:Gg},function(a){return F(+a)?Gg:+a},function(a){return Lb(a)?Fg[3](a):B},function(a){return Lb(a)?Fg[3](a):B}];Cg.MAX_LINE_WIDTH=100; +var Hg=new Cg;Cg.DEFAULT_STYLE=Hg;var Ig="fillColor strokeColor lineWidth lineCap lineJoin miterLimit lineDashOffset lineDash lineTailCap lineHeadCap".split(" ");Cg.prototype.U=function(){for(var a={},b=Ig.length,c;b--;)c=Ig[b],a[c]=this[c];return a};Cg.prototype.forWorkerMessage=Cg.prototype.U;function Jg(a){var b;if(a){var c=C(a,Jg);for(b in a)if(b in this){var d=a[b];d!==this[b]&&("fillColor"===b||0<(d=+d))&&(this[b]=d)}a=c?a.Rb:!!(Ke(this.fillColor)&&this.width&&this.width);a||(this.Rb=a)}Hb(this)}u("H.map.ArrowStyle",Jg);Jg.prototype.Rb=!0;Jg.prototype.fillColor="rgba(255,255,255,.75)";Jg.prototype.width=1.2;Jg.prototype.length=1.6;Jg.prototype.frequency=5;Jg.prototype.uj=function(){return new Jg(this)}; +Jg.prototype.da=function(a){var b=this===a;!b&&a&&(b=a.width===this.width&&a.fillColor===this.fillColor&&a.length===this.length&&a.frequency===this.frequency);return b};Jg.prototype.equals=Jg.prototype.da;function Kg(a,b){var c;Kg.l.constructor.call(this,b);b&&this.fd(b.style);a&&(this.j=!0);b&&(c=b.arrows)&&this.Jk(c)}w(Kg,L);u("H.map.Spatial",Kg);Kg.prototype.type=yg.SPATIAL;Kg.prototype.sg=0;Kg.prototype.style=Hg;Kg.prototype.Ia=function(){return this.style};Kg.prototype.getStyle=Kg.prototype.Ia;Kg.prototype.fd=function(a){var b=!0;a?this.style=C(a,Cg)?a:new Cg(a):this.style?delete this.style:b=!1;b&&this.invalidate(vg.VISUAL);return this};Kg.prototype.setStyle=Kg.prototype.fd; +Kg.prototype.Ul=function(){return this.f};Kg.prototype.getArrows=Kg.prototype.Ul;Kg.prototype.Jk=function(a){var b=this.f,c=!1;!a&&b?(delete this.f,c=!0):!a||b&&b.da(a)||(this.f=new Jg(a),c=!0);c&&"none"!==this.style.strokeColor&&this.Aa(1);return this};Kg.prototype.setArrows=Kg.prototype.Jk;function Lg(a,b){var c=!1,d=!1,e;if(b.length){for(c=0;cf?-360:360);a.X=c;return e.zh(b,c+d)} +function Rg(a,b,c){for(var d=b,e,f=a.length+b,g,h;d--;){b=a[d];g=b.length;for(e=Array(g);g--;)h=b[g],e[g]=new H(h.x+c,h.y);a[--f]=e}}var Sg=new K([0,0,0,0,0,0,0,0,0]);function Tg(a){Mb(this,Tg);Tg.l.constructor.call(this);this.sa=Ug(this,a,this.constructor,0)}w(Tg,Hf);u("H.geo.MultiGeometry",Tg);Tg.prototype.splice=function(a,b,c){a=[a];b!==B&&a.push(b);c&&(b=Ug(this,c,this.splice,2),a=a.concat(b));this.N=z;return this.sa.splice.apply(this.sa,a)};Tg.prototype.splice=Tg.prototype.splice;Tg.prototype.lc=function(a){var b=this.sa.length;if(!(0<=a&&aa.Ie())throw new D(b,0);} +function Yg(a,b,c,d){var e=sg(b,c.Ff());if(e.length&&(b=c.Hf(),a=Og(a,e,!1,b),e=a.length)){var f=c.Ke();b=b.w;c.x||Rg(a,e,-b);c.x===(1<a?B:this.og(a,1)[0]};N.prototype.removeInterior=N.prototype.Tn; +N.prototype.xk=function(a){if(!C(a,K))throw new D(this.xk,0,a);this.gb.push(a)};N.prototype.pushInterior=N.prototype.xk;N.prototype.I=function(){var a=this.N;a||(this.N=a=ch(this.ec,this.qd));return a};N.prototype.getBoundingBox=N.prototype.I;n=N.prototype;n.tj=function(a){var b=this.gb.length;if(0>a||a>=b)throw new vd(this.tj,a,[0,b-1]);(b=this.a[a])||(this.a[a]=b=ch(this.gb[a],this.qd));return b};n.ec=z;n.gb=[]; +function ch(a,b){var c,d,e;if(e=a.I())(c=a.ah(!0))&&(d=a.Ie())&&(e=e.jc(Qf([a.we(0),a.we(d-1)],!0),!0)),360===e.Fb()&&1===c%2&&(e=e.bd(b,0));return e}n.nb="Polygon";n.Oc=function(a){var b=this.gb,c=b.length,d;if(this.ec.Ie()){a.push("(");this.ec.Oc(a);for(d=0;dgh)throw new vd(fh,e,[0,gh]);C(a,K)?this.fa(new N(a)):this.fa(a)}w(fh,Ng);u("H.map.Polygon",fh);fh.prototype.i=0;fh.prototype.c=0;fh.prototype.cb=z;var gh=2047;fh.MAX_EXTRUDE_HEIGHT=gh;fh.prototype.ki=function(a){var b=+a;if(b!==a)throw new D(this.ki,0,a);if(0>b||this.c+b>gh)throw new vd(this.ki,this.c+b,[0,gh]);this.i=b;this.Aa(vg.SPATIAL)}; +fh.prototype.setExtrusion=fh.prototype.ki;fh.prototype.im=function(){return this.i};fh.prototype.getExtrusion=fh.prototype.im;fh.prototype.ji=function(a){var b=+a;if(b!==a)throw new D(this.ji,0,a);if(0>b||this.i+b>gh)throw new vd(this.ji,this.i+b,[0,gh]);this.c=b;this.Aa(vg.SPATIAL)};fh.prototype.setElevation=fh.prototype.ji;fh.prototype.gm=function(){return this.c};fh.prototype.getElevation=fh.prototype.gm;fh.prototype.pa=function(){return this.cb};fh.prototype.getGeometry=fh.prototype.pa; +fh.prototype.fa=function(a){if(a===z||C(a,N))var b=!1;else C(a,dh,this.fa,0),b=!0;this.od=b;b=this.cb;this.cb=a;b!==z&&this.Aa(vg.SPATIAL);return this};fh.prototype.setGeometry=fh.prototype.fa;fh.prototype.I=function(){return this.pa().I()};fh.prototype.getBoundingBox=fh.prototype.I; +fh.prototype.Nd=function(a){var b,c=this.pa(),d,e;if(this.od){c=c.sa;var f=0;for(e=c.length;fh&&-180==g.aa&&(g=new J(g.oa,180,g.ka,g.ea));360>h&&180==g.ea&&(g=new J(g.oa,g.aa,g.ka,-180));if(g.Gb()){h=l;v=h.length;l=-1;for(m=0;mp?-x:x),m=0g.Fb()&&g.Gd(new I(g.oa,180))&&(l=jh([].concat(l),g.ea),k.push(l));g=c.Hf();a=Og(a,k,!0,g);if(360===e.Fb()&&1===b.ah(!0)%2){b=a;a=c.Ke();b[0][1].x>b[0][b[0].length-1].x&&(b[0]=b[0].reverse());l=[];h=b[0].length-1;for(k=0;kd?d=l:le?e=m:me;e+=120)f.fi(c,e-180,B);else for(a=a.v,a=360/a;360>e;e+=a)f.sd(b.rg(e,d,!0));b=new N(f);0>c&&b.Qk(bh.SOUTH);return b};function rh(a,b){if(!C(a,Element)){sh.innerHTML=a;a=sh.firstElementChild;if(!a)throw new D(rh,0,"No element data");sh.removeChild(a);var c=!0;sh.innerHTML=""}this.a=0!==Ve(a).length;this.c=c?a:We(a,y.document,this.a);b&&(c="onAttach",c in b&&Ob(a=b[c],"Function",rh,1,c)&&(this.Sh=a),c="onDetach",c in b&&Ob(a=b[c],"Function",rh,1,c)&&(this.b=a))}u("H.map.DomIcon",rh);var sh=document.createElement("DIV");rh.prototype.Sh=null;rh.prototype.b=null;rh.prototype.uj=function(a){return We(this.c,a,this.a)}; +rh.prototype.a=!1;function th(a){th.l.constructor.call(this,a)}w(th,Tg);u("H.geo.MultiPoint",th);th.prototype.a=function(a){return If(a)};th.prototype.b=function(a){return C(a,I)?a:Jf(a)};th.prototype.nb="Multi"+I.prototype.nb;function uh(a,b){this.w=+a;this.h=+b}u("H.math.Size",uh);function vh(a,b){var c;var d=a;var e=b||[];if(a!==wh.NONE){b=c=e.length;if(-1===this.b.indexOf(d))throw new D(vh,0,a);if(!e)throw new D(vh,1,e);for(;c--;)if(F(e[c]))throw new D(vh,1,e);d===wh.RECT&&3',size:new uh(38, +47),anchor:new H(19,45),hitArea:new vh(3,[19,46,2,27,0,18,5,6,19,0,32,5,38,15,36,27,19,47])};xh.prototype.U=function(){var a=xh.l.U.call(this),b=this.Ab(),c=b.Db(),d=b.ld();a.geometry=this.pa().U();c&&(b=a.properties.icon={id:b.uid},b.size={w:c.w,h:c.h},b.offset=[c.w/2-(d?d.x:0),c.h/2-(d?d.y:0)]);return a};xh.prototype.forWorkerMessage=xh.prototype.U;function Ah(a,b){Ah.l.constructor.call(this,a,b)}w(Ah,xh);u("H.map.DomMarker",Ah);Ah.prototype.type=yg.DOM_MARKER;Ah.prototype.sg=2;Ah.prototype.c=function(a){var b=new rh(a.svg,a);a=a.anchor;b.c.style.margin=-a.y+"px 0 0 -"+a.x+"px";return b};Ah.prototype.Qj=function(a){return C(a,rh)};function Bh(a,b,c,d){Bh.l.constructor.call(this,a,b,c);this.modifiers=d}w(Bh,wg);u("H.map.ChangeEvent",Bh);Bh.prototype.pl=1;Bh.prototype.SIZE=Bh.prototype.pl;Bh.prototype.ac=2;Bh.prototype.POSITION=Bh.prototype.ac;Bh.prototype.pc=4;Bh.prototype.HEADING=Bh.prototype.pc;Bh.prototype.bc=8;Bh.prototype.TILT=Bh.prototype.bc;Bh.prototype.ke=16;Bh.prototype.INCLINE=Bh.prototype.ke;Bh.prototype.Rc=32;Bh.prototype.ZOOM=Bh.prototype.Rc;Bh.prototype.zd=64;Bh.prototype.BOUNDS=Bh.prototype.zd;function Ch(){this.a=[];Ch.l.constructor.call(this)}w(Ch,G);u("H.util.OList",Ch);function Dh(a,b,c){a=a.a.length;if(c)var d=a;else if(F(d=0>(d=+b)?Jc(0,a+d):Ic(a,d)))throw new vd(Ch,b,[0,a-1]);return d}Ch.prototype.add=function(a,b){b=Dh(this,b,F(b));this.a.splice(b,0,a);this.dispatchEvent(new Eh(this,this.b.he,b,a,null,null))};Ch.prototype.add=Ch.prototype.add;function Fh(a,b){var c=a.a.splice(b,1)[0];a.dispatchEvent(new Eh(a,a.b.le,b,null,c,null));return c} +Ch.prototype.lc=function(a){this.get(a);return Fh(this,a)};Ch.prototype.removeAt=Ch.prototype.lc;Ch.prototype.remove=function(a){a=this.indexOf(a);return 0<=a?(Fh(this,a),!0):!1};Ch.prototype.remove=Ch.prototype.remove;Ch.prototype.set=function(a,b){if(0!==this.a.length||0!==a){this.get(a);a=Dh(this,a,!1);var c=this.a[a]}this.a[a]=b;this.dispatchEvent(new Eh(this,this.b.me,a,b,c,null));return c};Ch.prototype.set=Ch.prototype.set;Ch.prototype.indexOf=function(a){return this.a.indexOf(a)}; +Ch.prototype.indexOf=Ch.prototype.indexOf;Ch.prototype.get=function(a){var b=Dh(this,a,!1),c=this.a;if(b>=c.length)throw new vd(this.get,a,[0,c.length-1]);return c[b]};Ch.prototype.get=Ch.prototype.get;Ch.prototype.xm=function(){return this.a.length};Ch.prototype.getLength=Ch.prototype.xm;Ch.prototype.ab=function(){return[].concat(this.a)};Ch.prototype.asArray=Ch.prototype.ab;Ch.prototype.flush=function(){for(var a=this.a.length;a--;)Fh(this,a)};Ch.prototype.flush=Ch.prototype.flush; +Ch.prototype.s=function(){this.flush();Ch.l.s.call(this)};Ch.prototype.b={he:"add",le:"remove",me:"set",yo:"move"};function Eh(a,b,c,d,e,f){Eh.l.constructor.call(this,b,a);this.idx=c;this.added=d;this.removed=e;this.moved=f}w(Eh,Ec);var Gh={};u("H.geo.mercator",Gh);Gh.a=function(a){return Ic(1,Jc(0,.5-Oc(Wc(bd+ad*a/180))/$c/2))};Gh.b=function(a){return a/360+.5};Gh.Pf=function(a,b,c){c?(c.x=Gh.b(b),c.y=Gh.a(a)):c=new H(Gh.b(b),Gh.a(a));return c};Gh.latLngToPoint=Gh.Pf;Gh.Mb=function(a,b){return Gh.Pf(a.lat,a.lng,b)};Gh.geoToPoint=Gh.Mb;Gh.f=function(a){return 0>=a?90:1<=a?-90:fd*(2*Xc(Rc($c*(1-2*a)))-ad)};Gh.c=function(a){return 360*(1===a?1:jd(a,1))-180}; +Gh.Ra=function(a,b,c){c?(c.lat=Gh.f(b),c.lng=Gh.c(a)):c=new I(Gh.f(b),Gh.c(a));return c};Gh.xyToGeo=Gh.Ra;Gh.Yf=function(a,b){return Gh.Ra(a.x,a.y,b)};Gh.pointToGeo=Gh.Yf;u("H.util.constants.DEFAULT_MIN_ZOOM_LEVEL",0);u("H.util.constants.DEFAULT_MAX_ZOOM_LEVEL",22);function Hh(a,b){this.projection=a||Gh;this.b=0;this.a=this.exp=Oc(b||256)/Zc;Ih(this);this.y=this.x=0}u("H.geo.PixelProjection",Hh);var Jh=Nc(24)+Nc(-8);Hh.prototype.Ea=function(a){if(F(a))throw new D(this.Ea,0,a);var b=this.x/this.w;var c=this.y/this.h;this.b=a;this.a=this.exp+a;Ih(this);this.x=b*this.w;this.y=c*this.h};Hh.prototype.rescale=Hh.prototype.Ea;function Ih(a){a.a>Jh&&(a.a=Jh);a.w=Qc(2,a.a);a.h=Qc(2,a.a)}Hh.prototype.Fj=function(){return this.b||0};Hh.prototype.getZoomScale=Hh.prototype.Fj; +Hh.prototype.kb=function(a,b){a=this.projection.Pf(a.lat,a.lng,b);a.x=a.x*this.w-this.x;a.y=a.y*this.h-this.y;return a};Hh.prototype.geoToPixel=Hh.prototype.kb;Hh.prototype.Se=function(a,b){return this.projection.Ra((a.x+this.x)/this.w,(a.y+this.y)/this.h,b)};Hh.prototype.pixelToGeo=Hh.prototype.Se;Hh.prototype.Ra=function(a,b,c){return this.projection.Ra((a+this.x)/this.w,(b+this.y)/this.h,c)};Hh.prototype.xyToGeo=Hh.prototype.Ra; +Hh.prototype.zh=function(a,b,c){a=this.projection.Pf(a,b,c);a.x=a.x*this.w-this.x;a.y=a.y*this.h-this.y;return a};Hh.prototype.latLngToPixel=Hh.prototype.zh;Hh.prototype.cd=function(a){return new H(a.x*this.w-this.x,a.y*this.h-this.y)};Hh.prototype.pointToPixel=Hh.prototype.cd;var Kh;function Lh(a,b){if(y.URL)return(new y.URL(a,b)).toString();if(!a||!Mh(a))return a;if(!b||Mh(b))throw new TypeError("Failed to construct 'URL': Invalid base URL");Kh||(Kh=document.createElement("a"),Yb(Kh));var c=Kh;c.href=b;"/"!==a[0]?a=c.href.replace(/\/[^\/]*$/,"/")+a:((b=c.origin)||(b=c.protocol+"//"+c.host),a=b+a);return a}function Mh(a){var b=!1;"string"===typeof a&&(b=!(-1Kb.indexOf(d)?(b=b[d],++a=a.min)a[b]=c,a.g(),a.i(),a.dispatchEvent(new wg(e?a.b.Qi:a.b.Pi,c,d));else throw new D(f,0,"Invalid condition min <= max");return a}ki.prototype.pi=function(a){return mi(this,"min",+a)};ki.prototype.setMin=ki.prototype.pi; +ki.prototype.ni=function(a){return mi(this,"max",+a)};ki.prototype.setMax=ki.prototype.ni;ki.prototype.g=function(){this.dispatchEvent(this.b.Fa)};ki.prototype.i=function(){this.dispatchEvent(this.b.ie)};ki.prototype.s=function(){ki.l.s.call(this)};ki.prototype.la=function(){return null};ki.prototype.getCopyrights=ki.prototype.la;function ni(a){var b;ni.l.constructor.call(this);this.dispatchEvent=A(this.dispatchEvent,this);if(a){var c=a.length;for(b=0;bui.indexOf(a))throw new D(this.R,0,a);if(this.C!==a||1===a&&1c&&(d=a.parent)&&1===d.a){d.removeChild(a);e===a&&(e=d);d.entries=b;a=b[0].node=d;continue}}else if(delete a.entries,d=a.parent)if(d.removeChild(a),e===a&&(e=d),1===d.a){a=d.a?d[0]||d[1]||d[2]||d[3]:null;continue}a=z}this.head!==e&&(this.head=e,Zf(this))}; +Ui.prototype.Cc=function(a,b){if(dg(this.a,a,b,a,b))return Vi(this,this.a,a,b,this.c);throw Error("Coordinates out of bounds");};function Vi(a,b,c,d,e){var f=b.entries;if(e)if(b.a)f=Wi(a,b,c,d,e);else if(f){f=f[0];var g=bg(b,f[1]>=b[8]|(f[0]>=b[9])<<1);g.entries=b.entries;delete b.entries;f.node=g;Zf(a,g);f=Wi(a,b,c,d,e)}else cg(b,f=new Xi(c,d)),Zf(a,b),Xf(a,f,!0);else f||Zf(a,b),cg(b,f=new Xi(c,d)),Xf(a,f,!0);return f}function Wi(a,b,c,d,e){return Vi(a,bg(b,c>=b[8]|(d>=b[9])<<1),c,d,e-1)} +function Xi(a,b){this.id=ag++;this[0]=b;this[1]=a}Xi.prototype.md=function(a){return this[a%2]};function Yi(){this.a=new Ui(10,180,90,0,0,!0)}n=Yi.prototype;n.Ch=0;n.Yc=function(){return this.Ch};n.N=null;n.I=function(){var a=this.N,b;!a&&(b=Vf(this.a))&&(this.N=a=new J(-b[0],b[3],-b[2],b[1]));return a};n.Cc=function(a){++this.Ch;this.N=null;return this.a.Cc(a.lng,-a.lat)};n.remove=function(a){if(a=this.a.remove(a))--this.Ch,this.N=null;return a}; +n.Mf=function(a){var b=this.a,c=a.Qb(),d=a.Nb(),e=-c.lat;c=c.lng;var f=-d.lat;d=d.lng;var g;a.Gb()?g=b.Za(-180,e,d,f).concat(b.Za(c,e,180,f)):g=b.Za(c,e,d,f);return g};function Zi(a,b,c){this.c=a;this.a=b;this.f=c;this.b={}}function $i(a){return{"translucent-pattern-lines":{color:gi("strokeColor"),width:gi("lineWidth * $meters_per_pixel"),join:a?a:gi("lineJoin"),cap:gi("lineCap"),tail_cap:gi("lineTailCap"),head_cap:gi("lineHeadCap"),miter_limit:gi("miterLimit"),order:"function() { return 2 + feature.effectiveZIdx / 2; }",interactive:!0,dash:gi("lineDash"),extrude:!0,dash_phase:gi("lineDashOffset")}}};function aj(a,b,c,d){this.a=a;this.b=b;this.c=c;this.kf=d}function bj(a,b,c,d){a={type:b,uid:a.b,tiled:c,max_zoom:a.c};d&&Pa(a,d);return a};function cj(a){this.a=a};function dj(a,b,c,d,e){this.a=a;this.b=b;this.c=c;this.f=d;this.kf=e} +function ej(a){if(a.a&32&&!(a.a&16))return{};var b=new aj(a.a,a.b,a.c,a.kf);var c=new cj(a.a);a=new Zi(a.a,a.b,a.f);var d={},e=b.b;b=b.a&1?bj(b,"ObjectSource",!1,{progressiveUpdate:!0,has_volatile_data:!!(b.a&128)}):b.a&2?bj(b,"RemoteRasterTileSource",!0,{url:""}):bj(b,"ObjectTileSource",!0,{tile_size:b.kf});d[e]=b;b={};c.a&2&&(b={"translucent-raster":hi("raster","inlay",1)});c.a&28&&(e={"translucent-polygons":hi("polygons","inlay",2),"translucent-extruded-polygons":hi("polygons","translucent",3), +"translucent-pattern-lines":hi("pattern-lines","translucent",4),"translucent-overlays":hi("overlays","inlay",5),markers:hi("custom_icons","overlay",6,!1)},e["translucent-pattern-lines"].crop_by_tile=!!(c.a&64),e.markers.suppress_fade=!0,e.markers.stick=!0,Pa(b,e));a.c&2&&(a.b["tile_layer_"+a.a]=ji(a.a,"_default",{"translucent-raster":{color:[1,1,1,a.f],order:0}}));if(a.c&4){c=$i();e=a.b;var f="polygon_layer_"+a.a;var g=ji(a.a,"polygons",void 0,"function(){return sources[$source].isVisible(feature, $zoom)}"); +g.flat={filter:"function(){return !feature.height && !feature.min_height;}",draw:ii(!1)};g.extruded={filter:"function(){return feature.height || feature.min_height;}",draw:ii(!0)};e[f]=g;a.b["outline_layer_"+a.a]=ji(a.a,"outlines",c,"function(){return sources[$source].isVisible(feature, $zoom)}");c=$i("round");a.b["polyline_layer_"+a.a]=ji(a.a,"polylines",c,"function(){return sources[$source].isVisible(feature, $zoom)}")}a.c&8&&(a.b["overlay_layer_"+a.a]=ji(a.a,"overlays",{"translucent-overlays":{color:[1, +1,1,a.f],order:16382,interactive:!0}},"function(){return sources[$source].isVisible(feature, $zoom)}"));a.c&16&&(a.b["marker_layer_"+a.a]=ji(a.a,"markers",{markers:{sprite:fi("icon.id"),offset:fi("icon.offset"),collide:!1,priority:16383,elevate_by_altitude:!0,interactive:!0,stick:{color:fi("icon.stick_color"),height:fi("icon.stick_height")}}},"function(){return sources[$source].isVisible(feature, $zoom)}"));return{sources:d,styles:b,layers:a.b}};function fj(a,b){fj.l.constructor.call(this);this.C=gj.INIT;this.a=null;if(b&&Mh(b))throw new D(fj,1,"Base URL must be absolute");this.b=b;if(hj.test(a))this.A=a,b||(this.b=Mh(this.A)?B:this.A);else if(ra(a))this.c=a;else if(wa(a))ij(this,Na(a));else throw new D(fj,0,jj);}w(fj,G);u("H.map.Style",fj);fj.prototype.getState=function(){return this.C};fj.prototype.getState=fj.prototype.getState;fj.prototype.Kd=function(){return this.b};fj.prototype.getBaseUrl=fj.prototype.Kd;fj.prototype.Ef=function(){return Na(this.a)}; +fj.prototype.getConfig=fj.prototype.Ef;fj.prototype.load=function(){var a=this;if(this.A)this.C=gj.LOADING,(new cf("text/plain",this.A)).then(function(a){return Nh(a)}).then(function(b){ij(a,b)},function(b){kj(a,b.message)}),this.A=null;else if(this.c){this.C=gj.LOADING;try{ij(this,Nh(this.c))}catch(b){kj(this,b.message)}this.c=null}};fj.prototype.load=fj.prototype.load; +fj.prototype.Pk=function(a,b,c){var d;lj(this);a=mj(this,a,this.Pk,c);for(c=0;cl&&(k=Sh(k.layers,b),Ph(k)))break a;k=Qh}if(k===Qh)throw new D(c,0,'Unresolvable layer ID "'+g+'"');e.push({id:b,sb:k});if(d)for(h in k)!Uh[h]&&Ph(k[h])&&f.push(g+"."+h)}return e} +function oj(a,b){var c=0,d;for(d=b.length;c!==d;){var e=b[c++];var f=a;a=f[e];if(!a)break}return c===d?{node:a,parent:f,Zf:e}:void 0}var hj=/^(http[s]?)?.*\.ya?ml/,jj="invalid style configuration",gj={ERROR:-1,INIT:0,LOADING:1,READY:2};fj.State=gj;var rj="change",qj="error";function li(a){var b=""+Qe(),c;li.l.constructor.call(this);a=a||{};this.min=a.min||0;this.max=a.max||22;if(c=a.uri){if(/_/.test(c))throw new D(li,0,"uri "+c);}else c=b;this.uri=c||b;this.uid=b;a.getCopyrights&&Ob(a.getCopyrights,"Function",li)&&(this.getCopyrights=a.getCopyrights);this.f=this.f.bind(this);this.ja=!0}w(li,G);u("H.map.provider.Provider",li);li.prototype.i={ie:"configchange",Fa:"update"};function sj(a,b){a.dispatchEvent(new Ec(a.i.Fa,b))}li.prototype.f=function(){this.dispatchEvent(this.i.ie)}; +li.prototype.s=function(){G.prototype.s.call(this);this.c&&(this.c.removeEventListener(rj,this.f),this.c=null)};li.prototype.la=function(){return null};li.prototype.getCopyrights=li.prototype.la;li.prototype.m=function(){var a=0;this.di()&&(a|=1);this.providesRasters()&&(a|=2);this.providesSpatials()&&(a|=4);this.providesOverlays()&&(a|=8);this.providesMarkers()&&(a|=16);this.providesDomMarkers()&&(a|=32);return a};li.prototype.di=Se;li.prototype.Ue=Se;li.prototype.providesRasters=li.prototype.Ue; +li.prototype.Gc=Se;li.prototype.providesSpatials=li.prototype.Gc;li.prototype.ei=Se;li.prototype.providesOverlays=li.prototype.ei;li.prototype.Ub=Se;li.prototype.providesMarkers=li.prototype.Ub;li.prototype.Tb=Se;li.prototype.providesDomMarkers=li.prototype.Tb;li.prototype.ai=vc;li.prototype.j=1;function tj(a,b){b=ld(b,0,1);F(b)&&(b=1);a.j!==b&&(a.j=b,a.ja&&uj(a),a.f(),sj(a))} +li.prototype.yd=function(a,b){this.c&&(this.c.removeEventListener(rj,this.f),this.c.removeEventListener(qj,this.f));this.c=a;this.c.addEventListener(rj,this.f);this.c.addEventListener(qj,this.f);b||this.f();this.ja=!1};li.prototype.setStyleInternal=li.prototype.yd;li.prototype.Eb=function(){this.c||uj(this);return this.c};li.prototype.getStyleInternal=li.prototype.Eb;function uj(a){var b=new dj(a.m(),a.uid,a.max,a.j,a.tileSize);a.c=new fj(ej(b));a.ja=!0} +function vj(a){a=a.m();var b=wj;a&1?b=xj:a&2?b=null:a&28&&(b=yj);return b}li.prototype.km=function(){return!1};li.prototype.getFeatureProxy=li.prototype.km;function zj(a){var b;Mb(this,zj);zj.l.constructor.call(this,a);this.$a=a=[];for(b in yg)a[yg[b]]=new ug}w(zj,li);u("H.map.provider.ObjectProvider",zj);zj.prototype.di=Re;zj.prototype.providesByViewport=zj.prototype.di;zj.prototype.Pb=function(a){return this.$a[a||yg.ANY]};zj.prototype.getInvalidations=zj.prototype.Pb;zj.prototype.Wd=function(a,b){if(b!==vg.NONE){var c=this.$a[yg.ANY];var d=c.a+1;c.update(d,b);c=this.$a[a.type];c.update(d,b);a.Pb().update(d,b);sj(this,a)}}; +zj.prototype.invalidateObject=zj.prototype.Wd;zj.prototype.requestOverlays=zj.prototype.ud;zj.prototype.requestSpatials=zj.prototype.eg;zj.prototype.requestSpatialsByTile=zj.prototype.fg;zj.prototype.jb=!1;zj.prototype.requestMarkers=zj.prototype.Ic;zj.prototype.requestDomMarkers=zj.prototype.Hc;function M(a){a=a||{};M.l.constructor.call(this,a);this.b=a=new P({provider:this,min:a.min,max:a.max});a.ba(this);this.P=new ig;this.o=new ig;this.g=new Yi;this.u=new ig;this.D=new Yi;this.G=new ig}w(M,zj);u("H.map.provider.LocalObjectProvider",M);M.prototype.m=function(){return 125};M.prototype.Eb=function(){if(!this.L){this.L=M.l.Eb.call(this);var a=new dj(this.m()|128,this.uid+"_vol",this.max,this.j,this.tileSize);this.L.Rf(ej(a))}return this.L};M.prototype.gc=function(){return this.b}; +M.prototype.getRootGroup=M.prototype.gc;M.prototype.Wd=function(a,b){b&vg.SPATIAL&&this.T(a);M.l.Wd.call(this,a,b)};M.prototype.invalidateObject=M.prototype.Wd;M.prototype.T=function(a){var b;C(a,L,this.T,0);if(a.a!==this)throw new nc(this.T,"foreign object");this.La(a);var c=a.type;if(c===yg.MARKER)if((b=a.pa())instanceof I){var d=!0;c=this.g}else c=this.u;else c===yg.DOM_MARKER?(b=a.pa())instanceof I?(d=!0,c=this.D):c=this.G:c=c===yg.OVERLAY?this.P:this.o;d=d?c.Cc(b):c.Mj(a.I());d.Ji=a;a.$=d}; +M.prototype.La=function(a){var b;if(a)if(a.a!==this){if(C(a,L))throw new nc(this.La,"foreign object");}else if(b=a.$){var c=a.type;c===yg.MARKER?this.g.remove(b)||this.u.remove(b):c===yg.DOM_MARKER?this.D.remove(b)||this.G.remove(b):c===yg.OVERLAY?this.P.remove(b):this.o.remove(b);delete b.Ji;delete a.$}};M.prototype.removeObject=M.prototype.La; +function Aj(a,b,c,d,e,f){var g;f=f||[];if(b.Yc())for(a=b!==a.g&&b!==a.u,e=!e,b=b.Mf(c),c=b.length,g=0;g=l)&&(m=m.Va););k&&(e||h.Ac(!0))&&(a||1===h.Ab().getState())&&f.push(h)}return f}M.prototype.ei=function(){return 0a)throw new D(Pj,1,'Argument "maxTime" must be a positive number');this.a=a;this.Nc=Oj()}Qj.prototype.next=function(a){return a.length&&Oj()-this.Ncb||30c)throw new D(this.add,2,c);a=String(a);var d=this.a[a];var e=!0;this.filter&&(e=this.filter(a,b,c));d?e?(this.b+=c-d.size,d.size=c,d.data=b,Vj(this,d)):Wj(this,d,!0):e&&(this.a[a]=Xj(this,{id:a,data:b,size:c,kc:null,dd:null},this.c));Yj(this);return e};Uj.prototype.add=Uj.prototype.add; +Uj.prototype.be=function(a){if(!r(a))throw new D(this.be,0,a);this.g.push(a)};Uj.prototype.registerOnDrop=Uj.prototype.be;Uj.prototype.Pg=function(a){this.g=this.g.filter(function(b){return b!==a})};Uj.prototype.deRegisterOnDrop=Uj.prototype.Pg;Uj.prototype.get=function(a,b){return(a=b?this.a[a]:Vj(this,this.a[a]))&&a.data};Uj.prototype.get=Uj.prototype.get;Uj.prototype.zf=function(a){var b;(b=this.a[a])&&Wj(this,b,!0)};Uj.prototype.drop=Uj.prototype.zf; +Uj.prototype.forEach=function(a,b,c){var d;for(d in this.a){var e=this.a[d];(c?c(d,e.data,e.size):1)&&a.call(b,d,e.data,e.size)}};Uj.prototype.forEach=Uj.prototype.forEach;Uj.prototype.ha=function(a){var b;for(b in this.a){var c=this.a[b];(a?a(b,c.data,c.size):1)&&Wj(this,this.a[b],!0)}};Uj.prototype.removeAll=Uj.prototype.ha;Uj.prototype.oi=function(a){if(!(0<+a))throw new D(Uj.prototype.oi,0,a);this.i=+a;Yj(this);return this};Uj.prototype.setMaxSize=Uj.prototype.oi;Uj.prototype.Cm=function(){return this.i}; +Uj.prototype.getMaxSize=Uj.prototype.Cm;Uj.prototype.cm=function(){return this.b};Uj.prototype.getCurrentSize=Uj.prototype.cm;function Vj(a,b){b&&(a.c=Xj(a,b,a.c));return b}function Yj(a){for(;a.b>a.i&&a.f;)Wj(a,a.f,!0)}function Xj(a,b,c){if(c!==b){(b.kc||b.dd)&&Wj(a,b);if(b.kc=c)b.dd=c.dd,c.dd=b;b.dd||(a.c=b);b.kc||(a.f=b);a.b+=b.size}return b} +function Wj(a,b,c){var d=b.dd,e=b.kc;if(d||e||b==a.c&&b==a.f)if(d?d.kc=e:a.c=e,e?e.dd=d:a.f=d,a.b-=b.size,c){for(c=a.g.length;c--;)a.g[c].call(a,b.id,b.data,b.size);delete a.a[b.id]}b.kc=b.dd=null};var Zj,ak=function(){function a(){}for(var b,c,d,e=Jb("o ms moz webkit "),f=5;f--&&!b;)b=e[f],b=(c=y[b+(b?"R":"r")+"equestAnimationFrame"])&&!F(c.call(window,a))&&(d=y[b+(b?"C":"c")+"ancelAnimationFrame"]);Zj=b?function(a){return c.call(y,a)}:function(a){return y.setTimeout(a,25)};return b?function(a){return d.call(y,a)}:function(a){return y.clearTimeout(a)}}(),Oj=y.performance&&y.performance.now?function(){return y.performance.now()}:function(){return y.Date.now()};function Zg(a,b,c,d,e,f){var g,h,k=a.length,l,m;if(k)for(g=[];k--;){var p=a[k];var q=p.length;var t=0;for(l=1;lh){if(h>e||ge||hb){if(b>c||ac||bc)return;g=d}if(ae)return;a=f}h>e&&(b=a+(e-g)*(b-a)/(h-g),h=e);b>c&&(h=g+(c-a)*(h-g)/(b-a),b=c);m&&(a=-a,b=-b);return k?[new H(h,-b),new H(g,-a)]:[new H(g,-a),new H(h,-b)]} +function kh(a,b,c){a=ck(a,!0);b=ck(b,!1);var d,e;var f={};var g=d=1;switch(~~(c||0)){case 1:g=d=0;break;case 2:d=0;g=1;break;case 3:d=1,g=0}c=d;var h=g;if(b&&a){b.xf=dk(b.x,b.y,null,ek(b));a.xf=dk(a.x,a.y,null,ek(a));for(g=b;g.next;g=g.next)if(!g.Za)for(d=a;d.next;d=d.next)if(!d.Za){var k=fk(g.next);var l=fk(d.next);if(e=gk(g,k,d,l,f)){e=f.wl;var m=f.xl;var p=f.qo;var q=f.ro;e=dk(p,q,null,null,null,null,!0,0,0,e);hk(e,g,k);k=dk(p,q,null,null,null,null,!0,0,0,m);hk(k,d,l);e.Qh=k;k.Qh=e}}f=nh(b,a); +c&&(f=!f);for(g=b;g;g=g.next)g.Za&&(g.Ug=f,f=!f);f=nh(a,b);h&&(f=!f);for(d=a;d.next;d=d.next)d.Za&&(d.Ug=f,f=!f);ik(b);for(ik(a);(a=jk(b))!=b;){for(c=null;!a.qg;a=a.Qh){for(f=a.Ug;;){c=dk(a.x,a.y,c);c.artificial=a.Za||a.ln;a.qg=1;a=f?a.next:a.Sb;if(!a)break;if(a.Za){a.qg=1;break}}if(!a)break}c.Rh=t;var t=c}return t}}u("H.math.clipping.clipPolygon",kh); +function dk(a,b,c,d,e,f,g,h,k,l){a={x:a,y:b,next:c||null,Sb:d||null,Rh:e||null,Qh:f||null,Za:!!g,Ug:h||0,qg:k||0,alpha:l||0};d&&(a.Sb.next=a);c&&(a.next.Sb=a);return a}function fk(a){for(;a&&a.Za;)a=a.next;return a}function ek(a){if(a)for(;a.next;)a=a.next;return a}function jk(a){var b=a;if(b){do b=b.next;while(b!=a&&(!b.Za||b.Za&&b.qg))}return b}function ik(a){var b=ek(a);b.Sb.next=a;a.Sb=b.Sb} +function gk(a,b,c,d,e){var f,g=b.x-a.x,h=b.y-a.y;var k=d.x-c.x;var l=d.y-c.y;var m=g*l-h*k;if(!m)return 0;k=((c.x-a.x)*l-(c.y-a.y)*k)/m;m=(h*(c.x-a.x)-g*(c.y-a.y))/m;if(0>k||1m||1x?lk(v,t,h,k):1f&&(f=v,g=p-1)}else for(;pf&&(f=v,g=p-1);f>=b||0h){b.beginPath();for(f=h;ff;){var O=0;var Y=c[k];if(m=l=Y.length){var Ga=Y;m=Ga.length;for(p=0;--m;)p+=Ga[m].bb(Ga[m-1]);m=(Ga=p)>=d}if(m)for(m=Ic(Lc(Ga/d),1E3),m=Ga/(m+1),p=m/2;--l;){for(q=(t=Y[l]).bb(v=Y[l-1]);p<=O+q;){var pa=t.x+(v.x-t.x)*(x=(p-O)/q);x=t.y+(v.y-t.y)*x;a.wf(pa,x)&&(b.save(),b.translate(pa,x),b.rotate(-Xc((v.y-t.y)/ +(t.x-v.x))+(t.x=pa;var di=!Eb&&l>=Ga;if(ye===eh&&O)di?ob++:Uc++;else{var ei=ye.length;Ak.length=2*ei;for(x= +0;xb.right,c)} +Ck.prototype.Je=function(a,b,c,d,e,f){var g,h=[],k,l=this.a;f=null!=f?f:"__default__";var m=l.requestTile;if(!C(a,Dj))throw new D(this.Je,0,a);if(F(c=+c))throw new D(this.Je,1,c);d||(g={});b=Fk(this,a,b,c,e);if(a=b.length)for(d||b.sort(Gk),c=a;c--;)e=b[c],d||(g[l.Jf.apply(l,e)]=!0),e[3]=+d,(k=m.apply(l,e))&&h.push(k);if(!d){d=g;var p;g=this.c[f]||{};for(p in g)g.hasOwnProperty(p)&&g[p]&&!d[p]&&this.a.cancelTileByKey(p);this.c[f]=d}return{total:a,tiles:h}};Ck.prototype.getProviderTiles=Ck.prototype.Je; +function Gk(a,b){return b[3]-a[3]};function Q(a){Mb(this,Q);Q.l.constructor.call(this,a);this.g={};this.u={};this.dc=new Hk;this.hd=A(this.hd,this);this.P=Ik;this.createTileInternal=this.jd.bind(this)}w(Q,Rj);u("H.map.provider.RemoteTileProvider",Q);Q.prototype.Md=function(){return 1};Q.prototype.getEntryWeight=Q.prototype.Md;var Ik=new Uj(65536);Q.prototype.Ob=function(){return this.P};Q.prototype.getCache=Q.prototype.Ob;Q.prototype.v=ba(2);Q.prototype.hd=function(a){var b=this.uri;return!a.indexOf(b)&&"_"===a.charAt(b.length)}; +Q.prototype.cacheFilter=Q.prototype.hd;Q.prototype.$a=function(a,b){b.valid=!1};Q.prototype.reload=function(a){var b,c=this.getCache();a?c.ha(this.hd):c.forEach(this.$a,this,this.hd);for(b in this.g)this.g[b].cancel(),this.u[b].cancel();this.g={};this.u={};sj(this)};Q.prototype.reload=Q.prototype.reload;Q.prototype.pe=function(){return!1};Q.prototype.canStore=Q.prototype.pe;Q.prototype.MAX_STORE_TIME=Infinity;Q.prototype.Sd=function(){return this.dc};Q.prototype.getStorage=Q.prototype.Sd; +Q.prototype.L=function(a,b){b(a)};function Ij(a,b,c,d,e,f){var g=a.Sd();d=~~d;return a.requestInternal(b,c,d,function(h,k){g.put(a.Jf(b,c,d),k&&{raw:k.raw,timestamp:y.Date.now()},e,f)},f,0)}Q.prototype.requestInternal=Q.prototype.Pa; +Q.prototype.ib=function(a,b,c,d){var e=this;var f=this.getCache();if(F(a=+a))throw new D(this.ib,0,a);if(F(b=+b))throw new D(this.ib,0,b);if(F(c=+c))throw new D(this.ib,0,c);c=~~c;var g=this.getTileKey(a,b,c);f=f.get(g);f&&f.valid||d||this.g[g]||(f=B,this.requestTileAsPromise(a,b,c,d).then(function(a){sj(e,a)},vc));return f};Q.prototype.requestTile=Q.prototype.ib; +Q.prototype.Ck=function(a,b,c,d){var e=this,f=this.getCache(),g=this.getTileKey(a,b,c),h=this.g,k=this.u,l,m=this.Sd();if(k[g])return k[g];k[g]=k=new gb(function(k,q){l=m.get(g,function(l){var p,t;var E=function(d,h){t=e.createTileInternal(a,b,c,d,h);t.key=g;f.add(g,t,e.Md(d));k(t);Jk(e,g)};l&&(p=y.Date.now()-l.timestamp);l&&p=a&&this.top<=b&&this.bottom>=b}; +Dj.prototype.containsXY=Dj.prototype.wf;function Ek(a,b){return new Dj(a.x,a.y,b.x,b.y)}Dj.fromPoints=Ek;Dj.prototype.clone=function(){return new Dj(this.left,this.top,this.right,this.bottom)};Dj.prototype.clone=Dj.prototype.clone;function Dk(a,b){Ck.call(this,a,b)}w(Dk,Ck);u("H.map.layer.TileLayer",Dk);Dk.prototype.vd=function(a,b,c,d,e){if(!C(a,J))throw new D(this.vd,0,a);if(F(b=+b))throw new D(this.vd,1,b);b=Lc(b);this.pixelProjection.Ea(b);a=this.Ae(a);var f=this.Ud(a,b);return this.Je(f,a.left>a.right,b,c,d,e)};Dk.prototype.requestTiles=Dk.prototype.vd;function Lk(a,b){b=b?La(b):{};b.tileSize=b.tileSize||256;b.pixelRatio=b.pixelRatio||Fe();b.max=24;this.c=new Bk(a,b);this.f=new Dk(this.c);b.minWorldSize=this.c.tileSize;b.provider=a;Lk.l.constructor.call(this,b);this.tileSize=this.f.tileSize;this.j=A(this.j,this);this.c.addEventListener(this.c.i.Fa,this.j);a.addEventListener("update",this.j)}w(Lk,ki);u("H.map.layer.ObjectLayer",Lk);Lk.prototype.j=function(a){a.currentTarget!==this.c&&a.target.type===yg.SPATIAL||this.g()}; +var Mk={markers:Te,total:0};Lk.prototype.Ic=function(a,b,c){var d=this.a,e;return d.providesMarkers()&&(e=d.requestMarkers(a,b,!0,c)).length?{markers:e,total:e.length}:Mk};Lk.prototype.requestMarkers=Lk.prototype.Ic;Lk.prototype.Hc=function(a,b,c){var d=this.a,e;return d.providesDomMarkers()&&(e=d.requestDomMarkers(a,b,!0,c)).length?{markers:e,total:e.length}:Mk};Lk.prototype.requestDomMarkers=Lk.prototype.Hc;var Nk={tiles:Te,total:0}; +Lk.prototype.vd=function(a,b,c,d){if(this.a.providesSpatials()){var e=this.f.vd(a,b,c,d);c||(c=this.c,e=Oj(),333*p;l=.8>l||1.2>>0),g=!0));!g&&b&e&&b&(c|d)&&(l||k?(ql(this,e),g=!0):m&&(ql(this, +h),g=!0));this.j=g}}}else this.g=a,f||(this.j=!0);this.m&&this.f.push(a)}return f};kl.prototype.clear=function(){this.f.length=0;this.a=this.m=this.i=this.j=!1;this.g=this.u=this.c=void 0};function ql(a,b){a.b^=a.b&b}kl.prototype.Ka=function(){return this.a};var nl=Hb(new il(0,0));function rl(a){var b;if(a.m){var c=a.f;var d=c.length;var e=0;for(b=new il(0,0);--d&&e=a.Xa&&b-g.timestamp<=a.v?e>a.W?a.W:e:0}function ul(a){return a.c?vl(a.c):B}function ml(a,b){return(b=b?a.g:a.u)?sl(b,a.c):new il(0,0)}function ol(a,b){var c=1;if(a.i){var d=a.c;a=b?a.g:a.u;if(a=wl(a))if(d=wl(d))c=d/a}return c} +function ll(a,b,c,d,e){this.a=new H(a,b);c!==B&&(this.b=new H(c,d),this.c=!0);this.timestamp=e!==B?e:Oj()}ll.prototype.c=!1;function vl(a){var b=a.a;return(a=a.b)?new H(b.x-(b.x-a.x)/2,b.y-(b.y-a.y)/2):B}function xl(a,b){var c=a.a;return(a=a.b)&&a.bb(b)=g.min&&d<=g.max)return l&&k.wb(!0),g.V(k.J(),{boundingBox:a,zoom:d,screenCenter:b,priorityCenter:f,projection:c,cacheOnly:e,size:k.Db(),pixelRatio:k.fb(),cameraMatrix:h});l&&k.wb(!1);return Bj.DONE};Jl.prototype.Td=function(){return this.a};u("H.util.animation.ease.LINEAR",function(a){return a});u("H.util.animation.ease.EASE_IN_QUAD",function(a){return a*a});function Ll(a){return-a*(a-2)}u("H.util.animation.ease.EASE_OUT_QUAD",Ll);u("H.util.animation.ease.EASE_IN_OUT_QUINT",function(a){a*=2;return 1>a?Qc(a,5)/2:(a-=2,Qc(a,5)/2+1)});u("H.util.animation.ease.EASE_OUT_CIRC",function(a){return Pc(2*a-a*a)});function Ml(a,b,c,d){if(!r(this.i=a))throw new D(Ml,0,a);if(F(this.g=+b))throw new D(Ml,1,b);if(!r(this.f=c)&&null!=c)throw new D(Ml,2,c);if(!r(this.c=d)&&null!=d)throw new D(Ml,3,d);this.id=Nl.next();this.a=!1}u("H.util.animation.Animation",Ml);var Nl=new Oe;Ml.prototype.start=function(){var a=this,b=Zj;var c=function(){var e=Oj(),f=e-a.Nc,g=f/a.g;if(1<=g){g=1;var h=!0}a.c&&(g=a.c(g));a.i(g,f,e-d,e);d=e;h?a.stop():a.b=b(c)};a.Nc=Oj();var d=a.Nc;a.a=!0;a.b=b(c)};Ml.prototype.start=Ml.prototype.start; +Ml.prototype.stop=function(a){ak(this.b);this.a=!1;a||this.f&&this.f(this)};Ml.prototype.stop=Ml.prototype.stop;Ml.prototype.Ka=function(){return this.a};Ml.prototype.isRunning=Ml.prototype.Ka;function Ol(a,b){Ol.l.constructor.call(this,a);this.tc=!(!b||!b.tc);this.c={}}w(Ol,Il);Ol.prototype.ef=function(a){Ol.l.ef.call(this,a);this.f=a.rc.ownerDocument};var Pl=function(a,b){b=b.pa();return C(b,Tg)?b.sa:(a[0]=b,a)}.bind(null,[]); +Ol.prototype.V=function(a,b,c,d,e,f,g){var h=this.sb,k,l,m,p;this.j=b=this.c;this.c=c={};if(d>=h.min&&d<=h.max){var q=this.sj(a,d,e,f);var t=q.markers;if(a=t.length){d=[];e=this.Ib;for(f=0;fe.indexOf(l=g.lf)&&(e===Te&&(e=[]),e.push(l),c))break;f||(f=[]);var t=g.style;f.push({fj:t.getPropertyValue(Tl),hn:t.getPropertyPriority(Tl),style:t});t.setProperty(Tl, +"visibility"===Tl?"hidden":"none","important");t=h}if(f)for(b=f.length;b--;)a=f[b],a.style.removeProperty(Tl),ra(a.fj)&&a.style.setProperty(Tl,a.fj,a.hn)}return e};Rl.prototype.Td=function(){return"dom"};function Sl(a,b,c){b.clear(b=c.detail);delete b.lf;a.b--;c=(a=c.gk).Ab();c.b&&c.b(b,c,a)}Rl.prototype.s=function(){this.a.length=0;var a=this.Ib,b=this.c,c;for(c in b)Sl(this,a,b[c]);this.Ib.F();Rl.l.s.call(this)};function Kl(a,b){var c=b||{},d=c.contextType;c=c.contextAttributes;Kl.l.constructor.call(this,b);Ob(a,"Function",Kl,0,"invalid render callback");if(d){if(-1===Xl.indexOf(d))throw new D(Kl,1,"invalid context type");this.f=d}c&&(this.m=c);this.j=a}w(Kl,ki);u("H.map.layer.CanvasLayer",Kl);var Xl=["2d","webgl","webgl2","experimental-webgl"];Kl.prototype.f="2d";Kl.prototype.Ld=function(){return this.f}; +Kl.prototype.V=function(a,b){this.c&&this.c.canvas===a||(this.c=a.getContext(this.f,this.m));return this.j(this.c,b)};Kl.prototype.s=function(){Kl.l.s.call(this);this.c=B};function Yl(a,b){Yl.l.constructor.call(this,b);Ob(a,"Function",Yl,0,"invalid render callback");this.c=a}w(Yl,ki);u("H.map.layer.DomLayer",Yl);Yl.prototype.V=function(a,b){return this.c(a,b)};function Zl(a,b){if(F(this.b=+a))throw new D(Zl,0,a);this.a=0;b&&this.Ok(b)}u("H.util.kinetics.KineticMove",Zl);Zl.prototype.Ok=function(a){this.a=a;return this};Zl.prototype.setInitialSpeed=Zl.prototype.Ok;Zl.prototype.fm=function(){return Math.abs(this.a/this.b)};Zl.prototype.getDuration=Zl.prototype.fm;Zl.prototype.Ee=function(a){return this.a+this.b*a};Zl.prototype.getCurrentSpeed=Zl.prototype.Ee;Zl.prototype.bm=function(a){return this.a*a+this.b*a*a/2};Zl.prototype.getCurrentPath=Zl.prototype.bm;function $l(a,b){this.a=a;this.b=b} +function am(a,b,c){var d=[],e={rc:a.a,width:b.w,height:b.h,ga:a.b};for(a=0;a=f?f:180a)throw new D(this.bf,1,"positive number required");this.ja=a}; +R.prototype.setAnimationDuration=R.prototype.bf;R.prototype.Yg=function(){return this.ja};R.prototype.getAnimationDuration=R.prototype.Yg;R.prototype.ca=Ll;R.prototype.cf=function(a){if(!r(a))throw new D(this.cf,1,"function required");this.ca=a};R.prototype.setAnimationEase=R.prototype.cf;R.prototype.Zg=function(){return this.ca};R.prototype.getAnimationEase=R.prototype.Zg;R.prototype.Ye=function(){this.ca=Ll;this.ja=300};R.prototype.resetAnimationDefaults=R.prototype.Ye;n=R.prototype; +n.lk=function(){dl(this.a);this.ma()};n.Qe=function(a,b){R.l.Qe.call(this,a,b);vm(b)&&(dl(this.a),(a=(a=b.za())&&a.Eb())&&a.getState()===gj.INIT&&a.load())};n.Uh=function(a,b,c){var d;this.jb=Oj();if(b.requestDomMarkers||C(b,Kl)||C(b,Yl)){var e=this.G.na;for(d=e.length;d--;){var f=e[d];if(f.Bb()===b){e.splice(d,1);f.F();break}}}vm(b)&&fl(this.a,this.i);this.f=this.i.ab();0===a&&(Uk(this,b,!1),this.Kb());am(this.Ed,wm(this),xm(this));this.de();c||this.ma()}; +function vm(a){return!(C(a,Yl)||C(a,Kl))}function mm(a){var b=a.i.ab(),c=0,d=b.length;[a.G={}].forEach(function(a){a.Vc=[];a.na=[]});for(a.f=b;cd?c.add(a,b):d-b&&(c.lc(d),c.add(a,e?b-1:b));return this};S.prototype.addLayer=S.prototype.Yi;S.prototype.cg=function(a){var b=this.a.indexOf(a);a!==this.g&&a!==this.c&&-1!==b&&this.a.lc(b);return this};S.prototype.removeLayer=S.prototype.cg; +S.prototype.xd=function(a){this.g!==a&&(this.a.a.length&&this.a.get(0)!==this.c?this.a.set(0,a):this.a.add(a,0),this.g=a);return this};S.prototype.setBaseLayer=S.prototype.xd;S.prototype.Wl=function(){return this.g};S.prototype.getBaseLayer=S.prototype.Wl;S.prototype.Ga=function(a){if(!If(a))throw new D(this.Ga,0,a);return(a=this.f.Ga(a))?hf(a):z};S.prototype.geoToScreen=S.prototype.Ga; +S.prototype.Wa=function(a,b){var c;if(c=+F(a)||2*F(b))throw new D(this.Wa,c-1,arguments[c-1]);return(c=this.f.Wa(a,b))?Jf(c):z};S.prototype.screenToGeo=S.prototype.Wa;S.prototype.jg=function(a,b){return this.f.jg(a,b)};S.prototype.screenToLookAtData=S.prototype.jg;S.prototype.T=function(a){if(!C(a,L))throw new D(this.T,0,a);!this.c&&Jm(this);this.j.gc().T(a);return a};S.prototype.addObject=S.prototype.T; +S.prototype.La=function(a){if(!C(a,L))throw new D(this.La,0,a);!this.c&&Jm(this);this.j.gc().La(a);return a};S.prototype.removeObject=S.prototype.La;S.prototype.Cb=function(a){!this.c&&Jm(this);return this.j.gc().Cb(a)};S.prototype.getObjects=S.prototype.Cb;S.prototype.gd=function(a){var b;Qb(a,this.gd,0,a);!this.c&&Jm(this);var c=a.length;for(b=0;bb;if(0<=a&&1>=a)a!==b&&(this.f=a,c&&this.Aa(vg.VISUAL));else throw new D(this.mc,0);return this};Qm.prototype.setOpacity=Qm.prototype.mc;Qm.prototype.U=function(){var a=Qm.l.U.call(this);a.geometry=ah(this.N).U();a.properties.overlay=!0;return a};Qm.prototype.forWorkerMessage=Qm.prototype.U;function Rm(a){if(!a||!r(a.requestData))throw new D(Rm,0,"options.requestData");Rm.l.constructor.call(this,a);this.G=a.requestData;this.B=!!a.providesDomMarkers}w(Rm,Q);u("H.map.provider.MarkerTileProvider",Rm);Rm.prototype.Md=function(a){return a?a.length+1:1};Rm.prototype.getEntryWeight=Rm.prototype.Md; +Rm.prototype.Pa=function(a,b,c,d,e){var f=this;return this.G(a,b,c,function(e){for(var g=[],k,l,m=e.length;m--;)l=e[m],l.ko=f.getTileKey(a,b,c),l.ba(f),k=l.Ab(),(C(l,Ah)||1===k.getState())&&g.push(e[m]);d(g)},e)};Rm.prototype.requestInternal=Rm.prototype.Pa;Rm.prototype.Wd=function(a,b){b===vg.VISUAL&&(a=this.Ob().get(a.ko))&&(a.valid=!1,sj(this,a))};Rm.prototype.invalidateObject=Rm.prototype.Wd;Rm.prototype.Tb=function(){return this.B};Rm.prototype.providesDomMarkers=Rm.prototype.Tb; +Rm.prototype.Ub=Re;Rm.prototype.providesMarkers=Rm.prototype.Ub;function Sm(a,b){Sm.l.constructor.call(this,a,b)}w(Sm,Ck);u("H.map.layer.MarkerTileLayer",Sm);var Tm={markers:[],total:0,requested:0};function Um(a,b,c,d,e){var f=Lc(c);a.pixelProjection.Ea(f);b=a.Ud(a.Ae(b),f);c=a.Je(b,b.left>b.right,~~c,d,e);a=c.tiles;c=c.total;d=a.length;e=[];var g;for(g=0;g>1;d|e&&a.next();c=$m(a);if("EMPTY"===c)if(a.next(),d=b[1])var f=new d([]);else b!==hn&&(f=new K([]),b===gn&&(f=new N(f)));else if("("===c){f=b[0];b=b[1];if(b){var g=[];Ym(a,0);if(f===cn){var h="("!==$m(a);do g.push(f(a,d,e,h));while(Zm(a))}else{do g.push(f(a,d,e));while(Zm(a))}Ym(a,1);d=new b(g)}else d=f(a,d,e);f=d}else Vm(a,c,'"Z", "M", "ZM", "(" or "EMPTY"'); +a.next()&&Vm(a,c,"end of stream")}return f||z}function ln(a){this.a=a}function $m(a){var b=a.b;if(b===B){for(b=a.a;b.a()===mn;)b.next();if(nn[b.a()])b=b.next(),b=b===on?"":String.fromCharCode(b);else{b.f();do b.next();while(!nn[b.a()]);b=String.fromCharCode.apply(null,b.b())}a.b=b}return b}ln.prototype.next=function(){var a=$m(this);""!==a&&delete this.b;return a};var mn=32,on=-1,pn={ql:mn,nl:40,ol:41,jl:44,ll:on},nn=Object.keys(pn).reduce(function(a,b){a[pn[b]]=!0;return a},Fb());function qn(){}u("H.util.ICharStream",qn);qn.prototype.next=function(){};qn.prototype.f=function(){};qn.prototype.b=function(){};qn.prototype.a=function(){};function rn(a){this.i=String(a);this.j=0;this.c=[];this.g=!1}u("H.util.CharStream",rn);rn.prototype.next=function(){var a=this.i.charCodeAt(this.j++);a=isNaN(a)?-1:a;this.g&&this.c.push(a);return a};rn.prototype.f=function(){this.g=!0;this.c=[]};rn.prototype.b=function(){var a=this.c.slice();this.g=!1;this.c=[];return a};rn.prototype.a=function(){var a=this.i.charCodeAt(this.j);return isNaN(a)?-1:a};u("H.util.wkt.toGeometry",function(a){return Wm(new rn(a))});function sn(){return qf("mapsjs-core","1.8.1","55a4702")}u("H.buildInfo",sn);var tn=function(){var a="maps"+eval('"js-"');var b=y.document.querySelector('script[src*="'+a+'"]');if(!b){var c=y.document.getElementsByTagName("script");var d=new RegExp("^.*"+a);var e=0;for(a=c.length;e>>0),ja=0;function ka(a,b,c){return a.call.apply(a.bind,arguments)}\nfunction ma(a,b,c){if(!a)throw Error();if(2La.indexOf(La)&&La.push(La);\nfunction Ma(a,b,c,d){var e=\"\",f=2>arguments.length,g;f&&(b={H:z.H},c=\"\",d=La.slice());Na(b,!0,function(b,f){try{if(g=b[f],f=Oa(b,g),!(fa(g)&&g.window===g&&g.self===g||fa(g)&&0d.indexOf(g)&&(d.push(g),e=Ma(a,g,c+\".\"+f,d)))return!0}}catch(m){}});f&&(e=e?e.substr(1).replace(\".\"+Da[0]+\".\",\"#\"):\"~\"+(r(a)?Pa(a)+\"()\":Ia(a)));return e}\nfunction Oa(a,b){var c=[];Na(a,!1,function(a,e){a[e]===b&&c.push(e)});return c.sort(Qa)[0]}function Qa(a,b){return b.length-a.length}var Ra=Object[Da[0]][Da[2]];function Na(a,b,c){var d;if(a){for(e in a)if((!b||Ra.call(a,e))&&c(a,e,!0))return;for(d=Da.length;d--;){var e=Da[d];if((!b||Ra.call(a,e))&&c(a,e,!1))break}}}function Pa(a){return(a=/^\\s*function ([^\\( ]+)/.exec(a))?a[1]:\"anonymous\"}function Sa(a,b,c){c[b]=\"#\"+b};function D(a,b,c){this.g=[];b&&this.$(b);if(c&&!r(c))throw new B(D,2,c);this.b=0;this.filter=c;this.a={};this.f=this.c=null;this.Da(a)}t(\"H.util.Cache\",D);D.prototype.add=function(a,b,c){c=+c;if(!Ka(c)||0>c)throw new B(this.add,2,c);a=String(a);var d=this.a[a];var e=!0;this.filter&&(e=this.filter(a,b,c));d?e?(this.b+=c-d.size,d.size=c,d.data=b,Ta(this,d)):Ua(this,d,!0):e&&(this.a[a]=Va(this,{id:a,data:b,size:c,A:null,D:null},this.c));Wa(this);return e};D.prototype.add=D.prototype.add;\nD.prototype.$=function(a){if(!r(a))throw new B(this.$,0,a);this.g.push(a)};D.prototype.registerOnDrop=D.prototype.$;D.prototype.oa=function(a){this.g=this.g.filter(function(b){return b!==a})};D.prototype.deRegisterOnDrop=D.prototype.oa;D.prototype.get=function(a,b){return(a=b?this.a[a]:Ta(this,this.a[a]))&&a.data};D.prototype.get=D.prototype.get;D.prototype.qa=function(a){var b;(b=this.a[a])&&Ua(this,b,!0)};D.prototype.drop=D.prototype.qa;\nD.prototype.forEach=function(a,b,c){var d;for(d in this.a){var e=this.a[d];(c?c(d,e.data,e.size):1)&&a.call(b,d,e.data,e.size)}};D.prototype.forEach=D.prototype.forEach;D.prototype.S=function(a){var b;for(b in this.a){var c=this.a[b];(a?a(b,c.data,c.size):1)&&Ua(this,this.a[b],!0)}};D.prototype.removeAll=D.prototype.S;D.prototype.Da=function(a){if(!(0<+a))throw new B(D.prototype.Da,0,a);this.i=+a;Wa(this);return this};D.prototype.setMaxSize=D.prototype.Da;D.prototype.ob=function(){return this.i};\nD.prototype.getMaxSize=D.prototype.ob;D.prototype.kb=function(){return this.b};D.prototype.getCurrentSize=D.prototype.kb;function Ta(a,b){b&&(a.c=Va(a,b,a.c));return b}function Wa(a){for(;a.b>a.i&&a.f;)Ua(a,a.f,!0)}function Va(a,b,c){if(c!==b){(b.A||b.D)&&Ua(a,b);if(b.A=c)b.D=c.D,c.D=b;b.D||(a.c=b);b.A||(a.f=b);a.b+=b.size}return b}\nfunction Ua(a,b,c){var d=b.D,e=b.A;if(d||e||b==a.c&&b==a.f)if(d?d.A=e:a.c=e,e?e.D=d:a.f=d,a.b-=b.size,c){for(c=a.g.length;c--;)a.g[c].call(a,b.id,b.data,b.size);delete a.a[b.id]}b.A=b.D=null};function E(){}t(\"H.service.extension.dataView.ITable\",E);E.prototype.ta=function(){};E.prototype.getMeta=E.prototype.ta;E.prototype.ua=function(){};E.prototype.getRowCount=E.prototype.ua;E.prototype.ha=function(){};E.prototype.getRow=E.prototype.ha;E.prototype.C=function(){};E.prototype.getColumnNames=E.prototype.C;E.prototype.sa=function(){};E.prototype.getColumn=E.prototype.sa;E.prototype.s=function(){};E.prototype.getCell=E.prototype.s;E.prototype.concat=function(){};E.prototype.concat=E.prototype.concat;function $a(){}t(\"H.service.extension.dataView.IRow\",$a);$a.prototype.C=function(){};$a.prototype.getColumnNames=$a.prototype.C;$a.prototype.s=function(){};$a.prototype.getCell=$a.prototype.s;$a.prototype.va=function(){};$a.prototype.getTable=$a.prototype.va;function ab(a,b){this.a=a;this.b=b}t(\"H.service.extension.dataView.ObjRow\",ab);ab.prototype.C=function(){return this.a.C()};ab.prototype.getColumnNames=ab.prototype.C;ab.prototype.s=function(a){return this.a.s(this.b,a)};ab.prototype.getCell=ab.prototype.s;ab.prototype.va=function(){return this.a};ab.prototype.getTable=ab.prototype.va;function bb(){}t(\"H.service.extension.dataView.IColumn\",bb);bb.prototype.s=function(){};bb.prototype.getCell=bb.prototype.s;function cb(a,b){this.b=a;this.a=b}t(\"H.service.extension.dataView.ObjColumn\",cb);cb.prototype.s=function(a){return this.b.s(a,this.a)};cb.prototype.getCell=cb.prototype.s;function B(a,b,c){var d=arguments.length;b=1=f?e=a:1<=f?e=b:e=new G(a.x+f*c,a.y+f*d)}return e};G.prototype.getNearest=G.prototype.pb;G.prototype.pa=function(a){return hb(ib(this.x-a.x,2)+ib(this.y-a.y,2))};G.prototype.distance=G.prototype.pa;G.fromIPoint=function(a){if(!a)throw Error(\"invalid argument\");return a instanceof G?a:new G(a.x,a.y)};var H=Math,jb=H.min,kb=H.max,eb=H.round,fb=H.floor,gb=H.ceil,lb=H.abs,mb=H.log,hb=H.sqrt,ib=H.pow,nb=H.exp,ob=H.sin,pb=H.asin,qb=H.cos,rb=H.tan,sb=H.atan,tb=H.atan2,ub=H.LN2,J=H.PI,vb=J/2,wb=J/4,xb=2*J,zb=3*J,Ab=J/180,Bb=180/J,Cb=1/0;ib(-2,53);function Db(a,b){var c;return 0>(c=a%b)===0>b?c:c+b}t(\"H.math.normalize\",function(a,b,c){b-=c=c||0;a-=c;return a-fb(a/b)*b+c});function Eb(a,b,c){return a>c?c:a=b-d&&a<=c+d:a>=c-d&&a<=b+d}function Gb(a,b,c,d,e,f){return hb(ib((a-e)*(d-f)-(b-f)*(c-e),2)/(ib(c-e,2)+ib(d-f,2)))}var Hb={NONE:0,VERTEX:1,EDGE:2,SURFACE:3};t(\"H.math.CoverType\",Hb);\nfunction Ib(a,b,c,d,e){for(var f=c.length,g=f,h,k,m,q=c[0],n=0,u=0,C=0,y=d/2||0,v=e?1:3;1!=n&&g>v;){h=c[--g];d=c[--g];m=c[g?g-1:(f+(g-1))%f];k=c[g?g-2:(f+(g-2))%f];if(d>=a-y&&d<=a+y&&h>=b-y&&h<=b+y||k>=a-y&&k<=a+y&&m>=b-y&&m<=b+y)n=1;else if(!n&&d===a)k===a&&(hb||h>b&&ma||q>=a&&k=b?++u:++C),n=Fb(b,h,m,y)&&Gb(a,b,d,h,k,m)<=y?2:0;else if(!n&&Fb(a,d,k,y)){if(da||d>a&&kb,C+=qh){if(h>e||ge||hb){if(b>c||ac||bc)return;g=d}if(ae)return;a=f}h>e&&(b=a+(e-g)*(b-a)/(h-g),h=e);b>c&&(h=g+(c-a)*(h-g)/(b-a),b=c);q&&(a=-a,b=-b);return k?[new G(h,-b),new G(g,-a)]:[new G(g,-a),new G(h,-b)]}\nfunction Lb(a,b,c){a=Mb(a,!0);b=Mb(b,!1);var d,e;var f={};var g=d=1;switch(~~(c||0)){case 1:g=d=0;break;case 2:d=0;g=1;break;case 3:d=1,g=0}c=d;var h=g;if(b&&a){b.ea=Nb(b.x,b.y,null,Ob(b));a.ea=Nb(a.x,a.y,null,Ob(a));for(g=b;g.next;g=g.next)if(!g.B)for(d=a;d.next;d=d.next)if(!d.B){var k=Pb(g.next);var m=Pb(d.next);if(e=Qb(g,k,d,m,f)){e=f.Za;var q=f.$a;var n=f.Rb;var u=f.Sb;e=Nb(n,u,null,null,null,null,!0,0,0,e);Rb(e,g,k);k=Nb(n,u,null,null,null,null,!0,0,0,q);Rb(k,d,m);e.za=k;k.za=e}}f=Sb(b,a);c&&\n(f=!f);for(g=b;g;g=g.next)g.B&&(g.ra=f,f=!f);f=Sb(a,b);h&&(f=!f);for(d=a;d.next;d=d.next)d.B&&(d.ra=f,f=!f);Tb(b);for(Tb(a);(a=Ub(b))!=b;){for(c=null;!a.ma;a=a.za){for(f=a.ra;;){c=Nb(a.x,a.y,c);c.artificial=a.B||a.Ab;a.ma=1;a=f?a.next:a.u;if(!a)break;if(a.B){a.ma=1;break}}if(!a)break}c.Ra=C;var C=c}return C}}t(\"H.math.clipping.clipPolygon\",Lb);\nfunction Nb(a,b,c,d,e,f,g,h,k,m){a={x:a,y:b,next:c||null,u:d||null,Ra:e||null,za:f||null,B:!!g,ra:h||0,ma:k||0,alpha:m||0};d&&(a.u.next=a);c&&(a.next.u=a);return a}function Pb(a){for(;a&&a.B;)a=a.next;return a}function Ob(a){if(a)for(;a.next;)a=a.next;return a}function Ub(a){var b=a;if(b){do b=b.next;while(b!=a&&(!b.B||b.B&&b.ma))}return b}function Tb(a){var b=Ob(a);b.u.next=a;a.u=b.u}\nfunction Qb(a,b,c,d,e){var f,g=b.x-a.x,h=b.y-a.y;var k=d.x-c.x;var m=d.y-c.y;var q=g*m-h*k;if(!q)return 0;k=((c.x-a.x)*m-(c.y-a.y)*k)/q;q=(h*(c.x-a.x)-g*(c.y-a.y))/q;if(0>k||1q||1a.b&&(a.b++,b.next=a.a,a.a=b)};function jc(){this.b=this.a=null}var nc=new hc(function(){return new kc},function(a){a.reset()});jc.prototype.add=function(a,b){var c=nc.get();c.set(a,b);this.b?this.b.next=c:this.a=c;this.b=c};function oc(){var a=pc,b=null;a.a&&(b=a.a,a.a=a.a.next,a.a||(a.b=null),b.next=null);return b}function kc(){this.next=this.b=this.a=null}kc.prototype.set=function(a,b){this.a=a;this.b=b;this.next=null};kc.prototype.reset=function(){this.next=this.b=this.a=null};var qc=String.prototype.trim?function(a){return a.trim()}:function(a){return/^[\\s\\xa0]*([\\s\\S]*?)[\\s\\xa0]*$/.exec(a)[1]};function rc(a,b){return ab?1:0};var sc;a:{var tc=p.navigator;if(tc){var uc=tc.userAgent;if(uc){sc=uc;break a}}sc=\"\"}function M(a){return-1!=sc.indexOf(a)};function vc(a){p.setTimeout(function(){throw a;},0)}var wc;\nfunction xc(){var a=p.MessageChannel;\"undefined\"===typeof a&&\"undefined\"!==typeof window&&window.postMessage&&window.addEventListener&&!M(\"Presto\")&&(a=function(){var a=document.createElement(\"IFRAME\");a.style.display=\"none\";a.src=\"\";document.documentElement.appendChild(a);var b=a.contentWindow;a=b.document;a.open();a.write(\"\");a.close();var c=\"callImmediate\"+Math.random(),d=\"file:\"==b.location.protocol?\"*\":b.location.protocol+\"//\"+b.location.host;a=na(function(a){if((\"*\"==d||a.origin==d)&&a.data==\nc)this.port1.onmessage()},this);b.addEventListener(\"message\",a,!1);this.port1={};this.port2={postMessage:function(){b.postMessage(c,d)}}});if(\"undefined\"!==typeof a&&!M(\"Trident\")&&!M(\"MSIE\")){var b=new a,c={},d=c;b.port1.onmessage=function(){if(void 0!==c.next){c=c.next;var a=c.Ia;c.Ia=null;a()}};return function(a){d.next={Ia:a};d=d.next;b.port2.postMessage(0)}}return\"undefined\"!==typeof document&&\"onreadystatechange\"in document.createElement(\"SCRIPT\")?function(a){var b=document.createElement(\"SCRIPT\");\nb.onreadystatechange=function(){b.onreadystatechange=null;b.parentNode.removeChild(b);b=null;a();a=null};document.documentElement.appendChild(b)}:function(a){p.setTimeout(a,0)}};function yc(a,b){zc||Ac();Bc||(zc(),Bc=!0);pc.add(a,b)}var zc;function Ac(){if(-1!=String(p.Promise).indexOf(\"[native code]\")){var a=p.Promise.resolve(void 0);zc=function(){a.then(Cc)}}else zc=function(){var a=Cc;!r(p.setImmediate)||p.Window&&p.Window.prototype&&!M(\"Edge\")&&p.Window.prototype.setImmediate==p.setImmediate?(wc||(wc=xc()),wc(a)):p.setImmediate(a)}}var Bc=!1,pc=new jc;function Cc(){for(var a;a=oc();){try{a.a.call(a.b)}catch(b){vc(b)}ic(nc,a)}Bc=!1};function O(a){this.a=Dc;this.v=void 0;this.f=this.b=this.c=null;this.g=this.i=!1;if(a!=da)try{var b=this;a.call(void 0,function(a){Ec(b,Fc,a)},function(a){Ec(b,Gc,a)})}catch(c){Ec(this,Gc,c)}}var Dc=0,Fc=2,Gc=3;function Hc(){this.next=this.c=this.b=this.f=this.a=null;this.g=!1}Hc.prototype.reset=function(){this.c=this.b=this.f=this.a=null;this.g=!1};var Ic=new hc(function(){return new Hc},function(a){a.reset()});function Jc(a,b,c){var d=Ic.get();d.f=a;d.b=b;d.c=c;return d}\nfunction Kc(a,b,c){Lc(a,b,c,null)||yc(pa(b,a))}function Mc(a){return new O(function(b,c){var d=a.length,e=[];if(d)for(var f=function(a,c){d--;e[a]=c;0==d&&b(e)},g=function(a){c(a)},h=0,k;hthis.X){this.f();var a=this.c(),b=this.b,c=a.a[b].indexOf(this);-1parseFloat(ud)){td=String(wd);break a}}td=ud}var xd={},yd;var zd=p.document;yd=zd&&od?sd()||(\"CSS1Compat\"==zd.compatMode?parseInt(td,10):5):void 0;var Ad;(Ad=!od)||(Ad=9<=Number(yd));var Bd=Ad,Cd;\nif(Cd=od){var Dd;if(Object.prototype.hasOwnProperty.call(xd,\"9\"))Dd=xd[\"9\"];else{for(var Ed=0,Fd=qc(String(td)).split(\".\"),Gd=qc(\"9\").split(\".\"),Hd=Math.max(Fd.length,Gd.length),Id=0;0==Ed&&Id=a.keyCode)a.keyCode=-1}catch(b){}};var Rd=\"closure_lm_\"+(1E6*Math.random()|0),Sd={},Td=0;function Ud(a,b,c,d,e){if(d&&d.once)Vd(a,b,c,d,e);else if(\"array\"==ea(b))for(var f=0;fd.keyCode||void 0!=d.returnValue)){a:{var e=!1;if(0==d.keyCode)try{d.keyCode=-1;break a}catch(g){e=!0}if(e||void 0==d.returnValue)d.returnValue=!0}d=[];for(e=b.currentTarget;e;e=e.parentNode)d.push(e);a=a.type;for(e=d.length-1;!b.a&&0<=e;e--){b.currentTarget=d[e];var f=de(d[e],a,!0,b);c=c&&f}for(e=0;!b.a&&e>>0);function Wd(a){if(r(a))return a;a[ge]||(a[ge]=function(b){return a.handleEvent(b)});return a[ge]};function Q(){K.call(this);this.b=new jd(this);this.v=this;this.i=null}qa(Q,K);Q.prototype[fd]=!0;l=Q.prototype;l.I=function(){return this.i};l.Ea=function(a){this.i=a};l.addEventListener=function(a,b,c,d){Ud(this,a,b,c,d)};l.removeEventListener=function(a,b,c,d){be(this,a,b,c,d)};\nl.dispatchEvent=function(a){var b,c=this.I();if(c)for(b=[];c;c=c.I())b.push(c);c=this.v;var d=a.type||a;if(aa(a))a=new L(a,c);else if(a instanceof L)a.target=a.target||c;else{var e=a;a=new L(d,c);va(a,e)}e=!0;if(b)for(var f=b.length-1;!a.a&&0<=f;f--){var g=a.currentTarget=b[f];e=g.O(d,!0,a)&&e}a.a||(g=a.currentTarget=c,e=g.O(d,!0,a)&&e,a.a||(e=g.O(d,!1,a)&&e));if(b)for(f=0;!a.a&&fd||180a^0>b)&&180vb&&(f=0vb?J:0))%xb-J)*Bb):this};U.prototype.walk=U.prototype.Qb;U.prototype.ga=function(){return new V(this.lat,this.lng,this.lat,this.lng)};U.prototype.getBoundingBox=U.prototype.ga;function pe(a,b,c){var d=fa(a)&&!(Ja(a.lat=le(a.lat))||Ja(a.lng=me(a.lng))||a.alt!==A&&Ja(a.alt=ne(a.alt)));if(!d&&b)throw new B(b,c,a);return d}U.validate=pe;\nfunction qe(a){if(!a)throw new B(qe,0,a);return new U(a.lat,a.lng,a.alt)}U.fromIPoint=qe;U.prototype.f=\"Point\";U.prototype.g=function(a){a.push(\"(\",this.lng,\" \",this.lat,\")\");return a};var W={};t(\"H.geo.mercator\",W);W.a=function(a){return jb(1,kb(0,.5-mb(rb(wb+vb*a/180))/J/2))};W.b=function(a){return a/360+.5};W.ja=function(a,b,c){c?(c.x=W.b(b),c.y=W.a(a)):c=new G(W.b(b),W.a(a));return c};W.latLngToPoint=W.ja;W.hb=function(a,b){return W.ja(a.lat,a.lng,b)};W.geoToPoint=W.hb;W.f=function(a){return 0>=a?90:1<=a?-90:Bb*(2*sb(nb(J*(1-2*a)))-vb)};W.c=function(a){return 360*(1===a?1:Db(a,1))-180};W.V=function(a,b,c){c?(c.lat=W.f(b),c.lng=W.c(a)):c=new U(W.f(b),W.c(a));return c};\nW.xyToGeo=W.V;W.Gb=function(a,b){return W.V(a.x,a.y,b)};W.pointToGeo=W.Gb;t(\"H.util.constants.DEFAULT_MIN_ZOOM_LEVEL\",0);t(\"H.util.constants.DEFAULT_MAX_ZOOM_LEVEL\",22);function Y(a,b){this.projection=a||W;this.b=0;this.a=this.exp=mb(b||256)/ub;re(this);this.y=this.x=0}t(\"H.geo.PixelProjection\",Y);var se=lb(24)+lb(-8);Y.prototype.aa=function(a){if(Ja(a))throw new B(this.aa,0,a);var b=this.x/this.w;var c=this.y/this.h;this.b=a;this.a=this.exp+a;re(this);this.x=b*this.w;this.y=c*this.h};Y.prototype.rescale=Y.prototype.aa;function re(a){a.a>se&&(a.a=se);a.w=ib(2,a.a);a.h=ib(2,a.a)}Y.prototype.Ma=function(){return this.b||0};Y.prototype.getZoomScale=Y.prototype.Ma;\nY.prototype.gb=function(a,b){a=this.projection.ja(a.lat,a.lng,b);a.x=a.x*this.w-this.x;a.y=a.y*this.h-this.y;return a};Y.prototype.geoToPixel=Y.prototype.gb;Y.prototype.Ba=function(a,b){return this.projection.V((a.x+this.x)/this.w,(a.y+this.y)/this.h,b)};Y.prototype.pixelToGeo=Y.prototype.Ba;Y.prototype.V=function(a,b,c){return this.projection.V((a+this.x)/this.w,(b+this.y)/this.h,c)};Y.prototype.xyToGeo=Y.prototype.V;\nY.prototype.wa=function(a,b,c){a=this.projection.ja(a,b,c);a.x=a.x*this.w-this.x;a.y=a.y*this.h-this.y;return a};Y.prototype.latLngToPixel=Y.prototype.wa;Y.prototype.Hb=function(a){return new G(a.x*this.w-this.x,a.y*this.h-this.y)};Y.prototype.pointToPixel=Y.prototype.Hb;t(\"H.util.Disposable\",K);K.prototype.L=K.prototype.L;K.prototype.addOnDisposeCallback=K.prototype.L;t(\"H.util.dispose\",function(a){a&&\"function\"==typeof a.N&&a.N()});function te(a,b,c,d){this.key=\"\";this.x=a;this.y=b;this.b=c;this.W=d;this.a=Nc()}te.prototype.then=function(a,b,c){return this.a.a.then(a,b,c)};te.prototype.reject=function(a){this.a.reject(a)};te.prototype.cancel=function(){this.a.a.cancel()};function Z(a,b,c,d,e,f){if(a&&b)this.Wa(a),this.Ca(b),this.Fa(c),this.Va(e),this.Ua(f),this.Ga(d);else throw Error('Parameters \"scheme\" and \"host\" must be specified');}t(\"H.service.Url\",Z);\nfunction ue(a,b){var c=z.document,d,e=c&&c.createElement(\"a\"),f=\"\";if(c){if(b){var g=(d=c.getElementsByTagName(\"base\")[0])&&d.href;var h=c.head;var k=d||h.appendChild(c.createElement(\"base\"));k.href=b}e.href=a;f=e.href;b&&(d?d.href=g:h.removeChild(k))}else/[\\w]+:\\/\\//.test(a)&&(f=a);g=/(?:(\\w+):\\/\\/)?(?:([^:]+):([^@/]*)@)?([^/:]+)?(?:[:]{1}([0-9]+))?(\\/[^?#]*)?(\\?[^#]+)?(#.*)?/.exec(f);a=g[1];k=g[4];b=g[5];h=g[6];c=g[7];d=g[8];!g[2]&&k&&/@/.test(k)&&(k=k.split(\"@\")[1]);g=k;h=h&&0f||(g=a[c++],224>f?f=(f&31)<<6|g&63:(h=a[c++],240>f?f=(f&15)<<12|(g&63)<<6|h&63:(k=a[c++],f=(f&7)<<18|(g&63)<<12|(h&63)<<6|k&63))),65536>f?d+=String.fromCharCode(f):(f-=65536,d+=String.fromCharCode((f>>10)+55296,(f&1023)+56320));c=d}e(c)}}}var Ge=0,Ie=1;function V(a,b,c,d){Je(this,le(a,V,0),me(b,V,1),le(c,V,2),me(d,V,3))}qa(V,oe);t(\"H.geo.Rect\",V);V.prototype.f=\"Polygon\";V.prototype.g=function(a){var b=this.o,c=this.j,d=this.m,e=this.l;a.push(\"(\",\"(\",c,\" \",b,\",\",e,\" \",b,\",\",e,\" \",d,\",\",c,\" \",d,\",\",c,\" \",b,\")\",\")\");return a};V.prototype.G=function(a){return this===a||!!a&&this.o===a.o&&this.j===a.j&&this.m===a.m&&this.l===a.l};V.prototype.equals=V.prototype.G;V.prototype.clone=function(){return new V(this.o,this.j,this.m,this.l)};\nV.prototype.clone=V.prototype.clone;function Je(a,b,c,d,e){a.j=c;a.l=e;bthis.l};V.prototype.isCDB=V.prototype.zb;V.prototype.Cb=function(){return!this.J()&&!this.P()};V.prototype.isEmpty=V.prototype.Cb;V.prototype.ga=function(){return new V(this.o,this.j,this.m,this.l)};V.prototype.getBoundingBox=V.prototype.ga;V.prototype.ca=function(a,b,c){var d=this.H();c||(a=le(a,this.ca,0),b=me(b,this.ca,1));b=this.K(a,b,c);a=b.H();return a.lat===d.lat&&a.lng===d.lng&&this.P()===b.P()&&this.J()===b.J()};V.prototype.containsLatLng=V.prototype.ca;\nV.prototype.da=function(a,b){b||pe(a,this.da,0);return this.ca(a.lat,a.lng,b)};V.prototype.containsPoint=V.prototype.da;V.prototype.Ja=function(a,b){var c=this.H();if(!b&&!Ea(a,V))throw new B(this.Ja,0,a);b=this.ka(a,b);a=b.H();return a.lat===c.lat&&a.lng===c.lng&&this.P()===b.P()&&this.J()===b.J()};V.prototype.containsRect=V.prototype.Ja;\nV.prototype.K=function(a,b,c,d){if(!c){if(Ja(a=le(a)))throw new B(this.K,0,a);if(Ja(b=me(b)))throw new B(this.K,1,b);}return Me(this.o,this.j,this.m,this.l,a,b,a,b,d)};V.prototype.mergeLatLng=V.prototype.K;V.prototype.Qa=function(a,b,c){b||pe(a,this.Qa,0);return this.K(a.lat,a.lng,b,c)};V.prototype.mergePoint=V.prototype.Qa;V.prototype.ka=function(a,b,c){if(!b&&!Ea(a,V))throw new B(this.ka,0,a);return Me(this.o,this.j,this.m,this.l,a.o,a.j,a.m,a.l,c)};V.prototype.mergeRect=V.prototype.ka;\nV.prototype.Z=function(a,b,c,d,e,f){e||(a=le(a,this.Z,0),b=me(b,this.Z,1),c=le(c,this.Z,2),d=me(d,this.Z,3));return Me(this.o,this.j,this.m,this.l,a,b,c,d,f)};V.prototype.mergeTopLeftBottomRight=V.prototype.Z;V.prototype.Oa=function(a,b){var c=this.j<=this.l,d=a.j<=a.l,e=this.ja?360:0)}\nfunction Ke(a,b){a+=b/2;return a-(180q-1E-6?360:0;if(180>q-1E-6){m=b;var n=h}else q=360-q,m=f,n=d;q=q+e/2+g/2;360<=q+5E-7?(m=-180,n=180):q-5E-7k?-(g+a.lng):k;a=c+(0>k?2*k:0);a=-180>a?360+a:a;e+=0h?f+2*h:f;-90>=f&&(f=-90);return b?Je(b,d,a,f,e):new V(d,a,f,e)};V.prototype.resizeToCenter=V.prototype.Sa;function Re(a,b,c,d){var e=!!c,f,g=0,h=0,k=0,m=0,q=0,n,u=-1;var C=z.Float32Array;var y,v=[];if(b){b=Ca(b);a=Ca(a);e&&(f=Ca(c));c=b.length;d=d?1E-7:1E-5;for(y=new C(3*c);gu&&(u=g);g++;m=y[h++]=m+la*d;k=y[h++]=k+I*d;e&&(q=y[h]=q+n);h++}0<=u&&1=a[0];e--)for(b=d[1];b<=a[1];b++)c.push(e,b);return c};function Xe(a,b){var c=a.tileSize||256;this.b={};this.v=ue(a.serverUrl);this.g=b;this.Aa=a.layerConfigs||[];this.i=a.projected;this.R=c;this.xa=!1!==a.batchTiles;this.Lb=a.onlyOutline;this.Pb=new Y(Ba,c);this.f=new Y(Ba,c);this.f.aa(22-Math.log(c)/Math.LN2+8)}qa(Xe,K);l=Xe.prototype;l.Kb=function(a,b,c){var d=this.R,e={x:a*d,y:b*d};d={x:a*d+(d-1),y:b*d+(d-1)};var f=this.Pb;f.aa(c);e=f.Ba(e);d=f.Ba(d);return Ye(this,new V(e.lat,e.lng,d.lat,d.lng),this.Aa,{x:a,y:b,z:c})};\nl.Jb=function(a,b,c,d,e){return Ye(this,new V(a,b,c,d),e)};\nfunction Ye(a,b,c,d){var e=Ze(c),f=e.length,g={},h,k=a.b,m=[],q=[];for(c=0;c=lc){X===lc&&(N=S.length);var ha=Jb([w],k,m,q,f,!1);jf(ha,g,b,d,S)}else{var yb=yb||(yb=ff(k,m,q,f,!0));if(X>=v)if(X===v&&(R=S.length),Za)for(n=Za.length;n--;){if(ha=kf(Za[n],w),u=ha.length){for(ba=ba||[];u--;)ba.push(n);jf(ha,g,b,d,S)}}else ha=kf(yb,w),jf(ha,g,b,d,S);else if(ha=kf(yb,w),jf(ha,g,b,d,S),1>d;g[h++]=k.y-c>>d}return g}\nl.fb=function(a,b){var c=b.Ob,d=b.bb,e=b.yb,f=b.Eb;b=b.cb;for(var g=[],h,k={Rows:g},m,q=a?a.length:0,n=0,u,C=c.Rows,y=C.length,v;n=c,f=y.Na,d=f.length,b?(m.push(d),m=m.concat(f)):\n(k+=d,q=q.concat(f));c=[k].concat(q).concat(m);c=e?(new Uint32Array(c)).buffer:c;this.postMessage(c,[c])});self.addEventListener(\"message\",function(a){a=new Ce(a.data);var b=ye[a.b];if(b)try{b.apply(a,a.c)}catch(c){a.postError(c.message)}else a.postError(\"processor_not_found\")});(function(){var a=new Ce;var b=function(b,d){Be.apply(a,[b,d,!0])};b(\"0\",ze);b(\"1\",Be);b(\"2\",Ae);b(\"3\",He)})();\n"; +!function(){var e=function(){if(("undefined"==typeof self||!("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope))&&("undefined"!=typeof module&&module.exports||"undefined"!=typeof window))var sp=e.toString(),lp="",up="undefined"!=typeof document&&document.currentScript instanceof HTMLScriptElement?document.currentScript.src:"";!function(){"use strict";function n(e){return t.call(e).slice(8,-1)}var t={}.toString,e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e,t){return e(t={exports:{}},t.exports),t.exports}function r(e){return e&&e.Math==Math&&e}function o(e){try{return!!e()}catch(e){return!0}}function a(e){return"object"==typeof e?null!==e:"function"==typeof e}function s(e){return y?g.createElement(e):{}}function f(e){if(!a(e))throw TypeError(String(e)+" is not an object");return e}function l(e,t){if(!a(e))return e;var i,r;if(t&&"function"==typeof(i=e.toString)&&!a(r=i.call(e)))return r;if("function"==typeof(i=e.valueOf)&&!a(r=i.call(e)))return r;if(!t&&"function"==typeof(i=e.toString)&&!a(r=i.call(e)))return r;throw TypeError("Can't convert object to primitive value")}function m(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function c(t,i){try{T(p,t,i)}catch(e){p[t]=i}return i}function u(e){return"Symbol(".concat(void 0===e?"":e,")_",(++k+E).toString(36))}function h(e){return R[e]||(R[e]=M&&S[e]||(M?S:u)("Symbol."+e))}function d(e){var t,i,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),P))?i:z?n(t):"Object"==(r=n(t))&&"function"==typeof t.callee?"Arguments":r}var _="object",p=r(typeof globalThis==_&&globalThis)||r(typeof window==_&&window)||r(typeof self==_&&self)||r(typeof e==_&&e)||Function("return this")(),v=!o(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),g=p.document,y=a(g)&&a(g.createElement),x=!v&&!o(function(){return 7!=Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}),b=Object.defineProperty,A={f:v?b:function(e,t,i){if(f(e),t=l(t,!0),f(i),x)try{return b(e,t,i)}catch(e){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},T=v?function(e,t,i){return A.f(e,t,m(1,i))}:function(e,t,i){return e[t]=i,e},w=i(function(e){var t="__core-js_shared__",i=p[t]||c(t,{});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.1.0",mode:"global",copyright:"\xa9 2019 Denis Pushkarev (zloirock.ru)"})}),k=0,E=Math.random(),M=!o(function(){return!String(Symbol())}),R=w("wks"),S=p.Symbol,P=h("toStringTag"),z="Arguments"==n(function(){return arguments}()),N={};N[h("toStringTag")]="z";function O(e,t){return j.call(e,t)}function I(e){return V[e]||(V[e]=u(e))}var L,C,F,D="[object z]"!==String(N)?function(){return"[object "+d(this)+"]"}:N.toString,j={}.hasOwnProperty,U=w("native-function-to-string",Function.toString),G=p.WeakMap,B="function"==typeof G&&/native code/.test(U.call(G)),V=w("keys"),q={},Y=p.WeakMap;if(B){var W=new Y,X=W.get,Z=W.has,K=W.set;L=function(e,t){return K.call(W,e,t),t},C=function(e){return X.call(W,e)||{}},F=function(e){return Z.call(W,e)}}else{var J=I("state");q[J]=!0,L=function(e,t){return T(e,J,t),t},C=function(e){return O(e,J)?e[J]:{}},F=function(e){return O(e,J)}}var $={set:L,get:C,has:F,enforce:function(e){return F(e)?C(e):L(e,{})},getterFor:function(i){return function(e){var t;if(!a(e)||(t=C(e)).type!==i)throw TypeError("Incompatible receiver, "+i+" required");return t}}},Q=i(function(e){var t=$.get,s=$.enforce,l=String(U).split("toString");w("inspectSource",function(e){return U.call(e)}),(e.exports=function(e,t,i,r){var n=!!r&&!!r.unsafe,o=!!r&&!!r.enumerable,a=!!r&&!!r.noTargetGet;"function"==typeof i&&("string"!=typeof t||O(i,"name")||T(i,"name",t),s(i).source=l.join("string"==typeof t?t:"")),e!==p?(n?!a&&e[t]&&(o=!0):delete e[t],o?e[t]=i:T(e,t,i)):o?e[t]=i:c(t,i)})(Function.prototype,"toString",function(){return"function"==typeof this&&t(this).source||U.call(this)})}),ee=Object.prototype;D!==ee.toString&&Q(ee,"toString",D,{unsafe:!0});function te(e){return isNaN(e=+e)?0:(0n;)O(r,i=t[n++])&&(~ke(o,i)||o.push(i));return o}function ae(e,t){for(var i=ze(t),r=A.f,n=be.f,o=0;odocument.F=Object"),e.close(),Qe=e.F;i--;)delete Qe[$e][Ee[i]];return Qe()},et=Object.create||function(e,t){var i;return null!==e?(He[$e]=f(e),i=new He,He[$e]=null,i[Je]=e):i=Qe(),void 0===t?i:Xe(i,t)};q[Je]=!0;function tt(e,t,i){e&&!O(e=i?e:e.prototype,at)&&ot(e,at,{configurable:!0,value:t})}function it(){return this}function rt(){return this}function nt(e,t,i,r,n,o,a){function s(e){if(e===n&&p)return p;if(!ft&&e in d)return d[e];switch(e){case"keys":case dt:case _t:return function(){return new i(this,e)}}return function(){return new i(this)}}!function(e,t,i){var r=t+" Iterator";e.prototype=et(lt,{next:m(1,i)}),tt(e,r,!1),st[r]=it}(i,t,r);var l,u,c,h=t+" Iterator",f=!1,d=e.prototype,_=d[ct]||d["@@iterator"]||n&&d[n],p=!ft&&_||s(n),v="Array"==t&&d.entries||_;if(v&&(l=Be(v.call(new e)),ht!==Object.prototype&&l.next&&(Be(l)!==ht&&(ut?ut(l,ht):"function"!=typeof l[ct]&&T(l,ct,rt)),tt(l,h,!0))),n==dt&&_&&_.name!==dt&&(f=!0,p=function(){return _.call(this)}),d[ct]!==p&&T(d,ct,p),st[t]=p,n)if(u={values:s(dt),keys:o?p:s("keys"),entries:s(_t)},a)for(c in u)!ft&&!f&&c in d||Q(d,c,u[c]);else le({target:t,proto:!0,forced:ft||f},u);return u}var ot=A.f,at=h("toStringTag"),st={},lt=Ye.IteratorPrototype,ut=Object.setPrototypeOf||("__proto__"in{}?function(){var i,r=!1,e={};try{(i=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(e,[]),r=e instanceof Array}catch(e){}return function(e,t){return function(e,t){if(f(e),!a(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(e,t),r?i.call(e,t):e.__proto__=t,e}}():void 0),ct=h("iterator"),ht=Ye.IteratorPrototype,ft=Ye.BUGGY_SAFARI_ITERATORS,dt="values",_t="entries",pt="String Iterator",vt=$.set,mt=$.getterFor(pt);nt(String,"String",function(e){vt(this,{type:pt,string:String(e),index:0})},function(){var e,t=mt(this),i=t.string,r=t.index;return r>=i.length?{value:void 0,done:!0}:(e=function(e,t,i){var r,n,o=String(ie(e)),a=te(t),s=o.length;return a<0||s<=a?i?"":void 0:(r=o.charCodeAt(a))<55296||56319=t.length?{value:e.target=void 0,done:!0}:"keys"==i?{value:r,done:!1}:"values"==i?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values");st.Arguments=st.Array,bt("keys"),bt("values"),bt("entries");var Et=h("iterator"),Mt=h("toStringTag"),Rt=kt.values;for(var St in gt){var Pt=p[St],zt=Pt&&Pt.prototype;if(zt){if(zt[Et]!==Rt)try{T(zt,Et,Rt)}catch(e){zt[Et]=Rt}if(zt[Mt]||T(zt,Mt,St),gt[St])for(var Nt in kt)if(zt[Nt]!==kt[Nt])try{T(zt,Nt,kt[Nt])}catch(e){zt[Nt]=kt[Nt]}}}function Ot(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}function It(r,n,e){if(Ot(r),void 0===n)return r;switch(e){case 0:return function(){return r.call(n)};case 1:return function(e){return r.call(n,e)};case 2:return function(e,t){return r.call(n,e,t)};case 3:return function(e,t,i){return r.call(n,e,t,i)}}return function(){return r.apply(n,arguments)}}function Lt(t,e,i,r){try{return r?e(f(i)[0],i[1]):e(i)}catch(e){var n=t.return;throw void 0!==n&&f(n.call(t)),e}}var Ct=h("iterator"),Ft=Array.prototype,Dt=h("iterator"),jt=i(function(e){var h={};(e.exports=function(e,t,i,r,n){var o,a,s,l,u,c=It(t,i,r?2:1);if(n)o=e;else{if("function"!=typeof(a=function(e){if(null!=e)return e[Dt]||e["@@iterator"]||st[d(e)]}(e)))throw TypeError("Target is not iterable");if(function(e){return void 0!==e&&(st.Array===e||Ft[Ct]===e)}(a)){for(s=0,l=ne(e.length);se;)t(r[e++]);h.reactions=[],h.notified=!1,i&&!h.rejection&&cr(c,h)})}}function Ni(e,t,i){var r,n;ar?((r=$i.createEvent("Event")).promise=t,r.reason=i,r.initEvent(e,!1,!0),p.dispatchEvent(r)):r={promise:t,reason:i},(n=p["on"+e])?n(r):e===sr&&function(e,t){var i=p.console;i&&i.error&&(1===arguments.length?i.error(e):i.error(e,t))}("Unhandled promise rejection",i)}function Oi(t,i,r,n){return function(e){t(i,r,e,n)}}function Ii(e,t,i,r){t.done||(t.done=!0,r&&(t=r),t.value=i,t.state=2,zi(e,t,!0))}var Li,Ci,Fi,Di,ji,Ui=wi||function(e){var t={fn:e,next:void 0};ui&&(ui.next=t),li||(li=t,ci()),ui=t},Gi={f:function(e){return new ki(e)}},Bi=p,Vi=h("species"),qi="Promise",Hi=_i.set,Yi=h("species"),Wi=$.get,Xi=$.set,Zi=$.getterFor(qi),Ki=p[qi],Ji=p.TypeError,$i=p.document,Qi=p.process,er=p.fetch,tr=Qi&&Qi.versions,ir=tr&&tr.v8||"",rr=Gi.f,nr=rr,or="process"==n(Qi),ar=!!($i&&$i.createEvent&&p.dispatchEvent),sr="unhandledrejection",lr=Fe(qi,function(){function t(){}var e=Ki.resolve(1),i=(e.constructor={})[Yi]=function(e){e(t,t)};return!((or||"function"==typeof PromiseRejectionEvent)&&e.then(t)instanceof i&&0!==ir.indexOf("6.6")&&-1===vi.indexOf("Chrome/66"))}),ur=lr||!function(e,t){if(!t&&!Gt)return!1;var i=!1;try{var r={};r[Ut]=function(){return{next:function(){return{done:i=!0}}}},e(r)}catch(e){}return i}(function(e){Ki.all(e).catch(function(){})}),cr=function(i,r){Hi.call(p,function(){var e,t=r.value;if(hr(r)&&(e=Mi(function(){or?Qi.emit("unhandledRejection",t,i):Ni(sr,i,t)}),r.rejection=or||hr(r)?2:1,e.error))throw e.value})},hr=function(e){return 1!==e.rejection&&!e.parent},fr=function(e,t){Hi.call(p,function(){or?Qi.emit("rejectionHandled",e):Ni("rejectionhandled",e,t.value)})},dr=function(i,r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(i===e)throw Ji("Promise can't be resolved itself");var n=Pi(e);n?Ui(function(){var t={done:!1};try{n.call(e,Oi(dr,i,t,r),Oi(Ii,i,t,r))}catch(e){Ii(i,t,e,r)}}):(r.value=e,r.state=1,zi(i,r,!1))}catch(e){Ii(i,{done:!1},e,r)}}};lr&&(Ki=function(e){!function(e,t,i){if(!(e instanceof t))throw TypeError("Incorrect "+(i?i+" ":"")+"invocation")}(this,Ki,qi),Ot(e),Li.call(this);var t=Wi(this);try{e(Oi(dr,this,t),Oi(Ii,this,t))}catch(e){Ii(this,t,e)}},(Li=function(e){Xi(this,{type:qi,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=function(e,t,i){for(var r in t)Q(e,r,t[r],i);return e}(Ki.prototype,{then:function(e,t){var i=Zi(this),r=rr(Vt(this,Ki));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=or?Qi.domain:void 0,i.parent=!0,i.reactions.push(r),0!=i.state&&zi(this,i,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),Ci=function(){var e=new Li,t=Wi(e);this.promise=e,this.resolve=Oi(dr,e,t),this.reject=Oi(Ii,e,t)},Gi.f=rr=function(e){return e===Ki||e===Fi?new Ci(e):nr(e)},"function"==typeof er&&le({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return Ei(Ki,er.apply(p,arguments))}})),le({global:!0,wrap:!0,forced:lr},{Promise:Ki}),tt(Ki,qi,!1),Di=Si(qi),ji=A.f,v&&Di&&!Di[Vi]&&ji(Di,Vi,{configurable:!0,get:function(){return this}}),Fi=Bi[qi],le({target:qi,stat:!0,forced:lr},{reject:function(e){var t=rr(this);return t.reject.call(void 0,e),t.promise}}),le({target:qi,stat:!0,forced:lr},{resolve:function(e){return Ei(this,e)}}),le({target:qi,stat:!0,forced:ur},{all:function(e){var s=this,t=rr(s),l=t.resolve,u=t.reject,i=Mi(function(){var r=Ot(s.resolve),n=[],o=0,a=1;jt(e,function(e){var t=o++,i=!1;n.push(void 0),a++,r.call(s,e).then(function(e){i||(i=!0,n[t]=e,--a||l(n))},u)}),--a||l(n)});return i.error&&u(i.value),t.promise},race:function(e){var i=this,r=rr(i),n=r.reject,t=Mi(function(){var t=Ot(i.resolve);jt(e,function(e){t.call(i,e).then(r.resolve,n)})});return t.error&&n(t.value),r.promise}}),le({target:"Promise",proto:!0,real:!0},{finally:function(t){var i=Vt(this,Si("Promise")),e="function"==typeof t;return this.then(e?function(e){return Ei(i,t()).then(function(){return e})}:t,e?function(e){return Ei(i,t()).then(function(){throw e})}:t)}});var _r;Bi.Promise;if("function"!=typeof Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),i=1;ie.ne.x||t.ne.xe.ne.y||t.ne.yi&&(i=s[0]),s[1]>n&&(n=s[1])}return[t,r,i,n]},Yr.geometryType=function(e){return"Polygon"===e||"MultiPolygon"===e?"polygon":"LineString"===e||"MultiLineString"===e?"line":"Point"===e||"MultiPoint"===e?"point":void 0},Yr.centroid=function(e){var t=!(1=o?i():(s||(s=Date.now()),a=setTimeout(function(){i()},n))}}var on=tn={};Cr.addTarget("Utils",tn),tn.isSafari=function(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)},tn.isMicrosoft=function(){return/(Trident\/7.0|Edge[ /](\d+[\.\d]+))/i.test(navigator.userAgent)},tn._requests={},tn._proxy_requests={},tn.io=function(i){var r=1>=1;)t<<=1;return t},tn.interpolate=function(e,t,i){if(!Array.isArray(t)||!Array.isArray(t[0]))return t;if(t.length<1)return t;var r,n,o,a,s;if(e<=t[0][0])a=t[0][1],"function"==typeof i&&(a=i(a));else if(e>=t[t.length-1][0])a=t[t.length-1][1],"function"==typeof i&&(a=i(a));else for(var l=0;l=t[l][0]&&e-Jr.tile_scale&&e[0]this.max_display_zoom)return!1;for(var i=0;ii.x||e.yi.y)return!1}return!0}},{key:"includesTile",value:function(e,t){return!!Rr(Ar(r.prototype),"includesTile",this).call(this,e,t)&&!!this.checkBounds(e)}},{key:"formatUrl",value:function(e,t){var i=Jr.wrapTile(t.coords,{x:!0});this.tms&&(i.y=Math.pow(2,i.z)-1-i.y);var r=e.replace("{x}",i.x).replace("{y}",i.y).replace("{z}",i.z);return null!=this.url_subdomains&&(r=r.replace("{s}",this.url_subdomains[this.next_url_subdomain]),this.next_url_subdomain=(this.next_url_subdomain+1)%this.url_subdomains.length),r}},{key:"urlHasTilePattern",value:function(e){return e&&-1>3}if(n--,1===r||2===r)o+=e.readSVarint(),a+=e.readSVarint(),1===r&&(t&&s.push(t),t=[]),t.push(new gn(o,a));else{if(7!==r)throw new Error("unknown command "+r);t&&t.push(t[0].clone())}}return t&&s.push(t),s},bn.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,i=1,r=0,n=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;e.pos>3}if(r--,1===i||2===i)(n+=e.readSVarint())>3;t=1==r?e.readString():2==r?e.readFloat():3==r?e.readDouble():4==r?e.readVarint64():5==r?e.readVarint():6==r?e.readSVarint():7==r?e.readBoolean():null}return t}(i))}function Mn(e,t,i){if(3===e){var r=new wn(i,i.readVarint()+i.pos);r.length&&(t[r.name]=r)}}kn.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new xn(this._pbf,t,this.extent,this._keys,this._values)};var Rn=function(e,t){this.layers=e.readFields(Mn,{},t)},Sn=xn;Sn.prototype.loadGeometry=function(e){var t=this._pbf;t.pos=this._geometry;for(var i,r=t.readVarint()+t.pos,n=1,o=0,a=0,s=0,l=[];t.pos>3}if(o--,1===n||2===n)a+=t.readSVarint(),s+=t.readSVarint(),1===n&&(i&&l.push(i),i=[]),i.push([a*e,s*e]);else{if(7!==n)throw new Error("unknown command "+n);i&&i.push(i[0].slice())}}return i&&l.push(i),l};var Pn={UNKNOWN:0,POINT:1,LINESTRING:2,POLYGON:3};function zn(e){var t=[],i=e&&e.features;if(i)for(var r=0,n=i.length;r>1,l=r-i,u=t[i],c=t[i+1],h=t[r],f=t[r+1],d=i+3;da.maxX&&(a.maxX=c),h>a.maxY&&(a.maxY=h)}return a}function to(e,t,i,r){var n=t.geometry,o=t.type,a=[];if("Point"===o||"MultiPoint"===o)for(var s=0;sa)&&(i.numSimplified++,s.push(t[l]),s.push(t[l+1])),i.numPoints++;n&&function(e,t){for(var i=0,r=0,n=e.length,o=n-2;r>1,c=-7,h=i?n-1:0,f=i?-1:1,d=e[t+h];for(h+=f,o=d&(1<<-c)-1,d>>=-c,c+=s;0>=-c,c+=r;0>1,f=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,_=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),2<=(t+=1<=a+h?f/l:f*Math.pow(2,1-h))*l&&(a++,l/=2),c<=a+h?(s=0,a=c):1<=a+h?(s=(t*l-1)*Math.pow(2,n),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,n),a=0));8<=n;e[i+d]=255&s,d+=_,s/=256,n-=8);for(a=a<>>0):4294967296*(t>>>0)+(e>>>0)}function yo(e,t,i){var r=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.ceil(Math.log(t)/(7*Math.LN2));i.realloc(r);for(var n=i.pos-1;e<=n;n--)i.buf[n+r]=i.buf[n]}function xo(e,t){for(var i=0;i>>8,e[i+2]=t>>>16,e[i+3]=t>>>24}function zo(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}_o.prototype={destroy:function(){this.buf=null},readFields:function(e,t,i){for(i=i||this.length;this.pos>3,o=this.pos;this.type=7&r,e(n,t,this),this.pos===o&&this.skip(r)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=So(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=zo(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=So(this.buf,this.pos)+So(this.buf,this.pos+4)*po;return this.pos+=8,e},readSFixed64:function(){var e=So(this.buf,this.pos)+zo(this.buf,this.pos+4)*po;return this.pos+=8,e},readFloat:function(){var e=co(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=co(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,i,r=this.buf;return t=127&(i=r[this.pos++]),i<128?t:(t|=(127&(i=r[this.pos++]))<<7,i<128?t:(t|=(127&(i=r[this.pos++]))<<14,i<128?t:(t|=(127&(i=r[this.pos++]))<<21,i<128?t:function(e,t,i){var r,n,o=i.buf;if(n=o[i.pos++],r=(112&n)>>4,n<128)return go(e,r,t);if(n=o[i.pos++],r|=(127&n)<<3,n<128)return go(e,r,t);if(n=o[i.pos++],r|=(127&n)<<10,n<128)return go(e,r,t);if(n=o[i.pos++],r|=(127&n)<<17,n<128)return go(e,r,t);if(n=o[i.pos++],r|=(127&n)<<24,n<128)return go(e,r,t);if(n=o[i.pos++],r|=(1&n)<<31,n<128)return go(e,r,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(i=r[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=function(e,t,i){var r="",n=t;for(;n>>10&1023|55296),u=56320|1023&u),r+=String.fromCharCode(u),n+=c}return r}(this.buf,this.pos,e);return this.pos=e,t},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){var i=mo(this);for(e=e||[];this.pos>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos]=127&e}(i,0,t),function(e,t){var i=(7&e)<<4;if(t.buf[t.pos++]|=i|((e>>>=3)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;t.buf[t.pos++]=127&e}(r,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(127>>=7)|(127>>=7)|(127>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,i){for(var r,n,o=0;o>6|192:(r<65536?e[i++]=r>>12|224:(e[i++]=r>>18|240,e[i++]=r>>12&63|128),e[i++]=r>>6&63|128),e[i++]=63&r|128)}return i}(this.buf,e,this.pos);var i=this.pos-t;128<=i&&yo(t,i,this),this.pos=t-1,this.writeVarint(i),this.pos+=i},writeFloat:function(e){this.realloc(4),ho(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),ho(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var i=0;i>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===i.length&&0<=(t=parseInt(i.substr(1),16))&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var r=i.indexOf("("),n=i.indexOf(")");if(-1!==r&&n+1===i.length){var o=i.substr(0,r),a=i.substr(r+1,n-(r+1)).split(","),s=1;switch(o){case"rgba":if(4!==a.length)return null;s=v(a.pop());case"rgb":return 3!==a.length?null:[p(a[0]),p(a[1]),p(a[2]),s];case"hsla":if(4!==a.length)return null;s=v(a.pop());case"hsl":if(3!==a.length)return null;var l=(parseFloat(a[0])%360+360)%360/360,u=v(a[1]),c=v(a[2]),h=c<=.5?c*(u+1):c+u-c*u,f=2*c-h;return[_(255*m(f,h,l+1/3)),_(255*m(f,h,l)),_(255*m(f,h,l-1/3)),s];default:return null}}return null}}catch(e){}}),jo=(Do.parseCSSColor,{});Object.assign(jo,{clampPositive:Io,noNaN:Lo,parseNumber:Co,parsePositiveNumber:Fo}),jo.wrapFunction=function(e){return"\n var feature = context.feature.properties;\n var global = context.global;\n var $zoom = context.zoom;\n var $layer = context.layer;\n var $source = context.source;\n var sources = context.sources;\n var $geometry = context.geometry;\n var $meters_per_pixel = context.meters_per_pixel;\n\n var val = (function(){ ".concat(e," }());\n\n if (typeof val === 'number' && isNaN(val)) {\n val = null; // convert NaNs to nulls\n }\n\n return val;\n ")},jo.zeroPair=Object.freeze([0,0]),jo.defaults={color:[1,1,1,1],width:1,size:1,extrude:!1,height:20,min_height:0,order:0,z:0,outline:{color:[0,0,0,0],width:0},material:{ambient:1,diffuse:1}},jo.macros={"Style.color.pseudoRandomColor":function(){return[parseInt(feature.id,16)/100%1*.7,parseInt(feature.id,16)/1e4%1*.7,parseInt(feature.id,16)/1e6%1*.7,1]},"Style.color.randomColor":function(){return[.7*Math.random(),.7*Math.random(),.7*Math.random(),1]}},jo.getFeatureParseContext=function(e,t,i,r){return{feature:e,tile:t,global:i,sources:r,zoom:t.style_zoom,geometry:Jr.geometryType(e.geometry.type),meters_per_pixel:t.meters_per_pixel,meters_per_pixel_sq:t.meters_per_pixel_sq,units_per_meter_overzoom:t.units_per_meter_overzoom}};var Uo={STATIC:0,DYNAMIC:1,ZOOM:2};jo.CACHE_TYPE=Uo,jo.createPropertyCache=function(e){var i=1this.width||r<0||t>this.height)return!n&&[];var a=[];if(e<=0&&t<=0&&this.width<=i&&this.height<=r){if(n)return!0;for(var s=0;sthis.width||l<0||s>this.height)return!r&&[];var u=[],c={hitTest:r,circle:{x:e,y:t,radius:i},seenUids:{box:{},circle:{}}};return this._forEachCell(o,s,a,l,this._queryCellCircle,u,c,n),r?0=c[0+m]&&r>=c[1+m]&&(!s||s(this.boxKeys[v]))){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[v],x1:c[m],y1:c[1+m],x2:c[2+m],y2:c[3+m]})}}}}catch(e){f=!0,d=e}finally{try{h||null==p.return||p.return()}finally{if(f)throw d}}}var g=this.circleCells[n];if(null!==g){var y=this.circles,x=!0,b=!1,A=void 0;try{for(var T,w=g[Symbol.iterator]();!(x=(T=w.next()).done);x=!0){var k=T.value;if(!l.circle[k]){l.circle[k]=!0;var E=3*k;if(this._circleAndRectCollide(y[E],y[1+E],y[2+E],e,t,i,r)&&(!s||s(this.circleKeys[k]))){if(a.hitTest)return o.push(!0),!0;var M=y[E],R=y[1+E],S=y[2+E];o.push({key:this.circleKeys[k],x1:M-S,y1:R-S,x2:M+S,y2:R+S})}}}}catch(e){b=!0,A=e}finally{try{x||null==w.return||w.return()}finally{if(b)throw A}}}}},{key:"_queryCellCircle",value:function(e,t,i,r,n,o,a,s){var l=a.circle,u=a.seenUids,c=this.boxCells[n];if(null!==c){var h=this.bboxes,f=!0,d=!1,_=void 0;try{for(var p,v=c[Symbol.iterator]();!(f=(p=v.next()).done);f=!0){var m=p.value;if(!u.box[m]){u.box[m]=!0;var g=4*m;if(this._circleAndRectCollide(l.x,l.y,l.radius,h[0+g],h[1+g],h[2+g],h[3+g])&&(!s||s(this.boxKeys[m])))return o.push(!0),!0}}}catch(e){d=!0,_=e}finally{try{f||null==v.return||v.return()}finally{if(d)throw _}}}var y=this.circleCells[n];if(null!==y){var x=this.circles,b=!0,A=!1,T=void 0;try{for(var w,k=y[Symbol.iterator]();!(b=(w=k.next()).done);b=!0){var E=w.value;if(!u.circle[E]){u.circle[E]=!0;var M=3*E;if(this._circlesCollide(x[M],x[1+M],x[2+M],l.x,l.y,l.radius)&&(!s||s(this.circleKeys[E])))return o.push(!0),!0}}}catch(e){A=!0,T=e}finally{try{b||null==k.return||k.return()}finally{if(A)throw T}}}}},{key:"_forEachCell",value:function(e,t,i,r,n,o,a,s){for(var l=this._convertToXCellCoord(e),u=this._convertToYCellCoord(t),c=this._convertToXCellCoord(i),h=this._convertToYCellCoord(r),f=l;f<=c;f++)for(var d=u;d<=h;d++){var _=this.xCellCount*d+f;if(n.call(this,e,t,i,r,_,o,a,s))return}}},{key:"_convertToXCellCoord",value:function(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}},{key:"_convertToYCellCoord",value:function(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}},{key:"_circlesCollide",value:function(e,t,i,r,n,o){var a=r-e,s=n-t,l=i+o;return a*a+s*st.max_time?t.pause_factor:0),t.total_elapsed+=t.elapsed),this.elapsed=performance.now()-this.start_time,this.elapsed>=Ko.max_time){this.start_time=null;break}}},finish:function(e,t){return e.elapsed=performance.now()-e.start_time,e.total_elapsed+=e.elapsed,this.remove(e),e.resolve(t),e.promise},cancel:function(e){var t;e.cancel instanceof Function&&(t=e.cancel(e)),e.resolve(t||{})},shouldContinue:function(e){return e.elapsed=performance.now()-e.start_time,this.elapsed=performance.now()-this.start_time,e.elapsedthis.style_zoom?"child":"parent"):(this.proxy_for=null,this.proxy_depth=0)}},{key:"isProxy",value:function(){return null!=this.proxy_for}},{key:"shouldProxyForStyle",value:function(t){return!this.proxy_for||this.proxy_for.some(function(e){return null==e.meshes[t]})}},{key:"setupProgram",value:function(e,t){var i=e.model,r=e.model32;t.uniform("4fv","u_tile_origin",[this.min.x,this.min.y,this.style_zoom,this.coords.z]),t.uniform("1f","u_tile_proxy_depth",this.proxy_depth),ia.identity(i),ia.translate(i,i,ea.fromValues(this.min.x,this.min.y,0)),ia.scale(i,i,ea.fromValues(this.span.x/Jr.tile_scale,-1*this.span.y/Jr.tile_scale,1)),ia.copy(r,i),t.uniform("Matrix4fv","u_model",r),t.uniform("1i","u_tile_fade_in",this.fade_in&&"child"!==this.proxied_as)}},{key:"merge",value:function(e){return this.loading=e.loading,this.loaded=e.loaded,this.generation=e.generation,this.error=e.error,this.mesh_data=e.mesh_data,this.selection_data?Object.assign(this.selection_data,e.selection_data):this.selection_data=e.selection_data,this}}],[{key:"coord",value:function(e){return{x:e.x,y:e.y,z:e.z,key:T.coordKey(e)}}},{key:"coordKey",value:function(e){return e.x+"/"+e.y+"/"+e.z}},{key:"key",value:function(e,t,i){if(!(e.y<0||e.y>=1<e.z){var i=T.coordinateAtZoom(t,e.z),r=i.x,n=i.y;return e.x===r&&e.y===n}return!1}},{key:"cancel",value:function(e){e&&(e.canceled=!0,e.source_data&&e.source_data.request_id&&(on.cancelRequest(e.source_data.request_id),e.source_data.request_id=null),T.abortBuild(e))}},{key:"buildGeometry",value:function(e,t){var i=t.scene_id,r=t.layers,n=t.styles,o=t.global,a=t.sources,s=e.source_data;for(var l in Zo.startTile(e.id,{apply_repeat_groups:!0}),r){var u=r[l];if(u&&u.config_data){if(u.config_data.source===e.source)for(var c=T._getDataForSource(s,u.config_data,l),h=0;h>16&255,o[s++]=r>>8&255,o[s++]=255&r;return 2==n?(r=xa[e.charCodeAt(t)]<<2|xa[e.charCodeAt(t+1)]>>4,o[s++]=255&r):1==n&&(r=xa[e.charCodeAt(t)]<<10|xa[e.charCodeAt(t+1)]<<4|xa[e.charCodeAt(t+2)]>>2,o[s++]=r>>8&255,o[s++]=255&r),o}function ka(e,t,i){for(var r,n,o=[],a=t;a>18&63]+ya[n>>12&63]+ya[n>>6&63]+ya[63&n]);return o.join("")}function Ea(e){var t;Aa||Ta();for(var i=e.length,r=i%3,n="",o=[],a=0,s=i-r;a>2],n+=ya[t<<4&63],n+="=="):2==r&&(t=(e[i-2]<<8)+e[i-1],n+=ya[t>>10],n+=ya[t>>4&63],n+=ya[t<<2&63],n+="="),o.push(n),o.join("")}function Ma(e,t,i,r,n){var o,a,s=8*n-r-1,l=(1<>1,c=-7,h=i?n-1:0,f=i?-1:1,d=e[t+h];for(h+=f,o=d&(1<<-c)-1,d>>=-c,c+=s;0>=-c,c+=r;0>1,f=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,_=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),2<=(t+=1<=a+h?f/l:f*Math.pow(2,1-h))*l&&(a++,l/=2),c<=a+h?(s=0,a=c):1<=a+h?(s=(t*l-1)*Math.pow(2,n),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,n),a=0));8<=n;e[i+d]=255&s,d+=_,s/=256,n-=8);for(a=a<=Na())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Na().toString(16)+" bytes");return 0|e}function Ua(e){return!(null==e||!e._isBuffer)}function Ga(e,t){if(Ua(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var i=e.length;if(0===i)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return us(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return cs(e).length;default:if(r)return us(e).length;t=(""+t).toLowerCase(),r=!0}}function Ba(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function Va(e,t,i,r,n){if(0===e.length)return-1;if("string"==typeof i?(r=i,i=0):2147483647=e.length){if(n)return-1;i=e.length-1}else if(i<0){if(!n)return-1;i=0}if("string"==typeof t&&(t=Ia.from(t,r)),Ua(t))return 0===t.length?-1:qa(e,t,i,r,n);if("number"==typeof t)return t&=255,Ia.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):qa(e,[t],i,r,n);throw new TypeError("val must be string, number or Buffer")}function qa(e,t,i,r,n){var o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s/=a=2,l/=2,i/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(n){var c=-1;for(o=i;o>>10&1023|55296),c=56320|1023&c),r.push(c),n+=h}return function(e){var t=e.length;if(t<=Za)return String.fromCharCode.apply(String,e);var i="",r=0;for(;rthis.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return $a(this,t,i);case"utf8":case"utf-8":return Xa(this,t,i);case"ascii":return Ka(this,t,i);case"latin1":case"binary":return Ja(this,t,i);case"base64":return Wa(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Qa(this,t,i);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},Ia.prototype.equals=function(e){if(!Ua(e))throw new TypeError("Argument must be a Buffer");return this===e||0===Ia.compare(this,e)},Ia.prototype.inspect=function(){var e="";return 0"},Ia.prototype.compare=function(e,t,i,r,n){if(!Ua(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===r&&(r=0),void 0===n&&(n=this.length),t<0||i>e.length||r<0||n>this.length)throw new RangeError("out of range index");if(n<=r&&i<=t)return 0;if(n<=r)return-1;if(i<=t)return 1;if(this===e)return 0;for(var o=(n>>>=0)-(r>>>=0),a=(i>>>=0)-(t>>>=0),s=Math.min(o,a),l=this.slice(r,n),u=e.slice(t,i),c=0;cthis.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o,a,s,l,u,c,h,f,d,_=!1;;)switch(r){case"hex":return Ha(this,e,t,i);case"utf8":case"utf-8":return f=t,d=i,hs(us(e,(h=this).length-f),h,f,d);case"ascii":return Ya(this,e,t,i);case"latin1":case"binary":return Ya(this,e,t,i);case"base64":return l=this,u=t,c=i,hs(cs(e),l,u,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a=t,s=i,hs(function(e,t){for(var i,r,n,o=[],a=0;a>8,n=i%256,o.push(n),o.push(r);return o}(e,(o=this).length-a),o,a,s);default:if(_)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),_=!0}},Ia.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Za=4096;function Ka(e,t,i){var r="";i=Math.min(e.length,i);for(var n=t;ne.length)throw new RangeError("Index out of range")}function is(e,t,i,r){t<0&&(t=65535+t+1);for(var n=0,o=Math.min(e.length-i,2);n>>8*(r?n:1-n)}function rs(e,t,i,r){t<0&&(t=4294967295+t+1);for(var n=0,o=Math.min(e.length-i,4);n>>8*(r?n:3-n)&255}function ns(e,t,i,r){if(i+r>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function os(e,t,i,r,n){return n||ns(e,0,i,4),Ra(e,t,i,r,23,4),i+4}function as(e,t,i,r,n){return n||ns(e,0,i,8),Ra(e,t,i,r,52,8),i+8}Ia.prototype.slice=function(e,t){var i,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):r>>8):is(this,e,t,!0),t+2},Ia.prototype.writeUInt16BE=function(e,t,i){return e=+e,t|=0,i||ts(this,e,t,2,65535,0),Ia.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):is(this,e,t,!1),t+2},Ia.prototype.writeUInt32LE=function(e,t,i){return e=+e,t|=0,i||ts(this,e,t,4,4294967295,0),Ia.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):rs(this,e,t,!0),t+4},Ia.prototype.writeUInt32BE=function(e,t,i){return e=+e,t|=0,i||ts(this,e,t,4,4294967295,0),Ia.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):rs(this,e,t,!1),t+4},Ia.prototype.writeIntLE=function(e,t,i,r){if(e=+e,t|=0,!r){var n=Math.pow(2,8*i-1);ts(this,e,t,i,n-1,-n)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+i},Ia.prototype.writeIntBE=function(e,t,i,r){if(e=+e,t|=0,!r){var n=Math.pow(2,8*i-1);ts(this,e,t,i,n-1,-n)}var o=i-1,a=1,s=0;for(this[t+o]=255&e;0<=--o&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+i},Ia.prototype.writeInt8=function(e,t,i){return e=+e,t|=0,i||ts(this,e,t,1,127,-128),Ia.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Ia.prototype.writeInt16LE=function(e,t,i){return e=+e,t|=0,i||ts(this,e,t,2,32767,-32768),Ia.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):is(this,e,t,!0),t+2},Ia.prototype.writeInt16BE=function(e,t,i){return e=+e,t|=0,i||ts(this,e,t,2,32767,-32768),Ia.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):is(this,e,t,!1),t+2},Ia.prototype.writeInt32LE=function(e,t,i){return e=+e,t|=0,i||ts(this,e,t,4,2147483647,-2147483648),Ia.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):rs(this,e,t,!0),t+4},Ia.prototype.writeInt32BE=function(e,t,i){return e=+e,t|=0,i||ts(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Ia.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):rs(this,e,t,!1),t+4},Ia.prototype.writeFloatLE=function(e,t,i){return os(this,e,t,!0,i)},Ia.prototype.writeFloatBE=function(e,t,i){return os(this,e,t,!1,i)},Ia.prototype.writeDoubleLE=function(e,t,i){return as(this,e,t,!0,i)},Ia.prototype.writeDoubleBE=function(e,t,i){return as(this,e,t,!1,i)},Ia.prototype.copy=function(e,t,i,r){if(i||(i=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),0=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(o=t;o>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;o.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return o}function cs(e){return wa(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(ss,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function hs(e,t,i,r){for(var n=0;n=t.length||n>=e.length);++n)t[n+i]=e[n];return n}function fs(e){return null!=e&&(!!e._isBuffer||ds(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&ds(e.slice(0,0))}(e))}function ds(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var _s=Object.freeze({INSPECT_MAX_BYTES:50,kMaxLength:za,Buffer:Ia,SlowBuffer:function(e){return+e!=e&&(e=0),Ia.alloc(+e)},isBuffer:fs});ga.setTimeout,ga.clearTimeout;var ps=ga.performance||{},vs=(ps.now||ps.mozNow||ps.msNow||ps.oNow||ps.webkitNow,"function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;function i(){}i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e});function ms(e,t){var i={seen:[],stylize:ys};return 3<=arguments.length&&(i.depth=arguments[2]),4<=arguments.length&&(i.colors=arguments[3]),Ts(t)?i.showHidden=t:t&&function(e,t){if(!t||!Rs(t))return;var i=Object.keys(t),r=i.length;for(;r--;)e[i[r]]=t[i[r]]}(i,t),Es(i.showHidden)&&(i.showHidden=!1),Es(i.depth)&&(i.depth=2),Es(i.colors)&&(i.colors=!1),Es(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=gs),xs(i,e,i.depth)}function gs(e,t){var i=ms.styles[t];return i?"\x1b["+ms.colors[i][0]+"m"+e+"\x1b["+ms.colors[i][1]+"m":e}function ys(e,t){return e}function xs(t,i,r){if(t.customInspect&&i&&zs(i.inspect)&&i.inspect!==ms&&(!i.constructor||i.constructor.prototype!==i)){var e=i.inspect(r,t);return ks(e)||(e=xs(t,e,r)),e}var n=function(e,t){if(Es(t))return e.stylize("undefined","undefined");if(ks(t)){var i="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(i,"string")}if(function(e){return"number"==typeof e}(t))return e.stylize(""+t,"number");if(Ts(t))return e.stylize(""+t,"boolean");if(ws(t))return e.stylize("null","null")}(t,i);if(n)return n;var o=Object.keys(i),a=function(e){var t={};return e.forEach(function(e){t[e]=!0}),t}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(i)),Ps(i)&&(0<=o.indexOf("message")||0<=o.indexOf("description")))return bs(i);if(0===o.length){if(zs(i)){var s=i.name?": "+i.name:"";return t.stylize("[Function"+s+"]","special")}if(Ms(i))return t.stylize(RegExp.prototype.toString.call(i),"regexp");if(Ss(i))return t.stylize(Date.prototype.toString.call(i),"date");if(Ps(i))return bs(i)}var l,u="",c=!1,h=["{","}"];!function(e){return Array.isArray(e)}(i)||(c=!0,h=["[","]"]),zs(i)&&(u=" [Function"+(i.name?": "+i.name:"")+"]");return Ms(i)&&(u=" "+RegExp.prototype.toString.call(i)),Ss(i)&&(u=" "+Date.prototype.toUTCString.call(i)),Ps(i)&&(u=" "+bs(i)),0!==o.length||c&&0!=i.length?r<0?Ms(i)?t.stylize(RegExp.prototype.toString.call(i),"regexp"):t.stylize("[Object]","special"):(t.seen.push(i),l=c?function(t,i,r,n,e){for(var o=[],a=0,s=i.length;a=this.root.width+e,o=i&&this.root.width>=this.root.height+t;return n?this.growRight(e,t):o?this.growDown(e,t):r?this.growRight(e,t):i?this.growDown(e,t):null},growRight:function(e,t){var i;return this.root={used:!0,x:0,y:0,width:this.root.width+e,height:this.root.height,down:this.root,right:{x:this.root.width,y:0,width:e,height:this.root.height}},(i=this.findNode(this.root,e,t))?this.splitNode(i,e,t):null},growDown:function(e,t){var i;return this.root={used:!0,x:0,y:0,width:this.root.width,height:this.root.height+t,down:{x:0,y:this.root.height,width:this.root.width,height:t},right:this.root},(i=this.findNode(this.root,e,t))?this.splitNode(i,e,t):null}};var al=tl,sl={sort:function(e){return e},placeItems:function(e){return function(e,t){t=t||{};var i=new al,r=t.inPlace||!1,n=e.map(function(e){return r?e:{width:e.width,height:e.height,item:e}});n=n.sort(function(e,t){return t.width*t.height-e.width*e.height}),i.fit(n);var o={width:n.reduce(function(e,t){return Math.max(e,t.x+t.width)},0),height:n.reduce(function(e,t){return Math.max(e,t.y+t.height)},0)};r||(o.items=n)}(e,{inPlace:!0}),e}},ll={};function ul(e,t){var i=e||"top-down";return"string"==typeof i&&Vs(i=ll[e],"Sorry, the '"+e+"' algorithm could not be loaded."),new ma(i,t)}function cl(e,t){ll[e]=t}ul.PackingSmith=ma,ul.addAlgorithm=cl,ul.algorithms=ll,cl("top-down",il),cl("left-right",rl),cl("diagonal",nl),cl("alt-diagonal",ol),cl("binary-tree",sl);var hl=ul;function fl(e){for(var t=0;t<(arguments.length<=1?0:arguments.length-1);t++){var i=t+1<1||arguments.length<=t+1?void 0:arguments[t+1];if(i)for(var r in i){var n=i[r];null===n||"object"!==vr(n)||Array.isArray(n)?void 0!==n&&(e[r]=n):null===e[r]||"object"!==vr(e[r])||Array.isArray(e[r])?e[r]=fl({},n):e[r]=fl(e[r],n)}}return e}function dl(e){var t;try{e.getContext("2d").getImageData(0,0,1,1)}catch(e){t=e.message}return t}function _l(e,t,i){if(e instanceof HTMLImageElement){var r=e.ownerDocument.createElement("canvas");r.width=t,r.height=i,r.getContext("2d").drawImage(e,0,0,t,i),e=r}return e}var pl,vl={};(function(){var n=this;function s(e){var t=vr(e);if("object"==t){if(!e)return"null";if(e instanceof Array)return"array";if(e instanceof Object)return t;var i=Object.prototype.toString.call(e);if("[object Window]"==i)return"object";if("[object Array]"==i||"number"==typeof e.length&&void 0!==e.splice&&void 0!==e.propertyIsEnumerable&&!e.propertyIsEnumerable("splice"))return"array";if("[object Function]"==i||void 0!==e.call&&void 0!==e.propertyIsEnumerable&&!e.propertyIsEnumerable("call"))return"function"}else if("function"==t&&void 0===e.call)return"object";return t}function l(e){var t=vr(e);return"object"==t&&null!=e||"function"==t}function e(e,t){e=e.split(".");var i,r=n;e[0]in r||!r.execScript||r.execScript("var "+e[0]);for(;e.length&&(i=e.shift());)e.length||void 0===t?r=r[i]&&r[i]!==Object.prototype[i]?r[i]:r[i]={}:r[i]=t}function t(e,o){function t(){}t.prototype=o.prototype,e.ma=o.prototype,e.prototype=new t,(e.prototype.constructor=e).ta=function(e,t,i){for(var r=Array(arguments.length-2),n=2;nb&&(o=0b?x:0))%T-x)*E):this},ue.prototype.getBoundingBox=ue.prototype.D=function(){return new he(this.lat,this.lng,this.lat,this.lng)},ue.validate=ce,ue.fromIPoint=function e(t){if(!t)throw new ie(e,0,t);return new ue(t.lat,t.lng,t.alt,t.ctx)},ue.prototype.j="Point",ue.prototype.o=function(e){return e.push("(",this.lng," ",this.lat,")"),e},t(he,le),e("H.geo.Rect",he),he.prototype.j="Polygon",he.prototype.o=function(e){var t=this.i,i=this.c,r=this.h,n=this.g;return e.push("(","(",i," ",t,",",n," ",t,",",n," ",r,",",i," ",r,",",i," ",t,")",")"),e},he.prototype.equals=he.prototype.w=function(e){return this===e||!!e&&this.i===e.i&&this.c===e.c&&this.h===e.h&&this.g===e.g},he.prototype.clone=he.prototype.clone=function(){return new he(this.i,this.c,this.h,this.g)},he.prototype.getTopLeft=he.prototype.N=function(){return this.f||(this.f=new ue(this.i,this.c)),this.f},he.prototype.getBottomRight=he.prototype.M=function(){return this.a||(this.a=new ue(this.h,this.g)),this.a},he.prototype.getTop=he.prototype.ga=function(){return this.i},he.prototype.getBottom=he.prototype.ca=function(){return this.h},he.prototype.getLeft=he.prototype.da=function(){return this.c},he.prototype.getRight=he.prototype.fa=function(){return this.g},he.prototype.getCenter=he.prototype.A=function(){return this.b||(this.b=new ue(this.h+(this.i-this.h)/2,_e(this.c,this.s()))),this.b},he.prototype.getWidth=he.prototype.s=function(){return de(this.c,this.g)},he.prototype.getHeight=he.prototype.B=function(){return this.i-this.h},he.prototype.isCDB=he.prototype.I=function(){return this.c>this.g},he.prototype.isEmpty=he.prototype.ja=function(){return!this.s()&&!this.B()},he.prototype.getBoundingBox=he.prototype.D=function(){return new he(this.i,this.c,this.h,this.g)},he.prototype.containsLatLng=he.prototype.G=function(e,t,i){var r=this.A();return i||(e=ne(e,this.G,0),t=oe(t,this.G,1)),(e=(t=this.u(e,t,i)).A()).lat===r.lat&&e.lng===r.lng&&this.B()===t.B()&&this.s()===t.s()},he.prototype.containsPoint=he.prototype.P=function(e,t){return t||ce(e,this.P,0),this.G(e.lat,e.lng,t)},he.prototype.containsRect=he.prototype.R=function(e,t){var i=this.A();if(!(t||e instanceof he))throw new ie(this.R,0,e);return(e=(t=this.F(e,t)).A()).lat===i.lat&&e.lng===i.lng&&this.B()===t.B()&&this.s()===t.s()},he.prototype.mergeLatLng=he.prototype.u=function(e,t,i,r){if(!i){if(X(e=ne(e)))throw new ie(this.u,0,e);if(X(t=oe(t)))throw new ie(this.u,1,t)}return pe(this.i,this.c,this.h,this.g,e,t,e,t,r)},he.prototype.mergePoint=he.prototype.V=function(e,t,i){return t||ce(e,this.V,0),this.u(e.lat,e.lng,t,i)},he.prototype.mergeRect=he.prototype.F=function(e,t,i){if(!(t||e instanceof he))throw new ie(this.F,0,e);return pe(this.i,this.c,this.h,this.g,e.i,e.c,e.h,e.g,i)},he.prototype.mergeTopLeftBottomRight=he.prototype.v=function(e,t,i,r,n,o){return n||(e=ne(e,this.v,0),t=oe(t,this.v,1),i=ne(i,this.v,2),r=oe(r,this.v,3)),pe(this.i,this.c,this.h,this.g,e,t,i,r,o)},he.prototype.intersects=he.prototype.T=function(e,t){var i=this.c<=this.g,r=e.c<=e.g,n=this.c=r[n]:o<=r[n]){if(!i){e.f=null;break}r[n]=o}}}function xe(e,t){var i,r=e.a;if(t){var n=t;if(n!==r)for(r=n;n=n.f;)(n.entries||1o[7]&&r>o[4]&&function e(t,i,r,n,o,a,s,l,u){var c,h=i.entries,f=i[7],d=i[4],_=i[5],p=i[6],v=i[8],m=i[9];if(h){var g=h.length;if(d=a[6],i>=a[5]),n};var be=0;function Ae(e,t,i,r,n,o){this.j=t,e&&(this.f=e,this.b=e.b,n=1&t?(i=e[8],e[5]):(i=e[7],e[8]),o=2&t?(r=e[9],e[6]):(r=e[4],e[9])),this[7]=i,this[5]=n,this[8]=(i+n)/2,this[4]=r,this[6]=o,this[9]=(r+o)/2}function Te(e,t,i,r,n,o){Te.ma.constructor.apply(this,arguments)}function we(e,t,i,r,n,o,a){var s,l,u=t[8],c=t[9];return a&&(nh:o[l]i?i:e=t){var a=[(n[0]+o[0])/2,(n[1]+o[1])/2];i.push(a)}}return i.length!==e.length-1?pl.splitLegs(i,t):i},pl.getBBox=function(e){var t=1/0,i=1/0,r=-1/0,n=-1/0;return e.forEach(function(e){e[0]r&&(r=e[0]),e[1]>n&&(n=e[1])}),[t,i,r,n]},pl.getBBoxCenter=function(e){var t=Sr(e,4),i=t[0],r=t[1];return[i+(t[2]-i)/2,r+(t[3]-r)/2]},pl.getLineLength=function(e,t,i,r){return Math.sqrt(Math.pow(e-i,2)+Math.pow(t-r,2))};var yl=Jr.metersToLatLng([Jr.half_circumference_meters,Jr.half_circumference_meters]),xl=Math.log(Jr.tile_size)/Math.LN2;function bl(e){var t=e.x,i=e.y,r=e.z;return{row:i===Math.pow(2,r)-1,column:t===Math.pow(2,r)-1}}var Al=function(){function g(e,t){var i;return mr(this,g),i=Mr(this,Ar(g).call(this,e,t)),Lr.is_worker&&(i._quad_tree=new vl.H.geo.QuadTree,i._marker_quad_tree=new vl.H.geo.QuadTree,i._tree_entries_by_object_id={},i._groups_by_id={}),Lr.is_main&&(i._objects_by_id={},i._commands=[],i._sendCommands=nn(i._sendCommands,100,200)),i}return br(g,uo),yr(g,[{key:"onReady",value:function(){var e=this;this._synced_at=this.provider.getInvalidations().getMark();var t,i,r=this.provider.getRootGroup(),n=r.getObjects(!0),o=[];for(n.push(r),t=n.length;t--;)i=n[t],this._isObjectSupported(i)&&this._shouldBeStored(i)&&(this._objects_by_id[i.getId()]=i,o.push(i.forWorkerMessage()));Cr.postMessage(this.worker,this.target_name+".addObjects",o).then(function(){return e.dispatchUpdate()})}},{key:"onProviderUpdate",value:function(e){var t=e.target,i=e.currentTarget.getInvalidations(t.type);if(this._isObjectSupported(t)){var r=this._synced_at,n=t.getId();i.isRemove(r)?this._hasSameVolatility(t)&&(delete this._objects_by_id[n],this._commands.push({method_name:"removeObjectsByIds",arguments:[[n]]})):i.isAdd(r)?this._shouldBeStored(t)&&(this._objects_by_id[n]=t,this._commands.push({method_name:"addObjects",arguments:[[t.forWorkerMessage()]]})):this.has_volatile_data&&(i.isSpatial(r)||i.isVisual(r))?this._shouldBeStored(t)&&(this._objects_by_id[n]=t,this._sendImmediateCommands([{method_name:"removeObjectsByIds",arguments:[[n]]},{method_name:"addObjects",arguments:[[t.forWorkerMessage()]]}])):i.isSpatial(r)||i.isVisual(r)||i.isZOrder(r)?this._shouldBeStored(t)&&(delete this._objects_by_id[n],this._commands.push({method_name:"removeObjectsByIds",arguments:[[n]]}),this._objects_by_id[n]=t,this._commands.push({method_name:"addObjects",arguments:[[t.forWorkerMessage()]]})):i.isVolatility(r)&&(delete this._objects_by_id[n],this._commands.push({method_name:"removeObjectsByIds",arguments:[[n]]}),this._shouldBeStored(t)&&(this._objects_by_id[n]=t,this._commands.push({method_name:"addObjects",arguments:[[t.forWorkerMessage()]]}))),this._commands.length&&this._sendCommands()}this._synced_at=i.getMark()}},{key:"_shouldBeStored",value:function(e){return 5===e.type||(!e.getIcon||1===e.getIcon().getState())&&this._hasSameVolatility(e)}},{key:"_hasSameVolatility",value:function(e){return e.getVolatility(!0)===this.has_volatile_data}},{key:"hasPendingCommands",value:function(){return 0=t,n=!e.parent||this.isVisible(this._groups_by_id[e.parent].properties,t);return i&&r&&n}}],[{key:"_getObjectId",value:function(e){return e.id}},{key:"_compareZInfo",value:function(e,t){for(var i,r=e.properties.zInfo,n=t.properties.zInfo,o=r.length,a=n.length,s=Math.min(o,a),l=1;l>>0,o=this._pixels[h+3];else for(var _=-1>>>0,p=h=0;p>>0,o=this._pixels[h+3],_=m)}if(255!==o){var g=this._getFeatureWithKey(i,t);if(e.features||(e.features=[]),!g)return void this._finishRead(e);if(e.features.every(function(e){return e.id!==g.id})&&e.features.push(g),e.ttl)return this._pending_deep_request=e,y._discardColor([f[0]/255,f[1]/255,f[2]/255,f[3]/255]),this._has_dirty_buffer=!0;this._finishRead(e)}else this._finishRead(e)}},{key:"_finishRead",value:function(e){var t=e.features||y.EMPTY_ARRAY;e.top_most_only||(this._pending_deep_request=null,y._resetDiscardedColors()),delete this._requests[e.id],e.resolve({features:t})}},{key:"_getFeatureWithKey",value:function(e,t){for(var i=null,r=0;r>8&255,i=this.map_entry>>16&255,r=this.map_prefix;return{key:e+(t<<8)+(i<<16)+(r<<24)>>>0,color:[e/255,t/255,i/255,r/255]}}},{key:"reset",value:function(){this.map_entry=0}},{key:"setPrefix",value:function(e){this.map_prefix=e}},{key:"_discardColor",value:function(e){this._discarded_colors.push(e)}},{key:"_resetDiscardedColors",value:function(){this._discarded_colors.length=0}}]),y}();Jl._discarded_colors=[],Jl.map_entry=0,Jl.map_prefix=0,Jl.defaultColor=[0,0,0,1],Jl.MAX_PICKING_TRIES=10,Jl.EMPTY_ARRAY=Object.freeze([]);var $l,Ql=function(){function o(e,t,i,r,n){mr(this,o),n=n||{},this.gl=e,this.vertex_data=t,this.element_data=i,this.vertex_layout=r,this.vertex_buffer=this.gl.createBuffer(),this.buffer_size=this.vertex_data.byteLength,this.draw_mode=n.draw_mode||this.gl.TRIANGLES,this.data_usage=n.data_usage||this.gl.STATIC_DRAW,this.vertices_per_geometry=3,this.uniforms=n.uniforms,this.textures=n.textures,this.retain=n.retain||!1,this.created_at=+new Date,this.fade_in_time=n.fade_in_time||0,this.vertex_count=this.vertex_data.byteLength/this.vertex_layout.stride,this.element_count=0,this.vaos={},this.toggle_element_array=!1,this.element_data?(this.toggle_element_array=!0,this.element_count=this.element_data.length,this.geometry_count=this.element_count/this.vertices_per_geometry,this.element_type=this.element_data.constructor===Uint16Array?this.gl.UNSIGNED_SHORT:this.gl.UNSIGNED_INT,this.element_buffer=this.gl.createBuffer(),this.buffer_size+=this.element_data.byteLength,this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.element_buffer),this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER,this.element_data,this.data_usage)):this.geometry_count=this.vertex_count/this.vertices_per_geometry,this.upload(),this.retain||(delete this.vertex_data,delete this.element_data),this.valid=!0}return yr(o,[{key:"render",value:function(e){var t=00.0){vec3 reflectVector=reflect(_light.direction,_normal);float eyeDotR=max(dot(normalize(_eyeToPoint),reflectVector),0.0);pf=pow(eyeDotR,material.shininess);}light_accumulator_specular.rgb+=_light.specular*pf;\n#endif\n}")}}]),n}();ru.types.directional=ou;var au=function(){function r(e,t){var i;return mr(this,r),(i=Mr(this,Ar(r).call(this,e,t))).type="point",i.struct_name="PointLight",i.position=t.position||[0,0,"100px"],i.position_eye=[],i.origin=t.origin||"ground",i.attenuation=isNaN(parseFloat(t.attenuation))?0:parseFloat(t.attenuation),t.radius?Array.isArray(t.radius)&&2===t.radius.length?i.radius=t.radius:i.radius=[null,t.radius]:i.radius=null,i}return br(r,ru),yr(r,[{key:"inject",value:function(){Rr(Ar(r.prototype),"inject",this).call(this),Zl.defines.TANGRAM_POINTLIGHT_ATTENUATION_EXPONENT=0!==this.attenuation,Zl.defines.TANGRAM_POINTLIGHT_ATTENUATION_INNER_RADIUS=null!=this.radius&&null!=this.radius[0],Zl.defines.TANGRAM_POINTLIGHT_ATTENUATION_OUTER_RADIUS=null!=this.radius}},{key:"update",value:function(){var e=this.view.lookAtManipulator.getLookAtData().zoom;if("world"===this.origin){var t=Sr(Jr.latLngToMeters(this.position),2),i=t[0],r=t[1];this.position_eye[0]=i-this.view.lookAtManipulator.getLookAtData().position[0],this.position_eye[1]=r-this.view.lookAtManipulator.getLookAtData().position[1],this.position_eye[2]=jo.convertUnits(this.position[2],{zoom:e,meters_per_pixel:Jr.metersPerPixel(e)}),this.position_eye[2]=this.position_eye[2]-this.view.lookAtManipulator.getLookAtData().distance}else"ground"!==this.origin&&"camera"!==this.origin||(this.position_eye=jo.convertUnits(this.position,{zoom:e,meters_per_pixel:Jr.metersPerPixel(e)}),"ground"===this.origin&&(this.position_eye[2]=this.position_eye[2]-this.view.lookAtManipulator.getLookAtData().distance));this.position_eye[3]=1}},{key:"setupProgram",value:function(e){Rr(Ar(r.prototype),"setupProgram",this).call(this,e),e.uniform("4fv","u_".concat(this.name,".position"),this.position_eye),Zl.defines.TANGRAM_POINTLIGHT_ATTENUATION_EXPONENT&&e.uniform("1f","u_".concat(this.name,".attenuationExponent"),this.attenuation);var t=this.view.lookAtManipulator.getLookAtData().zoom;Zl.defines.TANGRAM_POINTLIGHT_ATTENUATION_INNER_RADIUS&&e.uniform("1f","u_".concat(this.name,".innerRadius"),jo.convertUnits(this.radius[0],{zoom:t,meters_per_pixel:Jr.metersPerPixel(t)})),Zl.defines.TANGRAM_POINTLIGHT_ATTENUATION_OUTER_RADIUS&&e.uniform("1f","u_".concat(this.name,".outerRadius"),jo.convertUnits(this.radius[1],{zoom:t,meters_per_pixel:Jr.metersPerPixel(t)}))}}],[{key:"inject",value:function(){Zl.addBlock(ru.block,"/*Expected globals:materiallight_accumulator_**/struct PointLight{vec3 ambient;vec3 diffuse;vec3 specular;vec4 position;\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_EXPONENT\nfloat attenuationExponent;\n#endif\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_INNER_RADIUS\nfloat innerRadius;\n#endif\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_OUTER_RADIUS\nfloat outerRadius;\n#endif\n};void calculateLight(in PointLight _light,in vec3 _eyeToPoint,in vec3 _normal){float dist=length(_light.position.xyz-_eyeToPoint);vec3 VP=(_light.position.xyz-_eyeToPoint)/dist;float nDotVP=clamp(dot(VP,_normal),0.0,1.0);float attenuation=1.0;\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_EXPONENT\nfloat Rin=1.0;float e=_light.attenuationExponent;\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_INNER_RADIUS\nRin=_light.innerRadius;\n#endif\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_OUTER_RADIUS\nfloat Rdiff=_light.outerRadius-Rin;float d=clamp(max(0.0,dist-Rin)/Rdiff,0.0,1.0);attenuation=1.0-(pow(d,e));\n#else\nfloat d=max(0.0,dist-Rin)/Rin+1.0;attenuation=clamp(1.0/(pow(d,e)),0.0,1.0);\n#endif\n#else\nfloat Rin=0.0;\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_INNER_RADIUS\nRin=_light.innerRadius;\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_OUTER_RADIUS\nfloat Rdiff=_light.outerRadius-Rin;float d=clamp(max(0.0,dist-Rin)/Rdiff,0.0,1.0);attenuation=1.0-d*d;\n#else\nfloat d=max(0.0,dist-Rin)/Rin+1.0;attenuation=clamp(1.0/d,0.0,1.0);\n#endif\n#else\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_OUTER_RADIUS\nfloat d=clamp(dist/_light.outerRadius,0.0,1.0);attenuation=1.0-d*d;\n#else\nattenuation=1.0;\n#endif\n#endif\n#endif\nlight_accumulator_ambient.rgb+=_light.ambient*attenuation;\n#ifdef TANGRAM_MATERIAL_DIFFUSE\nlight_accumulator_diffuse.rgb+=_light.diffuse*nDotVP*attenuation;\n#endif\n#ifdef TANGRAM_MATERIAL_SPECULAR\nfloat pf=0.0;if(nDotVP>0.0){vec3 reflectVector=reflect(-VP,_normal);float eyeDotR=max(0.0,dot(-normalize(_eyeToPoint),reflectVector));pf=pow(eyeDotR,material.shininess);}light_accumulator_specular.rgb+=_light.specular*pf*attenuation;\n#endif\n}")}}]),r}();ru.types.point=au;var su=function(){function r(e,t){var i;return mr(this,r),(i=Mr(this,Ar(r).call(this,e,t))).type="spotlight",i.struct_name="SpotLight",i.direction=i._direction=(t.direction||[0,0,-1]).map(parseFloat),i._initial_direction=[i.direction[0],i.direction[1],i.direction[2]],i.exponent=t.exponent?parseFloat(t.exponent):.2,i.angle=t.angle?parseFloat(t.angle):20,i}return br(r,au),yr(r,[{key:"setupProgram",value:function(e){Rr(Ar(r.prototype),"setupProgram",this).call(this,e),e.uniform("3fv","u_".concat(this.name,".direction"),this.direction),e.uniform("1f","u_".concat(this.name,".spotCosCutoff"),Math.cos(3.14159*this.angle/180)),e.uniform("1f","u_".concat(this.name,".spotExponent"),this.exponent)}},{key:"update",value:function(){Rr(Ar(r.prototype),"update",this).call(this),ea.transformMat4(this.direction,this._initial_direction,this.view.lookAtManipulator.getTransformationMatrix())}},{key:"direction",get:function(){return this._direction},set:function(e){this._direction=iu.normalize(iu.copy(e))}}],[{key:"inject",value:function(){Zl.addBlock(ru.block,"/*Expected globals:materiallight_accumulator_**/struct SpotLight{vec3 ambient;vec3 diffuse;vec3 specular;vec4 position;\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_EXPONENT\nfloat attenuationExponent;\n#endif\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_INNER_RADIUS\nfloat innerRadius;\n#endif\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_OUTER_RADIUS\nfloat outerRadius;\n#endif\nvec3 direction;float spotCosCutoff;float spotExponent;};void calculateLight(in SpotLight _light,in vec3 _eyeToPoint,in vec3 _normal){float dist=length(_light.position.xyz-_eyeToPoint);vec3 VP=(_light.position.xyz-_eyeToPoint)/dist;float nDotVP=clamp(dot(_normal,VP),0.0,1.0);float attenuation=1.0;\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_EXPONENT\nfloat Rin=1.0;float e=_light.attenuationExponent;\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_INNER_RADIUS\nRin=_light.innerRadius;\n#endif\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_OUTER_RADIUS\nfloat Rdiff=_light.outerRadius-Rin;float d=clamp(max(0.0,dist-Rin)/Rdiff,0.0,1.0);attenuation=1.0-(pow(d,e));\n#else\nfloat d=max(0.0,dist-Rin)/Rin+1.0;attenuation=clamp(1.0/(pow(d,e)),0.0,1.0);\n#endif\n#else\nfloat Rin=0.0;\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_INNER_RADIUS\nRin=_light.innerRadius;\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_OUTER_RADIUS\nfloat Rdiff=_light.outerRadius-Rin;float d=clamp(max(0.0,dist-Rin)/Rdiff,0.0,1.0);attenuation=1.0-d*d;\n#else\nfloat d=max(0.0,dist-Rin)/Rin+1.0;attenuation=clamp(1.0/d,0.0,1.0);\n#endif\n#else\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_OUTER_RADIUS\nfloat d=clamp(dist/_light.outerRadius,0.0,1.0);attenuation=1.0-d*d;\n#else\nattenuation=1.0;\n#endif\n#endif\n#endif\nfloat spotAttenuation=0.0;float spotDot=clamp(dot(-VP,_light.direction),0.0,1.0);if(spotDot>=_light.spotCosCutoff){spotAttenuation=pow(spotDot,_light.spotExponent);}light_accumulator_ambient.rgb+=_light.ambient*attenuation*spotAttenuation;\n#ifdef TANGRAM_MATERIAL_DIFFUSE\nlight_accumulator_diffuse.rgb+=_light.diffuse*nDotVP*attenuation*spotAttenuation;\n#endif\n#ifdef TANGRAM_MATERIAL_SPECULAR\nfloat pf=0.0;if(nDotVP>0.0){vec3 reflectVector=reflect(-VP,_normal);float eyeDotR=max(dot(-normalize(_eyeToPoint),reflectVector),0.0);pf=pow(eyeDotR,material.shininess);}light_accumulator_specular.rgb+=_light.specular*pf*attenuation*spotAttenuation;\n#endif\n}")}}]),r}();ru.types.spotlight=su;var lu,uu="\n#ifdef TANGRAM_FRAGMENT_SHADER\nuniform sampler2D u_rasters[TANGRAM_NUM_RASTER_SOURCES];uniform vec2 u_raster_sizes[TANGRAM_NUM_RASTER_SOURCES];uniform vec3 u_raster_offsets[TANGRAM_NUM_RASTER_SOURCES];\n#define adjustRasterUV(raster_index, uv) ((uv) * u_raster_offsets[raster_index].z + u_raster_offsets[raster_index].xy)\n#define currentRasterUV(raster_index) (adjustRasterUV(raster_index, v_modelpos_base_zoom.xy))\n#define currentRasterPixel(raster_index) (currentRasterUV(raster_index) * rasterPixelSize(raster_index))\n#define sampleRaster(raster_index) (texture2D(u_rasters[raster_index], currentRasterUV(raster_index)))\n#define sampleRasterAtPixel(raster_index, pixel) (texture2D(u_rasters[raster_index], adjustRasterUV(raster_index, (pixel) / rasterPixelSize(raster_index))))\n#define rasterPixelSize(raster_index) (u_raster_sizes[raster_index])\n#endif\n",cu={init:function(e){var t=0s?i[s]:i;this.vertex_template[a+s+o]=l}else Kr("warn","Style: in style '".concat(this.name,"', no index found in vertex layout for attribute '").concat(t,"'"))},startData:function(e){this.tile_data[e.id]=this.tile_data[e.id]||{meshes:{},uniforms:{},textures:[]}},endData:function(e){var t=this.tile_data[e.id];if(this.tile_data[e.id]=null,t&&0s&&(o.vertex_data.vertex_buffer.fill(0,a,o.vertex_data.offset),o.vertex_data.vertex_count=s,o.vertex_data.offset=a)}},buildGeometry:function(e,t,i,r){var n;return"Polygon"===e.type?n=this.buildPolygons([e.coordinates],t,i,r):"MultiPolygon"===e.type?n=this.buildPolygons(e.coordinates,t,i,r):"LineString"===e.type?n=this.buildLines([e.coordinates],t,i,r):"MultiLineString"===e.type?n=this.buildLines(e.coordinates,t,i,r):"Point"===e.type?n=this.buildPoints([e.coordinates],t,i,r):"MultiPoint"===e.type&&(n=this.buildPoints(e.coordinates,t,i,r)),n},parseFeature:function(t,e,i){try{var r=this.feature_style;if(r.order=this.parseOrder(e.order,i),null==r.order&&"overlay"!==this.blend){var n="Layer '".concat(e.layers.join(", "),"', draw group '").concat(e.group,"': ");return n+="'order' parameter is required unless blend mode is 'overlay'",null!=e.order&&(n+="; 'order' was set to a dynamic value (e.g. string tied to feature property, ",n+="or JS function), but evaluated to null for one or more features"),void Kr({level:"warn",once:!0},n)}if(!(r=this._parseFeature(t,e,i)))return;if(this.selection?r.interactive=jo.evalProperty(this.introspection||e.interactive,i):r.interactive=!1,!0===r.interactive){var o=Jl.makeEntry(),a=o.color,s=o.key;r.selection_color=a,i.tile.selection_data||(i.tile.selection_data={}),i.tile.selection_data[s]={id:t.id||s,properties:t.properties,source_name:i.source,source_layer:i.layer,layers:i.layers}}else r.selection_color=Jl.defaultColor;return r}catch(e){Kr("error","Style.parseFeature: style parsing error",t,r,e.stack)}},_parseFeature:function(e,t,i){return this.feature_style},preprocess:function(e,t){if(!e.preprocessed){if(this.draw)for(var i in this.draw){var r=this.draw[i];"object"!==vr(r)||Array.isArray(r)?null==e[i]&&(e[i]=r):e[i]=fl({},r,e[i])}var n=t||"";if(!(e=this._preprocess(e,n)))return;e.preprocessed=!0}return e},_preprocess:function(e,t){return e},parseOrder:function(e,t){return"number"!=typeof e?jo.calculateOrder(e,t):e},scaleOrder:function(e){return 2*e},parseColor:function(e,t){return e?jo.evalCachedColorProperty(e,t):this.shaders.blocks.color||this.shaders.blocks.filter?jo.defaults.color:void 0},buildPolygons:function(){return 0},buildLines:function(){return 0},buildPoints:function(){return 0},setGL:function(e){this.gl=e,this.max_texture_size=$o.getMaxTextureSize(this.gl)},makeMesh:function(e,t,i){var r=2i.z){var r=l.coords.z-i.z,n=Math.pow(2,r);s[t]=[(l.coords.x%n+n)%n/n,(n-1-l.coords.y%n)/n,1/n]}else s[t]=[0,0,1]}),u})},loadTextures:function(e){return $o.createFromObject(this.gl,e).then(function(){return Promise.all(Object.keys(e).map(function(e){return $o.textures[e]&&$o.textures[e].load()}).filter(function(e){return e}))}).then(function(e){return e.forEach(function(e){return e.retain()}),e.map(function(e){return{name:e.name,width:e.width,height:e.height,loaded:e.loaded}})})},setup:function(){this.setUniforms(),this.material.setupProgram(Zl.current)},setUniforms:function(){var e=Zl.current;e&&e.setUniforms(this.shaders&&this.shaders.uniforms,!0)},render_states:{opaque:{depth_test:!0,depth_write:!0},translucent:{depth_test:!0,depth_write:!0},add:{depth_test:!0,depth_write:!1},multiply:{depth_test:!0,depth_write:!1},inlay:{depth_test:!0,depth_write:!1},overlay:{depth_test:!1,depth_write:!1}},default_blend_orders:{opaque:0,add:1,multiply:2,inlay:3,translucent:4,overlay:5},blendOrderSort:function(e,t){var i=parseInt(e.name)-parseInt(t.name);return i||("opaque"===e.blend||"opaque"===t.blend?"opaque"===e.blend&&"opaque"===t.blend?e.namet.blend_order?1:cu.default_blend_orders[e.blend]cu.default_blend_orders[t.blend]?1:e.namethis.byte_length){this.size=Math.floor(1.5*this.size),this.size-=this.size%4,this.byte_length=this.stride*this.size;var e=new Uint8Array(this.byte_length);e.set(this.vertex_buffer),r.array_pool.push(this.vertex_buffer),this.vertex_buffer=e,this.setBufferViews(),this.realloc_count++}}},{key:"setAddVertexFunction",value:function(){this.vertexLayoutAddVertex=this.vertex_layout.getAddVertexFunction()}},{key:"addVertex",value:function(e){this.checkBufferSize(),this.vertexLayoutAddVertex(e,this.views,this.offset),this.offset+=this.stride,this.vertex_count++}},{key:"end",value:function(){return this.vertex_buffer=this.vertex_buffer.subarray(0,this.offset),this.element_buffer=this.vertex_elements.end(),Kr("trace","VertexData: ".concat(this.size," vertices total, realloc count ").concat(this.realloc_count)),this}}]),r}();mu.array_pool=[];var gu=function(){function l(e){mr(this,l),this.attribs=e,this.dynamic_attribs=this.attribs.filter(function(e){return!e.static}),this.components=[],this.index={},this.offset={};for(var t=this.stride=0,i=0,r=0;r>o,s=0;s> "+o.shift:"",";")),t=o.type),i.push("t[o + ".concat(o.offset,"] = v[").concat(o.index,"];"))}i=i.join("\n");var a=new Function("v","vs","off",i);l.add_vertex_funcs[e]=a}this.addVertex=l.add_vertex_funcs[e]}}]),l}();gu.enabled_attribs={},gu.add_vertex_funcs={};var yu=[{x:0,y:0},{x:Jr.tile_scale,y:-Jr.tile_scale}],xu=[0,0,1,1];function bu(e,t,i){var r=yu[0],n=yu[1];return e[0]<=r.x+i&&t[0]<=r.x+i||e[0]>=n.x-i&&t[0]>=n.x-i||e[1]>=r.y-i&&t[1]>=r.y-i||e[1]<=n.y+i&&t[1]<=n.y+i}function Au(e,t){t=t||0;var i=yu[0],r=yu[1];return e[0]<=i.x+t||e[0]>=r.x-t||e[1]>=i.y-t||e[1]<=r.y+t}var Tu=wu;function wu(e,t,i){i=i||2;var r,n,o,a,s,l,u,c=t&&t.length,h=c?t[0]*i:e.length,f=ku(e,0,h,i,!0),d=[];if(!f)return d;if(c&&(f=function(e,t,i,r){var n,o,a,s,l,u=[];for(n=0,o=t.length;n80*i){r=o=e[0],n=a=e[1];for(var _=i;_o.x?n.x>a.x?n.x:a.x:o.x>a.x?o.x:a.x,c=n.y>o.y?n.y>a.y?n.y:a.y:o.y>a.y?o.y:a.y,h=Iu(s,l,t,i,r),f=Iu(u,c,t,i,r),d=e.nextZ;d&&d.z<=f;){if(d!==e.prev&&d!==e.next&&Cu(n.x,n.y,o.x,o.y,a.x,a.y,d.x,d.y)&&0<=Fu(d.prev,d,d.next))return!1;d=d.nextZ}for(d=e.prevZ;d&&d.z>=h;){if(d!==e.prev&&d!==e.next&&Cu(n.x,n.y,o.x,o.y,a.x,a.y,d.x,d.y)&&0<=Fu(d.prev,d,d.next))return!1;d=d.prevZ}return!0}function Pu(e,t,i){var r=e;do{var n=r.prev,o=r.next.next;!Du(n,o)&&ju(n,r,r.next,o)&&Uu(n,o)&&Uu(o,n)&&(t.push(n.i/i),t.push(r.i/i),t.push(o.i/i),Vu(r),Vu(r.next),r=e=o),r=r.next}while(r!==e);return r}function zu(e,t,i,r,n,o){var a,s,l=e;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&(s=u,(a=l).next.i!==s.i&&a.prev.i!==s.i&&!function(e,t){var i=e;do{if(i.i!==e.i&&i.next.i!==e.i&&i.i!==t.i&&i.next.i!==t.i&&ju(i,i.next,e,t))return!0;i=i.next}while(i!==e);return!1}(a,s)&&Uu(a,s)&&Uu(s,a)&&function(e,t){var i=e,r=!1,n=(e.x+t.x)/2,o=(e.y+t.y)/2;for(;i.y>o!=i.next.y>o&&n<(i.next.x-i.x)*(o-i.y)/(i.next.y-i.y)+i.x&&(r=!r),i=i.next,i!==e;);return r}(a,s))){var c=Gu(l,u);return l=Eu(l,l.next),c=Eu(c,c.next),Mu(l,t,i,r,n,o),void Mu(c,t,i,r,n,o)}u=u.next}l=l.next}while(l!==e)}function Nu(e,t){return e.x-t.x}function Ou(e,t){if(t=function(e,t){var i,r=t,n=e.x,o=e.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=n&&a=r.x&&r.x>=c&&Cu(oi.x)&&Uu(r,e)&&(i=r,f=l),r=r.next;return i}(e,t)){var i=Gu(t,e);Eu(i,i.next)}}function Iu(e,t,i,r,n){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)/n)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)/n)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Lu(e){for(var t=e,i=e;t.xo.miter_len_sq&&(r=Qu.bevel),r===Qu.miter?(hc(e,a,t,1,n,o,1),hc(e,a,t,0,n,o,-1)):(hc(e,t,t,1,n,o,1),hc(e,t,t,0,n,o,-1)),cc(1,o)}}(i,n,o=iu.normalize(iu.perp(i,e[1])),a,p,t):(hc(i,n,o,1,p,t,1),hc(i,n,o,0,p,t,-1),cc(1,t),!d&&Au(i)||_c(i,p,n,s,!1,t))}}}function ac(e,t,i){for(var r=t;e[r+1]&&bu(e[r],e[r+1],i);)r++;return 2<=e.length-r&&e.slice(r)}function sc(e,t){var i=iu.normalize(iu.add(e,t)),r=2/(1+Math.abs(iu.dot(e,i)));return iu.mult(i,r*r)}function lc(e,t,i,r,n,o,a){var s=sc(i,r);iu.lengthSq(s)>n?uc(Qu.bevel,e,t,i,r,o,a):(hc(t,s,s,1,e,a,1),hc(t,s,s,0,e,a,-1),o||cc(1,a))}function uc(e,t,i,r,n,o,a){var s=sc(r,n),l=0=Math.PI;)d-=2*Math.PI;if(u)_=1;else{var _=function(e,t){e<0&&(e=-e);var i=t>2*ec.MIN_FAN_WIDTH?Math.log2(t/ec.MIN_FAN_WIDTH):1;return Math.ceil(e/Math.PI*i)}(d,c.half_width);if(_<1)return}var p=c.vertex_data.vertex_count,v=c.vertex_data.vertex_elements;hc(e,i,n,a[0],a[1],c,1),hc(e,t,n,o[0],o[1],c,1);var m=t,g=null!=c.texcoord_index;if(g)if(l)var y=iu.sub(o,a);else{fc=iu.copy(o);var x=iu.div(iu.sub(s,o),_)}var b,A,T=d/_,w=d<0?-1:1;A=0=Math.abs(n)?(t.offset=r*i.units_per_meter_overzoom,t.offset_scale=0!==r?1-n/r:0):(t.offset=n*i.units_per_meter_overzoom,t.offset_scale=0!=n?-1*(1-r/n):0)}else t.offset=r*i.units_per_meter_overzoom,t.offset_scale=0}else t.offset=0,t.offset_scale=0;jo.evalProperty(e.offset_reverse,i)&&(t.offset*=-1)},_parseFeature:function(e,t,i){var r=this.feature_style;if(!1!==this.calcWidth(t,r,i)&&(this.calcOffset(t,r,i),r.color=this.parseColor(t.color,i),r.color)){if(r.variant=t.variant,r.z=t.z&&jo.evalCachedDistanceProperty(t.z||0,i)||jo.defaults.z,r.height=e.properties.height||jo.defaults.height,r.extrude=jo.evalProperty(t.extrude,i),r.extrude&&("number"==typeof r.extrude?r.height=r.extrude:Array.isArray(r.extrude)&&(r.height=r.extrude[1])),r.extrude&&r.height&&(r.z+=r.height),r.z*=Jr.height_scale,r.height*=Jr.height_scale,r.cap=jo.evalProperty(t.cap,i),r.join=jo.evalProperty(t.join,i),r.miter_limit=jo.evalProperty(t.miter_limit,i),r.tile_edges=t.tile_edges,r.outline=r.outline||{width:{},next_width:{},preprocessed:!0},t.outline&&!1!==t.outline.visible&&t.outline.color&&t.outline.width){var n=2*this.calcDistance(t.outline.width,i),o=2*this.calcDistanceNextZoom(t.outline.next_width,i);0==n&&0==o||n<0||o<0?(r.outline.width.value=null,r.outline.next_width.value=null,r.outline.color=null,r.outline.inline_texcoord_width=null,r.outline.texcoords=!1):(r.outline.width.value=n+r.width_unscaled,r.outline.next_width.value=o+r.next_width_unscaled,r.outline.inline_texcoord_width=r.texcoord_width,r.outline.offset_precalc=r.offset,r.outline.offset_scale_precalc=r.offset_scale,r.outline.color=t.outline.color,r.outline.cap=t.outline.cap,r.outline.join=t.outline.join,r.outline.miter_limit=t.outline.miter_limit,r.outline.texcoords=t.outline.texcoords,r.outline.style=t.outline.style,r.outline.variant=t.outline.variant,t.outline.order?r.outline.order=this.parseOrder(t.outline.order,i):r.outline.order=r.order,r.outline.order>r.order&&(r.outline.order=r.order),r.outline.order-=.5,r.outline.variant_order=0)}else r.outline.width.value=null,r.outline.next_width.value=null,r.outline.color=null,r.outline.inline_texcoord_width=null;return r}},_preprocess:function(e,t){var i=this.sources[t]?this.sources[t].config.uid:"";if(e.color=jo.createColorPropertyCache(e.color),e.width=jo.createPropertyCache(e.width,jo.parseUnits),e.width&&e.width.type!==jo.CACHE_TYPE.STATIC&&(e.next_width=jo.createPropertyCache(e.width,jo.parseUnits)),e.offset=e.offset&&jo.createPropertyCache(e.offset,jo.parseUnits),e.offset&&e.offset.type!==jo.CACHE_TYPE.STATIC&&(e.next_offset=jo.createPropertyCache(e.offset,jo.parseUnits)),e.z=jo.createPropertyCache(e.z,jo.parseUnits),e.dash=void 0!==e.dash?e.dash:this.dash,e.dash_key=e.dash&&this.dashTextureKey(e.dash,i),e.dash_background_color=void 0!==e.dash_background_color?e.dash_background_color:this.dash_background_color,e.dash_background_color=e.dash_background_color&&jo.parseColor(e.dash_background_color),e.texture_merged=e.dash_key||(void 0!==e.texture?e.texture:this.texture),e.texcoords=this.texcoords||e.texture_merged?1:0,this.computeVariant(e),e.outline){e.outline.style=e.outline.style||this.name,e.outline.color=jo.createColorPropertyCache(e.outline.color),e.outline.width=jo.createPropertyCache(e.outline.width,jo.parseUnits),e.outline.next_width=jo.createPropertyCache(e.outline.width,jo.parseUnits),e.outline.cap=e.outline.cap||e.cap,e.outline.join=e.outline.join||e.join,e.outline.miter_limit=e.outline.miter_limit||e.miter_limit,e.outline.offset=e.offset;var r=this.styles[e.outline.style];r?(e.outline.dash=void 0!==e.outline.dash?e.outline.dash:r.dash,e.outline.texture=void 0!==e.outline.texture?e.outline.texture:r.texture,null!=e.outline.dash?(e.outline.dash_key=e.outline.dash&&this.dashTextureKey(e.outline.dash,i),e.outline.texture_merged=e.outline.dash_key):null===e.outline.dash?(e.outline.dash_key=null,e.outline.texture_merged=e.outline.texture):null!=e.outline.texture?(e.outline.dash_key=null,e.outline.texture_merged=e.outline.texture):(e.outline.dash=e.dash,e.outline.dash_key=e.outline.dash&&this.dashTextureKey(e.outline.dash,i),e.outline.texture_merged=e.outline.dash_key),e.outline.dash_background_color=void 0!==e.outline.dash_background_color?e.outline.dash_background_color:r.dash_background_color,e.outline.dash_background_color=void 0!==e.outline.dash_background_color?e.outline.dash_background_color:e.dash_background_color,e.outline.dash_background_color=e.outline.dash_background_color&&jo.parseColor(e.outline.dash_background_color),e.outline.texcoords=r.texcoords||e.outline.texture_merged?1:0,this.computeVariant(e.outline)):(Kr({level:"warn",once:!0},"Layer '".concat(e.layers[e.layers.length-1],"': ")+"line 'outline' specifies non-existent draw style '".concat(e.outline.style,"' (or maybe the style is ")+"defined but is missing a 'base' or has another error), skipping outlines in layer"),e.outline=null)}return e},dashTextureKey:function(e,t){return"__dash_"+t+"_"+JSON.stringify(e)},getDashTexture:function(e,t){var i=this.dashTextureKey(e,this.sources[t].config.uid);if(null==mc.dash_textures[i]){mc.dash_textures[i]=!0;var r=function(e,t){var i=1l[i]?2:0,n=l[i-1],l[i]),u[c++]=l[i],u[c++]=r,u[c++]=n,u[c++]=o},f=0;f0.0){if((abs(angle)>THETA)){position.xy+=v*width*o/cos(angle/2.0);float s=sign(angle);if(angle<0.0){if(u==+1.0){u=v_segment.y+v*width*tan(angle/2.0);if(v==1.0){position.xy-=2.0*width*t1/sin(angle);u-=2.0*width/sin(angle);}}else{u=v_segment.x-v*width*tan(angle/2.0);if(v==1.0){position.xy+=2.0*width*t2/sin(angle);u+=2.0*width/sin(angle);}}}else{if(u==+1.0){u=v_segment.y+v*width*tan(angle/2.0);if(v==-1.0){position.xy+=2.0*width*t1/sin(angle);u+=2.0*width/sin(angle);}}else{u=v_segment.x-v*width*tan(angle/2.0);if(v==-1.0){position.xy-=2.0*width*t2/sin(angle);u-=2.0*width/sin(angle);}}}}else{position.xy+=v*width*o/cos(angle/2.0);if(u==+1.0){u=v_segment.y;}else{u=v_segment.x;}}}else{position.xy+=v*o*halfMiterlength;if(u==+1.0){u=v_segment.y+v*width*tan(angle/2.0);}else{u=v_segment.x-v*width*tan(angle/2.0);}}v_joinIndicator=(segmentLength+v*width*tan(angle/2.0))/segmentLength;}else{v_joinIndicator=-1.0;position.xy+=v*width*o1;if(u==-1.0){u=v_segment.x-width;position.xy-=width*t1;}else{u=v_segment.y+width;position.xy+=width*t2;}}vec2 t;vec2 curr=a_position.xy;if(a_texcoord.x>=0.0){vec2 next=curr+t2*(v_segment.y-v_segment.x);rotate(t1,+a_angles.x/2.0,t);v_miter.x=signed_distance(curr,curr+t,position.xy);rotate(t2,+a_angles.y/2.0,t);v_miter.y=signed_distance(next,next+t,position.xy);}else{vec2 prev=curr-t1*(v_segment.y-v_segment.x);rotate(t1,-a_angles.x/2.0,t);v_miter.x=signed_distance(prev,prev+t,position.xy);rotate(t2,-a_angles.y/2.0,t);v_miter.y=signed_distance(curr,curr+t,position.xy);}v_distances=vec2(u,v*width);v_world_position=wrapWorldPosition(u_model*position);v_local_space_position=position;position=u_modelView*position;\n#pragma tangram: position\nv_position=position;v_normal=normalize(u_normalMatrix*TANGRAM_NORMAL);\n#if defined(TANGRAM_LIGHTING_VERTEX)\nvec3 normal=v_normal;\n#pragma tangram: normal\nv_lighting=calculateLighting(position.xyz-u_eye,normal,vec4(1.));\n#endif\ncameraProjection(position);\n#ifdef TANGRAM_LAYER_ORDER\napplyLayerOrder(a_position.w+u_tile_proxy_depth+1.,position);\n#endif\ngl_Position=position;}",fragment_shader_src:"uniform vec2 u_resolution;uniform float u_time;uniform vec4 u_tile_origin;uniform float u_meters_per_pixel;uniform float u_device_pixel_ratio;uniform mat3 u_normalMatrix;uniform mat3 u_inverseNormalMatrix;uniform sampler2D u_dash_atlas;uniform float u_antialias;uniform vec2 u_linecaps;uniform float u_linejoin;uniform float u_miter_limit;uniform float u_dash_phase;uniform float u_dash_period;uniform float u_dash_index;uniform vec2 u_dash_caps;varying vec4 v_position;varying vec4 v_local_space_position;varying vec3 v_normal;varying vec4 v_color;varying vec4 v_world_position;varying float v_closed;\n#ifdef TANGRAM_DEBUG_TRIANGLES\nvarying vec3 v_barycentric;\n#endif\nvarying vec2 v_segment;varying vec2 v_angles;varying vec2 v_texcoord;varying vec2 v_distances;varying vec2 v_miter;varying float v_length;varying float v_linewidth;varying float v_joinIndicator;\n#define TANGRAM_NORMAL v_normal\n#ifdef TANGRAM_MODEL_POSITION_BASE_ZOOM_VARYING\nvarying vec4 v_modelpos_base_zoom;\n#endif\n#if defined(TANGRAM_LIGHTING_VERTEX)\nvarying vec4 v_lighting;\n#endif\n#pragma tangram: camera\n#pragma tangram: material\n#pragma tangram: lighting\n#pragma tangram: global\n#pragma tangram: utils\nconst float PI=3.141592653589793;const float HALF_PI=PI/2.0;const float THETA=15.0*PI/180.0;/***Compute distance to cap.*@param{int}type The Type of the cap(see CAP_TYPE in pattern_lines)*@param{float}dx The distance of the pixel from the beginning of the line(not straight distance,but along the legs)*@param{float}dy The distance of the pixel from the midline(see v_distances in vertex shader,aka \xb11*half_line_width)*@param{float}aa_radius The distance from the mid-line from where antialiasing starts.*For example for a line width 10px width and 2px filter radius it is 10px/2-2px=3px.*@return{float}distance*/float cap(int type,float dx,float dy,float aa_radius){float dist=0.0;dx=abs(dx);dy=abs(dy);if(type==1)dist=sqrt(dx*dx+dy*dy);else if(type==3)dist=(dx+abs(dy));else if(type==2)dist=max(abs(dy),(aa_radius+dx-abs(dy)));else if(type==4)dist=max(dx,dy);else if(type==5)dist=max(dx+aa_radius,dy);return dist;}/***Compute distance to join.*@param{int}type The type of the join(see JOIN_TYPE in pattern_lines)*@param{vec2}segment Interpolated a_segment attribute from the vertex shader*@param{vec2}texcoord Pair of u/v coordinates to identify the 4 different extruded points of the segment.*@param{vec2}distances 2 component vector where:*x is the distance of the pixel from the beginning of the line(along the legs)*y is the distance of the pixel from the midline(see v_distances in vertex shader,\xb11*half_line_width)*@param{vec2}miter Miter point coordiante*@param{float}miter_limit The miter limit*@param{float}line_width The line width*@return{float}computed distance*/float join(in int type,in vec2 segment,in vec2 texcoord,in vec2 distances,in vec2 miter,in float miter_limit,in float line_width){float dx=distances.x;float result=abs(distances.y);if((dxsegment.y)){if(type==1){float s=dx=0.0 ? miter.x : miter.y);if(type==2){result=max(result,m);}else if(type==0){result=max(result,m-miter_limit*line_width/2.0);}}}return result;}void main(void){\n#pragma tangram: setup\nvec4 color=v_color;vec3 normal=TANGRAM_NORMAL;\n#ifdef TANGRAM_CROP_BY_TILE\nif(isLocalSpacePixelOutsideTile(v_local_space_position,TANGRAM_TILE_SCALE.x)){discard;}\n#endif\n#if defined(TANGRAM_LIGHTING_FRAGMENT) && defined(TANGRAM_MATERIAL_NORMAL_TEXTURE)\ncalculateNormal(normal);\n#endif\n#if !defined(TANGRAM_LIGHTING_VERTEX)\n#pragma tangram: normal\n#endif\n#pragma tangram: color\n#if defined(TANGRAM_LIGHTING_FRAGMENT)\ncolor=calculateLighting(v_position.xyz-u_eye,normal,color);\n#elif defined(TANGRAM_LIGHTING_VERTEX)\ncolor*=v_lighting;\n#endif\n#pragma tangram: filter\nif(v_color.a<=0.0){discard;}bool solid=(u_dash_index==0.0);bool closed=v_closed>0.0;float dx=v_distances.x;float dy=v_distances.y;float aa_radius=v_linewidth/2.0-u_antialias;float width=v_linewidth;float dist=0.0;vec2 linecaps=u_linecaps;vec2 dash_caps=u_dash_caps;float line_start=0.0;float line_stop=v_length;if(solid){dist=abs(dy);bool potentialCap=!closed&&v_joinIndicator<0.0;if(potentialCap&&dxline_stop){dist=cap(int(u_linecaps.y),abs(dx)-line_stop,abs(dy),aa_radius);}else{dist=join(int(u_linejoin),v_segment,v_texcoord,v_distances,v_miter,u_miter_limit,v_linewidth);}}else{float segment_start=v_segment.x;float segment_stop=v_segment.y;float segment_center=(segment_start+segment_stop)/2.0;float freq=u_dash_period*width;float dash_phase=u_dash_phase-1e-5;float u=mod(dx+dash_phase*width,freq);vec4 tex=texture2D(u_dash_atlas,vec2(u/freq,u_dash_index));float dash_center=float(tex.x)*255.0*width;float dash_type=floor(float(tex.y)*255.0+0.5);float _start=float(tex.z)*255.0*width;float _stop=float(tex.a)*255.0*width;float dash_start=dx-u+_start;float dash_stop=dx-u+_stop;if((dash_stopsegment_stop)&&(dash_caps.y!=5.0)){float u=mod(segment_stop+dash_phase*width,freq);vec4 tex=texture2D(u_dash_atlas,vec2(u/freq,u_dash_index));dash_center=float(tex.x)*255.0*width;float _start=float(tex.z)*255.0*width;float _stop=float(tex.a)*255.0*width;dash_start=segment_stop-u+_start;dash_stop=segment_stop-u+_stop;}bool discontinuous=((dxTHETA)||((dx>=segment_center)&&abs(v_angles.y)>THETA);float d_join=join(int(u_linejoin),v_segment,v_texcoord,v_distances,v_miter,u_miter_limit,v_linewidth);if(closed){line_start+=v_linewidth/2.0;line_stop-=v_linewidth/2.0;}if(dash_stop<=line_start){discard;}if(dash_start>=line_stop){discard;}if(discontinuous){if((dash_start>segment_stop)){discard;}if((dash_stop_stop)&&(dash_stop>segment_stop)&&(abs(v_angles.y)0.0){discard;}dash_caps.x=4.0;}}if((dash_caps.y!=1.0)&&(dash_caps.y!=5.0)){if((dash_stop>segment_stop)&&(abs(v_angles.y)0.0){discard;}dash_caps.y=4.0;}}}if((dxline_start)){dist=cap(int(linecaps.x),dx-line_start,dy,aa_radius);}else if((dx>line_stop)&&(dash_stop>line_stop)&&(dash_startline_start)&&(dxline_start)&&(dxline_start)&&(dx=segment_start)){dist=d_join;float angle=HALF_PI+v_angles.x;float f=abs((segment_start-dx)*cos(angle)-dy*sin(angle));dist=max(f,dist);}else if((dx>segment_stop)&&(dash_start<=segment_stop)&&(dash_stop>=segment_stop)){dist=d_join;float angle=HALF_PI+v_angles.y;float f=abs((dx-segment_stop)*cos(angle)-dy*sin(angle));dist=max(f,dist);}else if(dx<(segment_start-v_linewidth/2.)){discard;}else if(dx>(segment_stop+v_linewidth/2.)){discard;}}else if(dx<(segment_start-v_linewidth/2.)){discard;}else if(dx>(segment_stop+v_linewidth/2.)){discard;}}dist=dist-aa_radius;if(dist>=0.0){if(u_antialias==0.0){discard;}else{color=vec4(color.rgb,exp(-dist*dist)*color.a);}}\n#ifdef TANGRAM_DEBUG_TRIANGLES\nif(any(lessThan(v_barycentric,vec3(0.0085)))){color=vec4(0.0,1.0,0.0,1.0);}\n#endif\ngl_FragColor=color;}",selection:!0,init:function(){cu.init.apply(this,arguments),this.defines.TANGRAM_LAYER_ORDER=!0,this.defines.TANGRAM_CROP_BY_TILE=this.crop_by_tile,this.defines.TANGRAM_DEBUG_TRIANGLES=!1,this.defines.TANGRAM_DEBUG_NO_TEXTURE_FLOAT_SUPPORT=!1,this.styles=this.styles||{},wc.vertex_layouts=[],wc.variants={}},calcDistance:function(e,t){return e&&jo.evalCachedDistanceProperty(e,t)||0},calcDash:function(e,t){var i=jo.evalProperty(e.dash,t),r=0;return i&&((i=Array.isArray(i)&&i.length?i:Sc).length%2==1&&(i=i.concat(i)),r=+(r=i.reduce(function(e,t){return e+t}))||0),{dash:i,dash_period:r}},calcWidth:function(e,t,i){var r=this.calcDistance(e.width,i);return!(r<0)&&(t.width=r*i.units_per_meter_overzoom,!0)},getCapType:function(e,t,i){var r=jo.evalProperty(e,t);return void 0!==kc[r]?kc[r]:i},_parseFeature:function(e,t,i){if(!1!==this.calcWidth(t,this.feature_style,i)){var r=this.parseColor(t.color,i);if(r&&0!==r[3]){var n=this.getCapType(t.cap,i,Mc),o=jo.evalProperty(t.join,i),a=+jo.evalProperty(t.miter_limit,i),s=this.calcDash(t,i),l=s.dash,u=s.dash_period,c=Object.assign({color:r,antialias:t.antialias,linecaps:[this.getCapType(t.tail_cap,i,n),this.getCapType(t.head_cap,i,n)],join:void 0!==Ec[o]?Ec[o]:Rc,miter_limit:0<=a?a:3,dash_index:0===u?0:1,dash:l,dash_caps:[this.getCapType(t.tail_cap,i,n),this.getCapType(t.head_cap,i,n)],dash_phase:+jo.evalProperty(t.dash_phase,i)||0,dash_period:u},this.feature_style);return c.z=t.z&&jo.evalCachedDistanceProperty(t.z||0,i)||jo.defaults.z,c.z*=Jr.height_scale,c.extrude=jo.evalProperty(t.extrude,i),c.extrude&&(!0===c.extrude?(c.height=void 0!==e.properties.height?e.properties.height:jo.defaults.height,c.min_height=void 0!==e.properties.min_height?e.properties.min_height:jo.defaults.min_height):"number"==typeof c.extrude?(c.height=c.extrude,c.min_height=0):Array.isArray(c.extrude)&&(c.min_height=c.extrude[0],c.height=c.extrude[1]),c.height*=Jr.height_scale,c.min_height*=Jr.height_scale),this.computeVariant(c),c}}},_preprocess:function(e,t){e.color=jo.createColorPropertyCache(e.color),e.width=jo.createPropertyCache(e.width,jo.parseUnits),e.width&&e.width.type!==jo.CACHE_TYPE.STATIC&&(e.next_width=jo.createPropertyCache(e.width,jo.parseUnits)),e.z=jo.createPropertyCache(e.z,jo.parseUnits);var i=+e.antialias;return e.antialias=isNaN(i)?0:i,e},buildRasterTextures:function(e,t){var i=[];for(var r in t.meshes){var n=wc.variants[r],o=n.uniforms,a=n.pattern;if(o.u_dash_index){var s="__dash_"+a.join("_")+"_"+e.key+"_"+e.id;i.push({name:s,data:Tc(a,1024)}),o.u_dash_atlas=s,t.meshes[r].textures=[s]}t.meshes[r].uniforms=o}return t.uniforms=t.uniforms||{},i.length?Cr.postMessage(this.main_thread_target+".loadTextures",i).then(function(){return t}):Promise.resolve(t)},loadTextures:function(e){for(var t=[],i=0;ia)){var A=new Uc(b,t,i,r);A.angle=qc(y,x,r.angle),n.push(A)}}}return n}function qc(e,t,i){var r=2=m?e():document.fonts.load(A(_,'"'+_.family+'"'),p).then(function(e){1<=e.length?i():setTimeout(t,25)},function(){e()})}()});var t=new Promise(function(e,t){v=setTimeout(t,m)});Promise.race([t,e]).then(function(){clearTimeout(v),f(_)},function(){d(_)})}else!function(t){document.body?t():document.addEventListener?document.addEventListener("DOMContentLoaded",function e(){document.removeEventListener("DOMContentLoaded",e),t()}):document.attachEvent("onreadystatechange",function e(){"interactive"!=document.readyState&&"complete"!=document.readyState||(document.detachEvent("onreadystatechange",e),t())})}(function(){function t(){var e;(e=-1!=o&&-1!=a||-1!=o&&-1!=s||-1!=a&&-1!=s)&&((e=o!=a&&o!=s&&a!=s)||(null===T&&(e=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent),T=!!e&&(parseInt(e[1],10)<536||536===parseInt(e[1],10)&&parseInt(e[2],10)<=11)),e=T&&(o==l&&a==l&&s==l||o==u&&a==u&&s==u||o==c&&a==c&&s==c)),e=!e),e&&(h.parentNode&&h.parentNode.removeChild(h),clearTimeout(v),f(_))}var i=new y(p),r=new y(p),n=new y(p),o=-1,a=-1,s=-1,l=-1,u=-1,c=-1,h=document.createElement("div");h.dir="ltr",x(i,A(_,"sans-serif")),x(r,A(_,"serif")),x(n,A(_,"monospace")),h.appendChild(i.a),h.appendChild(r.a),h.appendChild(n.a),document.body.appendChild(h),l=i.a.offsetWidth,u=r.a.offsetWidth,c=n.a.offsetWidth,function H(){if((new Date).getTime()-g>=m)h.parentNode&&h.parentNode.removeChild(h),d(_);else{var e=document.hidden;!0!==e&&void 0!==e||(o=i.a.offsetWidth,a=r.a.offsetWidth,s=n.a.offsetWidth,t()),v=setTimeout(H,50)}}(),b(i,function(e){o=e,t()}),x(i,A(_,'"'+_.family+'",sans-serif')),b(r,function(e){a=e,t()}),x(r,A(_,'"'+_.family+'",serif')),b(n,function(e){s=e,t()}),x(n,A(_,'"'+_.family+'",monospace'))})})},e.exports=t}),Zc={fonts_loaded:Promise.resolve(),last_loaded:null,loadFonts:function(r){var n=this,e=JSON.stringify(r)===this.last_loaded;return r&&!e&&function(){function e(t){Array.isArray(r[t])?r[t].forEach(function(e){return i.push(n.loadFontFace(t,e))}):i.push(n.loadFontFace(t,r[t]))}var i=[];for(var t in r)e(t);n.last_loaded=JSON.stringify(r),n.fonts_loaded=Promise.all(i.filter(function(e){return e}))}(),this.fonts_loaded},loadFontFace:function(e,t){if(null!=t&&("object"===vr(t)||"external"===t)){var i={family:e},r=Promise.resolve();"object"===vr(t)&&(Object.assign(i,t),"string"==typeof t.url&&(r=this.injectFontFace(i)));var n=new Xc(e,i);return r.then(function(){return n.load()}).then(function(){Kr("debug","Font face '".concat(e,"' is available"),i)},function(){Kr("debug","Font face '".concat(e,"' is NOT available"),i)})}},injectFontFace:function(e){var n=this,o=e.family,t=e.url,a=e.weight,s=e.style;void 0===this.supports_native_font_loading&&(this.supports_native_font_loading=void 0!==window.FontFace);var i=Promise.resolve(t);return"blob:"===t.slice(0,5)&&(i=on.io(t,6e4,"arraybuffer").then(function(e){var t=new Uint8Array(e);if(n.supports_native_font_loading)return t;for(var i="",r=0;rT.cache.text_count_max&&(T.cache.text={},T.cache.text_count=0,Kr("debug","CanvasText: pruning text cache")),Object.keys(T.cache.segment).length>T.cache.segment_count_max&&(T.cache.segment={},Kr("debug","CanvasText: pruning segment cache"))}}]),T}();Kc.font_size_re=/((?:[0-9]*\.)?[0-9]+)\s*(px|pt|em|%)?/,Kc.cache={text:{},text_count:0,text_count_max:2e3,segment:{},segment_count_max:2e3,stats:{text_hits:0,text_misses:0,segment_hits:0,segment_misses:0}};var Jc=new RegExp("[\u0591-\u07ff\u200f\u202b\u202e\ufb1d-\ufdfd\ufe70-\ufefc]");function $c(e){return Jc.test(e)}var Qc="\0-/:-@[-`{-\xbf\xd7\xf7\u02b9-\u02ff\u2000-\u2bff\u2010-\u2029\u202c\u202f-\u2bff",eh=new RegExp("["+Qc+"]+");function th(e){return eh.test(e)}var ih=new RegExp("^["+Qc+"\u0600-\u06ff]+"),rh=new RegExp("["+Qc+"\u0622-\u0625\u0627\u062f-\u0632\u0648\u0671-\u0677\u0688-\u0699\u06c4-\u06cb\u06cf\u06d2\u06d3\u06ee\u06ef]"),nh=new RegExp("^[\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed]+"),oh="[\u0300-\u036f\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u07a6-\u07b0\u0900-\u0903\u093a-\u094c\u094e\u094f\u0951-\u0957\u0962\u0963\u0981-\u0983\u09bc\u09be-\u09cc\u09d7\u09e2\u09e3\u0a01-\u0a03\u0a3c-\u0a4c\u0a51\u0a81-\u0a83\u0abc\u0abe-\u0acc\u0ae2\u0ae3\u0b01-\u0b03\u0b3c\u0b3e-\u0b4c\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe-\u0bcd\u0bd7\u0c00-\u0c03\u0c3e-\u0c4c\u0c55\u0c56\u0c62\u0c63\u0c81-\u0c83\u0cbc\u0cbe-\u0ccc\u0cd5\u0cd6\u0ce2\u0ce3\u0d01-\u0d03\u0d3e-\u0d4c\u0d4e\u0d57\u0d62\u0d63\u0d82\u0d83\u0dca-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f83\u0f86\u0f87\u0f8d-\u0fbc\u0fc6\u102b-\u1038\u103a-\u103e\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f\u109a-\u109d\u17b4-\u17d1\u17d3\u1a55-\u1a5e\u1a61-\u1a7c\u1dc0-\u1dff\u20d0-\u20ff]",ah=new RegExp("^.(?:"+oh+"+)?([\u094d\u09cd\u0a4d\u0acd\u0b4d\u0c4d\u0ccd\u0d4d\u0f84\u1039\u17d2\u1a60\u1a7f]\\W(?:"+oh+"+)?)*"),sh={Mongolian:"\u1800-\u18af"},lh=Object.keys(sh).map(function(e){return sh[e]}).join(""),uh=new RegExp("["+lh+"]");var ch=2;function hh(e,t){var i=t?1:ch;if(e.lengththis.width&&(this.width=Math.ceil(t)),this.lines.push(e),this.height+=e.height,!0}return this.addEllipsis(),!1}},{key:"advance",value:function(e,t){return!!this.push(e)&&this.createLine(t)}},{key:"addEllipsis",value:function(){var e=this.lines[this.lines.length-1],t=Math.ceil(this.context.measureText(_.ellipsis).width);e.append(_.ellipsis),e.width+=t,e.width>this.width&&(this.width=e.width)}},{key:"finish",value:function(e){e?this.push(e):this.addEllipsis()}}],[{key:"parse",value:function(e,t,i,r,n){var o;o="number"==typeof t?e.split(" "):[e];for(var a=new _(n,i,t),s=a.createLine(r),l=0;lthis.text_wrap}}]),i}(),_h={resetText:function(){this.texts={}},freeText:function(e){delete this.texts[e.id]},parseTextFeature:function(e,t,i,r){var n=this.parseTextSource(e,t,i);if(null!=n&&""!==n){var o=Wc.compute(e,t,i),a=Wc.key(o);this.texts[r.id]=this.texts[r.id]||{};var s=this.texts[r.id][a]=this.texts[r.id][a]||{};if(n instanceof Object){var l=[],u=n.left+"-"+n.right;for(var c in n){var h=n[c];if(h){var f=this.computeTextLayout({},e,t,i,r,h,o,u,c);s[h]||(s[h]={text_settings:o,ref:0}),l.push({draw:t,text:h,text_settings_key:a,layout:f})}}return 0=this._min_zoom;){if(n.setLookAtData({zoom:o-=.1,position:t,tilt:i,heading:r}),e.every(function(e){return ml.isPointInsidePolygon(e,n.getLookAtData().bounds)}))break}return n.getLookAtData().zoom}},{key:"setZoomConstraints",value:function(e,t){this._min_zoom=e,this._max_zoom=t,this.setLookAtData(this.getLookAtData())}},{key:"setLookAtData",value:function(e,t){var i,r,n=e.position,o=e.zoom;if(n===i&&e.bounds!==i&&(n=ml.getBBoxCenter(ml.getBBox(e.bounds))),o===i&&e.bounds!==i&&(o=this._getZoomForBounds(e.bounds,n,e.tilt,e.heading)),t!==i&&(r=n||this.screenToWorld(t)),o!==i){o=ml.clamp(o,this._min_zoom,this._max_zoom);var a=on.zoomToTileLevel(o),s=this._lookAtData.tile_level;a!==s&&(this._zoom_direction=s=Jr.circumference_meters&&(s=[[-Jr.half_circumference_meters,o],[Jr.half_circumference_meters,o],[Jr.half_circumference_meters,r],[-Jr.half_circumference_meters,r]]);var u=[];return s&&(u=ml.splitLegs(s,Jr.half_circumference_meters)),u}},{key:"applyPxOffset",value:function(e){var t=Sr(e,2),i=t[0],r=t[1],n=Math.PI-this._lookAtData.heading*ph,o=Jr.metersPerPixel(this._lookAtData.zoom);this._lookAtData.position[0]+=(i*Math.cos(n)+r*Math.sin(n))*o,this._lookAtData.position[1]-=(r*Math.cos(n)-i*Math.sin(n))*o,this._lookAtData.position[1]=ml.clamp(this._lookAtData.position[1],-Jr.half_circumference_meters,Jr.half_circumference_meters),this._updateMatrices(),this._updateVisibleBounds()}},{key:"screenToWorld",value:function(e){var t=Sr(e,2),i=t[0],r=t[1],n=this._viewport,o=n.width,a=n.height;return 0===o||0===a?[0,0]:(i-=o/2,r-=a/2,this._clipCoordsToWorldPlaneCoords([2*(i+o/2)/o-1,1-2*(r+a/2)/a,-1,1]))}},{key:"_clipToScreenCoords",value:function(e){var t=this._viewport,i=t.width,r=t.height;return[(.5*e[0]+.5)*i,r-(.5*e[1]+.5)*r]}},{key:"_isScreenPointInViewPort",value:function(e){var t=this._viewport,i=t.width,r=t.height;return 0<=e[0]&&e[0]<=i&&0<=e[1]&&e[1]<=r}},{key:"worldToScreen",value:function(e,t){var i,r=1i.preserve_tiles_within_zoom)return!0;var t=aa.coordinateAtZoom(e.coords,i.lookAtManipulator.getLookAtData().tile_level);return Math.abs(t.x-i.center_tile.x)-r[0]>i.buffer||Math.abs(t.y-i.center_tile.y)-r[1]>i.buffer})}}},{key:"createMatrices",value:function(){this.matrices={},this.matrices.model=new Float64Array(16),this.matrices.model32=new Float32Array(16),this.matrices.model_view=new Float64Array(16),this.matrices.model_view32=new Float32Array(16),this.matrices.normal=new Float64Array(9),this.matrices.normal32=new Float32Array(9),this.matrices.inverse_normal32=new Float32Array(9)}},{key:"setupTile",value:function(e,t){e.setupProgram(this.matrices,t),this.lookAtManipulator.setupMatrices(this.matrices,t)}},{key:"setupProgram",value:function(e){var t=this.lookAtManipulator.getLookAtData();e.uniform("2fv","u_resolution",[this.size.device.width,this.size.device.height]),e.uniform("3fv","u_map_position",[t.position[0],t.position[1],Math.trunc(1e5*t.zoom)/1e5]),e.uniform("1f","u_meters_per_pixel",Jr.metersPerPixel(t.zoom)),e.uniform("1f","u_device_pixel_ratio",on.device_pixel_ratio),e.uniform("1f","u_view_pan_snap_timer",this.pan_snap_timer),e.uniform("1i","u_view_panning",this.panning),e.uniform("1f","u_horizon",this.lookAtManipulator.getHorizon()/(this.size.css.height/2)),this.lookAtManipulator.setupProgram(e)}},{key:"isAnimating",value:function(){return this.pan_snap_timer<=.5}},{key:"xyToGeo",value:function(e,t){var i=this.lookAtManipulator.screenToWorld([e,t]),r=Sr(Jr.metersToLatLng(i),2),n=r[0];return{lat:r[1],lng:n}}},{key:"geoToPixel",value:function(e){var t=Jr.latLngToMeters([e.lng,e.lat]);t.push(e.alt||0);var i=this.lookAtManipulator.worldToScreen(t);return{x:Math.floor(i[0]),y:Math.floor(i[1])}}},{key:"geoToMeters",value:function(e){var t=Sr(Jr.latLngToMeters([e.lng,e.lat]),2);return{x:t[0],y:t[1],z:e.alt||0}}},{key:"metersToGeo",value:function(e){var t=Sr(Jr.metersToLatLng([e.x,e.y]),2),i=t[0];return{lat:t[1],lng:i,alt:e.z||0}}},{key:"setZoomConstraints",value:function(e,t){this.lookAtManipulator.setZoomConstraints(e,t)}}]),i}(),Dh=Uc.PLACEMENT,jh=128/Math.PI,Uh=16384/Math.PI,Gh=Object.create(cu);Gh.variants={};Object.assign(Gh,_h),Object.assign(Gh,{name:"points",built_in:!0,vertex_shader_src:"uniform vec2 u_resolution;uniform float u_time;uniform vec3 u_map_position;uniform vec4 u_tile_origin;uniform float u_tile_proxy_depth;uniform bool u_tile_fade_in;uniform float u_meters_per_pixel;uniform float u_device_pixel_ratio;uniform float u_visible_time;uniform bool u_view_panning;uniform float u_tilt;uniform mat4 u_model;uniform mat4 u_modelView;uniform mat3 u_normalMatrix;uniform mat3 u_inverseNormalMatrix;uniform float u_heading;uniform float u_near_plane;uniform float u_depth_buffer_adjustment;attribute vec4 a_position;attribute vec4 a_shape;attribute vec4 a_color;attribute vec2 a_texcoord;attribute vec2 a_offset;uniform float u_point_type;attribute float a_is_flat;\n#ifdef TANGRAM_IS_TEXT_STYLE\nattribute vec4 a_offsets_alt;attribute vec4 a_pre_angles_alt;attribute vec4 a_angles_alt;attribute vec4 a_offsets;attribute vec4 a_pre_angles;attribute vec4 a_angles;\n#endif\n#ifdef TANGRAM_POINT_DRAW_STICK\nattribute float a_is_stick;attribute float a_stick_height;varying float v_is_stick;\n#endif\nvarying vec4 v_color;varying vec2 v_texcoord;varying vec4 v_world_position;varying float v_alpha_factor;\n#ifdef TANGRAM_HAS_SHADER_POINTS\nattribute float a_outline_edge;attribute vec4 a_outline_color;varying float v_outline_edge;varying vec4 v_outline_color;varying float v_aa_offset;\n#endif\n#ifdef TANGRAM_SHOW_HIDDEN_LABELS\nvarying float v_label_hidden;\n#endif\n#define PI 3.14159265359\n#define TANGRAM_NORMAL vec3(0., 0., 1.)\n#pragma tangram: camera\n#pragma tangram: material\n#pragma tangram: lighting\n#pragma tangram: raster\n#pragma tangram: global\nvec2 rotate2D(vec2 _st,float _angle){return mat2(cos(_angle),-sin(_angle),sin(_angle),cos(_angle))*_st;}vec3 rotateX3D(vec3 _st,float _angle){return mat3(1.,0.,0.,0.,cos(_angle),sin(_angle),0.,-sin(_angle),cos(_angle))*_st;}vec3 rotateZ3D(vec3 _st,float _angle){return mat3(cos(_angle),sin(_angle),0.,-sin(_angle),cos(_angle),0.,0.,0.,1.)*_st;}\n#ifdef TANGRAM_IS_TEXT_STYLE\nfloat mix4linear(float a,float b,float c,float d,float x){return mix(mix(a,b,3.*x),mix(b,mix(c,d,3.*(max(x,.66)-.66)),3.*(clamp(x,.33,.66)-.33)),step(0.33,x));}\n#endif\nvoid main(){\n#pragma tangram: setup\n#ifndef TANGRAM_SHOW_HIDDEN_LABELS\nif(a_shape.w==0.){gl_Position=vec4(0.,0.,0.,1.);return;}\n#else\nif(a_shape.w==0.){v_label_hidden=1.;}else{v_label_hidden=0.;}\n#endif\nv_alpha_factor=1.0;v_color=a_color;v_texcoord=a_texcoord;\n#ifdef TANGRAM_HAS_SHADER_POINTS\nv_outline_color=a_outline_color;v_outline_edge=a_outline_edge;if(u_point_type==TANGRAM_POINT_TYPE_SHADER){v_outline_color=a_outline_color;v_outline_edge=a_outline_edge;float size=abs(a_shape.x/128.);v_texcoord=sign(a_shape.xy)*(size+1.)/(size);size+=2.;v_aa_offset=2./size;}\n#endif\nvec4 position=u_modelView*vec4(a_position.xyz,1.);vec4 shape=vec4(a_shape.xy,0.,0.);vec2 offset=vec2(a_offset.x,-a_offset.y);\n#ifdef TANGRAM_POINT_DRAW_STICK\nv_is_stick=a_is_stick;float scaled_stick_height=(sin(u_tilt+(1.5*PI))+1.0)*a_stick_height;offset.y+=(1.0-a_is_stick)*scaled_stick_height;\n#endif\nfloat zoom=clamp(u_map_position.z-u_tile_origin.z,0.,1.);float theta=a_shape.z/4096.;float heading=u_heading;float delta=(heading-PI);float new_theta=theta-delta;float reversed=abs(new_theta)>PI/2. ? 1. : 0.;if(a_is_flat==1.0){\n#ifdef TANGRAM_IS_TEXT_STYLE\nif(a_offsets[0]!=0.){vec4 angles_scaled;vec4 pre_angles_scaled;vec4 offsets_scaled;if(reversed==1.){offsets_scaled=a_offsets_alt*4.;angles_scaled=(PI/16384.)*a_angles_alt;pre_angles_scaled=(PI/128.)*a_pre_angles_alt;}else{offsets_scaled=a_offsets*4.;angles_scaled=(PI/16384.)*a_angles;pre_angles_scaled=(PI/128.)*a_pre_angles;}float pre_angle=mix4linear(pre_angles_scaled[0],pre_angles_scaled[1],pre_angles_scaled[2],pre_angles_scaled[3],zoom);float angle=mix4linear(angles_scaled[0],angles_scaled[1],angles_scaled[2],angles_scaled[3],zoom);float offset_curve=mix4linear(offsets_scaled[0],offsets_scaled[1],offsets_scaled[2],offsets_scaled[3],zoom);shape.xy=rotate2D(shape.xy,pre_angle+PI*reversed);shape.x+=offset_curve;shape.xy=rotate2D(shape.xy,angle);shape.xy+=rotate2D(offset,theta);}else{shape.xy=rotate2D(shape.xy+offset*256.,theta+(PI*reversed));}\n#else\nshape.xy=rotate2D(shape.xy+offset*256.,theta);\n#endif\nshape.xy/=pow(2.,4.+(u_map_position.z-u_tile_origin.w));shape=u_modelView*shape;position+=shape;}else{shape.xy/=256.;\n#ifdef TANGRAM_POINT_DRAW_STICK\nshape.y*=1.0+(scaled_stick_height-1.0)*a_is_stick;\n#endif\nshape.xy=rotate2D(shape.xy+offset,theta);}\n#ifdef TANGRAM_FADE_IN_RATE\nif(u_tile_fade_in){v_alpha_factor*=clamp(u_visible_time*TANGRAM_FADE_IN_RATE,0.,1.);}\n#endif\n#ifdef TANGRAM_FADE_ON_ZOOM_OUT\nv_alpha_factor*=clamp(1.+TANGRAM_FADE_ON_ZOOM_OUT_RATE*(u_map_position.z-u_tile_origin.z),0.,1.);\n#endif\nv_world_position=u_model*position;v_world_position.xy+=shape.xy*u_meters_per_pixel;v_world_position=wrapWorldPosition(v_world_position);\n#pragma tangram: position\ncameraProjection(position);\n#ifdef TANGRAM_LAYER_ORDER\napplyLayerOrder(a_position.w+u_tile_proxy_depth+1.,position);/***Due to the precision loss on depth buffer,we had a z-fighting of translucent points when the distance to the camera was big.*For more information about the problem see: https:*For more information about the fix see: https:*position.z=(2.0*log(position.w/u_near_plane)/log(u_far_plane/u_near_plane)-1.0)*position.w;*/position.z=(log(position.w/u_near_plane)*u_depth_buffer_adjustment-1.0)*position.w;\n#endif\nif(a_is_flat!=1.){position.xy+=shape.xy*position.w*2.*u_device_pixel_ratio/u_resolution;}\n#ifdef TANGRAM_HAS_SHADER_POINTS\nif(u_point_type==TANGRAM_POINT_TYPE_SHADER){position.xy+=sign(shape.xy)*position.w*u_device_pixel_ratio/u_resolution;}\n#endif\n#ifdef TANGRAM_HAS_SHADER_POINTS\nif(!u_view_panning&&(abs(theta)0.){color.a*=0.5;color.rgb=vec3(1.,0.,0.);}\n#endif\n#if !defined(TANGRAM_BLEND_OVERLAY) && !defined(TANGRAM_BLEND_INLAY) && !defined(TANGRAM_BLEND_ADD)\nif(color.a>>0,o.priority=a,o},buildTextLabels:function(e,t){for(var i=[],r=0;ru[0]?1===n?(t.push(l),r<(i+=c)&&(o=t,r=i,a=!1)):(t=[u,l],r<(i=c)&&(o=t,r=i,a=!1),n=1):l[0]Math.PI&&(d+=pMath.PI&&(_+=v<_?-2*Math.PI:2*Math.PI)}a.push(d),s.push(_),l.push(f)}return[l,a,s]}}]),j}();function Wh(e,t){var i=iu.sub(t,e);return iu.angle(i)}function Xh(e){for(var t=[],i=0;iMath.PI;)i+=2*Math.PI;return Math.abs(r-i)}var Kh=Object.create(Gh);Object.assign(Kh,{name:"text",super:Gh,built_in:!0,init:function(e){var t=0=tile_scale||pixel_local_space_position.y>0.||pixel_local_space_position.y<=-tile_scale;}\n#endif\n"),Zl.replaceBlock("setup","\n#if defined(TANGRAM_FEATURE_SELECTION) && defined(TANGRAM_VERTEX_SHADER)\nif(a_selection_color.rgb==vec3(0.)||a_selection_color==u_selection_discard0||a_selection_color==u_selection_discard1||a_selection_color==u_selection_discard2||a_selection_color==u_selection_discard3||a_selection_color==u_selection_discard4||a_selection_color==u_selection_discard5||a_selection_color==u_selection_discard6||a_selection_color==u_selection_discard7||a_selection_color==u_selection_discard8||a_selection_color==u_selection_discard9){gl_Position=vec4(0.,0.,0.,1.);return;}v_selection_color=a_selection_color;\n#endif\n"),Zl.defines.TANGRAM_EPSILON=1e-5,Zl.defines.TANGRAM_LAYER_DELTA=1/16384,Zl.defines.TANGRAM_TILE_SCALE="vec3(".concat(Jr.tile_scale,"., ").concat(Jr.tile_scale,"., u_meters_per_pixel * ").concat(Jr.tile_size,".)"),Zl.defines.TANGRAM_HEIGHT_SCALE=Jr.height_scale,Zl.defines.TANGRAM_ALPHA_TEST=.1,mc.dash_textures={}}},{key:"destroy",value:function(i){var r=this;Object.keys(this.styles).forEach(function(e){var t=r.styles[e];t.gl===i&&(Kr("trace","StyleManager.destroy: destroying render style ".concat(t.name)),t.base&&r.remove(t.name),t.destroy())})}},{key:"register",value:function(e){this.styles[e.name]=e,this.base_styles[e.name]=e}},{key:"remove",value:function(e){delete this.styles[e]}},{key:"mix",value:function(t,i){if(t.mixed)return t;t.mixed={};var e=[];if(t.mix){var r;if(Array.isArray(t.mix))(r=e).push.apply(r,Pr(t.mix));else e.push(t.mix);(e=e.map(function(e){return i[e]}).filter(function(e){return e&&e!==t})).forEach(function(e){return t.mixed[e.name]=!0})}e.push(t),t.animated=e.some(function(e){return e&&e.animated}),t.texcoords=e.some(function(e){return e&&e.texcoords}),t.base=e.map(function(e){return e.base}).filter(function(e){return e}).pop(),t.lighting=e.map(function(e){return e.lighting}).filter(function(e){return null!=e}).pop(),t.texture=e.map(function(e){return e.texture}).filter(function(e){return e}).pop(),t.raster=e.map(function(e){return e.raster}).filter(function(e){return null!=e}).pop(),t.dash=e.map(function(e){return e.dash}).filter(function(e){return null!=e}).pop(),t.dash_background_color=e.map(function(e){return e.dash_background_color}).filter(function(e){return null!=e}).pop(),e.some(function(e){return e.hasOwnProperty("blend")&&e.blend})&&(t.blend=e.map(function(e){return e.hasOwnProperty("blend")&&e.blend}).filter(function(e){return e}).pop()),t.blend_order=e.map(function(e){return e.blend_order}).filter(function(e){return null!=e}).pop(),t.defines=Object.assign.apply(Object,[{}].concat(Pr(e.map(function(e){return e.defines}).filter(function(e){return e})))),t.material=Object.assign.apply(Object,[{}].concat(Pr(e.map(function(e){return e.material}).filter(function(e){return e}))));var n=e.map(function(e){return e.draw}).filter(function(e){return e});return 0t/2-1){i=" ... ",r+=5;break}for(n="",o=this.position;ot/2-1){n=" ... ",o-=5;break}return a=this.buffer.slice(r,o),af.repeat(" ",e)+i+a+n+"\n"+af.repeat(" ",e+this.position-r+i.length)+"^"},uf.prototype.toString=function(e){var t,i="";return this.name&&(i+='in "'+this.name+'" '),i+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(i+=":\n"+t),i};var cf=uf,hf=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],ff=["scalar","sequence","mapping"];var df=function(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===hf.indexOf(e))throw new lf('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(e){return e},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=function(e){var i={};return null!==e&&Object.keys(e).forEach(function(t){e[t].forEach(function(e){i[String(e)]=t})}),i}(e.styleAliases||null),-1===ff.indexOf(this.kind))throw new lf('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')};function _f(e,t,r){var n=[];return e.include.forEach(function(e){r=_f(e,t,r)}),e[t].forEach(function(i){r.forEach(function(e,t){e.tag===i.tag&&n.push(t)}),r.push(i)}),r.filter(function(e,t){return-1===n.indexOf(t)})}function pf(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new lf("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=_f(this,"implicit",[]),this.compiledExplicit=_f(this,"explicit",[]),this.compiledTypeMap=function(){var e,t,i={};function r(e){i[e.tag]=e}for(e=0,t=arguments.length;e>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|o.indexOf(r.charAt(t));return 0==(i=n%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18==i?(s.push(a>>10&255),s.push(a>>2&255)):12==i&&s.push(a>>4&255),Rf?new Rf(s):s},predicate:function(e){return Rf&&Rf.isBuffer(e)},represent:function(e){var t,i,r="",n=0,o=e.length,a=Sf;for(t=0;t>18&63],r+=a[n>>12&63],r+=a[n>>6&63],r+=a[63&n]),n=(n<<8)+e[t];return 0==(i=o%3)?(r+=a[n>>18&63],r+=a[n>>12&63],r+=a[n>>6&63],r+=a[63&n]):2==i?(r+=a[n>>10&63],r+=a[n>>4&63],r+=a[n<<2&63],r+=a[64]):1==i&&(r+=a[n>>2&63],r+=a[n<<4&63],r+=a[64],r+=a[64]),r}}),zf=Object.prototype.hasOwnProperty,Nf=Object.prototype.toString;var Of=new df("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,i,r,n,o,a=[],s=e;for(t=0,i=s.length;tt)&&0!==r)fd(e,"bad indentation of a sequence entry");else if(e.lineIndentt?d=1:e.lineIndent===t?d=0:e.lineIndentt?d=1:e.lineIndent===t?d=0:e.lineIndentt)&&(kd(e,t,Wf,!0,n)&&(_?f=e.result:d=e.result),_||(md(e,u,c,h,f,d),h=f=d=null),yd(e,!0,-1),a=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==a)fd(e,"bad indentation of a mapping entry");else if(e.lineIndentu&&(u=e.lineIndent),id(o))c++;else{if(e.lineIndent>10),56320+(l-65536&1023)),e.position++}else fd(e,"unknown escape sequence");i=r=e.position}else id(s)?(pd(e,i,r,!0),bd(e,yd(e,!1,t)),i=r=e.position):e.position===e.lineStart&&xd(e)?fd(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}fd(e,"unexpected end of the stream within a double quoted scalar")}(e,h)?p=!0:!function(e){var t,i,r;if(42!==(r=e.input.charCodeAt(e.position)))return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!nd(r)&&!od(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&fd(e,"name of an alias node must contain at least one character"),i=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(i)||fd(e,'unidentified alias "'+i+'"'),e.result=e.anchorMap[i],yd(e,!0,-1),!0}(e)?function(e,t,i){var r,n,o,a,s,l,u,c,h=e.kind,f=e.result;if(nd(c=e.input.charCodeAt(e.position))||od(c)||35===c||38===c||42===c||33===c||124===c||62===c||39===c||34===c||37===c||64===c||96===c)return!1;if((63===c||45===c)&&(nd(r=e.input.charCodeAt(e.position+1))||i&&od(r)))return!1;for(e.kind="scalar",e.result="",n=o=e.position,a=!1;0!==c;){if(58===c){if(nd(r=e.input.charCodeAt(e.position+1))||i&&od(r))break}else if(35===c){if(nd(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&xd(e)||i&&od(c))break;if(id(c)){if(s=e.line,l=e.lineStart,u=e.lineIndent,yd(e,!1,-1),e.lineIndent>=t){a=!0,c=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=l,e.lineIndent=u;break}}a&&(pd(e,n,o,!1),bd(e,e.line-s),n=o=e.position,a=!1),rd(c)||(o=e.position+1),c=e.input.charCodeAt(++e.position)}return pd(e,n,o,!1),!!e.result||(e.kind=h,e.result=f,!1)}(e,h,qf===i)&&(p=!0,null===e.tag&&(e.tag="?")):(p=!0,null===e.tag&&null===e.anchor||fd(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===d&&(p=s&&Ad(e,f))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(l=0,u=e.implicitTypes.length;l tag; it should be "'+c.kind+'", not "'+e.kind+'"'),c.resolve(e.result)?(e.result=c.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):fd(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):fd(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||p}function Ed(e){var t,i,r,n,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(n=e.input.charCodeAt(e.position))&&(yd(e,!0,-1),n=e.input.charCodeAt(e.position),!(0t?o+=e.slice(s,a)+"\n"+e.slice(a+1):o+=e.slice(s),o}function c_(e){return!(32<=e&&e<=126||133===e||160<=e&&e<=55295||57344<=e&&e<=65533||65536<=e&&e<=1114111)}function h_(e,t,i){var r,n,o,a,s,l;for(o=0,a=(n=i?e.explicitTypes:e.implicitTypes).length;o tag resolver accepts not "'+l+'" style');r=s.represent[l](t,l)}e.dump=r}return!0}return!1}function f_(e,t,i,r,n,o){e.tag=null,e.dump=i,h_(e,i,!1)||h_(e,i,!0);var a=zd.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var s,l,u="[object Object]"===a||"[object Array]"===a;if(u&&(l=-1!==(s=e.duplicates.indexOf(i))),(null!==e.tag&&"?"!==e.tag||l||2!==e.indent&&0 "+e.dump)}return!0}function d_(e,t){var i,r,n=[],o=[];for(function e(t,i,r){var n,o,a;if(null!==t&&"object"==typeof t)if(-1!==(o=i.indexOf(t)))-1===r.indexOf(o)&&r.push(o);else if(i.push(t),Array.isArray(t))for(o=0,a=t.length;o checkpoint")).position=e,t.checkpoint=this.checkpoint,t;return this.result+=this.source.slice(this.checkpoint,e),this.checkpoint=e,this},s_.prototype.escapeChar=function(){var e,t;return e=this.source.charCodeAt(this.checkpoint),t=i_[e]||function(e){var t,i,r;if(t=e.toString(16).toUpperCase(),e<=255)i="x",r=2;else if(e<=65535)i="u",r=4;else{if(!(e<=4294967295))throw new lf("code point within a string may not be greater than 0xFFFFFFFF");i="U",r=8}return"\\"+i+af.repeat("0",r-t.length)+t}(e),this.result+=t,this.checkpoint+=1,this},s_.prototype.finish=function(){this.source.length>this.checkpoint&&this.takeUpTo(this.source.length)};var p_={dump:__,safeDump:function(e,t){return __(e,af.extend({schema:Ff},t))}};function v_(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}var m_={Type:df,Schema:vf,FAILSAFE_SCHEMA:mf,JSON_SCHEMA:Tf,CORE_SCHEMA:wf,DEFAULT_SAFE_SCHEMA:Ff,DEFAULT_FULL_SCHEMA:Bf,load:Pd.load,loadAll:Pd.loadAll,safeLoad:Pd.safeLoad,safeLoadAll:Pd.safeLoadAll,dump:p_.dump,safeDump:p_.safeDump,YAMLException:lf,MINIMAL_SCHEMA:mf,SAFE_SCHEMA:Ff,DEFAULT_SCHEMA:Bf,scan:v_("scan"),parse:v_("parse"),compose:v_("compose"),addConstructor:v_("addConstructor")},g_=function(){function r(e,t){var i=2= "+a)}return b_(r.join(" && "))}function S_(e,t){var i=[];if("function"==typeof e)return[b_(e.toString()+"(context)")];if(Array.isArray(e))return[E_(0,e,t)];if(null==e)return["true"];for(var r,n=Object.keys(e),o=0;ot&&(t=e[n].length);if(0===t)return null;for(var o={visible:!0},a=function(t){if(r=[],e.forEach(function(e){e[t]&&e[t][i]&&-1===r.indexOf(e[t][i])&&r.push(e[t][i])}),0===r.length)return"continue";r.sort(function(e,t){return(e&&e.layer_name)>(t&&t.layer_name)?1:-1}),fl.apply(void 0,[o].concat(Pr(r))),delete o.layer_name},s=0;sthis.max_proxy_ancestor_depth)){if(r>n.max_coord_zoom){var a=this.sourceTiles(i,n);if(a)for(var s=r-1;s>=n.max_coord_zoom;s--)if(a[s]&&a[s].loaded)return a[s];r=n.max_coord_zoom}r--;var l=aa.coordinateAtZoom(i,i.z-1),u=this.sourceTiles(l,n);return u&&u[r]&&u[r].loaded?u[r]:0=n.max_coord_zoom){var s=this.sourceTiles(i,n);if(s)for(var l=Math.max(Jr.default_view_max_zoom,r+this.max_proxy_descendant_depth),u=r+1;u<=l;u++)if(s[u]&&s[u].loaded)return a.push(s[u]),a;return a}if(this.coords[i.key]&&0e||0>b||e>=d.width||b>=d.height)c(z);else{var f=a.map;f.Qd(e,b,function(a){c(a||f)})}}}\nn.Jl=function(a,b,c){a.target=b;Eq(this,a,c);Fq(this,b,\"pointerup\",c,a);\"mouse\"!==a.type&&Fq(this,b,\"pointerleave\",c,a);b=this.g[a.id];var d={x:a.viewportX,y:a.viewportY},e=c.timeStamp,f=a.target,g=this.j;b&&b.target===f&&b.Gg.bb(d)=b.length){c=this.a.clone();for(d=b.length;d--;)c.remove(b[d].identifier);for(d=c.length();d--;)this.a.remove(c.a[d].id);this.b=c;Bq(this,\"pointercancel\",a);this.b.clear()}if(this.G[a.type]){b=lq(this.u.element);c=a.type;d=a.changedTouches;var e=d.length,f;this.b.clear();for(f=0;fa.Bh&&(a.v=!0,e.dispatchEvent(new Lq(b,c,e,d)),pe(f.J(),a.Ki,a.lj,!1,a)):f.Qd(b,c,a.vn.bind(a,b,c,d))}n.vn=function(a,b,c,d){d=d&&r(d.dispatchEvent)?d:this.map;Nq(this,a,b,c,d)};n.Ki=[\"mousedown\",\"touchstart\",\"pointerdown\",\"wheel\"];\nn.lj=function(){this.v&&(this.v=!1,this.map.dispatchEvent(new Ec(\"contextmenuclose\",this.map)))};n.s=function(){var a=this.map.J();clearInterval(this.f);a&&we(a,this.Ki,this.lj,!1,this);zq.prototype.s.call(this)};function Oq(a,b,c,d,e){Oq.l.constructor.call(this,\"wheel\");this.delta=a;this.viewportX=b;this.viewportY=c;this.target=d;this.originalEvent=e}w(Oq,Ec);u(\"H.mapevents.WheelEvent\",Oq);function Pq(a){var b=\"onwheel\"in document;this.P=b;this.G=(b?\"d\":\"wheelD\")+\"elta\";this.f=A(this.f,this);Pq.l.constructor.call(this,a,[{Sa:(b?\"\":\"mouse\")+\"wheel\",listener:this.f}]);this.v=this.map.Ba}w(Pq,zq);\nPq.prototype.f=function(a){if(!a.fl){var b=lq(this.i);var c=a.pageX-b.x;b=a.pageY-b.y;var d=this.G,e=a[d+(d+\"Y\"in a?\"Y\":\"\")],f;mq&&\"rtl\"===y.getComputedStyle(this.v.element).direction&&(c-=(y.devicePixelRatio-1)*this.v.width);if(e){var g=Math.abs;var h=g(e);e=(!(f=a[d+\"X\"])||3<=h/g(f))&&(!(f=a[d+\"Z\"])||3<=h/g(f))?((0e))*(this.P?1:-1):0}c=new Oq(e,c,b,null,a);c.delta&&(a.stopImmediatePropagation(),a.preventDefault(),this.map.Qd(c.viewportX,c.viewportY,this.L.bind(this,c)))}};\nPq.prototype.L=function(a,b){var c=a.target=b||this.map,d,e;setTimeout(function(){c.dispatchEvent(a);a.f||(d=a.originalEvent,e=new y.WheelEvent(\"wheel\",d),e.fl=1,d.target.dispatchEvent(e))},0)};function Qq(a){var b=window;this.f=A(this.f,this);zq.call(this,a,[{Sa:\"mousedown\",listener:this.f},{Sa:\"mousemove\",listener:this.f,target:b},{Sa:\"mouseup\",listener:this.f,target:b},{Sa:\"mouseover\",listener:this.f},{Sa:\"mouseout\",listener:this.f},{Sa:\"dragstart\",listener:this.v}])}w(Qq,zq);\nQq.prototype.f=function(a){var b=a.type,c=lq(this.i);c={x:a.pageX-c.x,y:a.pageY-c.y};var d;(d=this.a.a[0])||(d=new qq(c.x,c.y,1,\"mouse\"),this.a.push(d));this.b.push(d);rq(d,c.x,c.y);/^mouse(?:move|over|out)$/.test(b)?Bq(this,\"pointermove\",a):(/^mouse(down|up)$/.test(b)&&(c=a.which-1,\"up\"===oq.RegExp.$1?tq(d,c):sq(d,c)),Bq(this,b.replace(\"mouse\",\"pointer\"),a));this.b.clear()};Qq.prototype.v=function(a){a.preventDefault()};function Rq(a){var b=a.Ba.element.style;if(-1!==Sq.indexOf(a))throw Error(\"InvalidArgument: map is already in use\");this.a=a;Sq.push(a);b.msTouchAction=b.touchAction=\"none\";nq||!window.PointerEvent&&!window.MSPointerEvent?(this.c=new Hq(this.a),this.b=new Qq(this.a)):this.c=new Iq(this.a);this.g=new Pq(this.a);this.f=new Mq(this.a);this.a.xb(this.F,this);Ac.call(this)}w(Rq,Ac);u(\"H.mapevents.MapEvents\",Rq);Rq.prototype.c=null;Rq.prototype.b=null;Rq.prototype.g=null;Rq.prototype.f=null;\nvar Sq=[];Yb(Sq);Rq.prototype.F=function(){this.a=null;this.c.F();this.g.F();this.f.F();this.b&&this.b.F();Sq.splice(Sq.indexOf(this.a),1);Ac.prototype.F.call(this)};Rq.prototype.dispose=Rq.prototype.F;Rq.prototype.Vl=function(){return this.a};Rq.prototype.getAttachedMap=Rq.prototype.Vl;function Tq(a,b){var c;if(-1!==Uq.indexOf(a))throw new D(Tq,0,\"events are already used\");b=b||{};Ac.call(this);this.a=c=a.a;this.j=a;Uq.push(a);c.draggable=!0;this.i=b.kinetics||{duration:600,Jd:Ll};this.m=b.modifierKey||\"Alt\";this.enable(b.enabled);this.c=c.Ba;this.f=this.c.element;this.g=0;c.addEventListener(\"dragstart\",this.Lh,!1,this);c.addEventListener(\"drag\",this.$j,!1,this);c.addEventListener(\"dragend\",this.Kh,!1,this);c.addEventListener(\"wheel\",this.pk,!1,this);c.addEventListener(\"dbltap\",\nthis.jk,!1,this);c.addEventListener(\"pointermove\",this.ak,!1,this);oe(this.f,\"contextmenu\",this.Zj,!1,this);a.xb(this.F,this)}w(Tq,Ac);u(\"H.mapevents.Behavior\",Tq);var Uq=[];Yb(Uq);Tq.prototype.b=0;var Vq={Ri:1,Ti:2,Ao:4,to:8,uo:16,bc:32,pc:64};Tq.DRAGGING=1;Tq.WHEELZOOM=4;Tq.DBLTAPZOOM=8;Tq.FRACTIONALZOOM=16;Tq.Feature={PANNING:1,PINCH_ZOOM:2,WHEEL_ZOOM:4,DBL_TAP_ZOOM:8,FRACTIONAL_ZOOM:16,HEADING:64,TILT:32};\nfunction Wq(a,b){if(a!==+a||a%1||0>a||2147483647Nc(b[0].viewportY-b[1].viewportY)&&(e|=Vq.bc):a.uh&Tk.TILT&&(e|=Vq.bc))));e&=a.b;return(e&Vq.bc?Tk.TILT:0)|(e&Vq.pc?Tk.HEADING:0)|(e&Vq.Ti?Tk.ZOOM:0)|(e&Vq.Ri?Tk.COORD:0)}\nfunction Yq(a){var b=a.pointers;a=b[0];b=b[1];a=[a.viewportX,a.viewportY];b&&a.push(b.viewportX,b.viewportY);return a}n=Tq.prototype;n.uh=0;n.Lh=function(a){var b=Xq(this,a,!0);if(this.uh=b){var c=this.c;a=Yq(a);c.startInteraction(b,this.i);c.interaction.apply(c,a);if(this.b&4&&!(this.b&16)&&(b=a[0],c=a[1],this.g)){a=this.a.qb();var d=(0>this.g?Mc:Lc)(a);a!==d&&(this.g=0,Zq(this,a,d,b,c))}}};\nn.$j=function(a){var b=Xq(this,a,!1);if(b!==this.uh)\"pointerout\"!==a.originalEvent.type&&\"pointerover\"!==a.originalEvent.type&&(this.Kh(a),this.Lh(a));else if(b){b=this.c;var c=Yq(a);b.interaction.apply(b,c);a.originalEvent.preventDefault()}};n.Kh=function(a){Xq(this,a,!1)&&this.c.endInteraction(!this.i)};\nfunction Zq(a,b,c,d,e){a=a.a.b;if(isNaN(+b))throw Error(\"start zoom needs to be a number\");if(isNaN(+c))throw Error(\"to zoom needs to be a number\");0!==+c-+b&&(a.startControl(null,d,e),a.control(0,0,6,0,0,0),a.endControl(!0,function(a){a.zoom=c}))}n.pk=function(a){if(!a.defaultPrevented&&this.b&4){var b=a.delta;var c=this.a.qb();var d=this.a;var e=d.vc().type;d=this.b&16?c-b:(0>-b?Mc:Lc)(c)-b;if(e===Km.P2D||e===Km.WEBGL)Zq(this,c,d,a.viewportX,a.viewportY),this.g=b;a.preventDefault()}};n.ak=function(){};\nn.jk=function(a){var b=a.currentPointer,c=this.a.qb(),d=a.currentPointer.type,e=this.a.vc().type;(e===Km.P2D||e===Km.WEBGL)&&this.b&8&&(a=\"mouse\"===d?0===a.originalEvent.button?-1:1:0-a?Mc:Lc)(c)-a,Zq(this,c,a,b.viewportX,b.viewportY))};n.Zj=function(a){return this.b&8?(a.preventDefault(),!1):!0};\nn.F=function(){var a=this.a;a&&(a.draggable=!1,a.removeEventListener(\"dragstart\",this.Lh,!1,this),a.removeEventListener(\"drag\",this.$j,!1,this),a.removeEventListener(\"dragend\",this.Kh,!1,this),a.removeEventListener(\"wheel\",this.pk,!1,this),a.removeEventListener(\"dbltap\",this.jk,!1,this),a.removeEventListener(\"pointermove\",this.ak,!1,this),this.a=null);this.f&&(this.f.style.msTouchAction=\"\",we(this.f,\"contextmenu\",this.Zj,!1,this),this.f=null);this.i=this.c=null;Uq.splice(Uq.indexOf(this.j),1);Ac.prototype.F.call(this)};\nTq.prototype.dispose=Tq.prototype.F;u(\"H.mapevents.buildInfo\",function(){return qf(\"mapsjs-mapevents\",\"1.8.1\",\"3dcce55\")});\n"); \ No newline at end of file diff --git a/src/assets/js/mapsjs-service.js b/src/assets/js/mapsjs-service.js new file mode 100644 index 0000000000000000000000000000000000000000..8fe60eaf1e4a5d8ab0f5e7e7a701dc703a88a248 --- /dev/null +++ b/src/assets/js/mapsjs-service.js @@ -0,0 +1,7 @@ + +/** + * The code below uses open source software. Please visit the URL below for an overview of the licenses: + * http://js.api.here.com/v3/3.1.8.1/HERE_NOTICE + */ + +H.util.eval("Q.prototype.v=ca(2,function(a){var b=this.getCache(),c=this;if(a!==z){C(a,Uj,Q.prototype.v,0);var d=a}else d=Ik;d!==b&&b.ha(function(a,b,g){return c.hd(a)?(d.add(a,b,g),!0):!1});this.P=d});function un(a,b){a.f=b;a.C!==gj.INIT&&pj(a)}function vn(a,b){Pa.apply(null,arguments);return a}\nvar wn={normal:[{minLevel:10,maxLevel:20,label:\"IGN Guatemala\",alt:\"Aprobado por el INSTITUTO GEOGRAFICO NACIONAL Resolucion del IGN No 186-2011\",boxes:[[16.5943,-91.4256,17.8168,-89.0225],[14.9642,-89.0225,16.1868,-88.2215],[14.1492,-90.6245,16.5943,-89.0225],[13.7417,-91.8261,14.1492,-89.8235],[14.1492,-92.2266,16.1868,-90.6245],[16.473,-90.6686,16.5943,-90.6245],[14.0259,-89.8235,14.1492,-89.6796]]},{minLevel:9,maxLevel:20,label:\"INEGI\",alt:\"Fuente: INEGI (Instituto Nacional de Estadistica y Geografia)\",\nboxes:[[32,-117.1817,32.7325,-113.1649],[28,-101,29.4004,-99.9666],[26,-99,26.4261,-97.5566],[15.5643,-97.9326,16,-95.2581],[14.4031,-94.2111,16,-91],[16,-91,16.9491,-90.3434],[17.406,-91,18,-88.7349],[28,-119,32,-103],[26,-117,28,-99],[28,-103,30,-101],[24,-113,26,-97],[22,-111,24,-97],[18,-107,22,-95],[20,-90.6669,22,-86.6669],[18,-95,20,-87],[16,-103,18,-91],[18,-115,20,-109]]},{minLevel:9,maxLevel:20,label:\"Swisstopo\",alt:\"Topografische Grundlage: copyright Bundesamt fur Landestopographie\",boxes:[[46.4166,\n7.3171,47.6087,9.5821],[45.8206,6.8641,47.41,7.3171],[46.218,5.9581,46.6153,6.4111],[46.4166,6.4111,47.0127,6.8641],[46.0193,7.3171,46.4166,8.2231],[46.218,8.2231,46.4166,9.1291],[46.6153,9.5821,47.0127,10.4882],[46.0193,8.6761,46.218,9.1291],[46.4166,9.5821,46.6153,10.0351],[47.6087,8.2231,47.8074,8.6761],[47.41,6.928,47.5272,7.3171],[47.0127,6.6305,47.1914,6.8641],[46.6153,6.1662,46.7577,6.4111],[46.1195,5.9453,46.218,6.3156],[46.1024,6.762,46.4166,6.8641],[45.8846,7.3171,46.0193,8.0455],[47.6087,\n8.6761,47.8074,9.4309],[47.2863,9.5821,47.5004,9.6893],[47.0127,9.5821,47.0721,9.9106],[46.0972,8.5106,46.218,8.6761],[45.7831,8.754,46.0193,9.1167],[46.118,9.1291,46.4166,9.3037],[46.5237,10.237,46.6153,10.4882],[46.2703,9.4435,46.4166,9.8658],[46.3513,9.8639,46.4166,10.0351],[46.414,10.0351,46.6153,10.174],[46.3367,10.0312,46.4166,10.1725],[46.2654,9.9778,46.3547,10.0368],[46.2473,10.0312,46.3547,10.182],[46.2131,10.0449,46.2643,10.182]]},{minLevel:11,maxLevel:20,label:\"IGN\",alt:\"copyright IGN 2009 - BD TOPO\",\nboxes:[[-21.474,55.1479,-20.7728,55.9393]]},{minLevel:9,maxLevel:20,label:\"2014 THTC\",alt:\"copyright 2014 Iran Maps provided by THTC\",boxes:[[26.1964,46.2203,38.4489,57.1922],[25.7783,47.3792,32.0891,56.2187],[25.7433,53.8979,37.602,61.7923],[24.9003,57.143,26.1964,61.8081],[37.3605,54.2859,38.2982,59.0624],[32.9552,45.2424,35.8416,47.3873],[38.1617,46.5449,39.195,48.012],[39.0244,46.9254,39.791,48.3969],[38.8972,47.5269,39.2823,48.3741],[35.3974,46.0286,38.8972,48.8454],[38.8953,48.012,39.0229,48.3415],\n[32.9515,46.0457,33.1362,46.2203],[35.8416,44.4164,38.8818,47.5346],[38.2632,44.2983,39.0496,46.5449],[38.4003,44.0023,39.8596,45.453],[35.7409,44.1806,38.2632,46.0286],[25.7433,60.8544,29.9265,61.9791],[26.4634,61.8391,28.6155,62.9147],[26.2013,61.8221,26.5448,62.3152],[25.7411,61.7923,26.2083,61.8881],[25.7411,61.8081,25.9431,61.9006],[26.5239,62.3114,26.5998,62.6364],[26.8134,62.8691,27.2641,63.296],[27.0181,63.1942,27.2641,63.3436],[26.6245,62.9016,26.8405,63.2208],[29.8177,60.4678,31.5665,60.9671],\n[29.9265,60.8423,31.5665,61.9599],[33.8976,59.0624,37.602,61.1473],[31.4968,59.9152,34.0374,60.8423],[31.5665,60.4947,34.0374,60.966],[34.1048,60.5115,36.6543,61.5751]]},{minLevel:6,maxLevel:20,label:\"Navteq\",alt:\"Navteq\",boxes:[[30.7754,78.5576,36.7754,79.5576],[40.7754,120.5576,42.7754,128.5576],[41.7754,128.5576,42.7754,131.5576],[39.7754,120.5576,40.7754,126.5576],[38.7754,120.5576,39.7754,124.5576],[36.7754,121.5576,37.7754,123.5576],[35.7754,120.5576,38.7754,121.5576],[21.7754,98.5576,22.7754,\n104.5576],[20.7754,99.5576,21.7754,102.5576],[23.7754,97.5576,28.7754,98.5576],[35.7754,75.5576,36.7754,78.5576],[40.7754,76.5576,41.7754,79.5576],[29.7754,120.5576,32.7754,122.5576],[29.7754,122.5576,31.7754,123.5576],[29.7754,79.5576,42.7754,120.5576],[22.7754,98.5576,29.7754,117.5576],[42.7754,79.5576,45.7754,94.5576],[42.7754,115.5576,49.7754,131.5576],[49.7754,119.5576,52.7754,127.5576],[42.7754,111.5576,45.7754,115.5576],[45.7754,82.5576,47.7754,91.5576],[42.7754,94.5576,44.7754,96.5576],[36.7754,\n73.5576,40.7754,79.5576],[28.7754,82.5576,29.7754,98.5576],[20.7754,106.5576,22.7754,113.5576],[18.7754,108.5576,20.7754,111.5576],[17.7754,108.5576,18.7754,110.5576],[26.7754,117.5576,27.7754,121.5576],[25.7754,117.5576,26.7754,120.5576],[24.7754,117.5576,25.7754,119.5576],[23.7754,117.5576,24.7754,118.5576],[21.7754,113.5576,22.7754,116.5576],[27.7754,117.5576,29.7754,122.5576],[27.7754,84.5576,28.7754,93.5576],[49.7754,127.5576,50.7754,128.5576],[27.6769,91.7865,27.7754,92.1101],[28.6334,93.5576,\n28.7754,94.0161],[28.2004,96.2409,28.7754,97.5576],[27.2614,88.7706,27.7754,89.2653],[32.2241,78.3965,32.6363,78.5576],[35.4169,77.1449,35.7754,78.5576],[41.7754,79.2585,41.8535,79.5576],[45.7754,82.363,46.2212,82.5576],[47.7754,85.4858,48.7754,90.1507],[48.7754,86.6922,49.2494,88.1056],[52.7754,119.9835,53.5719,126.1939],[24.5027,118.5576,24.7754,118.8161],[25.1912,119.5576,25.7754,119.912],[32.7754,120.5576,33.5701,120.8986],[42.7754,110.3934,44.782,111.5576],[47.9285,115.4373,48.223,115.5576],\n[49.7754,118.4027,50.9802,119.5576],[44.8404,131.5576,48.4334,134.8631]]},{minLevel:6,maxLevel:20,label:\"Navteq\",alt:\"Navteq\",boxes:[[29.0724,45.6538,34.0557,47.9928],[29.9029,47.193,31.4399,48.5938],[34.0557,40.2408,35.7256,46.4809],[35.7168,42.7138,37.3779,46.4809],[35.7168,41.2402,37.3779,42.7138],[29.0724,40.2408,34.0557,45.6538],[29.8076,38.7937,34.0739,43.8802]]},{minLevel:11,maxLevel:20,label:\"IGN\",alt:\"copyright IGN 2009 - BD TOPO\",boxes:[[15.6985,-61.9309,16.5953,-61.0013]]},{minLevel:10,\nmaxLevel:20,label:\"EuroGeographics\",alt:\"copyright EuroGeographics\",boxes:[[45.452,13.7142,46.8284,16.3044],[45.5557,14.5931,46.1463,15.7955],[45.3439,14.6924,45.7418,15.4262],[46.3859,15.9891,46.8915,16.6217],[45.4543,14.0533,45.7004,14.6924],[45.5366,13.3628,46.523,13.9372],[45.4125,13.657,45.6003,13.9833],[45.5239,14.6795,45.5557,14.7057],[45.4418,13.5675,45.5366,13.6734],[45.5318,13.5988,45.5394,13.638],[46.8276,15.9827,46.8786,16.2706]]},{minLevel:11,maxLevel:20,label:\"EuroGeographics\",alt:\"copyright EuroGeographics\",\nboxes:[[46.853,26.511,48.6163,29.3448],[46.4187,28.0753,47.9267,29.31],[45.4102,28.0701,46.4249,28.5878],[45.4154,28.0081,46.1325,28.4224],[45.7302,28.2568,47.4471,29.2353],[45.7302,28.5878,46.2901,29.0637],[46.3002,29.2029,46.5592,30.2333],[46.7892,29.2282,47.4471,29.9684],[46.5465,29.2256,46.8365,30.0376]]},{minLevel:9,maxLevel:20,label:\"Nepal\",alt:\"Copyright Survey Department, Government of Nepal\",boxes:[[26.2669,85.571,28.4465,88.2408],[26.4858,83.0964,29.4459,85.7994],[27.3853,81.0976,30.1502,\n83.8816],[28.2854,79.7937,30.6642,82.254],[30.1502,81.3961,30.4719,82.254],[27.4329,81.6782,27.9426,82.8798]]},{minLevel:9,maxLevel:20,label:\"IGN\",alt:\"copyright IGN 2009 - BD TOPO\",boxes:[[14.3135,-61.2546,14.968,-60.7258]]},{minLevel:9,maxLevel:20,label:\"EuroGeographics\",alt:\"copyright EuroGeographics\",boxes:[[54.9394,20.8924,56.5027,23.423],[53.8579,22.579,56.5027,24.9113],[53.8757,22.4807,55.1024,24.5276],[54.263,22.6378,54.6908,23.1253],[53.8579,24.5937,56.4848,26.8994],[54.0863,25.2612,54.5213,\n25.9464]]},{minLevel:10,maxLevel:20,label:\"EuroGeographics\",alt:\"copyright EuroGeographics\",boxes:[[42.1231,14.4853,44.8976,18.6541],[42.5705,15.6655,43.3251,17.0432],[44.1837,13.3057,45.5704,15.8226],[44.8976,13.8789,46.5835,18.1295],[44.9955,16.185,45.149,16.4761],[44.8126,16.5981,45.7845,19.5169],[45.4199,18.1216,45.9726,19.1392]]},{minLevel:9,maxLevel:20,label:\"IgeoE\",alt:\"IgeoE - Portugal\",boxes:[[30.1318,-15.883,30.1622,-15.8445],[32.2747,-17.3686,33.1907,-15.9142],[36.5482,-32.0392,40.4124,\n-23.6635],[36.9392,-9.0081,38.4418,-7.2449],[37.9667,-7.2522,38.3853,-6.8808],[38.4418,-8.926,39.5144,-6.7321],[38.1864,-9.5593,39.5271,-8.895],[39.4801,-9.1848,42.1722,-7.8729],[39.4153,-8.4431,41.9675,-7.2126],[41.7211,-7.2357,42.0048,-6.505],[41.2304,-7.31,41.7633,-6.5183],[40.9842,-7.3532,41.2705,-6.5519],[40.1168,-7.4841,40.9984,-6.7565],[39.654,-7.552,40.2572,-6.7565],[39.3941,-7.5899,39.6663,-6.985],[41.2304,-6.5519,41.7009,-6.1811]]},{minLevel:9,maxLevel:20,label:\"OGL\",alt:\"Open Government Licence v.1.0.\",\nboxes:[[53.8371,-8.1821,59.6771,-1.2194],[50.3331,-1.2194,55.0051,1.7646],[50.3331,-5.1981,53.8371,-1.2194],[49.1651,-7.9476,50.3331,-1.9796],[59.6771,-2.2141,60.8451,-.2247],[51.5011,-5.3731,52.6691,-5.1981]]},{minLevel:10,maxLevel:20,label:\"IGN\",alt:\"copyright IGN 2009 - BD TOPO\",boxes:[[3.993,-54.5201,5.2588,-54.299],[2.6665,-52.5112,3.5742,-52.0258],[2.1062,-54.6066,3.5684,-54.001],[3.5684,-54.299,5.7509,-51.6174],[2.1134,-54.001,3.5684,-52.5112]]},{minLevel:10,maxLevel:20,label:\"EuroGeographics\",\nalt:\"copyright EuroGeographics\",boxes:[[34.3756,32.2293,35.5938,33.7589],[34.8444,33.6276,35.276,34.1041],[35.1525,33.5454,35.734,34.6339]]},{minLevel:6,maxLevel:20,label:\"PSMA\",alt:\"Copyright. Based on data provided under license from PSMA Australia Limited. Product incorporates data which is 2014 Telstra Corporation Limited, GM Holden Limited, Intelematics Australia Pty Ltd, HERE International LLC, Sentinel Content Pty Limited and Continental Pty Ltd\",boxes:[[-13.1672,95.8626,-11.1672,97.8626],\n[-11.5539,104.6728,-9.5539,106.6728],[-32.5901,158.0863,-30.5901,160.0863],[-30.0761,167.0381,-28.0761,169.0381],[-32,113,-20,151],[-38,135,-32,151],[-20,123,-14,147],[-20,121,-16,123],[-14,129,-10,137],[-14,141,-8,145],[-36,115,-32,127],[-44,141,-38,149],[-34,127,-32,135],[-34,151,-24,155]]},{minLevel:9,maxLevel:20,label:\"Lantmateriet\",alt:\"Based upon electronic data National Land Survey Sweden.\",boxes:[[56.8124,17.7151,58.4792,19.8137],[62.5323,15.7813,69.3138,25.2754],[60.9048,13.083,68.0183,18.3797],\n[58.0209,11.5126,64.3169,17.4803],[58.0209,17.3803,62.5323,19.7075],[55.2659,10.7702,62.8658,17.3803],[55.2659,13.7838,58.0209,17.466],[55.1529,12.368,56.6521,13.7838]]},{minLevel:9,maxLevel:20,label:\"BEV\",alt:\"copyright Bundesamt fur Eich- und Vermessungswesen\",boxes:[[46.639,10.6752,46.9033,11.0567],[47.6962,13.3457,48.7534,17.1607],[46.9033,9.5307,47.6962,16.7792],[46.639,12.2012,46.9033,16.0162],[46.3748,13.3457,46.639,14.8717],[48.7534,14.8717,49.0177,16.0162],[47.6962,12.9642,48.2248,13.3457],\n[48.2248,12.9642,48.3571,13.3457],[47.8668,12.7411,48.2248,12.9642],[47.6962,12.8955,47.8109,12.9642],[48.7534,16.3752,48.8317,16.725],[46.8266,16.0162,46.9033,16.1893],[46.5375,12.6822,46.639,13.3457],[46.8219,9.9561,46.9033,10.2682],[46.8181,10.4415,46.9033,10.6752],[46.7953,11.0567,46.9033,11.1249]]},{minLevel:9,maxLevel:20,label:\"Sri Lanka\",alt:\"This product incorporates original source digital data obtained from the Survey Department of Sri Lanka. 2009 Survey Department of Sri Lanka The data has been used with the permission of the Survey Department of Sri Lanka\",\nboxes:[[5.8461,79.5067,9.9652,82.0121]]},{minLevel:9,maxLevel:20,label:\"CNIG\",alt:\"Informacion geografica propiedad del CNIG\",boxes:[[27.4138,-18.299,29.4228,-13.2707],[35.2569,-2.9815,35.3232,-2.9161],[39.3438,-7.6437,39.7836,-7.2643],[27.4138,-18.299,29.4228,-13.2707],[41.6479,-9.7829,43.8119,-6.3517],[38.415,-6.734,43.7683,3.4915],[37.312,-6.8623,39.398,.229],[35.6142,-7.022,37.9317,-1.2109],[36.8976,-7.5399,41.6961,-6.5372],[38.2202,3.0662,40.2854,5.1739],[35.8628,-5.387,35.9199,-5.2772]]},{minLevel:10,\nmaxLevel:20,label:\"EuroGeographics\",alt:\"copyright EuroGeographics\",boxes:[[57.9301,23.439,59.7909,27.465],[57.8968,21.7448,59.3645,23.458],[57.44,25.5161,58.0205,27.8981],[57.754,23.1887,57.8411,23.2957],[57.8526,24.295,57.9554,24.7904],[58.0107,27.4528,58.7552,27.6501],[58.7436,27.4413,59.4859,28.2525]]},{minLevel:10,maxLevel:20,label:\"Navteq\",alt:\"Navteq\",boxes:[[10.6629,-85.8099,12.9543,-83.3936],[11.0412,-87.1376,14.6525,-83.1509],[14.2095,-82.9224,14.5307,-82.6012],[12.3118,-87.842,14.2011,\n-84.9162],[13.6161,-85.8103,15.1814,-83.0464],[14.1788,-85.457,14.8768,-83.8745]]},{minLevel:10,maxLevel:20,label:\"SOI\",alt:\"Survey of Israel data source\",boxes:[[29.3724,34.2346,31.5477,35.4573],[30.9701,34.4766,33.1256,35.6655],[32.6825,35.0912,33.113,35.7566],[32.7247,35.3798,33.1257,35.9089],[32.9351,35.5239,33.3538,35.9089]]},{minLevel:9,maxLevel:20,label:\"EuroGeographics\",alt:\"copyright EuroGeographics\",boxes:[[49.0148,14.0753,55.0681,20.2333],[51.6271,18.2346,55.0681,24.1071],[49.1699,19.3708,\n52.6479,23.8452],[48.9384,21.8835,49.9277,22.9603],[49.5714,22.2773,51.4811,23.7502],[51.0366,23.1726,52.2145,23.736],[50.8016,23.3995,51.5813,24.1714],[50.3495,23.3995,51.0366,24.1571],[50.3804,23.794,50.6141,24.1242],[52.7337,14.0896,53.0647,14.3477]]},{minLevel:10,maxLevel:20,label:\"Jordan\",alt:\"Royal Jordanian Geographic Centre\",boxes:[[31.3679,36.8242,33.3996,39.3159],[29.2293,35.2899,31.3679,38.0203],[29.2293,34.9258,30.889,35.9751],[30.889,35.2899,32.3179,37.3047],[31.8515,35.4964,32.7823,\n36.8242]]},{minLevel:9,maxLevel:20,label:\"Statkart\",alt:\"Copyright 2000; Norwegian Mapping Authority\",boxes:[[56.444,2.9492,63.9455,12.064],[61.0315,6.1059,70.9952,18.0586],[59.2422,9.9664,63.2018,13.0634],[67.8075,16.8944,71.3965,25.1741],[68.4773,24.6595,71.3952,26.3932],[69.6571,25.9972,71.4071,28.8856],[68.8789,27.8446,71.4071,32.1402],[63.9575,13.0203,65.6822,14.7214],[66.1997,15.2505,67.3135,16.3893]]},{minLevel:6,maxLevel:20,label:\"Canada\",alt:\"This data includes information taken with permission from Canadian authorities, including Her Majesty, Queens Printer for Ontario, Canada Post, GeoBase, Department of Natural Resources Canada. All rights reserved\",\nboxes:[[70,-125.9042,78,-77],[78,-101,82,-69],[82,-91,84,-61],[80,-69,82,-61],[46.3831,-57.0167,49.9905,-50.981],[52,-135,56,-129],[78,-115,80,-101],[46,-87.5736,48.0357,-57],[44,-85.0026,46.0536,-59],[70,-77,74,-67],[56,-63,68,-61],[41.9986,-83,44.0238,-77.4271],[62,-141,70,-63],[56,-135,58,-87],[58,-141,62,-91],[56,-81,62,-63],[48,-129,56,-57],[50,-57,54,-55]]},{minLevel:11,maxLevel:20,label:\"IGN\",alt:\"copyright IGN France 2009 BD TOPO\",boxes:[[41.3454,8.4823,43.1241,9.6779],[46.512,-5.2986,48.9033,\n-2.1006],[42.5367,-2.1077,46.512,2.1618],[45.8812,-2.1077,48.9033,6.7118],[42.2486,.3773,46.1891,6.8232],[42.8343,4.3116,45.2796,7.678],[48.7889,-2.0366,51.1937,2.7484],[48.6676,2.4444,51.1937,8.2326],[47.2548,6.3526,48.6954,7.5496],[46.5513,6.1405,47.3535,7.0066],[45.8114,5.9584,46.5615,6.9032],[45.7944,6.8518,46.1046,7.1168],[43.9532,7.4449,44.1819,7.7612],[44.856,6.2593,45.8136,7.2498],[47.3484,7.1095,48.6757,7.891],[44.5968,6.6907,45.0132,7.1016]]},{minLevel:9,maxLevel:20,label:\"Deutschland\",\nalt:\"Die Grundlagendaten wurden mit Genehmigung der zustandigen Behorden entnommen\",boxes:[[54.2771,13.2064,55.0556,14.1232],[47.2702,7.705,55.0556,13.2064],[50.3844,13.2064,54.2771,15.0401],[48.8273,5.8712,51.9414,7.705],[51.9414,6.7881,53.8624,7.705],[48.0487,13.2064,49.6058,13.9895]]},{minLevel:9,maxLevel:20,label:\"EuroGeographics\",alt:\"copyright EuroGeographics\",boxes:[[55.3689,24.1704,58.1269,28.4487],[56.1948,23.095,57.2653,24.2779],[56.3085,21.6724,57.8204,23.3336],[55.9347,20.7407,57.7144,\n21.825]]},{minLevel:9,maxLevel:20,label:\"IGM\",alt:\"INSTITUTO GEOGRAFICO MILITAR DEL ECUADOR AUTORIZACION No IGM-2011-01- PCO-01 DEL 25 DE ENERO DE 2011\",boxes:[[-4.6863,-80.539,1.1441,-78.4796],[-2.095,-78.4796,.4963,-75.5964],[-2.7428,-81.3628,-.7994,-80.9509],[-2.7428,-80.9509,1.1441,-80.539],[-1.4472,-75.5964,.1724,-75.1846],[-5.0102,-79.7153,-4.6863,-78.8915],[1.1441,-79.3034,1.468,-78.4796],[.4963,-78.4796,.8202,-77.244],[.8202,-78.4796,1.1441,-78.0677],[-3.7146,-78.4796,-2.095,-78.0677],[-2.7428,\n-78.0677,-2.095,-76.4202],[-3.0667,-78.0677,-2.7428,-77.244],[-2.4189,-76.4202,-2.095,-76.0083]]},{minLevel:9,maxLevel:20,label:\"ITA\",alt:\"La Banca Dati Italiana e stata prodotta usando quale riferimento anche cartografia numerica ed al tratto prodotta e fornita dalla Regione Toscana\",boxes:[[38.1821,6.8824,47.2069,14.1446],[35.3758,11.8034,40.0397,19.4309],[39.2141,13.5406,43.0524,16.4857],[39.6269,16.0831,42.3234,18.8269],[36.6566,11.8869,36.8801,12.1816],[44.1083,6.613,45.2558,7.2468],[45.6248,\n6.8008,45.8575,6.9794],[46.7941,10.3931,47.0561,11.6257],[45.5627,12.8285,46.6783,13.986],[42.6396,13.3581,43.6743,14.0461]]},{minLevel:10,maxLevel:20,label:\"Navteq\",alt:\"Navteq\",boxes:[[-26.8359,30.8723,-25.6938,32.1739],[-27.0738,30.7201,-26.2624,31.5422],[-27.3832,30.9615,-26.5576,32.0286],[-27.3403,31.4364,-26.7719,32.0286],[-26.8455,32.0275,-26.7719,32.1475]]},{minLevel:10,maxLevel:20,label:\"Geomatics\",alt:\"Copyright Geomatics Ltd.\",boxes:[[34.8037,20.3974,41.0512,26.5331],[38.9687,19.3748,40.3571,\n20.3974],[36.1209,29.5552,36.1723,29.6034],[38.9765,26.5331,39.1817,26.6201],[41.0512,21.9014,41.174,22.4426],[38.1449,20.332,38.3325,20.3984],[35.1058,26.5331,37.9255,28.2956],[41.0512,22.4426,41.3788,22.8625],[41.0512,22.8393,41.637,24.4931],[41.0512,24.4883,41.8654,26.5489],[41.2829,26.538,41.6486,26.6501]]},{minLevel:9,maxLevel:20,label:\"Cenacarta\",alt:\"Certain Data for Mozambique provided by Cenacarta 2014 by Cenacarta\",boxes:[[-15.9653,33.6194,-10.3973,41.2432],[-16.3417,30.7148,-14.095,34.9419],\n[-18.8084,34.9389,-15.0611,41.2432],[-17.1457,38.6588,-15.8415,40.2757],[-22.989,31.1878,-18.8084,36.5975],[-26.8763,31.1878,-22.4084,35.7659],[-24.9908,34.2964,-23.3847,35.6707],[-18.8203,31.8425,-15.6508,36.5975],[-16.0985,30.1219,-13.9704,33.7148]]},{minLevel:9,maxLevel:20,label:\"EuroGeographics\",alt:\"copyright EuroGeographics\",boxes:[[47.7796,23.7808,52.3053,30.3909],[50.5207,23.4548,51.7557,24.437],[47.7796,23.6071,50.6001,25.5225],[47.9128,22.4364,50.5207,23.983],[47.706,24.7422,47.8394,25.2039],\n[48.3302,22.1323,49.0508,22.5012],[47.9209,22.1347,48.5886,23.2256],[47.9979,23.04,48.0552,23.1187],[47.9624,23.1767,48.133,23.5211],[44.9794,29.0356,47.908,30.3873],[44.9794,28.141,46.824,29.5592],[44.0324,29.5592,46.3547,37.3686],[45.855,30.3873,51.8685,37.3686],[51.7797,30.5067,52.4699,34.3366],[51.6941,34.3051,51.9267,34.4588],[46.3547,34.8806,50.8793,38.6386],[47.4754,38.4346,50.1112,40.3587],[50.7773,34.666,51.2858,35.5437]]}]};function T(a,b,c,d,e,f){if(a&&b)this.vi(a),this.li(b),this.ta(c),this.Rk(e),this.Hk(f),this.Sk(d);else throw Error('Parameters \"scheme\" and \"host\" must be specified');}u(\"H.service.Url\",T);\nfunction xn(a,b){var c=y.document,d,e=c&&c.createElement(\"a\"),f=\"\";if(c){if(b){var g=(d=c.getElementsByTagName(\"base\")[0])&&d.href;var h=c.head;var k=d||h.appendChild(c.createElement(\"base\"));k.href=b}e.href=a;f=e.href;b&&(d?d.href=g:h.removeChild(k))}else/[\\w]+:\\/\\//.test(a)&&(f=a);g=/(?:(\\w+):\\/\\/)?(?:([^:]+):([^@/]*)@)?([^/:]+)?(?:[:]{1}([0-9]+))?(\\/[^?#]*)?(\\?[^#]+)?(#.*)?/.exec(f);a=g[1];k=g[4];b=g[5];h=g[6];c=g[7];d=g[8];!g[2]&&k&&/@/.test(k)&&(k=k.split(\"@\")[1]);g=k;h=h&&0=this.min&&a<=this.max)if((a=this.b.length)&&this.a){if(this.a.Vd(b))for(;a--;)if(this.b[a].Vd(b))return!0}else return!0;return!1};function Nn(a,b,c,d,e,f,g){var h=this;g=g||{};f=f?f:{};var k=a.Ja().clone().Y(b+\"/\"+a.zc()+\"/\"+c).K(f),l=a.jh();this.G=a;this.X=k;Kj.call(this,{tileSize:d,max:512===d?19:20,min:512===d?2:0,getURL:function(a,b,c){var f=h.X.clone();l&&f.ua(l[(c+b+a)%l.length]);f.Y(c+\"/\"+a+\"/\"+b+\"/\"+d+\"/\"+e);return f.toString()},crossOrigin:g.crossOrigin,uri:k.toString().replace(/_/g,\"\")+d});this.qc=b;this.o=c;this.Da=f;this.Ya=c.split(\".\")[0];this.b=A(this.b,this);this.getCopyrights=this.la;this.ca=zc();a.addEventListener(\"versionupdate\",\nthis.b)}w(Nn,Kj);Nn.prototype.MAX_STORE_TIME=2592E6;Nn.prototype.s=function(){Kj.prototype.s.call(this);this.G.removeEventListener(\"versionupdate\",this.b)};Nn.prototype.la=function(a,b){return In(this.G.la(),this.Ya,b,a)};Nn.prototype.b=function(){var a=this.G;this.X=a.Ja().clone().Y(this.qc+\"/\"+a.zc()+\"/\"+this.o).K(this.Da);this.reload(!1)};Nn.prototype.pe=function(){return this.ca};Nn.prototype.canStore=Nn.prototype.pe;Nn.prototype.Sd=function(){return this.pe()?yc():Q.prototype.Sd.call(this)};\nNn.prototype.getStorage=Nn.prototype.Sd;function On(a){var b=vn({},this.ra,a||{});if(!On.rb)throw new nc(On);if(!b.baseUrl&&!b.platformBaseUrl)throw new D(On,0,'either \"baseUrl\" or \"platformBaseUrl\" must be specified');G.call(this);this.A=(b.baseUrl?b.baseUrl:b.platformBaseUrl).clone();this.wa(b.baseUrl?a||{}:b);this.Zb=b.shards;(this.Qa=b.ignoreTypes?null:b.type)&&this.A.ua(this.Qa);this.$b=b.version;this.Uc=new Kn;this.ci={};this.yf=0;\"newest\"===this.$b&&this.Vg()}w(On,G);u(\"H.service.MapTileService\",On);\nOn.prototype.ra={subDomain:\"maps.ls\",path:\"maptile/2.1\",type:\"base\",version:\"newest\",shards:[\"1\",\"2\",\"3\",\"4\"]};On.CONFIG_KEY=\"maptile\";n=On.prototype;n.wa=function(a){a.subDomain&&this.A.ua(a.subDomain);a.path&&this.A.ta(a.path)};n.ia=function(a,b,c){return(new cf(\"application/json\",a,rd)).then(b,function(b){c(Error(\"[\"+b.statusText+\"] \"+a+\" request failed\"))})};function Pn(a,b){for(var c={},d=a[b+\"s\"][b],e=d.length;e--;)c[d[e].id]=d[e];a[b+\"s\"]=c}n.Ja=function(){return this.A};n.jh=function(){return this.Zb};\nn.Cj=function(){return this.Qa};On.prototype.getType=On.prototype.Cj;On.prototype.zc=function(){return this.$b};On.prototype.getVersion=On.prototype.zc;On.prototype.xi=function(a){this.$b=a};On.prototype.la=function(){this.yf||(this.$b&&\"newest\"!==this.$b||\"traffic\"===this.Qa)&&this.ye();return this.Uc};On.prototype.getCopyrights=On.prototype.la;n=On.prototype;\nn.Fi=function(a){a=a.response;var b;Pn(a,\"map\");Pn(a,\"scheme\");Pn(a,\"tiletype\");Pn(a,\"format\");Pn(a,\"resolution\");Pn(a,\"language\");if(\"newest\"===this.$b&&\"traffic\"!==this.Qa)for(b in a.maps)a.maps[b].hash&&a.maps[b].newest&&(this.xi(a.maps[b].hash),this.dispatchEvent(\"versionupdate\"));this.sh=a;this.dispatchEvent(\"infoupdate\")};n.Ei=function(a){Ln(this.Uc,a);this.dispatchEvent(\"copyrightupdate\")};\nn.Vg=function(){var a=this;var b=this.A.clone().Y(\"info\").K({output:\"json\"});this.Zb&&b.ua(this.Zb[0]);this.ia(b,function(b){a.Fi(b)},function(a){throw a;})};n.ye=function(){var a=this;var b=this.A.clone().Y(\"copyright\").Y(a.zc()).K({output:\"json\"});this.Zb&&b.ua(this.Zb[0]);this.yf=1;this.ia(b,function(b){a.yf=2;a.Ei(b)},function(b){a.yf=-1;throw b;})};n.eh=function(){return this.sh};On.prototype.getInfo=On.prototype.eh;\nOn.prototype.ve=function(a,b,c,d,e,f){var g=this.Ja().clone().Y(a+\"/\"+this.zc()+\"/\"+b+\"/\"+c+\"/\"+d).K(e?e:{}).toString();var h=0,k,l=g.length;if(0!==l)for(k=0;k[72,250,320,500].indexOf(+b)){if(b!==B)throw new D(this.Mg,1,b);}else m.ppi=+b;c&&(m.lg=c);d&&(m.lg2=d);e&&(m.style=e);f&&(m.pois=f);a=function(a,b,c,d,e){return a.sc(b,c,q,d,m,1,e,p)};l=l.te(new fj(l.mh(\"normal.day\").toString()));\nHn(l.za(),m.lg,m.lg2);b=k.dj();k=k.ej(m.lg?{lg:m.lg,i18n:!0}:void 0);return{vector:{normal:{map:l,traffic:b,trafficincidents:k}},raster:{normal:{xbase:a(g,\"xbasetile\",\"normal.day\",\"png8\",!1),xbasenight:a(g,\"xbasetile\",\"normal.night\",\"png8\",!0),base:a(g,\"basetile\",\"normal.day\",\"png8\",!1),basenight:a(g,\"basetile\",\"normal.night\",\"png8\",!0),map:a(g,\"maptile\",\"normal.day\",\"png8\",!1),mapnight:a(g,\"maptile\",\"normal.night\",\"png8\",!0),trafficincidents:k,transit:a(g,\"maptile\",\"normal.day.transit\",\"png8\",!1),\nlabels:a(g,\"labeltile\",\"normal.day\",\"png\",!1)},satellite:{xbase:a(h,\"xbasetile\",\"hybrid.day\",\"jpg\",!0),base:a(h,\"basetile\",\"hybrid.day\",\"jpg\",!0),map:a(h,\"maptile\",\"hybrid.day\",\"jpg\",!0),labels:a(h,\"labeltile\",\"hybrid.day\",\"png\",!0)},terrain:{xbase:a(h,\"xbasetile\",\"terrain.day\",\"jpg\",!1),base:a(h,\"basetile\",\"terrain.day\",\"jpg\",!1),map:a(h,\"maptile\",\"terrain.day\",\"jpg\",!1),labels:a(h,\"labeltile\",\"terrain.day\",\"png\",!1)}}}};U.prototype.createDefaultLayers=U.prototype.Mg;function Qn(a){var b=vn({},this.ra,a||{});if(!Qn.rb)throw new nc(Qn);if(!b.baseUrl&&!b.platformBaseUrl)throw new D(Qn,0,'either \"baseUrl\" or \"platformBaseUrl\" must be specified');this.A=(b.baseUrl?b.baseUrl:b.platformBaseUrl).clone();this.wa(b.baseUrl?a||{}:b)}u(\"H.service.RoutingService\",Qn);Qn.prototype.ra={subDomain:\"route.ls\",path:\"routing/7.2\"};Qn.CONFIG_KEY=\"routing\";Qn.prototype.wa=function(a){a.subDomain&&this.A.ua(a.subDomain);a.path&&this.A.ta(a.path)};Qn.prototype.Ja=function(){return this.A};\nQn.prototype.ia=function(a,b,c){return(new cf(\"application/json\",a,rd)).then(b,function(b){b.json().then(function(b){c(Error(\"[\"+b.details+\"] \"+a+\" request failed\"))},function(){c(Error(\"[\"+b.statusText+\"] \"+a+\" request failed\"))})})};Qn.prototype.rf=function(a,b,c){a=this.A.clone().Y(\"calculateroute.json\").K(a);this.ia(a,b,c)};Qn.prototype.calculateRoute=Qn.prototype.rf;Qn.prototype.Al=function(a,b,c){a=this.A.clone().ua(\"isoline\").Y(\"calculateisoline.json\").K(a);this.ia(a,b,c)};\nQn.prototype.calculateIsoline=Qn.prototype.Al;U.prototype.Sm=function(a){return this.ob(Qn,a)};U.prototype.getRoutingService=U.prototype.Sm;function Rn(a){var b=vn({},this.ra,a||{});if(!Rn.rb)throw new nc(Rn);if(!b.baseUrl&&!b.platformBaseUrl)throw new D(Rn,0,'either \"baseUrl\" or \"platformBaseUrl\" must be specified');this.A=(b.baseUrl?b.baseUrl:b.platformBaseUrl).clone();this.wa(b.baseUrl?a||{}:b);this.Fk=b.reverseSubDomain}u(\"H.service.GeocodingService\",Rn);Rn.prototype.ra={subDomain:\"geocoder.ls\",reverseSubDomain:\"reverse\",path:\"6.2\"};Rn.CONFIG_KEY=\"geocoding\";\nRn.prototype.wa=function(a){a.subDomain&&this.A.ua(a.subDomain);a.path&&this.A.ta(a.path)};Rn.prototype.Ja=function(){return this.A};Rn.prototype.ia=function(a,b,c){return(new cf(\"application/json\",a,rd)).then(b,function(b){b.json().then(function(b){c(Error(\"[\"+b.Details+\"] \"+a+\" request failed\"))},function(){c(Error(\"[\"+b.statusText+\"] \"+a+\" request failed\"))})})};Rn.prototype.Ql=function(a,b,c){a=this.A.clone().Y(\"geocode.json\").K(a);return this.ia(a,b,c)};Rn.prototype.geocode=Rn.prototype.Ql;\nRn.prototype.Yn=function(a,b,c){a=this.A.clone().Y(\"reversegeocode.json\").K(a);this.Fk&&a.ua(this.Fk);return this.ia(a,b,c)};Rn.prototype.reverseGeocode=Rn.prototype.Yn;Rn.prototype.search=function(a,b,c){a=this.A.clone().Y(\"search.json\").K(a);return this.ia(a,b,c)};Rn.prototype.search=Rn.prototype.search;U.prototype.lm=function(a){return this.ob(Rn,a)};U.prototype.getGeocodingService=U.prototype.lm;function Sn(a){var b=vn({},this.ra,a||{});if(!Sn.rb)throw new nc(Sn);if(!b.baseUrl&&!b.platformBaseUrl)throw new D(Sn,0,'either \"baseUrl\" or \"platformBaseUrl\" must be specified');this.A=(b.baseUrl?b.baseUrl:b.platformBaseUrl).clone();this.wa(b.baseUrl?a||{}:b)}u(\"H.service.PlacesService\",Sn);Sn.prototype.ra={subDomain:\"places.ls\",path:\"places/v1\"};Sn.CONFIG_KEY=\"places\";Sn.prototype.wa=function(a){a.subDomain&&this.A.ua(a.subDomain);a.path&&this.A.ta(a.path)};Sn.prototype.Ja=function(){return this.A};\nSn.EntryPoint={SEARCH:\"discover/search\",SUGGEST:\"suggest\",EXPLORE:\"discover/explore\",AROUND:\"discover/around\",HERE:\"discover/here\",CATEGORIES:\"categories/places\"};Sn.prototype.ia=function(a,b,c){return(new cf(\"application/json\",a,rd)).then(b,function(b){b.json().then(function(b){c(Error(\"[\"+b.message+\"] \"+a+\" request failed\"))},function(){c(Error(\"[\"+b.statusText+\"] \"+a+\" request failed\"))})})};Sn.prototype.request=function(a,b,c,d){a=this.A.clone().Y(a).K(b||{});return this.ia(a,c,d)};\nSn.prototype.request=Sn.prototype.request;Sn.prototype.search=function(a,b,c){return this.request(\"discover/search\",a,b,c)};Sn.prototype.search=Sn.prototype.search;Sn.prototype.jo=function(a,b,c){return this.request(\"suggest\",a,b,c)};Sn.prototype.suggest=Sn.prototype.jo;Sn.prototype.Ll=function(a,b,c){return this.request(\"discover/explore\",a,b,c)};Sn.prototype.explore=Sn.prototype.Ll;Sn.prototype.yl=function(a,b,c){return this.request(\"discover/around\",a,b,c)};Sn.prototype.around=Sn.prototype.yl;\nSn.prototype.gn=function(a,b,c){return this.request(\"discover/here\",a,b,c)};Sn.prototype.here=Sn.prototype.gn;Sn.prototype.Dl=function(a,b,c){return this.request(\"categories/places\",a,b,c)};Sn.prototype.categories=Sn.prototype.Dl;Sn.prototype.Nl=function(a,b,c,d){a=xn(a).K(d||{});return this.ia(a,b,c)};Sn.prototype.follow=Sn.prototype.Nl;U.prototype.Im=function(a){return this.ob(Sn,a)};U.prototype.getPlacesService=U.prototype.Im;function Tn(){this.a={}}Tn.prototype.Ab=function(a,b){var c=a+b,d;if(d=this.a[c])return d;a=Un.MARKER.replace(\"{{icon}}\",Vn[a]||Vn.OTHER);a=a.replace(\"{{color}}\",Wn[b]||Wn.BLOCKING);b={size:{w:26,h:33},anchor:{x:13,y:30},hitArea:new vh(wh.POLYGON,Xn.MARKER)};return this.a[c]=d=new Si(a,b)};\nvar Un={MARKER:'{{icon}}'},Vn=\n{CONGESTION:'',\nROADWORKS:'',\nACCIDENT:'',\nOTHER:''},\nWn={BLOCKING:\"#323232\",VERYHIGH:\"#d5232f\",HIGH:\"#ffa100\"},Xn={MARKER:[24.1,17.8,14.2,28.42,16.8,29.4,12.8,31.4,8.79,29.4,11.23,28.42,1.7,17.8,1.7,12.1,10,1.9,12.9,.498,15.8,1.9,24.1,12.1,24.1,17.8]};function Yn(a,b,c){c=c?c:{};c.criticality||(c.criticality=\"major,critical\");C(a,Zn,Yn,0);Rm.call(this,{max:20,min:8,requestData:A(this.$,this)});this.b=new Tn;this.D=a;this.Da=c;this.reload=A(this.reload,this);this.o=setInterval(this.reload,b||18E4)}w(Yn,Rm);u(\"H.service.traffic.incidents.Provider\",Yn);Yn.prototype.a={minor:\"HIGH\",\"low impact\":\"HIGH\",major:\"VERYHIGH\",critical:\"BLOCKING\"};\nYn.prototype.$=function(a,b,c,d,e){var f=this,g=this.a,h=this.b;return this.D.requestIncidentsByTile(a,b,c,function(a){var b=[];a=a.TRAFFIC_ITEMS;var c;if(a)for(a=a.TRAFFIC_ITEM,c=a.length;c--;){var e=a[c];var k=e.TRAFFIC_ITEM_TYPE_DESC;switch(k){case \"ACCIDENT\":case \"CONGESTION\":var t=k;break;case \"CONSTRUCTION\":t=\"ROADWORKS\";break;default:t=\"OTHER\"}t=h.Ab(t,g[e.CRITICALITY.DESCRIPTION]);k=e.LOCATION.GEOLOC.ORIGIN;k=new Om({lat:k.LATITUDE,lng:k.LONGITUDE},{provider:f,icon:t});k.setData(e);b.push(k)}d(b)},\ne,this.Da)};Yn.prototype.F=function(){Rm.prototype.F.call(this);clearInterval(this.o)};function $n(a){function b(b){d.contains(e)&&d.removeChild(e);l&&clearTimeout(l);delete $n.a[f];b&&a.pj&&a.pj.call(k,b)}if(!a.url||!a.Ig)throw Error('Parameter \"options\" must specify at least a URL and a callback.');if(\"function\"!==typeof a.Ig)throw Error(\"Parameters options.callback must be a function\");var c=a.Do||document;var d=c.getElementsByTagName(\"head\")[0];var e=c.createElement(\"script\");c=a.url instanceof T?a.url:xn(a.url,a.Co);var f=$n.b++;var g=a.Bl||\"callback\";var h=a.Ig;var k={};var l=\nnull;k.id=f;k.cancel=function(){b(\"cancelled\")};0!==a.timeout&&(l=y.setTimeout(function(){b(\"timeout\")},a.timeout||3E4));$n.a[f]=function(a){b();h.call(k,a)};e.type=\"text/javascript\";e.src=c.toString()+(c.Ij()?\"&\":\"?\")+g+\"=\"+(a.Eo?\"H.service.jsonp.handleResponse(\"+f+\")\":encodeURI(\"H.service.jsonp.handleResponse(\"+f+\")\"));d.appendChild(e);return k}u(\"H.service.jsonp\",$n);$n.en=function(a){return(a=$n.a[a])?a:function(){}};$n.handleResponse=$n.en;$n.b=0;$n.a={};function Zn(a){var b=vn({},this.ra,a||{});if(!Zn.rb)throw new nc(Zn);if(!b.baseUrl&&!b.platformBaseUrl)throw new D(Zn,0,'either \"baseUrl\" or \"platformBaseUrl\" must be specified');this.A=(b.baseUrl?b.baseUrl:b.platformBaseUrl).clone();this.Zh=b.platformBaseUrl;this.wa(b.baseUrl?a||{}:b);this.Cl=b.callbackKey}u(\"H.service.traffic.Service\",Zn);Zn.prototype.ra={subDomain:\"traffic.ls\",path:\"traffic/6.1\",callbackKey:\"jsoncallback\"};Zn.CONFIG_KEY=\"traffic\";\nZn.prototype.wa=function(a){a.subDomain&&this.A.ua(a.subDomain);a.path&&this.A.ta(a.path)};Zn.prototype.Ja=function(){return this.A};Zn.prototype.dj=function(a){return new Dk(new ao(this,void 0,a),{max:22})};Zn.prototype.createFlowLayer=Zn.prototype.dj;Zn.prototype.ej=function(a){return new Sm(new Yn(this,void 0,a))};Zn.prototype.createIncidentsLayer=Zn.prototype.ej;function bo(a,b,c,d){return $n({url:b,Ig:c,pj:function(a){d(Error(\"[\"+a+\"] \"+b+\" request failed\"))},Bl:a.Cl})}\nZn.prototype.Wn=function(a,b,c){a=this.A.clone().Y(\"incidents.json\").K(a);return bo(this,a,b,c)};Zn.prototype.requestIncidents=Zn.prototype.Wn;Zn.prototype.Vn=function(a,b,c,d,e,f){a=this.A.clone().Y([\"flow/json\",c,a,b].join(\"/\")).K(f||{});return bo(this,a,d,e)};Zn.prototype.requestFlowByTile=Zn.prototype.Vn;Zn.prototype.Xn=function(a,b,c,d,e,f){a=this.A.clone().Y([\"incidents/json\",c,a,b].join(\"/\")).K(f||{});return bo(this,a,d,e)};Zn.prototype.requestIncidentsByTile=Zn.prototype.Xn;\nZn.prototype.mh=function(){return En(this.Zh).Y(\"traffic/flow.yaml\")};U.prototype.Bj=function(a){return this.ob(Zn,a)};U.prototype.getTrafficService=U.prototype.Bj;var co=\"A21 A22 F01 F02 F08 F04 F05 F07 F03 F06 A2F F13 A25 A2C F12 D1B F1B A27 E12 A3A A24 A3D A3F F1F F25 F2C E32 A33 F29 D26 D36 F26 D0F F0F F2B E0C D3A A45 D23 D11 F2E F19 F14 F39 A4A A4B A5C D38 F2A F1A D0A F1C A48 D25 D1D F32 A46 A3E D24 E1C E32 A5F D2E D22 D0A\".split(\" \");function eo(a,b){var c={};this.a=a;Pa(c,b||c);zj.call(this,c);this.bg={};a=this.Pb(yg.SPATIAL);a.update(a.a+1,vg.ADD)}w(eo,zj);u(\"H.service.remote.ObjectProvider\",eo);eo.prototype.F=function(){zj.prototype.F.call(this)};var fo=[];eo.prototype.Ic=function(){return fo};eo.prototype.requestMarkers=eo.prototype.Ic;eo.prototype.Hc=function(){return fo};eo.prototype.requestDomMarkers=eo.prototype.Hc;eo.prototype.ud=function(){return fo};eo.prototype.requestOverlays=eo.prototype.ud;\neo.prototype.Ub=Re;eo.prototype.providesMarkers=eo.prototype.Ub;eo.prototype.Tb=Re;eo.prototype.providesDomMarkers=eo.prototype.Tb;eo.prototype.Gc=Re;eo.prototype.providesSpatials=eo.prototype.Gc;eo.prototype.eg=function(){return fo};eo.prototype.requestSpatials=eo.prototype.eg;function go(a){return a.Ac(!0)}eo.prototype.fg=function(a,b){a=ho(this,a,io);b&&(a=a.filter(go));return a};eo.prototype.requestSpatialsByTile=eo.prototype.fg;\nfunction ho(a,b,c){var d=b.j&&b.j[c],e;!d&&(e=b.m)&&(delete b.m,(b.j=a=a.a.parse(a,b,e))&&(d=a[c]));return d||fo}eo.prototype.T=function(a){var b=a.eb();if(this.bg[b])throw new nc(this.T,\"Remote object \"+b+\" already added\");return this.bg[b]=a};eo.prototype.La=function(a){delete this.bg[a.eb()]};var io=\"spatials\";function ao(a,b,c){ao.l.constructor.call(this,{min:jo,max:ko});C(a,Zn,ao,0);this.b=a;this.Da=c||lo;this.Da.responseattributes=\"sh,fc\";this.a=setInterval(A(this.reload,this),b||18E4);this.yd(new fj(a.mh().toString()),!0)}w(ao,Q);u(\"H.service.traffic.flow.Provider\",ao);ao.prototype.Ia=function(){return this.Eb()};ao.prototype.getStyle=ao.prototype.Ia;ao.prototype.fd=function(a){un(a,\"GeoJSONTileSource\");this.yd(a)};ao.prototype.setStyle=ao.prototype.fd;var lo={locationreferences:\"tmc,shp\"};\nao.prototype.s=function(){ao.l.s.call(this);clearInterval(this.a)};ao.prototype.Pa=function(a,b,c,d,e){return this.b.requestFlowByTile(a,b,c,function(a){a.type&&-1!==a.type.indexOf(\"Error\")?e(a.Details):d(a)},e,this.Da)};ao.prototype.requestInternal=ao.prototype.Pa;\nao.prototype.jd=function(a,b,c,d,e){var f,g,h,k,l={type:\"FeatureCollection\",features:[]},m;var p=d.RWS.length;for(f=0;f=this.a.duration){this.W(a,\nb);break}}b?this.g=z:this.i=y.setTimeout(this.c,0)};Co.prototype.cancel=function(){y.clearTimeout(this.i);this.b=this.a.length/this.b)throw new D(this.Kc,0,\"Row index out of bounds\");if(b===B)throw new D(this.Kc,0,\"Column unknown\");this.a[a*this.b+b]=c};cp.prototype.setCell=cp.prototype.Kc;\ncp.prototype.concat=function(a){var b=arguments.length,c,d=\"\"+this.Ta(),e=this.a?this.a.slice():[];for(c=0;ca&&(c[b]=f);return 0a.g){if(void 0!==c&&c!==e){this.a.c(\"The number of columns must be the same for all rows\");return}var c=e}var d=a.o;var e=a.g;var f=a.j;var g=this.ik(d,e,a);if(a.j>f)for(;-1!==a.next(););else{for(;-1!==(f=a.next());)b.push(f);g=String.fromCharCode.apply(z,b);b.length=0}op(a);this.c(d,e,g)&&(this.C=a.u?2:kp)}while(1===this.C);2!=this.C&&void 0!==c&&0a.i&&(g=!0)));return g},function(a,b,c){if(0l?(l+=m,d()):c(y.Error(\"Timeout\"))})},m);m*=2}function e(d){var e=JSON.stringify(d.Ta()),f=a.grants;if(e!==JSON.stringify(h)){var l=\"Results into different column names on the backend: \"+e;setTimeout(function(){k.ij(g,function(){c(y.Error(l))},function(a){c(y.Error(l+\". \"+a.message))})},m)}else f&&f.length?k.Gj(g,f,b,c):b(d)}var f,g,h,k=this,l=0,m=1E3;var p=!a||!Xo(g=\na.layerId)&&(f=\"layerId\")||!Yo(h=a.columnNames)&&(f=\"columnNames\")?0:r(b)?r(c)?-1:2:1;if(0<=p)throw new D(k.te,p,f||arguments[p]);return k.Bb(g,function(){c(y.Error(\"Layer exists already\"))},function(){var b={layer_id:g,file:h.join(\"\\t\")},e=a.level,f=a.storage;e!==B&&(b.level=e);f!==B&&(b.storage=f);k.request(\"layers/upload\",ap,b,d,c)})};V.prototype.createLayer=V.prototype.te;\nV.prototype.wd=function(a,b,c,d){var e=[],f;a=this.request(a,ap,b,function(a){a.geometries.length?(a=Zo(a,b.layer_id),f=new rp(a,c,d),e.push(f)):c(Te,!0)},d);e.push(a);return new Ro(e)};V.prototype.Wb=function(a,b,c,d,e,f){if(!Qb(a))throw new D(this.Wb,0,\"has invalid type\");C(b,I,this.Wb,1,\"has invalid type\");if(!Tb(c))throw new D(this.Wb,2,\"has invalid type\");Do(this.Wb,3,d,e);a={layer_ids:a.join(\",\"),proximity:b.lat+\",\"+b.lng+\",\"+c};f&&Pa(a,f);return this.wd(\"search/proximity\",a,d,e)};\nV.prototype.searchByProximity=V.prototype.Wb;V.prototype.Vb=function(a,b,c,d,e,f){var g=\"\";if(!Qb(a))throw new D(this.Vb,0,\"has invalid type\");if(!ra(b)&&!C(b,K))throw new D(this.Vb,1,\"has invalid type\");if(!Tb(c))throw new D(this.Vb,2,\"has invalid type\");Do(this.Vb,3,d,e);a={layer_ids:a.join(\",\"),radius:c};if(ra(b))a.route_id=b;else{var h=b.qa;b=0;for(c=h.length;b*:last-child { + clear: both; +} +.H_overlay>.H_btn { + white-space: nowrap; +} + +.H_overlay.H_open { + display: block; +} + +.H_overlay::before, .H_overlay::after { + content: " "; + width: 0; + height: 0; + border-style: solid; + position: absolute; +} +.H_overlay.H_left::before { + border-width: 10px 10px 10px 0; + border-color: transparent rgba(15, 22, 33, 0.2) transparent transparent; + left: -12px; +} +.H_overlay.H_left::after { + border-width: 10px 10px 10px 0; + border-color: transparent #fff transparent transparent; + left: -10px; +} +.H_overlay.H_top.H_left::after { + border-color: transparent #575B63 transparent transparent; +} + +.H_overlay.H_right::before { + border-width: 10px 0 10px 10px; + border-color: transparent transparent transparent rgba(15, 22, 33, 0.2); + left: calc(100% + 1px); +} +.H_overlay.H_right::after { + border-width: 10px 0 10px 10px; + border-color: transparent transparent transparent #fff; + left: 100%; +} +.H_overlay.H_top.H_right::after { + border-color: transparent transparent transparent #575B63; +} + +.H_overlay.H_top::before, +.H_overlay.H_top::after { + top: 10px; +} +.H_overlay.H_bottom::before, +.H_overlay.H_bottom::after { + bottom: 10px; +} +.H_overlay.H_middle::before, +.H_overlay.H_middle::after { + top: 50%; + margin-top: -10px; +} + +.H_overlay.H_top.H_center::before { + border-width: 0 10px 10px 10px; + border-color: transparent transparent rgba(15, 22, 33, 0.2) transparent; + top: -11px; + left: 50%; + margin-left: -10px; +} +.H_overlay.H_top.H_center::after { + border-width: 0 10px 10px 10px; + border-color: transparent transparent #575B63 transparent; + top: -10px; + left: 50%; + margin-left: -10px; +} + +.H_overlay.H_bottom.H_center::before { + border-width: 10px 10px 0 10px; + border-color: rgba(15, 22, 33, 0.2) transparent transparent transparent; + bottom: -11px; + left: 50%; + margin-left: -10px; +} +.H_overlay.H_bottom.H_center::after { + border-width: 10px 10px 0 10px; + border-color: #fff transparent transparent transparent; + bottom: -10px; + left: 50%; + margin-left: -10px; +} + + +/** InfoBubble */ +.H_ib { + position: absolute; + left: .91em; + left: -100%; +} +.H_ib_tail { + position: absolute; + width: 20px; + height: 10px; + margin: -10px -10px; +} + +.H_ib_tail::before{ + bottom: -1px; + border-width: 10px; + position: absolute; + display: block; + content: ""; + border-color: transparent; + border-style: solid; + right: 0px; +} + +.H_ib_tail::after{ + bottom: 0; + position: absolute; + display: block; + content: ""; + border-color: white; + border-style: solid; + border-width: 10px; +} + +.H_ib.H_ib_top .H_ib_tail::after { + border-width: 10px 10px 0px 10px; + border-color: white transparent; +} + +.H_ib.H_ib_top .H_ib_tail::before { + border-top-color: rgba(15, 22, 33, 0.2); + border-bottom-width: 0px; +} + +.H_ib_notail .H_ib_tail { + display: none; +} +.H_ib_body { + background: white; + position: absolute; + bottom: .5em; + padding: 0; + right: 0px; + border-radius: 5px; + margin-right: -3em; + box-shadow: 0px 0 4px 0 rgba(15, 22, 33, 0.6); + margin-bottom: 0.5em; +} + +.H_ib_close { + font-size: .6em; + position: absolute; + right: 12px; + width: 12px; + height: 12px; + cursor: pointer; + top: 12px; + z-index: 1; + background: none; + box-shadow: none; +} + +.H_ib_close svg.H_icon { + top: 0; + transform: none; + width: auto; + height: auto; +} + +.H_ib_noclose .H_ib_close { + display: none; +} +.H_ib_noclose .H_ib_body { + padding: 0 0 0 0; +} + +.H_ib_content { + min-width: 6em; + font: 14px "Lucida Grande", Arial, Helvetica, sans-serif; + line-height: 24px; + margin: 16px 28px 20px 16px; + color: rgba(15,22,33,.8); + user-select: text; + -moz-user-select: text; + -khtml-user-select: text; + -webkit-user-select: text; + -o-user-select: text; + -ms-user-select: text; +} + + +/*################################################## SLIDER ########################################################*/ + +.H_l_horizontal .H_zoom_slider { + min-width: 262px; +} +.H_slider { + cursor: pointer; +} +.H_l_horizontal.H_slider { + float: left; + height: 4em; + width: auto; + padding: 0 1em; +} + +.H_slider .H_slider_track { + width: 0.4em; + height: 100%; +} + +.H_l_horizontal.H_slider .H_slider_track { + height: 0.4em; + width: 100%; +} + +.H_l_horizontal.H_slider .H_slider_cont { + height: 100%; +} + +.H_l_horizontal.H_slider .H_slider_knob_cont { + margin-top: -0.4em; +} + +.H_slider { + background-color: #fff; + padding: 1em 0em; + width: 4em; +} + + +.H_slider .H_slider_cont { + position: relative; +} + +.H_slider .H_slider_knob_cont, +.H_slider .H_slider_knob_halo { + width: 1.8em; + height: 1.8em; + margin-left: 0em; + border-radius:9em; +} + + +.H_slider .H_slider_knob { + width: 1.2em; + height: 1.2em; + background-color: white; + border-radius:9em; + -webkit-transform: translate(-50%,-50%); + -ms-transform: translate(-50%,-50%); + transform: translate(-50%,-50%); + top: 50%; + left: 50%; + box-shadow: 0em 0 0.5em 0 rgba(15, 22, 33, 0.6); + position: absolute; +} + +.H_slider:hover .H_slider_knob { + box-shadow: 0em 0 0.5em 0 rgba(15, 22, 33, 0.8); +} +.H_slider.H_disabled .H_slider_knob { + box-shadow: 0em 0 0.5em 0 rgba(15, 22, 33, 0.2); +} +.H_slider.H_slider_active .H_slider_knob { + box-shadow: 0em 0 0.5em 0 rgba(15, 22, 33, 1); +} + +.H_slider:hover .H_slider_track { + background-color: rgba(15, 22, 33, 0.8); +} + +.H_disabled .H_slider_track { + background-color: rgba(15, 22, 33, 0.2); +} +.H_slider:hover .H_slider_track_active { + background-color: rgba(0, 182, 178, 0.8); +} +.H_disabled .H_slider_track_active { + background-color: rgba(0, 182, 178, 0.2); +} +.H_slider.H_slider_active .H_slider_track { + background-color: rgba(15, 22, 33, 1.0); +} +.H_slider.H_slider_active .H_slider_track_active { + background-color: rgba(0, 182, 178, 1.0); +} + +.H_slider .H_slider_track, +.H_slider .H_slider_knob_cont{ + position:relative; + top: 50%; + left: 50%; + -webkit-transform: translate(-50%,-50%); + -ms-transform: translate(-50%,-50%); + transform: translate(-50%,-50%); +} + +.H_slider .H_slider_track { + background-color: rgba(15, 22, 33, 0.6); + overflow: hidden; +} +.H_slider .H_slider_track_active { + background-color: #00B6B2; + position: absolute; + transform: translate(-50%,0%); +} + +.H_slider.H_disabled .H_slider_track { + background-color: rgba(15, 22, 33, 0.2); +} +.H_slider.H_disabled .H_slider_track_active { + background-color: #bae2e3; +} + +.H_slider.H_l_horizontal .H_slider_track_active { + transform: translate(-200%, -50%); +} + +.H_slider.H_disabled { + cursor: default; +} + +/*############################################### CONTEXT MENU #####################################################*/ +.H_context_menu { + font-size: 14px; + min-width: 158px; + max-width: 40%; + box-shadow: 0em 0 0.4em 0 rgba(15, 22, 33, 0.6); + position: absolute; + left: -100%; + top: 0; + color: rgba(15, 22, 33, 0.6); + background-color: #fff; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + -o-border-radius: 5px; + border-radius: 5px; + padding: 16px 16px 4px 16px; + -moz-user-select: initial; + -khtml-user-select: initial; + -webkit-user-select: initial; + -o-user-select: initial; + -ms-user-select: initial; + z-index: 200; +} + +.H_context_menu_closed { + display: none; +} + +.H_context_menu_item { + text-overflow: ellipsis; + overflow: hidden; + line-height: 24px; + margin-bottom: 16px; + outline: none; +} + +.H_context_menu_item.clickable:hover { + color: rgba(15, 22, 33, 0.8); + cursor: pointer; +} +.H_context_menu_item.disabled:hover, +.H_context_menu_item.disabled { + background: transparent !important; + color: rgba(15, 22, 33, 0.2); + cursor: default !important; + + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + -ms-user-select: none; +} +.H_context_menu_item_separator { + height: 0; + border-top: 1px solid rgba(15, 22, 33, 0.1); + padding-bottom: 16px; + line-height: 0; + font-size: 0; +} + + +/*################################################# SCALE BAR ######################################################*/ +.H_scalebar { + margin-top: 36px; + box-shadow: none; + display: flex; + align-items: center; + text-shadow: + -1px -1px 0 rgba(255, 255, 255, 0.7), + 1px -1px 0 rgba(255, 255, 255, 0.7), + -1px 1px 0 rgba(255, 255, 255, 0.7), + 1px 1px 0 rgba(255, 255, 255, 0.7); +} + + +/*################################### DISTANCE MEASUREMENT AND TRAFFIC INCIDENTS ####################################*/ + +.H_tib_content { + width: 25em; + position: relative; + margin: -16px -28px -20px -16px; +} +.H_tib .H_tib_desc { padding: 0px 16px 20px 16px } +.H_tib .H_tib_time {color: rgba(15,22,33,.4);margin-top: 0.8em;} +.H_tib_right { float:right; } + +.H_tib .H_btn > svg.H_icon { + fill: rgba(255,255,255, .6); +} + +.H_tib .H_btn:hover > svg.H_icon { + fill: white; +} + +.H_dm_label { + font: 12px "Lucida Grande", Arial, Helvetica, sans-serif; + color: black; + text-shadow: 1px 1px .5px #FFF, 1px -1px .5px #FFF, -1px 1px .5px #FFF, -1px -1px .5px #FFF; + white-space: nowrap; + margin-left: 12px; + margin-top: -7px; + /* This will not work on IE9, but it is accepted! */ + pointer-events: none; +} + + +/*################################################### ICON #########################################################*/ +svg.H_icon { + display: block; + position: relative; + top: 50%; + transform: translateY(-50%); + margin:auto; + width: 24px; + height: 24px; + fill: rgba(15, 22, 33, 0.6); +} +svg.H_icon .H_icon_stroke { + stroke: rgba(15, 22, 33, 0.6); + fill: none; +} +.H_btn:hover > svg.H_icon { + fill: rgba(15, 22, 33, 0.8); +} +.H_btn:hover > svg.H_icon .H_icon_stroke { + stroke: rgba(15, 22, 33, 0.8); +} +.H_btn.H_active { + background-color: #CFD0D3; +} +.H_rdo .H_btn.H_active { + background: none; +} + +.H_active > svg.H_icon, +.H_active:hover > svg.H_icon { + fill: #0F1621 !important; +} +.H_active > svg.H_icon .H_icon_stroke, +.H_active:hover > svg.H_icon .H_icon_stroke { + stroke: #0F1621; +} + +.H_disabled svg.H_icon, +.H_disabled:hover svg.H_icon { + fill: rgba(15, 22, 33, 0.2); + cursor: default; +} +.H_disabled svg.H_icon .H_icon_stroke, +.H_disabled:hover svg.H_icon .H_icon_stroke { + stroke: rgba(15, 22, 33, 0.2); +} + +/*############################################### OVERVIEW MAP #####################################################*/ +.H_overview { + transition: width 0.2s,height 0.2s,margin-top 0.2s, padding 0.2s; + width: 0em; + height: 0em; + overflow: hidden; + cursor: default; + position: absolute; + margin: auto; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + box-shadow: 0em 0 0.4em 0 rgba(15, 22, 33, 0.6); +} + +.H_l_vertical .H_overview_active { + margin: auto 5px; +} + +.H_l_horizontal .H_overview_active { + margin: 5px auto; +} + +.H_l_center .H_overview { + left: -9999px; + right: -9999px; +} + +.H_l_middle .H_overview { + top: -9999px; + bottom: -9999px; +} + +.H_l_right .H_overview { + right: 100%; +} + +.H_l_left .H_overview { + left: 100%; +} + +.H_l_bottom .H_overview { + bottom: 0; +} +.H_l_center.H_l_bottom .H_overview { + bottom: 100%; +} + +.H_l_top .H_overview { + top: 0; +} +.H_l_center.H_l_top .H_overview { + top: 100%; +} + +.H_overview .H_overview_map { + background-color: rgba(256,256,256,0.6); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + box-shadow: 0em 0 0.4em 0 rgba(15, 22, 33, 0.6); +} + + +.H_overview_map .H_ui { + display: none; +} + +.H_zoom_lasso { + position: absolute; + display: none; + box-shadow: 0em 0 0.4em 0 rgba(15, 22, 33, 0.6); + z-index: 100000; + background-color: rgba(15, 22, 33, 0.2); +} diff --git a/src/assets/js/mapsjs-ui.js b/src/assets/js/mapsjs-ui.js new file mode 100644 index 0000000000000000000000000000000000000000..cc157610450c0fb2610ac0e8a937010a0a633469 --- /dev/null +++ b/src/assets/js/mapsjs-ui.js @@ -0,0 +1,7 @@ + +/** + * The code below uses open source software. Please visit the URL below for an overview of the licenses: + * http://js.api.here.com/v3/3.1.8.1/HERE_NOTICE + */ + +H.util.eval("var Ys={};function Zs(a){var b=a.ownerDocument,c=b.documentElement;b=b.defaultView;var d=a.getBoundingClientRect();a=d.left;d=d.top;isNaN(b.pageXOffset)?(a+=c.scrollLeft,d+=c.scrollTop):(a+=b.pageXOffset,d+=b.pageYOffset);return new H(a,d)}function $s(a,b,c){b=Tb(b)?b+\"px\":b;c=Tb(c)?c+\"px\":c;a.style[jf(\"transform\")]=\"translate(\"+b+\",\"+c+\")\"}\nvar at={TOP_LEFT:\"top-left\",TOP_CENTER:\"top-center\",TOP_RIGHT:\"top-right\",LEFT_TOP:\"left-top\",LEFT_MIDDLE:\"left-middle\",LEFT_BOTTOM:\"left-bottom\",RIGHT_TOP:\"right-top\",RIGHT_MIDDLE:\"right-middle\",RIGHT_BOTTOM:\"right-bottom\",BOTTOM_LEFT:\"bottom-left\",BOTTOM_CENTER:\"bottom-center\",BOTTOM_RIGHT:\"bottom-right\"};u(\"H.ui.LayoutAlignment\",at);function bt(a,b){var c={},d={};c[\"top-left\"]=ct(b,\"div\",[dt,et].join(\" \"));c[\"top-center\"]=ct(b,\"div\",[dt,ft,gt,et].join(\" \"));c[\"top-right\"]=ct(b,\"div\",[dt,et].join(\" \"));c[\"left-top\"]=ct(b,\"div\",[dt,ht].join(\" \"));c[\"left-middle\"]=ct(b,\"div\",[dt,it,jt,ht].join(\" \"));c[\"left-bottom\"]=ct(b,\"div\",[dt,ht].join(\" \"));c[\"right-top\"]=ct(b,\"div\",[dt,ht].join(\" \"));c[\"right-middle\"]=ct(b,\"div\",[dt,kt,jt,ht].join(\" \"));c[\"right-bottom\"]=ct(b,\"div\",[dt,ht].join(\" \"));c[\"bottom-left\"]=ct(b,\"div\",[dt,et].join(\" \"));\nc[\"bottom-center\"]=ct(b,\"div\",[dt,lt,gt,et].join(\" \"));c[\"bottom-right\"]=ct(b,\"div\",[dt,et].join(\" \"));d[\"top-left\"]=ct(b,\"div\",[ft,it].join(\" \"));d[\"top-right\"]=ct(b,\"div\",[ft,kt].join(\" \"));d[\"bottom-left\"]=ct(b,\"div\",[lt,it].join(\" \"));d[\"bottom-right\"]=ct(b,\"div\",[lt,kt].join(\" \"));mt(d[\"top-left\"],c[\"top-left\"],c[\"left-top\"]);mt(d[\"top-right\"],c[\"top-right\"],c[\"right-top\"]);mt(d[\"bottom-left\"],c[\"left-bottom\"],c[\"bottom-left\"]);mt(d[\"bottom-right\"],c[\"right-bottom\"],c[\"bottom-right\"]);mt(a,d[\"top-left\"],\nd[\"top-right\"],d[\"bottom-left\"],d[\"bottom-right\"],c[\"top-center\"],c[\"left-middle\"],c[\"right-middle\"],c[\"bottom-center\"]);this.a=c}var ft=\"H_l_top\",lt=\"H_l_bottom\",it=\"H_l_left\",kt=\"H_l_right\",gt=\"H_l_center\",jt=\"H_l_middle\",et=\"H_l_horizontal\",ht=\"H_l_vertical\",dt=\"H_l_anchor\";bt.prototype.update=function(){var a=this.a;nt(a[\"top-center\"],!0);nt(a[\"bottom-center\"],!0);nt(a[\"left-middle\"],!1);nt(a[\"right-middle\"],!1)};\nfunction nt(a,b){b?(b=a.offsetWidth,a.style.marginLeft=-Math.round(.5*b)+\"px\"):(b=a.offsetHeight,a.style.marginTop=-Math.round(.5*b)+\"px\")}bt.prototype.put=function(a,b){a=a?a.J():null;var c=b?this.a[b]:null;a&&c&&(a.parentElement&&a.parentElement.removeChild(a),c.insertBefore(a,/(bottom|right)$/.test(b)||/(center|middle)/.test(b)&&c.childNodes.length%2?c.firstChild:null));this.update()};var ot={IMPERIAL:\"imperial\",METRIC:\"metric\"};u(\"H.ui.UnitSystem\",ot);function pt(){this.a=this.kj()}pt.prototype.kj=function(){var a=Function(\"return this;\")(),b=a.navigator,c=[];b&&(b.msPointerEnabled?c.push(qt):b.pointerEnabled&&c.push(rt));1>c.length&&(\"TouchEvent\"in a&&c.push(st),c.push(tt));return c};pt.prototype.detectEventSets=pt.prototype.kj;pt.prototype.addEventListener=function(a,b,c,d){for(var e=this.a,f,g=e.length,h=!1;g--;)if(f=e[g][b])h=!0,a.addEventListener(f,c,d||!1);h||a.addEventListener(b,c,d||!1)};\npt.prototype.removeEventListener=function(a,b,c,d){for(var e=this.a,f,g=e.length,h=!1;g--;)if(f=e[g][b])h=!0,a.removeEventListener(f,c,d||!1);h||a.removeEventListener(b,c,d||!1)};\nvar rt={start:\"pointerdown\",end:\"pointerup\",move:\"pointermove\",cancel:\"pointercancel\",over:\"pointerover\",out:\"pointerout\",hover:\"pointerhover\"},qt={start:\"MSPointerDown\",end:\"MSPointerUp\",move:\"MSPointerMove\",cancel:\"MSPointerCancel\",over:\"MSPointerOver\",out:\"MSPointerOut\",hover:\"MSPointerHover\"},st={start:\"touchstart\",end:\"touchend\",move:\"touchmove\",cancel:\"touchcancel\"},tt={start:\"mousedown\",end:\"mouseup\",move:\"mousemove\",over:\"mouseover\",out:\"mouseout\",hover:\"mousehover\"};function ct(a,b,c,d){a=a.createElement(b);c&&(a.className=c);d&&(a.innerHTML=d);return a}function mt(a,b){for(var c=1,d=arguments.length;cthis.i.indexOf(a)&&this.i.push(a);b&&(b.className=this.i.join(\" \"));return this};X.prototype.addClass=X.prototype.Oa;\nX.prototype.mb=function(a){a=this.i.indexOf(a);var b=this.J();-1\")};Gt.prototype.s=function(){X.prototype.s.call(this);this.b.removeEventListener(\"update\",this.a)};var It=new X(\"div\",\"H_context_menu_item_separator\");function Jt(a){C(a,Array,Jt,1);Ft.call(this,\"div\",\"H_context_menu\");this.c=a;this.a=null}w(Jt,Ft);u(\"H.ui.context.Menu\",Jt);Jt.prototype.S=function(){Ft.prototype.S.apply(this,arguments);this.c.forEach(function(a){a===De?a=It:(a=new Gt(a),a.addEventListener(\"click\",this.f.bind(this)));this.Na(a)},this);oe(this.J(),[\"mousedown\",\"touchstart\",\"pointerdown\",\"wheel\"],function(a){a.stopPropagation()})};Jt.prototype.renderInternal=Jt.prototype.S;\nJt.prototype.setPosition=function(a,b){if(this.a){var c=this.J();var d=c.offsetWidth;var e=c.offsetHeight;var f=this.a;var g=f.Ba.width;f=f.Ba.height;a+d>g&&a>g/2&&(a-=d);b+e>f&&b>f/2&&(b-=e);$s(c,a,b)}};Jt.prototype.setPosition=Jt.prototype.setPosition;Jt.prototype.f=function(){this.a&&this.a.dispatchEvent(new Ec(\"contextmenuclose\",this.a))};Jt.prototype.Ma=function(a){this.a=a};Jt.prototype.setMap=Jt.prototype.Ma;function Kt(a,b){b=b||{};var c=this;X.call(this,\"div\",\"H_ib H_ib_top\");this.B=A(function(a){c.Dc()||(c.close(),a.preventDefault())},this);this.update=A(this.update,this);this.f=A(this.f,this);this.setPosition(a);this.df(b.content);b.onStateChange&&this.addEventListener(\"statechange\",b.onStateChange);this.R(Lt.OPEN)}w(Kt,X);u(\"H.ui.InfoBubble\",Kt);Kt.prototype.a=null;Kt.prototype.ya=function(){return this.b};Kt.prototype.setPosition=function(a){this.b=Jf(a);this.update()};\nKt.prototype.setPosition=Kt.prototype.setPosition;Kt.prototype.Ma=function(a){this.a=a};\nKt.prototype.S=function(a,b){this.o=ct(b,\"div\",\"H_ib_body\");this.tailEl_=ct(b,\"div\",\"H_ib_tail\");this.j=ct(b,\"div\",\"H_ib_close H_btn\",Mt);this.c=ct(b,\"div\",\"H_ib_content\",\" \");this.o.appendChild(this.j);this.o.appendChild(this.c);vt(this.j,\"start\",this.B);this.a.b.addEventListener(\"sync\",this.update);this.a.Ba.addEventListener(\"sync\",this.update);this.a.addEventListener(\"enginechange\",this.f);a.appendChild(this.o);a.appendChild(this.tailEl_);this.df(this.m)};\nKt.prototype.renderInternal=Kt.prototype.S;Kt.prototype.f=function(){this.v||(this.v=setTimeout(this.update,0))};Kt.prototype.update=function(){var a=this.J(),b=this.a,c,d=\"none\";this.v=0;if(b&&a&&this.getState()===Lt.OPEN){if(c=b.Ga(this.b)){var e=c.x;c=c.y;b=b.Ba.width;if(e>=-b||e<=2*b||c>=-b||c<=2*b)d=\"\",Nt?(a.style.left=e-b+\"px\",a.style.top=c+\"px\"):$s(a,e,c)}a.style.display=d;\"\"===d&&(a.style.visibility=\"visible\")}};var Lt={OPEN:\"open\",CLOSED:\"closed\"};Kt.State=Lt;Kt.prototype.C=Lt.OPEN;\nKt.prototype.getState=function(){return this.C};Kt.prototype.getState=Kt.prototype.getState;Kt.prototype.R=function(a){a!==this.C&&(this.C=a,this.dispatchEvent(\"statechange\"));if(a=this.J())this.C===Lt.OPEN?(a.style.display=\"block\",a.style.visibility=\"hidden\",this.f()):a.style.display=\"none\"};Kt.prototype.setState=Kt.prototype.R;Kt.prototype.close=function(){this.R(Lt.CLOSED)};Kt.prototype.close=Kt.prototype.close;Kt.prototype.open=function(){this.R(Lt.OPEN)};Kt.prototype.open=Kt.prototype.open;\nKt.prototype.am=function(){return this.c||null};Kt.prototype.getContentElement=Kt.prototype.am;\nKt.prototype.df=function(a){if(a)if(\"string\"===typeof a||\"number\"===typeof a.nodeType&&\"string\"===typeof a.nodeName)this.m=a;else throw Error(\"InfoBubble content must be a string or HTML node.\");else this.m=void 0;this.J()&&(this.m?(this.c.innerHTML=\"\",\"string\"===typeof this.m?this.c.innerHTML=a:\"number\"===typeof a.nodeType&&\"string\"===typeof a.nodeName&&this.c.appendChild(a)):this.c.innerHTML=\" \",this.f())};Kt.prototype.setContent=Kt.prototype.df;\nKt.prototype.s=function(){this.close();this.df(null);this.j&&wt(this.j,\"end\",this.B);this.a&&(this.a.b.removeEventListener(\"sync\",this.update),this.a.Ba.removeEventListener(\"sync\",this.update));X.prototype.s.call(this)};var Mt='';function Ot(a){this.c=a;this.a=this.b=null;this.i=0;this.g=22;this.f=A(this.f,this);a=this.c.wc();a.addEventListener(\"mapviewchange\",this.u,!1,this);a=a.a;a.addEventListener(\"add\",this.j,!1,this);a.addEventListener(\"remove\",this.m,!1,this)}function Pt(a,b){a.b&&b&&a.b===b.za()||(a.b&&a.b.removeEventListener(\"tap\",a.f),b?(a.b=b.za(),a.b.addEventListener(\"tap\",a.f),a.i=a.b.min,a.g=a.b.max):(a.b=null,a.i=0,a.g=22))}\nOt.prototype.u=function(a){var b=a.newValue.zoom;this.a&&a.modifiers&a.ZOOM&&(bthis.g)&&this.a.close()};Ot.prototype.j=function(a){a=a.added;Qt(a)&&Pt(this,a)};Ot.prototype.m=function(a){Qt(a.removed)&&(this.a&&this.a.close(),Pt(this,null))};function Qt(a){return window.H.service&&a.za()instanceof window.H.service.traffic.incidents.Provider}\nOt.prototype.f=function(a){var b;if(a.target&&(b=a.target.getData())&&0===a.currentPointer.button){this.a||(this.a=new Kt(a.target.pa()),this.a.Oa(\"H_tib\"),this.c.Wi(this.a));this.a.setPosition(a.target.pa());var c=b.TRAFFIC_ITEM_TYPE_DESC.replace(\" \",\"_\");this.c.xa().qh(\"traffic.\"+c)&&(c=this.c.xa().translate(\"traffic.\"+c));this.a.df('
{{title}}
{{desc}}
{{traffic.from}}{{from}}
{{traffic.until}}{{until}}
'.replace(\"{{title}}\",\nc).replace(\"{{desc}}\",b.TRAFFIC_ITEM_DESCRIPTION[0].value).replace(\"{{traffic.from}}\",this.c.xa().translate(\"traffic.from\")).replace(\"{{traffic.until}}\",this.c.xa().translate(\"traffic.until\")).replace(\"{{from}}\",b.START_TIME).replace(\"{{until}}\",b.END_TIME));this.a.open()}a.stopPropagation()};function Rt(a,b){var c=a.J(),d=this;G.call(this);this.a=a;this.i=c.ownerDocument;this.f={};this.c=[];new Ot(this);this.O=ct(this.i,\"div\",\"H_ui\");this.B=A(function(a){this.u.put(a.target,a.target.Sc)},this);this.addEventListener(\"alignmentchange\",this.B);this.G=A(function(){this.cl()},this);this.addEventListener(\"toggleunitsystem\",this.G);this.O.addEventListener(\"contextmenu\",this.v,!1);this.O.addEventListener(\"MSHoldVisual\",this.v,!1);this.a.addEventListener(\"contextmenu\",this.D,!1,this);this.a.addEventListener(\"contextmenuclose\",\nthis.o,!1,this);this.a.xb(this.F.bind(this));this.b=null;this.m=-1;this.u=new bt(this.O,this.i);this.g=ot.METRIC;St(this,\"en-US\");b&&Tt(this,b);c.appendChild(this.O);y.setTimeout(function(){d.u.update()},1)}w(Rt,G);u(\"H.ui.UI\",Rt);Rt.prototype.v=function(a){for(var b=a.target;b&&!/\\bH_ib_content\\b/.test(b.className);)b=b.parentNode;b||a.preventDefault()};Rt.prototype.J=function(){return this.O};Rt.prototype.getElement=Rt.prototype.J;Rt.prototype.wc=function(){return this.a};\nRt.prototype.getMap=Rt.prototype.wc;Rt.prototype.Zm=function(){return this.g};Rt.prototype.getUnitSystem=Rt.prototype.Zm;Rt.prototype.mg=function(a){var b=this.f,c;if(a!==this.g)for(c in this.g=a,b)if(b[c]instanceof Z)b[c].onUnitSystemChange(this.g)};Rt.prototype.setUnitSystem=Rt.prototype.mg;\nfunction St(a,b){if(ra(b))var c=b;else if(b instanceof Ct){c=b.b;var d=b}else throw Error(\"The locale parameter must be a string or a H.ui.i18n.Localization object.\");if(c)if(d)a.j=d;else if(0<=xt.indexOf(c))a.j=new Ct(c);else throw Error(\"Locale [\"+c+\"] is not supported.\");else throw Error(\"No locale was defined.\");}Rt.prototype.xa=function(){return this.j};Rt.prototype.cl=function(){this.g===ot.METRIC?this.mg(ot.IMPERIAL):this.mg(ot.METRIC)};Rt.prototype.toggleUnitSystem=Rt.prototype.cl;\nRt.prototype.Wi=function(a){var b=this.c.length,c=this.O;if(0>this.c.indexOf(a)){a.ba(this);a.Ma(this.a);var d=a.V(this.i);b=0b&&(b=0);b=(a.m-a.a)*b/a.B;b=du(a,d?a.m-b:a.a+b);a.o!==b&&(a.ng(b,!0),a.dispatchEvent(new wg(a.fk.Ad,b,a.o)))}function hu(a,b){return(b.touches?b.targetTouches[0]:b)[\"page\"+(a.c?\"Y\":\"X\")]}\nfunction iu(a){var b=!1,c=a.type;-1!==c.indexOf(\"pointer\")||-1!==c.indexOf(\"touch\")?b=!0:C(a,MouseEvent)&&(b=1===a.which||1===a.buttons);return b}function ju(a){var b=a.touches;return b&&1===b.length||C(a,MouseEvent)}n=cu.prototype;\nn.Vf=function(a){var b=this.c;if(iu(a)&&ju(a)){var c=hu(this,a);var d=a.target;d===this.j||d.parentElement===this.j?(this.L=c-Zs(this.j)[b?\"y\":\"x\"]-this.j.offsetWidth/2,this.J().className=\"H_slider H_slider_active\"+(this.c?\"\":\" H_l_horizontal\"),this.f=!0):gu(this,c);a.preventDefault()}};n.Xf=function(){this.f&&(this.J().className=\"H_slider \"+(this.c?\"\":\" H_l_horizontal\"),this.f=!1)};n.Wf=function(a){this.f&&a.target===this.b&&(this.f=!1)};\nn.Qf=function(a){this.f&&ju(a)&&(iu(a)?(gu(this,hu(this,a)-this.L),a.preventDefault()):this.f=!1)};n.fk={Ad:\"change\"};\nn.S=function(a,b){var c=ct(b,\"div\",\"H_slider_cont\"),d=ct(b,\"div\",\"H_slider_knob_cont\"),e=ct(b,\"div\",\"H_slider_knob\"),f=ct(b,\"div\",\"H_slider_knob_halo\"),g=ct(b,\"div\",\"H_slider_track\");b=ct(b,\"div\",\"H_slider_track H_slider_track_active\");a.appendChild(c);c.appendChild(g);g.appendChild(b);c.appendChild(d);d.appendChild(e);d.appendChild(f);this.P=g;this.$a=b;this.j=d;this.b||(this.b=a.ownerDocument.body);c.style[this.c?\"height\":\"width\"]=this.ja;this.ng(this.o);eu(this)};\ncu.prototype.renderInternal=cu.prototype.S;cu.prototype.s=function(){fu(this)};cu.prototype.Ca=function(a){a?fu(this):this.P&&eu(this);return X.prototype.Ca.call(this,a)};cu.prototype.setDisabled=cu.prototype.Ca;var ku={\"in\":'',out:''};function Z(){Ft.call(this,\"div\",\"H_ctl\");this.map=null;this.Sc=\"top-left\"}w(Z,Ft);u(\"H.ui.Control\",Z);Z.prototype.Ma=function(a){this.map=a};Z.prototype.V=function(a){return Ft.prototype.V.call(this,a)};Z.prototype.S=function(a,b){Ft.prototype.renderInternal.call(this,a,b);this.Xb(this.Sc)};Z.prototype.renderInternal=Z.prototype.S;Z.prototype.Re=function(){};Z.prototype.onUnitSystemChange=Z.prototype.Re;Z.prototype.wc=function(){return this.map};Z.prototype.getMap=Z.prototype.wc;\nZ.prototype.xa=function(){return this.$a};Z.prototype.getLocalization=Z.prototype.xa;Z.prototype.Tl=function(){return this.Sc};Z.prototype.getAlignment=Z.prototype.Tl;Z.prototype.Xb=function(a){\"string\"===typeof a&&at[a.replace(\"-\",\"_\").toUpperCase()]===a&&(this.Sc=a,this.dispatchEvent(\"alignmentchange\"));return this};Z.prototype.setAlignment=Z.prototype.Xb;function Ut(a){a=a||{};var b=a.slider;Z.call(this);this.o=A(this.o,this);this.v=A(this.v,this);this.a=A(this.a,this);b&&(this.B=A(this.B,this),this.P=b,this.jb=a.sliderSnaps,this.Oa(\"H_zoom_slider\"));this.f=new au({label:ku[\"in\"],onStateChange:this.o});this.j=new au({label:ku.out,onStateChange:this.o});this.Oa(\"H_zoom\");this.Oa(\"H_grp\");this.ca=!1!==a.fractionalZoom;this.setZoomSpeed(a.zoomSpeed||4);this.Xb(a.alignment||\"right-middle\")}w(Ut,Z);u(\"H.ui.ZoomControl\",Ut);\nUt.prototype.dn=function(){return this.L};Ut.prototype.getZoomSpeed=Ut.prototype.dn;Ut.prototype.fo=function(a){this.L=a};Ut.prototype.setZoomSpeed=Ut.prototype.fo;Ut.prototype.Ma=function(a){this.map!==a&&(this.map&&this.map.removeEventListener(\"mapviewchange\",this.v),lu(this));Z.prototype.Ma.apply(this,arguments);this.map&&(this.a(),a.addEventListener(\"mapviewchange\",this.v),a.addEventListener(\"baselayerchange\",this.a))};Ut.prototype.setMap=Ut.prototype.Ma;\nUt.prototype.s=function(){Z.prototype.s.apply(this,arguments);this.map.removeEventListener(\"baselayerchange\",this.a);lu(this)};Ut.prototype.S=function(a,b){Z.prototype.renderInternal.call(this,a,b);Dt(this.f,this.xa().translate(\"zoom.in\"));Dt(this.j,this.xa().translate(\"zoom.out\"))};Ut.prototype.renderInternal=Ut.prototype.S;Ut.prototype.Xb=function(a){var b=this.Sc;Z.prototype.Xb.call(this,a);b!==a&&this.a();return this};Ut.prototype.setAlignment=Ut.prototype.Xb;\nUt.prototype.v=function(a){a=a.target.qb();var b=this.map,c=b.fb()-1;b=b.g||b.vc().getCapabilities().lookAt.zoom;this.P&&this.c.ng(a);this.f.Ca(!1);this.j.Ca(!1);a+c>=b.max&&this.f.Ca(!0);a<=b.min&&this.j.Ca(!0)};function lu(a){a.removeChild(a.c);a.c=null;a.m&&(a.m.removeEventListener(\"minchange\",a.a),a.m.removeEventListener(\"maxchange\",a.a),a.m=null)}\nUt.prototype.o=function(a){a=a.target;var b=a===this.f?1:-1,c=0',\npoint:''};function nu(a){au.call(this,a);this.j=function(a){a.preventDefault()};this.f=A(function(a){this.Dc()||this.toggleState();a.preventDefault()},this)}w(nu,au);u(\"H.ui.base.PushButton\",nu);nu.prototype.S=function(a){vt(a,\"start\",this.f);vt(a,\"end\",this.j);this.Mc(this.He(),!0)};nu.prototype.renderInternal=nu.prototype.S;nu.prototype.no=function(){var a=bu.DOWN;this.R(this.getState()===a?bu.UP:a);return this};nu.prototype.toggleState=nu.prototype.no;\nnu.prototype.s=function(){var a=this.J();a&&wt(a,\"start\",this.f);au.prototype.s.call(this)};var Nt,ou=navigator.userAgent,pu=-1ru;var su=Function(\"return this\")(),Ht=document.createElement(\"T\");function tu(a,b,c){Ah.call(this,a,{icon:uu,visibility:c});vu(this,b)}w(tu,Ah);function vu(a,b){a.sn=b;a.O&&(a.O.textContent=b)}var uu=new rh(ct(su.document,\"span\",\"H_dm_label\"),{onAttach:function(a,b,c){c.O=a;vu(c,c.sn)},onDetach:function(a,b,c){delete c.O}});function wu(a,b){G.call(this);this.b=a;this.a=new tu(this.B,\"\");b.push(this.a);this.hc=new P({objects:b,data:this});this.f=this.f.bind(this)}w(wu,G);wu.prototype.ad=!1;wu.prototype.B={lat:0,lng:0};wu.prototype.Mc=function(a,b){vu(this.a,a);this.a.fa(b)};wu.prototype.f=function(){this.a.wb(this.g)};function xu(a,b){b&&(a.nextSibling=b,b.previousSibling=a)};function yu(a,b,c,d){var e=new K,f=[];xu(a,this);xu(this,b);e.sd(a.ya());e.sd(b.ya());this.c=new Wg(e,{style:c.Zd});this.m=new Wg(e,{style:{strokeColor:\"transparent\",lineWidth:Math.min(100,this.c.Ia().lineWidth+2*(d||5))}});c.c&&(this.j=new Wg(e,{style:c.c}),f.push(this.j));f.push(this.c,this.m);wu.call(this,c,f);this.o=this.u=-1;a=this.hc;a.addEventListener(\"pointermove\",this.D,!0,this);a.addEventListener(\"pointerleave\",this.v,!0,this)}w(yu,wu);yu.prototype.Fe=function(){var a=this.c.pa();return a.we(0).bb(a.we(1))};\nfunction zu(a,b,c){var d=a.c.pa();d.jf(3*c,3,[b.lat,b.lng,0]);a.j&&a.j.fa(d);a.m.fa(d);a.c.fa(d)}yu.prototype.D=function(a){var b=a.currentPointer;a=this.previousSibling.ya();var c=this.nextSibling.ya(),d=this.b.f,e=b.viewportX;b=b.viewportY;if(this.u!==e||this.o!==b)this.u=e,this.o=b,d.fa(this.b.g(a,c,{x:e,y:b})),d.wb(!0)};yu.prototype.v=function(){this.b.f.wb()};yu.prototype.ii=function(){this.Mc(this.b.a(this.Fe()),this.c.I().lb())};function Au(a,b,c){c=b.b(c||0);this.c=new Om(a,{icon:c,zIndex:0});this.c.draggable=!0;wu.call(this,b,[this.c]);a=this.hc;a.addEventListener(\"dragstart\",this.Bn,!0,this);a.addEventListener(\"drag\",this.Cn,!0,this);a.addEventListener(\"dragend\",this.An,!0,this)}w(Au,wu);n=Au.prototype;n.oj=0;n.Oh={Ad:\"change\"};n.Fe=function(){return this.oj};n.ya=function(){return this.c.pa()};\nfunction Bu(a){var b=0;a.nextSibling&&a.previousSibling&&(a.nextSibling.ad||a.previousSibling.ad?a.nextSibling.ad&&!a.previousSibling.ad&&(b=2):b=1);b=a.b.b(b);a.c.ed(b)}n.Cn=function(a){var b=a.currentPointer;a=b.viewportX;b=b.viewportY;if(this.m!==a||this.u!==b)this.m=a,this.u=b,this.c.fa(this.b.map.Wa(a-this.j.x,b-this.j.y)),this.dispatchEvent(new Ec(this.Oh.Ad,this))};\nn.Bn=function(a){var b=a.currentPointer,c=b.viewportX;b=b.viewportY;var d=this.b.map.Ga(this.ya());this.c.ff(1);this.j={x:c-d.x,y:b-d.y};a.stopPropagation()};n.An=function(){this.c.ff(0)};n.ii=function(a){this.oj=a;this.Mc(this.b.a(a),this.ya())};function Cu(a,b){this.c=b;this.b=a;this.a={previousSibling:null,nextSibling:null,ad:!0};Du(this,this.a);this.Uf=A(this.Uf,this)}u(\"H.ui.distanceMeasurement.Model\",Cu);n=Cu.prototype;n.Nf=function(){return this.a.nextSibling===this.a};function Eu(a,b){a=a.a;for(var c=a.nextSibling;c!==a;){var d=c,e=c.previousSibling===a?!1:b;(d.g=e)?d.f():(d.i&&y.clearTimeout(d.i),d.i=y.setTimeout(d.f,100));c=c.nextSibling}}\nfunction Fu(a,b){var c=b||a.a.nextSibling,d=0,e=0;if(b&&!Gu(a,b))throw new D(a.We,0,b);c instanceof Au?d=c.Fe():c instanceof yu&&(d=c.previousSibling.Fe());for(b=c;b&&b!==a.a;b=b.nextSibling,e++)b.ii(d),1===e%2&&(d+=b.Fe())}n.oe=function(a){var b=this.a.previousSibling,c=this.Nf();a=new Au(a,this.c,c?0:2);this.b.T(a.hc);xu(a,this.a);a.addEventListener(a.Oh.Ad,this.Uf);c?Du(this,a):(Hu(this,b,a),Bu(b),Fu(this,b));return a};\nn.insertBefore=function(a,b){var c;var d=1;if(b){if(!Gu(this,b))throw new D(this.insertBefore,1,b);if(c=b.previousSibling.ad)d=0;a=new Au(a,this.c,d);a.addEventListener(a.Oh.Ad,this.Uf);this.b.T(a.hc);c?(c=this.a.nextSibling,Hu(this,a,c),Du(this,a),b=a,Bu(c)):(c=b.previousSibling,b=c.previousSibling,d=c.nextSibling,this.b.La(c.hc),Hu(this,b,a),Hu(this,a,d));Fu(this,b)}else a=this.oe(a);return a};n.ha=function(){Du(this,this.a);this.b.ha()};\nn.We=function(a){var b=this.a,c=a.previousSibling,d=a.nextSibling;if(!Gu(this,a))throw new D(this.We,0,a);this.b.La(a.hc);if(c===b){var e=d;e!==b?(a=e.nextSibling,Du(this,a),a.ii(0),Bu(a),Fu(this,a)):Du(this,this.a)}else d===b?(e=c,a=e.previousSibling,xu(a,b),Bu(a)):c&&d&&(Hu(this,c.previousSibling,d.nextSibling),this.b.td([d.hc,c.hc]),Fu(this,c.previousSibling));e&&e!==b&&this.b.La(e.hc)};function Gu(a,b){for(var c=a.a.nextSibling,d=!1;c!==a.a;){if(c===b){d=!0;break}c=c.nextSibling}return d}\nfunction Hu(a,b,c){b=new yu(b,c,a.c);a.b.T(b.hc)}function Du(a,b){a.a.nextSibling=b;b.previousSibling=a.a}n.Uf=function(a){a=a.target;var b=a.previousSibling,c=a.nextSibling,d=a.ya();if(!c.ad){zu(c,d,!1);var e=a}b.ad||(zu(b,d,!0),e=b.previousSibling);Fu(this,e)};function Yt(a){a=a||{};var b,c=a.lineStyle;Z.call(this);this.v=new nu({label:mu.btn,onStateChange:A(this.yn,this)});this.Na(this.v);if(b=a.distanceFormatter)this.nj=b;c&&(this.Sj=c,this.qk=B);this.Xb(a.alignment||\"right-bottom\");this.m={};this.m[0]=a.startIcon;this.m[2]=a.endIcon;this.m[1]=a.stopoverIcon;this.m[3]=a.splitIcon}w(Yt,Z);u(\"H.ui.DistanceMeasurement\",Yt);n=Yt.prototype;n.Sj={strokeColor:\"rgb(39,44,54)\",lineWidth:5};n.qk={strokeColor:\"white\",lineWidth:7};\nfunction Iu(a){var b=a.map,c,d={};a.f||(a.j=new M,a.c=new Lk(a.j,{pixelRatio:a.map.fb()}),a.B=c=a.j.gc(),a.B.Uk(!0),c.addEventListener(\"dragstart\",a.wn,!0,a),c.addEventListener(\"dragend\",a.hf,!0,a),c.addEventListener(\"pointerenter\",a.hf,!0,a),c.addEventListener(\"pointerleave\",a.xn,!0,a),c.addEventListener(\"tap\",a.Kn,!0,a),a.o=Ju(a),d.a=A(a.nj,a),d.b=A(a.bk,a),d.g=A(a.yj,a),d.map=a.map,d.f=a.o,d.Zd=a.Sj,d.c=a.qk,a.a=new Cu(a.B,d),a.f=!0);a.o&&a.B.T(a.o);b.addEventListener(\"tap\",a.mk,!0,a);b.a.add(a.c)}\nfunction Ku(a){var b=a.map;a.f&&(b.removeEventListener(\"tap\",a.mk,!0,a),b.cg(a.c),a.a.ha())}function Ju(a){function b(){var a=c.Db();a={anchor:c.ld().clone().scale(f).floor(),size:new uh(Lc(a.w*f),Lc(a.h*f)),hitArea:d};return new Si(c.Xc(),a)}var c=a.bk(3),d=new vh(wh.NONE,[]),e,f=c===a.P?.5:1;if(1===c.getState())var g=b();else g=new Si(\"\",{hitArea:d}),c.addEventListener(\"statechange\",function(){1===c.getState()&&e.ed(b())});return e=new Om(a.map.lb(),{visibility:!1,icon:g})}\nn.nj=function(a){var b=\"m\",c=0;\"metric\"===this.L?1E3<=a&&(a/=1E3,b=\"km\",c=1):(a/=.3048,b=\"ft\",5280<=a&&(a/=5280,b=\"mi\",c=1));return a.toFixed(c)+\" \"+this.xa().translate(\"scale.\"+b)};n.yj=function(a,b,c){a=this.map.Ga(a);b=this.map.Ga(b);c=(new H(c.x,c.y)).xj(a,b);return this.map.Wa(c.x,c.y)};\nn.S=function(a,b){var c=22*(this.map.vc().type===Km.WEBGL?1:this.map.fb()),d=c/2;Z.prototype.renderInternal.call(this,a,b);this.L=ot.METRIC;this.P=new Si(mu.point,{anchor:{x:d,y:d},size:{w:c,h:c},hitArea:new vh(wh.CIRCLE,[d,d,d])});Dt(this.v,this.xa().translate(\"distance.measurement\"))};Yt.prototype.renderInternal=Yt.prototype.S;n=Yt.prototype;n.bk=function(a){return this.m[a]||this.P};n.hf=function(){Eu(this.a,!0)};n.wn=function(){Eu(this.a)};n.xn=function(a){\"touch\"!==a.currentPointer.type&&Eu(this.a)};\nn.Kn=function(a){var b=a.currentPointer;var c=a.target.Va;var d;c&&(c=c.getData())instanceof wu&&(d=c);c=d;a=a.originalEvent;a=a.metaKey||a.altKey;c&&(a&&c instanceof Au?this.a.We(c):c instanceof yu&&(a=c.previousSibling.ya(),d=c.nextSibling.ya(),b={x:b.viewportX,y:b.viewportY},this.a.insertBefore(this.yj(a,d,b),c.nextSibling),this.o.wb()),this.hf())};\nn.mk=function(a){var b=a.currentPointer;a=a.target;a!==this.map&&a.getProvider&&a.getProvider()===this.j||(this.a.oe(this.map.Wa(b.viewportX,b.viewportY)),this.o.wb(),this.hf())};n.yn=function(a){\"down\"===a.target.getState()?Iu(this):Ku(this)};n.Re=function(a){this.L=a;this.f&&(Fu(this.a),this.hf())};Yt.prototype.onUnitSystemChange=Yt.prototype.Re;Yt.prototype.s=function(){Ku(this);this.f&&(this.j.F(),this.c.F());Yt.l.s.call(this)};\nYt.prototype.Ma=function(a){a?this.v.getState()===bu.DOWN&&(this.map=a,Iu(this)):(Ku(this),this.f=!1);Z.prototype.Ma.apply(this,arguments)};Yt.prototype.setMap=Yt.prototype.Ma;function Lu(){this.C=Mu.CLOSED;Ft.call(this,\"div\",\"H_overlay\")}w(Lu,Ft);u(\"H.ui.base.OverlayPanel\",Lu);Lu.prototype.R=function(a,b){if(a!==this.C||b)this.C=a,a===Mu.OPEN?this.Oa(\"H_open\"):this.mb(\"H_open\");return this};Lu.prototype.setState=Lu.prototype.R;Lu.prototype.getState=function(){return this.C};Lu.prototype.getState=Lu.prototype.getState;\nLu.prototype.uk=function(a){var b=a.Sc;a=a.J();var c=this.J(),d=c.style;this.mb(\"H_top\");this.mb(\"H_middle\");this.mb(\"H_bottom\");this.mb(\"H_left\");this.mb(\"H_center\");this.mb(\"H_right\");d.bottom=d.top=d.left=d.right=d.margin=\"\";if(/top/g.test(b)){this.Oa(\"H_top\");d.top=\"0\";d.margin=\"0 12px\";var e=-1}else/bottom/g.test(b)?(this.Oa(\"H_bottom\"),d.bottom=\"0\",d.margin=\"0 12px\",e=1):(this.Oa(\"H_middle\"),d.top=\"50%\",d.margin=\"0 12px\",d.marginTop=-Math.round(.5*\nc.offsetHeight)+\"px\",e=0);/left/g.test(b)?(this.Oa(\"H_left\"),d.left=a.offsetWidth+\"px\",d.marginLeft=\"12px\"):/right/g.test(b)?(this.Oa(\"H_right\"),d.right=a.offsetWidth+\"px\",d.marginRight=\"12px\"):(this.Oa(\"H_center\"),d.left=\"50%\",0>e?(d.top=a.offsetHeight+\"px\",d.marginTop=\"12px\"):0',onStateChange:A(function(a){a.target.getState()===bu.DOWN?(this.c.R(Mu.OPEN),this.c.uk(this)):\nthis.c.R(Mu.CLOSED)},this)});this.j=new Nu({title:c,onActiveButtonChange:function(){a:{var a=this.j.Cf();for(var b=a.length;b--;)if(a[b].getState()===bu.DOWN){a=a[b];break a}a=null}a=a.getData();this.map.xd(this.m[a].layer)}.bind(this)});this.v=new Ft(\"div\",\"H_grp\");this.P=new X(\"div\",\"H_separator\");this.Na(this.B);this.Na(this.c);this.c.Na(this.j);this.c.Na(this.P);this.c.Na(this.v);Pu(this)};Wt.prototype.renderInternal=Wt.prototype.S;\nfunction Pu(a){var b=a.xa();a.m.forEach(function(a,d){this.j.Bg(new nu({label:Qu(b,a.label),data:d,disabled:!a.layer}))},a);a.f.forEach(function(a,d){this.v.Na(new nu({label:Qu(b,a.label),onStateChange:this.L.bind(this,a.layer),data:d,disabled:!a.layer}))},a);a.P.wb(!(!a.f.length||!a.m.length));y.setTimeout(function(){this.map&&(this.a(),this.B.Ca(!(this.m&&this.m.length||this.f&&this.f.length)))}.bind(a))}\nWt.prototype.a=function(){var a=this.map.g,b=this.map.a;this.m.forEach(function(b,d){this.j.Cf()[d].R(bu[b.layer===a?\"DOWN\":\"UP\"],!0)},this);this.f.forEach(function(a,d){d=this.v.$g()[d];a.layer?d.R(bu[-1!==b.indexOf(a.layer)?\"DOWN\":\"UP\"],!0):d.Ca(!0)},this)};Wt.prototype.L=function(a,b){b.target.getState()===bu.DOWN?this.map.Yi(a):this.map.cg(a)};function Qu(a,b){return/^layers?/.test(b)&&a.qh(b)?a.translate(b):b}Wt.prototype.o=function(){this.B.R(bu.UP)};\nWt.prototype.s=function(){Wt.l.s.call(this);this.G()};function Vt(a){a=a||{};Z.call(this);this.c=new nu({label:'',\nonStateChange:A(this.zn,this)});this.Na(this.c);this.Xb(a.alignment||\"right-bottom\")}w(Vt,Z);u(\"H.ui.ZoomRectangle\",Vt);n=Vt.prototype;\nn.zn=function(a){var b=this.map,c=b.Ba.element;a.target.getState()===bu.DOWN?(b.addEventListener(\"dragstart\",this.dk,!0,this),b.addEventListener(\"drag\",this.ek,!0,this),b.addEventListener(\"dragend\",this.ck,!0,this),a=c.ownerDocument.createElement(\"div\"),a.className=\"H_zoom_lasso\",c.appendChild(a),this.a=a):(b.removeEventListener(\"dragstart\",this.dk,!0,this),b.removeEventListener(\"drag\",this.ek,!0,this),b.removeEventListener(\"dragend\",this.ck,!0,this),c.removeChild(this.a))};\nn.dk=function(a){var b=this.a.style,c=a.currentPointer,d=c.viewportX;c=c.viewportY;a.target===this.map&&(a.stopPropagation(),b.width=\"0px\",b.height=\"0px\",b.top=c+\"px\",b.left=d+\"px\",b.display=\"block\",this.j=c,this.f=d)};n.ek=function(a){var b=a.currentPointer,c=b.viewportX,d=b.viewportY;b=this.f;var e=this.j,f=this.a.style;a.target===this.map&&(a.stopPropagation(),a=c-b,c=d-e,f.left=b+(0>a?a:0)+\"px\",f.top=e+(0>c?c:0)+\"px\",f.width=Math.abs(a)+\"px\",f.height=Math.abs(c)+\"px\")};\nn.ck=function(a){var b=this.map,c=a.currentPointer;a.target===this.map&&(a.stopPropagation(),this.a.style.display=\"none\",b.b.Yb({bounds:Qf([b.Wa(this.f,this.j),b.Wa(c.viewportX,c.viewportY)])},!0))};n.S=function(a,b){Z.prototype.renderInternal.call(this,a,b);Dt(this.c,this.xa().translate(\"zoom.rectangle\"))};Vt.prototype.renderInternal=Vt.prototype.S;function Ru(a,b){b=b||{};if(!(a&&a instanceof Dk))throw Error(\"Base layer is mandatory for overview UI element\");Z.call(this);this.c=new nu({label:'',onStateChange:A(this.f,this)});this.Na(this.c);this.a=\nnew Su(a,b.zoomDelta,b.scaleX,b.scaleY);this.Xb(b.alignment||\"right-bottom\");this.Na(this.a)}w(Ru,Z);u(\"H.ui.Overview\",Ru);Ru.prototype.xd=function(a){this.a.xd(a);return this};Ru.prototype.setBaseLayer=Ru.prototype.xd;Ru.prototype.f=function(a){a.target.getState()===bu.DOWN?(a=this.a,Tu(a,!0),a.Ai(),a.Oa(\"H_overview_active\"),a.a.addEventListener(\"mapviewchange\",a.Ai,!1,a)):Uu(this.a)};\nRu.prototype.S=function(a,b){Z.prototype.renderInternal.call(this,a,b);this.c.J().style[\"float\"]=this.Sc.match(\"right\")?\"right\":\"left\";this.a.Ma(this.map);Dt(this.c,this.xa().translate(\"minimap\"))};Ru.prototype.renderInternal=Ru.prototype.S;Ru.prototype.s=function(){this.a.F();X.prototype.s.call(this)};function Su(a,b,c,d){this.m=a;\"number\"===typeof b&&(this.el=b);\"number\"===typeof c&&(this.rk=c);\"number\"===typeof d&&(this.sk=d);Ft.call(this,\"div\",\"H_overview\")}w(Su,Z);Su.prototype.xd=function(a){this.c.xd(a)};\nSu.prototype.S=function(a,b){b=ct(b,\"div\",\"H_overview_map\");mt(a,b);this.f=b};Su.prototype.renderInternal=Su.prototype.S;n=Su.prototype;n.el=3;n.rk=5;n.sk=5;n.Ma=function(a){this.a=a;this.c=new S(this.f,this.m,{pixelRatio:this.a.fb(),engineType:this.a.vc().type});this.c.m.J().style.display=\"none\";this.o=this.c.b;this.j=this.a.b};function Uu(a){!a.Bd&&Tu(a);a.mb(\"H_overview_active\");a.a.removeEventListener(\"mapviewchange\",a.Ai,!1,a)}\nn.Ai=function(a){a&&a.modifiers&a.SIZE&&Tu(this,!0);a=this.j.pb();a.zoom=a.zoom-this.el;this.o.Yb(a)};function Tu(a,b){var c=a.a.Ba.element,d=a.J().style,e=c.offsetWidth/a.rk/10;c=c.offsetHeight/a.sk/10;var f=a.f.style;b?(d.width=e+\"em\",d.height=c+\"em\",f.width=e+\"em\",f.height=c+\"em\"):d.width=d.height=\"0em\";a.c.Ba.resize()}n.s=function(){Su.l.s.call(this);Uu(this);this.c.F();this.c=this.o=this.j=this.a=this.m=this.f=null};function Xt(a){a=a||{};Z.call(this);this.Oa(\"H_scalebar\");this.Xb(a.alignment||\"right-bottom\");this.B=150;this.update=A(this.update,this);this.m=this.c=this.a=this.j=null}w(Xt,Z);u(\"H.ui.ScaleBar\",Xt);\nXt.prototype.S=function(a,b){Z.prototype.renderInternal.call(this,a,b);a.innerHTML='
';a.style.direction=\"ltr\";this.j=a.firstChild;b=this.j.childNodes;this.a=b[0];this.c=b[1];this.m=a.lastChild;this.o=ot.METRIC;this.v=\nA(function(a){this.Dc()||(this.dispatchEvent(\"toggleunitsystem\"),a.preventDefault())},this);this.f=A(function(a){a.preventDefault()},this);vt(a,\"start\",this.f);vt(a,\"end\",this.v);Dt(this,this.xa().translate(\"scale.switchToImperial\"));this.update()};Xt.prototype.renderInternal=Xt.prototype.S;Xt.prototype.Ma=function(a){this.map&&this.map.removeEventListener(\"mapviewchange\",this.update);a&&a.addEventListener(\"mapviewchange\",this.update);Z.prototype.Ma.apply(this,arguments)};Xt.prototype.setMap=Xt.prototype.Ma;\nXt.prototype.capture=function(a,b,c){var d=this.J();var e=d.ownerDocument,f=e.createElement(\"canvas\"),g=f.getContext(\"2d\"),h=e.createElementNS(\"http://www.w3.org/2000/svg\",\"svg\"),k=e.createElementNS(\"http://www.w3.org/2000/svg\",\"foreignObject\"),l=We(d,e,!1);e=parseFloat(d.offsetWidth)+1;var m=parseFloat(d.offsetHeight),p=e*a;a*=m;f.width=p;f.height=a;h.setAttribute(\"xmlns\",\"http://www.w3.org/2000/svg\");h.setAttribute(\"width\",p);h.setAttribute(\"height\",a);h.setAttribute(\"viewBox\",\"0 0 \"+e+\" \"+m);k.setAttribute(\"width\",\n\"100%\");k.setAttribute(\"height\",\"100%\");h.appendChild(k);l.setAttribute(\"width\",\"100%\");l.setAttribute(\"height\",\"100%\");l.setAttribute(\"xmlns\",\"http://www.w3.org/1999/xhtml\");var q=window.getComputedStyle(d);\"box-shadow display align-items font font-family font-size height text-shadow direction\".split(\" \").forEach(function(a){l.style.setProperty(a,q.getPropertyValue(a))});k.appendChild(l);d=Ne(h.outerHTML);(new cf(\"image\",d)).then(function(a){g.drawImage(a,0,0);b(f)},c)};Xt.prototype.capture=Xt.prototype.capture;\nXt.prototype.Re=function(a){this.o=a;Dt(this,\"imperial\"===a?this.xa().translate(\"scale.switchToMetric\"):this.xa().translate(\"scale.switchToImperial\"));this.update()};Xt.prototype.onUnitSystemChange=Xt.prototype.Re;\nXt.prototype.update=function(){if(this.J()){var a=this.B;var b=0;var c=this.map;var d;if(c){var e=Math.round(.5*c.Ba.width);var f=Math.round(.5*c.Ba.height);if(d=c.Wa(e,f))b=Jf(d),c=Jf(c.Wa(e+1,f)),b=100*b.bb(c)}if(c=b)this.o===ot.IMPERIAL?cc?(f=c,e=this.xa().translate(\"scale.m\")):(f=c/1E3,e=this.xa().translate(\"scale.km\")),c=Math.pow(10,Math.floor(Math.log(f)/Math.LN10)),f=c/f*100,fa&&(c/=2,f/=2),f=Math.round(f),this.j.setAttribute(\"width\",f),this.m.textContent=c+\" \"+e,this.a.points.getItem(2).x=this.c.points.getItem(2).x=this.a.points.getItem(3).x=this.c.points.getItem(3).x=f-2}};var Vu=1609.344,Wu=.3048006;u(\"H.ui.buildInfo\",function(){return qf(\"mapsjs-ui\",\"1.8.1\",\"e2f2d80\")});\n"); \ No newline at end of file